@circle-fin/smart-contract-platform 10.5.4 → 10.5.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,46 +1,22 @@
|
|
|
1
|
-
"use strict";var hr=require("util"),ze=require("stream"),Sc=require("path"),Tl=require("http"),wl=require("https"),Al=require("url"),cm=require("fs"),Lr=require("crypto"),Ep=require("http2"),lm=require("assert"),Cp=require("tty"),um=require("os"),tr=require("zlib"),pm=require("events");function Sp(e,t){return function(){return e.apply(t,arguments)}}const{toString:dm}=Object.prototype,{getPrototypeOf:Tc}=Object,{iterator:wc,toStringTag:Tp}=Symbol,Ac=(e=>t=>{const a=dm.call(t);return e[a]||(e[a]=a.slice(8,-1).toLowerCase())})(Object.create(null)),Ot=e=>(e=e.toLowerCase(),t=>Ac(t)===e),Ic=e=>t=>typeof t===e,{isArray:Ur}=Array,Pr=Ic("undefined");function ra(e){return e!==null&&!Pr(e)&&e.constructor!==null&&!Pr(e.constructor)&&mt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const wp=Ot("ArrayBuffer");function fm(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&wp(e.buffer),t}const mm=Ic("string"),mt=Ic("function"),Ap=Ic("number"),aa=e=>e!==null&&typeof e=="object",hm=e=>e===!0||e===!1,Bc=e=>{if(Ac(e)!=="object")return!1;const t=Tc(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Tp in e)&&!(wc in e)},vm=e=>{if(!aa(e)||ra(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},gm=Ot("Date"),xm=Ot("File"),ym=e=>!!(e&&typeof e.uri<"u"),bm=e=>e&&typeof e.getParts<"u",Em=Ot("Blob"),Cm=Ot("FileList"),Sm=e=>aa(e)&&mt(e.pipe);function Tm(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const Ip=Tm(),Bp=typeof Ip.FormData<"u"?Ip.FormData:void 0,wm=e=>{if(!e)return!1;if(Bp&&e instanceof Bp)return!0;const t=Tc(e);if(!t||t===Object.prototype||!mt(e.append))return!1;const a=Ac(e);return a==="formdata"||a==="object"&&mt(e.toString)&&e.toString()==="[object FormData]"},Am=Ot("URLSearchParams"),[Im,Bm,_m,Rm]=["ReadableStream","Request","Response","Headers"].map(Ot),km=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function na(e,t,{allOwnKeys:a=!1}={}){if(e===null||typeof e>"u")return;let r,n;if(typeof e!="object"&&(e=[e]),Ur(e))for(r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else{if(ra(e))return;const s=a?Object.getOwnPropertyNames(e):Object.keys(e),i=s.length;let o;for(r=0;r<i;r++)o=s[r],t.call(null,e[o],o,e)}}function _p(e,t){if(ra(e))return null;t=t.toLowerCase();const a=Object.keys(e);let r=a.length,n;for(;r-- >0;)if(n=a[r],t===n.toLowerCase())return n;return null}const vr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Rp=e=>!Pr(e)&&e!==vr;function Il(){const{caseless:e,skipUndefined:t}=Rp(this)&&this||{},a={},r=(n,s)=>{if(s==="__proto__"||s==="constructor"||s==="prototype")return;const i=e&&_p(a,s)||s;Bc(a[i])&&Bc(n)?a[i]=Il(a[i],n):Bc(n)?a[i]=Il({},n):Ur(n)?a[i]=n.slice():(!t||!Pr(n))&&(a[i]=n)};for(let n=0,s=arguments.length;n<s;n++)arguments[n]&&na(arguments[n],r);return a}const Nm=(e,t,a,{allOwnKeys:r}={})=>(na(t,(n,s)=>{a&&mt(n)?Object.defineProperty(e,s,{value:Sp(n,a),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,s,{value:n,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),Lm=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Um=(e,t,a,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),a&&Object.assign(e.prototype,a)},Pm=(e,t,a,r)=>{let n,s,i;const o={};if(t=t||{},e==null)return t;do{for(n=Object.getOwnPropertyNames(e),s=n.length;s-- >0;)i=n[s],(!r||r(i,e,t))&&!o[i]&&(t[i]=e[i],o[i]=!0);e=a!==!1&&Tc(e)}while(e&&(!a||a(e,t))&&e!==Object.prototype);return t},Dm=(e,t,a)=>{e=String(e),(a===void 0||a>e.length)&&(a=e.length),a-=t.length;const r=e.indexOf(t,a);return r!==-1&&r===a},Om=e=>{if(!e)return null;if(Ur(e))return e;let t=e.length;if(!Ap(t))return null;const a=new Array(t);for(;t-- >0;)a[t]=e[t];return a},Fm=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Tc(Uint8Array)),Mm=(e,t)=>{const r=(e&&e[wc]).call(e);let n;for(;(n=r.next())&&!n.done;){const s=n.value;t.call(e,s[0],s[1])}},Vm=(e,t)=>{let a;const r=[];for(;(a=e.exec(t))!==null;)r.push(a);return r},qm=Ot("HTMLFormElement"),jm=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(a,r,n){return r.toUpperCase()+n}),kp=(({hasOwnProperty:e})=>(t,a)=>e.call(t,a))(Object.prototype),Km=Ot("RegExp"),Np=(e,t)=>{const a=Object.getOwnPropertyDescriptors(e),r={};na(a,(n,s)=>{let i;(i=t(n,s,e))!==!1&&(r[s]=i||n)}),Object.defineProperties(e,r)},zm=e=>{Np(e,(t,a)=>{if(mt(e)&&["arguments","caller","callee"].indexOf(a)!==-1)return!1;const r=e[a];if(mt(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+a+"'")})}})},Hm=(e,t)=>{const a={},r=n=>{n.forEach(s=>{a[s]=!0})};return Ur(e)?r(e):r(String(e).split(t)),a},$m=()=>{},Gm=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Qm(e){return!!(e&&mt(e.append)&&e[Tp]==="FormData"&&e[wc])}const Wm=e=>{const t=new Array(10),a=(r,n)=>{if(aa(r)){if(t.indexOf(r)>=0)return;if(ra(r))return r;if(!("toJSON"in r)){t[n]=r;const s=Ur(r)?[]:{};return na(r,(i,o)=>{const c=a(i,n+1);!Pr(c)&&(s[o]=c)}),t[n]=void 0,s}}return r};return a(e,0)},Xm=Ot("AsyncFunction"),Ym=e=>e&&(aa(e)||mt(e))&&mt(e.then)&&mt(e.catch),Lp=((e,t)=>e?setImmediate:t?((a,r)=>(vr.addEventListener("message",({source:n,data:s})=>{n===vr&&s===a&&r.length&&r.shift()()},!1),n=>{r.push(n),vr.postMessage(a,"*")}))(`axios@${Math.random()}`,[]):a=>setTimeout(a))(typeof setImmediate=="function",mt(vr.postMessage)),Jm=typeof queueMicrotask<"u"?queueMicrotask.bind(vr):typeof process<"u"&&process.nextTick||Lp,Zm=e=>e!=null&&mt(e[wc]);var A={isArray:Ur,isArrayBuffer:wp,isBuffer:ra,isFormData:wm,isArrayBufferView:fm,isString:mm,isNumber:Ap,isBoolean:hm,isObject:aa,isPlainObject:Bc,isEmptyObject:vm,isReadableStream:Im,isRequest:Bm,isResponse:_m,isHeaders:Rm,isUndefined:Pr,isDate:gm,isFile:xm,isReactNativeBlob:ym,isReactNative:bm,isBlob:Em,isRegExp:Km,isFunction:mt,isStream:Sm,isURLSearchParams:Am,isTypedArray:Fm,isFileList:Cm,forEach:na,merge:Il,extend:Nm,trim:km,stripBOM:Lm,inherits:Um,toFlatObject:Pm,kindOf:Ac,kindOfTest:Ot,endsWith:Dm,toArray:Om,forEachEntry:Mm,matchAll:Vm,isHTMLForm:qm,hasOwnProperty:kp,hasOwnProp:kp,reduceDescriptors:Np,freezeMethods:zm,toObjectSet:Hm,toCamelCase:jm,noop:$m,toFiniteNumber:Gm,findKey:_p,global:vr,isContextDefined:Rp,isSpecCompliantForm:Qm,toJSONObject:Wm,isAsyncFn:Xm,isThenable:Ym,setImmediate:Lp,asap:Jm,isIterable:Zm};let O=class sm extends Error{static from(t,a,r,n,s,i){const o=new sm(t.message,a||t.code,r,n,s);return o.cause=t,o.name=t.name,t.status!=null&&o.status==null&&(o.status=t.status),i&&Object.assign(o,i),o}constructor(t,a,r,n,s){super(t),Object.defineProperty(this,"message",{value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,a&&(this.code=a),r&&(this.config=r),n&&(this.request=n),s&&(this.response=s,this.status=s.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:A.toJSONObject(this.config),code:this.code,status:this.status}}};O.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",O.ERR_BAD_OPTION="ERR_BAD_OPTION",O.ECONNABORTED="ECONNABORTED",O.ETIMEDOUT="ETIMEDOUT",O.ERR_NETWORK="ERR_NETWORK",O.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",O.ERR_DEPRECATED="ERR_DEPRECATED",O.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",O.ERR_BAD_REQUEST="ERR_BAD_REQUEST",O.ERR_CANCELED="ERR_CANCELED",O.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",O.ERR_INVALID_URL="ERR_INVALID_URL",O.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";var eh=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Up(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Pp=ze.Stream,th=hr,rh=Ft;function Ft(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}th.inherits(Ft,Pp),Ft.create=function(e,t){var a=new this;t=t||{};for(var r in t)a[r]=t[r];a.source=e;var n=e.emit;return e.emit=function(){return a._handleEmit(arguments),n.apply(e,arguments)},e.on("error",function(){}),a.pauseStream&&e.pause(),a},Object.defineProperty(Ft.prototype,"readable",{configurable:!0,enumerable:!0,get:function(){return this.source.readable}}),Ft.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)},Ft.prototype.resume=function(){this._released||this.release(),this.source.resume()},Ft.prototype.pause=function(){this.source.pause()},Ft.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]},Ft.prototype.pipe=function(){var e=Pp.prototype.pipe.apply(this,arguments);return this.resume(),e},Ft.prototype._handleEmit=function(e){if(this._released){this.emit.apply(this,e);return}e[0]==="data"&&(this.dataSize+=e[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(e)},Ft.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(e))}};var ah=hr,Dp=ze.Stream,Op=rh,nh=Oe;function Oe(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2*1024*1024,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}ah.inherits(Oe,Dp),Oe.create=function(e){var t=new this;e=e||{};for(var a in e)t[a]=e[a];return t},Oe.isStreamLike=function(e){return typeof e!="function"&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"&&!Buffer.isBuffer(e)},Oe.prototype.append=function(e){var t=Oe.isStreamLike(e);if(t){if(!(e instanceof Op)){var a=Op.create(e,{maxDataSize:1/0,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this)),e=a}this._handleErrors(e),this.pauseStreams&&e.pause()}return this._streams.push(e),this},Oe.prototype.pipe=function(e,t){return Dp.prototype.pipe.call(this,e,t),this.resume(),e},Oe.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop){this._pendingNext=!0;return}this._insideLoop=!0;try{do this._pendingNext=!1,this._realGetNext();while(this._pendingNext)}finally{this._insideLoop=!1}},Oe.prototype._realGetNext=function(){var e=this._streams.shift();if(typeof e>"u"){this.end();return}if(typeof e!="function"){this._pipeNext(e);return}var t=e;t(function(a){var r=Oe.isStreamLike(a);r&&(a.on("data",this._checkDataSize.bind(this)),this._handleErrors(a)),this._pipeNext(a)}.bind(this))},Oe.prototype._pipeNext=function(e){this._currentStream=e;var t=Oe.isStreamLike(e);if(t){e.on("end",this._getNext.bind(this)),e.pipe(this,{end:!1});return}var a=e;this.write(a),this._getNext()},Oe.prototype._handleErrors=function(e){var t=this;e.on("error",function(a){t._emitError(a)})},Oe.prototype.write=function(e){this.emit("data",e)},Oe.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))},Oe.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function"&&this._currentStream.resume(),this.emit("resume")},Oe.prototype.end=function(){this._reset(),this.emit("end")},Oe.prototype.destroy=function(){this._reset(),this.emit("close")},Oe.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null},Oe.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}},Oe.prototype._updateDataSize=function(){this.dataSize=0;var e=this;this._streams.forEach(function(t){t.dataSize&&(e.dataSize+=t.dataSize)}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)},Oe.prototype._emitError=function(e){this._reset(),this.emit("error",e)};var Fp={},ih={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/3gpp-ims+xml":{source:"iana",compressible:!0},"application/3gpphal+json":{source:"iana",compressible:!0},"application/3gpphalforms+json":{source:"iana",compressible:!0},"application/a2l":{source:"iana"},"application/ace+cbor":{source:"iana"},"application/activemessage":{source:"iana"},"application/activity+json":{source:"iana",compressible:!0},"application/alto-costmap+json":{source:"iana",compressible:!0},"application/alto-costmapfilter+json":{source:"iana",compressible:!0},"application/alto-directory+json":{source:"iana",compressible:!0},"application/alto-endpointcost+json":{source:"iana",compressible:!0},"application/alto-endpointcostparams+json":{source:"iana",compressible:!0},"application/alto-endpointprop+json":{source:"iana",compressible:!0},"application/alto-endpointpropparams+json":{source:"iana",compressible:!0},"application/alto-error+json":{source:"iana",compressible:!0},"application/alto-networkmap+json":{source:"iana",compressible:!0},"application/alto-networkmapfilter+json":{source:"iana",compressible:!0},"application/alto-updatestreamcontrol+json":{source:"iana",compressible:!0},"application/alto-updatestreamparams+json":{source:"iana",compressible:!0},"application/aml":{source:"iana"},"application/andrew-inset":{source:"iana",extensions:["ez"]},"application/applefile":{source:"iana"},"application/applixware":{source:"apache",extensions:["aw"]},"application/at+jwt":{source:"iana"},"application/atf":{source:"iana"},"application/atfx":{source:"iana"},"application/atom+xml":{source:"iana",compressible:!0,extensions:["atom"]},"application/atomcat+xml":{source:"iana",compressible:!0,extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana",compressible:!0,extensions:["atomdeleted"]},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",compressible:!0,extensions:["atomsvc"]},"application/atsc-dwd+xml":{source:"iana",compressible:!0,extensions:["dwd"]},"application/atsc-dynamic-event-message":{source:"iana"},"application/atsc-held+xml":{source:"iana",compressible:!0,extensions:["held"]},"application/atsc-rdt+json":{source:"iana",compressible:!0},"application/atsc-rsat+xml":{source:"iana",compressible:!0,extensions:["rsat"]},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana",compressible:!0},"application/bacnet-xdd+zip":{source:"iana",compressible:!1},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:!1,extensions:["bdoc"]},"application/beep+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/calendar+json":{source:"iana",compressible:!0},"application/calendar+xml":{source:"iana",compressible:!0,extensions:["xcs"]},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/captive+json":{source:"iana",compressible:!0},"application/cbor":{source:"iana"},"application/cbor-seq":{source:"iana"},"application/cccex":{source:"iana"},"application/ccmp+xml":{source:"iana",compressible:!0},"application/ccxml+xml":{source:"iana",compressible:!0,extensions:["ccxml"]},"application/cdfx+xml":{source:"iana",compressible:!0,extensions:["cdfx"]},"application/cdmi-capability":{source:"iana",extensions:["cdmia"]},"application/cdmi-container":{source:"iana",extensions:["cdmic"]},"application/cdmi-domain":{source:"iana",extensions:["cdmid"]},"application/cdmi-object":{source:"iana",extensions:["cdmio"]},"application/cdmi-queue":{source:"iana",extensions:["cdmiq"]},"application/cdni":{source:"iana"},"application/cea":{source:"iana"},"application/cea-2018+xml":{source:"iana",compressible:!0},"application/cellml+xml":{source:"iana",compressible:!0},"application/cfw":{source:"iana"},"application/city+json":{source:"iana",compressible:!0},"application/clr":{source:"iana"},"application/clue+xml":{source:"iana",compressible:!0},"application/clue_info+xml":{source:"iana",compressible:!0},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana",compressible:!0},"application/coap-group+json":{source:"iana",compressible:!0},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/conference-info+xml":{source:"iana",compressible:!0},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cpl+xml":{source:"iana",compressible:!0,extensions:["cpl"]},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana",compressible:!0},"application/cstadata+xml":{source:"iana",compressible:!0},"application/csvm+json":{source:"iana",compressible:!0},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cwt":{source:"iana"},"application/cybercash":{source:"iana"},"application/dart":{compressible:!0},"application/dash+xml":{source:"iana",compressible:!0,extensions:["mpd"]},"application/dash-patch+xml":{source:"iana",compressible:!0,extensions:["mpp"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",compressible:!0,extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana",compressible:!0},"application/dicom":{source:"iana"},"application/dicom+json":{source:"iana",compressible:!0},"application/dicom+xml":{source:"iana",compressible:!0},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/dns+json":{source:"iana",compressible:!0},"application/dns-message":{source:"iana"},"application/docbook+xml":{source:"apache",compressible:!0,extensions:["dbk"]},"application/dots+cbor":{source:"iana"},"application/dskpp+xml":{source:"iana",compressible:!0},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",compressible:!0,extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/ecmascript":{source:"iana",compressible:!0,extensions:["es","ecma"]},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:!1},"application/edifact":{source:"iana",compressible:!1},"application/efi":{source:"iana"},"application/elm+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/elm+xml":{source:"iana",compressible:!0},"application/emergencycalldata.cap+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/emergencycalldata.comment+xml":{source:"iana",compressible:!0},"application/emergencycalldata.control+xml":{source:"iana",compressible:!0},"application/emergencycalldata.deviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.ecall.msd":{source:"iana"},"application/emergencycalldata.providerinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.serviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.subscriberinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.veds+xml":{source:"iana",compressible:!0},"application/emma+xml":{source:"iana",compressible:!0,extensions:["emma"]},"application/emotionml+xml":{source:"iana",compressible:!0,extensions:["emotionml"]},"application/encaprtp":{source:"iana"},"application/epp+xml":{source:"iana",compressible:!0},"application/epub+zip":{source:"iana",compressible:!1,extensions:["epub"]},"application/eshop":{source:"iana"},"application/exi":{source:"iana",extensions:["exi"]},"application/expect-ct-report+json":{source:"iana",compressible:!0},"application/express":{source:"iana",extensions:["exp"]},"application/fastinfoset":{source:"iana"},"application/fastsoap":{source:"iana"},"application/fdt+xml":{source:"iana",compressible:!0,extensions:["fdt"]},"application/fhir+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/fhir+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/fido.trusted-apps+json":{compressible:!0},"application/fits":{source:"iana"},"application/flexfec":{source:"iana"},"application/font-sfnt":{source:"iana"},"application/font-tdpfr":{source:"iana",extensions:["pfr"]},"application/font-woff":{source:"iana",compressible:!1},"application/framework-attributes+xml":{source:"iana",compressible:!0},"application/geo+json":{source:"iana",compressible:!0,extensions:["geojson"]},"application/geo+json-seq":{source:"iana"},"application/geopackage+sqlite3":{source:"iana"},"application/geoxacml+xml":{source:"iana",compressible:!0},"application/gltf-buffer":{source:"iana"},"application/gml+xml":{source:"iana",compressible:!0,extensions:["gml"]},"application/gpx+xml":{source:"apache",compressible:!0,extensions:["gpx"]},"application/gxf":{source:"apache",extensions:["gxf"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/h224":{source:"iana"},"application/held+xml":{source:"iana",compressible:!0},"application/hjson":{extensions:["hjson"]},"application/http":{source:"iana"},"application/hyperstudio":{source:"iana",extensions:["stk"]},"application/ibe-key-request+xml":{source:"iana",compressible:!0},"application/ibe-pkg-reply+xml":{source:"iana",compressible:!0},"application/ibe-pp-data":{source:"iana"},"application/iges":{source:"iana"},"application/im-iscomposing+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/index":{source:"iana"},"application/index.cmd":{source:"iana"},"application/index.obj":{source:"iana"},"application/index.response":{source:"iana"},"application/index.vnd":{source:"iana"},"application/inkml+xml":{source:"iana",compressible:!0,extensions:["ink","inkml"]},"application/iotp":{source:"iana"},"application/ipfix":{source:"iana",extensions:["ipfix"]},"application/ipp":{source:"iana"},"application/isup":{source:"iana"},"application/its+xml":{source:"iana",compressible:!0,extensions:["its"]},"application/java-archive":{source:"apache",compressible:!1,extensions:["jar","war","ear"]},"application/java-serialized-object":{source:"apache",compressible:!1,extensions:["ser"]},"application/java-vm":{source:"apache",compressible:!1,extensions:["class"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/jf2feed+json":{source:"iana",compressible:!0},"application/jose":{source:"iana"},"application/jose+json":{source:"iana",compressible:!0},"application/jrd+json":{source:"iana",compressible:!0},"application/jscalendar+json":{source:"iana",compressible:!0},"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/json-patch+json":{source:"iana",compressible:!0},"application/json-seq":{source:"iana"},"application/json5":{extensions:["json5"]},"application/jsonml+json":{source:"apache",compressible:!0,extensions:["jsonml"]},"application/jwk+json":{source:"iana",compressible:!0},"application/jwk-set+json":{source:"iana",compressible:!0},"application/jwt":{source:"iana"},"application/kpml-request+xml":{source:"iana",compressible:!0},"application/kpml-response+xml":{source:"iana",compressible:!0},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/lgr+xml":{source:"iana",compressible:!0,extensions:["lgr"]},"application/link-format":{source:"iana"},"application/load-control+xml":{source:"iana",compressible:!0},"application/lost+xml":{source:"iana",compressible:!0,extensions:["lostxml"]},"application/lostsync+xml":{source:"iana",compressible:!0},"application/lpf+zip":{source:"iana",compressible:!1},"application/lxf":{source:"iana"},"application/mac-binhex40":{source:"iana",extensions:["hqx"]},"application/mac-compactpro":{source:"apache",extensions:["cpt"]},"application/macwriteii":{source:"iana"},"application/mads+xml":{source:"iana",compressible:!0,extensions:["mads"]},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/marcxml+xml":{source:"iana",compressible:!0,extensions:["mrcx"]},"application/mathematica":{source:"iana",extensions:["ma","nb","mb"]},"application/mathml+xml":{source:"iana",compressible:!0,extensions:["mathml"]},"application/mathml-content+xml":{source:"iana",compressible:!0},"application/mathml-presentation+xml":{source:"iana",compressible:!0},"application/mbms-associated-procedure-description+xml":{source:"iana",compressible:!0},"application/mbms-deregister+xml":{source:"iana",compressible:!0},"application/mbms-envelope+xml":{source:"iana",compressible:!0},"application/mbms-msk+xml":{source:"iana",compressible:!0},"application/mbms-msk-response+xml":{source:"iana",compressible:!0},"application/mbms-protection-description+xml":{source:"iana",compressible:!0},"application/mbms-reception-report+xml":{source:"iana",compressible:!0},"application/mbms-register+xml":{source:"iana",compressible:!0},"application/mbms-register-response+xml":{source:"iana",compressible:!0},"application/mbms-schedule+xml":{source:"iana",compressible:!0},"application/mbms-user-service-description+xml":{source:"iana",compressible:!0},"application/mbox":{source:"iana",extensions:["mbox"]},"application/media-policy-dataset+xml":{source:"iana",compressible:!0,extensions:["mpf"]},"application/media_control+xml":{source:"iana",compressible:!0},"application/mediaservercontrol+xml":{source:"iana",compressible:!0,extensions:["mscml"]},"application/merge-patch+json":{source:"iana",compressible:!0},"application/metalink+xml":{source:"apache",compressible:!0,extensions:["metalink"]},"application/metalink4+xml":{source:"iana",compressible:!0,extensions:["meta4"]},"application/mets+xml":{source:"iana",compressible:!0,extensions:["mets"]},"application/mf4":{source:"iana"},"application/mikey":{source:"iana"},"application/mipc":{source:"iana"},"application/missing-blocks+cbor-seq":{source:"iana"},"application/mmt-aei+xml":{source:"iana",compressible:!0,extensions:["maei"]},"application/mmt-usd+xml":{source:"iana",compressible:!0,extensions:["musd"]},"application/mods+xml":{source:"iana",compressible:!0,extensions:["mods"]},"application/moss-keys":{source:"iana"},"application/moss-signature":{source:"iana"},"application/mosskey-data":{source:"iana"},"application/mosskey-request":{source:"iana"},"application/mp21":{source:"iana",extensions:["m21","mp21"]},"application/mp4":{source:"iana",extensions:["mp4s","m4p"]},"application/mpeg4-generic":{source:"iana"},"application/mpeg4-iod":{source:"iana"},"application/mpeg4-iod-xmt":{source:"iana"},"application/mrb-consumer+xml":{source:"iana",compressible:!0},"application/mrb-publish+xml":{source:"iana",compressible:!0},"application/msc-ivr+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msc-mixer+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msword":{source:"iana",compressible:!1,extensions:["doc","dot"]},"application/mud+json":{source:"iana",compressible:!0},"application/multipart-core":{source:"iana"},"application/mxf":{source:"iana",extensions:["mxf"]},"application/n-quads":{source:"iana",extensions:["nq"]},"application/n-triples":{source:"iana",extensions:["nt"]},"application/nasdata":{source:"iana"},"application/news-checkgroups":{source:"iana",charset:"US-ASCII"},"application/news-groupinfo":{source:"iana",charset:"US-ASCII"},"application/news-transmission":{source:"iana"},"application/nlsml+xml":{source:"iana",compressible:!0},"application/node":{source:"iana",extensions:["cjs"]},"application/nss":{source:"iana"},"application/oauth-authz-req+jwt":{source:"iana"},"application/oblivious-dns-message":{source:"iana"},"application/ocsp-request":{source:"iana"},"application/ocsp-response":{source:"iana"},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{source:"iana",extensions:["oda"]},"application/odm+xml":{source:"iana",compressible:!0},"application/odx":{source:"iana"},"application/oebps-package+xml":{source:"iana",compressible:!0,extensions:["opf"]},"application/ogg":{source:"iana",compressible:!1,extensions:["ogx"]},"application/omdoc+xml":{source:"apache",compressible:!0,extensions:["omdoc"]},"application/onenote":{source:"apache",extensions:["onetoc","onetoc2","onetmp","onepkg"]},"application/opc-nodeset+xml":{source:"iana",compressible:!0},"application/oscore":{source:"iana"},"application/oxps":{source:"iana",extensions:["oxps"]},"application/p21":{source:"iana"},"application/p21+zip":{source:"iana",compressible:!1},"application/p2p-overlay+xml":{source:"iana",compressible:!0,extensions:["relo"]},"application/parityfec":{source:"iana"},"application/passport":{source:"iana"},"application/patch-ops-error+xml":{source:"iana",compressible:!0,extensions:["xer"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/pdx":{source:"iana"},"application/pem-certificate-chain":{source:"iana"},"application/pgp-encrypted":{source:"iana",compressible:!1,extensions:["pgp"]},"application/pgp-keys":{source:"iana",extensions:["asc"]},"application/pgp-signature":{source:"iana",extensions:["asc","sig"]},"application/pics-rules":{source:"apache",extensions:["prf"]},"application/pidf+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pidf-diff+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pkcs10":{source:"iana",extensions:["p10"]},"application/pkcs12":{source:"iana"},"application/pkcs7-mime":{source:"iana",extensions:["p7m","p7c"]},"application/pkcs7-signature":{source:"iana",extensions:["p7s"]},"application/pkcs8":{source:"iana",extensions:["p8"]},"application/pkcs8-encrypted":{source:"iana"},"application/pkix-attr-cert":{source:"iana",extensions:["ac"]},"application/pkix-cert":{source:"iana",extensions:["cer"]},"application/pkix-crl":{source:"iana",extensions:["crl"]},"application/pkix-pkipath":{source:"iana",extensions:["pkipath"]},"application/pkixcmp":{source:"iana",extensions:["pki"]},"application/pls+xml":{source:"iana",compressible:!0,extensions:["pls"]},"application/poc-settings+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/postscript":{source:"iana",compressible:!0,extensions:["ai","eps","ps"]},"application/ppsp-tracker+json":{source:"iana",compressible:!0},"application/problem+json":{source:"iana",compressible:!0},"application/problem+xml":{source:"iana",compressible:!0},"application/provenance+xml":{source:"iana",compressible:!0,extensions:["provx"]},"application/prs.alvestrand.titrax-sheet":{source:"iana"},"application/prs.cww":{source:"iana",extensions:["cww"]},"application/prs.cyn":{source:"iana",charset:"7-BIT"},"application/prs.hpub+zip":{source:"iana",compressible:!1},"application/prs.nprend":{source:"iana"},"application/prs.plucker":{source:"iana"},"application/prs.rdf-xml-crypt":{source:"iana"},"application/prs.xsf+xml":{source:"iana",compressible:!0},"application/pskc+xml":{source:"iana",compressible:!0,extensions:["pskcxml"]},"application/pvd+json":{source:"iana",compressible:!0},"application/qsig":{source:"iana"},"application/raml+yaml":{compressible:!0,extensions:["raml"]},"application/raptorfec":{source:"iana"},"application/rdap+json":{source:"iana",compressible:!0},"application/rdf+xml":{source:"iana",compressible:!0,extensions:["rdf","owl"]},"application/reginfo+xml":{source:"iana",compressible:!0,extensions:["rif"]},"application/relax-ng-compact-syntax":{source:"iana",extensions:["rnc"]},"application/remote-printing":{source:"iana"},"application/reputon+json":{source:"iana",compressible:!0},"application/resource-lists+xml":{source:"iana",compressible:!0,extensions:["rl"]},"application/resource-lists-diff+xml":{source:"iana",compressible:!0,extensions:["rld"]},"application/rfc+xml":{source:"iana",compressible:!0},"application/riscos":{source:"iana"},"application/rlmi+xml":{source:"iana",compressible:!0},"application/rls-services+xml":{source:"iana",compressible:!0,extensions:["rs"]},"application/route-apd+xml":{source:"iana",compressible:!0,extensions:["rapd"]},"application/route-s-tsid+xml":{source:"iana",compressible:!0,extensions:["sls"]},"application/route-usd+xml":{source:"iana",compressible:!0,extensions:["rusd"]},"application/rpki-ghostbusters":{source:"iana",extensions:["gbr"]},"application/rpki-manifest":{source:"iana",extensions:["mft"]},"application/rpki-publication":{source:"iana"},"application/rpki-roa":{source:"iana",extensions:["roa"]},"application/rpki-updown":{source:"iana"},"application/rsd+xml":{source:"apache",compressible:!0,extensions:["rsd"]},"application/rss+xml":{source:"apache",compressible:!0,extensions:["rss"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/rtploopback":{source:"iana"},"application/rtx":{source:"iana"},"application/samlassertion+xml":{source:"iana",compressible:!0},"application/samlmetadata+xml":{source:"iana",compressible:!0},"application/sarif+json":{source:"iana",compressible:!0},"application/sarif-external-properties+json":{source:"iana",compressible:!0},"application/sbe":{source:"iana"},"application/sbml+xml":{source:"iana",compressible:!0,extensions:["sbml"]},"application/scaip+xml":{source:"iana",compressible:!0},"application/scim+json":{source:"iana",compressible:!0},"application/scvp-cv-request":{source:"iana",extensions:["scq"]},"application/scvp-cv-response":{source:"iana",extensions:["scs"]},"application/scvp-vp-request":{source:"iana",extensions:["spq"]},"application/scvp-vp-response":{source:"iana",extensions:["spp"]},"application/sdp":{source:"iana",extensions:["sdp"]},"application/secevent+jwt":{source:"iana"},"application/senml+cbor":{source:"iana"},"application/senml+json":{source:"iana",compressible:!0},"application/senml+xml":{source:"iana",compressible:!0,extensions:["senmlx"]},"application/senml-etch+cbor":{source:"iana"},"application/senml-etch+json":{source:"iana",compressible:!0},"application/senml-exi":{source:"iana"},"application/sensml+cbor":{source:"iana"},"application/sensml+json":{source:"iana",compressible:!0},"application/sensml+xml":{source:"iana",compressible:!0,extensions:["sensmlx"]},"application/sensml-exi":{source:"iana"},"application/sep+xml":{source:"iana",compressible:!0},"application/sep-exi":{source:"iana"},"application/session-info":{source:"iana"},"application/set-payment":{source:"iana"},"application/set-payment-initiation":{source:"iana",extensions:["setpay"]},"application/set-registration":{source:"iana"},"application/set-registration-initiation":{source:"iana",extensions:["setreg"]},"application/sgml":{source:"iana"},"application/sgml-open-catalog":{source:"iana"},"application/shf+xml":{source:"iana",compressible:!0,extensions:["shf"]},"application/sieve":{source:"iana",extensions:["siv","sieve"]},"application/simple-filter+xml":{source:"iana",compressible:!0},"application/simple-message-summary":{source:"iana"},"application/simplesymbolcontainer":{source:"iana"},"application/sipc":{source:"iana"},"application/slate":{source:"iana"},"application/smil":{source:"iana"},"application/smil+xml":{source:"iana",compressible:!0,extensions:["smi","smil"]},"application/smpte336m":{source:"iana"},"application/soap+fastinfoset":{source:"iana"},"application/soap+xml":{source:"iana",compressible:!0},"application/sparql-query":{source:"iana",extensions:["rq"]},"application/sparql-results+xml":{source:"iana",compressible:!0,extensions:["srx"]},"application/spdx+json":{source:"iana",compressible:!0},"application/spirits-event+xml":{source:"iana",compressible:!0},"application/sql":{source:"iana"},"application/srgs":{source:"iana",extensions:["gram"]},"application/srgs+xml":{source:"iana",compressible:!0,extensions:["grxml"]},"application/sru+xml":{source:"iana",compressible:!0,extensions:["sru"]},"application/ssdl+xml":{source:"apache",compressible:!0,extensions:["ssdl"]},"application/ssml+xml":{source:"iana",compressible:!0,extensions:["ssml"]},"application/stix+json":{source:"iana",compressible:!0},"application/swid+xml":{source:"iana",compressible:!0,extensions:["swidtag"]},"application/tamp-apex-update":{source:"iana"},"application/tamp-apex-update-confirm":{source:"iana"},"application/tamp-community-update":{source:"iana"},"application/tamp-community-update-confirm":{source:"iana"},"application/tamp-error":{source:"iana"},"application/tamp-sequence-adjust":{source:"iana"},"application/tamp-sequence-adjust-confirm":{source:"iana"},"application/tamp-status-query":{source:"iana"},"application/tamp-status-response":{source:"iana"},"application/tamp-update":{source:"iana"},"application/tamp-update-confirm":{source:"iana"},"application/tar":{compressible:!0},"application/taxii+json":{source:"iana",compressible:!0},"application/td+json":{source:"iana",compressible:!0},"application/tei+xml":{source:"iana",compressible:!0,extensions:["tei","teicorpus"]},"application/tetra_isi":{source:"iana"},"application/thraud+xml":{source:"iana",compressible:!0,extensions:["tfi"]},"application/timestamp-query":{source:"iana"},"application/timestamp-reply":{source:"iana"},"application/timestamped-data":{source:"iana",extensions:["tsd"]},"application/tlsrpt+gzip":{source:"iana"},"application/tlsrpt+json":{source:"iana",compressible:!0},"application/tnauthlist":{source:"iana"},"application/token-introspection+jwt":{source:"iana"},"application/toml":{compressible:!0,extensions:["toml"]},"application/trickle-ice-sdpfrag":{source:"iana"},"application/trig":{source:"iana",extensions:["trig"]},"application/ttml+xml":{source:"iana",compressible:!0,extensions:["ttml"]},"application/tve-trigger":{source:"iana"},"application/tzif":{source:"iana"},"application/tzif-leap":{source:"iana"},"application/ubjson":{compressible:!1,extensions:["ubj"]},"application/ulpfec":{source:"iana"},"application/urc-grpsheet+xml":{source:"iana",compressible:!0},"application/urc-ressheet+xml":{source:"iana",compressible:!0,extensions:["rsheet"]},"application/urc-targetdesc+xml":{source:"iana",compressible:!0,extensions:["td"]},"application/urc-uisocketdesc+xml":{source:"iana",compressible:!0},"application/vcard+json":{source:"iana",compressible:!0},"application/vcard+xml":{source:"iana",compressible:!0},"application/vemmi":{source:"iana"},"application/vividence.scriptfile":{source:"apache"},"application/vnd.1000minds.decision-model+xml":{source:"iana",compressible:!0,extensions:["1km"]},"application/vnd.3gpp-prose+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-prose-pc3ch+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-v2x-local-service-information":{source:"iana"},"application/vnd.3gpp.5gnas":{source:"iana"},"application/vnd.3gpp.access-transfer-events+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.bsf+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gmop+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gtpc":{source:"iana"},"application/vnd.3gpp.interworking-data":{source:"iana"},"application/vnd.3gpp.lpp":{source:"iana"},"application/vnd.3gpp.mc-signalling-ear":{source:"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-payload":{source:"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-signalling":{source:"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-floor-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-signed+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-init-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-transmission-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mid-call+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ngap":{source:"iana"},"application/vnd.3gpp.pfcp":{source:"iana"},"application/vnd.3gpp.pic-bw-large":{source:"iana",extensions:["plb"]},"application/vnd.3gpp.pic-bw-small":{source:"iana",extensions:["psb"]},"application/vnd.3gpp.pic-bw-var":{source:"iana",extensions:["pvb"]},"application/vnd.3gpp.s1ap":{source:"iana"},"application/vnd.3gpp.sms":{source:"iana"},"application/vnd.3gpp.sms+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-ext+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.state-and-event-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ussd+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.bcmcsinfo+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.sms":{source:"iana"},"application/vnd.3gpp2.tcap":{source:"iana",extensions:["tcap"]},"application/vnd.3lightssoftware.imagescal":{source:"iana"},"application/vnd.3m.post-it-notes":{source:"iana",extensions:["pwn"]},"application/vnd.accpac.simply.aso":{source:"iana",extensions:["aso"]},"application/vnd.accpac.simply.imp":{source:"iana",extensions:["imp"]},"application/vnd.acucobol":{source:"iana",extensions:["acu"]},"application/vnd.acucorp":{source:"iana",extensions:["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{source:"apache",compressible:!1,extensions:["air"]},"application/vnd.adobe.flash.movie":{source:"iana"},"application/vnd.adobe.formscentral.fcdt":{source:"iana",extensions:["fcdt"]},"application/vnd.adobe.fxp":{source:"iana",extensions:["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{source:"iana"},"application/vnd.adobe.xdp+xml":{source:"iana",compressible:!0,extensions:["xdp"]},"application/vnd.adobe.xfdf":{source:"iana",extensions:["xfdf"]},"application/vnd.aether.imp":{source:"iana"},"application/vnd.afpc.afplinedata":{source:"iana"},"application/vnd.afpc.afplinedata-pagedef":{source:"iana"},"application/vnd.afpc.cmoca-cmresource":{source:"iana"},"application/vnd.afpc.foca-charset":{source:"iana"},"application/vnd.afpc.foca-codedfont":{source:"iana"},"application/vnd.afpc.foca-codepage":{source:"iana"},"application/vnd.afpc.modca":{source:"iana"},"application/vnd.afpc.modca-cmtable":{source:"iana"},"application/vnd.afpc.modca-formdef":{source:"iana"},"application/vnd.afpc.modca-mediummap":{source:"iana"},"application/vnd.afpc.modca-objectcontainer":{source:"iana"},"application/vnd.afpc.modca-overlay":{source:"iana"},"application/vnd.afpc.modca-pagesegment":{source:"iana"},"application/vnd.age":{source:"iana",extensions:["age"]},"application/vnd.ah-barcode":{source:"iana"},"application/vnd.ahead.space":{source:"iana",extensions:["ahead"]},"application/vnd.airzip.filesecure.azf":{source:"iana",extensions:["azf"]},"application/vnd.airzip.filesecure.azs":{source:"iana",extensions:["azs"]},"application/vnd.amadeus+json":{source:"iana",compressible:!0},"application/vnd.amazon.ebook":{source:"apache",extensions:["azw"]},"application/vnd.amazon.mobi8-ebook":{source:"iana"},"application/vnd.americandynamics.acc":{source:"iana",extensions:["acc"]},"application/vnd.amiga.ami":{source:"iana",extensions:["ami"]},"application/vnd.amundsen.maze+xml":{source:"iana",compressible:!0},"application/vnd.android.ota":{source:"iana"},"application/vnd.android.package-archive":{source:"apache",compressible:!1,extensions:["apk"]},"application/vnd.anki":{source:"iana"},"application/vnd.anser-web-certificate-issue-initiation":{source:"iana",extensions:["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{source:"apache",extensions:["fti"]},"application/vnd.antix.game-component":{source:"iana",extensions:["atx"]},"application/vnd.apache.arrow.file":{source:"iana"},"application/vnd.apache.arrow.stream":{source:"iana"},"application/vnd.apache.thrift.binary":{source:"iana"},"application/vnd.apache.thrift.compact":{source:"iana"},"application/vnd.apache.thrift.json":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/vnd.aplextor.warrp+json":{source:"iana",compressible:!0},"application/vnd.apothekende.reservation+json":{source:"iana",compressible:!0},"application/vnd.apple.installer+xml":{source:"iana",compressible:!0,extensions:["mpkg"]},"application/vnd.apple.keynote":{source:"iana",extensions:["key"]},"application/vnd.apple.mpegurl":{source:"iana",extensions:["m3u8"]},"application/vnd.apple.numbers":{source:"iana",extensions:["numbers"]},"application/vnd.apple.pages":{source:"iana",extensions:["pages"]},"application/vnd.apple.pkpass":{compressible:!1,extensions:["pkpass"]},"application/vnd.arastra.swi":{source:"iana"},"application/vnd.aristanetworks.swi":{source:"iana",extensions:["swi"]},"application/vnd.artisan+json":{source:"iana",compressible:!0},"application/vnd.artsquare":{source:"iana"},"application/vnd.astraea-software.iota":{source:"iana",extensions:["iota"]},"application/vnd.audiograph":{source:"iana",extensions:["aep"]},"application/vnd.autopackage":{source:"iana"},"application/vnd.avalon+json":{source:"iana",compressible:!0},"application/vnd.avistar+xml":{source:"iana",compressible:!0},"application/vnd.balsamiq.bmml+xml":{source:"iana",compressible:!0,extensions:["bmml"]},"application/vnd.balsamiq.bmpr":{source:"iana"},"application/vnd.banana-accounting":{source:"iana"},"application/vnd.bbf.usp.error":{source:"iana"},"application/vnd.bbf.usp.msg":{source:"iana"},"application/vnd.bbf.usp.msg+json":{source:"iana",compressible:!0},"application/vnd.bekitzur-stech+json":{source:"iana",compressible:!0},"application/vnd.bint.med-content":{source:"iana"},"application/vnd.biopax.rdf+xml":{source:"iana",compressible:!0},"application/vnd.blink-idb-value-wrapper":{source:"iana"},"application/vnd.blueice.multipass":{source:"iana",extensions:["mpm"]},"application/vnd.bluetooth.ep.oob":{source:"iana"},"application/vnd.bluetooth.le.oob":{source:"iana"},"application/vnd.bmi":{source:"iana",extensions:["bmi"]},"application/vnd.bpf":{source:"iana"},"application/vnd.bpf3":{source:"iana"},"application/vnd.businessobjects":{source:"iana",extensions:["rep"]},"application/vnd.byu.uapi+json":{source:"iana",compressible:!0},"application/vnd.cab-jscript":{source:"iana"},"application/vnd.canon-cpdl":{source:"iana"},"application/vnd.canon-lips":{source:"iana"},"application/vnd.capasystems-pg+json":{source:"iana",compressible:!0},"application/vnd.cendio.thinlinc.clientconf":{source:"iana"},"application/vnd.century-systems.tcp_stream":{source:"iana"},"application/vnd.chemdraw+xml":{source:"iana",compressible:!0,extensions:["cdxml"]},"application/vnd.chess-pgn":{source:"iana"},"application/vnd.chipnuts.karaoke-mmd":{source:"iana",extensions:["mmd"]},"application/vnd.ciedi":{source:"iana"},"application/vnd.cinderella":{source:"iana",extensions:["cdy"]},"application/vnd.cirpack.isdn-ext":{source:"iana"},"application/vnd.citationstyles.style+xml":{source:"iana",compressible:!0,extensions:["csl"]},"application/vnd.claymore":{source:"iana",extensions:["cla"]},"application/vnd.cloanto.rp9":{source:"iana",extensions:["rp9"]},"application/vnd.clonk.c4group":{source:"iana",extensions:["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{source:"iana",extensions:["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{source:"iana",extensions:["c11amz"]},"application/vnd.coffeescript":{source:"iana"},"application/vnd.collabio.xodocuments.document":{source:"iana"},"application/vnd.collabio.xodocuments.document-template":{source:"iana"},"application/vnd.collabio.xodocuments.presentation":{source:"iana"},"application/vnd.collabio.xodocuments.presentation-template":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{source:"iana"},"application/vnd.collection+json":{source:"iana",compressible:!0},"application/vnd.collection.doc+json":{source:"iana",compressible:!0},"application/vnd.collection.next+json":{source:"iana",compressible:!0},"application/vnd.comicbook+zip":{source:"iana",compressible:!1},"application/vnd.comicbook-rar":{source:"iana"},"application/vnd.commerce-battelle":{source:"iana"},"application/vnd.commonspace":{source:"iana",extensions:["csp"]},"application/vnd.contact.cmsg":{source:"iana",extensions:["cdbcmsg"]},"application/vnd.coreos.ignition+json":{source:"iana",compressible:!0},"application/vnd.cosmocaller":{source:"iana",extensions:["cmc"]},"application/vnd.crick.clicker":{source:"iana",extensions:["clkx"]},"application/vnd.crick.clicker.keyboard":{source:"iana",extensions:["clkk"]},"application/vnd.crick.clicker.palette":{source:"iana",extensions:["clkp"]},"application/vnd.crick.clicker.template":{source:"iana",extensions:["clkt"]},"application/vnd.crick.clicker.wordbank":{source:"iana",extensions:["clkw"]},"application/vnd.criticaltools.wbs+xml":{source:"iana",compressible:!0,extensions:["wbs"]},"application/vnd.cryptii.pipe+json":{source:"iana",compressible:!0},"application/vnd.crypto-shade-file":{source:"iana"},"application/vnd.cryptomator.encrypted":{source:"iana"},"application/vnd.cryptomator.vault":{source:"iana"},"application/vnd.ctc-posml":{source:"iana",extensions:["pml"]},"application/vnd.ctct.ws+xml":{source:"iana",compressible:!0},"application/vnd.cups-pdf":{source:"iana"},"application/vnd.cups-postscript":{source:"iana"},"application/vnd.cups-ppd":{source:"iana",extensions:["ppd"]},"application/vnd.cups-raster":{source:"iana"},"application/vnd.cups-raw":{source:"iana"},"application/vnd.curl":{source:"iana"},"application/vnd.curl.car":{source:"apache",extensions:["car"]},"application/vnd.curl.pcurl":{source:"apache",extensions:["pcurl"]},"application/vnd.cyan.dean.root+xml":{source:"iana",compressible:!0},"application/vnd.cybank":{source:"iana"},"application/vnd.cyclonedx+json":{source:"iana",compressible:!0},"application/vnd.cyclonedx+xml":{source:"iana",compressible:!0},"application/vnd.d2l.coursepackage1p0+zip":{source:"iana",compressible:!1},"application/vnd.d3m-dataset":{source:"iana"},"application/vnd.d3m-problem":{source:"iana"},"application/vnd.dart":{source:"iana",compressible:!0,extensions:["dart"]},"application/vnd.data-vision.rdz":{source:"iana",extensions:["rdz"]},"application/vnd.datapackage+json":{source:"iana",compressible:!0},"application/vnd.dataresource+json":{source:"iana",compressible:!0},"application/vnd.dbf":{source:"iana",extensions:["dbf"]},"application/vnd.debian.binary-package":{source:"iana"},"application/vnd.dece.data":{source:"iana",extensions:["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{source:"iana",compressible:!0,extensions:["uvt","uvvt"]},"application/vnd.dece.unspecified":{source:"iana",extensions:["uvx","uvvx"]},"application/vnd.dece.zip":{source:"iana",extensions:["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{source:"iana",extensions:["fe_launch"]},"application/vnd.desmume.movie":{source:"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{source:"iana"},"application/vnd.dm.delegation+xml":{source:"iana",compressible:!0},"application/vnd.dna":{source:"iana",extensions:["dna"]},"application/vnd.document+json":{source:"iana",compressible:!0},"application/vnd.dolby.mlp":{source:"apache",extensions:["mlp"]},"application/vnd.dolby.mobile.1":{source:"iana"},"application/vnd.dolby.mobile.2":{source:"iana"},"application/vnd.doremir.scorecloud-binary-document":{source:"iana"},"application/vnd.dpgraph":{source:"iana",extensions:["dpg"]},"application/vnd.dreamfactory":{source:"iana",extensions:["dfac"]},"application/vnd.drive+json":{source:"iana",compressible:!0},"application/vnd.ds-keypoint":{source:"apache",extensions:["kpxx"]},"application/vnd.dtg.local":{source:"iana"},"application/vnd.dtg.local.flash":{source:"iana"},"application/vnd.dtg.local.html":{source:"iana"},"application/vnd.dvb.ait":{source:"iana",extensions:["ait"]},"application/vnd.dvb.dvbisl+xml":{source:"iana",compressible:!0},"application/vnd.dvb.dvbj":{source:"iana"},"application/vnd.dvb.esgcontainer":{source:"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess2":{source:"iana"},"application/vnd.dvb.ipdcesgpdd":{source:"iana"},"application/vnd.dvb.ipdcroaming":{source:"iana"},"application/vnd.dvb.iptv.alfec-base":{source:"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{source:"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-container+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-generic+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-msglist+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-request+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-response+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-init+xml":{source:"iana",compressible:!0},"application/vnd.dvb.pfr":{source:"iana"},"application/vnd.dvb.service":{source:"iana",extensions:["svc"]},"application/vnd.dxr":{source:"iana"},"application/vnd.dynageo":{source:"iana",extensions:["geo"]},"application/vnd.dzr":{source:"iana"},"application/vnd.easykaraoke.cdgdownload":{source:"iana"},"application/vnd.ecdis-update":{source:"iana"},"application/vnd.ecip.rlp":{source:"iana"},"application/vnd.eclipse.ditto+json":{source:"iana",compressible:!0},"application/vnd.ecowin.chart":{source:"iana",extensions:["mag"]},"application/vnd.ecowin.filerequest":{source:"iana"},"application/vnd.ecowin.fileupdate":{source:"iana"},"application/vnd.ecowin.series":{source:"iana"},"application/vnd.ecowin.seriesrequest":{source:"iana"},"application/vnd.ecowin.seriesupdate":{source:"iana"},"application/vnd.efi.img":{source:"iana"},"application/vnd.efi.iso":{source:"iana"},"application/vnd.emclient.accessrequest+xml":{source:"iana",compressible:!0},"application/vnd.enliven":{source:"iana",extensions:["nml"]},"application/vnd.enphase.envoy":{source:"iana"},"application/vnd.eprints.data+xml":{source:"iana",compressible:!0},"application/vnd.epson.esf":{source:"iana",extensions:["esf"]},"application/vnd.epson.msf":{source:"iana",extensions:["msf"]},"application/vnd.epson.quickanime":{source:"iana",extensions:["qam"]},"application/vnd.epson.salt":{source:"iana",extensions:["slt"]},"application/vnd.epson.ssf":{source:"iana",extensions:["ssf"]},"application/vnd.ericsson.quickcall":{source:"iana"},"application/vnd.espass-espass+zip":{source:"iana",compressible:!1},"application/vnd.eszigno3+xml":{source:"iana",compressible:!0,extensions:["es3","et3"]},"application/vnd.etsi.aoc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.asic-e+zip":{source:"iana",compressible:!1},"application/vnd.etsi.asic-s+zip":{source:"iana",compressible:!1},"application/vnd.etsi.cug+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvcommand+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-bc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-cod+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-npvr+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvservice+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsync+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvueprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mcid+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mheg5":{source:"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:"iana",compressible:!0},"application/vnd.etsi.pstn+xml":{source:"iana",compressible:!0},"application/vnd.etsi.sci+xml":{source:"iana",compressible:!0},"application/vnd.etsi.simservs+xml":{source:"iana",compressible:!0},"application/vnd.etsi.timestamp-token":{source:"iana"},"application/vnd.etsi.tsl+xml":{source:"iana",compressible:!0},"application/vnd.etsi.tsl.der":{source:"iana"},"application/vnd.eu.kasparian.car+json":{source:"iana",compressible:!0},"application/vnd.eudora.data":{source:"iana"},"application/vnd.evolv.ecig.profile":{source:"iana"},"application/vnd.evolv.ecig.settings":{source:"iana"},"application/vnd.evolv.ecig.theme":{source:"iana"},"application/vnd.exstream-empower+zip":{source:"iana",compressible:!1},"application/vnd.exstream-package":{source:"iana"},"application/vnd.ezpix-album":{source:"iana",extensions:["ez2"]},"application/vnd.ezpix-package":{source:"iana",extensions:["ez3"]},"application/vnd.f-secure.mobile":{source:"iana"},"application/vnd.familysearch.gedcom+zip":{source:"iana",compressible:!1},"application/vnd.fastcopy-disk-image":{source:"iana"},"application/vnd.fdf":{source:"iana",extensions:["fdf"]},"application/vnd.fdsn.mseed":{source:"iana",extensions:["mseed"]},"application/vnd.fdsn.seed":{source:"iana",extensions:["seed","dataless"]},"application/vnd.ffsns":{source:"iana"},"application/vnd.ficlab.flb+zip":{source:"iana",compressible:!1},"application/vnd.filmit.zfc":{source:"iana"},"application/vnd.fints":{source:"iana"},"application/vnd.firemonkeys.cloudcell":{source:"iana"},"application/vnd.flographit":{source:"iana",extensions:["gph"]},"application/vnd.fluxtime.clip":{source:"iana",extensions:["ftc"]},"application/vnd.font-fontforge-sfd":{source:"iana"},"application/vnd.framemaker":{source:"iana",extensions:["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{source:"iana",extensions:["fnc"]},"application/vnd.frogans.ltf":{source:"iana",extensions:["ltf"]},"application/vnd.fsc.weblaunch":{source:"iana",extensions:["fsc"]},"application/vnd.fujifilm.fb.docuworks":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.binder":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.container":{source:"iana"},"application/vnd.fujifilm.fb.jfi+xml":{source:"iana",compressible:!0},"application/vnd.fujitsu.oasys":{source:"iana",extensions:["oas"]},"application/vnd.fujitsu.oasys2":{source:"iana",extensions:["oa2"]},"application/vnd.fujitsu.oasys3":{source:"iana",extensions:["oa3"]},"application/vnd.fujitsu.oasysgp":{source:"iana",extensions:["fg5"]},"application/vnd.fujitsu.oasysprs":{source:"iana",extensions:["bh2"]},"application/vnd.fujixerox.art-ex":{source:"iana"},"application/vnd.fujixerox.art4":{source:"iana"},"application/vnd.fujixerox.ddd":{source:"iana",extensions:["ddd"]},"application/vnd.fujixerox.docuworks":{source:"iana",extensions:["xdw"]},"application/vnd.fujixerox.docuworks.binder":{source:"iana",extensions:["xbd"]},"application/vnd.fujixerox.docuworks.container":{source:"iana"},"application/vnd.fujixerox.hbpl":{source:"iana"},"application/vnd.fut-misnet":{source:"iana"},"application/vnd.futoin+cbor":{source:"iana"},"application/vnd.futoin+json":{source:"iana",compressible:!0},"application/vnd.fuzzysheet":{source:"iana",extensions:["fzs"]},"application/vnd.genomatix.tuxedo":{source:"iana",extensions:["txd"]},"application/vnd.gentics.grd+json":{source:"iana",compressible:!0},"application/vnd.geo+json":{source:"iana",compressible:!0},"application/vnd.geocube+xml":{source:"iana",compressible:!0},"application/vnd.geogebra.file":{source:"iana",extensions:["ggb"]},"application/vnd.geogebra.slides":{source:"iana"},"application/vnd.geogebra.tool":{source:"iana",extensions:["ggt"]},"application/vnd.geometry-explorer":{source:"iana",extensions:["gex","gre"]},"application/vnd.geonext":{source:"iana",extensions:["gxt"]},"application/vnd.geoplan":{source:"iana",extensions:["g2w"]},"application/vnd.geospace":{source:"iana",extensions:["g3w"]},"application/vnd.gerber":{source:"iana"},"application/vnd.globalplatform.card-content-mgt":{source:"iana"},"application/vnd.globalplatform.card-content-mgt-response":{source:"iana"},"application/vnd.gmx":{source:"iana",extensions:["gmx"]},"application/vnd.google-apps.document":{compressible:!1,extensions:["gdoc"]},"application/vnd.google-apps.presentation":{compressible:!1,extensions:["gslides"]},"application/vnd.google-apps.spreadsheet":{compressible:!1,extensions:["gsheet"]},"application/vnd.google-earth.kml+xml":{source:"iana",compressible:!0,extensions:["kml"]},"application/vnd.google-earth.kmz":{source:"iana",compressible:!1,extensions:["kmz"]},"application/vnd.gov.sk.e-form+xml":{source:"iana",compressible:!0},"application/vnd.gov.sk.e-form+zip":{source:"iana",compressible:!1},"application/vnd.gov.sk.xmldatacontainer+xml":{source:"iana",compressible:!0},"application/vnd.grafeq":{source:"iana",extensions:["gqf","gqs"]},"application/vnd.gridmp":{source:"iana"},"application/vnd.groove-account":{source:"iana",extensions:["gac"]},"application/vnd.groove-help":{source:"iana",extensions:["ghf"]},"application/vnd.groove-identity-message":{source:"iana",extensions:["gim"]},"application/vnd.groove-injector":{source:"iana",extensions:["grv"]},"application/vnd.groove-tool-message":{source:"iana",extensions:["gtm"]},"application/vnd.groove-tool-template":{source:"iana",extensions:["tpl"]},"application/vnd.groove-vcard":{source:"iana",extensions:["vcg"]},"application/vnd.hal+json":{source:"iana",compressible:!0},"application/vnd.hal+xml":{source:"iana",compressible:!0,extensions:["hal"]},"application/vnd.handheld-entertainment+xml":{source:"iana",compressible:!0,extensions:["zmm"]},"application/vnd.hbci":{source:"iana",extensions:["hbci"]},"application/vnd.hc+json":{source:"iana",compressible:!0},"application/vnd.hcl-bireports":{source:"iana"},"application/vnd.hdt":{source:"iana"},"application/vnd.heroku+json":{source:"iana",compressible:!0},"application/vnd.hhe.lesson-player":{source:"iana",extensions:["les"]},"application/vnd.hl7cda+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hl7v2+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hp-hpgl":{source:"iana",extensions:["hpgl"]},"application/vnd.hp-hpid":{source:"iana",extensions:["hpid"]},"application/vnd.hp-hps":{source:"iana",extensions:["hps"]},"application/vnd.hp-jlyt":{source:"iana",extensions:["jlt"]},"application/vnd.hp-pcl":{source:"iana",extensions:["pcl"]},"application/vnd.hp-pclxl":{source:"iana",extensions:["pclxl"]},"application/vnd.httphone":{source:"iana"},"application/vnd.hydrostatix.sof-data":{source:"iana",extensions:["sfd-hdstx"]},"application/vnd.hyper+json":{source:"iana",compressible:!0},"application/vnd.hyper-item+json":{source:"iana",compressible:!0},"application/vnd.hyperdrive+json":{source:"iana",compressible:!0},"application/vnd.hzn-3d-crossword":{source:"iana"},"application/vnd.ibm.afplinedata":{source:"iana"},"application/vnd.ibm.electronic-media":{source:"iana"},"application/vnd.ibm.minipay":{source:"iana",extensions:["mpy"]},"application/vnd.ibm.modcap":{source:"iana",extensions:["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{source:"iana",extensions:["irm"]},"application/vnd.ibm.secure-container":{source:"iana",extensions:["sc"]},"application/vnd.iccprofile":{source:"iana",extensions:["icc","icm"]},"application/vnd.ieee.1905":{source:"iana"},"application/vnd.igloader":{source:"iana",extensions:["igl"]},"application/vnd.imagemeter.folder+zip":{source:"iana",compressible:!1},"application/vnd.imagemeter.image+zip":{source:"iana",compressible:!1},"application/vnd.immervision-ivp":{source:"iana",extensions:["ivp"]},"application/vnd.immervision-ivu":{source:"iana",extensions:["ivu"]},"application/vnd.ims.imsccv1p1":{source:"iana"},"application/vnd.ims.imsccv1p2":{source:"iana"},"application/vnd.ims.imsccv1p3":{source:"iana"},"application/vnd.ims.lis.v2.result+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy.id+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings.simple+json":{source:"iana",compressible:!0},"application/vnd.informedcontrol.rms+xml":{source:"iana",compressible:!0},"application/vnd.informix-visionary":{source:"iana"},"application/vnd.infotech.project":{source:"iana"},"application/vnd.infotech.project+xml":{source:"iana",compressible:!0},"application/vnd.innopath.wamp.notification":{source:"iana"},"application/vnd.insors.igm":{source:"iana",extensions:["igm"]},"application/vnd.intercon.formnet":{source:"iana",extensions:["xpw","xpx"]},"application/vnd.intergeo":{source:"iana",extensions:["i2g"]},"application/vnd.intertrust.digibox":{source:"iana"},"application/vnd.intertrust.nncp":{source:"iana"},"application/vnd.intu.qbo":{source:"iana",extensions:["qbo"]},"application/vnd.intu.qfx":{source:"iana",extensions:["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.conceptitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.knowledgeitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsmessage+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.packageitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.planningitem+xml":{source:"iana",compressible:!0},"application/vnd.ipunplugged.rcprofile":{source:"iana",extensions:["rcprofile"]},"application/vnd.irepository.package+xml":{source:"iana",compressible:!0,extensions:["irp"]},"application/vnd.is-xpr":{source:"iana",extensions:["xpr"]},"application/vnd.isac.fcs":{source:"iana",extensions:["fcs"]},"application/vnd.iso11783-10+zip":{source:"iana",compressible:!1},"application/vnd.jam":{source:"iana",extensions:["jam"]},"application/vnd.japannet-directory-service":{source:"iana"},"application/vnd.japannet-jpnstore-wakeup":{source:"iana"},"application/vnd.japannet-payment-wakeup":{source:"iana"},"application/vnd.japannet-registration":{source:"iana"},"application/vnd.japannet-registration-wakeup":{source:"iana"},"application/vnd.japannet-setstore-wakeup":{source:"iana"},"application/vnd.japannet-verification":{source:"iana"},"application/vnd.japannet-verification-wakeup":{source:"iana"},"application/vnd.jcp.javame.midlet-rms":{source:"iana",extensions:["rms"]},"application/vnd.jisp":{source:"iana",extensions:["jisp"]},"application/vnd.joost.joda-archive":{source:"iana",extensions:["joda"]},"application/vnd.jsk.isdn-ngn":{source:"iana"},"application/vnd.kahootz":{source:"iana",extensions:["ktz","ktr"]},"application/vnd.kde.karbon":{source:"iana",extensions:["karbon"]},"application/vnd.kde.kchart":{source:"iana",extensions:["chrt"]},"application/vnd.kde.kformula":{source:"iana",extensions:["kfo"]},"application/vnd.kde.kivio":{source:"iana",extensions:["flw"]},"application/vnd.kde.kontour":{source:"iana",extensions:["kon"]},"application/vnd.kde.kpresenter":{source:"iana",extensions:["kpr","kpt"]},"application/vnd.kde.kspread":{source:"iana",extensions:["ksp"]},"application/vnd.kde.kword":{source:"iana",extensions:["kwd","kwt"]},"application/vnd.kenameaapp":{source:"iana",extensions:["htke"]},"application/vnd.kidspiration":{source:"iana",extensions:["kia"]},"application/vnd.kinar":{source:"iana",extensions:["kne","knp"]},"application/vnd.koan":{source:"iana",extensions:["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{source:"iana",extensions:["sse"]},"application/vnd.las":{source:"iana"},"application/vnd.las.las+json":{source:"iana",compressible:!0},"application/vnd.las.las+xml":{source:"iana",compressible:!0,extensions:["lasxml"]},"application/vnd.laszip":{source:"iana"},"application/vnd.leap+json":{source:"iana",compressible:!0},"application/vnd.liberty-request+xml":{source:"iana",compressible:!0},"application/vnd.llamagraphics.life-balance.desktop":{source:"iana",extensions:["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:"iana",compressible:!0,extensions:["lbe"]},"application/vnd.logipipe.circuit+zip":{source:"iana",compressible:!1},"application/vnd.loom":{source:"iana"},"application/vnd.lotus-1-2-3":{source:"iana",extensions:["123"]},"application/vnd.lotus-approach":{source:"iana",extensions:["apr"]},"application/vnd.lotus-freelance":{source:"iana",extensions:["pre"]},"application/vnd.lotus-notes":{source:"iana",extensions:["nsf"]},"application/vnd.lotus-organizer":{source:"iana",extensions:["org"]},"application/vnd.lotus-screencam":{source:"iana",extensions:["scm"]},"application/vnd.lotus-wordpro":{source:"iana",extensions:["lwp"]},"application/vnd.macports.portpkg":{source:"iana",extensions:["portpkg"]},"application/vnd.mapbox-vector-tile":{source:"iana",extensions:["mvt"]},"application/vnd.marlin.drm.actiontoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.conftoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.license+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.mdcf":{source:"iana"},"application/vnd.mason+json":{source:"iana",compressible:!0},"application/vnd.maxar.archive.3tz+zip":{source:"iana",compressible:!1},"application/vnd.maxmind.maxmind-db":{source:"iana"},"application/vnd.mcd":{source:"iana",extensions:["mcd"]},"application/vnd.medcalcdata":{source:"iana",extensions:["mc1"]},"application/vnd.mediastation.cdkey":{source:"iana",extensions:["cdkey"]},"application/vnd.meridian-slingshot":{source:"iana"},"application/vnd.mfer":{source:"iana",extensions:["mwf"]},"application/vnd.mfmp":{source:"iana",extensions:["mfm"]},"application/vnd.micro+json":{source:"iana",compressible:!0},"application/vnd.micrografx.flo":{source:"iana",extensions:["flo"]},"application/vnd.micrografx.igx":{source:"iana",extensions:["igx"]},"application/vnd.microsoft.portable-executable":{source:"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{source:"iana"},"application/vnd.miele+json":{source:"iana",compressible:!0},"application/vnd.mif":{source:"iana",extensions:["mif"]},"application/vnd.minisoft-hp3000-save":{source:"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{source:"iana"},"application/vnd.mobius.daf":{source:"iana",extensions:["daf"]},"application/vnd.mobius.dis":{source:"iana",extensions:["dis"]},"application/vnd.mobius.mbk":{source:"iana",extensions:["mbk"]},"application/vnd.mobius.mqy":{source:"iana",extensions:["mqy"]},"application/vnd.mobius.msl":{source:"iana",extensions:["msl"]},"application/vnd.mobius.plc":{source:"iana",extensions:["plc"]},"application/vnd.mobius.txf":{source:"iana",extensions:["txf"]},"application/vnd.mophun.application":{source:"iana",extensions:["mpn"]},"application/vnd.mophun.certificate":{source:"iana",extensions:["mpc"]},"application/vnd.motorola.flexsuite":{source:"iana"},"application/vnd.motorola.flexsuite.adsi":{source:"iana"},"application/vnd.motorola.flexsuite.fis":{source:"iana"},"application/vnd.motorola.flexsuite.gotap":{source:"iana"},"application/vnd.motorola.flexsuite.kmr":{source:"iana"},"application/vnd.motorola.flexsuite.ttc":{source:"iana"},"application/vnd.motorola.flexsuite.wem":{source:"iana"},"application/vnd.motorola.iprm":{source:"iana"},"application/vnd.mozilla.xul+xml":{source:"iana",compressible:!0,extensions:["xul"]},"application/vnd.ms-3mfdocument":{source:"iana"},"application/vnd.ms-artgalry":{source:"iana",extensions:["cil"]},"application/vnd.ms-asf":{source:"iana"},"application/vnd.ms-cab-compressed":{source:"iana",extensions:["cab"]},"application/vnd.ms-color.iccprofile":{source:"apache"},"application/vnd.ms-excel":{source:"iana",compressible:!1,extensions:["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{source:"iana",extensions:["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{source:"iana",extensions:["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{source:"iana",extensions:["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{source:"iana",extensions:["xltm"]},"application/vnd.ms-fontobject":{source:"iana",compressible:!0,extensions:["eot"]},"application/vnd.ms-htmlhelp":{source:"iana",extensions:["chm"]},"application/vnd.ms-ims":{source:"iana",extensions:["ims"]},"application/vnd.ms-lrm":{source:"iana",extensions:["lrm"]},"application/vnd.ms-office.activex+xml":{source:"iana",compressible:!0},"application/vnd.ms-officetheme":{source:"iana",extensions:["thmx"]},"application/vnd.ms-opentype":{source:"apache",compressible:!0},"application/vnd.ms-outlook":{compressible:!1,extensions:["msg"]},"application/vnd.ms-package.obfuscated-opentype":{source:"apache"},"application/vnd.ms-pki.seccat":{source:"apache",extensions:["cat"]},"application/vnd.ms-pki.stl":{source:"apache",extensions:["stl"]},"application/vnd.ms-playready.initiator+xml":{source:"iana",compressible:!0},"application/vnd.ms-powerpoint":{source:"iana",compressible:!1,extensions:["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{source:"iana",extensions:["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{source:"iana",extensions:["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{source:"iana",extensions:["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{source:"iana",extensions:["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{source:"iana",extensions:["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{source:"iana",compressible:!0},"application/vnd.ms-printing.printticket+xml":{source:"apache",compressible:!0},"application/vnd.ms-printschematicket+xml":{source:"iana",compressible:!0},"application/vnd.ms-project":{source:"iana",extensions:["mpp","mpt"]},"application/vnd.ms-tnef":{source:"iana"},"application/vnd.ms-windows.devicepairing":{source:"iana"},"application/vnd.ms-windows.nwprinting.oob":{source:"iana"},"application/vnd.ms-windows.printerpairing":{source:"iana"},"application/vnd.ms-windows.wsd.oob":{source:"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.lic-resp":{source:"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.meter-resp":{source:"iana"},"application/vnd.ms-word.document.macroenabled.12":{source:"iana",extensions:["docm"]},"application/vnd.ms-word.template.macroenabled.12":{source:"iana",extensions:["dotm"]},"application/vnd.ms-works":{source:"iana",extensions:["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{source:"iana",extensions:["wpl"]},"application/vnd.ms-xpsdocument":{source:"iana",compressible:!1,extensions:["xps"]},"application/vnd.msa-disk-image":{source:"iana"},"application/vnd.mseq":{source:"iana",extensions:["mseq"]},"application/vnd.msign":{source:"iana"},"application/vnd.multiad.creator":{source:"iana"},"application/vnd.multiad.creator.cif":{source:"iana"},"application/vnd.music-niff":{source:"iana"},"application/vnd.musician":{source:"iana",extensions:["mus"]},"application/vnd.muvee.style":{source:"iana",extensions:["msty"]},"application/vnd.mynfc":{source:"iana",extensions:["taglet"]},"application/vnd.nacamar.ybrid+json":{source:"iana",compressible:!0},"application/vnd.ncd.control":{source:"iana"},"application/vnd.ncd.reference":{source:"iana"},"application/vnd.nearst.inv+json":{source:"iana",compressible:!0},"application/vnd.nebumind.line":{source:"iana"},"application/vnd.nervana":{source:"iana"},"application/vnd.netfpx":{source:"iana"},"application/vnd.neurolanguage.nlu":{source:"iana",extensions:["nlu"]},"application/vnd.nimn":{source:"iana"},"application/vnd.nintendo.nitro.rom":{source:"iana"},"application/vnd.nintendo.snes.rom":{source:"iana"},"application/vnd.nitf":{source:"iana",extensions:["ntf","nitf"]},"application/vnd.noblenet-directory":{source:"iana",extensions:["nnd"]},"application/vnd.noblenet-sealer":{source:"iana",extensions:["nns"]},"application/vnd.noblenet-web":{source:"iana",extensions:["nnw"]},"application/vnd.nokia.catalogs":{source:"iana"},"application/vnd.nokia.conml+wbxml":{source:"iana"},"application/vnd.nokia.conml+xml":{source:"iana",compressible:!0},"application/vnd.nokia.iptv.config+xml":{source:"iana",compressible:!0},"application/vnd.nokia.isds-radio-presets":{source:"iana"},"application/vnd.nokia.landmark+wbxml":{source:"iana"},"application/vnd.nokia.landmark+xml":{source:"iana",compressible:!0},"application/vnd.nokia.landmarkcollection+xml":{source:"iana",compressible:!0},"application/vnd.nokia.n-gage.ac+xml":{source:"iana",compressible:!0,extensions:["ac"]},"application/vnd.nokia.n-gage.data":{source:"iana",extensions:["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{source:"iana",extensions:["n-gage"]},"application/vnd.nokia.ncd":{source:"iana"},"application/vnd.nokia.pcd+wbxml":{source:"iana"},"application/vnd.nokia.pcd+xml":{source:"iana",compressible:!0},"application/vnd.nokia.radio-preset":{source:"iana",extensions:["rpst"]},"application/vnd.nokia.radio-presets":{source:"iana",extensions:["rpss"]},"application/vnd.novadigm.edm":{source:"iana",extensions:["edm"]},"application/vnd.novadigm.edx":{source:"iana",extensions:["edx"]},"application/vnd.novadigm.ext":{source:"iana",extensions:["ext"]},"application/vnd.ntt-local.content-share":{source:"iana"},"application/vnd.ntt-local.file-transfer":{source:"iana"},"application/vnd.ntt-local.ogw_remote-access":{source:"iana"},"application/vnd.ntt-local.sip-ta_remote":{source:"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{source:"iana"},"application/vnd.oasis.opendocument.chart":{source:"iana",extensions:["odc"]},"application/vnd.oasis.opendocument.chart-template":{source:"iana",extensions:["otc"]},"application/vnd.oasis.opendocument.database":{source:"iana",extensions:["odb"]},"application/vnd.oasis.opendocument.formula":{source:"iana",extensions:["odf"]},"application/vnd.oasis.opendocument.formula-template":{source:"iana",extensions:["odft"]},"application/vnd.oasis.opendocument.graphics":{source:"iana",compressible:!1,extensions:["odg"]},"application/vnd.oasis.opendocument.graphics-template":{source:"iana",extensions:["otg"]},"application/vnd.oasis.opendocument.image":{source:"iana",extensions:["odi"]},"application/vnd.oasis.opendocument.image-template":{source:"iana",extensions:["oti"]},"application/vnd.oasis.opendocument.presentation":{source:"iana",compressible:!1,extensions:["odp"]},"application/vnd.oasis.opendocument.presentation-template":{source:"iana",extensions:["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{source:"iana",compressible:!1,extensions:["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{source:"iana",extensions:["ots"]},"application/vnd.oasis.opendocument.text":{source:"iana",compressible:!1,extensions:["odt"]},"application/vnd.oasis.opendocument.text-master":{source:"iana",extensions:["odm"]},"application/vnd.oasis.opendocument.text-template":{source:"iana",extensions:["ott"]},"application/vnd.oasis.opendocument.text-web":{source:"iana",extensions:["oth"]},"application/vnd.obn":{source:"iana"},"application/vnd.ocf+cbor":{source:"iana"},"application/vnd.oci.image.manifest.v1+json":{source:"iana",compressible:!0},"application/vnd.oftn.l10n+json":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessdownload+xml":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessstreaming+xml":{source:"iana",compressible:!0},"application/vnd.oipf.cspg-hexbinary":{source:"iana"},"application/vnd.oipf.dae.svg+xml":{source:"iana",compressible:!0},"application/vnd.oipf.dae.xhtml+xml":{source:"iana",compressible:!0},"application/vnd.oipf.mippvcontrolmessage+xml":{source:"iana",compressible:!0},"application/vnd.oipf.pae.gem":{source:"iana"},"application/vnd.oipf.spdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.oipf.spdlist+xml":{source:"iana",compressible:!0},"application/vnd.oipf.ueprofile+xml":{source:"iana",compressible:!0},"application/vnd.oipf.userprofile+xml":{source:"iana",compressible:!0},"application/vnd.olpc-sugar":{source:"iana",extensions:["xo"]},"application/vnd.oma-scws-config":{source:"iana"},"application/vnd.oma-scws-http-request":{source:"iana"},"application/vnd.oma-scws-http-response":{source:"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.drm-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.imd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.ltkm":{source:"iana"},"application/vnd.oma.bcast.notification+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.provisioningtrigger":{source:"iana"},"application/vnd.oma.bcast.sgboot":{source:"iana"},"application/vnd.oma.bcast.sgdd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sgdu":{source:"iana"},"application/vnd.oma.bcast.simple-symbol-container":{source:"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sprov+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.stkm":{source:"iana"},"application/vnd.oma.cab-address-book+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-feature-handler+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-pcc+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-subs-invite+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-user-prefs+xml":{source:"iana",compressible:!0},"application/vnd.oma.dcd":{source:"iana"},"application/vnd.oma.dcdc":{source:"iana"},"application/vnd.oma.dd2+xml":{source:"iana",compressible:!0,extensions:["dd2"]},"application/vnd.oma.drm.risd+xml":{source:"iana",compressible:!0},"application/vnd.oma.group-usage-list+xml":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+cbor":{source:"iana"},"application/vnd.oma.lwm2m+json":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+tlv":{source:"iana"},"application/vnd.oma.pal+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.detailed-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.final-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.groups+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.invocation-descriptor+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.optimized-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.push":{source:"iana"},"application/vnd.oma.scidm.messages+xml":{source:"iana",compressible:!0},"application/vnd.oma.xcap-directory+xml":{source:"iana",compressible:!0},"application/vnd.omads-email+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-file+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-folder+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omaloc-supl-init":{source:"iana"},"application/vnd.onepager":{source:"iana"},"application/vnd.onepagertamp":{source:"iana"},"application/vnd.onepagertamx":{source:"iana"},"application/vnd.onepagertat":{source:"iana"},"application/vnd.onepagertatp":{source:"iana"},"application/vnd.onepagertatx":{source:"iana"},"application/vnd.openblox.game+xml":{source:"iana",compressible:!0,extensions:["obgx"]},"application/vnd.openblox.game-binary":{source:"iana"},"application/vnd.openeye.oeb":{source:"iana"},"application/vnd.openofficeorg.extension":{source:"apache",extensions:["oxt"]},"application/vnd.openstreetmap.data+xml":{source:"iana",compressible:!0,extensions:["osm"]},"application/vnd.opentimestamps.ots":{source:"iana"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",compressible:!1,extensions:["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:"iana",extensions:["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:"iana",extensions:["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:"iana",extensions:["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",compressible:!1,extensions:["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:"iana",extensions:["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.theme+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",compressible:!1,extensions:["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:"iana",extensions:["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.core-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.relationships+xml":{source:"iana",compressible:!0},"application/vnd.oracle.resource+json":{source:"iana",compressible:!0},"application/vnd.orange.indata":{source:"iana"},"application/vnd.osa.netdeploy":{source:"iana"},"application/vnd.osgeo.mapguide.package":{source:"iana",extensions:["mgp"]},"application/vnd.osgi.bundle":{source:"iana"},"application/vnd.osgi.dp":{source:"iana",extensions:["dp"]},"application/vnd.osgi.subsystem":{source:"iana",extensions:["esa"]},"application/vnd.otps.ct-kip+xml":{source:"iana",compressible:!0},"application/vnd.oxli.countgraph":{source:"iana"},"application/vnd.pagerduty+json":{source:"iana",compressible:!0},"application/vnd.palm":{source:"iana",extensions:["pdb","pqa","oprc"]},"application/vnd.panoply":{source:"iana"},"application/vnd.paos.xml":{source:"iana"},"application/vnd.patentdive":{source:"iana"},"application/vnd.patientecommsdoc":{source:"iana"},"application/vnd.pawaafile":{source:"iana",extensions:["paw"]},"application/vnd.pcos":{source:"iana"},"application/vnd.pg.format":{source:"iana",extensions:["str"]},"application/vnd.pg.osasli":{source:"iana",extensions:["ei6"]},"application/vnd.piaccess.application-licence":{source:"iana"},"application/vnd.picsel":{source:"iana",extensions:["efif"]},"application/vnd.pmi.widget":{source:"iana",extensions:["wg"]},"application/vnd.poc.group-advertisement+xml":{source:"iana",compressible:!0},"application/vnd.pocketlearn":{source:"iana",extensions:["plf"]},"application/vnd.powerbuilder6":{source:"iana",extensions:["pbd"]},"application/vnd.powerbuilder6-s":{source:"iana"},"application/vnd.powerbuilder7":{source:"iana"},"application/vnd.powerbuilder7-s":{source:"iana"},"application/vnd.powerbuilder75":{source:"iana"},"application/vnd.powerbuilder75-s":{source:"iana"},"application/vnd.preminet":{source:"iana"},"application/vnd.previewsystems.box":{source:"iana",extensions:["box"]},"application/vnd.proteus.magazine":{source:"iana",extensions:["mgz"]},"application/vnd.psfs":{source:"iana"},"application/vnd.publishare-delta-tree":{source:"iana",extensions:["qps"]},"application/vnd.pvi.ptid1":{source:"iana",extensions:["ptid"]},"application/vnd.pwg-multiplexed":{source:"iana"},"application/vnd.pwg-xhtml-print+xml":{source:"iana",compressible:!0},"application/vnd.qualcomm.brew-app-res":{source:"iana"},"application/vnd.quarantainenet":{source:"iana"},"application/vnd.quark.quarkxpress":{source:"iana",extensions:["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{source:"iana"},"application/vnd.radisys.moml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conn+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-stream+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-base+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-group+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-speech+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-transform+xml":{source:"iana",compressible:!0},"application/vnd.rainstor.data":{source:"iana"},"application/vnd.rapid":{source:"iana"},"application/vnd.rar":{source:"iana",extensions:["rar"]},"application/vnd.realvnc.bed":{source:"iana",extensions:["bed"]},"application/vnd.recordare.musicxml":{source:"iana",extensions:["mxl"]},"application/vnd.recordare.musicxml+xml":{source:"iana",compressible:!0,extensions:["musicxml"]},"application/vnd.renlearn.rlprint":{source:"iana"},"application/vnd.resilient.logic":{source:"iana"},"application/vnd.restful+json":{source:"iana",compressible:!0},"application/vnd.rig.cryptonote":{source:"iana",extensions:["cryptonote"]},"application/vnd.rim.cod":{source:"apache",extensions:["cod"]},"application/vnd.rn-realmedia":{source:"apache",extensions:["rm"]},"application/vnd.rn-realmedia-vbr":{source:"apache",extensions:["rmvb"]},"application/vnd.route66.link66+xml":{source:"iana",compressible:!0,extensions:["link66"]},"application/vnd.rs-274x":{source:"iana"},"application/vnd.ruckus.download":{source:"iana"},"application/vnd.s3sms":{source:"iana"},"application/vnd.sailingtracker.track":{source:"iana",extensions:["st"]},"application/vnd.sar":{source:"iana"},"application/vnd.sbm.cid":{source:"iana"},"application/vnd.sbm.mid2":{source:"iana"},"application/vnd.scribus":{source:"iana"},"application/vnd.sealed.3df":{source:"iana"},"application/vnd.sealed.csf":{source:"iana"},"application/vnd.sealed.doc":{source:"iana"},"application/vnd.sealed.eml":{source:"iana"},"application/vnd.sealed.mht":{source:"iana"},"application/vnd.sealed.net":{source:"iana"},"application/vnd.sealed.ppt":{source:"iana"},"application/vnd.sealed.tiff":{source:"iana"},"application/vnd.sealed.xls":{source:"iana"},"application/vnd.sealedmedia.softseal.html":{source:"iana"},"application/vnd.sealedmedia.softseal.pdf":{source:"iana"},"application/vnd.seemail":{source:"iana",extensions:["see"]},"application/vnd.seis+json":{source:"iana",compressible:!0},"application/vnd.sema":{source:"iana",extensions:["sema"]},"application/vnd.semd":{source:"iana",extensions:["semd"]},"application/vnd.semf":{source:"iana",extensions:["semf"]},"application/vnd.shade-save-file":{source:"iana"},"application/vnd.shana.informed.formdata":{source:"iana",extensions:["ifm"]},"application/vnd.shana.informed.formtemplate":{source:"iana",extensions:["itp"]},"application/vnd.shana.informed.interchange":{source:"iana",extensions:["iif"]},"application/vnd.shana.informed.package":{source:"iana",extensions:["ipk"]},"application/vnd.shootproof+json":{source:"iana",compressible:!0},"application/vnd.shopkick+json":{source:"iana",compressible:!0},"application/vnd.shp":{source:"iana"},"application/vnd.shx":{source:"iana"},"application/vnd.sigrok.session":{source:"iana"},"application/vnd.simtech-mindmapper":{source:"iana",extensions:["twd","twds"]},"application/vnd.siren+json":{source:"iana",compressible:!0},"application/vnd.smaf":{source:"iana",extensions:["mmf"]},"application/vnd.smart.notebook":{source:"iana"},"application/vnd.smart.teacher":{source:"iana",extensions:["teacher"]},"application/vnd.snesdev-page-table":{source:"iana"},"application/vnd.software602.filler.form+xml":{source:"iana",compressible:!0,extensions:["fo"]},"application/vnd.software602.filler.form-xml-zip":{source:"iana"},"application/vnd.solent.sdkm+xml":{source:"iana",compressible:!0,extensions:["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{source:"iana",extensions:["dxp"]},"application/vnd.spotfire.sfs":{source:"iana",extensions:["sfs"]},"application/vnd.sqlite3":{source:"iana"},"application/vnd.sss-cod":{source:"iana"},"application/vnd.sss-dtf":{source:"iana"},"application/vnd.sss-ntf":{source:"iana"},"application/vnd.stardivision.calc":{source:"apache",extensions:["sdc"]},"application/vnd.stardivision.draw":{source:"apache",extensions:["sda"]},"application/vnd.stardivision.impress":{source:"apache",extensions:["sdd"]},"application/vnd.stardivision.math":{source:"apache",extensions:["smf"]},"application/vnd.stardivision.writer":{source:"apache",extensions:["sdw","vor"]},"application/vnd.stardivision.writer-global":{source:"apache",extensions:["sgl"]},"application/vnd.stepmania.package":{source:"iana",extensions:["smzip"]},"application/vnd.stepmania.stepchart":{source:"iana",extensions:["sm"]},"application/vnd.street-stream":{source:"iana"},"application/vnd.sun.wadl+xml":{source:"iana",compressible:!0,extensions:["wadl"]},"application/vnd.sun.xml.calc":{source:"apache",extensions:["sxc"]},"application/vnd.sun.xml.calc.template":{source:"apache",extensions:["stc"]},"application/vnd.sun.xml.draw":{source:"apache",extensions:["sxd"]},"application/vnd.sun.xml.draw.template":{source:"apache",extensions:["std"]},"application/vnd.sun.xml.impress":{source:"apache",extensions:["sxi"]},"application/vnd.sun.xml.impress.template":{source:"apache",extensions:["sti"]},"application/vnd.sun.xml.math":{source:"apache",extensions:["sxm"]},"application/vnd.sun.xml.writer":{source:"apache",extensions:["sxw"]},"application/vnd.sun.xml.writer.global":{source:"apache",extensions:["sxg"]},"application/vnd.sun.xml.writer.template":{source:"apache",extensions:["stw"]},"application/vnd.sus-calendar":{source:"iana",extensions:["sus","susp"]},"application/vnd.svd":{source:"iana",extensions:["svd"]},"application/vnd.swiftview-ics":{source:"iana"},"application/vnd.sycle+xml":{source:"iana",compressible:!0},"application/vnd.syft+json":{source:"iana",compressible:!0},"application/vnd.symbian.install":{source:"apache",extensions:["sis","sisx"]},"application/vnd.syncml+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xsm"]},"application/vnd.syncml.dm+wbxml":{source:"iana",charset:"UTF-8",extensions:["bdm"]},"application/vnd.syncml.dm+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xdm"]},"application/vnd.syncml.dm.notification":{source:"iana"},"application/vnd.syncml.dmddf+wbxml":{source:"iana"},"application/vnd.syncml.dmddf+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{source:"iana"},"application/vnd.syncml.dmtnds+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.syncml.ds.notification":{source:"iana"},"application/vnd.tableschema+json":{source:"iana",compressible:!0},"application/vnd.tao.intent-module-archive":{source:"iana",extensions:["tao"]},"application/vnd.tcpdump.pcap":{source:"iana",extensions:["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{source:"iana",compressible:!0},"application/vnd.tmd.mediaflex.api+xml":{source:"iana",compressible:!0},"application/vnd.tml":{source:"iana"},"application/vnd.tmobile-livetv":{source:"iana",extensions:["tmo"]},"application/vnd.tri.onesource":{source:"iana"},"application/vnd.trid.tpt":{source:"iana",extensions:["tpt"]},"application/vnd.triscape.mxs":{source:"iana",extensions:["mxs"]},"application/vnd.trueapp":{source:"iana",extensions:["tra"]},"application/vnd.truedoc":{source:"iana"},"application/vnd.ubisoft.webplayer":{source:"iana"},"application/vnd.ufdl":{source:"iana",extensions:["ufd","ufdl"]},"application/vnd.uiq.theme":{source:"iana",extensions:["utz"]},"application/vnd.umajin":{source:"iana",extensions:["umj"]},"application/vnd.unity":{source:"iana",extensions:["unityweb"]},"application/vnd.uoml+xml":{source:"iana",compressible:!0,extensions:["uoml"]},"application/vnd.uplanet.alert":{source:"iana"},"application/vnd.uplanet.alert-wbxml":{source:"iana"},"application/vnd.uplanet.bearer-choice":{source:"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{source:"iana"},"application/vnd.uplanet.cacheop":{source:"iana"},"application/vnd.uplanet.cacheop-wbxml":{source:"iana"},"application/vnd.uplanet.channel":{source:"iana"},"application/vnd.uplanet.channel-wbxml":{source:"iana"},"application/vnd.uplanet.list":{source:"iana"},"application/vnd.uplanet.list-wbxml":{source:"iana"},"application/vnd.uplanet.listcmd":{source:"iana"},"application/vnd.uplanet.listcmd-wbxml":{source:"iana"},"application/vnd.uplanet.signal":{source:"iana"},"application/vnd.uri-map":{source:"iana"},"application/vnd.valve.source.material":{source:"iana"},"application/vnd.vcx":{source:"iana",extensions:["vcx"]},"application/vnd.vd-study":{source:"iana"},"application/vnd.vectorworks":{source:"iana"},"application/vnd.vel+json":{source:"iana",compressible:!0},"application/vnd.verimatrix.vcas":{source:"iana"},"application/vnd.veritone.aion+json":{source:"iana",compressible:!0},"application/vnd.veryant.thin":{source:"iana"},"application/vnd.ves.encrypted":{source:"iana"},"application/vnd.vidsoft.vidconference":{source:"iana"},"application/vnd.visio":{source:"iana",extensions:["vsd","vst","vss","vsw"]},"application/vnd.visionary":{source:"iana",extensions:["vis"]},"application/vnd.vividence.scriptfile":{source:"iana"},"application/vnd.vsf":{source:"iana",extensions:["vsf"]},"application/vnd.wap.sic":{source:"iana"},"application/vnd.wap.slc":{source:"iana"},"application/vnd.wap.wbxml":{source:"iana",charset:"UTF-8",extensions:["wbxml"]},"application/vnd.wap.wmlc":{source:"iana",extensions:["wmlc"]},"application/vnd.wap.wmlscriptc":{source:"iana",extensions:["wmlsc"]},"application/vnd.webturbo":{source:"iana",extensions:["wtb"]},"application/vnd.wfa.dpp":{source:"iana"},"application/vnd.wfa.p2p":{source:"iana"},"application/vnd.wfa.wsc":{source:"iana"},"application/vnd.windows.devicepairing":{source:"iana"},"application/vnd.wmc":{source:"iana"},"application/vnd.wmf.bootstrap":{source:"iana"},"application/vnd.wolfram.mathematica":{source:"iana"},"application/vnd.wolfram.mathematica.package":{source:"iana"},"application/vnd.wolfram.player":{source:"iana",extensions:["nbp"]},"application/vnd.wordperfect":{source:"iana",extensions:["wpd"]},"application/vnd.wqd":{source:"iana",extensions:["wqd"]},"application/vnd.wrq-hp3000-labelled":{source:"iana"},"application/vnd.wt.stf":{source:"iana",extensions:["stf"]},"application/vnd.wv.csp+wbxml":{source:"iana"},"application/vnd.wv.csp+xml":{source:"iana",compressible:!0},"application/vnd.wv.ssp+xml":{source:"iana",compressible:!0},"application/vnd.xacml+json":{source:"iana",compressible:!0},"application/vnd.xara":{source:"iana",extensions:["xar"]},"application/vnd.xfdl":{source:"iana",extensions:["xfdl"]},"application/vnd.xfdl.webform":{source:"iana"},"application/vnd.xmi+xml":{source:"iana",compressible:!0},"application/vnd.xmpie.cpkg":{source:"iana"},"application/vnd.xmpie.dpkg":{source:"iana"},"application/vnd.xmpie.plan":{source:"iana"},"application/vnd.xmpie.ppkg":{source:"iana"},"application/vnd.xmpie.xlim":{source:"iana"},"application/vnd.yamaha.hv-dic":{source:"iana",extensions:["hvd"]},"application/vnd.yamaha.hv-script":{source:"iana",extensions:["hvs"]},"application/vnd.yamaha.hv-voice":{source:"iana",extensions:["hvp"]},"application/vnd.yamaha.openscoreformat":{source:"iana",extensions:["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{source:"iana",compressible:!0,extensions:["osfpvg"]},"application/vnd.yamaha.remote-setup":{source:"iana"},"application/vnd.yamaha.smaf-audio":{source:"iana",extensions:["saf"]},"application/vnd.yamaha.smaf-phrase":{source:"iana",extensions:["spf"]},"application/vnd.yamaha.through-ngn":{source:"iana"},"application/vnd.yamaha.tunnel-udpencap":{source:"iana"},"application/vnd.yaoweme":{source:"iana"},"application/vnd.yellowriver-custom-menu":{source:"iana",extensions:["cmp"]},"application/vnd.youtube.yt":{source:"iana"},"application/vnd.zul":{source:"iana",extensions:["zir","zirz"]},"application/vnd.zzazz.deck+xml":{source:"iana",compressible:!0,extensions:["zaz"]},"application/voicexml+xml":{source:"iana",compressible:!0,extensions:["vxml"]},"application/voucher-cms+json":{source:"iana",compressible:!0},"application/vq-rtcpxr":{source:"iana"},"application/wasm":{source:"iana",compressible:!0,extensions:["wasm"]},"application/watcherinfo+xml":{source:"iana",compressible:!0,extensions:["wif"]},"application/webpush-options+json":{source:"iana",compressible:!0},"application/whoispp-query":{source:"iana"},"application/whoispp-response":{source:"iana"},"application/widget":{source:"iana",extensions:["wgt"]},"application/winhlp":{source:"apache",extensions:["hlp"]},"application/wita":{source:"iana"},"application/wordperfect5.1":{source:"iana"},"application/wsdl+xml":{source:"iana",compressible:!0,extensions:["wsdl"]},"application/wspolicy+xml":{source:"iana",compressible:!0,extensions:["wspolicy"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/x-abiword":{source:"apache",extensions:["abw"]},"application/x-ace-compressed":{source:"apache",extensions:["ace"]},"application/x-amf":{source:"apache"},"application/x-apple-diskimage":{source:"apache",extensions:["dmg"]},"application/x-arj":{compressible:!1,extensions:["arj"]},"application/x-authorware-bin":{source:"apache",extensions:["aab","x32","u32","vox"]},"application/x-authorware-map":{source:"apache",extensions:["aam"]},"application/x-authorware-seg":{source:"apache",extensions:["aas"]},"application/x-bcpio":{source:"apache",extensions:["bcpio"]},"application/x-bdoc":{compressible:!1,extensions:["bdoc"]},"application/x-bittorrent":{source:"apache",extensions:["torrent"]},"application/x-blorb":{source:"apache",extensions:["blb","blorb"]},"application/x-bzip":{source:"apache",compressible:!1,extensions:["bz"]},"application/x-bzip2":{source:"apache",compressible:!1,extensions:["bz2","boz"]},"application/x-cbr":{source:"apache",extensions:["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{source:"apache",extensions:["vcd"]},"application/x-cfs-compressed":{source:"apache",extensions:["cfs"]},"application/x-chat":{source:"apache",extensions:["chat"]},"application/x-chess-pgn":{source:"apache",extensions:["pgn"]},"application/x-chrome-extension":{extensions:["crx"]},"application/x-cocoa":{source:"nginx",extensions:["cco"]},"application/x-compress":{source:"apache"},"application/x-conference":{source:"apache",extensions:["nsc"]},"application/x-cpio":{source:"apache",extensions:["cpio"]},"application/x-csh":{source:"apache",extensions:["csh"]},"application/x-deb":{compressible:!1},"application/x-debian-package":{source:"apache",extensions:["deb","udeb"]},"application/x-dgc-compressed":{source:"apache",extensions:["dgc"]},"application/x-director":{source:"apache",extensions:["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{source:"apache",extensions:["wad"]},"application/x-dtbncx+xml":{source:"apache",compressible:!0,extensions:["ncx"]},"application/x-dtbook+xml":{source:"apache",compressible:!0,extensions:["dtb"]},"application/x-dtbresource+xml":{source:"apache",compressible:!0,extensions:["res"]},"application/x-dvi":{source:"apache",compressible:!1,extensions:["dvi"]},"application/x-envoy":{source:"apache",extensions:["evy"]},"application/x-eva":{source:"apache",extensions:["eva"]},"application/x-font-bdf":{source:"apache",extensions:["bdf"]},"application/x-font-dos":{source:"apache"},"application/x-font-framemaker":{source:"apache"},"application/x-font-ghostscript":{source:"apache",extensions:["gsf"]},"application/x-font-libgrx":{source:"apache"},"application/x-font-linux-psf":{source:"apache",extensions:["psf"]},"application/x-font-pcf":{source:"apache",extensions:["pcf"]},"application/x-font-snf":{source:"apache",extensions:["snf"]},"application/x-font-speedo":{source:"apache"},"application/x-font-sunos-news":{source:"apache"},"application/x-font-type1":{source:"apache",extensions:["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{source:"apache"},"application/x-freearc":{source:"apache",extensions:["arc"]},"application/x-futuresplash":{source:"apache",extensions:["spl"]},"application/x-gca-compressed":{source:"apache",extensions:["gca"]},"application/x-glulx":{source:"apache",extensions:["ulx"]},"application/x-gnumeric":{source:"apache",extensions:["gnumeric"]},"application/x-gramps-xml":{source:"apache",extensions:["gramps"]},"application/x-gtar":{source:"apache",extensions:["gtar"]},"application/x-gzip":{source:"apache"},"application/x-hdf":{source:"apache",extensions:["hdf"]},"application/x-httpd-php":{compressible:!0,extensions:["php"]},"application/x-install-instructions":{source:"apache",extensions:["install"]},"application/x-iso9660-image":{source:"apache",extensions:["iso"]},"application/x-iwork-keynote-sffkey":{extensions:["key"]},"application/x-iwork-numbers-sffnumbers":{extensions:["numbers"]},"application/x-iwork-pages-sffpages":{extensions:["pages"]},"application/x-java-archive-diff":{source:"nginx",extensions:["jardiff"]},"application/x-java-jnlp-file":{source:"apache",compressible:!1,extensions:["jnlp"]},"application/x-javascript":{compressible:!0},"application/x-keepass2":{extensions:["kdbx"]},"application/x-latex":{source:"apache",compressible:!1,extensions:["latex"]},"application/x-lua-bytecode":{extensions:["luac"]},"application/x-lzh-compressed":{source:"apache",extensions:["lzh","lha"]},"application/x-makeself":{source:"nginx",extensions:["run"]},"application/x-mie":{source:"apache",extensions:["mie"]},"application/x-mobipocket-ebook":{source:"apache",extensions:["prc","mobi"]},"application/x-mpegurl":{compressible:!1},"application/x-ms-application":{source:"apache",extensions:["application"]},"application/x-ms-shortcut":{source:"apache",extensions:["lnk"]},"application/x-ms-wmd":{source:"apache",extensions:["wmd"]},"application/x-ms-wmz":{source:"apache",extensions:["wmz"]},"application/x-ms-xbap":{source:"apache",extensions:["xbap"]},"application/x-msaccess":{source:"apache",extensions:["mdb"]},"application/x-msbinder":{source:"apache",extensions:["obd"]},"application/x-mscardfile":{source:"apache",extensions:["crd"]},"application/x-msclip":{source:"apache",extensions:["clp"]},"application/x-msdos-program":{extensions:["exe"]},"application/x-msdownload":{source:"apache",extensions:["exe","dll","com","bat","msi"]},"application/x-msmediaview":{source:"apache",extensions:["mvb","m13","m14"]},"application/x-msmetafile":{source:"apache",extensions:["wmf","wmz","emf","emz"]},"application/x-msmoney":{source:"apache",extensions:["mny"]},"application/x-mspublisher":{source:"apache",extensions:["pub"]},"application/x-msschedule":{source:"apache",extensions:["scd"]},"application/x-msterminal":{source:"apache",extensions:["trm"]},"application/x-mswrite":{source:"apache",extensions:["wri"]},"application/x-netcdf":{source:"apache",extensions:["nc","cdf"]},"application/x-ns-proxy-autoconfig":{compressible:!0,extensions:["pac"]},"application/x-nzb":{source:"apache",extensions:["nzb"]},"application/x-perl":{source:"nginx",extensions:["pl","pm"]},"application/x-pilot":{source:"nginx",extensions:["prc","pdb"]},"application/x-pkcs12":{source:"apache",compressible:!1,extensions:["p12","pfx"]},"application/x-pkcs7-certificates":{source:"apache",extensions:["p7b","spc"]},"application/x-pkcs7-certreqresp":{source:"apache",extensions:["p7r"]},"application/x-pki-message":{source:"iana"},"application/x-rar-compressed":{source:"apache",compressible:!1,extensions:["rar"]},"application/x-redhat-package-manager":{source:"nginx",extensions:["rpm"]},"application/x-research-info-systems":{source:"apache",extensions:["ris"]},"application/x-sea":{source:"nginx",extensions:["sea"]},"application/x-sh":{source:"apache",compressible:!0,extensions:["sh"]},"application/x-shar":{source:"apache",extensions:["shar"]},"application/x-shockwave-flash":{source:"apache",compressible:!1,extensions:["swf"]},"application/x-silverlight-app":{source:"apache",extensions:["xap"]},"application/x-sql":{source:"apache",extensions:["sql"]},"application/x-stuffit":{source:"apache",compressible:!1,extensions:["sit"]},"application/x-stuffitx":{source:"apache",extensions:["sitx"]},"application/x-subrip":{source:"apache",extensions:["srt"]},"application/x-sv4cpio":{source:"apache",extensions:["sv4cpio"]},"application/x-sv4crc":{source:"apache",extensions:["sv4crc"]},"application/x-t3vm-image":{source:"apache",extensions:["t3"]},"application/x-tads":{source:"apache",extensions:["gam"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-tcl":{source:"apache",extensions:["tcl","tk"]},"application/x-tex":{source:"apache",extensions:["tex"]},"application/x-tex-tfm":{source:"apache",extensions:["tfm"]},"application/x-texinfo":{source:"apache",extensions:["texinfo","texi"]},"application/x-tgif":{source:"apache",extensions:["obj"]},"application/x-ustar":{source:"apache",extensions:["ustar"]},"application/x-virtualbox-hdd":{compressible:!0,extensions:["hdd"]},"application/x-virtualbox-ova":{compressible:!0,extensions:["ova"]},"application/x-virtualbox-ovf":{compressible:!0,extensions:["ovf"]},"application/x-virtualbox-vbox":{compressible:!0,extensions:["vbox"]},"application/x-virtualbox-vbox-extpack":{compressible:!1,extensions:["vbox-extpack"]},"application/x-virtualbox-vdi":{compressible:!0,extensions:["vdi"]},"application/x-virtualbox-vhd":{compressible:!0,extensions:["vhd"]},"application/x-virtualbox-vmdk":{compressible:!0,extensions:["vmdk"]},"application/x-wais-source":{source:"apache",extensions:["src"]},"application/x-web-app-manifest+json":{compressible:!0,extensions:["webapp"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"application/x-x509-ca-cert":{source:"iana",extensions:["der","crt","pem"]},"application/x-x509-ca-ra-cert":{source:"iana"},"application/x-x509-next-ca-cert":{source:"iana"},"application/x-xfig":{source:"apache",extensions:["fig"]},"application/x-xliff+xml":{source:"apache",compressible:!0,extensions:["xlf"]},"application/x-xpinstall":{source:"apache",compressible:!1,extensions:["xpi"]},"application/x-xz":{source:"apache",extensions:["xz"]},"application/x-zmachine":{source:"apache",extensions:["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{source:"iana"},"application/xacml+xml":{source:"iana",compressible:!0},"application/xaml+xml":{source:"apache",compressible:!0,extensions:["xaml"]},"application/xcap-att+xml":{source:"iana",compressible:!0,extensions:["xav"]},"application/xcap-caps+xml":{source:"iana",compressible:!0,extensions:["xca"]},"application/xcap-diff+xml":{source:"iana",compressible:!0,extensions:["xdf"]},"application/xcap-el+xml":{source:"iana",compressible:!0,extensions:["xel"]},"application/xcap-error+xml":{source:"iana",compressible:!0},"application/xcap-ns+xml":{source:"iana",compressible:!0,extensions:["xns"]},"application/xcon-conference-info+xml":{source:"iana",compressible:!0},"application/xcon-conference-info-diff+xml":{source:"iana",compressible:!0},"application/xenc+xml":{source:"iana",compressible:!0,extensions:["xenc"]},"application/xhtml+xml":{source:"iana",compressible:!0,extensions:["xhtml","xht"]},"application/xhtml-voice+xml":{source:"apache",compressible:!0},"application/xliff+xml":{source:"iana",compressible:!0,extensions:["xlf"]},"application/xml":{source:"iana",compressible:!0,extensions:["xml","xsl","xsd","rng"]},"application/xml-dtd":{source:"iana",compressible:!0,extensions:["dtd"]},"application/xml-external-parsed-entity":{source:"iana"},"application/xml-patch+xml":{source:"iana",compressible:!0},"application/xmpp+xml":{source:"iana",compressible:!0},"application/xop+xml":{source:"iana",compressible:!0,extensions:["xop"]},"application/xproc+xml":{source:"apache",compressible:!0,extensions:["xpl"]},"application/xslt+xml":{source:"iana",compressible:!0,extensions:["xsl","xslt"]},"application/xspf+xml":{source:"apache",compressible:!0,extensions:["xspf"]},"application/xv+xml":{source:"iana",compressible:!0,extensions:["mxml","xhvml","xvml","xvm"]},"application/yang":{source:"iana",extensions:["yang"]},"application/yang-data+json":{source:"iana",compressible:!0},"application/yang-data+xml":{source:"iana",compressible:!0},"application/yang-patch+json":{source:"iana",compressible:!0},"application/yang-patch+xml":{source:"iana",compressible:!0},"application/yin+xml":{source:"iana",compressible:!0,extensions:["yin"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/zlib":{source:"iana"},"application/zstd":{source:"iana"},"audio/1d-interleaved-parityfec":{source:"iana"},"audio/32kadpcm":{source:"iana"},"audio/3gpp":{source:"iana",compressible:!1,extensions:["3gpp"]},"audio/3gpp2":{source:"iana"},"audio/aac":{source:"iana"},"audio/ac3":{source:"iana"},"audio/adpcm":{source:"apache",extensions:["adp"]},"audio/amr":{source:"iana",extensions:["amr"]},"audio/amr-wb":{source:"iana"},"audio/amr-wb+":{source:"iana"},"audio/aptx":{source:"iana"},"audio/asc":{source:"iana"},"audio/atrac-advanced-lossless":{source:"iana"},"audio/atrac-x":{source:"iana"},"audio/atrac3":{source:"iana"},"audio/basic":{source:"iana",compressible:!1,extensions:["au","snd"]},"audio/bv16":{source:"iana"},"audio/bv32":{source:"iana"},"audio/clearmode":{source:"iana"},"audio/cn":{source:"iana"},"audio/dat12":{source:"iana"},"audio/dls":{source:"iana"},"audio/dsr-es201108":{source:"iana"},"audio/dsr-es202050":{source:"iana"},"audio/dsr-es202211":{source:"iana"},"audio/dsr-es202212":{source:"iana"},"audio/dv":{source:"iana"},"audio/dvi4":{source:"iana"},"audio/eac3":{source:"iana"},"audio/encaprtp":{source:"iana"},"audio/evrc":{source:"iana"},"audio/evrc-qcp":{source:"iana"},"audio/evrc0":{source:"iana"},"audio/evrc1":{source:"iana"},"audio/evrcb":{source:"iana"},"audio/evrcb0":{source:"iana"},"audio/evrcb1":{source:"iana"},"audio/evrcnw":{source:"iana"},"audio/evrcnw0":{source:"iana"},"audio/evrcnw1":{source:"iana"},"audio/evrcwb":{source:"iana"},"audio/evrcwb0":{source:"iana"},"audio/evrcwb1":{source:"iana"},"audio/evs":{source:"iana"},"audio/flexfec":{source:"iana"},"audio/fwdred":{source:"iana"},"audio/g711-0":{source:"iana"},"audio/g719":{source:"iana"},"audio/g722":{source:"iana"},"audio/g7221":{source:"iana"},"audio/g723":{source:"iana"},"audio/g726-16":{source:"iana"},"audio/g726-24":{source:"iana"},"audio/g726-32":{source:"iana"},"audio/g726-40":{source:"iana"},"audio/g728":{source:"iana"},"audio/g729":{source:"iana"},"audio/g7291":{source:"iana"},"audio/g729d":{source:"iana"},"audio/g729e":{source:"iana"},"audio/gsm":{source:"iana"},"audio/gsm-efr":{source:"iana"},"audio/gsm-hr-08":{source:"iana"},"audio/ilbc":{source:"iana"},"audio/ip-mr_v2.5":{source:"iana"},"audio/isac":{source:"apache"},"audio/l16":{source:"iana"},"audio/l20":{source:"iana"},"audio/l24":{source:"iana",compressible:!1},"audio/l8":{source:"iana"},"audio/lpc":{source:"iana"},"audio/melp":{source:"iana"},"audio/melp1200":{source:"iana"},"audio/melp2400":{source:"iana"},"audio/melp600":{source:"iana"},"audio/mhas":{source:"iana"},"audio/midi":{source:"apache",extensions:["mid","midi","kar","rmi"]},"audio/mobile-xmf":{source:"iana",extensions:["mxmf"]},"audio/mp3":{compressible:!1,extensions:["mp3"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a","mp4a"]},"audio/mp4a-latm":{source:"iana"},"audio/mpa":{source:"iana"},"audio/mpa-robust":{source:"iana"},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{source:"iana"},"audio/musepack":{source:"apache"},"audio/ogg":{source:"iana",compressible:!1,extensions:["oga","ogg","spx","opus"]},"audio/opus":{source:"iana"},"audio/parityfec":{source:"iana"},"audio/pcma":{source:"iana"},"audio/pcma-wb":{source:"iana"},"audio/pcmu":{source:"iana"},"audio/pcmu-wb":{source:"iana"},"audio/prs.sid":{source:"iana"},"audio/qcelp":{source:"iana"},"audio/raptorfec":{source:"iana"},"audio/red":{source:"iana"},"audio/rtp-enc-aescm128":{source:"iana"},"audio/rtp-midi":{source:"iana"},"audio/rtploopback":{source:"iana"},"audio/rtx":{source:"iana"},"audio/s3m":{source:"apache",extensions:["s3m"]},"audio/scip":{source:"iana"},"audio/silk":{source:"apache",extensions:["sil"]},"audio/smv":{source:"iana"},"audio/smv-qcp":{source:"iana"},"audio/smv0":{source:"iana"},"audio/sofa":{source:"iana"},"audio/sp-midi":{source:"iana"},"audio/speex":{source:"iana"},"audio/t140c":{source:"iana"},"audio/t38":{source:"iana"},"audio/telephone-event":{source:"iana"},"audio/tetra_acelp":{source:"iana"},"audio/tetra_acelp_bb":{source:"iana"},"audio/tone":{source:"iana"},"audio/tsvcis":{source:"iana"},"audio/uemclip":{source:"iana"},"audio/ulpfec":{source:"iana"},"audio/usac":{source:"iana"},"audio/vdvi":{source:"iana"},"audio/vmr-wb":{source:"iana"},"audio/vnd.3gpp.iufp":{source:"iana"},"audio/vnd.4sb":{source:"iana"},"audio/vnd.audiokoz":{source:"iana"},"audio/vnd.celp":{source:"iana"},"audio/vnd.cisco.nse":{source:"iana"},"audio/vnd.cmles.radio-events":{source:"iana"},"audio/vnd.cns.anp1":{source:"iana"},"audio/vnd.cns.inf1":{source:"iana"},"audio/vnd.dece.audio":{source:"iana",extensions:["uva","uvva"]},"audio/vnd.digital-winds":{source:"iana",extensions:["eol"]},"audio/vnd.dlna.adts":{source:"iana"},"audio/vnd.dolby.heaac.1":{source:"iana"},"audio/vnd.dolby.heaac.2":{source:"iana"},"audio/vnd.dolby.mlp":{source:"iana"},"audio/vnd.dolby.mps":{source:"iana"},"audio/vnd.dolby.pl2":{source:"iana"},"audio/vnd.dolby.pl2x":{source:"iana"},"audio/vnd.dolby.pl2z":{source:"iana"},"audio/vnd.dolby.pulse.1":{source:"iana"},"audio/vnd.dra":{source:"iana",extensions:["dra"]},"audio/vnd.dts":{source:"iana",extensions:["dts"]},"audio/vnd.dts.hd":{source:"iana",extensions:["dtshd"]},"audio/vnd.dts.uhd":{source:"iana"},"audio/vnd.dvb.file":{source:"iana"},"audio/vnd.everad.plj":{source:"iana"},"audio/vnd.hns.audio":{source:"iana"},"audio/vnd.lucent.voice":{source:"iana",extensions:["lvp"]},"audio/vnd.ms-playready.media.pya":{source:"iana",extensions:["pya"]},"audio/vnd.nokia.mobile-xmf":{source:"iana"},"audio/vnd.nortel.vbk":{source:"iana"},"audio/vnd.nuera.ecelp4800":{source:"iana",extensions:["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{source:"iana",extensions:["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{source:"iana",extensions:["ecelp9600"]},"audio/vnd.octel.sbc":{source:"iana"},"audio/vnd.presonus.multitrack":{source:"iana"},"audio/vnd.qcelp":{source:"iana"},"audio/vnd.rhetorex.32kadpcm":{source:"iana"},"audio/vnd.rip":{source:"iana",extensions:["rip"]},"audio/vnd.rn-realaudio":{compressible:!1},"audio/vnd.sealedmedia.softseal.mpeg":{source:"iana"},"audio/vnd.vmx.cvsd":{source:"iana"},"audio/vnd.wave":{compressible:!1},"audio/vorbis":{source:"iana",compressible:!1},"audio/vorbis-config":{source:"iana"},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/wave":{compressible:!1,extensions:["wav"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/x-aac":{source:"apache",compressible:!1,extensions:["aac"]},"audio/x-aiff":{source:"apache",extensions:["aif","aiff","aifc"]},"audio/x-caf":{source:"apache",compressible:!1,extensions:["caf"]},"audio/x-flac":{source:"apache",extensions:["flac"]},"audio/x-m4a":{source:"nginx",extensions:["m4a"]},"audio/x-matroska":{source:"apache",extensions:["mka"]},"audio/x-mpegurl":{source:"apache",extensions:["m3u"]},"audio/x-ms-wax":{source:"apache",extensions:["wax"]},"audio/x-ms-wma":{source:"apache",extensions:["wma"]},"audio/x-pn-realaudio":{source:"apache",extensions:["ram","ra"]},"audio/x-pn-realaudio-plugin":{source:"apache",extensions:["rmp"]},"audio/x-realaudio":{source:"nginx",extensions:["ra"]},"audio/x-tta":{source:"apache"},"audio/x-wav":{source:"apache",extensions:["wav"]},"audio/xm":{source:"apache",extensions:["xm"]},"chemical/x-cdx":{source:"apache",extensions:["cdx"]},"chemical/x-cif":{source:"apache",extensions:["cif"]},"chemical/x-cmdf":{source:"apache",extensions:["cmdf"]},"chemical/x-cml":{source:"apache",extensions:["cml"]},"chemical/x-csml":{source:"apache",extensions:["csml"]},"chemical/x-pdb":{source:"apache"},"chemical/x-xyz":{source:"apache",extensions:["xyz"]},"font/collection":{source:"iana",extensions:["ttc"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"font/sfnt":{source:"iana"},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/woff":{source:"iana",extensions:["woff"]},"font/woff2":{source:"iana",extensions:["woff2"]},"image/aces":{source:"iana",extensions:["exr"]},"image/apng":{compressible:!1,extensions:["apng"]},"image/avci":{source:"iana",extensions:["avci"]},"image/avcs":{source:"iana",extensions:["avcs"]},"image/avif":{source:"iana",compressible:!1,extensions:["avif"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/cgm":{source:"iana",extensions:["cgm"]},"image/dicom-rle":{source:"iana",extensions:["drle"]},"image/emf":{source:"iana",extensions:["emf"]},"image/fits":{source:"iana",extensions:["fits"]},"image/g3fax":{source:"iana",extensions:["g3"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/heic":{source:"iana",extensions:["heic"]},"image/heic-sequence":{source:"iana",extensions:["heics"]},"image/heif":{source:"iana",extensions:["heif"]},"image/heif-sequence":{source:"iana",extensions:["heifs"]},"image/hej2k":{source:"iana",extensions:["hej2"]},"image/hsj2":{source:"iana",extensions:["hsj2"]},"image/ief":{source:"iana",extensions:["ief"]},"image/jls":{source:"iana",extensions:["jls"]},"image/jp2":{source:"iana",compressible:!1,extensions:["jp2","jpg2"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/jph":{source:"iana",extensions:["jph"]},"image/jphc":{source:"iana",extensions:["jhc"]},"image/jpm":{source:"iana",compressible:!1,extensions:["jpm"]},"image/jpx":{source:"iana",compressible:!1,extensions:["jpx","jpf"]},"image/jxr":{source:"iana",extensions:["jxr"]},"image/jxra":{source:"iana",extensions:["jxra"]},"image/jxrs":{source:"iana",extensions:["jxrs"]},"image/jxs":{source:"iana",extensions:["jxs"]},"image/jxsc":{source:"iana",extensions:["jxsc"]},"image/jxsi":{source:"iana",extensions:["jxsi"]},"image/jxss":{source:"iana",extensions:["jxss"]},"image/ktx":{source:"iana",extensions:["ktx"]},"image/ktx2":{source:"iana",extensions:["ktx2"]},"image/naplps":{source:"iana"},"image/pjpeg":{compressible:!1},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/prs.btif":{source:"iana",extensions:["btif"]},"image/prs.pti":{source:"iana",extensions:["pti"]},"image/pwg-raster":{source:"iana"},"image/sgi":{source:"apache",extensions:["sgi"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/t38":{source:"iana",extensions:["t38"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tif","tiff"]},"image/tiff-fx":{source:"iana",extensions:["tfx"]},"image/vnd.adobe.photoshop":{source:"iana",compressible:!0,extensions:["psd"]},"image/vnd.airzip.accelerator.azv":{source:"iana",extensions:["azv"]},"image/vnd.cns.inf2":{source:"iana"},"image/vnd.dece.graphic":{source:"iana",extensions:["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{source:"iana",extensions:["djvu","djv"]},"image/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"image/vnd.dwg":{source:"iana",extensions:["dwg"]},"image/vnd.dxf":{source:"iana",extensions:["dxf"]},"image/vnd.fastbidsheet":{source:"iana",extensions:["fbs"]},"image/vnd.fpx":{source:"iana",extensions:["fpx"]},"image/vnd.fst":{source:"iana",extensions:["fst"]},"image/vnd.fujixerox.edmics-mmr":{source:"iana",extensions:["mmr"]},"image/vnd.fujixerox.edmics-rlc":{source:"iana",extensions:["rlc"]},"image/vnd.globalgraphics.pgb":{source:"iana"},"image/vnd.microsoft.icon":{source:"iana",compressible:!0,extensions:["ico"]},"image/vnd.mix":{source:"iana"},"image/vnd.mozilla.apng":{source:"iana"},"image/vnd.ms-dds":{compressible:!0,extensions:["dds"]},"image/vnd.ms-modi":{source:"iana",extensions:["mdi"]},"image/vnd.ms-photo":{source:"apache",extensions:["wdp"]},"image/vnd.net-fpx":{source:"iana",extensions:["npx"]},"image/vnd.pco.b16":{source:"iana",extensions:["b16"]},"image/vnd.radiance":{source:"iana"},"image/vnd.sealed.png":{source:"iana"},"image/vnd.sealedmedia.softseal.gif":{source:"iana"},"image/vnd.sealedmedia.softseal.jpg":{source:"iana"},"image/vnd.svf":{source:"iana"},"image/vnd.tencent.tap":{source:"iana",extensions:["tap"]},"image/vnd.valve.source.texture":{source:"iana",extensions:["vtf"]},"image/vnd.wap.wbmp":{source:"iana",extensions:["wbmp"]},"image/vnd.xiff":{source:"iana",extensions:["xif"]},"image/vnd.zbrush.pcx":{source:"iana",extensions:["pcx"]},"image/webp":{source:"apache",extensions:["webp"]},"image/wmf":{source:"iana",extensions:["wmf"]},"image/x-3ds":{source:"apache",extensions:["3ds"]},"image/x-cmu-raster":{source:"apache",extensions:["ras"]},"image/x-cmx":{source:"apache",extensions:["cmx"]},"image/x-freehand":{source:"apache",extensions:["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/x-jng":{source:"nginx",extensions:["jng"]},"image/x-mrsid-image":{source:"apache",extensions:["sid"]},"image/x-ms-bmp":{source:"nginx",compressible:!0,extensions:["bmp"]},"image/x-pcx":{source:"apache",extensions:["pcx"]},"image/x-pict":{source:"apache",extensions:["pic","pct"]},"image/x-portable-anymap":{source:"apache",extensions:["pnm"]},"image/x-portable-bitmap":{source:"apache",extensions:["pbm"]},"image/x-portable-graymap":{source:"apache",extensions:["pgm"]},"image/x-portable-pixmap":{source:"apache",extensions:["ppm"]},"image/x-rgb":{source:"apache",extensions:["rgb"]},"image/x-tga":{source:"apache",extensions:["tga"]},"image/x-xbitmap":{source:"apache",extensions:["xbm"]},"image/x-xcf":{compressible:!1},"image/x-xpixmap":{source:"apache",extensions:["xpm"]},"image/x-xwindowdump":{source:"apache",extensions:["xwd"]},"message/cpim":{source:"iana"},"message/delivery-status":{source:"iana"},"message/disposition-notification":{source:"iana",extensions:["disposition-notification"]},"message/external-body":{source:"iana"},"message/feedback-report":{source:"iana"},"message/global":{source:"iana",extensions:["u8msg"]},"message/global-delivery-status":{source:"iana",extensions:["u8dsn"]},"message/global-disposition-notification":{source:"iana",extensions:["u8mdn"]},"message/global-headers":{source:"iana",extensions:["u8hdr"]},"message/http":{source:"iana",compressible:!1},"message/imdn+xml":{source:"iana",compressible:!0},"message/news":{source:"iana"},"message/partial":{source:"iana",compressible:!1},"message/rfc822":{source:"iana",compressible:!0,extensions:["eml","mime"]},"message/s-http":{source:"iana"},"message/sip":{source:"iana"},"message/sipfrag":{source:"iana"},"message/tracking-status":{source:"iana"},"message/vnd.si.simp":{source:"iana"},"message/vnd.wfa.wsc":{source:"iana",extensions:["wsc"]},"model/3mf":{source:"iana",extensions:["3mf"]},"model/e57":{source:"iana"},"model/gltf+json":{source:"iana",compressible:!0,extensions:["gltf"]},"model/gltf-binary":{source:"iana",compressible:!0,extensions:["glb"]},"model/iges":{source:"iana",compressible:!1,extensions:["igs","iges"]},"model/mesh":{source:"iana",compressible:!1,extensions:["msh","mesh","silo"]},"model/mtl":{source:"iana",extensions:["mtl"]},"model/obj":{source:"iana",extensions:["obj"]},"model/step":{source:"iana"},"model/step+xml":{source:"iana",compressible:!0,extensions:["stpx"]},"model/step+zip":{source:"iana",compressible:!1,extensions:["stpz"]},"model/step-xml+zip":{source:"iana",compressible:!1,extensions:["stpxz"]},"model/stl":{source:"iana",extensions:["stl"]},"model/vnd.collada+xml":{source:"iana",compressible:!0,extensions:["dae"]},"model/vnd.dwf":{source:"iana",extensions:["dwf"]},"model/vnd.flatland.3dml":{source:"iana"},"model/vnd.gdl":{source:"iana",extensions:["gdl"]},"model/vnd.gs-gdl":{source:"apache"},"model/vnd.gs.gdl":{source:"iana"},"model/vnd.gtw":{source:"iana",extensions:["gtw"]},"model/vnd.moml+xml":{source:"iana",compressible:!0},"model/vnd.mts":{source:"iana",extensions:["mts"]},"model/vnd.opengex":{source:"iana",extensions:["ogex"]},"model/vnd.parasolid.transmit.binary":{source:"iana",extensions:["x_b"]},"model/vnd.parasolid.transmit.text":{source:"iana",extensions:["x_t"]},"model/vnd.pytha.pyox":{source:"iana"},"model/vnd.rosette.annotated-data-model":{source:"iana"},"model/vnd.sap.vds":{source:"iana",extensions:["vds"]},"model/vnd.usdz+zip":{source:"iana",compressible:!1,extensions:["usdz"]},"model/vnd.valve.source.compiled-map":{source:"iana",extensions:["bsp"]},"model/vnd.vtu":{source:"iana",extensions:["vtu"]},"model/vrml":{source:"iana",compressible:!1,extensions:["wrl","vrml"]},"model/x3d+binary":{source:"apache",compressible:!1,extensions:["x3db","x3dbz"]},"model/x3d+fastinfoset":{source:"iana",extensions:["x3db"]},"model/x3d+vrml":{source:"apache",compressible:!1,extensions:["x3dv","x3dvz"]},"model/x3d+xml":{source:"iana",compressible:!0,extensions:["x3d","x3dz"]},"model/x3d-vrml":{source:"iana",extensions:["x3dv"]},"multipart/alternative":{source:"iana",compressible:!1},"multipart/appledouble":{source:"iana"},"multipart/byteranges":{source:"iana"},"multipart/digest":{source:"iana"},"multipart/encrypted":{source:"iana",compressible:!1},"multipart/form-data":{source:"iana",compressible:!1},"multipart/header-set":{source:"iana"},"multipart/mixed":{source:"iana"},"multipart/multilingual":{source:"iana"},"multipart/parallel":{source:"iana"},"multipart/related":{source:"iana",compressible:!1},"multipart/report":{source:"iana"},"multipart/signed":{source:"iana",compressible:!1},"multipart/vnd.bint.med-plus":{source:"iana"},"multipart/voice-message":{source:"iana"},"multipart/x-mixed-replace":{source:"iana"},"text/1d-interleaved-parityfec":{source:"iana"},"text/cache-manifest":{source:"iana",compressible:!0,extensions:["appcache","manifest"]},"text/calendar":{source:"iana",extensions:["ics","ifb"]},"text/calender":{compressible:!0},"text/cmd":{compressible:!0},"text/coffeescript":{extensions:["coffee","litcoffee"]},"text/cql":{source:"iana"},"text/cql-expression":{source:"iana"},"text/cql-identifier":{source:"iana"},"text/css":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["css"]},"text/csv":{source:"iana",compressible:!0,extensions:["csv"]},"text/csv-schema":{source:"iana"},"text/directory":{source:"iana"},"text/dns":{source:"iana"},"text/ecmascript":{source:"iana"},"text/encaprtp":{source:"iana"},"text/enriched":{source:"iana"},"text/fhirpath":{source:"iana"},"text/flexfec":{source:"iana"},"text/fwdred":{source:"iana"},"text/gff3":{source:"iana"},"text/grammar-ref-list":{source:"iana"},"text/html":{source:"iana",compressible:!0,extensions:["html","htm","shtml"]},"text/jade":{extensions:["jade"]},"text/javascript":{source:"iana",compressible:!0},"text/jcr-cnd":{source:"iana"},"text/jsx":{compressible:!0,extensions:["jsx"]},"text/less":{compressible:!0,extensions:["less"]},"text/markdown":{source:"iana",compressible:!0,extensions:["markdown","md"]},"text/mathml":{source:"nginx",extensions:["mml"]},"text/mdx":{compressible:!0,extensions:["mdx"]},"text/mizar":{source:"iana"},"text/n3":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["n3"]},"text/parameters":{source:"iana",charset:"UTF-8"},"text/parityfec":{source:"iana"},"text/plain":{source:"iana",compressible:!0,extensions:["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{source:"iana",charset:"UTF-8"},"text/prs.fallenstein.rst":{source:"iana"},"text/prs.lines.tag":{source:"iana",extensions:["dsc"]},"text/prs.prop.logic":{source:"iana"},"text/raptorfec":{source:"iana"},"text/red":{source:"iana"},"text/rfc822-headers":{source:"iana"},"text/richtext":{source:"iana",compressible:!0,extensions:["rtx"]},"text/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"text/rtp-enc-aescm128":{source:"iana"},"text/rtploopback":{source:"iana"},"text/rtx":{source:"iana"},"text/sgml":{source:"iana",extensions:["sgml","sgm"]},"text/shaclc":{source:"iana"},"text/shex":{source:"iana",extensions:["shex"]},"text/slim":{extensions:["slim","slm"]},"text/spdx":{source:"iana",extensions:["spdx"]},"text/strings":{source:"iana"},"text/stylus":{extensions:["stylus","styl"]},"text/t140":{source:"iana"},"text/tab-separated-values":{source:"iana",compressible:!0,extensions:["tsv"]},"text/troff":{source:"iana",extensions:["t","tr","roff","man","me","ms"]},"text/turtle":{source:"iana",charset:"UTF-8",extensions:["ttl"]},"text/ulpfec":{source:"iana"},"text/uri-list":{source:"iana",compressible:!0,extensions:["uri","uris","urls"]},"text/vcard":{source:"iana",compressible:!0,extensions:["vcard"]},"text/vnd.a":{source:"iana"},"text/vnd.abc":{source:"iana"},"text/vnd.ascii-art":{source:"iana"},"text/vnd.curl":{source:"iana",extensions:["curl"]},"text/vnd.curl.dcurl":{source:"apache",extensions:["dcurl"]},"text/vnd.curl.mcurl":{source:"apache",extensions:["mcurl"]},"text/vnd.curl.scurl":{source:"apache",extensions:["scurl"]},"text/vnd.debian.copyright":{source:"iana",charset:"UTF-8"},"text/vnd.dmclientscript":{source:"iana"},"text/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"text/vnd.esmertec.theme-descriptor":{source:"iana",charset:"UTF-8"},"text/vnd.familysearch.gedcom":{source:"iana",extensions:["ged"]},"text/vnd.ficlab.flt":{source:"iana"},"text/vnd.fly":{source:"iana",extensions:["fly"]},"text/vnd.fmi.flexstor":{source:"iana",extensions:["flx"]},"text/vnd.gml":{source:"iana"},"text/vnd.graphviz":{source:"iana",extensions:["gv"]},"text/vnd.hans":{source:"iana"},"text/vnd.hgl":{source:"iana"},"text/vnd.in3d.3dml":{source:"iana",extensions:["3dml"]},"text/vnd.in3d.spot":{source:"iana",extensions:["spot"]},"text/vnd.iptc.newsml":{source:"iana"},"text/vnd.iptc.nitf":{source:"iana"},"text/vnd.latex-z":{source:"iana"},"text/vnd.motorola.reflex":{source:"iana"},"text/vnd.ms-mediapackage":{source:"iana"},"text/vnd.net2phone.commcenter.command":{source:"iana"},"text/vnd.radisys.msml-basic-layout":{source:"iana"},"text/vnd.senx.warpscript":{source:"iana"},"text/vnd.si.uricatalogue":{source:"iana"},"text/vnd.sosi":{source:"iana"},"text/vnd.sun.j2me.app-descriptor":{source:"iana",charset:"UTF-8",extensions:["jad"]},"text/vnd.trolltech.linguist":{source:"iana",charset:"UTF-8"},"text/vnd.wap.si":{source:"iana"},"text/vnd.wap.sl":{source:"iana"},"text/vnd.wap.wml":{source:"iana",extensions:["wml"]},"text/vnd.wap.wmlscript":{source:"iana",extensions:["wmls"]},"text/vtt":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["vtt"]},"text/x-asm":{source:"apache",extensions:["s","asm"]},"text/x-c":{source:"apache",extensions:["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{source:"nginx",extensions:["htc"]},"text/x-fortran":{source:"apache",extensions:["f","for","f77","f90"]},"text/x-gwt-rpc":{compressible:!0},"text/x-handlebars-template":{extensions:["hbs"]},"text/x-java-source":{source:"apache",extensions:["java"]},"text/x-jquery-tmpl":{compressible:!0},"text/x-lua":{extensions:["lua"]},"text/x-markdown":{compressible:!0,extensions:["mkd"]},"text/x-nfo":{source:"apache",extensions:["nfo"]},"text/x-opml":{source:"apache",extensions:["opml"]},"text/x-org":{compressible:!0,extensions:["org"]},"text/x-pascal":{source:"apache",extensions:["p","pas"]},"text/x-processing":{compressible:!0,extensions:["pde"]},"text/x-sass":{extensions:["sass"]},"text/x-scss":{extensions:["scss"]},"text/x-setext":{source:"apache",extensions:["etx"]},"text/x-sfv":{source:"apache",extensions:["sfv"]},"text/x-suse-ymp":{compressible:!0,extensions:["ymp"]},"text/x-uuencode":{source:"apache",extensions:["uu"]},"text/x-vcalendar":{source:"apache",extensions:["vcs"]},"text/x-vcard":{source:"apache",extensions:["vcf"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/xml-external-parsed-entity":{source:"iana"},"text/yaml":{compressible:!0,extensions:["yaml","yml"]},"video/1d-interleaved-parityfec":{source:"iana"},"video/3gpp":{source:"iana",extensions:["3gp","3gpp"]},"video/3gpp-tt":{source:"iana"},"video/3gpp2":{source:"iana",extensions:["3g2"]},"video/av1":{source:"iana"},"video/bmpeg":{source:"iana"},"video/bt656":{source:"iana"},"video/celb":{source:"iana"},"video/dv":{source:"iana"},"video/encaprtp":{source:"iana"},"video/ffv1":{source:"iana"},"video/flexfec":{source:"iana"},"video/h261":{source:"iana",extensions:["h261"]},"video/h263":{source:"iana",extensions:["h263"]},"video/h263-1998":{source:"iana"},"video/h263-2000":{source:"iana"},"video/h264":{source:"iana",extensions:["h264"]},"video/h264-rcdo":{source:"iana"},"video/h264-svc":{source:"iana"},"video/h265":{source:"iana"},"video/iso.segment":{source:"iana",extensions:["m4s"]},"video/jpeg":{source:"iana",extensions:["jpgv"]},"video/jpeg2000":{source:"iana"},"video/jpm":{source:"apache",extensions:["jpm","jpgm"]},"video/jxsv":{source:"iana"},"video/mj2":{source:"iana",extensions:["mj2","mjp2"]},"video/mp1s":{source:"iana"},"video/mp2p":{source:"iana"},"video/mp2t":{source:"iana",extensions:["ts"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","mp4v","mpg4"]},"video/mp4v-es":{source:"iana"},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{source:"iana"},"video/mpv":{source:"iana"},"video/nv":{source:"iana"},"video/ogg":{source:"iana",compressible:!1,extensions:["ogv"]},"video/parityfec":{source:"iana"},"video/pointer":{source:"iana"},"video/quicktime":{source:"iana",compressible:!1,extensions:["qt","mov"]},"video/raptorfec":{source:"iana"},"video/raw":{source:"iana"},"video/rtp-enc-aescm128":{source:"iana"},"video/rtploopback":{source:"iana"},"video/rtx":{source:"iana"},"video/scip":{source:"iana"},"video/smpte291":{source:"iana"},"video/smpte292m":{source:"iana"},"video/ulpfec":{source:"iana"},"video/vc1":{source:"iana"},"video/vc2":{source:"iana"},"video/vnd.cctv":{source:"iana"},"video/vnd.dece.hd":{source:"iana",extensions:["uvh","uvvh"]},"video/vnd.dece.mobile":{source:"iana",extensions:["uvm","uvvm"]},"video/vnd.dece.mp4":{source:"iana"},"video/vnd.dece.pd":{source:"iana",extensions:["uvp","uvvp"]},"video/vnd.dece.sd":{source:"iana",extensions:["uvs","uvvs"]},"video/vnd.dece.video":{source:"iana",extensions:["uvv","uvvv"]},"video/vnd.directv.mpeg":{source:"iana"},"video/vnd.directv.mpeg-tts":{source:"iana"},"video/vnd.dlna.mpeg-tts":{source:"iana"},"video/vnd.dvb.file":{source:"iana",extensions:["dvb"]},"video/vnd.fvt":{source:"iana",extensions:["fvt"]},"video/vnd.hns.video":{source:"iana"},"video/vnd.iptvforum.1dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.1dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.2dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.2dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.ttsavc":{source:"iana"},"video/vnd.iptvforum.ttsmpeg2":{source:"iana"},"video/vnd.motorola.video":{source:"iana"},"video/vnd.motorola.videop":{source:"iana"},"video/vnd.mpegurl":{source:"iana",extensions:["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{source:"iana",extensions:["pyv"]},"video/vnd.nokia.interleaved-multimedia":{source:"iana"},"video/vnd.nokia.mp4vr":{source:"iana"},"video/vnd.nokia.videovoip":{source:"iana"},"video/vnd.objectvideo":{source:"iana"},"video/vnd.radgamettools.bink":{source:"iana"},"video/vnd.radgamettools.smacker":{source:"iana"},"video/vnd.sealed.mpeg1":{source:"iana"},"video/vnd.sealed.mpeg4":{source:"iana"},"video/vnd.sealed.swf":{source:"iana"},"video/vnd.sealedmedia.softseal.mov":{source:"iana"},"video/vnd.uvvu.mp4":{source:"iana",extensions:["uvu","uvvu"]},"video/vnd.vivo":{source:"iana",extensions:["viv"]},"video/vnd.youtube.yt":{source:"iana"},"video/vp8":{source:"iana"},"video/vp9":{source:"iana"},"video/webm":{source:"apache",compressible:!1,extensions:["webm"]},"video/x-f4v":{source:"apache",extensions:["f4v"]},"video/x-fli":{source:"apache",extensions:["fli"]},"video/x-flv":{source:"apache",compressible:!1,extensions:["flv"]},"video/x-m4v":{source:"apache",extensions:["m4v"]},"video/x-matroska":{source:"apache",compressible:!1,extensions:["mkv","mk3d","mks"]},"video/x-mng":{source:"apache",extensions:["mng"]},"video/x-ms-asf":{source:"apache",extensions:["asf","asx"]},"video/x-ms-vob":{source:"apache",extensions:["vob"]},"video/x-ms-wm":{source:"apache",extensions:["wm"]},"video/x-ms-wmv":{source:"apache",compressible:!1,extensions:["wmv"]},"video/x-ms-wmx":{source:"apache",extensions:["wmx"]},"video/x-ms-wvx":{source:"apache",extensions:["wvx"]},"video/x-msvideo":{source:"apache",extensions:["avi"]},"video/x-sgi-movie":{source:"apache",extensions:["movie"]},"video/x-smv":{source:"apache",extensions:["smv"]},"x-conference/x-cooltalk":{source:"apache",extensions:["ice"]},"x-shader/x-fragment":{compressible:!0},"x-shader/x-vertex":{compressible:!0}};/*!
|
|
2
|
-
* mime-db
|
|
3
|
-
|
|
4
|
-
* Copyright(c) 2015-2022 Douglas Christopher Wilson
|
|
5
|
-
*
|
|
6
|
-
*/var sh=ih;/*!
|
|
7
|
-
* mime-types
|
|
8
|
-
* Copyright(c) 2014 Jonathan Ong
|
|
9
|
-
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
10
|
-
* MIT Licensed
|
|
11
|
-
*/(function(e){var t=sh,a=Sc.extname,r=/^\s*([^;\s]*)(?:;|\s|$)/,n=/^text\//i;e.charset=s,e.charsets={lookup:s},e.contentType=i,e.extension=o,e.extensions=Object.create(null),e.lookup=c,e.types=Object.create(null),l(e.extensions,e.types);function s(u){if(!u||typeof u!="string")return!1;var p=r.exec(u),d=p&&t[p[1].toLowerCase()];return d&&d.charset?d.charset:p&&n.test(p[1])?"UTF-8":!1}function i(u){if(!u||typeof u!="string")return!1;var p=u.indexOf("/")===-1?e.lookup(u):u;if(!p)return!1;if(p.indexOf("charset")===-1){var d=e.charset(p);d&&(p+="; charset="+d.toLowerCase())}return p}function o(u){if(!u||typeof u!="string")return!1;var p=r.exec(u),d=p&&e.extensions[p[1].toLowerCase()];return!d||!d.length?!1:d[0]}function c(u){if(!u||typeof u!="string")return!1;var p=a("x."+u).toLowerCase().substr(1);return p&&e.types[p]||!1}function l(u,p){var d=["nginx","apache",void 0,"iana"];Object.keys(t).forEach(function(m){var y=t[m],b=y.extensions;if(!(!b||!b.length)){u[m]=b;for(var C=0;C<b.length;C++){var B=b[C];if(p[B]){var _=d.indexOf(t[p[B]].source),k=d.indexOf(y.source);if(p[B]!=="application/octet-stream"&&(_>k||_===k&&p[B].substr(0,12)==="application/"))continue}p[B]=m}}})}})(Fp);var oh=ch;function ch(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(e):setTimeout(e,0)}var Mp=oh,Vp=lh;function lh(e){var t=!1;return Mp(function(){t=!0}),function(r,n){t?e(r,n):Mp(function(){e(r,n)})}}var qp=uh;function uh(e){Object.keys(e.jobs).forEach(ph.bind(e)),e.jobs={}}function ph(e){typeof this.jobs[e]=="function"&&this.jobs[e]()}var jp=Vp,dh=qp,Kp=fh;function fh(e,t,a,r){var n=a.keyedList?a.keyedList[a.index]:a.index;a.jobs[n]=mh(t,n,e[n],function(s,i){n in a.jobs&&(delete a.jobs[n],s?dh(a):a.results[n]=i,r(s,a.results))})}function mh(e,t,a,r){var n;return e.length==2?n=e(a,jp(r)):n=e(a,t,jp(r)),n}var zp=hh;function hh(e,t){var a=!Array.isArray(e),r={index:0,keyedList:a||t?Object.keys(e):null,jobs:{},results:a?{}:[],size:a?Object.keys(e).length:e.length};return t&&r.keyedList.sort(a?t:function(n,s){return t(e[n],e[s])}),r}var vh=qp,gh=Vp,Hp=xh;function xh(e){Object.keys(this.jobs).length&&(this.index=this.size,vh(this),gh(e)(null,this.results))}var yh=Kp,bh=zp,Eh=Hp,Ch=Sh;function Sh(e,t,a){for(var r=bh(e);r.index<(r.keyedList||e).length;)yh(e,t,r,function(n,s){if(n){a(n,s);return}if(Object.keys(r.jobs).length===0){a(null,r.results);return}}),r.index++;return Eh.bind(r,a)}var _c={exports:{}},$p=Kp,Th=zp,wh=Hp;_c.exports=Ah,_c.exports.ascending=Gp,_c.exports.descending=Ih;function Ah(e,t,a,r){var n=Th(e,a);return $p(e,t,n,function s(i,o){if(i){r(i,o);return}if(n.index++,n.index<(n.keyedList||e).length){$p(e,t,n,s);return}r(null,n.results)}),wh.bind(n,r)}function Gp(e,t){return e<t?-1:e>t?1:0}function Ih(e,t){return-1*Gp(e,t)}var Qp=_c.exports,Bh=Qp,_h=Rh;function Rh(e,t,a){return Bh(e,t,null,a)}var kh={parallel:Ch,serial:_h,serialOrdered:Qp},Wp=Object,Nh=Error,Lh=EvalError,Uh=RangeError,Ph=ReferenceError,Dh=SyntaxError,Bl,Xp;function _l(){return Xp||(Xp=1,Bl=TypeError),Bl}var Oh=URIError,Fh=Math.abs,Mh=Math.floor,Vh=Math.max,qh=Math.min,jh=Math.pow,Kh=Math.round,zh=Number.isNaN||function(t){return t!==t},Hh=zh,$h=function(t){return Hh(t)||t===0?t:t<0?-1:1},Gh=Object.getOwnPropertyDescriptor,Rc=Gh;if(Rc)try{Rc([],"length")}catch{Rc=null}var Yp=Rc,kc=Object.defineProperty||!1;if(kc)try{kc({},"a",{value:1})}catch{kc=!1}var Qh=kc,Rl,Jp;function Zp(){return Jp||(Jp=1,Rl=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},a=Symbol("test"),r=Object(a);if(typeof a=="string"||Object.prototype.toString.call(a)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var n=42;t[a]=n;for(var s in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var i=Object.getOwnPropertySymbols(t);if(i.length!==1||i[0]!==a||!Object.prototype.propertyIsEnumerable.call(t,a))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(t,a);if(o.value!==n||o.enumerable!==!0)return!1}return!0}),Rl}var kl,ed;function Wh(){if(ed)return kl;ed=1;var e=typeof Symbol<"u"&&Symbol,t=Zp();return kl=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},kl}var Nl,td;function rd(){return td||(td=1,Nl=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),Nl}var Ll,ad;function nd(){if(ad)return Ll;ad=1;var e=Wp;return Ll=e.getPrototypeOf||null,Ll}var Xh="Function.prototype.bind called on incompatible ",Yh=Object.prototype.toString,Jh=Math.max,Zh="[object Function]",id=function(t,a){for(var r=[],n=0;n<t.length;n+=1)r[n]=t[n];for(var s=0;s<a.length;s+=1)r[s+t.length]=a[s];return r},ev=function(t,a){for(var r=[],n=a||0,s=0;n<t.length;n+=1,s+=1)r[s]=t[n];return r},tv=function(e,t){for(var a="",r=0;r<e.length;r+=1)a+=e[r],r+1<e.length&&(a+=t);return a},rv=function(t){var a=this;if(typeof a!="function"||Yh.apply(a)!==Zh)throw new TypeError(Xh+a);for(var r=ev(arguments,1),n,s=function(){if(this instanceof n){var u=a.apply(this,id(r,arguments));return Object(u)===u?u:this}return a.apply(t,id(r,arguments))},i=Jh(0,a.length-r.length),o=[],c=0;c<i;c++)o[c]="$"+c;if(n=Function("binder","return function ("+tv(o,",")+"){ return binder.apply(this,arguments); }")(s),a.prototype){var l=function(){};l.prototype=a.prototype,n.prototype=new l,l.prototype=null}return n},av=rv,Nc=Function.prototype.bind||av,Ul,sd;function Pl(){return sd||(sd=1,Ul=Function.prototype.call),Ul}var Dl,od;function cd(){return od||(od=1,Dl=Function.prototype.apply),Dl}var Ol,ld;function nv(){return ld||(ld=1,Ol=typeof Reflect<"u"&&Reflect&&Reflect.apply),Ol}var Fl,ud;function iv(){if(ud)return Fl;ud=1;var e=Nc,t=cd(),a=Pl(),r=nv();return Fl=r||e.call(a,t),Fl}var Ml,pd;function sv(){if(pd)return Ml;pd=1;var e=Nc,t=_l(),a=Pl(),r=iv();return Ml=function(s){if(s.length<1||typeof s[0]!="function")throw new t("a function is required");return r(e,a,s)},Ml}var Vl,dd;function ov(){if(dd)return Vl;dd=1;var e=sv(),t=Yp,a;try{a=[].__proto__===Array.prototype}catch(i){if(!i||typeof i!="object"||!("code"in i)||i.code!=="ERR_PROTO_ACCESS")throw i}var r=!!a&&t&&t(Object.prototype,"__proto__"),n=Object,s=n.getPrototypeOf;return Vl=r&&typeof r.get=="function"?e([r.get]):typeof s=="function"?function(o){return s(o==null?o:n(o))}:!1,Vl}var ql,fd;function cv(){if(fd)return ql;fd=1;var e=rd(),t=nd(),a=ov();return ql=e?function(n){return e(n)}:t?function(n){if(!n||typeof n!="object"&&typeof n!="function")throw new TypeError("getProto: not an object");return t(n)}:a?function(n){return a(n)}:null,ql}var lv=Function.prototype.call,uv=Object.prototype.hasOwnProperty,pv=Nc,jl=pv.call(lv,uv),oe,dv=Wp,fv=Nh,mv=Lh,hv=Uh,vv=Ph,Dr=Dh,Or=_l(),gv=Oh,xv=Fh,yv=Mh,bv=Vh,Ev=qh,Cv=jh,Sv=Kh,Tv=$h,md=Function,Kl=function(e){try{return md('"use strict"; return ('+e+").constructor;")()}catch{}},ia=Yp,wv=Qh,zl=function(){throw new Or},Av=ia?(function(){try{return arguments.callee,zl}catch{try{return ia(arguments,"callee").get}catch{return zl}}})():zl,Fr=Wh()(),He=cv(),Iv=nd(),Bv=rd(),hd=cd(),sa=Pl(),Mr={},_v=typeof Uint8Array>"u"||!He?oe:He(Uint8Array),gr={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?oe:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?oe:ArrayBuffer,"%ArrayIteratorPrototype%":Fr&&He?He([][Symbol.iterator]()):oe,"%AsyncFromSyncIteratorPrototype%":oe,"%AsyncFunction%":Mr,"%AsyncGenerator%":Mr,"%AsyncGeneratorFunction%":Mr,"%AsyncIteratorPrototype%":Mr,"%Atomics%":typeof Atomics>"u"?oe:Atomics,"%BigInt%":typeof BigInt>"u"?oe:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?oe:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?oe:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?oe:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":fv,"%eval%":eval,"%EvalError%":mv,"%Float16Array%":typeof Float16Array>"u"?oe:Float16Array,"%Float32Array%":typeof Float32Array>"u"?oe:Float32Array,"%Float64Array%":typeof Float64Array>"u"?oe:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?oe:FinalizationRegistry,"%Function%":md,"%GeneratorFunction%":Mr,"%Int8Array%":typeof Int8Array>"u"?oe:Int8Array,"%Int16Array%":typeof Int16Array>"u"?oe:Int16Array,"%Int32Array%":typeof Int32Array>"u"?oe:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Fr&&He?He(He([][Symbol.iterator]())):oe,"%JSON%":typeof JSON=="object"?JSON:oe,"%Map%":typeof Map>"u"?oe:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Fr||!He?oe:He(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":dv,"%Object.getOwnPropertyDescriptor%":ia,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?oe:Promise,"%Proxy%":typeof Proxy>"u"?oe:Proxy,"%RangeError%":hv,"%ReferenceError%":vv,"%Reflect%":typeof Reflect>"u"?oe:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?oe:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Fr||!He?oe:He(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?oe:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Fr&&He?He(""[Symbol.iterator]()):oe,"%Symbol%":Fr?Symbol:oe,"%SyntaxError%":Dr,"%ThrowTypeError%":Av,"%TypedArray%":_v,"%TypeError%":Or,"%Uint8Array%":typeof Uint8Array>"u"?oe:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?oe:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?oe:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?oe:Uint32Array,"%URIError%":gv,"%WeakMap%":typeof WeakMap>"u"?oe:WeakMap,"%WeakRef%":typeof WeakRef>"u"?oe:WeakRef,"%WeakSet%":typeof WeakSet>"u"?oe:WeakSet,"%Function.prototype.call%":sa,"%Function.prototype.apply%":hd,"%Object.defineProperty%":wv,"%Object.getPrototypeOf%":Iv,"%Math.abs%":xv,"%Math.floor%":yv,"%Math.max%":bv,"%Math.min%":Ev,"%Math.pow%":Cv,"%Math.round%":Sv,"%Math.sign%":Tv,"%Reflect.getPrototypeOf%":Bv};if(He)try{null.error}catch(e){var Rv=He(He(e));gr["%Error.prototype%"]=Rv}var kv=function e(t){var a;if(t==="%AsyncFunction%")a=Kl("async function () {}");else if(t==="%GeneratorFunction%")a=Kl("function* () {}");else if(t==="%AsyncGeneratorFunction%")a=Kl("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(a=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var n=e("%AsyncGenerator%");n&&He&&(a=He(n.prototype))}return gr[t]=a,a},vd={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},oa=Nc,Lc=jl,Nv=oa.call(sa,Array.prototype.concat),Lv=oa.call(hd,Array.prototype.splice),gd=oa.call(sa,String.prototype.replace),Uc=oa.call(sa,String.prototype.slice),Uv=oa.call(sa,RegExp.prototype.exec),Pv=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Dv=/\\(\\)?/g,Ov=function(t){var a=Uc(t,0,1),r=Uc(t,-1);if(a==="%"&&r!=="%")throw new Dr("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&a!=="%")throw new Dr("invalid intrinsic syntax, expected opening `%`");var n=[];return gd(t,Pv,function(s,i,o,c){n[n.length]=o?gd(c,Dv,"$1"):i||s}),n},Fv=function(t,a){var r=t,n;if(Lc(vd,r)&&(n=vd[r],r="%"+n[0]+"%"),Lc(gr,r)){var s=gr[r];if(s===Mr&&(s=kv(r)),typeof s>"u"&&!a)throw new Or("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:s}}throw new Dr("intrinsic "+t+" does not exist!")},Mv=function(t,a){if(typeof t!="string"||t.length===0)throw new Or("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof a!="boolean")throw new Or('"allowMissing" argument must be a boolean');if(Uv(/^%?[^%]*%?$/,t)===null)throw new Dr("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=Ov(t),n=r.length>0?r[0]:"",s=Fv("%"+n+"%",a),i=s.name,o=s.value,c=!1,l=s.alias;l&&(n=l[0],Lv(r,Nv([0,1],l)));for(var u=1,p=!0;u<r.length;u+=1){var d=r[u],x=Uc(d,0,1),m=Uc(d,-1);if((x==='"'||x==="'"||x==="`"||m==='"'||m==="'"||m==="`")&&x!==m)throw new Dr("property names with quotes must have matching quotes");if((d==="constructor"||!p)&&(c=!0),n+="."+d,i="%"+n+"%",Lc(gr,i))o=gr[i];else if(o!=null){if(!(d in o)){if(!a)throw new Or("base intrinsic for "+t+" exists, but the property is not available.");return}if(ia&&u+1>=r.length){var y=ia(o,d);p=!!y,p&&"get"in y&&!("originalValue"in y.get)?o=y.get:o=o[d]}else p=Lc(o,d),o=o[d];p&&!c&&(gr[i]=o)}}return o},Hl,xd;function Vv(){if(xd)return Hl;xd=1;var e=Zp();return Hl=function(){return e()&&!!Symbol.toStringTag},Hl}var qv=Mv,yd=qv("%Object.defineProperty%",!0),jv=Vv()(),Kv=jl,zv=_l(),Pc=jv?Symbol.toStringTag:null,Hv=function(t,a){var r=arguments.length>2&&!!arguments[2]&&arguments[2].force,n=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(typeof r<"u"&&typeof r!="boolean"||typeof n<"u"&&typeof n!="boolean")throw new zv("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");Pc&&(r||!Kv(t,Pc))&&(yd?yd(t,Pc,{configurable:!n,enumerable:!1,value:a,writable:!1}):t[Pc]=a)},$v=function(e,t){return Object.keys(t).forEach(function(a){e[a]=e[a]||t[a]}),e},$l=nh,Gv=hr,Gl=Sc,Qv=Tl,Wv=wl,Xv=Al.parse,Yv=cm,Jv=ze.Stream,Zv=Lr,Ql=Fp,eg=kh,tg=Hv,rr=jl,Wl=$v;function he(e){if(!(this instanceof he))return new he(e);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],$l.call(this),e=e||{};for(var t in e)this[t]=e[t]}Gv.inherits(he,$l),he.LINE_BREAK=`\r
|
|
12
|
-
`,he.DEFAULT_CONTENT_TYPE="application/octet-stream",he.prototype.append=function(e,t,a){a=a||{},typeof a=="string"&&(a={filename:a});var r=$l.prototype.append.bind(this);if((typeof t=="number"||t==null)&&(t=String(t)),Array.isArray(t)){this._error(new Error("Arrays are not supported."));return}var n=this._multiPartHeader(e,t,a),s=this._multiPartFooter();r(n),r(t),r(s),this._trackLength(n,t,a)},he.prototype._trackLength=function(e,t,a){var r=0;a.knownLength!=null?r+=Number(a.knownLength):Buffer.isBuffer(t)?r=t.length:typeof t=="string"&&(r=Buffer.byteLength(t)),this._valueLength+=r,this._overheadLength+=Buffer.byteLength(e)+he.LINE_BREAK.length,!(!t||!t.path&&!(t.readable&&rr(t,"httpVersion"))&&!(t instanceof Jv))&&(a.knownLength||this._valuesToMeasure.push(t))},he.prototype._lengthRetriever=function(e,t){rr(e,"fd")?e.end!=null&&e.end!=1/0&&e.start!=null?t(null,e.end+1-(e.start?e.start:0)):Yv.stat(e.path,function(a,r){if(a){t(a);return}var n=r.size-(e.start?e.start:0);t(null,n)}):rr(e,"httpVersion")?t(null,Number(e.headers["content-length"])):rr(e,"httpModule")?(e.on("response",function(a){e.pause(),t(null,Number(a.headers["content-length"]))}),e.resume()):t("Unknown stream")},he.prototype._multiPartHeader=function(e,t,a){if(typeof a.header=="string")return a.header;var r=this._getContentDisposition(t,a),n=this._getContentType(t,a),s="",i={"Content-Disposition":["form-data",'name="'+e+'"'].concat(r||[]),"Content-Type":[].concat(n||[])};typeof a.header=="object"&&Wl(i,a.header);var o;for(var c in i)if(rr(i,c)){if(o=i[c],o==null)continue;Array.isArray(o)||(o=[o]),o.length&&(s+=c+": "+o.join("; ")+he.LINE_BREAK)}return"--"+this.getBoundary()+he.LINE_BREAK+s+he.LINE_BREAK},he.prototype._getContentDisposition=function(e,t){var a;if(typeof t.filepath=="string"?a=Gl.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e&&(e.name||e.path)?a=Gl.basename(t.filename||e&&(e.name||e.path)):e&&e.readable&&rr(e,"httpVersion")&&(a=Gl.basename(e.client._httpMessage.path||"")),a)return'filename="'+a+'"'},he.prototype._getContentType=function(e,t){var a=t.contentType;return!a&&e&&e.name&&(a=Ql.lookup(e.name)),!a&&e&&e.path&&(a=Ql.lookup(e.path)),!a&&e&&e.readable&&rr(e,"httpVersion")&&(a=e.headers["content-type"]),!a&&(t.filepath||t.filename)&&(a=Ql.lookup(t.filepath||t.filename)),!a&&e&&typeof e=="object"&&(a=he.DEFAULT_CONTENT_TYPE),a},he.prototype._multiPartFooter=function(){return function(e){var t=he.LINE_BREAK,a=this._streams.length===0;a&&(t+=this._lastBoundary()),e(t)}.bind(this)},he.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+he.LINE_BREAK},he.prototype.getHeaders=function(e){var t,a={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e)rr(e,t)&&(a[t.toLowerCase()]=e[t]);return a},he.prototype.setBoundary=function(e){if(typeof e!="string")throw new TypeError("FormData boundary must be a string");this._boundary=e},he.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary},he.prototype.getBuffer=function(){for(var e=new Buffer.alloc(0),t=this.getBoundary(),a=0,r=this._streams.length;a<r;a++)typeof this._streams[a]!="function"&&(Buffer.isBuffer(this._streams[a])?e=Buffer.concat([e,this._streams[a]]):e=Buffer.concat([e,Buffer.from(this._streams[a])]),(typeof this._streams[a]!="string"||this._streams[a].substring(2,t.length+2)!==t)&&(e=Buffer.concat([e,Buffer.from(he.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])},he.prototype._generateBoundary=function(){this._boundary="--------------------------"+Zv.randomBytes(12).toString("hex")},he.prototype.getLengthSync=function(){var e=this._overheadLength+this._valueLength;return this._streams.length&&(e+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),e},he.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e},he.prototype.getLength=function(e){var t=this._overheadLength+this._valueLength;if(this._streams.length&&(t+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(e.bind(this,null,t));return}eg.parallel(this._valuesToMeasure,this._lengthRetriever,function(a,r){if(a){e(a);return}r.forEach(function(n){t+=n}),e(null,t)})},he.prototype.submit=function(e,t){var a,r,n={method:"post"};return typeof e=="string"?(e=Xv(e),r=Wl({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},n)):(r=Wl(e,n),r.port||(r.port=r.protocol==="https:"?443:80)),r.headers=this.getHeaders(e.headers),r.protocol==="https:"?a=Wv.request(r):a=Qv.request(r),this.getLength(function(s,i){if(s&&s!=="Unknown stream"){this._error(s);return}if(i&&a.setHeader("Content-Length",i),this.pipe(a),t){var o,c=function(l,u){return a.removeListener("error",c),a.removeListener("response",o),t.call(this,l,u)};o=c.bind(this,null),a.on("error",c),a.on("response",o)}}.bind(this)),a},he.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))},he.prototype.toString=function(){return"[object FormData]"},tg(he.prototype,"FormData");var rg=he,bd=Up(rg);function Xl(e){return A.isPlainObject(e)||A.isArray(e)}function Ed(e){return A.endsWith(e,"[]")?e.slice(0,-2):e}function Yl(e,t,a){return e?e.concat(t).map(function(n,s){return n=Ed(n),!a&&s?"["+n+"]":n}).join(a?".":""):t}function ag(e){return A.isArray(e)&&!e.some(Xl)}const ng=A.toFlatObject(A,{},null,function(t){return/^is[A-Z]/.test(t)});function Dc(e,t,a){if(!A.isObject(e))throw new TypeError("target must be an object");t=t||new(bd||FormData),a=A.toFlatObject(a,{metaTokens:!0,dots:!1,indexes:!1},!1,function(b,C){return!A.isUndefined(C[b])});const r=a.metaTokens,n=a.visitor||p,s=a.dots,i=a.indexes,o=a.Blob||typeof Blob<"u"&&Blob,c=a.maxDepth===void 0?100:a.maxDepth,l=o&&A.isSpecCompliantForm(t);if(!A.isFunction(n))throw new TypeError("visitor must be a function");function u(y){if(y===null)return"";if(A.isDate(y))return y.toISOString();if(A.isBoolean(y))return y.toString();if(!l&&A.isBlob(y))throw new O("Blob is not supported. Use a Buffer instead.");return A.isArrayBuffer(y)||A.isTypedArray(y)?l&&typeof Blob=="function"?new Blob([y]):Buffer.from(y):y}function p(y,b,C){let B=y;if(A.isReactNative(t)&&A.isReactNativeBlob(y))return t.append(Yl(C,b,s),u(y)),!1;if(y&&!C&&typeof y=="object"){if(A.endsWith(b,"{}"))b=r?b:b.slice(0,-2),y=JSON.stringify(y);else if(A.isArray(y)&&ag(y)||(A.isFileList(y)||A.endsWith(b,"[]"))&&(B=A.toArray(y)))return b=Ed(b),B.forEach(function(k,N){!(A.isUndefined(k)||k===null)&&t.append(i===!0?Yl([b],N,s):i===null?b:b+"[]",u(k))}),!1}return Xl(y)?!0:(t.append(Yl(C,b,s),u(y)),!1)}const d=[],x=Object.assign(ng,{defaultVisitor:p,convertValue:u,isVisitable:Xl});function m(y,b,C=0){if(!A.isUndefined(y)){if(C>c)throw new O("Object is too deeply nested ("+C+" levels). Max depth: "+c,O.ERR_FORM_DATA_DEPTH_EXCEEDED);if(d.indexOf(y)!==-1)throw Error("Circular reference detected in "+b.join("."));d.push(y),A.forEach(y,function(_,k){(!(A.isUndefined(_)||_===null)&&n.call(t,_,A.isString(k)?k.trim():k,b,x))===!0&&m(_,b?b.concat(k):[k],C+1)}),d.pop()}}if(!A.isObject(e))throw new TypeError("data must be an object");return m(e),t}function Cd(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function Sd(e,t){this._pairs=[],e&&Dc(e,this,t)}const Td=Sd.prototype;Td.append=function(t,a){this._pairs.push([t,a])},Td.toString=function(t){const a=t?function(r){return t.call(this,r,Cd)}:Cd;return this._pairs.map(function(n){return a(n[0])+"="+a(n[1])},"").join("&")};function ig(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Jl(e,t,a){if(!t)return e;const r=a&&a.encode||ig,n=A.isFunction(a)?{serialize:a}:a,s=n&&n.serialize;let i;if(s?i=s(t,n):i=A.isURLSearchParams(t)?t.toString():new Sd(t,n).toString(r),i){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class wd{constructor(){this.handlers=[]}use(t,a,r){return this.handlers.push({fulfilled:t,rejected:a,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){A.forEach(this.handlers,function(r){r!==null&&t(r)})}}var Oc={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},sg=Al.URLSearchParams;const Zl="abcdefghijklmnopqrstuvwxyz",Ad="0123456789",Id={DIGIT:Ad,ALPHA:Zl,ALPHA_DIGIT:Zl+Zl.toUpperCase()+Ad},og=(e=16,t=Id.ALPHA_DIGIT)=>{let a="";const{length:r}=t,n=new Uint32Array(e);Lr.randomFillSync(n);for(let s=0;s<e;s++)a+=t[n[s]%r];return a};var cg={isNode:!0,classes:{URLSearchParams:sg,FormData:bd,Blob:typeof Blob<"u"&&Blob||null},ALPHABET:Id,generateString:og,protocols:["http","https","file","data"]};const eu=typeof window<"u"&&typeof document<"u",tu=typeof navigator=="object"&&navigator||void 0,lg=eu&&(!tu||["ReactNative","NativeScript","NS"].indexOf(tu.product)<0),ug=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",pg=eu&&window.location.href||"http://localhost";var dg=Object.freeze({__proto__:null,hasBrowserEnv:eu,hasStandardBrowserEnv:lg,hasStandardBrowserWebWorkerEnv:ug,navigator:tu,origin:pg}),Fe={...dg,...cg};function fg(e,t){return Dc(e,new Fe.classes.URLSearchParams,{visitor:function(a,r,n,s){return Fe.isNode&&A.isBuffer(a)?(this.append(r,a.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...t})}function mg(e){return A.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function hg(e){const t={},a=Object.keys(e);let r;const n=a.length;let s;for(r=0;r<n;r++)s=a[r],t[s]=e[s];return t}function Bd(e){function t(a,r,n,s){let i=a[s++];if(i==="__proto__")return!0;const o=Number.isFinite(+i),c=s>=a.length;return i=!i&&A.isArray(n)?n.length:i,c?(A.hasOwnProp(n,i)?n[i]=A.isArray(n[i])?n[i].concat(r):[n[i],r]:n[i]=r,!o):((!n[i]||!A.isObject(n[i]))&&(n[i]=[]),t(a,r,n[i],s)&&A.isArray(n[i])&&(n[i]=hg(n[i])),!o)}if(A.isFormData(e)&&A.isFunction(e.entries)){const a={};return A.forEachEntry(e,(r,n)=>{t(mg(r),n,a,0)}),a}return null}const Vr=(e,t)=>e!=null&&A.hasOwnProp(e,t)?e[t]:void 0;function vg(e,t,a){if(A.isString(e))try{return(t||JSON.parse)(e),A.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(a||JSON.stringify)(e)}const ca={transitional:Oc,adapter:["xhr","http","fetch"],transformRequest:[function(t,a){const r=a.getContentType()||"",n=r.indexOf("application/json")>-1,s=A.isObject(t);if(s&&A.isHTMLForm(t)&&(t=new FormData(t)),A.isFormData(t))return n?JSON.stringify(Bd(t)):t;if(A.isArrayBuffer(t)||A.isBuffer(t)||A.isStream(t)||A.isFile(t)||A.isBlob(t)||A.isReadableStream(t))return t;if(A.isArrayBufferView(t))return t.buffer;if(A.isURLSearchParams(t))return a.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(s){const c=Vr(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return fg(t,c).toString();if((o=A.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=Vr(this,"env"),u=l&&l.FormData;return Dc(o?{"files[]":t}:t,u&&new u,c)}}return s||n?(a.setContentType("application/json",!1),vg(t)):t}],transformResponse:[function(t){const a=Vr(this,"transitional")||ca.transitional,r=a&&a.forcedJSONParsing,n=Vr(this,"responseType"),s=n==="json";if(A.isResponse(t)||A.isReadableStream(t))return t;if(t&&A.isString(t)&&(r&&!n||s)){const o=!(a&&a.silentJSONParsing)&&s;try{return JSON.parse(t,Vr(this,"parseReviver"))}catch(c){if(o)throw c.name==="SyntaxError"?O.from(c,O.ERR_BAD_RESPONSE,this,null,Vr(this,"response")):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Fe.classes.FormData,Blob:Fe.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};A.forEach(["delete","get","head","post","put","patch"],e=>{ca.headers[e]={}});const gg=A.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);var xg=e=>{const t={};let a,r,n;return e&&e.split(`
|
|
13
|
-
`).forEach(function(i){n=i.indexOf(":"),a=i.substring(0,n).trim().toLowerCase(),r=i.substring(n+1).trim(),!(!a||t[a]&&gg[a])&&(a==="set-cookie"?t[a]?t[a].push(r):t[a]=[r]:t[a]=t[a]?t[a]+", "+r:r)}),t};const _d=Symbol("internals"),yg=/[^\x09\x20-\x7E\x80-\xFF]/g;function bg(e){let t=0,a=e.length;for(;t<a;){const r=e.charCodeAt(t);if(r!==9&&r!==32)break;t+=1}for(;a>t;){const r=e.charCodeAt(a-1);if(r!==9&&r!==32)break;a-=1}return t===0&&a===e.length?e:e.slice(t,a)}function la(e){return e&&String(e).trim().toLowerCase()}function Eg(e){return bg(e.replace(yg,""))}function Fc(e){return e===!1||e==null?e:A.isArray(e)?e.map(Fc):Eg(String(e))}function Cg(e){const t=Object.create(null),a=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=a.exec(e);)t[r[1]]=r[2];return t}const Sg=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function ru(e,t,a,r,n){if(A.isFunction(r))return r.call(this,t,a);if(n&&(t=a),!!A.isString(t)){if(A.isString(r))return t.indexOf(r)!==-1;if(A.isRegExp(r))return r.test(t)}}function Tg(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,a,r)=>a.toUpperCase()+r)}function wg(e,t){const a=A.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+a,{value:function(n,s,i){return this[r].call(this,t,n,s,i)},configurable:!0})})}let Xe=class{constructor(t){t&&this.set(t)}set(t,a,r){const n=this;function s(o,c,l){const u=la(c);if(!u)throw new Error("header name must be a non-empty string");const p=A.findKey(n,u);(!p||n[p]===void 0||l===!0||l===void 0&&n[p]!==!1)&&(n[p||c]=Fc(o))}const i=(o,c)=>A.forEach(o,(l,u)=>s(l,u,c));if(A.isPlainObject(t)||t instanceof this.constructor)i(t,a);else if(A.isString(t)&&(t=t.trim())&&!Sg(t))i(xg(t),a);else if(A.isObject(t)&&A.isIterable(t)){let o={},c,l;for(const u of t){if(!A.isArray(u))throw TypeError("Object iterator must return a key-value pair");o[l=u[0]]=(c=o[l])?A.isArray(c)?[...c,u[1]]:[c,u[1]]:u[1]}i(o,a)}else t!=null&&s(a,t,r);return this}get(t,a){if(t=la(t),t){const r=A.findKey(this,t);if(r){const n=this[r];if(!a)return n;if(a===!0)return Cg(n);if(A.isFunction(a))return a.call(this,n,r);if(A.isRegExp(a))return a.exec(n);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,a){if(t=la(t),t){const r=A.findKey(this,t);return!!(r&&this[r]!==void 0&&(!a||ru(this,this[r],r,a)))}return!1}delete(t,a){const r=this;let n=!1;function s(i){if(i=la(i),i){const o=A.findKey(r,i);o&&(!a||ru(r,r[o],o,a))&&(delete r[o],n=!0)}}return A.isArray(t)?t.forEach(s):s(t),n}clear(t){const a=Object.keys(this);let r=a.length,n=!1;for(;r--;){const s=a[r];(!t||ru(this,this[s],s,t,!0))&&(delete this[s],n=!0)}return n}normalize(t){const a=this,r={};return A.forEach(this,(n,s)=>{const i=A.findKey(r,s);if(i){a[i]=Fc(n),delete a[s];return}const o=t?Tg(s):String(s).trim();o!==s&&delete a[s],a[o]=Fc(n),r[o]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const a=Object.create(null);return A.forEach(this,(r,n)=>{r!=null&&r!==!1&&(a[n]=t&&A.isArray(r)?r.join(", "):r)}),a}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,a])=>t+": "+a).join(`
|
|
14
|
-
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...a){const r=new this(t);return a.forEach(n=>r.set(n)),r}static accessor(t){const r=(this[_d]=this[_d]={accessors:{}}).accessors,n=this.prototype;function s(i){const o=la(i);r[o]||(wg(n,i),r[o]=!0)}return A.isArray(t)?t.forEach(s):s(t),this}};Xe.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),A.reduceDescriptors(Xe.prototype,({value:e},t)=>{let a=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[a]=r}}}),A.freezeMethods(Xe);function au(e,t){const a=this||ca,r=t||a,n=Xe.from(r.headers);let s=r.data;return A.forEach(e,function(o){s=o.call(a,s,n.normalize(),t?t.status:void 0)}),n.normalize(),s}function Rd(e){return!!(e&&e.__CANCEL__)}let xr=class extends O{constructor(t,a,r){super(t??"canceled",O.ERR_CANCELED,a,r),this.name="CanceledError",this.__CANCEL__=!0}};function qr(e,t,a){const r=a.config.validateStatus;!a.status||!r||r(a.status)?e(a):t(new O("Request failed with status code "+a.status,[O.ERR_BAD_REQUEST,O.ERR_BAD_RESPONSE][Math.floor(a.status/100)-4],a.config,a.request,a))}function Ag(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Ig(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function nu(e,t,a){let r=!Ag(t);return e&&(r||a===!1)?Ig(e,t):t}var Bg={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443};function _g(e){try{return new URL(e)}catch{return null}}function Rg(e){var t=(typeof e=="string"?_g(e):e)||{},a=t.protocol,r=t.host,n=t.port;if(typeof r!="string"||!r||typeof a!="string"||(a=a.split(":",1)[0],r=r.replace(/:\d*$/,""),n=parseInt(n)||Bg[a]||0,!kg(r,n)))return"";var s=iu(a+"_proxy")||iu("all_proxy");return s&&s.indexOf("://")===-1&&(s=a+"://"+s),s}function kg(e,t){var a=iu("no_proxy").toLowerCase();return a?a==="*"?!1:a.split(/[,\s]/).every(function(r){if(!r)return!0;var n=r.match(/^(.+):(\d+)$/),s=n?n[1]:r,i=n?parseInt(n[2]):0;return i&&i!==t?!0:/^[.*]/.test(s)?(s.charAt(0)==="*"&&(s=s.slice(1)),!e.endsWith(s)):e!==s}):!0}function iu(e){return process.env[e.toLowerCase()]||process.env[e.toUpperCase()]||""}var su={exports:{}},Mc={exports:{}},Vc={exports:{}},ou,kd;function Ng(){if(kd)return ou;kd=1;var e=1e3,t=e*60,a=t*60,r=a*24,n=r*7,s=r*365.25;ou=function(u,p){p=p||{};var d=typeof u;if(d==="string"&&u.length>0)return i(u);if(d==="number"&&isFinite(u))return p.long?c(u):o(u);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(u))};function i(u){if(u=String(u),!(u.length>100)){var p=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(u);if(p){var d=parseFloat(p[1]),x=(p[2]||"ms").toLowerCase();switch(x){case"years":case"year":case"yrs":case"yr":case"y":return d*s;case"weeks":case"week":case"w":return d*n;case"days":case"day":case"d":return d*r;case"hours":case"hour":case"hrs":case"hr":case"h":return d*a;case"minutes":case"minute":case"mins":case"min":case"m":return d*t;case"seconds":case"second":case"secs":case"sec":case"s":return d*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return d;default:return}}}}function o(u){var p=Math.abs(u);return p>=r?Math.round(u/r)+"d":p>=a?Math.round(u/a)+"h":p>=t?Math.round(u/t)+"m":p>=e?Math.round(u/e)+"s":u+"ms"}function c(u){var p=Math.abs(u);return p>=r?l(u,p,r,"day"):p>=a?l(u,p,a,"hour"):p>=t?l(u,p,t,"minute"):p>=e?l(u,p,e,"second"):u+" ms"}function l(u,p,d,x){var m=p>=d*1.5;return Math.round(u/d)+" "+x+(m?"s":"")}return ou}var cu,Nd;function Ld(){if(Nd)return cu;Nd=1;function e(t){r.debug=r,r.default=r,r.coerce=l,r.disable=o,r.enable=s,r.enabled=c,r.humanize=Ng(),r.destroy=u,Object.keys(t).forEach(p=>{r[p]=t[p]}),r.names=[],r.skips=[],r.formatters={};function a(p){let d=0;for(let x=0;x<p.length;x++)d=(d<<5)-d+p.charCodeAt(x),d|=0;return r.colors[Math.abs(d)%r.colors.length]}r.selectColor=a;function r(p){let d,x=null,m,y;function b(...C){if(!b.enabled)return;const B=b,_=Number(new Date),k=_-(d||_);B.diff=k,B.prev=d,B.curr=_,d=_,C[0]=r.coerce(C[0]),typeof C[0]!="string"&&C.unshift("%O");let N=0;C[0]=C[0].replace(/%([a-zA-Z%])/g,(K,W)=>{if(K==="%%")return"%";N++;const X=r.formatters[W];if(typeof X=="function"){const pe=C[N];K=X.call(B,pe),C.splice(N,1),N--}return K}),r.formatArgs.call(B,C),(B.log||r.log).apply(B,C)}return b.namespace=p,b.useColors=r.useColors(),b.color=r.selectColor(p),b.extend=n,b.destroy=r.destroy,Object.defineProperty(b,"enabled",{enumerable:!0,configurable:!1,get:()=>x!==null?x:(m!==r.namespaces&&(m=r.namespaces,y=r.enabled(p)),y),set:C=>{x=C}}),typeof r.init=="function"&&r.init(b),b}function n(p,d){const x=r(this.namespace+(typeof d>"u"?":":d)+p);return x.log=this.log,x}function s(p){r.save(p),r.namespaces=p,r.names=[],r.skips=[];const d=(typeof p=="string"?p:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const x of d)x[0]==="-"?r.skips.push(x.slice(1)):r.names.push(x)}function i(p,d){let x=0,m=0,y=-1,b=0;for(;x<p.length;)if(m<d.length&&(d[m]===p[x]||d[m]==="*"))d[m]==="*"?(y=m,b=x,m++):(x++,m++);else if(y!==-1)m=y+1,b++,x=b;else return!1;for(;m<d.length&&d[m]==="*";)m++;return m===d.length}function o(){const p=[...r.names,...r.skips.map(d=>"-"+d)].join(",");return r.enable(""),p}function c(p){for(const d of r.skips)if(i(p,d))return!1;for(const d of r.names)if(i(p,d))return!0;return!1}function l(p){return p instanceof Error?p.stack||p.message:p}function u(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}return cu=e,cu}var Ud;function Lg(){return Ud||(Ud=1,(function(e,t){t.formatArgs=r,t.save=n,t.load=s,t.useColors=a,t.storage=i(),t.destroy=(()=>{let c=!1;return()=>{c||(c=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function a(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let c;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(c=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(c[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function r(c){if(c[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+c[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const l="color: "+this.color;c.splice(1,0,l,"color: inherit");let u=0,p=0;c[0].replace(/%[a-zA-Z%]/g,d=>{d!=="%%"&&(u++,d==="%c"&&(p=u))}),c.splice(p,0,l)}t.log=console.debug||console.log||(()=>{});function n(c){try{c?t.storage.setItem("debug",c):t.storage.removeItem("debug")}catch{}}function s(){let c;try{c=t.storage.getItem("debug")||t.storage.getItem("DEBUG")}catch{}return!c&&typeof process<"u"&&"env"in process&&(c=process.env.DEBUG),c}function i(){try{return localStorage}catch{}}e.exports=Ld()(t);const{formatters:o}=e.exports;o.j=function(c){try{return JSON.stringify(c)}catch(l){return"[UnexpectedJSONParseError]: "+l.message}}})(Vc,Vc.exports)),Vc.exports}var qc={exports:{}},lu,Pd;function Ug(){return Pd||(Pd=1,lu=(e,t=process.argv)=>{const a=e.startsWith("-")?"":e.length===1?"-":"--",r=t.indexOf(a+e),n=t.indexOf("--");return r!==-1&&(n===-1||r<n)}),lu}var uu,Dd;function Pg(){if(Dd)return uu;Dd=1;const e=um,t=Cp,a=Ug(),{env:r}=process;let n;a("no-color")||a("no-colors")||a("color=false")||a("color=never")?n=0:(a("color")||a("colors")||a("color=true")||a("color=always"))&&(n=1),"FORCE_COLOR"in r&&(r.FORCE_COLOR==="true"?n=1:r.FORCE_COLOR==="false"?n=0:n=r.FORCE_COLOR.length===0?1:Math.min(parseInt(r.FORCE_COLOR,10),3));function s(c){return c===0?!1:{level:c,hasBasic:!0,has256:c>=2,has16m:c>=3}}function i(c,l){if(n===0)return 0;if(a("color=16m")||a("color=full")||a("color=truecolor"))return 3;if(a("color=256"))return 2;if(c&&!l&&n===void 0)return 0;const u=n||0;if(r.TERM==="dumb")return u;if(process.platform==="win32"){const p=e.release().split(".");return Number(p[0])>=10&&Number(p[2])>=10586?Number(p[2])>=14931?3:2:1}if("CI"in r)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(p=>p in r)||r.CI_NAME==="codeship"?1:u;if("TEAMCITY_VERSION"in r)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(r.TEAMCITY_VERSION)?1:0;if(r.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in r){const p=parseInt((r.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(r.TERM_PROGRAM){case"iTerm.app":return p>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(r.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(r.TERM)||"COLORTERM"in r?1:u}function o(c){const l=i(c,c&&c.isTTY);return s(l)}return uu={supportsColor:o,stdout:s(i(!0,t.isatty(1))),stderr:s(i(!0,t.isatty(2)))},uu}var Od;function Dg(){return Od||(Od=1,(function(e,t){const a=Cp,r=hr;t.init=u,t.log=o,t.formatArgs=s,t.save=c,t.load=l,t.useColors=n,t.destroy=r.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),t.colors=[6,2,3,4,5,1];try{const d=Pg();d&&(d.stderr||d).level>=2&&(t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}t.inspectOpts=Object.keys(process.env).filter(d=>/^debug_/i.test(d)).reduce((d,x)=>{const m=x.substring(6).toLowerCase().replace(/_([a-z])/g,(b,C)=>C.toUpperCase());let y=process.env[x];return/^(yes|on|true|enabled)$/i.test(y)?y=!0:/^(no|off|false|disabled)$/i.test(y)?y=!1:y==="null"?y=null:y=Number(y),d[m]=y,d},{});function n(){return"colors"in t.inspectOpts?!!t.inspectOpts.colors:a.isatty(process.stderr.fd)}function s(d){const{namespace:x,useColors:m}=this;if(m){const y=this.color,b="\x1B[3"+(y<8?y:"8;5;"+y),C=` ${b};1m${x} \x1B[0m`;d[0]=C+d[0].split(`
|
|
15
|
-
`).join(`
|
|
16
|
-
`+C),d.push(b+"m+"+e.exports.humanize(this.diff)+"\x1B[0m")}else d[0]=i()+x+" "+d[0]}function i(){return t.inspectOpts.hideDate?"":new Date().toISOString()+" "}function o(...d){return process.stderr.write(r.formatWithOptions(t.inspectOpts,...d)+`
|
|
17
|
-
`)}function c(d){d?process.env.DEBUG=d:delete process.env.DEBUG}function l(){return process.env.DEBUG}function u(d){d.inspectOpts={};const x=Object.keys(t.inspectOpts);for(let m=0;m<x.length;m++)d.inspectOpts[x[m]]=t.inspectOpts[x[m]]}e.exports=Ld()(t);const{formatters:p}=e.exports;p.o=function(d){return this.inspectOpts.colors=this.useColors,r.inspect(d,this.inspectOpts).split(`
|
|
18
|
-
`).map(x=>x.trim()).join(" ")},p.O=function(d){return this.inspectOpts.colors=this.useColors,r.inspect(d,this.inspectOpts)}})(qc,qc.exports)),qc.exports}var Fd;function Og(){return Fd||(Fd=1,typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Mc.exports=Lg():Mc.exports=Dg()),Mc.exports}var ua,Fg=function(){if(!ua){try{ua=Og()("follow-redirects")}catch{}typeof ua!="function"&&(ua=function(){})}ua.apply(null,arguments)},pa=Al,da=pa.URL,Mg=Tl,Vg=wl,pu=ze.Writable,du=lm,Md=Fg;(function(){var t=typeof process<"u",a=typeof window<"u"&&typeof document<"u",r=br(Error.captureStackTrace);!t&&(a||!r)&&console.warn("The follow-redirects package should be excluded from browser builds.")})();var fu=!1;try{du(new da(""))}catch(e){fu=e.code==="ERR_INVALID_URL"}var qg=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],mu=["abort","aborted","connect","error","socket","timeout"],hu=Object.create(null);mu.forEach(function(e){hu[e]=function(t,a,r){this._redirectable.emit(e,t,a,r)}});var vu=fa("ERR_INVALID_URL","Invalid URL",TypeError),gu=fa("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),jg=fa("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",gu),Kg=fa("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),zg=fa("ERR_STREAM_WRITE_AFTER_END","write after end"),Hg=pu.prototype.destroy||qd;function ht(e,t){pu.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var a=this;this._onNativeResponse=function(r){try{a._processResponse(r)}catch(n){a.emit("error",n instanceof gu?n:new gu({cause:n}))}},this._performRequest()}ht.prototype=Object.create(pu.prototype),ht.prototype.abort=function(){Eu(this._currentRequest),this._currentRequest.abort(),this.emit("abort")},ht.prototype.destroy=function(e){return Eu(this._currentRequest,e),Hg.call(this,e),this},ht.prototype.write=function(e,t,a){if(this._ending)throw new zg;if(!yr(e)&&!Qg(e))throw new TypeError("data should be a string, Buffer or Uint8Array");if(br(t)&&(a=t,t=null),e.length===0){a&&a();return}this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,a)):(this.emit("error",new Kg),this.abort())},ht.prototype.end=function(e,t,a){if(br(e)?(a=e,e=t=null):br(t)&&(a=t,t=null),!e)this._ended=this._ending=!0,this._currentRequest.end(null,null,a);else{var r=this,n=this._currentRequest;this.write(e,t,function(){r._ended=!0,n.end(null,null,a)}),this._ending=!0}},ht.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)},ht.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)},ht.prototype.setTimeout=function(e,t){var a=this;function r(i){i.setTimeout(e),i.removeListener("timeout",i.destroy),i.addListener("timeout",i.destroy)}function n(i){a._timeout&&clearTimeout(a._timeout),a._timeout=setTimeout(function(){a.emit("timeout"),s()},e),r(i)}function s(){a._timeout&&(clearTimeout(a._timeout),a._timeout=null),a.removeListener("abort",s),a.removeListener("error",s),a.removeListener("response",s),a.removeListener("close",s),t&&a.removeListener("timeout",t),a.socket||a._currentRequest.removeListener("socket",n)}return t&&this.on("timeout",t),this.socket?n(this.socket):this._currentRequest.once("socket",n),this.on("socket",r),this.on("abort",s),this.on("error",s),this.on("response",s),this.on("close",s),this},["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(e){ht.prototype[e]=function(t,a){return this._currentRequest[e](t,a)}}),["aborted","connection","socket"].forEach(function(e){Object.defineProperty(ht.prototype,e,{get:function(){return this._currentRequest[e]}})}),ht.prototype._sanitizeOptions=function(e){if(e.headers||(e.headers={}),e.host&&(e.hostname||(e.hostname=e.host),delete e.host),!e.pathname&&e.path){var t=e.path.indexOf("?");t<0?e.pathname=e.path:(e.pathname=e.path.substring(0,t),e.search=e.path.substring(t))}},ht.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(!t)throw new TypeError("Unsupported protocol "+e);if(this._options.agents){var a=e.slice(0,-1);this._options.agent=this._options.agents[a]}var r=this._currentRequest=t.request(this._options,this._onNativeResponse);r._redirectable=this;for(var n of mu)r.on(n,hu[n]);if(this._currentUrl=/^\//.test(this._options.path)?pa.format(this._options):this._options.path,this._isRedirect){var s=0,i=this,o=this._requestBodyBuffers;(function c(l){if(r===i._currentRequest)if(l)i.emit("error",l);else if(s<o.length){var u=o[s++];r.finished||r.write(u.data,u.encoding,c)}else i._ended&&r.end()})()}},ht.prototype._processResponse=function(e){var t=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t});var a=e.headers.location;if(!a||this._options.followRedirects===!1||t<300||t>=400){e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),this._requestBodyBuffers=[];return}if(Eu(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)throw new jg;var r,n=this._options.beforeRedirect;n&&(r=Object.assign({Host:e.req.getHeader("host")},this._options.headers));var s=this._options.method;((t===301||t===302)&&this._options.method==="POST"||t===303&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],bu(/^content-/i,this._options.headers));var i=bu(/^host$/i,this._options.headers),o=xu(this._currentUrl),c=i||o.host,l=/^\w+:/.test(a)?this._currentUrl:pa.format(Object.assign(o,{host:c})),u=$g(a,l);if(Md("redirecting to",u.href),this._isRedirect=!0,yu(u,this._options),(u.protocol!==o.protocol&&u.protocol!=="https:"||u.host!==c&&!Gg(u.host,c))&&bu(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers),br(n)){var p={headers:e.headers,statusCode:t},d={url:l,method:s,headers:r};n(this._options,p,d),this._sanitizeOptions(this._options)}this._performRequest()};function Vd(e){var t={maxRedirects:21,maxBodyLength:10485760},a={};return Object.keys(e).forEach(function(r){var n=r+":",s=a[n]=e[r],i=t[r]=Object.create(s);function o(l,u,p){return Wg(l)?l=yu(l):yr(l)?l=yu(xu(l)):(p=u,u=jd(l),l={protocol:n}),br(u)&&(p=u,u=null),u=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},l,u),u.nativeProtocols=a,!yr(u.host)&&!yr(u.hostname)&&(u.hostname="::1"),du.equal(u.protocol,n,"protocol mismatch"),Md("options",u),new ht(u,p)}function c(l,u,p){var d=i.request(l,u,p);return d.end(),d}Object.defineProperties(i,{request:{value:o,configurable:!0,enumerable:!0,writable:!0},get:{value:c,configurable:!0,enumerable:!0,writable:!0}})}),t}function qd(){}function xu(e){var t;if(fu)t=new da(e);else if(t=jd(pa.parse(e)),!yr(t.protocol))throw new vu({input:e});return t}function $g(e,t){return fu?new da(e,t):xu(pa.resolve(t,e))}function jd(e){if(/^\[/.test(e.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(e.hostname))throw new vu({input:e.href||e});if(/^\[/.test(e.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(e.host))throw new vu({input:e.href||e});return e}function yu(e,t){var a=t||{};for(var r of qg)a[r]=e[r];return a.hostname.startsWith("[")&&(a.hostname=a.hostname.slice(1,-1)),a.port!==""&&(a.port=Number(a.port)),a.path=a.search?a.pathname+a.search:a.pathname,a}function bu(e,t){var a;for(var r in t)e.test(r)&&(a=t[r],delete t[r]);return a===null||typeof a>"u"?void 0:String(a).trim()}function fa(e,t,a){function r(n){br(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,n||{}),this.code=e,this.message=this.cause?t+": "+this.cause.message:t}return r.prototype=new(a||Error),Object.defineProperties(r.prototype,{constructor:{value:r,enumerable:!1},name:{value:"Error ["+e+"]",enumerable:!1}}),r}function Eu(e,t){for(var a of mu)e.removeListener(a,hu[a]);e.on("error",qd),e.destroy(t)}function Gg(e,t){du(yr(e)&&yr(t));var a=e.length-t.length-1;return a>0&&e[a]==="."&&e.endsWith(t)}function yr(e){return typeof e=="string"||e instanceof String}function br(e){return typeof e=="function"}function Qg(e){return typeof e=="object"&&"length"in e}function Wg(e){return da&&e instanceof da}su.exports=Vd({http:Mg,https:Vg}),su.exports.wrap=Vd;var Xg=su.exports,Yg=Up(Xg);const jc="1.15.2";function Kd(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}const Jg=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function Zg(e,t,a){const r=a&&a.Blob||Fe.classes.Blob,n=Kd(e);if(t===void 0&&r&&(t=!0),n==="data"){e=n.length?e.slice(n.length+1):e;const s=Jg.exec(e);if(!s)throw new O("Invalid URL",O.ERR_INVALID_URL);const i=s[1],o=s[2],c=s[3],l=Buffer.from(decodeURIComponent(c),o?"base64":"utf8");if(t){if(!r)throw new O("Blob is not supported",O.ERR_NOT_SUPPORT);return new r([l],{type:i})}return l}throw new O("Unsupported protocol "+n,O.ERR_NOT_SUPPORT)}const Cu=Symbol("internals");class zd extends ze.Transform{constructor(t){t=A.toFlatObject(t,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(r,n)=>!A.isUndefined(n[r])),super({readableHighWaterMark:t.chunkSize});const a=this[Cu]={timeWindow:t.timeWindow,chunkSize:t.chunkSize,maxRate:t.maxRate,minChunkSize:t.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null};this.on("newListener",r=>{r==="progress"&&(a.isCaptured||(a.isCaptured=!0))})}_read(t){const a=this[Cu];return a.onReadCallback&&a.onReadCallback(),super._read(t)}_transform(t,a,r){const n=this[Cu],s=n.maxRate,i=this.readableHighWaterMark,o=n.timeWindow,c=1e3/o,l=s/c,u=n.minChunkSize!==!1?Math.max(n.minChunkSize,l*.01):0,p=(x,m)=>{const y=Buffer.byteLength(x);n.bytesSeen+=y,n.bytes+=y,n.isCaptured&&this.emit("progress",n.bytesSeen),this.push(x)?process.nextTick(m):n.onReadCallback=()=>{n.onReadCallback=null,process.nextTick(m)}},d=(x,m)=>{const y=Buffer.byteLength(x);let b=null,C=i,B,_=0;if(s){const k=Date.now();(!n.ts||(_=k-n.ts)>=o)&&(n.ts=k,B=l-n.bytes,n.bytes=B<0?-B:0,_=0),B=l-n.bytes}if(s){if(B<=0)return setTimeout(()=>{m(null,x)},o-_);B<C&&(C=B)}C&&y>C&&y-C>u&&(b=x.subarray(C),x=x.subarray(0,C)),p(x,b?()=>{process.nextTick(m,null,b)}:m)};d(t,function x(m,y){if(m)return r(m);y?d(y,x):r(null)})}}const{asyncIterator:Hd}=Symbol,$d=async function*(e){e.stream?yield*e.stream():e.arrayBuffer?yield await e.arrayBuffer():e[Hd]?yield*e[Hd]():yield e},ex=Fe.ALPHABET.ALPHA_DIGIT+"-_",ma=typeof TextEncoder=="function"?new TextEncoder:new hr.TextEncoder,Er=`\r
|
|
19
|
-
`,tx=ma.encode(Er),rx=2;class ax{constructor(t,a){const{escapeName:r}=this.constructor,n=A.isString(a);let s=`Content-Disposition: form-data; name="${r(t)}"${!n&&a.name?`; filename="${r(a.name)}"`:""}${Er}`;if(n)a=ma.encode(String(a).replace(/\r?\n|\r\n?/g,Er));else{const i=String(a.type||"application/octet-stream").replace(/[\r\n]/g,"");s+=`Content-Type: ${i}${Er}`}this.headers=ma.encode(s+Er),this.contentLength=n?a.byteLength:a.size,this.size=this.headers.byteLength+this.contentLength+rx,this.name=t,this.value=a}async*encode(){yield this.headers;const{value:t}=this;A.isTypedArray(t)?yield t:yield*$d(t),yield tx}static escapeName(t){return String(t).replace(/[\r\n"]/g,a=>({"\r":"%0D","\n":"%0A",'"':"%22"})[a])}}const nx=(e,t,a)=>{const{tag:r="form-data-boundary",size:n=25,boundary:s=r+"-"+Fe.generateString(n,ex)}=a||{};if(!A.isFormData(e))throw TypeError("FormData instance required");if(s.length<1||s.length>70)throw Error("boundary must be 10-70 characters long");const i=ma.encode("--"+s+Er),o=ma.encode("--"+s+"--"+Er);let c=o.byteLength;const l=Array.from(e.entries()).map(([p,d])=>{const x=new ax(p,d);return c+=x.size,x});c+=i.byteLength*l.length,c=A.toFiniteNumber(c);const u={"Content-Type":`multipart/form-data; boundary=${s}`};return Number.isFinite(c)&&(u["Content-Length"]=c),t&&t(u),ze.Readable.from((async function*(){for(const p of l)yield i,yield*p.encode();yield o})())};class ix extends ze.Transform{__transform(t,a,r){this.push(t),r()}_transform(t,a,r){if(t.length!==0&&(this._transform=this.__transform,t[0]!==120)){const n=Buffer.alloc(2);n[0]=120,n[1]=156,this.push(n,a)}this.__transform(t,a,r)}}const sx=(e,t)=>A.isAsyncFn(e)?function(...a){const r=a.pop();e.apply(this,a).then(n=>{try{t?r(null,...t(n)):r(null,n)}catch(s){r(s)}},r)}:e,ox=new Set(["localhost"]),Gd=e=>{const t=e.split(".");return t.length!==4||t[0]!=="127"?!1:t.every(a=>/^\d+$/.test(a)&&Number(a)>=0&&Number(a)<=255)},cx=e=>{if(e==="::1")return!0;const t=e.match(/^::ffff:(\d+\.\d+\.\d+\.\d+)$/i);if(t)return Gd(t[1]);const a=e.match(/^::ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i);if(a){const n=parseInt(a[1],16);return n>=32512&&n<=32767}const r=e.split(":");if(r.length===8){for(let n=0;n<7;n++)if(!/^0+$/.test(r[n]))return!1;return/^0*1$/.test(r[7])}return!1},Qd=e=>e?ox.has(e)||Gd(e)?!0:cx(e):!1,lx={http:80,https:443,ws:80,wss:443,ftp:21},ux=e=>{let t=e,a=0;if(t.charAt(0)==="["){const s=t.indexOf("]");if(s!==-1){const i=t.slice(1,s),o=t.slice(s+1);return o.charAt(0)===":"&&/^\d+$/.test(o.slice(1))&&(a=Number.parseInt(o.slice(1),10)),[i,a]}}const r=t.indexOf(":"),n=t.lastIndexOf(":");return r!==-1&&r===n&&/^\d+$/.test(t.slice(n+1))&&(a=Number.parseInt(t.slice(n+1),10),t=t.slice(0,n)),[t,a]},Wd=e=>e&&(e.charAt(0)==="["&&e.charAt(e.length-1)==="]"&&(e=e.slice(1,-1)),e.replace(/\.+$/,""));function px(e){let t;try{t=new URL(e)}catch{return!1}const a=(process.env.no_proxy||process.env.NO_PROXY||"").toLowerCase();if(!a)return!1;if(a==="*")return!0;const r=Number.parseInt(t.port,10)||lx[t.protocol.split(":",1)[0]]||0,n=Wd(t.hostname.toLowerCase());return a.split(/[\s,]+/).some(s=>{if(!s)return!1;let[i,o]=ux(s);return i=Wd(i),!i||o&&o!==r?!1:(i.charAt(0)==="*"&&(i=i.slice(1)),i.charAt(0)==="."?n.endsWith(i):n===i||Qd(n)&&Qd(i))})}function dx(e,t){e=e||10;const a=new Array(e),r=new Array(e);let n=0,s=0,i;return t=t!==void 0?t:1e3,function(c){const l=Date.now(),u=r[s];i||(i=l),a[n]=c,r[n]=l;let p=s,d=0;for(;p!==n;)d+=a[p++],p=p%e;if(n=(n+1)%e,n===s&&(s=(s+1)%e),l-i<t)return;const x=u&&l-u;return x?Math.round(d*1e3/x):void 0}}function fx(e,t){let a=0,r=1e3/t,n,s;const i=(l,u=Date.now())=>{a=u,n=null,s&&(clearTimeout(s),s=null),e(...l)};return[(...l)=>{const u=Date.now(),p=u-a;p>=r?i(l,u):(n=l,s||(s=setTimeout(()=>{s=null,i(n)},r-p)))},()=>n&&i(n)]}const jr=(e,t,a=3)=>{let r=0;const n=dx(50,250);return fx(s=>{const i=s.loaded,o=s.lengthComputable?s.total:void 0,c=o!=null?Math.min(i,o):i,l=Math.max(0,c-r),u=n(l);r=Math.max(r,c);const p={loaded:c,total:o,progress:o?c/o:void 0,bytes:l,rate:u||void 0,estimated:u&&o?(o-c)/u:void 0,event:s,lengthComputable:o!=null,[t?"download":"upload"]:!0};e(p)},a)},Kc=(e,t)=>{const a=e!=null;return[r=>t[0]({lengthComputable:a,total:e,loaded:r}),t[1]]},zc=e=>(...t)=>A.asap(()=>e(...t));function mx(e){if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const a=e.slice(5,t),r=e.slice(t+1);if(/;base64/i.test(a)){let s=r.length;const i=r.length;for(let d=0;d<i;d++)if(r.charCodeAt(d)===37&&d+2<i){const x=r.charCodeAt(d+1),m=r.charCodeAt(d+2);(x>=48&&x<=57||x>=65&&x<=70||x>=97&&x<=102)&&(m>=48&&m<=57||m>=65&&m<=70||m>=97&&m<=102)&&(s-=2,d+=2)}let o=0,c=i-1;const l=d=>d>=2&&r.charCodeAt(d-2)===37&&r.charCodeAt(d-1)===51&&(r.charCodeAt(d)===68||r.charCodeAt(d)===100);c>=0&&(r.charCodeAt(c)===61?(o++,c--):l(c)&&(o++,c-=3)),o===1&&c>=0&&(r.charCodeAt(c)===61||l(c))&&o++;const p=Math.floor(s/4)*3-(o||0);return p>0?p:0}return Buffer.byteLength(r,"utf8")}const Xd={flush:tr.constants.Z_SYNC_FLUSH,finishFlush:tr.constants.Z_SYNC_FLUSH},hx={flush:tr.constants.BROTLI_OPERATION_FLUSH,finishFlush:tr.constants.BROTLI_OPERATION_FLUSH},Yd=A.isFunction(tr.createBrotliDecompress),{http:vx,https:gx}=Yg,xx=/https:?/,Jd=Symbol("axios.http.socketListener"),Hc=Symbol("axios.http.currentReq"),Zd=Fe.protocols.map(e=>e+":"),ef=(e,[t,a])=>(e.on("end",a).on("error",a),t);class yx{constructor(){this.sessions=Object.create(null)}getSession(t,a){a=Object.assign({sessionTimeout:1e3},a);let r=this.sessions[t];if(r){let u=r.length;for(let p=0;p<u;p++){const[d,x]=r[p];if(!d.destroyed&&!d.closed&&hr.isDeepStrictEqual(x,a))return d}}const n=Ep.connect(t,a);let s;const i=()=>{if(s)return;s=!0;let u=r,p=u.length,d=p;for(;d--;)if(u[d][0]===n){p===1?delete this.sessions[t]:u.splice(d,1),n.closed||n.close();return}},o=n.request,{sessionTimeout:c}=a;if(c!=null){let u,p=0;n.request=function(){const d=o.apply(this,arguments);return p++,u&&(clearTimeout(u),u=null),d.once("close",()=>{--p||(u=setTimeout(()=>{u=null,i()},c))}),d}}n.once("close",i);let l=[n,a];return r?r.push(l):r=this.sessions[t]=[l],n}}const bx=new yx;function Ex(e,t){e.beforeRedirects.proxy&&e.beforeRedirects.proxy(e),e.beforeRedirects.config&&e.beforeRedirects.config(e,t)}function tf(e,t,a){let r=t;if(!r&&r!==!1){const n=Rg(a);n&&(px(a)||(r=new URL(n)))}if(r){if(r.username&&(r.auth=(r.username||"")+":"+(r.password||"")),r.auth){if(!!(r.auth.username||r.auth.password))r.auth=(r.auth.username||"")+":"+(r.auth.password||"");else if(typeof r.auth=="object")throw new O("Invalid proxy authorization",O.ERR_BAD_OPTION,{proxy:r});const i=Buffer.from(r.auth,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+i}e.headers.host=e.hostname+(e.port?":"+e.port:"");const n=r.hostname||r.host;e.hostname=n,e.host=n,e.port=r.port,e.path=a,r.protocol&&(e.protocol=r.protocol.includes(":")?r.protocol:`${r.protocol}:`)}e.beforeRedirects.proxy=function(s){tf(s,t,s.href)}}const Cx=typeof process<"u"&&A.kindOf(process)==="process",Sx=e=>new Promise((t,a)=>{let r,n;const s=(c,l)=>{n||(n=!0,r&&r(c,l))},i=c=>{s(c),t(c)},o=c=>{s(c,!0),a(c)};e(i,o,c=>r=c).catch(o)}),Tx=({address:e,family:t})=>{if(!A.isString(e))throw TypeError("address must be a string");return{address:e,family:t||(e.indexOf(".")<0?6:4)}},rf=(e,t)=>Tx(A.isObject(e)?e:{address:e,family:t}),wx={request(e,t){const a=e.protocol+"//"+e.hostname+":"+(e.port||(e.protocol==="https:"?443:80)),{http2Options:r,headers:n}=e,s=bx.getSession(a,r),{HTTP2_HEADER_SCHEME:i,HTTP2_HEADER_METHOD:o,HTTP2_HEADER_PATH:c,HTTP2_HEADER_STATUS:l}=Ep.constants,u={[i]:e.protocol.replace(":",""),[o]:e.method,[c]:e.path};A.forEach(n,(d,x)=>{x.charAt(0)!==":"&&(u[x]=d)});const p=s.request(u);return p.once("response",d=>{const x=p;d=Object.assign({},d);const m=d[l];delete d[l],x.headers=d,x.statusCode=+m,t(x)}),p}};var Ax=Cx&&function(t){return Sx(async function(r,n,s){const i=q=>A.hasOwnProp(t,q)?t[q]:void 0;let o=i("data"),c=i("lookup"),l=i("family"),u=i("httpVersion");u===void 0&&(u=1);let p=i("http2Options");const d=i("responseType"),x=i("responseEncoding"),m=t.method.toUpperCase();let y,b=!1,C;if(u=+u,Number.isNaN(u))throw TypeError(`Invalid protocol version: '${t.httpVersion}' is not a number`);if(u!==1&&u!==2)throw TypeError(`Unsupported protocol version '${u}'`);const B=u===2;if(c){const q=sx(c,M=>A.isArray(M)?M:[M]);c=(M,J,ne)=>{q(M,J,(ee,Ee,Ae)=>{if(ee)return ne(ee);const se=A.isArray(Ee)?Ee.map(Pe=>rf(Pe)):[rf(Ee,Ae)];J.all?ne(ee,se):ne(ee,se[0].address,se[0].family)})}}const _=new pm.EventEmitter;function k(q){try{_.emit("abort",!q||q.type?new xr(null,t,C):q)}catch(M){console.warn("emit error",M)}}_.once("abort",n);const N=()=>{t.cancelToken&&t.cancelToken.unsubscribe(k),t.signal&&t.signal.removeEventListener("abort",k),_.removeAllListeners()};(t.cancelToken||t.signal)&&(t.cancelToken&&t.cancelToken.subscribe(k),t.signal&&(t.signal.aborted?k():t.signal.addEventListener("abort",k))),s((q,M)=>{if(y=!0,M){b=!0,N();return}const{data:J}=q;if(J instanceof ze.Readable||J instanceof ze.Duplex){const ne=ze.finished(J,()=>{ne(),N()})}else N()});const D=nu(t.baseURL,t.url,t.allowAbsoluteUrls),K=new URL(D,Fe.hasBrowserEnv?Fe.origin:void 0),W=K.protocol||Zd[0];if(W==="data:"){if(t.maxContentLength>-1){const M=String(t.url||D||"");if(mx(M)>t.maxContentLength)return n(new O("maxContentLength size of "+t.maxContentLength+" exceeded",O.ERR_BAD_RESPONSE,t))}let q;if(m!=="GET")return qr(r,n,{status:405,statusText:"method not allowed",headers:{},config:t});try{q=Zg(t.url,d==="blob",{Blob:t.env&&t.env.Blob})}catch(M){throw O.from(M,O.ERR_BAD_REQUEST,t)}return d==="text"?(q=q.toString(x),(!x||x==="utf8")&&(q=A.stripBOM(q))):d==="stream"&&(q=ze.Readable.from(q)),qr(r,n,{data:q,status:200,statusText:"OK",headers:new Xe,config:t})}if(Zd.indexOf(W)===-1)return n(new O("Unsupported protocol "+W,O.ERR_BAD_REQUEST,t));const X=Xe.from(t.headers).normalize();X.set("User-Agent","axios/"+jc,!1);const{onUploadProgress:pe,onDownloadProgress:me}=t,xe=t.maxRate;let Ne,_e;if(A.isSpecCompliantForm(o)){const q=X.getContentType(/boundary=([-_\w\d]{10,70})/i);o=nx(o,M=>{X.set(M)},{tag:`axios-${jc}-boundary`,boundary:q&&q[1]||void 0})}else if(A.isFormData(o)&&A.isFunction(o.getHeaders)&&o.getHeaders!==Object.prototype.getHeaders){if(X.set(o.getHeaders()),!X.hasContentLength())try{const q=await hr.promisify(o.getLength).call(o);Number.isFinite(q)&&q>=0&&X.setContentLength(q)}catch{}}else if(A.isBlob(o)||A.isFile(o))o.size&&X.setContentType(o.type||"application/octet-stream"),X.setContentLength(o.size||0),o=ze.Readable.from($d(o));else if(o&&!A.isStream(o)){if(!Buffer.isBuffer(o))if(A.isArrayBuffer(o))o=Buffer.from(new Uint8Array(o));else if(A.isString(o))o=Buffer.from(o,"utf-8");else return n(new O("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",O.ERR_BAD_REQUEST,t));if(X.setContentLength(o.length,!1),t.maxBodyLength>-1&&o.length>t.maxBodyLength)return n(new O("Request body larger than maxBodyLength limit",O.ERR_BAD_REQUEST,t))}const be=A.toFiniteNumber(X.getContentLength());A.isArray(xe)?(Ne=xe[0],_e=xe[1]):Ne=_e=xe,o&&(pe||Ne)&&(A.isStream(o)||(o=ze.Readable.from(o,{objectMode:!1})),o=ze.pipeline([o,new zd({maxRate:A.toFiniteNumber(Ne)})],A.noop),pe&&o.on("progress",ef(o,Kc(be,jr(zc(pe),!1,3)))));let te;const $=i("auth");if($){const q=$.username||"",M=$.password||"";te=q+":"+M}if(!te&&K.username){const q=K.username,M=K.password;te=q+":"+M}te&&X.delete("authorization");let je;try{je=Jl(K.pathname+K.search,t.params,t.paramsSerializer).replace(/^\?/,"")}catch(q){const M=new Error(q.message);return M.config=t,M.url=t.url,M.exists=!0,n(M)}X.set("Accept-Encoding","gzip, compress, deflate"+(Yd?", br":""),!1);const Le=Object.assign(Object.create(null),{path:je,method:m,headers:X.toJSON(),agents:{http:t.httpAgent,https:t.httpsAgent},auth:te,protocol:W,family:l,beforeRedirect:Ex,beforeRedirects:Object.create(null),http2Options:p});if(!A.isUndefined(c)&&(Le.lookup=c),t.socketPath){if(typeof t.socketPath!="string")return n(new O("socketPath must be a string",O.ERR_BAD_OPTION_VALUE,t));if(t.allowedSocketPaths!=null){const q=Array.isArray(t.allowedSocketPaths)?t.allowedSocketPaths:[t.allowedSocketPaths],M=Sc.resolve(t.socketPath);if(!q.some(ne=>typeof ne=="string"&&Sc.resolve(ne)===M))return n(new O(`socketPath "${t.socketPath}" is not permitted by allowedSocketPaths`,O.ERR_BAD_OPTION_VALUE,t))}Le.socketPath=t.socketPath}else Le.hostname=K.hostname.startsWith("[")?K.hostname.slice(1,-1):K.hostname,Le.port=K.port,tf(Le,t.proxy,W+"//"+K.hostname+(K.port?":"+K.port:"")+Le.path);let Te;const ie=xx.test(Le.protocol);if(Le.agent=ie?t.httpsAgent:t.httpAgent,B)Te=wx;else{const q=i("transport");if(q)Te=q;else if(t.maxRedirects===0)Te=ie?wl:Tl;else{t.maxRedirects&&(Le.maxRedirects=t.maxRedirects);const M=i("beforeRedirect");M&&(Le.beforeRedirects.config=M),Te=ie?gx:vx}}if(t.maxBodyLength>-1?Le.maxBodyLength=t.maxBodyLength:Le.maxBodyLength=1/0,Le.insecureHTTPParser=!!i("insecureHTTPParser"),C=Te.request(Le,function(M){if(C.destroyed)return;const J=[M],ne=A.toFiniteNumber(M.headers["content-length"]);if(me||_e){const se=new zd({maxRate:A.toFiniteNumber(_e)});me&&se.on("progress",ef(se,Kc(ne,jr(zc(me),!0,3)))),J.push(se)}let ee=M;const Ee=M.req||C;if(t.decompress!==!1&&M.headers["content-encoding"])switch((m==="HEAD"||M.statusCode===204)&&delete M.headers["content-encoding"],(M.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":J.push(tr.createUnzip(Xd)),delete M.headers["content-encoding"];break;case"deflate":J.push(new ix),J.push(tr.createUnzip(Xd)),delete M.headers["content-encoding"];break;case"br":Yd&&(J.push(tr.createBrotliDecompress(hx)),delete M.headers["content-encoding"])}ee=J.length>1?ze.pipeline(J,A.noop):J[0];const Ae={status:M.statusCode,statusText:M.statusMessage,headers:new Xe(M.headers),config:t,request:Ee};if(d==="stream"){if(t.maxContentLength>-1){const se=t.maxContentLength,Pe=ee;async function*De(){let fe=0;for await(const Ke of Pe){if(fe+=Ke.length,fe>se)throw new O("maxContentLength size of "+se+" exceeded",O.ERR_BAD_RESPONSE,t,Ee);yield Ke}}ee=ze.Readable.from(De(),{objectMode:!1})}Ae.data=ee,qr(r,n,Ae)}else{const se=[];let Pe=0;ee.on("data",function(fe){se.push(fe),Pe+=fe.length,t.maxContentLength>-1&&Pe>t.maxContentLength&&(b=!0,ee.destroy(),k(new O("maxContentLength size of "+t.maxContentLength+" exceeded",O.ERR_BAD_RESPONSE,t,Ee)))}),ee.on("aborted",function(){if(b)return;const fe=new O("stream has been aborted",O.ERR_BAD_RESPONSE,t,Ee);ee.destroy(fe),n(fe)}),ee.on("error",function(fe){C.destroyed||n(O.from(fe,null,t,Ee))}),ee.on("end",function(){try{let fe=se.length===1?se[0]:Buffer.concat(se);d!=="arraybuffer"&&(fe=fe.toString(x),(!x||x==="utf8")&&(fe=A.stripBOM(fe))),Ae.data=fe}catch(fe){return n(O.from(fe,null,t,Ae.request,Ae))}qr(r,n,Ae)})}_.once("abort",se=>{ee.destroyed||(ee.emit("error",se),ee.destroy())})}),_.once("abort",q=>{C.close?C.close():C.destroy(q)}),C.on("error",function(M){n(O.from(M,null,t,C))}),C.on("socket",function(M){M.setKeepAlive(!0,1e3*60),M[Jd]||(M.on("error",function(ne){const ee=M[Hc];ee&&!ee.destroyed&&ee.destroy(ne)}),M[Jd]=!0),M[Hc]=C,C.once("close",function(){M[Hc]===C&&(M[Hc]=null)})}),t.timeout){const q=parseInt(t.timeout,10);if(Number.isNaN(q)){k(new O("error trying to parse `config.timeout` to int",O.ERR_BAD_OPTION_VALUE,t,C));return}C.setTimeout(q,function(){if(y)return;let J=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const ne=t.transitional||Oc;t.timeoutErrorMessage&&(J=t.timeoutErrorMessage),k(new O(J,ne.clarifyTimeoutError?O.ETIMEDOUT:O.ECONNABORTED,t,C))})}else C.setTimeout(0);if(A.isStream(o)){let q=!1,M=!1;o.on("end",()=>{q=!0}),o.once("error",ne=>{M=!0,C.destroy(ne)}),o.on("close",()=>{!q&&!M&&k(new xr("Request stream has been aborted",t,C))});let J=o;if(t.maxBodyLength>-1&&t.maxRedirects===0){const ne=t.maxBodyLength;let ee=0;J=ze.pipeline([o,new ze.Transform({transform(Ee,Ae,se){if(ee+=Ee.length,ee>ne)return se(new O("Request body larger than maxBodyLength limit",O.ERR_BAD_REQUEST,t,C));se(null,Ee)}})],A.noop),J.on("error",Ee=>{C.destroyed||C.destroy(Ee)})}J.pipe(C)}else o&&C.write(o),C.end()})},Ix=Fe.hasStandardBrowserEnv?((e,t)=>a=>(a=new URL(a,Fe.origin),e.protocol===a.protocol&&e.host===a.host&&(t||e.port===a.port)))(new URL(Fe.origin),Fe.navigator&&/(msie|trident)/i.test(Fe.navigator.userAgent)):()=>!0,Bx=Fe.hasStandardBrowserEnv?{write(e,t,a,r,n,s,i){if(typeof document>"u")return;const o=[`${e}=${encodeURIComponent(t)}`];A.isNumber(a)&&o.push(`expires=${new Date(a).toUTCString()}`),A.isString(r)&&o.push(`path=${r}`),A.isString(n)&&o.push(`domain=${n}`),s===!0&&o.push("secure"),A.isString(i)&&o.push(`SameSite=${i}`),document.cookie=o.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};const af=e=>e instanceof Xe?{...e}:e;function Cr(e,t){t=t||{};const a=Object.create(null);Object.defineProperty(a,"hasOwnProperty",{value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(l,u,p,d){return A.isPlainObject(l)&&A.isPlainObject(u)?A.merge.call({caseless:d},l,u):A.isPlainObject(u)?A.merge({},u):A.isArray(u)?u.slice():u}function n(l,u,p,d){if(A.isUndefined(u)){if(!A.isUndefined(l))return r(void 0,l,p,d)}else return r(l,u,p,d)}function s(l,u){if(!A.isUndefined(u))return r(void 0,u)}function i(l,u){if(A.isUndefined(u)){if(!A.isUndefined(l))return r(void 0,l)}else return r(void 0,u)}function o(l,u,p){if(A.hasOwnProp(t,p))return r(l,u);if(A.hasOwnProp(e,p))return r(void 0,l)}const c={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,allowedSocketPaths:i,responseEncoding:i,validateStatus:o,headers:(l,u,p)=>n(af(l),af(u),p,!0)};return A.forEach(Object.keys({...e,...t}),function(u){if(u==="__proto__"||u==="constructor"||u==="prototype")return;const p=A.hasOwnProp(c,u)?c[u]:n,d=A.hasOwnProp(e,u)?e[u]:void 0,x=A.hasOwnProp(t,u)?t[u]:void 0,m=p(d,x,u);A.isUndefined(m)&&p!==o||(a[u]=m)}),a}var nf=e=>{const t=Cr({},e),a=d=>A.hasOwnProp(t,d)?t[d]:void 0,r=a("data");let n=a("withXSRFToken");const s=a("xsrfHeaderName"),i=a("xsrfCookieName");let o=a("headers");const c=a("auth"),l=a("baseURL"),u=a("allowAbsoluteUrls"),p=a("url");if(t.headers=o=Xe.from(o),t.url=Jl(nu(l,p,u),e.params,e.paramsSerializer),c&&o.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),A.isFormData(r)){if(Fe.hasStandardBrowserEnv||Fe.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(A.isFunction(r.getHeaders)){const d=r.getHeaders(),x=["content-type","content-length"];Object.entries(d).forEach(([m,y])=>{x.includes(m.toLowerCase())&&o.set(m,y)})}}if(Fe.hasStandardBrowserEnv&&(A.isFunction(n)&&(n=n(t)),n===!0||n==null&&Ix(t.url))){const x=s&&i&&Bx.read(i);x&&o.set(s,x)}return t};const _x=typeof XMLHttpRequest<"u";var Rx=_x&&function(e){return new Promise(function(a,r){const n=nf(e);let s=n.data;const i=Xe.from(n.headers).normalize();let{responseType:o,onUploadProgress:c,onDownloadProgress:l}=n,u,p,d,x,m;function y(){x&&x(),m&&m(),n.cancelToken&&n.cancelToken.unsubscribe(u),n.signal&&n.signal.removeEventListener("abort",u)}let b=new XMLHttpRequest;b.open(n.method.toUpperCase(),n.url,!0),b.timeout=n.timeout;function C(){if(!b)return;const _=Xe.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),N={data:!o||o==="text"||o==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:_,config:e,request:b};qr(function(K){a(K),y()},function(K){r(K),y()},N),b=null}"onloadend"in b?b.onloadend=C:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(C)},b.onabort=function(){b&&(r(new O("Request aborted",O.ECONNABORTED,e,b)),b=null)},b.onerror=function(k){const N=k&&k.message?k.message:"Network Error",D=new O(N,O.ERR_NETWORK,e,b);D.event=k||null,r(D),b=null},b.ontimeout=function(){let k=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const N=n.transitional||Oc;n.timeoutErrorMessage&&(k=n.timeoutErrorMessage),r(new O(k,N.clarifyTimeoutError?O.ETIMEDOUT:O.ECONNABORTED,e,b)),b=null},s===void 0&&i.setContentType(null),"setRequestHeader"in b&&A.forEach(i.toJSON(),function(k,N){b.setRequestHeader(N,k)}),A.isUndefined(n.withCredentials)||(b.withCredentials=!!n.withCredentials),o&&o!=="json"&&(b.responseType=n.responseType),l&&([d,m]=jr(l,!0),b.addEventListener("progress",d)),c&&b.upload&&([p,x]=jr(c),b.upload.addEventListener("progress",p),b.upload.addEventListener("loadend",x)),(n.cancelToken||n.signal)&&(u=_=>{b&&(r(!_||_.type?new xr(null,e,b):_),b.abort(),b=null)},n.cancelToken&&n.cancelToken.subscribe(u),n.signal&&(n.signal.aborted?u():n.signal.addEventListener("abort",u)));const B=Kd(n.url);if(B&&Fe.protocols.indexOf(B)===-1){r(new O("Unsupported protocol "+B+":",O.ERR_BAD_REQUEST,e));return}b.send(s||null)})};const kx=(e,t)=>{const{length:a}=e=e?e.filter(Boolean):[];if(t||a){let r=new AbortController,n;const s=function(l){if(!n){n=!0,o();const u=l instanceof Error?l:this.reason;r.abort(u instanceof O?u:new xr(u instanceof Error?u.message:u))}};let i=t&&setTimeout(()=>{i=null,s(new O(`timeout of ${t}ms exceeded`,O.ETIMEDOUT))},t);const o=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(s):l.removeEventListener("abort",s)}),e=null)};e.forEach(l=>l.addEventListener("abort",s));const{signal:c}=r;return c.unsubscribe=()=>A.asap(o),c}},Nx=function*(e,t){let a=e.byteLength;if(!t||a<t){yield e;return}let r=0,n;for(;r<a;)n=r+t,yield e.slice(r,n),r=n},Lx=async function*(e,t){for await(const a of Ux(e))yield*Nx(a,t)},Ux=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:a,value:r}=await t.read();if(a)break;yield r}}finally{await t.cancel()}},sf=(e,t,a,r)=>{const n=Lx(e,t);let s=0,i,o=c=>{i||(i=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:l,value:u}=await n.next();if(l){o(),c.close();return}let p=u.byteLength;if(a){let d=s+=p;a(d)}c.enqueue(new Uint8Array(u))}catch(l){throw o(l),l}},cancel(c){return o(c),n.return()}},{highWaterMark:2})},of=64*1024,{isFunction:$c}=A,Px=(({Request:e,Response:t})=>({Request:e,Response:t}))(A.global),{ReadableStream:cf,TextEncoder:lf}=A.global,uf=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Dx=e=>{e=A.merge.call({skipUndefined:!0},Px,e);const{fetch:t,Request:a,Response:r}=e,n=t?$c(t):typeof fetch=="function",s=$c(a),i=$c(r);if(!n)return!1;const o=n&&$c(cf),c=n&&(typeof lf=="function"?(m=>y=>m.encode(y))(new lf):async m=>new Uint8Array(await new a(m).arrayBuffer())),l=s&&o&&uf(()=>{let m=!1;const y=new a(Fe.origin,{body:new cf,method:"POST",get duplex(){return m=!0,"half"}}),b=y.headers.has("Content-Type");return y.body!=null&&y.body.cancel(),m&&!b}),u=i&&o&&uf(()=>A.isReadableStream(new r("").body)),p={stream:u&&(m=>m.body)};n&&["text","arrayBuffer","blob","formData","stream"].forEach(m=>{!p[m]&&(p[m]=(y,b)=>{let C=y&&y[m];if(C)return C.call(y);throw new O(`Response type '${m}' is not supported`,O.ERR_NOT_SUPPORT,b)})});const d=async m=>{if(m==null)return 0;if(A.isBlob(m))return m.size;if(A.isSpecCompliantForm(m))return(await new a(Fe.origin,{method:"POST",body:m}).arrayBuffer()).byteLength;if(A.isArrayBufferView(m)||A.isArrayBuffer(m))return m.byteLength;if(A.isURLSearchParams(m)&&(m=m+""),A.isString(m))return(await c(m)).byteLength},x=async(m,y)=>{const b=A.toFiniteNumber(m.getContentLength());return b??d(y)};return async m=>{let{url:y,method:b,data:C,signal:B,cancelToken:_,timeout:k,onDownloadProgress:N,onUploadProgress:D,responseType:K,headers:W,withCredentials:X="same-origin",fetchOptions:pe}=nf(m),me=t||fetch;K=K?(K+"").toLowerCase():"text";let xe=kx([B,_&&_.toAbortSignal()],k),Ne=null;const _e=xe&&xe.unsubscribe&&(()=>{xe.unsubscribe()});let be;try{if(D&&l&&b!=="get"&&b!=="head"&&(be=await x(W,C))!==0){let ie=new a(y,{method:"POST",body:C,duplex:"half"}),q;if(A.isFormData(C)&&(q=ie.headers.get("content-type"))&&W.setContentType(q),ie.body){const[M,J]=Kc(be,jr(zc(D)));C=sf(ie.body,of,M,J)}}A.isString(X)||(X=X?"include":"omit");const te=s&&"credentials"in a.prototype;if(A.isFormData(C)){const ie=W.getContentType();ie&&/^multipart\/form-data/i.test(ie)&&!/boundary=/i.test(ie)&&W.delete("content-type")}const $={...pe,signal:xe,method:b.toUpperCase(),headers:W.normalize().toJSON(),body:C,duplex:"half",credentials:te?X:void 0};Ne=s&&new a(y,$);let je=await(s?me(Ne,pe):me(y,$));const Le=u&&(K==="stream"||K==="response");if(u&&(N||Le&&_e)){const ie={};["status","statusText","headers"].forEach(ne=>{ie[ne]=je[ne]});const q=A.toFiniteNumber(je.headers.get("content-length")),[M,J]=N&&Kc(q,jr(zc(N),!0))||[];je=new r(sf(je.body,of,M,()=>{J&&J(),_e&&_e()}),ie)}K=K||"text";let Te=await p[A.findKey(p,K)||"text"](je,m);return!Le&&_e&&_e(),await new Promise((ie,q)=>{qr(ie,q,{data:Te,headers:Xe.from(je.headers),status:je.status,statusText:je.statusText,config:m,request:Ne})})}catch(te){throw _e&&_e(),te&&te.name==="TypeError"&&/Load failed|fetch/i.test(te.message)?Object.assign(new O("Network Error",O.ERR_NETWORK,m,Ne,te&&te.response),{cause:te.cause||te}):O.from(te,te&&te.code,m,Ne,te&&te.response)}}},Ox=new Map,pf=e=>{let t=e&&e.env||{};const{fetch:a,Request:r,Response:n}=t,s=[r,n,a];let i=s.length,o=i,c,l,u=Ox;for(;o--;)c=s[o],l=u.get(c),l===void 0&&u.set(c,l=o?new Map:Dx(t)),u=l;return l};pf();const Su={http:Ax,xhr:Rx,fetch:{get:pf}};A.forEach(Su,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const df=e=>`- ${e}`,Fx=e=>A.isFunction(e)||e===null||e===!1;function Mx(e,t){e=A.isArray(e)?e:[e];const{length:a}=e;let r,n;const s={};for(let i=0;i<a;i++){r=e[i];let o;if(n=r,!Fx(r)&&(n=Su[(o=String(r)).toLowerCase()],n===void 0))throw new O(`Unknown adapter '${o}'`);if(n&&(A.isFunction(n)||(n=n.get(t))))break;s[o||"#"+i]=n}if(!n){const i=Object.entries(s).map(([c,l])=>`adapter ${c} `+(l===!1?"is not supported by the environment":"is not available in the build"));let o=a?i.length>1?`since :
|
|
20
|
-
`+i.map(df).join(`
|
|
21
|
-
`):" "+df(i[0]):"as no adapter specified";throw new O("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return n}var ff={getAdapter:Mx,adapters:Su};function Tu(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new xr(null,e)}function mf(e){return Tu(e),e.headers=Xe.from(e.headers),e.data=au.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),ff.getAdapter(e.adapter||ca.adapter,e)(e).then(function(r){return Tu(e),r.data=au.call(e,e.transformResponse,r),r.headers=Xe.from(r.headers),r},function(r){return Rd(r)||(Tu(e),r&&r.response&&(r.response.data=au.call(e,e.transformResponse,r.response),r.response.headers=Xe.from(r.response.headers))),Promise.reject(r)})}const Gc={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Gc[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const hf={};Gc.transitional=function(t,a,r){function n(s,i){return"[Axios v"+jc+"] Transitional option '"+s+"'"+i+(r?". "+r:"")}return(s,i,o)=>{if(t===!1)throw new O(n(i," has been removed"+(a?" in "+a:"")),O.ERR_DEPRECATED);return a&&!hf[i]&&(hf[i]=!0,console.warn(n(i," has been deprecated since v"+a+" and will be removed in the near future"))),t?t(s,i,o):!0}},Gc.spelling=function(t){return(a,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function Vx(e,t,a){if(typeof e!="object")throw new O("options must be an object",O.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let n=r.length;for(;n-- >0;){const s=r[n],i=Object.prototype.hasOwnProperty.call(t,s)?t[s]:void 0;if(i){const o=e[s],c=o===void 0||i(o,s,e);if(c!==!0)throw new O("option "+s+" must be "+c,O.ERR_BAD_OPTION_VALUE);continue}if(a!==!0)throw new O("Unknown option "+s,O.ERR_BAD_OPTION)}}var Qc={assertOptions:Vx,validators:Gc};const Rt=Qc.validators;let Sr=class{constructor(t){this.defaults=t||{},this.interceptors={request:new wd,response:new wd}}async request(t,a){try{return await this._request(t,a)}catch(r){if(r instanceof Error){let n={};Error.captureStackTrace?Error.captureStackTrace(n):n=new Error;const s=(()=>{if(!n.stack)return"";const i=n.stack.indexOf(`
|
|
22
|
-
`);return i===-1?"":n.stack.slice(i+1)})();try{if(!r.stack)r.stack=s;else if(s){const i=s.indexOf(`
|
|
23
|
-
`),o=i===-1?-1:s.indexOf(`
|
|
24
|
-
`,i+1),c=o===-1?"":s.slice(o+1);String(r.stack).endsWith(c)||(r.stack+=`
|
|
25
|
-
`+s)}}catch{}}throw r}}_request(t,a){typeof t=="string"?(a=a||{},a.url=t):a=t||{},a=Cr(this.defaults,a);const{transitional:r,paramsSerializer:n,headers:s}=a;r!==void 0&&Qc.assertOptions(r,{silentJSONParsing:Rt.transitional(Rt.boolean),forcedJSONParsing:Rt.transitional(Rt.boolean),clarifyTimeoutError:Rt.transitional(Rt.boolean),legacyInterceptorReqResOrdering:Rt.transitional(Rt.boolean)},!1),n!=null&&(A.isFunction(n)?a.paramsSerializer={serialize:n}:Qc.assertOptions(n,{encode:Rt.function,serialize:Rt.function},!0)),a.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?a.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:a.allowAbsoluteUrls=!0),Qc.assertOptions(a,{baseUrl:Rt.spelling("baseURL"),withXsrfToken:Rt.spelling("withXSRFToken")},!0),a.method=(a.method||this.defaults.method||"get").toLowerCase();let i=s&&A.merge(s.common,s[a.method]);s&&A.forEach(["delete","get","head","post","put","patch","common"],m=>{delete s[m]}),a.headers=Xe.concat(i,s);const o=[];let c=!0;this.interceptors.request.forEach(function(y){if(typeof y.runWhen=="function"&&y.runWhen(a)===!1)return;c=c&&y.synchronous;const b=a.transitional||Oc;b&&b.legacyInterceptorReqResOrdering?o.unshift(y.fulfilled,y.rejected):o.push(y.fulfilled,y.rejected)});const l=[];this.interceptors.response.forEach(function(y){l.push(y.fulfilled,y.rejected)});let u,p=0,d;if(!c){const m=[mf.bind(this),void 0];for(m.unshift(...o),m.push(...l),d=m.length,u=Promise.resolve(a);p<d;)u=u.then(m[p++],m[p++]);return u}d=o.length;let x=a;for(;p<d;){const m=o[p++],y=o[p++];try{x=m(x)}catch(b){y.call(this,b);break}}try{u=mf.call(this,x)}catch(m){return Promise.reject(m)}for(p=0,d=l.length;p<d;)u=u.then(l[p++],l[p++]);return u}getUri(t){t=Cr(this.defaults,t);const a=nu(t.baseURL,t.url,t.allowAbsoluteUrls);return Jl(a,t.params,t.paramsSerializer)}};A.forEach(["delete","get","head","options"],function(t){Sr.prototype[t]=function(a,r){return this.request(Cr(r||{},{method:t,url:a,data:(r||{}).data}))}}),A.forEach(["post","put","patch"],function(t){function a(r){return function(s,i,o){return this.request(Cr(o||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:i}))}}Sr.prototype[t]=a(),Sr.prototype[t+"Form"]=a(!0)});let qx=class om{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let a;this.promise=new Promise(function(s){a=s});const r=this;this.promise.then(n=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](n);r._listeners=null}),this.promise.then=n=>{let s;const i=new Promise(o=>{r.subscribe(o),s=o}).then(n);return i.cancel=function(){r.unsubscribe(s)},i},t(function(s,i,o){r.reason||(r.reason=new xr(s,i,o),a(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const a=this._listeners.indexOf(t);a!==-1&&this._listeners.splice(a,1)}toAbortSignal(){const t=new AbortController,a=r=>{t.abort(r)};return this.subscribe(a),t.signal.unsubscribe=()=>this.unsubscribe(a),t.signal}static source(){let t;return{token:new om(function(n){t=n}),cancel:t}}};function jx(e){return function(a){return e.apply(null,a)}}function Kx(e){return A.isObject(e)&&e.isAxiosError===!0}const wu={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(wu).forEach(([e,t])=>{wu[t]=e});function vf(e){const t=new Sr(e),a=Sp(Sr.prototype.request,t);return A.extend(a,Sr.prototype,t,{allOwnKeys:!0}),A.extend(a,t,null,{allOwnKeys:!0}),a.create=function(n){return vf(Cr(e,n))},a}const Ve=vf(ca);Ve.Axios=Sr,Ve.CanceledError=xr,Ve.CancelToken=qx,Ve.isCancel=Rd,Ve.VERSION=jc,Ve.toFormData=Dc,Ve.AxiosError=O,Ve.Cancel=Ve.CanceledError,Ve.all=function(t){return Promise.all(t)},Ve.spread=jx,Ve.isAxiosError=Kx,Ve.mergeConfig=Cr,Ve.AxiosHeaders=Xe,Ve.formToJSON=e=>Bd(A.isHTMLForm(e)?new FormData(e):e),Ve.getAdapter=ff.getAdapter,Ve.HttpStatusCode=wu,Ve.default=Ve;var Ce=Ve;const{Axios:W2,AxiosError:X2,CanceledError:Y2,isCancel:J2,CancelToken:Z2,VERSION:eS,all:tS,Cancel:rS,isAxiosError:at,spread:aS,toFormData:nS,AxiosHeaders:iS,HttpStatusCode:sS,formToJSON:oS,getAdapter:cS,mergeConfig:lS}=Ce,nt="https://api.circle.com".replace(/\/+$/,"");let zx=class extends Error{constructor(t,a){super(a),this.field=t,this.name="RequiredError"}};const it={},st="https://example.com",qt=function(e,t,a){if(a==null)throw new zx(t,`Required parameter ${t} was null or undefined when calling ${e}.`)},vt=async function(e,t){if(t&&t.accessToken){const a=typeof t.accessToken=="function"?await t.accessToken():await t.accessToken;e.Authorization="Bearer "+a}};function Au(e,t,a=""){t!=null&&(typeof t=="object"?Array.isArray(t)?t.forEach(r=>Au(e,r,a)):Object.keys(t).forEach(r=>Au(e,t[r],`${a}${a!==""?".":""}${r}`)):e.has(a)?e.append(a,t):e.set(a,t))}const ot=function(e,...t){const a=new URLSearchParams(e.search);Au(a,t),e.search=a.toString()},Tr=function(e,t,a){const r=typeof e!="string";return(r&&a&&a.isJsonMime?a.isJsonMime(t.headers["Content-Type"]):r)?JSON.stringify(e!==void 0?e:{}):e||""},ct=function(e){return e.pathname+e.search+e.hash},lt=function(e,t,a,r){return(n=t,s=a)=>{const i={...e.options,url:(r?.basePath||n.defaults.baseURL||s)+e.url};return n.request(i)}},Hx=function(e){return{getEntityConfig:async(t={})=>{const a="/v1/w3s/config/entity",r=new URL(a,st);let n;e&&(n=e.baseOptions);const s={method:"GET",...n,...t},i={},o={};await vt(i,e),ot(r,o);let c=n&&n.headers?n.headers:{};return s.headers={...i,...c,...t.headers},{url:ct(r),options:s}},getPublicKey:async(t={})=>{const a="/v1/w3s/config/entity/publicKey",r=new URL(a,st);let n;e&&(n=e.baseOptions);const s={method:"GET",...n,...t},i={},o={};await vt(i,e),ot(r,o);let c=n&&n.headers?n.headers:{};return s.headers={...i,...c,...t.headers},{url:ct(r),options:s}}}},$x=function(e){const t=Hx(e);return{async getEntityConfig(a){const r=await t.getEntityConfig(a),n=e?.serverIndex??0,s=it["DeveloperAccountApi.getEntityConfig"]?.[n]?.url;return(i,o)=>lt(r,Ce,nt,e)(i,s||o)},async getPublicKey(a){const r=await t.getPublicKey(a),n=e?.serverIndex??0,s=it["DeveloperAccountApi.getPublicKey"]?.[n]?.url;return(i,o)=>lt(r,Ce,nt,e)(i,s||o)}}},Gx=function(e,t,a){const r=$x(e);return{getEntityConfig(n){return r.getEntityConfig(n).then(s=>s(a,t))},getPublicKey(n){return r.getPublicKey(n).then(s=>s(a,t))}}},Qx=function(e){return{requestTestnetTokens:async(t,a,r={})=>{const n="/v1/faucet/drips",s=new URL(n,st);let i;e&&(i=e.baseOptions);const o={method:"POST",...i,...r},c={},l={};await vt(c,e),t!=null&&(c["X-Request-Id"]=String(t)),c["Content-Type"]="application/json",ot(s,l);let u=i&&i.headers?i.headers:{};return o.headers={...c,...u,...r.headers},o.data=Tr(a,o,e),{url:ct(s),options:o}}}},Wx=function(e){const t=Qx(e);return{async requestTestnetTokens(a,r,n){const s=await t.requestTestnetTokens(a,r,n),i=e?.serverIndex??0,o=it["FaucetApi.requestTestnetTokens"]?.[i]?.url;return(c,l)=>lt(s,Ce,nt,e)(c,o||l)}}},Xx=function(e,t,a){const r=Wx(e);return{requestTestnetTokens(n,s,i){return r.requestTestnetTokens(n,s,i).then(o=>o(a,t))}}},Yx=function(e){return{ping:async(t={})=>{const a="/ping",r=new URL(a,st);let n;e&&(n=e.baseOptions);const s={method:"GET",...n,...t},i={};ot(r,{});let o=n&&n.headers?n.headers:{};return s.headers={...i,...o,...t.headers},{url:ct(r),options:s}}}},Jx=function(e){const t=Yx(e);return{async ping(a){const r=await t.ping(a),n=e?.serverIndex??0,s=it["HealthApi.ping"]?.[n]?.url;return(i,o)=>lt(r,Ce,nt,e)(i,s||o)}}},Zx=function(e,t,a){const r=Jx(e);return{ping(n){return r.ping(n).then(s=>s(a,t))}}},ey=function(e){return{createMonitoredTokens:async(t,a={})=>{qt("createMonitoredTokens","createMonitoredTokensRequest",t);const r="/v1/w3s/config/entity/monitoredTokens",n=new URL(r,st);let s;e&&(s=e.baseOptions);const i={method:"POST",...s,...a},o={},c={};await vt(o,e),o["Content-Type"]="application/json",ot(n,c);let l=s&&s.headers?s.headers:{};return i.headers={...o,...l,...a.headers},i.data=Tr(t,i,e),{url:ct(n),options:i}},deleteMonitoredTokens:async(t,a={})=>{qt("deleteMonitoredTokens","deleteMonitoredTokensRequest",t);const r="/v1/w3s/config/entity/monitoredTokens/delete",n=new URL(r,st);let s;e&&(s=e.baseOptions);const i={method:"POST",...s,...a},o={},c={};await vt(o,e),o["Content-Type"]="application/json",ot(n,c);let l=s&&s.headers?s.headers:{};return i.headers={...o,...l,...a.headers},i.data=Tr(t,i,e),{url:ct(n),options:i}},listMonitoredTokens:async(t,a,r,n,s,i,o,c,l={})=>{const u="/v1/w3s/config/entity/monitoredTokens",p=new URL(u,st);let d;e&&(d=e.baseOptions);const x={method:"GET",...d,...l},m={},y={};await vt(m,e),t!==void 0&&(y.blockchain=t),a!==void 0&&(y.tokenAddress=a),r!==void 0&&(y.symbol=r),n!==void 0&&(y.from=n instanceof Date?n.toISOString():n),s!==void 0&&(y.to=s instanceof Date?s.toISOString():s),i!==void 0&&(y.pageBefore=i),o!==void 0&&(y.pageAfter=o),c!==void 0&&(y.pageSize=c),ot(p,y);let b=d&&d.headers?d.headers:{};return x.headers={...m,...b,...l.headers},{url:ct(p),options:x}},updateMonitoredTokens:async(t,a={})=>{qt("updateMonitoredTokens","updateMonitoredTokensRequest",t);const r="/v1/w3s/config/entity/monitoredTokens",n=new URL(r,st);let s;e&&(s=e.baseOptions);const i={method:"PUT",...s,...a},o={},c={};await vt(o,e),o["Content-Type"]="application/json",ot(n,c);let l=s&&s.headers?s.headers:{};return i.headers={...o,...l,...a.headers},i.data=Tr(t,i,e),{url:ct(n),options:i}},updateMonitoredTokensScope:async(t,a={})=>{qt("updateMonitoredTokensScope","updateMonitoredTokensScopeRequest",t);const r="/v1/w3s/config/entity/monitoredTokens/scope",n=new URL(r,st);let s;e&&(s=e.baseOptions);const i={method:"PUT",...s,...a},o={},c={};await vt(o,e),o["Content-Type"]="application/json",ot(n,c);let l=s&&s.headers?s.headers:{};return i.headers={...o,...l,...a.headers},i.data=Tr(t,i,e),{url:ct(n),options:i}}}},ty=function(e){const t=ey(e);return{async createMonitoredTokens(a,r){const n=await t.createMonitoredTokens(a,r),s=e?.serverIndex??0,i=it["MonitorTokensApi.createMonitoredTokens"]?.[s]?.url;return(o,c)=>lt(n,Ce,nt,e)(o,i||c)},async deleteMonitoredTokens(a,r){const n=await t.deleteMonitoredTokens(a,r),s=e?.serverIndex??0,i=it["MonitorTokensApi.deleteMonitoredTokens"]?.[s]?.url;return(o,c)=>lt(n,Ce,nt,e)(o,i||c)},async listMonitoredTokens(a,r,n,s,i,o,c,l,u){const p=await t.listMonitoredTokens(a,r,n,s,i,o,c,l,u),d=e?.serverIndex??0,x=it["MonitorTokensApi.listMonitoredTokens"]?.[d]?.url;return(m,y)=>lt(p,Ce,nt,e)(m,x||y)},async updateMonitoredTokens(a,r){const n=await t.updateMonitoredTokens(a,r),s=e?.serverIndex??0,i=it["MonitorTokensApi.updateMonitoredTokens"]?.[s]?.url;return(o,c)=>lt(n,Ce,nt,e)(o,i||c)},async updateMonitoredTokensScope(a,r){const n=await t.updateMonitoredTokensScope(a,r),s=e?.serverIndex??0,i=it["MonitorTokensApi.updateMonitoredTokensScope"]?.[s]?.url;return(o,c)=>lt(n,Ce,nt,e)(o,i||c)}}},ry=function(e,t,a){const r=ty(e);return{createMonitoredTokens(n,s){return r.createMonitoredTokens(n,s).then(i=>i(a,t))},deleteMonitoredTokens(n,s){return r.deleteMonitoredTokens(n,s).then(i=>i(a,t))},listMonitoredTokens(n,s,i,o,c,l,u,p,d){return r.listMonitoredTokens(n,s,i,o,c,l,u,p,d).then(x=>x(a,t))},updateMonitoredTokens(n,s){return r.updateMonitoredTokens(n,s).then(i=>i(a,t))},updateMonitoredTokensScope(n,s){return r.updateMonitoredTokensScope(n,s).then(i=>i(a,t))}}},ay=function(e){return{createSubscription:async(t,a,r={})=>{qt("createSubscription","createSubscriptionRequest",t);const n="/v2/notifications/subscriptions",s=new URL(n,st);let i;e&&(i=e.baseOptions);const o={method:"POST",...i,...r},c={},l={};await vt(c,e),a!=null&&(c["X-Request-Id"]=String(a)),c["Content-Type"]="application/json",ot(s,l);let u=i&&i.headers?i.headers:{};return o.headers={...c,...u,...r.headers},o.data=Tr(t,o,e),{url:ct(s),options:o}},deleteSubscription:async(t,a,r={})=>{qt("deleteSubscription","id",t);const n="/v2/notifications/subscriptions/{id}".replace("{id}",encodeURIComponent(String(t))),s=new URL(n,st);let i;e&&(i=e.baseOptions);const o={method:"DELETE",...i,...r},c={},l={};await vt(c,e),a!=null&&(c["X-Request-Id"]=String(a)),ot(s,l);let u=i&&i.headers?i.headers:{};return o.headers={...c,...u,...r.headers},{url:ct(s),options:o}},getNotificationSignature:async(t,a,r={})=>{qt("getNotificationSignature","id",t);const n="/v2/notifications/publicKey/{id}".replace("{id}",encodeURIComponent(String(t))),s=new URL(n,st);let i;e&&(i=e.baseOptions);const o={method:"GET",...i,...r},c={},l={};await vt(c,e),a!=null&&(c["X-Request-Id"]=String(a)),ot(s,l);let u=i&&i.headers?i.headers:{};return o.headers={...c,...u,...r.headers},{url:ct(s),options:o}},getSubscription:async(t,a,r={})=>{qt("getSubscription","id",t);const n="/v2/notifications/subscriptions/{id}".replace("{id}",encodeURIComponent(String(t))),s=new URL(n,st);let i;e&&(i=e.baseOptions);const o={method:"GET",...i,...r},c={},l={};await vt(c,e),a!=null&&(c["X-Request-Id"]=String(a)),ot(s,l);let u=i&&i.headers?i.headers:{};return o.headers={...c,...u,...r.headers},{url:ct(s),options:o}},getSubscriptions:async(t={})=>{const a="/v2/notifications/subscriptions",r=new URL(a,st);let n;e&&(n=e.baseOptions);const s={method:"GET",...n,...t},i={},o={};await vt(i,e),ot(r,o);let c=n&&n.headers?n.headers:{};return s.headers={...i,...c,...t.headers},{url:ct(r),options:s}},updateSubscription:async(t,a,r,n={})=>{qt("updateSubscription","id",t),qt("updateSubscription","updateSubscriptionRequest",a);const s="/v2/notifications/subscriptions/{id}".replace("{id}",encodeURIComponent(String(t))),i=new URL(s,st);let o;e&&(o=e.baseOptions);const c={method:"PATCH",...o,...n},l={},u={};await vt(l,e),r!=null&&(l["X-Request-Id"]=String(r)),l["Content-Type"]="application/json",ot(i,u);let p=o&&o.headers?o.headers:{};return c.headers={...l,...p,...n.headers},c.data=Tr(a,c,e),{url:ct(i),options:c}}}},ny=function(e){const t=ay(e);return{async createSubscription(a,r,n){const s=await t.createSubscription(a,r,n),i=e?.serverIndex??0,o=it["WebhookSubscriptionsApi.createSubscription"]?.[i]?.url;return(c,l)=>lt(s,Ce,nt,e)(c,o||l)},async deleteSubscription(a,r,n){const s=await t.deleteSubscription(a,r,n),i=e?.serverIndex??0,o=it["WebhookSubscriptionsApi.deleteSubscription"]?.[i]?.url;return(c,l)=>lt(s,Ce,nt,e)(c,o||l)},async getNotificationSignature(a,r,n){const s=await t.getNotificationSignature(a,r,n),i=e?.serverIndex??0,o=it["WebhookSubscriptionsApi.getNotificationSignature"]?.[i]?.url;return(c,l)=>lt(s,Ce,nt,e)(c,o||l)},async getSubscription(a,r,n){const s=await t.getSubscription(a,r,n),i=e?.serverIndex??0,o=it["WebhookSubscriptionsApi.getSubscription"]?.[i]?.url;return(c,l)=>lt(s,Ce,nt,e)(c,o||l)},async getSubscriptions(a){const r=await t.getSubscriptions(a),n=e?.serverIndex??0,s=it["WebhookSubscriptionsApi.getSubscriptions"]?.[n]?.url;return(i,o)=>lt(r,Ce,nt,e)(i,s||o)},async updateSubscription(a,r,n,s){const i=await t.updateSubscription(a,r,n,s),o=e?.serverIndex??0,c=it["WebhookSubscriptionsApi.updateSubscription"]?.[o]?.url;return(l,u)=>lt(i,Ce,nt,e)(l,c||u)}}},iy=function(e,t,a){const r=ny(e);return{createSubscription(n,s,i){return r.createSubscription(n,s,i).then(o=>o(a,t))},deleteSubscription(n,s,i){return r.deleteSubscription(n,s,i).then(o=>o(a,t))},getNotificationSignature(n,s,i){return r.getNotificationSignature(n,s,i).then(o=>o(a,t))},getSubscription(n,s,i){return r.getSubscription(n,s,i).then(o=>o(a,t))},getSubscriptions(n){return r.getSubscriptions(n).then(s=>s(a,t))},updateSubscription(n,s,i,o){return r.updateSubscription(n,s,i,o).then(c=>c(a,t))}}};var sy=Object.defineProperty,oy=(e,t,a)=>t in e?sy(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,ar=(e,t,a)=>oy(e,typeof t!="symbol"?t+"":t,a);let cy=class{constructor(t={}){ar(this,"apiKey"),ar(this,"username"),ar(this,"password"),ar(this,"accessToken"),ar(this,"basePath"),ar(this,"serverIndex"),ar(this,"baseOptions"),ar(this,"formDataCtor"),this.apiKey=t.apiKey,this.username=t.username,this.password=t.password,this.accessToken=t.accessToken,this.basePath=t.basePath,this.serverIndex=t.serverIndex,this.baseOptions=t.baseOptions,this.formDataCtor=t.formDataCtor}isJsonMime(t){const a=new RegExp("^(application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(;.*)?$","i");return t!==null&&(a.test(t)||t.toLowerCase()==="application/json-patch+json")}};var ly=Object.defineProperty,uy=(e,t,a)=>t in e?ly(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,ha=(e,t,a)=>uy(e,typeof t!="symbol"?t+"":t,a);class py{constructor(t,a,r={}){ha(this,"DeveloperAccount"),ha(this,"Faucet"),ha(this,"Health"),ha(this,"MonitorTokens"),ha(this,"WebhookSubscriptions");const n=new cy({basePath:t,baseOptions:{headers:{...r,Authorization:`Bearer ${a.apiKey}`,"Content-Type":"application/json","User-Agent":`${a.userAgent?a.userAgent+" / ":""}CircleNodeJS / Configurations / ${a.version}`}}});this.DeveloperAccount=Gx(n),this.Faucet=Xx(n),this.Health=Zx(n),this.MonitorTokens=ry(n),this.WebhookSubscriptions=iy(n)}}const gt="https://api.circle.com".replace(/\/+$/,"");class dy extends Error{constructor(t,a){super(a),this.field=t,this.name="RequiredError"}}const xt={},yt="https://example.com",It=function(e,t,a){if(a==null)throw new dy(t,`Required parameter ${t} was null or undefined when calling ${e}.`)},bt=async function(e,t){if(t&&t.accessToken){const a=typeof t.accessToken=="function"?await t.accessToken():await t.accessToken;e.Authorization="Bearer "+a}};function Iu(e,t,a=""){t!=null&&(typeof t=="object"?Array.isArray(t)?t.forEach(r=>Iu(e,r,a)):Object.keys(t).forEach(r=>Iu(e,t[r],`${a}${a!==""?".":""}${r}`)):e.has(a)?e.append(a,t):e.set(a,t))}const Et=function(e,...t){const a=new URLSearchParams(e.search);Iu(a,t),e.search=a.toString()},Xt=function(e,t,a){const r=typeof e!="string";return(r&&a&&a.isJsonMime?a.isJsonMime(t.headers["Content-Type"]):r)?JSON.stringify(e!==void 0?e:{}):e||""},Ct=function(e){return e.pathname+e.search+e.hash},St=function(e,t,a,r){return(n=t,s=a)=>{const i={...e.options,url:(r?.basePath||n.defaults.baseURL||s)+e.url};return n.request(i)}},fy=function(e){return{deployContract:async(t,a,r={})=>{It("deployContract","contractDeploymentRequest",t);const n="/v1/w3s/contracts/deploy",s=new URL(n,yt);let i;e&&(i=e.baseOptions);const o={method:"POST",...i,...r},c={},l={};await bt(c,e),a!=null&&(c["X-Request-Id"]=String(a)),c["Content-Type"]="application/json",Et(s,l);let u=i&&i.headers?i.headers:{};return o.headers={...c,...u,...r.headers},o.data=Xt(t,o,e),{url:Ct(s),options:o}},estimateContractDeploy:async(t,a,r={})=>{It("estimateContractDeploy","contractDeploymentEstimateFeeRequest",t);const n="/v1/w3s/contracts/deploy/estimateFee",s=new URL(n,yt);let i;e&&(i=e.baseOptions);const o={method:"POST",...i,...r},c={},l={};await bt(c,e),a!=null&&(c["X-Request-Id"]=String(a)),c["Content-Type"]="application/json",Et(s,l);let u=i&&i.headers?i.headers:{};return o.headers={...c,...u,...r.headers},o.data=Xt(t,o,e),{url:Ct(s),options:o}},importContract:async(t,a,r={})=>{It("importContract","importContractRequest",t);const n="/v1/w3s/contracts/import",s=new URL(n,yt);let i;e&&(i=e.baseOptions);const o={method:"POST",...i,...r},c={},l={};await bt(c,e),a!=null&&(c["X-Request-Id"]=String(a)),c["Content-Type"]="application/json",Et(s,l);let u=i&&i.headers?i.headers:{};return o.headers={...c,...u,...r.headers},o.data=Xt(t,o,e),{url:Ct(s),options:o}}}},my=function(e){const t=fy(e);return{async deployContract(a,r,n){const s=await t.deployContract(a,r,n),i=e?.serverIndex??0,o=xt["DeployImportApi.deployContract"]?.[i]?.url;return(c,l)=>St(s,Ce,gt,e)(c,o||l)},async estimateContractDeploy(a,r,n){const s=await t.estimateContractDeploy(a,r,n),i=e?.serverIndex??0,o=xt["DeployImportApi.estimateContractDeploy"]?.[i]?.url;return(c,l)=>St(s,Ce,gt,e)(c,o||l)},async importContract(a,r,n){const s=await t.importContract(a,r,n),i=e?.serverIndex??0,o=xt["DeployImportApi.importContract"]?.[i]?.url;return(c,l)=>St(s,Ce,gt,e)(c,o||l)}}},hy=function(e,t,a){const r=my(e);return{deployContract(n,s,i){return r.deployContract(n,s,i).then(o=>o(a,t))},estimateContractDeploy(n,s,i){return r.estimateContractDeploy(n,s,i).then(o=>o(a,t))},importContract(n,s,i){return r.importContract(n,s,i).then(o=>o(a,t))}}},vy=function(e){return{createEventMonitor:async(t,a,r={})=>{const n="/v1/w3s/contracts/monitors",s=new URL(n,yt);let i;e&&(i=e.baseOptions);const o={method:"POST",...i,...r},c={},l={};await bt(c,e),t!=null&&(c["X-Request-Id"]=String(t)),c["Content-Type"]="application/json",Et(s,l);let u=i&&i.headers?i.headers:{};return o.headers={...c,...u,...r.headers},o.data=Xt(a,o,e),{url:Ct(s),options:o}},deleteEventMonitor:async(t,a,r={})=>{It("deleteEventMonitor","id",t);const n="/v1/w3s/contracts/monitors/{id}".replace("{id}",encodeURIComponent(String(t))),s=new URL(n,yt);let i;e&&(i=e.baseOptions);const o={method:"DELETE",...i,...r},c={},l={};await bt(c,e),a!=null&&(c["X-Request-Id"]=String(a)),Et(s,l);let u=i&&i.headers?i.headers:{};return o.headers={...c,...u,...r.headers},{url:Ct(s),options:o}},getEventMonitors:async(t,a,r,n,s,i,o,c,l,u={})=>{const p="/v1/w3s/contracts/monitors",d=new URL(p,yt);let x;e&&(x=e.baseOptions);const m={method:"GET",...x,...u},y={},b={};await bt(y,e),t!==void 0&&(b.contractAddress=t),a!==void 0&&(b.blockchain=a),r!==void 0&&(b.eventSignature=r),n!==void 0&&(b.from=n instanceof Date?n.toISOString():n),s!==void 0&&(b.to=s instanceof Date?s.toISOString():s),i!==void 0&&(b.pageBefore=i),o!==void 0&&(b.pageAfter=o),c!==void 0&&(b.pageSize=c),l!=null&&(y["X-Request-Id"]=String(l)),Et(d,b);let C=x&&x.headers?x.headers:{};return m.headers={...y,...C,...u.headers},{url:Ct(d),options:m}},listEventLogs:async(t,a,r,n,s,i,o,c,l={})=>{const u="/v1/w3s/contracts/events",p=new URL(u,yt);let d;e&&(d=e.baseOptions);const x={method:"GET",...d,...l},m={},y={};await bt(m,e),t!==void 0&&(y.contractAddress=t),a!==void 0&&(y.blockchain=a),r!==void 0&&(y.from=r instanceof Date?r.toISOString():r),n!==void 0&&(y.to=n instanceof Date?n.toISOString():n),s!==void 0&&(y.pageBefore=s),i!==void 0&&(y.pageAfter=i),o!==void 0&&(y.pageSize=o),c!=null&&(m["X-Request-Id"]=String(c)),Et(p,y);let b=d&&d.headers?d.headers:{};return x.headers={...m,...b,...l.headers},{url:Ct(p),options:x}},updateEventMonitor:async(t,a,r,n={})=>{It("updateEventMonitor","id",t);const s="/v1/w3s/contracts/monitors/{id}".replace("{id}",encodeURIComponent(String(t))),i=new URL(s,yt);let o;e&&(o=e.baseOptions);const c={method:"PUT",...o,...n},l={},u={};await bt(l,e),a!=null&&(l["X-Request-Id"]=String(a)),l["Content-Type"]="application/json",Et(i,u);let p=o&&o.headers?o.headers:{};return c.headers={...l,...p,...n.headers},c.data=Xt(r,c,e),{url:Ct(i),options:c}}}},gy=function(e){const t=vy(e);return{async createEventMonitor(a,r,n){const s=await t.createEventMonitor(a,r,n),i=e?.serverIndex??0,o=xt["EventMonitorsApi.createEventMonitor"]?.[i]?.url;return(c,l)=>St(s,Ce,gt,e)(c,o||l)},async deleteEventMonitor(a,r,n){const s=await t.deleteEventMonitor(a,r,n),i=e?.serverIndex??0,o=xt["EventMonitorsApi.deleteEventMonitor"]?.[i]?.url;return(c,l)=>St(s,Ce,gt,e)(c,o||l)},async getEventMonitors(a,r,n,s,i,o,c,l,u,p){const d=await t.getEventMonitors(a,r,n,s,i,o,c,l,u,p),x=e?.serverIndex??0,m=xt["EventMonitorsApi.getEventMonitors"]?.[x]?.url;return(y,b)=>St(d,Ce,gt,e)(y,m||b)},async listEventLogs(a,r,n,s,i,o,c,l,u){const p=await t.listEventLogs(a,r,n,s,i,o,c,l,u),d=e?.serverIndex??0,x=xt["EventMonitorsApi.listEventLogs"]?.[d]?.url;return(m,y)=>St(p,Ce,gt,e)(m,x||y)},async updateEventMonitor(a,r,n,s){const i=await t.updateEventMonitor(a,r,n,s),o=e?.serverIndex??0,c=xt["EventMonitorsApi.updateEventMonitor"]?.[o]?.url;return(l,u)=>St(i,Ce,gt,e)(l,c||u)}}},xy=function(e,t,a){const r=gy(e);return{createEventMonitor(n,s,i){return r.createEventMonitor(n,s,i).then(o=>o(a,t))},deleteEventMonitor(n,s,i){return r.deleteEventMonitor(n,s,i).then(o=>o(a,t))},getEventMonitors(n,s,i,o,c,l,u,p,d,x){return r.getEventMonitors(n,s,i,o,c,l,u,p,d,x).then(m=>m(a,t))},listEventLogs(n,s,i,o,c,l,u,p,d){return r.listEventLogs(n,s,i,o,c,l,u,p,d).then(x=>x(a,t))},updateEventMonitor(n,s,i,o){return r.updateEventMonitor(n,s,i,o).then(c=>c(a,t))}}},yy=function(e){return{queryContract:async(t,a,r={})=>{It("queryContract","readContractStateRequest",t);const n="/v1/w3s/contracts/query",s=new URL(n,yt);let i;e&&(i=e.baseOptions);const o={method:"POST",...i,...r},c={},l={};await bt(c,e),a!=null&&(c["X-Request-Id"]=String(a)),c["Content-Type"]="application/json",Et(s,l);let u=i&&i.headers?i.headers:{};return o.headers={...c,...u,...r.headers},o.data=Xt(t,o,e),{url:Ct(s),options:o}}}},by=function(e){const t=yy(e);return{async queryContract(a,r,n){const s=await t.queryContract(a,r,n),i=e?.serverIndex??0,o=xt["InteractApi.queryContract"]?.[i]?.url;return(c,l)=>St(s,Ce,gt,e)(c,o||l)}}},Ey=function(e,t,a){const r=by(e);return{queryContract(n,s,i){return r.queryContract(n,s,i).then(o=>o(a,t))}}},Cy=function(e){return{deployContractTemplate:async(t,a,r,n={})=>{It("deployContractTemplate","id",t),It("deployContractTemplate","templateContractDeploymentRequest",a);const s="/v1/w3s/templates/{id}/deploy".replace("{id}",encodeURIComponent(String(t))),i=new URL(s,yt);let o;e&&(o=e.baseOptions);const c={method:"POST",...o,...n},l={},u={};await bt(l,e),r!=null&&(l["X-Request-Id"]=String(r)),l["Content-Type"]="application/json",Et(i,u);let p=o&&o.headers?o.headers:{};return c.headers={...l,...p,...n.headers},c.data=Xt(a,c,e),{url:Ct(i),options:c}},estimateContractTemplateDeploy:async(t,a,r,n={})=>{It("estimateContractTemplateDeploy","id",t),It("estimateContractTemplateDeploy","contractDeploymentEstimateRequest",a);const s="/v1/w3s/templates/{id}/deploy/estimateFee".replace("{id}",encodeURIComponent(String(t))),i=new URL(s,yt);let o;e&&(o=e.baseOptions);const c={method:"POST",...o,...n},l={},u={};await bt(l,e),r!=null&&(l["X-Request-Id"]=String(r)),l["Content-Type"]="application/json",Et(i,u);let p=o&&o.headers?o.headers:{};return c.headers={...l,...p,...n.headers},c.data=Xt(a,c,e),{url:Ct(i),options:c}}}},Sy=function(e){const t=Cy(e);return{async deployContractTemplate(a,r,n,s){const i=await t.deployContractTemplate(a,r,n,s),o=e?.serverIndex??0,c=xt["TemplatesApi.deployContractTemplate"]?.[o]?.url;return(l,u)=>St(i,Ce,gt,e)(l,c||u)},async estimateContractTemplateDeploy(a,r,n,s){const i=await t.estimateContractTemplateDeploy(a,r,n,s),o=e?.serverIndex??0,c=xt["TemplatesApi.estimateContractTemplateDeploy"]?.[o]?.url;return(l,u)=>St(i,Ce,gt,e)(l,c||u)}}},Ty=function(e,t,a){const r=Sy(e);return{deployContractTemplate(n,s,i,o){return r.deployContractTemplate(n,s,i,o).then(c=>c(a,t))},estimateContractTemplateDeploy(n,s,i,o){return r.estimateContractTemplateDeploy(n,s,i,o).then(c=>c(a,t))}}},wy=function(e){return{getContract:async(t,a,r={})=>{It("getContract","id",t);const n="/v1/w3s/contracts/{id}".replace("{id}",encodeURIComponent(String(t))),s=new URL(n,yt);let i;e&&(i=e.baseOptions);const o={method:"GET",...i,...r},c={},l={};await bt(c,e),a!=null&&(c["X-Request-Id"]=String(a)),Et(s,l);let u=i&&i.headers?i.headers:{};return o.headers={...c,...u,...r.headers},{url:Ct(s),options:o}},listContracts:async(t,a,r,n,s,i,o,c,l,u,p,d={})=>{const x="/v1/w3s/contracts",m=new URL(x,yt);let y;e&&(y=e.baseOptions);const b={method:"GET",...y,...d},C={},B={};await bt(C,e),t!==void 0&&(B.blockchain=t),a!==void 0&&(B.contractInputType=a),r!==void 0&&(B.deployerAddress=r),n!==void 0&&(B.name=n),s!==void 0&&(B.status=s),i!==void 0&&(B.from=i instanceof Date?i.toISOString():i),o!==void 0&&(B.to=o instanceof Date?o.toISOString():o),c!==void 0&&(B.pageBefore=c),l!==void 0&&(B.pageAfter=l),u!==void 0&&(B.pageSize=u),p!=null&&(C["X-Request-Id"]=String(p)),Et(m,B);let _=y&&y.headers?y.headers:{};return b.headers={...C,..._,...d.headers},{url:Ct(m),options:b}},updateContract:async(t,a,r,n={})=>{It("updateContract","id",t),It("updateContract","patchContractRequest",a);const s="/v1/w3s/contracts/{id}".replace("{id}",encodeURIComponent(String(t))),i=new URL(s,yt);let o;e&&(o=e.baseOptions);const c={method:"PATCH",...o,...n},l={},u={};await bt(l,e),r!=null&&(l["X-Request-Id"]=String(r)),l["Content-Type"]="application/json",Et(i,u);let p=o&&o.headers?o.headers:{};return c.headers={...l,...p,...n.headers},c.data=Xt(a,c,e),{url:Ct(i),options:c}}}},Ay=function(e){const t=wy(e);return{async getContract(a,r,n){const s=await t.getContract(a,r,n),i=e?.serverIndex??0,o=xt["ViewUpdateApi.getContract"]?.[i]?.url;return(c,l)=>St(s,Ce,gt,e)(c,o||l)},async listContracts(a,r,n,s,i,o,c,l,u,p,d,x){const m=await t.listContracts(a,r,n,s,i,o,c,l,u,p,d,x),y=e?.serverIndex??0,b=xt["ViewUpdateApi.listContracts"]?.[y]?.url;return(C,B)=>St(m,Ce,gt,e)(C,b||B)},async updateContract(a,r,n,s){const i=await t.updateContract(a,r,n,s),o=e?.serverIndex??0,c=xt["ViewUpdateApi.updateContract"]?.[o]?.url;return(l,u)=>St(i,Ce,gt,e)(l,c||u)}}},Iy=function(e,t,a){const r=Ay(e);return{getContract(n,s,i){return r.getContract(n,s,i).then(o=>o(a,t))},listContracts(n,s,i,o,c,l,u,p,d,x,m,y){return r.listContracts(n,s,i,o,c,l,u,p,d,x,m,y).then(b=>b(a,t))},updateContract(n,s,i,o){return r.updateContract(n,s,i,o).then(c=>c(a,t))}}};var By=Object.defineProperty,_y=(e,t,a)=>t in e?By(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,nr=(e,t,a)=>_y(e,typeof t!="symbol"?t+"":t,a);class Ry{constructor(t={}){nr(this,"apiKey"),nr(this,"username"),nr(this,"password"),nr(this,"accessToken"),nr(this,"basePath"),nr(this,"serverIndex"),nr(this,"baseOptions"),nr(this,"formDataCtor"),this.apiKey=t.apiKey,this.username=t.username,this.password=t.password,this.accessToken=t.accessToken,this.basePath=t.basePath,this.serverIndex=t.serverIndex,this.baseOptions=t.baseOptions,this.formDataCtor=t.formDataCtor}isJsonMime(t){const a=new RegExp("^(application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(;.*)?$","i");return t!==null&&(a.test(t)||t.toLowerCase()==="application/json-patch+json")}}const ky={Eth:"ETH",EthSepolia:"ETH-SEPOLIA",Matic:"MATIC",MaticAmoy:"MATIC-AMOY",Arb:"ARB",ArbSepolia:"ARB-SEPOLIA",Uni:"UNI",UniSepolia:"UNI-SEPOLIA",Base:"BASE",BaseSepolia:"BASE-SEPOLIA",Op:"OP",OpSepolia:"OP-SEPOLIA",Avax:"AVAX",AvaxFuji:"AVAX-FUJI",ArcTestnet:"ARC-TESTNET",Monad:"MONAD",MonadTestnet:"MONAD-TESTNET"};var Ny=Object.defineProperty,Ly=(e,t,a)=>t in e?Ny(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,va=(e,t,a)=>Ly(e,typeof t!="symbol"?t+"":t,a);class Uy{constructor(t,a,r={}){va(this,"DeployImport"),va(this,"EventMonitors"),va(this,"Interact"),va(this,"Templates"),va(this,"ViewUpdate");const n=new Ry({basePath:t,baseOptions:{headers:{...r,Authorization:`Bearer ${a.apiKey}`,"Content-Type":"application/json","User-Agent":`${a.userAgent?a.userAgent+" / ":""}CircleNodeJS / SmartContractPlatform / ${a.version}`}}});this.DeployImport=hy(n),this.EventMonitors=xy(n),this.Interact=Ey(n),this.Templates=Ty(n),this.ViewUpdate=Iy(n)}}var Py=Object.defineProperty,gf=e=>{throw TypeError(e)},Dy=(e,t,a)=>t in e?Py(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,Kr=(e,t,a)=>Dy(e,typeof t!="symbol"?t+"":t,a),xf=(e,t,a)=>t.has(e)||gf("Cannot "+a),Oy=(e,t,a)=>(xf(e,t,"read from private field"),a?a.call(e):t.get(e)),Fy=(e,t,a)=>t.has(e)?gf("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,a),My=(e,t,a,r)=>(xf(e,t,"write to private field"),r?r.call(e,a):t.set(e,a),a),Wc;class ga extends Error{constructor({message:t,code:a,url:r,method:n,error:s}){super(t),Kr(this,"code"),Kr(this,"message"),Kr(this,"url"),Kr(this,"method"),Fy(this,Wc),this.message=t??new.target.message,this.code=a??new.target.code,this.url=r,this.method=n,My(this,Wc,s)}get error(){return Oy(this,Wc)}}Wc=new WeakMap,Kr(ga,"code","UNKNOWN"),Kr(ga,"message","HTTP Error");var Vy=Object.defineProperty,qy=(e,t,a)=>t in e?Vy(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,Bu=(e,t,a)=>qy(e,typeof t!="symbol"?t+"":t,a);class E extends ga{constructor({message:t,code:a,url:r,method:n,status:s,error:i}){super({message:t,code:a,url:r,method:n,error:i}),Bu(this,"status"),this.status=s}}Bu(E,"code",-1),Bu(E,"message","HTTP Response Error");var jy=Object.defineProperty,Ky=(e,t,a)=>t in e?jy(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,yf=(e,t,a)=>Ky(e,typeof t!="symbol"?t+"":t,a);class kt extends ga{}yf(kt,"code","UNKNOWN"),yf(kt,"message","Unknown HTTP request error");var zy=Object.defineProperty,Hy=(e,t,a)=>t in e?zy(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,bf=(e,t,a)=>Hy(e,typeof t!="symbol"?t+"":t,a);class xa extends E{}bf(xa,"code",400),bf(xa,"message","Bad Request");var $y=Object.defineProperty,Gy=(e,t,a)=>t in e?$y(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,Ef=(e,t,a)=>Gy(e,typeof t!="symbol"?t+"":t,a);class ya extends E{}Ef(ya,"code",401),Ef(ya,"message","Unauthorized");var Qy=Object.defineProperty,Wy=(e,t,a)=>t in e?Qy(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,Cf=(e,t,a)=>Wy(e,typeof t!="symbol"?t+"":t,a);class ba extends E{}Cf(ba,"code",403),Cf(ba,"message","Forbidden");var Xy=Object.defineProperty,Yy=(e,t,a)=>t in e?Xy(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,Sf=(e,t,a)=>Yy(e,typeof t!="symbol"?t+"":t,a);class Ea extends E{}Sf(Ea,"code",404),Sf(Ea,"message","Not Found");var Jy=Object.defineProperty,Zy=(e,t,a)=>t in e?Jy(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,Tf=(e,t,a)=>Zy(e,typeof t!="symbol"?t+"":t,a);class Ca extends E{}Tf(Ca,"code",429),Tf(Ca,"message","Too Many Requests");var e1=Object.defineProperty,t1=(e,t,a)=>t in e?e1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,wf=(e,t,a)=>t1(e,typeof t!="symbol"?t+"":t,a);class Sa extends E{}wf(Sa,"code",500),wf(Sa,"message","Internal Server Error");var r1=Object.defineProperty,a1=(e,t,a)=>t in e?r1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,Af=(e,t,a)=>a1(e,typeof t!="symbol"?t+"":t,a);class Ta extends E{}Af(Ta,"code",501),Af(Ta,"message","Not Implemented");var n1=Object.defineProperty,i1=(e,t,a)=>t in e?n1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,If=(e,t,a)=>i1(e,typeof t!="symbol"?t+"":t,a);class wa extends E{}If(wa,"code",502),If(wa,"message","Bad Gateway");var s1=Object.defineProperty,o1=(e,t,a)=>t in e?s1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,Bf=(e,t,a)=>o1(e,typeof t!="symbol"?t+"":t,a);class Aa extends E{}Bf(Aa,"code",503),Bf(Aa,"message","Service Unavailable");var c1=Object.defineProperty,l1=(e,t,a)=>t in e?c1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,_f=(e,t,a)=>l1(e,typeof t!="symbol"?t+"":t,a);class Ia extends E{}_f(Ia,"code",504),_f(Ia,"message","Gateway Timeout");var u1=Object.defineProperty,p1=(e,t,a)=>t in e?u1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,Rf=(e,t,a)=>p1(e,typeof t!="symbol"?t+"":t,a);class Ba extends kt{}Rf(Ba,"code","ECONNREFUSED"),Rf(Ba,"message","Connection refused");var d1=Object.defineProperty,f1=(e,t,a)=>t in e?d1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,kf=(e,t,a)=>f1(e,typeof t!="symbol"?t+"":t,a);class _a extends kt{}kf(_a,"code","ETIMEDOUT"),kf(_a,"message","Connection timeout");var m1=Object.defineProperty,h1=(e,t,a)=>t in e?m1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,Nf=(e,t,a)=>h1(e,typeof t!="symbol"?t+"":t,a);class Ra extends kt{}Nf(Ra,"code","ECONNABORTED"),Nf(Ra,"message","Request timeout");var v1=Object.defineProperty,g1=(e,t,a)=>t in e?v1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,Lf=(e,t,a)=>g1(e,typeof t!="symbol"?t+"":t,a);class ka extends kt{}Lf(ka,"code","ENOTFOUND"),Lf(ka,"message","DNS lookup failed - host not found");var x1=Object.defineProperty,y1=(e,t,a)=>t in e?x1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,Uf=(e,t,a)=>y1(e,typeof t!="symbol"?t+"":t,a);class Na extends kt{}Uf(Na,"code","EAI_AGAIN"),Uf(Na,"message","DNS lookup failed - timeout");var b1=Object.defineProperty,E1=(e,t,a)=>t in e?b1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,Pf=(e,t,a)=>E1(e,typeof t!="symbol"?t+"":t,a);class La extends kt{}Pf(La,"code","ENETUNREACH"),Pf(La,"message","Network unreachable");var C1=Object.defineProperty,S1=(e,t,a)=>t in e?C1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,Df=(e,t,a)=>S1(e,typeof t!="symbol"?t+"":t,a);class Ua extends kt{}Df(Ua,"code","ECONNRESET"),Df(Ua,"message","Connection reset");var T1=Object.defineProperty,w1=(e,t,a)=>t in e?T1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,Of=(e,t,a)=>w1(e,typeof t!="symbol"?t+"":t,a);class Pa extends kt{}Of(Pa,"code","EHOSTUNREACH"),Of(Pa,"message","Host unreachable");const Ff={undefined:kt,[Ba.code]:Ba,[_a.code]:_a,[Ra.code]:Ra,[Ua.code]:Ua,[ka.code]:ka,[Na.code]:Na,[La.code]:La,[Pa.code]:Pa};function A1(e){return Ff[e]??Ff.undefined}function I1(e){return B1({code:e.code,message:e.message,url:e.config.url,method:e.config.method.toUpperCase(),error:e})}function B1({code:e,message:t,url:a,method:r,error:n}){const s=A1(e);return new s({message:t,code:e,url:a,method:r,error:n})}var _1=Object.defineProperty,R1=(e,t,a)=>t in e?_1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,f=(e,t,a)=>R1(e,typeof t!="symbol"?t+"":t,a);class _u extends E{}f(_u,"code",110700),f(_u,"message","The input amount is outside trade limit.");class Ru extends E{}f(Ru,"code",110701),f(Ru,"message","No quote is available with given input.");class ku extends E{}f(ku,"code",110702),f(ku,"message","No supported configurations with given input.");class Nu extends E{}f(Nu,"code",110703),f(Nu,"message","refId already exists, should be unique.");class Da extends E{}f(Da,"code",155101),f(Da,"message","Existing user already created with the provided userId.");class Oa extends E{}f(Oa,"code",155102),f(Oa,"message","Cannot find the user id in the system.");class Fa extends E{}f(Fa,"code",155103),f(Fa,"message","Cannot find the user token in the system.");class Ma extends E{}f(Ma,"code",155104),f(Ma,"message","The userToken had expired.");class Va extends E{}f(Va,"code",155105),f(Va,"message","The userToken is invalid.");class qa extends E{}f(qa,"code",155106),f(qa,"message","The user had already been initialized.");class ja extends E{}f(ja,"code",155107),f(ja,"message","User has previously set a PIN. Use PUT /user/pin to reset the PIN.");class Ka extends E{}f(Ka,"code",155108),f(Ka,"message","User has previously set up their security questions, and they can't be reset.");class za extends E{}f(za,"code",155109),f(za,"message","The specified user has been disabled.");class Ha extends E{}f(Ha,"code",155110),f(Ha,"message","User has not set up a PIN yet.");class $a extends E{}f($a,"code",155111),f($a,"message","User hasn't set the security questions for PIN backup yet.");class Ga extends E{}f(Ga,"code",155112),f(Ga,"message","The user has inputted the incorrect pin.");class Qa extends E{}f(Qa,"code",155113),f(Qa,"message","Provided device ID is not found in the system.");class Wa extends E{}f(Wa,"code",155114),f(Wa,"message","Provided app ID is not recognized in the system.");class Xa extends E{}f(Xa,"code",155115),f(Xa,"message","The user has inputted the incorrect security answers");class Ya extends E{}f(Ya,"code",155116),f(Ya,"message","The challenge ID doesn't exist in the system.");class Ja extends E{}f(Ja,"code",155117),f(Ja,"message","The content provided for approval is not correct.");class Za extends E{}f(Za,"code",155118),f(Za,"message","Encryption key does not match with the user's token. Call POST /users/token to get the correct token encryption key pair.");class en extends E{}f(en,"code",155119),f(en,"message","The user's PIN input is locked. It will be unlocked after the cooldown period.");class tn extends E{}f(tn,"code",155120),f(tn,"message","The user's security questions input is locked. It will be unlocked after the cooldown period.");class rn extends E{}f(rn,"code",155121),f(rn,"message","The provided challengeId has expired.");class an extends E{}f(an,"code",155122),f(an,"message","The provided challengeId is invalid");class nn extends E{}f(nn,"code",155123),f(nn,"message","No extra information provided when adding PIN-related requests.");class sn extends E{}f(sn,"code",155124),f(sn,"message","The extra information provided for PIN-related requests is invalid.");class on extends E{}f(on,"code",155130),f(on,"message","User OTP token is expired.");class cn extends E{}f(cn,"code",155131),f(cn,"message","User OTP token is invalid.");class ln extends E{}f(ln,"code",155132),f(ln,"message","User OTP value is not found.");class un extends E{}f(un,"code",155133),f(un,"message","User OTP value is invalid.");class pn extends E{}f(pn,"code",155134),f(pn,"message","User OTP value is not matched.");class dn extends E{}f(dn,"code",155135),f(dn,"message","User's email is invalid.");class fn extends E{}f(fn,"code",155136),f(fn,"message","User's email is not matched.");class mn extends E{}f(mn,"code",155137),f(mn,"message","User's device ID is invalid.");class hn extends E{}f(hn,"code",155138),f(hn,"message","Failed to send the email.");class vn extends E{}f(vn,"code",155139),f(vn,"message","The idToken / accessToken of SSO is expired.");class gn extends E{}f(gn,"code",155140),f(gn,"message","Failed to validate the idToken/ accessToken.");class xn extends E{}f(xn,"code",155141),f(xn,"message","The user has exceeded the max limit (5) of entering OTP at the moment.");class yn extends E{}f(yn,"code",155142),f(yn,"message","The max limit (5) of sending OTP has been exceeded at the moment.");class bn extends E{}f(bn,"code",155143),f(bn,"message","The device token is expired.");class En extends E{}f(En,"code",155144),f(En,"message","The device token is invalid.");class Cn extends E{}f(Cn,"code",155145),f(Cn,"message","The device token is not found.");class Sn extends E{}f(Sn,"code",155146),f(Sn,"message","The one-time password token is invalid as the user has entered it incorrectly three times.");class Tn extends E{}f(Tn,"code",155150),f(Tn,"message","The SMTP server configuration is not found.");class wn extends E{}f(wn,"code",155151),f(wn,"message","The SMTP server configuration is invalid.");class An extends E{}f(An,"code",155152),f(An,"message","The SSO provider configuration is not found.");class In extends E{}f(In,"code",155154),f(In,"message","The OTP email template is invalid.");class Bn extends E{}f(Bn,"code",155155),f(Bn,"message","The OTP email template is not found.");class _n extends E{}f(_n,"code",155156),f(_n,"message","Failed to update the email template.");class Rn extends E{}f(Rn,"code",155157),f(Rn,"message","Failed to update the SMTP server configuration.");class kn extends E{}f(kn,"code",155158),f(kn,"message","Failed to dial to the SMTP server.");class Nn extends E{}f(Nn,"code",155159),f(Nn,"message","Failed to auth to the SMTP server.");class Ln extends E{}f(Ln,"code",155160),f(Ln,"message","Failed to send to the SMTP server.");class Un extends E{}f(Un,"code",155201),f(Un,"message","Not enough funds to fulfill the withdraw request.");class Pn extends E{}f(Pn,"code",155202),f(Pn,"message","Transaction nonce is inconsistent with sender's latest nonce.");class Dn extends E{}f(Dn,"code",155203),f(Dn,"message","User op nonce can not be larger than 0 when the smart contract wallet hasn't been deployed.");class On extends E{}f(On,"code",155204),f(On,"message","The total cost of executing transaction is higher than the balance of the user's account when estimating fee.");class Fn extends E{}f(Fn,"code",155205),f(Fn,"message","Failed to execute this request on EVM due to insufficient tokens when the estimating gas fee.");class Mn extends E{}f(Mn,"code",155206),f(Mn,"message","The sender address is not the token owner or the sender wasn't approved to commit this transaction.");class Vn extends E{}f(Vn,"code",155207),f(Vn,"message","Gas required exceeds the maximum allowance for the account. This is based on the gas fee estimate amount.");class qn extends E{}f(qn,"code",155208),f(qn,"message","Estimate fee execution reverted.");class jn extends E{}f(jn,"code",155209),f(jn,"message","ABI function signature can't pack ABI parameter.");class Kn extends E{}f(Kn,"code",155210),f(Kn,"message","Fails to perform transaction estimation.");class zn extends E{}f(zn,"code",155211),f(zn,"message","MaxFee * GasLimit exceeded the maximum permitted transaction gas fee.");class Hn extends E{}f(Hn,"code",155215),f(Hn,"message","Unsupported operation for transaction.");class $n extends E{}f($n,"code",155218),f($n,"message","Invalid number of nft in transaction request.");class Gn extends E{}f(Gn,"code",155219),f(Gn,"message","Invalid destination address.");class Qn extends E{}f(Qn,"code",155220),f(Qn,"message","Wallet and token's blockchain mismatch.");class Wn extends E{}f(Wn,"code",155221),f(Wn,"message","Invalid amounts in transfer request.");class Xn extends E{}f(Xn,"code",155222),f(Xn,"message","NFT metadata can not be found.");class Yn extends E{}f(Yn,"code",155223),f(Yn,"message","Unsupported userId for get transactions.");class Jn extends E{}f(Jn,"code",155224),f(Jn,"message","Failed to parse the provided amounts in request to decimals.");class Zn extends E{}f(Zn,"code",155225),f(Zn,"message","Wallet and request's blockchain mismatch.");class ei extends E{}f(ei,"code",155226),f(ei,"message","Invalid source address.");class ti extends E{}f(ti,"code",155227),f(ti,"message","Invalid transaction type.");class ri extends E{}f(ri,"code",155228),f(ri,"message","Missing token ID.");class ai extends E{}f(ai,"code",155229),f(ai,"message","Transaction is not eligible for operation.");class ni extends E{}f(ni,"code",155230),f(ni,"message","No abi signature provided.");class ii extends E{}f(ii,"code",155231),f(ii,"message","Transaction needs feeLevel or gasLimit provided.");class si extends E{}f(si,"code",155232),f(si,"message","SCA transaction needs feeLevel provided.");class oi extends E{}f(oi,"code",155233),f(oi,"message","Provided gasLimit is too low to complete the requested transaction.");class ci extends E{}f(ci,"code",155234),f(ci,"message","Transaction can't have both feeLevel and fee parameters provided.");class li extends E{}f(li,"code",155235),f(li,"message","EIP1559 chains need maxFee/priorityFee provided.");class ui extends E{}f(ui,"code",155236),f(ui,"message","The provided fee in request is invalid.");class pi extends E{}f(pi,"code",155237),f(pi,"message","PriorityFee cannot be larger than maxFee in creating transaction request.");class di extends E{}f(di,"code",155238),f(di,"message","Non-EIP1559 chains need gasPrice provided.");class fi extends E{}f(fi,"code",155239),f(fi,"message","Invalid token address for transfer.");class mi extends E{}f(mi,"code",155240),f(mi,"message","Invalid token standard for transfer.");class hi extends E{}f(hi,"code",155241),f(hi,"message","Invalid token decimal for transfer.");class vi extends E{}f(vi,"code",155242),f(vi,"message","The lengths of amounts and nft tokens don't match.");class gi extends E{}f(gi,"code",155243),f(gi,"message","Missing bytecode for contract deployment.");class xi extends E{}f(xi,"code",155244),f(xi,"message","Cannot provide both WalletID and SourceAddress/Blockchain.");class yi extends E{}f(yi,"code",155245),f(yi,"message","Invalid amount in contract execution request.");class bi extends E{}f(bi,"code",155247),f(bi,"message","Cannot provide both CallData and AbiFunctionSignature/AbiParameters.");class Ei extends E{}f(Ei,"code",155254),f(Ei,"message","Non-EIP1559 chains don't support maxFee/priorityFee.");class Ci extends E{}f(Ci,"code",155257),f(Ci,"message","the transfer amount is insufficient to make the destination account rent exempted or the balance of the source account is insufficient to remain rent exempted. The source address's remaining balance after transfer must be either zero or above the rent exemption threshold.");class Si extends E{}f(Si,"code",155258),f(Si,"message","The asset amount owned by the wallet is insufficient for the transaction.");class Ti extends E{}f(Ti,"code",155262),f(Ti,"message","Account is not found, could be caused by transacting from a Solana account with zero balance.");class wi extends E{}f(wi,"code",155264),f(wi,"message","Wait for pending transactions to be included on the blockchain before submitting new requests. EVM chains restrict the number of queued transactions per sender address.");class Ai extends E{}f(Ai,"code",155501),f(Ai,"message","Frozen wallets can not be updated or interact with, only query.");class Ii extends E{}f(Ii,"code",155502),f(Ii,"message","Max amount of wallets (tentative 1M) reached under 1 wallet set.");class Bi extends E{}f(Bi,"code",155503),f(Bi,"message","Metadata array length needs to match wallet count in create developer wallets request.");class _i extends E{}f(_i,"code",155504),f(_i,"message","Metadata array length needs to match number of blockchains in create user wallets request.");class Ri extends E{}f(Ri,"code",155505),f(Ri,"message","SCA wallet needs to wait for first-time transaction to be queued before processing more transactions.");class ki extends E{}f(ki,"code",155506),f(ki,"message","SCA wallet config is invalid.");class Ni extends E{}f(Ni,"code",155507),f(Ni,"message","SCA account is not supported on the given blockchain.");class Li extends E{}f(Li,"code",155508),f(Li,"message","Can't create multiple user-controlled SCA wallets across multiple blockchains at a time.");class Ui extends E{}f(Ui,"code",155509),f(Ui,"message","Entity needs to setup paymaster policy in developer console before sending transaction on mainnet");class Pi extends E{}f(Pi,"code",155510),f(Pi,"message","The operation is not supported on the blockchain you specify.");class Di extends E{}f(Di,"code",155511),f(Di,"message","Blockchain is not supported for wallet creation.");class Oi extends E{}f(Oi,"code",155512),f(Oi,"message","The owner of the SCA wallet can not be found.");class Fi extends E{}f(Fi,"code",155514),f(Fi,"message","circle_4337_v1 SCA wallet must be deployed before being upgraded.");class Mi extends E{}f(Mi,"code",155515),f(Mi,"message","The provided wallet account type is not supported by this API.");class Vi extends E{}f(Vi,"code",155516),f(Vi,"message","The source wallet was originally created on an SCA version that does not support wallet derivation.");class qi extends E{}f(qi,"code",155517),f(qi,"message","The SCA wallet is not deployed onchain.");class ji extends E{}f(ji,"code",155601),f(ji,"message","Failed to retrieve wallet set which already exists.");class Ki extends E{}f(Ki,"code",155701),f(Ki,"message","User canceled");class zi extends E{}f(zi,"code",155702),f(zi,"message","<Launch UI failed reason>");class Hi extends E{}f(Hi,"code",155703),f(Hi,"message","The code you entered is not the same as the first one.");class $i extends E{}f($i,"code",155704),f($i,"message","Your PIN can't have repeating or consecutive numbers.");class Gi extends E{}f(Gi,"code",155705),f(Gi,"message","Your hint can't be the same as the answer.");class Qi extends E{}f(Qi,"code",155706),f(Qi,"message","Network error");class Wi extends E{}f(Wi,"code",155707),f(Wi,"message","Failed to encrypt data");class Xi extends E{}f(Xi,"code",155708),f(Xi,"message",'"Biometrics instead of PIN" is disabled');class Yi extends E{}f(Yi,"code",155709),f(Yi,"message","The device system doesn't support biometrics");class Ji extends E{}f(Ji,"code",155710),f(Ji,"message","Failed to decrypt biometrics key");class Zi extends E{}f(Zi,"code",155711),f(Zi,"message","The user has not enabled biometrics yet");class es extends E{}f(es,"code",155712),f(es,"message","The user refused to enable biometrics");class ts extends E{}f(ts,"code",155713),f(ts,"message","Too many requests. Try again later");class rs extends E{}f(rs,"code",155714),f(rs,"message","Too many requests. The biometrics sensor on the device is locked.");class as extends E{}f(as,"code",155715),f(as,"message","The user didn't enable biometrics");class ns extends E{}f(ns,"code",155716),f(ns,"message","Unexpected error for biometrics");class is extends E{}f(is,"code",155717),f(is,"message","User secret is missing.");class ss extends E{}f(ss,"code",155718),f(ss,"message","User secret is invalid.");class os extends E{}f(os,"code",155719),f(os,"message","User token and SDK API execute function does not match.");class cs extends E{}f(cs,"code",155720),f(cs,"message","Social login failed.");class ls extends E{}f(ls,"code",155721),f(ls,"message","Login info is missing.");class us extends E{}f(us,"code",155801),f(us,"message","Transaction or rawTransaction is invalid.");class ps extends E{}f(ps,"code",155802),f(ps,"message","Account not found.");class ds extends E{}f(ds,"code",155803),f(ds,"message","Not signer account.");class fs extends E{}f(fs,"code",155804),f(fs,"message","Transaction already signed.");class ms extends E{}f(ms,"code",155805),f(ms,"message","Transaction failed to deserialize.");class hs extends E{}f(hs,"code",155806),f(hs,"message","The transaction size exceeds blockchain limit.");class vs extends E{}f(vs,"code",155807),f(vs,"message","The chain ID is not supported for signing.");class gs extends E{}f(gs,"code",155808),f(gs,"message","The chain ID is missing in sign request.");class xs extends E{}f(xs,"code",156001),f(xs,"message","Cannot find target wallet in the system. Either the specified wallet doesn't exist or it's not accessible to the caller.");class ys extends E{}f(ys,"code",156002),f(ys,"message","Cannot find target token in the system. Either the specified token doesn't exist or it's not accessible to the caller.");class bs extends E{}f(bs,"code",156003),f(bs,"message","Cannot find target transaction in the system. Either the specified transaction doesn't exist or it's not accessible to the caller.");class Es extends E{}f(Es,"code",156004),f(Es,"message","Reusing an entity secret ciphertext is not allowed. Please re-encrypt the entity secret to generate new ciphertext.");class Cs extends E{}f(Cs,"code",156005),f(Cs,"message","Cannot find target wallet set in the system. Either no such wallet set, or it's not accessible to the caller.");class Ss extends E{}f(Ss,"code",156006),f(Ss,"message","TEST_API key cannot be used with blockchain mainnets, or LIVE_API key cannot be used with blockchain testnets.");class Ts extends E{}f(Ts,"code",156007),f(Ts,"message","TEST_API key or LIVE_API key is not found for the request.");class ws extends E{}f(ws,"code",156008),f(ws,"message","Cannot find target entity config in the system. Either no such entity config, or it's not accessible to the caller.");class As extends E{}f(As,"code",156009),f(As,"message","Fail to parse id as UUID in url.");class Is extends E{}f(Is,"code",156010),f(Is,"message","Cannot find the corresponding entity in the system.");class Bs extends E{}f(Bs,"code",156011),f(Bs,"message","Cannot find target nftTokenId in the system.");class _s extends E{}f(_s,"code",156012),f(_s,"message","Cannot find corresponding pagination cursor in the system.");class Rs extends E{}f(Rs,"code",156013),f(Rs,"message","The provided entity secret is invalid.");class ks extends E{}f(ks,"code",156014),f(ks,"message","Pagination params are invalid. Only UUID format is supported for pageBefore and pageAfter.");class Ns extends E{}f(Ns,"code",156015),f(Ns,"message","The secret for this entity has already been set.");class Ls extends E{}f(Ls,"code",156016),f(Ls,"message","The entity secret has not been set yet. Please provide encrypted ciphertext in the console.");class Us extends E{}f(Us,"code",156017),f(Us,"message","The specified blockchain parameters are incorrect.");class Ps extends E{}f(Ps,"code",156018),f(Ps,"message","The uploaded recovery file is invalid.");class Ds extends E{}f(Ds,"code",156019),f(Ds,"message","Current entity secret is invalid. Please rotate the entity secret first.");class Os extends E{}f(Os,"code",156020),f(Os,"message","Please use a new idempotency key.");class Fs extends E{}f(Fs,"code",156021),f(Fs,"message","A new wallet set ID is required.");class Ms extends E{}f(Ms,"code",156023),f(Ms,"message","EncodedByHex is true in sign request, but the message is not hex encoded.");class Vs extends E{}f(Vs,"code",156024),f(Vs,"message","Data is not a valid JSON string in sign request.");class qs extends E{}f(qs,"code",156025),f(qs,"message","Invalid message in request.");class js extends E{}f(js,"code",156026),f(js,"message","Invalid typed data in request.");class Ks extends E{}f(Ks,"code",156027),f(Ks,"message","The specified blockchain is either not supported or deprecated.");class zs extends E{}f(zs,"code",156030),f(zs,"message","Invalid unsigned delegate action in request.");class Hs extends E{}f(Hs,"code",156031),f(Hs,"message","The specified token address is not supported.");class $s extends E{}f($s,"code",156032),f($s,"message","The provided amount is invalid.");class Gs extends E{}f(Gs,"code",175001),f(Gs,"message","contract not found");class Qs extends E{}f(Qs,"code",175002),f(Qs,"message","no ABI JSON for the target contract");class Ws extends E{}f(Ws,"code",175003),f(Ws,"message","constructor parameters length must match constructor signature");class Xs extends E{}f(Xs,"code",175004),f(Xs,"message","contract already exists");class Ys extends E{}f(Ys,"code",175005),f(Ys,"message","address is not a contract address");class Js extends E{}f(Js,"code",175006),f(Js,"message","contract is archived");class Zs extends E{}f(Zs,"code",175007),f(Zs,"message","invalid ABI JSON");class eo extends E{}f(eo,"code",175008),f(eo,"message","multi-layered proxies are not supported");class to extends E{}f(to,"code",175009),f(to,"message","contract deployment pending");class ro extends E{}f(ro,"code",175010),f(ro,"message","ABI function not found");class ao extends E{}f(ao,"code",175011),f(ao,"message","empty update on a contract");class no extends E{}f(no,"code",175012),f(no,"message","unable to query contract");class io extends E{}f(io,"code",175013),f(io,"message","ABI function is not supported");class so extends E{}f(so,"code",175201),f(so,"message","template not found");class oo extends E{}f(oo,"code",175202),f(oo,"message","deploying this template is temporarily disabled");class co extends E{}f(co,"code",175203),f(co,"message","invalid template deployment parameter");class lo extends E{}f(lo,"code",175204),f(lo,"message","missing required template deployment parameter");class uo extends E{}f(uo,"code",175205),f(uo,"message","estimation is not supported");class po extends E{}f(po,"code",175301),f(po,"message","event subscription not found");class fo extends E{}f(fo,"code",175302),f(fo,"message","event subscription already exists");class mo extends E{}f(mo,"code",175303),f(mo,"message","the specified event signature does not exist");class ho extends E{}f(ho,"code",175401),f(ho,"message","failed to parse id as UUID in url");class vo extends E{}f(vo,"code",175402),f(vo,"message","the specified blockchain is either not supported or deprecated");class go extends E{}f(go,"code",175403),f(go,"message","please use a new idempotency key");class xo extends E{}f(xo,"code",175404),f(xo,"message","TEST_API key cannot be used with blockchain mainnets, or LIVE_API key cannot be used with blockchain testnets");class yo extends E{}f(yo,"code",175405),f(yo,"message","TEST_API key or LIVE_API key is not found for the request");class bo extends E{}f(bo,"code",175406),f(bo,"message","this feature is temporarily disabled");class Eo extends E{}f(Eo,"code",175407),f(Eo,"message","the specified blockchain is currently unavailable");class Co extends E{}f(Co,"code",175408),f(Co,"message","can not find corresponding pagination cursor in the system");class So extends E{}f(So,"code",175409),f(So,"message","restricted entity cannot perform this operation");class To extends E{}f(To,"code",175410),f(To,"message","invalid address format");class wo extends E{}f(wo,"code",177001),f(wo,"message","transaction nonce is inconsistent with sender's latest nonce");class Ao extends E{}f(Ao,"code",177002),f(Ao,"message","user op nonce can not be larger than 0 when smart contract wallet hasn't been deployed");class Io extends E{}f(Io,"code",177003),f(Io,"message","failed to execute this request on EVM due to insufficient token when estimating fee");class Bo extends E{}f(Bo,"code",177004),f(Bo,"message","the total cost of executing transaction is higher than the balance of the user's account when estimating fee");class _o extends E{}f(_o,"code",177005),f(_o,"message","the sender address is not token owner or approved when estimating token transfer");class Ro extends E{}f(Ro,"code",177006),f(Ro,"message","gas required exceeds allowance when estimating fee");class ko extends E{}f(ko,"code",177007),f(ko,"message","estimate fee execution reverted");class No extends E{}f(No,"code",177008),f(No,"message","ABI function signature can't pack ABI parameter");class Lo extends E{}f(Lo,"code",177009),f(Lo,"message","fails to perform transaction estimation");class Uo extends E{}f(Uo,"code",177010),f(Uo,"message","MaxFee * GasLimit exceeds configurable max transaction fee (default is 1 native token)");class Po extends E{}f(Po,"code",177011),f(Po,"message","transaction needs feeLevel or gasLimit provided");class Do extends E{}f(Do,"code",177012),f(Do,"message","SCA transaction needs feeLevel provided");class Oo extends E{}f(Oo,"code",177013),f(Oo,"message","EIP1559 chains need maxFee/priorityFee provided");class Fo extends E{}f(Fo,"code",177014),f(Fo,"message","priorityFee cannot be larger than maxFee in creating transaction request");class Mo extends E{}f(Mo,"code",177015),f(Mo,"message","missing bytecode for contract deployment");class Vo extends E{}f(Vo,"code",177016),f(Vo,"message","cannot provide both WalletID and SourceAddress/Blockchain");class qo extends E{}f(qo,"code",177017),f(qo,"message","invalid amount in contract execution request");class jo extends E{}f(jo,"code",177018),f(jo,"message","policy is not activated and cannot be used");class Ko extends E{}f(Ko,"code",177019),f(Ko,"message","exceeded max daily transaction of the policy");class zo extends E{}f(zo,"code",177020),f(zo,"message","exceeded max spend USD per transaction of the policy");class Ho extends E{}f(Ho,"code",177021),f(Ho,"message","exceeded max spend USD daily of the policy");class $o extends E{}f($o,"code",177022),f($o,"message","exceeded max native token daily of the policy");class Go extends E{}f(Go,"code",177023),f(Go,"message","sender is in policy blocklist");class Qo extends E{}f(Qo,"code",177024),f(Qo,"message","Wallet and request's blockchain mismatch.");class Wo extends E{}f(Wo,"code",177025),f(Wo,"message","the asset amount owned by the wallet is insufficient for the transaction");class Xo extends E{}f(Xo,"code",177026),f(Xo,"message","Wait for pending transactions to be included on the blockchain before submitting new requests. EVM chains restrict the number of queued transactions per sender address.");class Yo extends E{}f(Yo,"code",177301),f(Yo,"message","wallet is Frozen");class Jo extends E{}f(Jo,"code",177302),f(Jo,"message","invalid sca wallet config");class Zo extends E{}f(Zo,"code",177303),f(Zo,"message","SCA wallet first-time transaction is still in progress");class ec extends E{}f(ec,"code",177304),f(ec,"message","SCA account is not supported on the given blockchain");class tc extends E{}f(tc,"code",177305),f(tc,"message","entity is not eligible for SCA account creation. Please check paymaster policy setup");class rc extends E{}f(rc,"code",177601),f(rc,"message","cannot find target wallet in the system. Either the specified wallet doesn't exist or it's not accessible to the caller");class ac extends E{}f(ac,"code",177602),f(ac,"message","reusing an entity secret ciphertext is not allowed. Please re-encrypt the entity secret to generate new ciphertext");class nc extends E{}f(nc,"code",177603),f(nc,"message","cannot find the corresponding entity in the system");class ic extends E{}f(ic,"code",177604),f(ic,"message","the provided entity secret is invalid");class sc extends E{}f(sc,"code",177605),f(sc,"message","the entity secret has not been set yet. Please provide encrypted ciphertext in the console");class oc extends E{}f(oc,"code",177606),f(oc,"message","current entity secret is invalid. Please rotate the entity secret first");class cc extends E{}f(cc,"code",177607),f(cc,"message","please use a new idempotency key");class lc extends E{}f(lc,"code",177901),f(lc,"message","smart contract query failed");const Mf={undefined:E,[xa.code]:xa,[ya.code]:ya,[ba.code]:ba,[Ea.code]:Ea,[Ca.code]:Ca,[Sa.code]:Sa,[Ta.code]:Ta,[wa.code]:wa,[Aa.code]:Aa,[Ia.code]:Ia,[Da.code]:Da,[Oa.code]:Oa,[Fa.code]:Fa,[Ma.code]:Ma,[Va.code]:Va,[qa.code]:qa,[ja.code]:ja,[Ka.code]:Ka,[za.code]:za,[Ha.code]:Ha,[$a.code]:$a,[Ga.code]:Ga,[Qa.code]:Qa,[Wa.code]:Wa,[Xa.code]:Xa,[Ya.code]:Ya,[Ja.code]:Ja,[Za.code]:Za,[en.code]:en,[tn.code]:tn,[rn.code]:rn,[an.code]:an,[nn.code]:nn,[sn.code]:sn,[on.code]:on,[cn.code]:cn,[ln.code]:ln,[un.code]:un,[pn.code]:pn,[dn.code]:dn,[fn.code]:fn,[mn.code]:mn,[hn.code]:hn,[vn.code]:vn,[gn.code]:gn,[xn.code]:xn,[yn.code]:yn,[bn.code]:bn,[En.code]:En,[Cn.code]:Cn,[Sn.code]:Sn,[Tn.code]:Tn,[wn.code]:wn,[An.code]:An,[In.code]:In,[Bn.code]:Bn,[_n.code]:_n,[Rn.code]:Rn,[kn.code]:kn,[Nn.code]:Nn,[Ln.code]:Ln,[Un.code]:Un,[Pn.code]:Pn,[Dn.code]:Dn,[On.code]:On,[Fn.code]:Fn,[Mn.code]:Mn,[Vn.code]:Vn,[qn.code]:qn,[jn.code]:jn,[Kn.code]:Kn,[zn.code]:zn,[Hn.code]:Hn,[$n.code]:$n,[Gn.code]:Gn,[Qn.code]:Qn,[Wn.code]:Wn,[Xn.code]:Xn,[Yn.code]:Yn,[Jn.code]:Jn,[Zn.code]:Zn,[ei.code]:ei,[ti.code]:ti,[ri.code]:ri,[ai.code]:ai,[ni.code]:ni,[ii.code]:ii,[si.code]:si,[oi.code]:oi,[ci.code]:ci,[li.code]:li,[ui.code]:ui,[pi.code]:pi,[di.code]:di,[fi.code]:fi,[mi.code]:mi,[hi.code]:hi,[vi.code]:vi,[gi.code]:gi,[xi.code]:xi,[yi.code]:yi,[bi.code]:bi,[Ei.code]:Ei,[Ci.code]:Ci,[Si.code]:Si,[Ti.code]:Ti,[wi.code]:wi,[Ai.code]:Ai,[Ii.code]:Ii,[Bi.code]:Bi,[_i.code]:_i,[Ri.code]:Ri,[ki.code]:ki,[Ni.code]:Ni,[Li.code]:Li,[Ui.code]:Ui,[Pi.code]:Pi,[Di.code]:Di,[Oi.code]:Oi,[Fi.code]:Fi,[Mi.code]:Mi,[Vi.code]:Vi,[qi.code]:qi,[ji.code]:ji,[Ki.code]:Ki,[zi.code]:zi,[Hi.code]:Hi,[$i.code]:$i,[Gi.code]:Gi,[Qi.code]:Qi,[Wi.code]:Wi,[Xi.code]:Xi,[Yi.code]:Yi,[Ji.code]:Ji,[Zi.code]:Zi,[es.code]:es,[ts.code]:ts,[rs.code]:rs,[as.code]:as,[ns.code]:ns,[is.code]:is,[ss.code]:ss,[os.code]:os,[cs.code]:cs,[ls.code]:ls,[us.code]:us,[ps.code]:ps,[ds.code]:ds,[fs.code]:fs,[ms.code]:ms,[hs.code]:hs,[vs.code]:vs,[gs.code]:gs,[xs.code]:xs,[ys.code]:ys,[bs.code]:bs,[Es.code]:Es,[Cs.code]:Cs,[Ss.code]:Ss,[Ts.code]:Ts,[ws.code]:ws,[As.code]:As,[Is.code]:Is,[Bs.code]:Bs,[_s.code]:_s,[Rs.code]:Rs,[ks.code]:ks,[Ns.code]:Ns,[Ls.code]:Ls,[Us.code]:Us,[Ps.code]:Ps,[Ds.code]:Ds,[Os.code]:Os,[Fs.code]:Fs,[Ms.code]:Ms,[Vs.code]:Vs,[qs.code]:qs,[js.code]:js,[Ks.code]:Ks,[zs.code]:zs,[Hs.code]:Hs,[$s.code]:$s,[Gs.code]:Gs,[Qs.code]:Qs,[Ws.code]:Ws,[Xs.code]:Xs,[Ys.code]:Ys,[Js.code]:Js,[Zs.code]:Zs,[eo.code]:eo,[to.code]:to,[ro.code]:ro,[ao.code]:ao,[no.code]:no,[io.code]:io,[so.code]:so,[oo.code]:oo,[co.code]:co,[lo.code]:lo,[uo.code]:uo,[po.code]:po,[fo.code]:fo,[mo.code]:mo,[ho.code]:ho,[vo.code]:vo,[go.code]:go,[xo.code]:xo,[yo.code]:yo,[bo.code]:bo,[Eo.code]:Eo,[Co.code]:Co,[So.code]:So,[To.code]:To,[wo.code]:wo,[Ao.code]:Ao,[Io.code]:Io,[Bo.code]:Bo,[_o.code]:_o,[Ro.code]:Ro,[ko.code]:ko,[No.code]:No,[Lo.code]:Lo,[Uo.code]:Uo,[Po.code]:Po,[Do.code]:Do,[Oo.code]:Oo,[Fo.code]:Fo,[Mo.code]:Mo,[Vo.code]:Vo,[qo.code]:qo,[jo.code]:jo,[Ko.code]:Ko,[zo.code]:zo,[Ho.code]:Ho,[$o.code]:$o,[Go.code]:Go,[Qo.code]:Qo,[Wo.code]:Wo,[Xo.code]:Xo,[Yo.code]:Yo,[Jo.code]:Jo,[Zo.code]:Zo,[ec.code]:ec,[tc.code]:tc,[rc.code]:rc,[ac.code]:ac,[nc.code]:nc,[ic.code]:ic,[sc.code]:sc,[oc.code]:oc,[cc.code]:cc,[lc.code]:lc};function k1(e){return Mf[e]??Mf.undefined}function N1(e){const t=e.response.data,a=e.response.status;return L1({code:t?.code??a,status:a,message:t?.message,url:e.config.url,method:e.config.method.toUpperCase(),error:e})}function L1({code:e,status:t,message:a,url:r,method:n,error:s}){const i=k1(e);return new i({message:a,code:e,url:r,method:n,status:t,error:s})}function rt(e){return e.response?N1(e):I1(e)}const Tt=e=>{const{data:t,headers:a,...r}=e;return{...r,data:t.data,headers:a}},U1=({configurationsClient:e})=>async()=>{try{return Tt(await e.DeveloperAccount.getPublicKey())}catch(t){throw at(t)?rt(t):t}};var P1=Object.defineProperty,D1=(e,t,a)=>t in e?P1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,O1=(e,t,a)=>D1(e,typeof t!="symbol"?t+"":t,a);class F1{constructor(){O1(this,"data",{})}get(t){return Promise.resolve(this.data[t]??void 0)}set(t,a){return a===void 0?delete this.data[t]:this.data[t]=a,Promise.resolve()}}var ae={options:{usePureJavaScript:!1}},Lu={},M1=Lu,Vf={};Lu.encode=function(e,t,a){if(typeof t!="string")throw new TypeError('"alphabet" must be a string.');if(a!==void 0&&typeof a!="number")throw new TypeError('"maxline" must be a number.');var r="";if(!(e instanceof Uint8Array))r=V1(e,t);else{var n=0,s=t.length,i=t.charAt(0),o=[0];for(n=0;n<e.length;++n){for(var c=0,l=e[n];c<o.length;++c)l+=o[c]<<8,o[c]=l%s,l=l/s|0;for(;l>0;)o.push(l%s),l=l/s|0}for(n=0;e[n]===0&&n<e.length-1;++n)r+=i;for(n=o.length-1;n>=0;--n)r+=t[o[n]]}if(a){var u=new RegExp(".{1,"+a+"}","g");r=r.match(u).join(`\r
|
|
26
|
-
`)}return r},Lu.decode=function(e,t){if(typeof e!="string")throw new TypeError('"input" must be a string.');if(typeof t!="string")throw new TypeError('"alphabet" must be a string.');var a=Vf[t];if(!a){a=Vf[t]=[];for(var r=0;r<t.length;++r)a[t.charCodeAt(r)]=r}e=e.replace(/\s/g,"");for(var n=t.length,s=t.charAt(0),i=[0],r=0;r<e.length;r++){var o=a[e.charCodeAt(r)];if(o===void 0)return;for(var c=0,l=o;c<i.length;++c)l+=i[c]*n,i[c]=l&255,l>>=8;for(;l>0;)i.push(l&255),l>>=8}for(var u=0;e[u]===s&&u<e.length-1;++u)i.push(0);return typeof Buffer<"u"?Buffer.from(i.reverse()):new Uint8Array(i.reverse())};function V1(e,t){var a=0,r=t.length,n=t.charAt(0),s=[0];for(a=0;a<e.length();++a){for(var i=0,o=e.at(a);i<s.length;++i)o+=s[i]<<8,s[i]=o%r,o=o/r|0;for(;o>0;)s.push(o%r),o=o/r|0}var c="";for(a=0;e.at(a)===0&&a<e.length()-1;++a)c+=n;for(a=s.length-1;a>=0;--a)c+=t[s[a]];return c}var qf=ae,jf=M1,w=qf.util=qf.util||{};(function(){if(typeof process<"u"&&process.nextTick&&!process.browser){w.nextTick=process.nextTick,typeof setImmediate=="function"?w.setImmediate=setImmediate:w.setImmediate=w.nextTick;return}if(typeof setImmediate=="function"){w.setImmediate=function(){return setImmediate.apply(void 0,arguments)},w.nextTick=function(i){return setImmediate(i)};return}if(w.setImmediate=function(i){setTimeout(i,0)},typeof window<"u"&&typeof window.postMessage=="function"){let i=function(o){if(o.source===window&&o.data===e){o.stopPropagation();var c=t.slice();t.length=0,c.forEach(function(l){l()})}};var e="forge.setImmediate",t=[];w.setImmediate=function(o){t.push(o),t.length===1&&window.postMessage(e,"*")},window.addEventListener("message",i,!0)}if(typeof MutationObserver<"u"){var a=Date.now(),r=!0,n=document.createElement("div"),t=[];new MutationObserver(function(){var o=t.slice();t.length=0,o.forEach(function(c){c()})}).observe(n,{attributes:!0});var s=w.setImmediate;w.setImmediate=function(o){Date.now()-a>15?(a=Date.now(),s(o)):(t.push(o),t.length===1&&n.setAttribute("a",r=!r))}}w.nextTick=w.setImmediate})(),w.isNodejs=typeof process<"u"&&process.versions&&process.versions.node,w.globalScope=(function(){return w.isNodejs?eh:typeof self>"u"?window:self})(),w.isArray=Array.isArray||function(e){return Object.prototype.toString.call(e)==="[object Array]"},w.isArrayBuffer=function(e){return typeof ArrayBuffer<"u"&&e instanceof ArrayBuffer},w.isArrayBufferView=function(e){return e&&w.isArrayBuffer(e.buffer)&&e.byteLength!==void 0};function uc(e){if(!(e===8||e===16||e===24||e===32))throw new Error("Only 8, 16, 24, or 32 bits supported: "+e)}w.ByteBuffer=Uu;function Uu(e){if(this.data="",this.read=0,typeof e=="string")this.data=e;else if(w.isArrayBuffer(e)||w.isArrayBufferView(e))if(typeof Buffer<"u"&&e instanceof Buffer)this.data=e.toString("binary");else{var t=new Uint8Array(e);try{this.data=String.fromCharCode.apply(null,t)}catch{for(var a=0;a<t.length;++a)this.putByte(t[a])}}else(e instanceof Uu||typeof e=="object"&&typeof e.data=="string"&&typeof e.read=="number")&&(this.data=e.data,this.read=e.read);this._constructedStringLength=0}w.ByteStringBuffer=Uu;var q1=4096;w.ByteStringBuffer.prototype._optimizeConstructedString=function(e){this._constructedStringLength+=e,this._constructedStringLength>q1&&(this.data.substr(0,1),this._constructedStringLength=0)},w.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read},w.ByteStringBuffer.prototype.isEmpty=function(){return this.length()<=0},w.ByteStringBuffer.prototype.putByte=function(e){return this.putBytes(String.fromCharCode(e))},w.ByteStringBuffer.prototype.fillWithByte=function(e,t){e=String.fromCharCode(e);for(var a=this.data;t>0;)t&1&&(a+=e),t>>>=1,t>0&&(e+=e);return this.data=a,this._optimizeConstructedString(t),this},w.ByteStringBuffer.prototype.putBytes=function(e){return this.data+=e,this._optimizeConstructedString(e.length),this},w.ByteStringBuffer.prototype.putString=function(e){return this.putBytes(w.encodeUtf8(e))},w.ByteStringBuffer.prototype.putInt16=function(e){return this.putBytes(String.fromCharCode(e>>8&255)+String.fromCharCode(e&255))},w.ByteStringBuffer.prototype.putInt24=function(e){return this.putBytes(String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(e&255))},w.ByteStringBuffer.prototype.putInt32=function(e){return this.putBytes(String.fromCharCode(e>>24&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(e&255))},w.ByteStringBuffer.prototype.putInt16Le=function(e){return this.putBytes(String.fromCharCode(e&255)+String.fromCharCode(e>>8&255))},w.ByteStringBuffer.prototype.putInt24Le=function(e){return this.putBytes(String.fromCharCode(e&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(e>>16&255))},w.ByteStringBuffer.prototype.putInt32Le=function(e){return this.putBytes(String.fromCharCode(e&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>24&255))},w.ByteStringBuffer.prototype.putInt=function(e,t){uc(t);var a="";do t-=8,a+=String.fromCharCode(e>>t&255);while(t>0);return this.putBytes(a)},w.ByteStringBuffer.prototype.putSignedInt=function(e,t){return e<0&&(e+=2<<t-1),this.putInt(e,t)},w.ByteStringBuffer.prototype.putBuffer=function(e){return this.putBytes(e.getBytes())},w.ByteStringBuffer.prototype.getByte=function(){return this.data.charCodeAt(this.read++)},w.ByteStringBuffer.prototype.getInt16=function(){var e=this.data.charCodeAt(this.read)<<8^this.data.charCodeAt(this.read+1);return this.read+=2,e},w.ByteStringBuffer.prototype.getInt24=function(){var e=this.data.charCodeAt(this.read)<<16^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2);return this.read+=3,e},w.ByteStringBuffer.prototype.getInt32=function(){var e=this.data.charCodeAt(this.read)<<24^this.data.charCodeAt(this.read+1)<<16^this.data.charCodeAt(this.read+2)<<8^this.data.charCodeAt(this.read+3);return this.read+=4,e},w.ByteStringBuffer.prototype.getInt16Le=function(){var e=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8;return this.read+=2,e},w.ByteStringBuffer.prototype.getInt24Le=function(){var e=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16;return this.read+=3,e},w.ByteStringBuffer.prototype.getInt32Le=function(){var e=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16^this.data.charCodeAt(this.read+3)<<24;return this.read+=4,e},w.ByteStringBuffer.prototype.getInt=function(e){uc(e);var t=0;do t=(t<<8)+this.data.charCodeAt(this.read++),e-=8;while(e>0);return t},w.ByteStringBuffer.prototype.getSignedInt=function(e){var t=this.getInt(e),a=2<<e-2;return t>=a&&(t-=a<<1),t},w.ByteStringBuffer.prototype.getBytes=function(e){var t;return e?(e=Math.min(this.length(),e),t=this.data.slice(this.read,this.read+e),this.read+=e):e===0?t="":(t=this.read===0?this.data:this.data.slice(this.read),this.clear()),t},w.ByteStringBuffer.prototype.bytes=function(e){return typeof e>"u"?this.data.slice(this.read):this.data.slice(this.read,this.read+e)},w.ByteStringBuffer.prototype.at=function(e){return this.data.charCodeAt(this.read+e)},w.ByteStringBuffer.prototype.setAt=function(e,t){return this.data=this.data.substr(0,this.read+e)+String.fromCharCode(t)+this.data.substr(this.read+e+1),this},w.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)},w.ByteStringBuffer.prototype.copy=function(){var e=w.createBuffer(this.data);return e.read=this.read,e},w.ByteStringBuffer.prototype.compact=function(){return this.read>0&&(this.data=this.data.slice(this.read),this.read=0),this},w.ByteStringBuffer.prototype.clear=function(){return this.data="",this.read=0,this},w.ByteStringBuffer.prototype.truncate=function(e){var t=Math.max(0,this.length()-e);return this.data=this.data.substr(this.read,t),this.read=0,this},w.ByteStringBuffer.prototype.toHex=function(){for(var e="",t=this.read;t<this.data.length;++t){var a=this.data.charCodeAt(t);a<16&&(e+="0"),e+=a.toString(16)}return e},w.ByteStringBuffer.prototype.toString=function(){return w.decodeUtf8(this.bytes())};function j1(e,t){t=t||{},this.read=t.readOffset||0,this.growSize=t.growSize||1024;var a=w.isArrayBuffer(e),r=w.isArrayBufferView(e);if(a||r){a?this.data=new DataView(e):this.data=new DataView(e.buffer,e.byteOffset,e.byteLength),this.write="writeOffset"in t?t.writeOffset:this.data.byteLength;return}this.data=new DataView(new ArrayBuffer(0)),this.write=0,e!=null&&this.putBytes(e),"writeOffset"in t&&(this.write=t.writeOffset)}w.DataBuffer=j1,w.DataBuffer.prototype.length=function(){return this.write-this.read},w.DataBuffer.prototype.isEmpty=function(){return this.length()<=0},w.DataBuffer.prototype.accommodate=function(e,t){if(this.length()>=e)return this;t=Math.max(t||this.growSize,e);var a=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),r=new Uint8Array(this.length()+t);return r.set(a),this.data=new DataView(r.buffer),this},w.DataBuffer.prototype.putByte=function(e){return this.accommodate(1),this.data.setUint8(this.write++,e),this},w.DataBuffer.prototype.fillWithByte=function(e,t){this.accommodate(t);for(var a=0;a<t;++a)this.data.setUint8(e);return this},w.DataBuffer.prototype.putBytes=function(e,t){if(w.isArrayBufferView(e)){var a=new Uint8Array(e.buffer,e.byteOffset,e.byteLength),r=a.byteLength-a.byteOffset;this.accommodate(r);var n=new Uint8Array(this.data.buffer,this.write);return n.set(a),this.write+=r,this}if(w.isArrayBuffer(e)){var a=new Uint8Array(e);this.accommodate(a.byteLength);var n=new Uint8Array(this.data.buffer);return n.set(a,this.write),this.write+=a.byteLength,this}if(e instanceof w.DataBuffer||typeof e=="object"&&typeof e.read=="number"&&typeof e.write=="number"&&w.isArrayBufferView(e.data)){var a=new Uint8Array(e.data.byteLength,e.read,e.length());this.accommodate(a.byteLength);var n=new Uint8Array(e.data.byteLength,this.write);return n.set(a),this.write+=a.byteLength,this}if(e instanceof w.ByteStringBuffer&&(e=e.data,t="binary"),t=t||"binary",typeof e=="string"){var s;if(t==="hex")return this.accommodate(Math.ceil(e.length/2)),s=new Uint8Array(this.data.buffer,this.write),this.write+=w.binary.hex.decode(e,s,this.write),this;if(t==="base64")return this.accommodate(Math.ceil(e.length/4)*3),s=new Uint8Array(this.data.buffer,this.write),this.write+=w.binary.base64.decode(e,s,this.write),this;if(t==="utf8"&&(e=w.encodeUtf8(e),t="binary"),t==="binary"||t==="raw")return this.accommodate(e.length),s=new Uint8Array(this.data.buffer,this.write),this.write+=w.binary.raw.decode(s),this;if(t==="utf16")return this.accommodate(e.length*2),s=new Uint16Array(this.data.buffer,this.write),this.write+=w.text.utf16.encode(s),this;throw new Error("Invalid encoding: "+t)}throw Error("Invalid parameter: "+e)},w.DataBuffer.prototype.putBuffer=function(e){return this.putBytes(e),e.clear(),this},w.DataBuffer.prototype.putString=function(e){return this.putBytes(e,"utf16")},w.DataBuffer.prototype.putInt16=function(e){return this.accommodate(2),this.data.setInt16(this.write,e),this.write+=2,this},w.DataBuffer.prototype.putInt24=function(e){return this.accommodate(3),this.data.setInt16(this.write,e>>8&65535),this.data.setInt8(this.write,e>>16&255),this.write+=3,this},w.DataBuffer.prototype.putInt32=function(e){return this.accommodate(4),this.data.setInt32(this.write,e),this.write+=4,this},w.DataBuffer.prototype.putInt16Le=function(e){return this.accommodate(2),this.data.setInt16(this.write,e,!0),this.write+=2,this},w.DataBuffer.prototype.putInt24Le=function(e){return this.accommodate(3),this.data.setInt8(this.write,e>>16&255),this.data.setInt16(this.write,e>>8&65535,!0),this.write+=3,this},w.DataBuffer.prototype.putInt32Le=function(e){return this.accommodate(4),this.data.setInt32(this.write,e,!0),this.write+=4,this},w.DataBuffer.prototype.putInt=function(e,t){uc(t),this.accommodate(t/8);do t-=8,this.data.setInt8(this.write++,e>>t&255);while(t>0);return this},w.DataBuffer.prototype.putSignedInt=function(e,t){return uc(t),this.accommodate(t/8),e<0&&(e+=2<<t-1),this.putInt(e,t)},w.DataBuffer.prototype.getByte=function(){return this.data.getInt8(this.read++)},w.DataBuffer.prototype.getInt16=function(){var e=this.data.getInt16(this.read);return this.read+=2,e},w.DataBuffer.prototype.getInt24=function(){var e=this.data.getInt16(this.read)<<8^this.data.getInt8(this.read+2);return this.read+=3,e},w.DataBuffer.prototype.getInt32=function(){var e=this.data.getInt32(this.read);return this.read+=4,e},w.DataBuffer.prototype.getInt16Le=function(){var e=this.data.getInt16(this.read,!0);return this.read+=2,e},w.DataBuffer.prototype.getInt24Le=function(){var e=this.data.getInt8(this.read)^this.data.getInt16(this.read+1,!0)<<8;return this.read+=3,e},w.DataBuffer.prototype.getInt32Le=function(){var e=this.data.getInt32(this.read,!0);return this.read+=4,e},w.DataBuffer.prototype.getInt=function(e){uc(e);var t=0;do t=(t<<8)+this.data.getInt8(this.read++),e-=8;while(e>0);return t},w.DataBuffer.prototype.getSignedInt=function(e){var t=this.getInt(e),a=2<<e-2;return t>=a&&(t-=a<<1),t},w.DataBuffer.prototype.getBytes=function(e){var t;return e?(e=Math.min(this.length(),e),t=this.data.slice(this.read,this.read+e),this.read+=e):e===0?t="":(t=this.read===0?this.data:this.data.slice(this.read),this.clear()),t},w.DataBuffer.prototype.bytes=function(e){return typeof e>"u"?this.data.slice(this.read):this.data.slice(this.read,this.read+e)},w.DataBuffer.prototype.at=function(e){return this.data.getUint8(this.read+e)},w.DataBuffer.prototype.setAt=function(e,t){return this.data.setUint8(e,t),this},w.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)},w.DataBuffer.prototype.copy=function(){return new w.DataBuffer(this)},w.DataBuffer.prototype.compact=function(){if(this.read>0){var e=new Uint8Array(this.data.buffer,this.read),t=new Uint8Array(e.byteLength);t.set(e),this.data=new DataView(t),this.write-=this.read,this.read=0}return this},w.DataBuffer.prototype.clear=function(){return this.data=new DataView(new ArrayBuffer(0)),this.read=this.write=0,this},w.DataBuffer.prototype.truncate=function(e){return this.write=Math.max(0,this.length()-e),this.read=Math.min(this.read,this.write),this},w.DataBuffer.prototype.toHex=function(){for(var e="",t=this.read;t<this.data.byteLength;++t){var a=this.data.getUint8(t);a<16&&(e+="0"),e+=a.toString(16)}return e},w.DataBuffer.prototype.toString=function(e){var t=new Uint8Array(this.data,this.read,this.length());if(e=e||"utf8",e==="binary"||e==="raw")return w.binary.raw.encode(t);if(e==="hex")return w.binary.hex.encode(t);if(e==="base64")return w.binary.base64.encode(t);if(e==="utf8")return w.text.utf8.decode(t);if(e==="utf16")return w.text.utf16.decode(t);throw new Error("Invalid encoding: "+e)},w.createBuffer=function(e,t){return t=t||"raw",e!==void 0&&t==="utf8"&&(e=w.encodeUtf8(e)),new w.ByteBuffer(e)},w.fillString=function(e,t){for(var a="";t>0;)t&1&&(a+=e),t>>>=1,t>0&&(e+=e);return a},w.xorBytes=function(e,t,a){for(var r="",n="",s="",i=0,o=0;a>0;--a,++i)n=e.charCodeAt(i)^t.charCodeAt(i),o>=10&&(r+=s,s="",o=0),s+=String.fromCharCode(n),++o;return r+=s,r},w.hexToBytes=function(e){var t="",a=0;for(e.length&!0&&(a=1,t+=String.fromCharCode(parseInt(e[0],16)));a<e.length;a+=2)t+=String.fromCharCode(parseInt(e.substr(a,2),16));return t},w.bytesToHex=function(e){return w.createBuffer(e).toHex()},w.int32ToBytes=function(e){return String.fromCharCode(e>>24&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(e&255)};var ir="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",sr=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],Kf="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";w.encode64=function(e,t){for(var a="",r="",n,s,i,o=0;o<e.length;)n=e.charCodeAt(o++),s=e.charCodeAt(o++),i=e.charCodeAt(o++),a+=ir.charAt(n>>2),a+=ir.charAt((n&3)<<4|s>>4),isNaN(s)?a+="==":(a+=ir.charAt((s&15)<<2|i>>6),a+=isNaN(i)?"=":ir.charAt(i&63)),t&&a.length>t&&(r+=a.substr(0,t)+`\r
|
|
27
|
-
`,a=a.substr(t));return r+=a,r},w.decode64=function(e){e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var t="",a,r,n,s,i=0;i<e.length;)a=sr[e.charCodeAt(i++)-43],r=sr[e.charCodeAt(i++)-43],n=sr[e.charCodeAt(i++)-43],s=sr[e.charCodeAt(i++)-43],t+=String.fromCharCode(a<<2|r>>4),n!==64&&(t+=String.fromCharCode((r&15)<<4|n>>2),s!==64&&(t+=String.fromCharCode((n&3)<<6|s)));return t},w.encodeUtf8=function(e){return unescape(encodeURIComponent(e))},w.decodeUtf8=function(e){return decodeURIComponent(escape(e))},w.binary={raw:{},hex:{},base64:{},base58:{},baseN:{encode:jf.encode,decode:jf.decode}},w.binary.raw.encode=function(e){return String.fromCharCode.apply(null,e)},w.binary.raw.decode=function(e,t,a){var r=t;r||(r=new Uint8Array(e.length)),a=a||0;for(var n=a,s=0;s<e.length;++s)r[n++]=e.charCodeAt(s);return t?n-a:r},w.binary.hex.encode=w.bytesToHex,w.binary.hex.decode=function(e,t,a){var r=t;r||(r=new Uint8Array(Math.ceil(e.length/2))),a=a||0;var n=0,s=a;for(e.length&1&&(n=1,r[s++]=parseInt(e[0],16));n<e.length;n+=2)r[s++]=parseInt(e.substr(n,2),16);return t?s-a:r},w.binary.base64.encode=function(e,t){for(var a="",r="",n,s,i,o=0;o<e.byteLength;)n=e[o++],s=e[o++],i=e[o++],a+=ir.charAt(n>>2),a+=ir.charAt((n&3)<<4|s>>4),isNaN(s)?a+="==":(a+=ir.charAt((s&15)<<2|i>>6),a+=isNaN(i)?"=":ir.charAt(i&63)),t&&a.length>t&&(r+=a.substr(0,t)+`\r
|
|
28
|
-
`,a=a.substr(t));return r+=a,r},w.binary.base64.decode=function(e,t,a){var r=t;r||(r=new Uint8Array(Math.ceil(e.length/4)*3)),e=e.replace(/[^A-Za-z0-9\+\/\=]/g,""),a=a||0;for(var n,s,i,o,c=0,l=a;c<e.length;)n=sr[e.charCodeAt(c++)-43],s=sr[e.charCodeAt(c++)-43],i=sr[e.charCodeAt(c++)-43],o=sr[e.charCodeAt(c++)-43],r[l++]=n<<2|s>>4,i!==64&&(r[l++]=(s&15)<<4|i>>2,o!==64&&(r[l++]=(i&3)<<6|o));return t?l-a:r.subarray(0,l)},w.binary.base58.encode=function(e,t){return w.binary.baseN.encode(e,Kf,t)},w.binary.base58.decode=function(e,t){return w.binary.baseN.decode(e,Kf,t)},w.text={utf8:{},utf16:{}},w.text.utf8.encode=function(e,t,a){e=w.encodeUtf8(e);var r=t;r||(r=new Uint8Array(e.length)),a=a||0;for(var n=a,s=0;s<e.length;++s)r[n++]=e.charCodeAt(s);return t?n-a:r},w.text.utf8.decode=function(e){return w.decodeUtf8(String.fromCharCode.apply(null,e))},w.text.utf16.encode=function(e,t,a){var r=t;r||(r=new Uint8Array(e.length*2));var n=new Uint16Array(r.buffer);a=a||0;for(var s=a,i=a,o=0;o<e.length;++o)n[i++]=e.charCodeAt(o),s+=2;return t?s-a:r},w.text.utf16.decode=function(e){return String.fromCharCode.apply(null,new Uint16Array(e.buffer))},w.deflate=function(e,t,a){if(t=w.decode64(e.deflate(w.encode64(t)).rval),a){var r=2,n=t.charCodeAt(1);n&32&&(r=6),t=t.substring(r,t.length-4)}return t},w.inflate=function(e,t,a){var r=e.inflate(w.encode64(t)).rval;return r===null?null:w.decode64(r)};var Pu=function(e,t,a){if(!e)throw new Error("WebStorage not available.");var r;if(a===null?r=e.removeItem(t):(a=w.encode64(JSON.stringify(a)),r=e.setItem(t,a)),typeof r<"u"&&r.rval!==!0){var n=new Error(r.error.message);throw n.id=r.error.id,n.name=r.error.name,n}},Du=function(e,t){if(!e)throw new Error("WebStorage not available.");var a=e.getItem(t);if(e.init)if(a.rval===null){if(a.error){var r=new Error(a.error.message);throw r.id=a.error.id,r.name=a.error.name,r}a=null}else a=a.rval;return a!==null&&(a=JSON.parse(w.decode64(a))),a},K1=function(e,t,a,r){var n=Du(e,t);n===null&&(n={}),n[a]=r,Pu(e,t,n)},z1=function(e,t,a){var r=Du(e,t);return r!==null&&(r=a in r?r[a]:null),r},H1=function(e,t,a){var r=Du(e,t);if(r!==null&&a in r){delete r[a];var n=!0;for(var s in r){n=!1;break}n&&(r=null),Pu(e,t,r)}},$1=function(e,t){Pu(e,t,null)},Xc=function(e,t,a){var r=null;typeof a>"u"&&(a=["web","flash"]);var n,s=!1,i=null;for(var o in a){n=a[o];try{if(n==="flash"||n==="both"){if(t[0]===null)throw new Error("Flash local storage not available.");r=e.apply(this,t),s=n==="flash"}(n==="web"||n==="both")&&(t[0]=localStorage,r=e.apply(this,t),s=!0)}catch(c){i=c}if(s)break}if(!s)throw i;return r};w.setItem=function(e,t,a,r,n){Xc(K1,arguments,n)},w.getItem=function(e,t,a,r){return Xc(z1,arguments,r)},w.removeItem=function(e,t,a,r){Xc(H1,arguments,r)},w.clearItems=function(e,t,a){Xc($1,arguments,a)},w.isEmpty=function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0},w.format=function(e){for(var t=/%./g,a,r,n=0,s=[],i=0;a=t.exec(e);){r=e.substring(i,t.lastIndex-2),r.length>0&&s.push(r),i=t.lastIndex;var o=a[0][1];switch(o){case"s":case"o":n<arguments.length?s.push(arguments[n+++1]):s.push("<?>");break;case"%":s.push("%");break;default:s.push("<%"+o+"?>")}}return s.push(e.substring(i)),s.join("")},w.formatNumber=function(e,t,a,r){var n=e,s=isNaN(t=Math.abs(t))?2:t,i=a===void 0?",":a,o=r===void 0?".":r,c=n<0?"-":"",l=parseInt(n=Math.abs(+n||0).toFixed(s),10)+"",u=l.length>3?l.length%3:0;return c+(u?l.substr(0,u)+o:"")+l.substr(u).replace(/(\d{3})(?=\d)/g,"$1"+o)+(s?i+Math.abs(n-l).toFixed(s).slice(2):"")},w.formatSize=function(e){return e>=1073741824?e=w.formatNumber(e/1073741824,2,".","")+" GiB":e>=1048576?e=w.formatNumber(e/1048576,2,".","")+" MiB":e>=1024?e=w.formatNumber(e/1024,0)+" KiB":e=w.formatNumber(e,0)+" bytes",e},w.bytesFromIP=function(e){return e.indexOf(".")!==-1?w.bytesFromIPv4(e):e.indexOf(":")!==-1?w.bytesFromIPv6(e):null},w.bytesFromIPv4=function(e){if(e=e.split("."),e.length!==4)return null;for(var t=w.createBuffer(),a=0;a<e.length;++a){var r=parseInt(e[a],10);if(isNaN(r))return null;t.putByte(r)}return t.getBytes()},w.bytesFromIPv6=function(e){var t=0;e=e.split(":").filter(function(i){return i.length===0&&++t,!0});for(var a=(8-e.length+t)*2,r=w.createBuffer(),n=0;n<8;++n){if(!e[n]||e[n].length===0){r.fillWithByte(0,a),a=0;continue}var s=w.hexToBytes(e[n]);s.length<2&&r.putByte(0),r.putBytes(s)}return r.getBytes()},w.bytesToIP=function(e){return e.length===4?w.bytesToIPv4(e):e.length===16?w.bytesToIPv6(e):null},w.bytesToIPv4=function(e){if(e.length!==4)return null;for(var t=[],a=0;a<e.length;++a)t.push(e.charCodeAt(a));return t.join(".")},w.bytesToIPv6=function(e){if(e.length!==16)return null;for(var t=[],a=[],r=0,n=0;n<e.length;n+=2){for(var s=w.bytesToHex(e[n]+e[n+1]);s[0]==="0"&&s!=="0";)s=s.substr(1);if(s==="0"){var i=a[a.length-1],o=t.length;!i||o!==i.end+1?a.push({start:o,end:o}):(i.end=o,i.end-i.start>a[r].end-a[r].start&&(r=a.length-1))}t.push(s)}if(a.length>0){var c=a[r];c.end-c.start>0&&(t.splice(c.start,c.end-c.start+1,""),c.start===0&&t.unshift(""),c.end===7&&t.push(""))}return t.join(":")},w.estimateCores=function(e,t){if(typeof e=="function"&&(t=e,e={}),e=e||{},"cores"in w&&!e.update)return t(null,w.cores);if(typeof navigator<"u"&&"hardwareConcurrency"in navigator&&navigator.hardwareConcurrency>0)return w.cores=navigator.hardwareConcurrency,t(null,w.cores);if(typeof Worker>"u")return w.cores=1,t(null,w.cores);if(typeof Blob>"u")return w.cores=2,t(null,w.cores);var a=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(i){var o=Date.now(),c=o+4;self.postMessage({st:o,et:c})})}.toString(),")()"],{type:"application/javascript"}));r([],5,16);function r(i,o,c){if(o===0){var l=Math.floor(i.reduce(function(u,p){return u+p},0)/i.length);return w.cores=Math.max(1,l),URL.revokeObjectURL(a),t(null,w.cores)}n(c,function(u,p){i.push(s(c,p)),r(i,o-1,c)})}function n(i,o){for(var c=[],l=[],u=0;u<i;++u){var p=new Worker(a);p.addEventListener("message",function(d){if(l.push(d.data),l.length===i){for(var x=0;x<i;++x)c[x].terminate();o(null,l)}}),c.push(p)}for(var u=0;u<i;++u)c[u].postMessage(u)}function s(i,o){for(var c=[],l=0;l<i;++l)for(var u=o[l],p=c[l]=[],d=0;d<i;++d)if(l!==d){var x=o[d];(u.st>x.st&&u.st<x.et||x.st>u.st&&x.st<u.et)&&p.push(d)}return c.reduce(function(m,y){return Math.max(m,y.length)},0)}};var $e=ae;$e.cipher=$e.cipher||{},$e.cipher.algorithms=$e.cipher.algorithms||{},$e.cipher.createCipher=function(e,t){var a=e;if(typeof a=="string"&&(a=$e.cipher.getAlgorithm(a),a&&(a=a())),!a)throw new Error("Unsupported algorithm: "+e);return new $e.cipher.BlockCipher({algorithm:a,key:t,decrypt:!1})},$e.cipher.createDecipher=function(e,t){var a=e;if(typeof a=="string"&&(a=$e.cipher.getAlgorithm(a),a&&(a=a())),!a)throw new Error("Unsupported algorithm: "+e);return new $e.cipher.BlockCipher({algorithm:a,key:t,decrypt:!0})},$e.cipher.registerAlgorithm=function(e,t){e=e.toUpperCase(),$e.cipher.algorithms[e]=t},$e.cipher.getAlgorithm=function(e){return e=e.toUpperCase(),e in $e.cipher.algorithms?$e.cipher.algorithms[e]:null};var Ou=$e.cipher.BlockCipher=function(e){this.algorithm=e.algorithm,this.mode=this.algorithm.mode,this.blockSize=this.mode.blockSize,this._finish=!1,this._input=null,this.output=null,this._op=e.decrypt?this.mode.decrypt:this.mode.encrypt,this._decrypt=e.decrypt,this.algorithm.initialize(e)};Ou.prototype.start=function(e){e=e||{};var t={};for(var a in e)t[a]=e[a];t.decrypt=this._decrypt,this._finish=!1,this._input=$e.util.createBuffer(),this.output=e.output||$e.util.createBuffer(),this.mode.start(t)},Ou.prototype.update=function(e){for(e&&this._input.putBuffer(e);!this._op.call(this.mode,this._input,this.output,this._finish)&&!this._finish;);this._input.compact()},Ou.prototype.finish=function(e){e&&(this.mode.name==="ECB"||this.mode.name==="CBC")&&(this.mode.pad=function(a){return e(this.blockSize,a,!1)},this.mode.unpad=function(a){return e(this.blockSize,a,!0)});var t={};return t.decrypt=this._decrypt,t.overflow=this._input.length()%this.blockSize,!(!this._decrypt&&this.mode.pad&&!this.mode.pad(this._input,t)||(this._finish=!0,this.update(),this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,t))||this.mode.afterFinish&&!this.mode.afterFinish(this.output,t))};var Ge=ae;Ge.cipher=Ge.cipher||{};var ce=Ge.cipher.modes=Ge.cipher.modes||{};ce.ecb=function(e){e=e||{},this.name="ECB",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)},ce.ecb.prototype.start=function(e){},ce.ecb.prototype.encrypt=function(e,t,a){if(e.length()<this.blockSize&&!(a&&e.length()>0))return!0;for(var r=0;r<this._ints;++r)this._inBlock[r]=e.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(var r=0;r<this._ints;++r)t.putInt32(this._outBlock[r])},ce.ecb.prototype.decrypt=function(e,t,a){if(e.length()<this.blockSize&&!(a&&e.length()>0))return!0;for(var r=0;r<this._ints;++r)this._inBlock[r]=e.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(var r=0;r<this._ints;++r)t.putInt32(this._outBlock[r])},ce.ecb.prototype.pad=function(e,t){var a=e.length()===this.blockSize?this.blockSize:this.blockSize-e.length();return e.fillWithByte(a,a),!0},ce.ecb.prototype.unpad=function(e,t){if(t.overflow>0)return!1;var a=e.length(),r=e.at(a-1);return r>this.blockSize<<2?!1:(e.truncate(r),!0)},ce.cbc=function(e){e=e||{},this.name="CBC",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)},ce.cbc.prototype.start=function(e){if(e.iv===null){if(!this._prev)throw new Error("Invalid IV parameter.");this._iv=this._prev.slice(0)}else if("iv"in e)this._iv=Yc(e.iv,this.blockSize),this._prev=this._iv.slice(0);else throw new Error("Invalid IV parameter.")},ce.cbc.prototype.encrypt=function(e,t,a){if(e.length()<this.blockSize&&!(a&&e.length()>0))return!0;for(var r=0;r<this._ints;++r)this._inBlock[r]=this._prev[r]^e.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(var r=0;r<this._ints;++r)t.putInt32(this._outBlock[r]);this._prev=this._outBlock},ce.cbc.prototype.decrypt=function(e,t,a){if(e.length()<this.blockSize&&!(a&&e.length()>0))return!0;for(var r=0;r<this._ints;++r)this._inBlock[r]=e.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(var r=0;r<this._ints;++r)t.putInt32(this._prev[r]^this._outBlock[r]);this._prev=this._inBlock.slice(0)},ce.cbc.prototype.pad=function(e,t){var a=e.length()===this.blockSize?this.blockSize:this.blockSize-e.length();return e.fillWithByte(a,a),!0},ce.cbc.prototype.unpad=function(e,t){if(t.overflow>0)return!1;var a=e.length(),r=e.at(a-1);return r>this.blockSize<<2?!1:(e.truncate(r),!0)},ce.cfb=function(e){e=e||{},this.name="CFB",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialBlock=new Array(this._ints),this._partialOutput=Ge.util.createBuffer(),this._partialBytes=0},ce.cfb.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=Yc(e.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},ce.cfb.prototype.encrypt=function(e,t,a){var r=e.length();if(r===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&r>=this.blockSize){for(var n=0;n<this._ints;++n)this._inBlock[n]=e.getInt32()^this._outBlock[n],t.putInt32(this._inBlock[n]);return}var s=(this.blockSize-r)%this.blockSize;s>0&&(s=this.blockSize-s),this._partialOutput.clear();for(var n=0;n<this._ints;++n)this._partialBlock[n]=e.getInt32()^this._outBlock[n],this._partialOutput.putInt32(this._partialBlock[n]);if(s>0)e.read-=this.blockSize;else for(var n=0;n<this._ints;++n)this._inBlock[n]=this._partialBlock[n];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),s>0&&!a)return t.putBytes(this._partialOutput.getBytes(s-this._partialBytes)),this._partialBytes=s,!0;t.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=0},ce.cfb.prototype.decrypt=function(e,t,a){var r=e.length();if(r===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&r>=this.blockSize){for(var n=0;n<this._ints;++n)this._inBlock[n]=e.getInt32(),t.putInt32(this._inBlock[n]^this._outBlock[n]);return}var s=(this.blockSize-r)%this.blockSize;s>0&&(s=this.blockSize-s),this._partialOutput.clear();for(var n=0;n<this._ints;++n)this._partialBlock[n]=e.getInt32(),this._partialOutput.putInt32(this._partialBlock[n]^this._outBlock[n]);if(s>0)e.read-=this.blockSize;else for(var n=0;n<this._ints;++n)this._inBlock[n]=this._partialBlock[n];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),s>0&&!a)return t.putBytes(this._partialOutput.getBytes(s-this._partialBytes)),this._partialBytes=s,!0;t.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=0},ce.ofb=function(e){e=e||{},this.name="OFB",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=Ge.util.createBuffer(),this._partialBytes=0},ce.ofb.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=Yc(e.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},ce.ofb.prototype.encrypt=function(e,t,a){var r=e.length();if(e.length()===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&r>=this.blockSize){for(var n=0;n<this._ints;++n)t.putInt32(e.getInt32()^this._outBlock[n]),this._inBlock[n]=this._outBlock[n];return}var s=(this.blockSize-r)%this.blockSize;s>0&&(s=this.blockSize-s),this._partialOutput.clear();for(var n=0;n<this._ints;++n)this._partialOutput.putInt32(e.getInt32()^this._outBlock[n]);if(s>0)e.read-=this.blockSize;else for(var n=0;n<this._ints;++n)this._inBlock[n]=this._outBlock[n];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),s>0&&!a)return t.putBytes(this._partialOutput.getBytes(s-this._partialBytes)),this._partialBytes=s,!0;t.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=0},ce.ofb.prototype.decrypt=ce.ofb.prototype.encrypt,ce.ctr=function(e){e=e||{},this.name="CTR",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=Ge.util.createBuffer(),this._partialBytes=0},ce.ctr.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=Yc(e.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},ce.ctr.prototype.encrypt=function(e,t,a){var r=e.length();if(r===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&r>=this.blockSize)for(var n=0;n<this._ints;++n)t.putInt32(e.getInt32()^this._outBlock[n]);else{var s=(this.blockSize-r)%this.blockSize;s>0&&(s=this.blockSize-s),this._partialOutput.clear();for(var n=0;n<this._ints;++n)this._partialOutput.putInt32(e.getInt32()^this._outBlock[n]);if(s>0&&(e.read-=this.blockSize),this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),s>0&&!a)return t.putBytes(this._partialOutput.getBytes(s-this._partialBytes)),this._partialBytes=s,!0;t.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=0}Jc(this._inBlock)},ce.ctr.prototype.decrypt=ce.ctr.prototype.encrypt,ce.gcm=function(e){e=e||{},this.name="GCM",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints),this._partialOutput=Ge.util.createBuffer(),this._partialBytes=0,this._R=3774873600},ce.gcm.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");var t=Ge.util.createBuffer(e.iv);this._cipherLength=0;var a;if("additionalData"in e?a=Ge.util.createBuffer(e.additionalData):a=Ge.util.createBuffer(),"tagLength"in e?this._tagLength=e.tagLength:this._tagLength=128,this._tag=null,e.decrypt&&(this._tag=Ge.util.createBuffer(e.tag).getBytes(),this._tag.length!==this._tagLength/8))throw new Error("Authentication tag does not match tag length.");this._hashBlock=new Array(this._ints),this.tag=null,this._hashSubkey=new Array(this._ints),this.cipher.encrypt([0,0,0,0],this._hashSubkey),this.componentBits=4,this._m=this.generateHashTable(this._hashSubkey,this.componentBits);var r=t.length();if(r===12)this._j0=[t.getInt32(),t.getInt32(),t.getInt32(),1];else{for(this._j0=[0,0,0,0];t.length()>0;)this._j0=this.ghash(this._hashSubkey,this._j0,[t.getInt32(),t.getInt32(),t.getInt32(),t.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(Fu(r*8)))}this._inBlock=this._j0.slice(0),Jc(this._inBlock),this._partialBytes=0,a=Ge.util.createBuffer(a),this._aDataLength=Fu(a.length()*8);var n=a.length()%this.blockSize;for(n&&a.fillWithByte(0,this.blockSize-n),this._s=[0,0,0,0];a.length()>0;)this._s=this.ghash(this._hashSubkey,this._s,[a.getInt32(),a.getInt32(),a.getInt32(),a.getInt32()])},ce.gcm.prototype.encrypt=function(e,t,a){var r=e.length();if(r===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&r>=this.blockSize){for(var n=0;n<this._ints;++n)t.putInt32(this._outBlock[n]^=e.getInt32());this._cipherLength+=this.blockSize}else{var s=(this.blockSize-r)%this.blockSize;s>0&&(s=this.blockSize-s),this._partialOutput.clear();for(var n=0;n<this._ints;++n)this._partialOutput.putInt32(e.getInt32()^this._outBlock[n]);if(s<=0||a){if(a){var i=r%this.blockSize;this._cipherLength+=i,this._partialOutput.truncate(this.blockSize-i)}else this._cipherLength+=this.blockSize;for(var n=0;n<this._ints;++n)this._outBlock[n]=this._partialOutput.getInt32();this._partialOutput.read-=this.blockSize}if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),s>0&&!a)return e.read-=this.blockSize,t.putBytes(this._partialOutput.getBytes(s-this._partialBytes)),this._partialBytes=s,!0;t.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock),Jc(this._inBlock)},ce.gcm.prototype.decrypt=function(e,t,a){var r=e.length();if(r<this.blockSize&&!(a&&r>0))return!0;this.cipher.encrypt(this._inBlock,this._outBlock),Jc(this._inBlock),this._hashBlock[0]=e.getInt32(),this._hashBlock[1]=e.getInt32(),this._hashBlock[2]=e.getInt32(),this._hashBlock[3]=e.getInt32(),this._s=this.ghash(this._hashSubkey,this._s,this._hashBlock);for(var n=0;n<this._ints;++n)t.putInt32(this._outBlock[n]^this._hashBlock[n]);r<this.blockSize?this._cipherLength+=r%this.blockSize:this._cipherLength+=this.blockSize},ce.gcm.prototype.afterFinish=function(e,t){var a=!0;t.decrypt&&t.overflow&&e.truncate(this.blockSize-t.overflow),this.tag=Ge.util.createBuffer();var r=this._aDataLength.concat(Fu(this._cipherLength*8));this._s=this.ghash(this._hashSubkey,this._s,r);var n=[];this.cipher.encrypt(this._j0,n);for(var s=0;s<this._ints;++s)this.tag.putInt32(this._s[s]^n[s]);return this.tag.truncate(this.tag.length()%(this._tagLength/8)),t.decrypt&&this.tag.bytes()!==this._tag&&(a=!1),a},ce.gcm.prototype.multiply=function(e,t){for(var a=[0,0,0,0],r=t.slice(0),n=0;n<128;++n){var s=e[n/32|0]&1<<31-n%32;s&&(a[0]^=r[0],a[1]^=r[1],a[2]^=r[2],a[3]^=r[3]),this.pow(r,r)}return a},ce.gcm.prototype.pow=function(e,t){for(var a=e[3]&1,r=3;r>0;--r)t[r]=e[r]>>>1|(e[r-1]&1)<<31;t[0]=e[0]>>>1,a&&(t[0]^=this._R)},ce.gcm.prototype.tableMultiply=function(e){for(var t=[0,0,0,0],a=0;a<32;++a){var r=a/8|0,n=e[r]>>>(7-a%8)*4&15,s=this._m[a][n];t[0]^=s[0],t[1]^=s[1],t[2]^=s[2],t[3]^=s[3]}return t},ce.gcm.prototype.ghash=function(e,t,a){return t[0]^=a[0],t[1]^=a[1],t[2]^=a[2],t[3]^=a[3],this.tableMultiply(t)},ce.gcm.prototype.generateHashTable=function(e,t){for(var a=8/t,r=4*a,n=16*a,s=new Array(n),i=0;i<n;++i){var o=[0,0,0,0],c=i/r|0,l=(r-1-i%r)*t;o[c]=1<<t-1<<l,s[i]=this.generateSubHashTable(this.multiply(o,e),t)}return s},ce.gcm.prototype.generateSubHashTable=function(e,t){var a=1<<t,r=a>>>1,n=new Array(a);n[r]=e.slice(0);for(var s=r>>>1;s>0;)this.pow(n[2*s],n[s]=[]),s>>=1;for(s=2;s<r;){for(var i=1;i<s;++i){var o=n[s],c=n[i];n[s+i]=[o[0]^c[0],o[1]^c[1],o[2]^c[2],o[3]^c[3]]}s*=2}for(n[0]=[0,0,0,0],s=r+1;s<a;++s){var l=n[s^r];n[s]=[e[0]^l[0],e[1]^l[1],e[2]^l[2],e[3]^l[3]]}return n};function Yc(e,t){if(typeof e=="string"&&(e=Ge.util.createBuffer(e)),Ge.util.isArray(e)&&e.length>4){var a=e;e=Ge.util.createBuffer();for(var r=0;r<a.length;++r)e.putByte(a[r])}if(e.length()<t)throw new Error("Invalid IV length; got "+e.length()+" bytes and expected "+t+" bytes.");if(!Ge.util.isArray(e)){for(var n=[],s=t/4,r=0;r<s;++r)n.push(e.getInt32());e=n}return e}function Jc(e){e[e.length-1]=e[e.length-1]+1&4294967295}function Fu(e){return[e/4294967296|0,e&4294967295]}var Ie=ae;Ie.aes=Ie.aes||{},Ie.aes.startEncrypting=function(e,t,a,r){var n=Zc({key:e,output:a,decrypt:!1,mode:r});return n.start(t),n},Ie.aes.createEncryptionCipher=function(e,t){return Zc({key:e,output:null,decrypt:!1,mode:t})},Ie.aes.startDecrypting=function(e,t,a,r){var n=Zc({key:e,output:a,decrypt:!0,mode:r});return n.start(t),n},Ie.aes.createDecryptionCipher=function(e,t){return Zc({key:e,output:null,decrypt:!0,mode:t})},Ie.aes.Algorithm=function(e,t){Mu||Hf();var a=this;a.name=e,a.mode=new t({blockSize:16,cipher:{encrypt:function(r,n){return qu(a._w,r,n,!1)},decrypt:function(r,n){return qu(a._w,r,n,!0)}}}),a._init=!1},Ie.aes.Algorithm.prototype.initialize=function(e){if(!this._init){var t=e.key,a;if(typeof t=="string"&&(t.length===16||t.length===24||t.length===32))t=Ie.util.createBuffer(t);else if(Ie.util.isArray(t)&&(t.length===16||t.length===24||t.length===32)){a=t,t=Ie.util.createBuffer();for(var r=0;r<a.length;++r)t.putByte(a[r])}if(!Ie.util.isArray(t)){a=t,t=[];var n=a.length();if(n===16||n===24||n===32){n=n>>>2;for(var r=0;r<n;++r)t.push(a.getInt32())}}if(!Ie.util.isArray(t)||!(t.length===4||t.length===6||t.length===8))throw new Error("Invalid key parameter.");var s=this.mode.name,i=["CFB","OFB","CTR","GCM"].indexOf(s)!==-1;this._w=$f(t,e.decrypt&&!i),this._init=!0}},Ie.aes._expandKey=function(e,t){return Mu||Hf(),$f(e,t)},Ie.aes._updateBlock=qu,zr("AES-ECB",Ie.cipher.modes.ecb),zr("AES-CBC",Ie.cipher.modes.cbc),zr("AES-CFB",Ie.cipher.modes.cfb),zr("AES-OFB",Ie.cipher.modes.ofb),zr("AES-CTR",Ie.cipher.modes.ctr),zr("AES-GCM",Ie.cipher.modes.gcm);function zr(e,t){var a=function(){return new Ie.aes.Algorithm(e,t)};Ie.cipher.registerAlgorithm(e,a)}var Mu=!1,Hr=4,ut,Vu,zf,wr,Mt;function Hf(){Mu=!0,zf=[0,1,2,4,8,16,32,64,128,27,54];for(var e=new Array(256),t=0;t<128;++t)e[t]=t<<1,e[t+128]=t+128<<1^283;ut=new Array(256),Vu=new Array(256),wr=new Array(4),Mt=new Array(4);for(var t=0;t<4;++t)wr[t]=new Array(256),Mt[t]=new Array(256);for(var a=0,r=0,n,s,i,o,c,l,u,t=0;t<256;++t){o=r^r<<1^r<<2^r<<3^r<<4,o=o>>8^o&255^99,ut[a]=o,Vu[o]=a,c=e[o],n=e[a],s=e[n],i=e[s],l=c<<24^o<<16^o<<8^(o^c),u=(n^s^i)<<24^(a^i)<<16^(a^s^i)<<8^(a^n^i);for(var p=0;p<4;++p)wr[p][a]=l,Mt[p][o]=u,l=l<<24|l>>>8,u=u<<24|u>>>8;a===0?a=r=1:(a=n^e[e[e[n^i]]],r^=e[e[r]])}}function $f(e,t){for(var a=e.slice(0),r,n=1,s=a.length,i=s+6+1,o=Hr*i,c=s;c<o;++c)r=a[c-1],c%s===0?(r=ut[r>>>16&255]<<24^ut[r>>>8&255]<<16^ut[r&255]<<8^ut[r>>>24]^zf[n]<<24,n++):s>6&&c%s===4&&(r=ut[r>>>24]<<24^ut[r>>>16&255]<<16^ut[r>>>8&255]<<8^ut[r&255]),a[c]=a[c-s]^r;if(t){var l,u=Mt[0],p=Mt[1],d=Mt[2],x=Mt[3],m=a.slice(0);o=a.length;for(var c=0,y=o-Hr;c<o;c+=Hr,y-=Hr)if(c===0||c===o-Hr)m[c]=a[y],m[c+1]=a[y+3],m[c+2]=a[y+2],m[c+3]=a[y+1];else for(var b=0;b<Hr;++b)l=a[y+b],m[c+(3&-b)]=u[ut[l>>>24]]^p[ut[l>>>16&255]]^d[ut[l>>>8&255]]^x[ut[l&255]];a=m}return a}function qu(e,t,a,r){var n=e.length/4-1,s,i,o,c,l;r?(s=Mt[0],i=Mt[1],o=Mt[2],c=Mt[3],l=Vu):(s=wr[0],i=wr[1],o=wr[2],c=wr[3],l=ut);var u,p,d,x,m,y,b;u=t[0]^e[0],p=t[r?3:1]^e[1],d=t[2]^e[2],x=t[r?1:3]^e[3];for(var C=3,B=1;B<n;++B)m=s[u>>>24]^i[p>>>16&255]^o[d>>>8&255]^c[x&255]^e[++C],y=s[p>>>24]^i[d>>>16&255]^o[x>>>8&255]^c[u&255]^e[++C],b=s[d>>>24]^i[x>>>16&255]^o[u>>>8&255]^c[p&255]^e[++C],x=s[x>>>24]^i[u>>>16&255]^o[p>>>8&255]^c[d&255]^e[++C],u=m,p=y,d=b;a[0]=l[u>>>24]<<24^l[p>>>16&255]<<16^l[d>>>8&255]<<8^l[x&255]^e[++C],a[r?3:1]=l[p>>>24]<<24^l[d>>>16&255]<<16^l[x>>>8&255]<<8^l[u&255]^e[++C],a[2]=l[d>>>24]<<24^l[x>>>16&255]<<16^l[u>>>8&255]<<8^l[p&255]^e[++C],a[r?1:3]=l[x>>>24]<<24^l[u>>>16&255]<<16^l[p>>>8&255]<<8^l[d&255]^e[++C]}function Zc(e){e=e||{};var t=(e.mode||"CBC").toUpperCase(),a="AES-"+t,r;e.decrypt?r=Ie.cipher.createDecipher(a,e.key):r=Ie.cipher.createCipher(a,e.key);var n=r.start;return r.start=function(s,i){var o=null;i instanceof Ie.util.ByteBuffer&&(o=i,i={}),i=i||{},i.output=o,i.iv=s,n.call(r,i)},r}var pc=ae;pc.pki=pc.pki||{};var ju=pc.pki.oids=pc.oids=pc.oids||{};function P(e,t){ju[e]=t,ju[t]=e}function Se(e,t){ju[e]=t}P("1.2.840.113549.1.1.1","rsaEncryption"),P("1.2.840.113549.1.1.4","md5WithRSAEncryption"),P("1.2.840.113549.1.1.5","sha1WithRSAEncryption"),P("1.2.840.113549.1.1.7","RSAES-OAEP"),P("1.2.840.113549.1.1.8","mgf1"),P("1.2.840.113549.1.1.9","pSpecified"),P("1.2.840.113549.1.1.10","RSASSA-PSS"),P("1.2.840.113549.1.1.11","sha256WithRSAEncryption"),P("1.2.840.113549.1.1.12","sha384WithRSAEncryption"),P("1.2.840.113549.1.1.13","sha512WithRSAEncryption"),P("1.3.101.112","EdDSA25519"),P("1.2.840.10040.4.3","dsa-with-sha1"),P("1.3.14.3.2.7","desCBC"),P("1.3.14.3.2.26","sha1"),P("1.3.14.3.2.29","sha1WithRSASignature"),P("2.16.840.1.101.3.4.2.1","sha256"),P("2.16.840.1.101.3.4.2.2","sha384"),P("2.16.840.1.101.3.4.2.3","sha512"),P("2.16.840.1.101.3.4.2.4","sha224"),P("2.16.840.1.101.3.4.2.5","sha512-224"),P("2.16.840.1.101.3.4.2.6","sha512-256"),P("1.2.840.113549.2.2","md2"),P("1.2.840.113549.2.5","md5"),P("1.2.840.113549.1.7.1","data"),P("1.2.840.113549.1.7.2","signedData"),P("1.2.840.113549.1.7.3","envelopedData"),P("1.2.840.113549.1.7.4","signedAndEnvelopedData"),P("1.2.840.113549.1.7.5","digestedData"),P("1.2.840.113549.1.7.6","encryptedData"),P("1.2.840.113549.1.9.1","emailAddress"),P("1.2.840.113549.1.9.2","unstructuredName"),P("1.2.840.113549.1.9.3","contentType"),P("1.2.840.113549.1.9.4","messageDigest"),P("1.2.840.113549.1.9.5","signingTime"),P("1.2.840.113549.1.9.6","counterSignature"),P("1.2.840.113549.1.9.7","challengePassword"),P("1.2.840.113549.1.9.8","unstructuredAddress"),P("1.2.840.113549.1.9.14","extensionRequest"),P("1.2.840.113549.1.9.20","friendlyName"),P("1.2.840.113549.1.9.21","localKeyId"),P("1.2.840.113549.1.9.22.1","x509Certificate"),P("1.2.840.113549.1.12.10.1.1","keyBag"),P("1.2.840.113549.1.12.10.1.2","pkcs8ShroudedKeyBag"),P("1.2.840.113549.1.12.10.1.3","certBag"),P("1.2.840.113549.1.12.10.1.4","crlBag"),P("1.2.840.113549.1.12.10.1.5","secretBag"),P("1.2.840.113549.1.12.10.1.6","safeContentsBag"),P("1.2.840.113549.1.5.13","pkcs5PBES2"),P("1.2.840.113549.1.5.12","pkcs5PBKDF2"),P("1.2.840.113549.1.12.1.1","pbeWithSHAAnd128BitRC4"),P("1.2.840.113549.1.12.1.2","pbeWithSHAAnd40BitRC4"),P("1.2.840.113549.1.12.1.3","pbeWithSHAAnd3-KeyTripleDES-CBC"),P("1.2.840.113549.1.12.1.4","pbeWithSHAAnd2-KeyTripleDES-CBC"),P("1.2.840.113549.1.12.1.5","pbeWithSHAAnd128BitRC2-CBC"),P("1.2.840.113549.1.12.1.6","pbewithSHAAnd40BitRC2-CBC"),P("1.2.840.113549.2.7","hmacWithSHA1"),P("1.2.840.113549.2.8","hmacWithSHA224"),P("1.2.840.113549.2.9","hmacWithSHA256"),P("1.2.840.113549.2.10","hmacWithSHA384"),P("1.2.840.113549.2.11","hmacWithSHA512"),P("1.2.840.113549.3.7","des-EDE3-CBC"),P("2.16.840.1.101.3.4.1.2","aes128-CBC"),P("2.16.840.1.101.3.4.1.22","aes192-CBC"),P("2.16.840.1.101.3.4.1.42","aes256-CBC"),P("2.5.4.3","commonName"),P("2.5.4.4","surname"),P("2.5.4.5","serialNumber"),P("2.5.4.6","countryName"),P("2.5.4.7","localityName"),P("2.5.4.8","stateOrProvinceName"),P("2.5.4.9","streetAddress"),P("2.5.4.10","organizationName"),P("2.5.4.11","organizationalUnitName"),P("2.5.4.12","title"),P("2.5.4.13","description"),P("2.5.4.15","businessCategory"),P("2.5.4.17","postalCode"),P("2.5.4.42","givenName"),P("2.5.4.65","pseudonym"),P("1.3.6.1.4.1.311.60.2.1.2","jurisdictionOfIncorporationStateOrProvinceName"),P("1.3.6.1.4.1.311.60.2.1.3","jurisdictionOfIncorporationCountryName"),P("2.16.840.1.113730.1.1","nsCertType"),P("2.16.840.1.113730.1.13","nsComment"),Se("2.5.29.1","authorityKeyIdentifier"),Se("2.5.29.2","keyAttributes"),Se("2.5.29.3","certificatePolicies"),Se("2.5.29.4","keyUsageRestriction"),Se("2.5.29.5","policyMapping"),Se("2.5.29.6","subtreesConstraint"),Se("2.5.29.7","subjectAltName"),Se("2.5.29.8","issuerAltName"),Se("2.5.29.9","subjectDirectoryAttributes"),Se("2.5.29.10","basicConstraints"),Se("2.5.29.11","nameConstraints"),Se("2.5.29.12","policyConstraints"),Se("2.5.29.13","basicConstraints"),P("2.5.29.14","subjectKeyIdentifier"),P("2.5.29.15","keyUsage"),Se("2.5.29.16","privateKeyUsagePeriod"),P("2.5.29.17","subjectAltName"),P("2.5.29.18","issuerAltName"),P("2.5.29.19","basicConstraints"),Se("2.5.29.20","cRLNumber"),Se("2.5.29.21","cRLReason"),Se("2.5.29.22","expirationDate"),Se("2.5.29.23","instructionCode"),Se("2.5.29.24","invalidityDate"),Se("2.5.29.25","cRLDistributionPoints"),Se("2.5.29.26","issuingDistributionPoint"),Se("2.5.29.27","deltaCRLIndicator"),Se("2.5.29.28","issuingDistributionPoint"),Se("2.5.29.29","certificateIssuer"),Se("2.5.29.30","nameConstraints"),P("2.5.29.31","cRLDistributionPoints"),P("2.5.29.32","certificatePolicies"),Se("2.5.29.33","policyMappings"),Se("2.5.29.34","policyConstraints"),P("2.5.29.35","authorityKeyIdentifier"),Se("2.5.29.36","policyConstraints"),P("2.5.29.37","extKeyUsage"),Se("2.5.29.46","freshestCRL"),Se("2.5.29.54","inhibitAnyPolicy"),P("1.3.6.1.4.1.11129.2.4.2","timestampList"),P("1.3.6.1.5.5.7.1.1","authorityInfoAccess"),P("1.3.6.1.5.5.7.3.1","serverAuth"),P("1.3.6.1.5.5.7.3.2","clientAuth"),P("1.3.6.1.5.5.7.3.3","codeSigning"),P("1.3.6.1.5.5.7.3.4","emailProtection"),P("1.3.6.1.5.5.7.3.8","timeStamping");var Re=ae,j=Re.asn1=Re.asn1||{};j.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192},j.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},j.maxDepth=256,j.create=function(e,t,a,r,n){if(Re.util.isArray(r)){for(var s=[],i=0;i<r.length;++i)r[i]!==void 0&&s.push(r[i]);r=s}var o={tagClass:e,type:t,constructed:a,composed:a||Re.util.isArray(r),value:r};return n&&"bitStringContents"in n&&(o.bitStringContents=n.bitStringContents,o.original=j.copy(o)),o},j.copy=function(e,t){var a;if(Re.util.isArray(e)){a=[];for(var r=0;r<e.length;++r)a.push(j.copy(e[r],t));return a}return typeof e=="string"?e:(a={tagClass:e.tagClass,type:e.type,constructed:e.constructed,composed:e.composed,value:j.copy(e.value,t)},t&&!t.excludeBitStringContents&&(a.bitStringContents=e.bitStringContents),a)},j.equals=function(e,t,a){if(Re.util.isArray(e)){if(!Re.util.isArray(t)||e.length!==t.length)return!1;for(var r=0;r<e.length;++r)if(!j.equals(e[r],t[r]))return!1;return!0}if(typeof e!=typeof t)return!1;if(typeof e=="string")return e===t;var n=e.tagClass===t.tagClass&&e.type===t.type&&e.constructed===t.constructed&&e.composed===t.composed&&j.equals(e.value,t.value);return a&&a.includeBitStringContents&&(n=n&&e.bitStringContents===t.bitStringContents),n},j.getBerValueLength=function(e){var t=e.getByte();if(t!==128){var a,r=t&128;return r?a=e.getInt((t&127)<<3):a=t,a}};function dc(e,t,a){if(a>t){var r=new Error("Too few bytes to parse DER.");throw r.available=e.length(),r.remaining=t,r.requested=a,r}}var G1=function(e,t){var a=e.getByte();if(t--,a!==128){var r,n=a&128;if(!n)r=a;else{var s=a&127;dc(e,t,s),r=e.getInt(s<<3)}if(r<0)throw new Error("Negative length: "+r);return r}};j.fromDer=function(e,t){t===void 0&&(t={strict:!0,parseAllBytes:!0,decodeBitStrings:!0}),typeof t=="boolean"&&(t={strict:t,parseAllBytes:!0,decodeBitStrings:!0}),"strict"in t||(t.strict=!0),"parseAllBytes"in t||(t.parseAllBytes=!0),"decodeBitStrings"in t||(t.decodeBitStrings=!0),"maxDepth"in t||(t.maxDepth=j.maxDepth),typeof e=="string"&&(e=Re.util.createBuffer(e));var a=e.length(),r=el(e,e.length(),0,t);if(t.parseAllBytes&&e.length()!==0){var n=new Error("Unparsed DER bytes remain after ASN.1 parsing.");throw n.byteCount=a,n.remaining=e.length(),n}return r};function el(e,t,a,r){if(a>=r.maxDepth)throw new Error("ASN.1 parsing error: Max depth exceeded.");var n;dc(e,t,2);var s=e.getByte();t--;var i=s&192,o=s&31;n=e.length();var c=G1(e,t);if(t-=n-e.length(),c!==void 0&&c>t){if(r.strict){var l=new Error("Too few bytes to read ASN.1 value.");throw l.available=e.length(),l.remaining=t,l.requested=c,l}c=t}var u,p,d=(s&32)===32;if(d)if(u=[],c===void 0)for(;;){if(dc(e,t,2),e.bytes(2)==="\0\0"){e.getBytes(2),t-=2;break}n=e.length(),u.push(el(e,t,a+1,r)),t-=n-e.length()}else for(;c>0;)n=e.length(),u.push(el(e,c,a+1,r)),t-=n-e.length(),c-=n-e.length();if(u===void 0&&i===j.Class.UNIVERSAL&&o===j.Type.BITSTRING&&(p=e.bytes(c)),u===void 0&&r.decodeBitStrings&&i===j.Class.UNIVERSAL&&o===j.Type.BITSTRING&&c>1){var x=e.read,m=t,y=0;if(o===j.Type.BITSTRING&&(dc(e,t,1),y=e.getByte(),t--),y===0)try{n=e.length();var b={strict:!0,decodeBitStrings:!0},C=el(e,t,a+1,b),B=n-e.length();t-=B,o==j.Type.BITSTRING&&B++;var _=C.tagClass;B===c&&(_===j.Class.UNIVERSAL||_===j.Class.CONTEXT_SPECIFIC)&&(u=[C])}catch{}u===void 0&&(e.read=x,t=m)}if(u===void 0){if(c===void 0){if(r.strict)throw new Error("Non-constructed ASN.1 object of indefinite length.");c=t}if(o===j.Type.BMPSTRING)for(u="";c>0;c-=2)dc(e,t,2),u+=String.fromCharCode(e.getInt16()),t-=2;else u=e.getBytes(c),t-=c}var k=p===void 0?null:{bitStringContents:p};return j.create(i,o,d,u,k)}j.toDer=function(e){var t=Re.util.createBuffer(),a=e.tagClass|e.type,r=Re.util.createBuffer(),n=!1;if("bitStringContents"in e&&(n=!0,e.original&&(n=j.equals(e,e.original))),n)r.putBytes(e.bitStringContents);else if(e.composed){e.constructed?a|=32:r.putByte(0);for(var s=0;s<e.value.length;++s)e.value[s]!==void 0&&r.putBuffer(j.toDer(e.value[s]))}else if(e.type===j.Type.BMPSTRING)for(var s=0;s<e.value.length;++s)r.putInt16(e.value.charCodeAt(s));else e.type===j.Type.INTEGER&&e.value.length>1&&(e.value.charCodeAt(0)===0&&(e.value.charCodeAt(1)&128)===0||e.value.charCodeAt(0)===255&&(e.value.charCodeAt(1)&128)===128)?r.putBytes(e.value.substr(1)):r.putBytes(e.value);if(t.putByte(a),r.length()<=127)t.putByte(r.length()&127);else{var i=r.length(),o="";do o+=String.fromCharCode(i&255),i=i>>>8;while(i>0);t.putByte(o.length|128);for(var s=o.length-1;s>=0;--s)t.putByte(o.charCodeAt(s))}return t.putBuffer(r),t},j.oidToDer=function(e){var t=e.split("."),a=Re.util.createBuffer();a.putByte(40*parseInt(t[0],10)+parseInt(t[1],10));for(var r,n,s,i,o=2;o<t.length;++o){if(r=!0,n=[],s=parseInt(t[o],10),s>4294967295)throw new Error("OID value too large; max is 32-bits.");do i=s&127,s=s>>>7,r||(i|=128),n.push(i),r=!1;while(s>0);for(var c=n.length-1;c>=0;--c)a.putByte(n[c])}return a},j.derToOid=function(e){var t;typeof e=="string"&&(e=Re.util.createBuffer(e));var a=e.getByte();t=Math.floor(a/40)+"."+a%40;for(var r=0;e.length()>0;){if(r>70368744177663)throw new Error("OID value too large; max is 53-bits.");a=e.getByte(),r=r*128,a&128?r+=a&127:(t+="."+(r+a),r=0)}return t},j.utcTimeToDate=function(e){var t=new Date,a=parseInt(e.substr(0,2),10);a=a>=50?1900+a:2e3+a;var r=parseInt(e.substr(2,2),10)-1,n=parseInt(e.substr(4,2),10),s=parseInt(e.substr(6,2),10),i=parseInt(e.substr(8,2),10),o=0;if(e.length>11){var c=e.charAt(10),l=10;c!=="+"&&c!=="-"&&(o=parseInt(e.substr(10,2),10),l+=2)}if(t.setUTCFullYear(a,r,n),t.setUTCHours(s,i,o,0),l&&(c=e.charAt(l),c==="+"||c==="-")){var u=parseInt(e.substr(l+1,2),10),p=parseInt(e.substr(l+4,2),10),d=u*60+p;d*=6e4,c==="+"?t.setTime(+t-d):t.setTime(+t+d)}return t},j.generalizedTimeToDate=function(e){var t=new Date,a=parseInt(e.substr(0,4),10),r=parseInt(e.substr(4,2),10)-1,n=parseInt(e.substr(6,2),10),s=parseInt(e.substr(8,2),10),i=parseInt(e.substr(10,2),10),o=parseInt(e.substr(12,2),10),c=0,l=0,u=!1;e.charAt(e.length-1)==="Z"&&(u=!0);var p=e.length-5,d=e.charAt(p);if(d==="+"||d==="-"){var x=parseInt(e.substr(p+1,2),10),m=parseInt(e.substr(p+4,2),10);l=x*60+m,l*=6e4,d==="+"&&(l*=-1),u=!0}return e.charAt(14)==="."&&(c=parseFloat(e.substr(14),10)*1e3),u?(t.setUTCFullYear(a,r,n),t.setUTCHours(s,i,o,c),t.setTime(+t+l)):(t.setFullYear(a,r,n),t.setHours(s,i,o,c)),t},j.dateToUtcTime=function(e){if(typeof e=="string")return e;var t="",a=[];a.push((""+e.getUTCFullYear()).substr(2)),a.push(""+(e.getUTCMonth()+1)),a.push(""+e.getUTCDate()),a.push(""+e.getUTCHours()),a.push(""+e.getUTCMinutes()),a.push(""+e.getUTCSeconds());for(var r=0;r<a.length;++r)a[r].length<2&&(t+="0"),t+=a[r];return t+="Z",t},j.dateToGeneralizedTime=function(e){if(typeof e=="string")return e;var t="",a=[];a.push(""+e.getUTCFullYear()),a.push(""+(e.getUTCMonth()+1)),a.push(""+e.getUTCDate()),a.push(""+e.getUTCHours()),a.push(""+e.getUTCMinutes()),a.push(""+e.getUTCSeconds());for(var r=0;r<a.length;++r)a[r].length<2&&(t+="0"),t+=a[r];return t+="Z",t},j.integerToDer=function(e){var t=Re.util.createBuffer();if(e>=-128&&e<128)return t.putSignedInt(e,8);if(e>=-32768&&e<32768)return t.putSignedInt(e,16);if(e>=-8388608&&e<8388608)return t.putSignedInt(e,24);if(e>=-2147483648&&e<2147483648)return t.putSignedInt(e,32);var a=new Error("Integer too large; max is 32-bits.");throw a.integer=e,a},j.derToInteger=function(e){typeof e=="string"&&(e=Re.util.createBuffer(e));var t=e.length()*8;if(t>32)throw new Error("Integer too large; max is 32-bits.");return e.getSignedInt(t)},j.validate=function(e,t,a,r){var n=!1;if((e.tagClass===t.tagClass||typeof t.tagClass>"u")&&(e.type===t.type||typeof t.type>"u"))if(e.constructed===t.constructed||typeof t.constructed>"u"){if(n=!0,t.value&&Re.util.isArray(t.value))for(var s=0,i=0;n&&i<t.value.length;++i){var o=t.value[i];n=!!o.optional;var c=e.value[s];if(!c){o.optional||(n=!1,r&&r.push("["+t.name+'] Missing required element. Expected tag class "'+o.tagClass+'", type "'+o.type+'"'));continue}var l=typeof o.tagClass<"u"&&typeof o.type<"u";if(l&&(c.tagClass!==o.tagClass||c.type!==o.type))if(o.optional){n=!0;continue}else{n=!1,r&&r.push("["+t.name+"] Tag mismatch. Expected ("+o.tagClass+","+o.type+"), got ("+c.tagClass+","+c.type+")");break}var u=j.validate(c,o,a,r);if(u)++s,n=!0;else if(o.optional)n=!0;else{n=!1;break}}if(n&&a&&(t.capture&&(a[t.capture]=e.value),t.captureAsn1&&(a[t.captureAsn1]=e),t.captureBitStringContents&&"bitStringContents"in e&&(a[t.captureBitStringContents]=e.bitStringContents),t.captureBitStringValue&&"bitStringContents"in e))if(e.bitStringContents.length<2)a[t.captureBitStringValue]="";else{var p=e.bitStringContents.charCodeAt(0);if(p!==0)throw new Error("captureBitStringValue only supported for zero unused bits");a[t.captureBitStringValue]=e.bitStringContents.slice(1)}}else r&&r.push("["+t.name+'] Expected constructed "'+t.constructed+'", got "'+e.constructed+'"');else r&&(e.tagClass!==t.tagClass&&r.push("["+t.name+'] Expected tag class "'+t.tagClass+'", got "'+e.tagClass+'"'),e.type!==t.type&&r.push("["+t.name+'] Expected type "'+t.type+'", got "'+e.type+'"'));return n};var Gf=/[^\\u0000-\\u00ff]/;j.prettyPrint=function(e,t,a){var r="";t=t||0,a=a||2,t>0&&(r+=`
|
|
29
|
-
`);for(var n="",s=0;s<t*a;++s)n+=" ";switch(r+=n+"Tag: ",e.tagClass){case j.Class.UNIVERSAL:r+="Universal:";break;case j.Class.APPLICATION:r+="Application:";break;case j.Class.CONTEXT_SPECIFIC:r+="Context-Specific:";break;case j.Class.PRIVATE:r+="Private:";break}if(e.tagClass===j.Class.UNIVERSAL)switch(r+=e.type,e.type){case j.Type.NONE:r+=" (None)";break;case j.Type.BOOLEAN:r+=" (Boolean)";break;case j.Type.INTEGER:r+=" (Integer)";break;case j.Type.BITSTRING:r+=" (Bit string)";break;case j.Type.OCTETSTRING:r+=" (Octet string)";break;case j.Type.NULL:r+=" (Null)";break;case j.Type.OID:r+=" (Object Identifier)";break;case j.Type.ODESC:r+=" (Object Descriptor)";break;case j.Type.EXTERNAL:r+=" (External or Instance of)";break;case j.Type.REAL:r+=" (Real)";break;case j.Type.ENUMERATED:r+=" (Enumerated)";break;case j.Type.EMBEDDED:r+=" (Embedded PDV)";break;case j.Type.UTF8:r+=" (UTF8)";break;case j.Type.ROID:r+=" (Relative Object Identifier)";break;case j.Type.SEQUENCE:r+=" (Sequence)";break;case j.Type.SET:r+=" (Set)";break;case j.Type.PRINTABLESTRING:r+=" (Printable String)";break;case j.Type.IA5String:r+=" (IA5String (ASCII))";break;case j.Type.UTCTIME:r+=" (UTC time)";break;case j.Type.GENERALIZEDTIME:r+=" (Generalized time)";break;case j.Type.BMPSTRING:r+=" (BMP String)";break}else r+=e.type;if(r+=`
|
|
1
|
+
"use strict";var z=require("axios");require("fs"),require("path");var Bo=require("crypto");const qe="https://api.circle.com".replace(/\/+$/,"");let Kl=class extends Error{constructor(t,a){super(a),this.field=t,this.name="RequiredError"}};const He={},Ge="https://example.com",Tt=function(e,t,a){if(a==null)throw new Kl(t,`Required parameter ${t} was null or undefined when calling ${e}.`)},Je=async function(e,t){if(t&&t.accessToken){const a=typeof t.accessToken=="function"?await t.accessToken():await t.accessToken;e.Authorization="Bearer "+a}};function a0(e,t,a=""){t!=null&&(typeof t=="object"?Array.isArray(t)?t.forEach(r=>a0(e,r,a)):Object.keys(t).forEach(r=>a0(e,t[r],`${a}${a!==""?".":""}${r}`)):e.has(a)?e.append(a,t):e.set(a,t))}const ze=function(e,...t){const a=new URLSearchParams(e.search);a0(a,t),e.search=a.toString()},Xt=function(e,t,a){const r=typeof e!="string";return(r&&a&&a.isJsonMime?a.isJsonMime(t.headers["Content-Type"]):r)?JSON.stringify(e!==void 0?e:{}):e||""},$e=function(e){return e.pathname+e.search+e.hash},Qe=function(e,t,a,r){return(n=t,i=a)=>{const s={...e.options,url:(r?.basePath||n.defaults.baseURL||i)+e.url};return n.request(s)}},ql=function(e){return{getEntityConfig:async(t={})=>{const a="/v1/w3s/config/entity",r=new URL(a,Ge);let n;e&&(n=e.baseOptions);const i={method:"GET",...n,...t},s={},o={};await Je(s,e),ze(r,o);let c=n&&n.headers?n.headers:{};return i.headers={...s,...c,...t.headers},{url:$e(r),options:i}},getPublicKey:async(t={})=>{const a="/v1/w3s/config/entity/publicKey",r=new URL(a,Ge);let n;e&&(n=e.baseOptions);const i={method:"GET",...n,...t},s={},o={};await Je(s,e),ze(r,o);let c=n&&n.headers?n.headers:{};return i.headers={...s,...c,...t.headers},{url:$e(r),options:i}}}},Hl=function(e){const t=ql(e);return{async getEntityConfig(a){const r=await t.getEntityConfig(a),n=e?.serverIndex??0,i=He["DeveloperAccountApi.getEntityConfig"]?.[n]?.url;return(s,o)=>Qe(r,z,qe,e)(s,i||o)},async getPublicKey(a){const r=await t.getPublicKey(a),n=e?.serverIndex??0,i=He["DeveloperAccountApi.getPublicKey"]?.[n]?.url;return(s,o)=>Qe(r,z,qe,e)(s,i||o)}}},Gl=function(e,t,a){const r=Hl(e);return{getEntityConfig(n){return r.getEntityConfig(n).then(i=>i(a,t))},getPublicKey(n){return r.getPublicKey(n).then(i=>i(a,t))}}},zl=function(e){return{requestTestnetTokens:async(t,a,r={})=>{const n="/v1/faucet/drips",i=new URL(n,Ge);let s;e&&(s=e.baseOptions);const o={method:"POST",...s,...r},c={},l={};await Je(c,e),t!=null&&(c["X-Request-Id"]=String(t)),c["Content-Type"]="application/json",ze(i,l);let u=s&&s.headers?s.headers:{};return o.headers={...c,...u,...r.headers},o.data=Xt(a,o,e),{url:$e(i),options:o}}}},$l=function(e){const t=zl(e);return{async requestTestnetTokens(a,r,n){const i=await t.requestTestnetTokens(a,r,n),s=e?.serverIndex??0,o=He["FaucetApi.requestTestnetTokens"]?.[s]?.url;return(c,l)=>Qe(i,z,qe,e)(c,o||l)}}},Ql=function(e,t,a){const r=$l(e);return{requestTestnetTokens(n,i,s){return r.requestTestnetTokens(n,i,s).then(o=>o(a,t))}}},jl=function(e){return{ping:async(t={})=>{const a="/ping",r=new URL(a,Ge);let n;e&&(n=e.baseOptions);const i={method:"GET",...n,...t},s={};ze(r,{});let o=n&&n.headers?n.headers:{};return i.headers={...s,...o,...t.headers},{url:$e(r),options:i}}}},Xl=function(e){const t=jl(e);return{async ping(a){const r=await t.ping(a),n=e?.serverIndex??0,i=He["HealthApi.ping"]?.[n]?.url;return(s,o)=>Qe(r,z,qe,e)(s,i||o)}}},Yl=function(e,t,a){const r=Xl(e);return{ping(n){return r.ping(n).then(i=>i(a,t))}}},Wl=function(e){return{createMonitoredTokens:async(t,a={})=>{Tt("createMonitoredTokens","createMonitoredTokensRequest",t);const r="/v1/w3s/config/entity/monitoredTokens",n=new URL(r,Ge);let i;e&&(i=e.baseOptions);const s={method:"POST",...i,...a},o={},c={};await Je(o,e),o["Content-Type"]="application/json",ze(n,c);let l=i&&i.headers?i.headers:{};return s.headers={...o,...l,...a.headers},s.data=Xt(t,s,e),{url:$e(n),options:s}},deleteMonitoredTokens:async(t,a={})=>{Tt("deleteMonitoredTokens","deleteMonitoredTokensRequest",t);const r="/v1/w3s/config/entity/monitoredTokens/delete",n=new URL(r,Ge);let i;e&&(i=e.baseOptions);const s={method:"POST",...i,...a},o={},c={};await Je(o,e),o["Content-Type"]="application/json",ze(n,c);let l=i&&i.headers?i.headers:{};return s.headers={...o,...l,...a.headers},s.data=Xt(t,s,e),{url:$e(n),options:s}},listMonitoredTokens:async(t,a,r,n,i,s,o,c,l={})=>{const u="/v1/w3s/config/entity/monitoredTokens",d=new URL(u,Ge);let v;e&&(v=e.baseOptions);const E={method:"GET",...v,...l},y={},x={};await Je(y,e),t!==void 0&&(x.blockchain=t),a!==void 0&&(x.tokenAddress=a),r!==void 0&&(x.symbol=r),n!==void 0&&(x.from=n instanceof Date?n.toISOString():n),i!==void 0&&(x.to=i instanceof Date?i.toISOString():i),s!==void 0&&(x.pageBefore=s),o!==void 0&&(x.pageAfter=o),c!==void 0&&(x.pageSize=c),ze(d,x);let b=v&&v.headers?v.headers:{};return E.headers={...y,...b,...l.headers},{url:$e(d),options:E}},updateMonitoredTokens:async(t,a={})=>{Tt("updateMonitoredTokens","updateMonitoredTokensRequest",t);const r="/v1/w3s/config/entity/monitoredTokens",n=new URL(r,Ge);let i;e&&(i=e.baseOptions);const s={method:"PUT",...i,...a},o={},c={};await Je(o,e),o["Content-Type"]="application/json",ze(n,c);let l=i&&i.headers?i.headers:{};return s.headers={...o,...l,...a.headers},s.data=Xt(t,s,e),{url:$e(n),options:s}},updateMonitoredTokensScope:async(t,a={})=>{Tt("updateMonitoredTokensScope","updateMonitoredTokensScopeRequest",t);const r="/v1/w3s/config/entity/monitoredTokens/scope",n=new URL(r,Ge);let i;e&&(i=e.baseOptions);const s={method:"PUT",...i,...a},o={},c={};await Je(o,e),o["Content-Type"]="application/json",ze(n,c);let l=i&&i.headers?i.headers:{};return s.headers={...o,...l,...a.headers},s.data=Xt(t,s,e),{url:$e(n),options:s}}}},Zl=function(e){const t=Wl(e);return{async createMonitoredTokens(a,r){const n=await t.createMonitoredTokens(a,r),i=e?.serverIndex??0,s=He["MonitorTokensApi.createMonitoredTokens"]?.[i]?.url;return(o,c)=>Qe(n,z,qe,e)(o,s||c)},async deleteMonitoredTokens(a,r){const n=await t.deleteMonitoredTokens(a,r),i=e?.serverIndex??0,s=He["MonitorTokensApi.deleteMonitoredTokens"]?.[i]?.url;return(o,c)=>Qe(n,z,qe,e)(o,s||c)},async listMonitoredTokens(a,r,n,i,s,o,c,l,u){const d=await t.listMonitoredTokens(a,r,n,i,s,o,c,l,u),v=e?.serverIndex??0,E=He["MonitorTokensApi.listMonitoredTokens"]?.[v]?.url;return(y,x)=>Qe(d,z,qe,e)(y,E||x)},async updateMonitoredTokens(a,r){const n=await t.updateMonitoredTokens(a,r),i=e?.serverIndex??0,s=He["MonitorTokensApi.updateMonitoredTokens"]?.[i]?.url;return(o,c)=>Qe(n,z,qe,e)(o,s||c)},async updateMonitoredTokensScope(a,r){const n=await t.updateMonitoredTokensScope(a,r),i=e?.serverIndex??0,s=He["MonitorTokensApi.updateMonitoredTokensScope"]?.[i]?.url;return(o,c)=>Qe(n,z,qe,e)(o,s||c)}}},Jl=function(e,t,a){const r=Zl(e);return{createMonitoredTokens(n,i){return r.createMonitoredTokens(n,i).then(s=>s(a,t))},deleteMonitoredTokens(n,i){return r.deleteMonitoredTokens(n,i).then(s=>s(a,t))},listMonitoredTokens(n,i,s,o,c,l,u,d,v){return r.listMonitoredTokens(n,i,s,o,c,l,u,d,v).then(E=>E(a,t))},updateMonitoredTokens(n,i){return r.updateMonitoredTokens(n,i).then(s=>s(a,t))},updateMonitoredTokensScope(n,i){return r.updateMonitoredTokensScope(n,i).then(s=>s(a,t))}}},eu=function(e){return{createSubscription:async(t,a,r={})=>{Tt("createSubscription","createSubscriptionRequest",t);const n="/v2/notifications/subscriptions",i=new URL(n,Ge);let s;e&&(s=e.baseOptions);const o={method:"POST",...s,...r},c={},l={};await Je(c,e),a!=null&&(c["X-Request-Id"]=String(a)),c["Content-Type"]="application/json",ze(i,l);let u=s&&s.headers?s.headers:{};return o.headers={...c,...u,...r.headers},o.data=Xt(t,o,e),{url:$e(i),options:o}},deleteSubscription:async(t,a,r={})=>{Tt("deleteSubscription","id",t);const n="/v2/notifications/subscriptions/{id}".replace("{id}",encodeURIComponent(String(t))),i=new URL(n,Ge);let s;e&&(s=e.baseOptions);const o={method:"DELETE",...s,...r},c={},l={};await Je(c,e),a!=null&&(c["X-Request-Id"]=String(a)),ze(i,l);let u=s&&s.headers?s.headers:{};return o.headers={...c,...u,...r.headers},{url:$e(i),options:o}},getNotificationSignature:async(t,a,r={})=>{Tt("getNotificationSignature","id",t);const n="/v2/notifications/publicKey/{id}".replace("{id}",encodeURIComponent(String(t))),i=new URL(n,Ge);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...r},c={},l={};await Je(c,e),a!=null&&(c["X-Request-Id"]=String(a)),ze(i,l);let u=s&&s.headers?s.headers:{};return o.headers={...c,...u,...r.headers},{url:$e(i),options:o}},getSubscription:async(t,a,r={})=>{Tt("getSubscription","id",t);const n="/v2/notifications/subscriptions/{id}".replace("{id}",encodeURIComponent(String(t))),i=new URL(n,Ge);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...r},c={},l={};await Je(c,e),a!=null&&(c["X-Request-Id"]=String(a)),ze(i,l);let u=s&&s.headers?s.headers:{};return o.headers={...c,...u,...r.headers},{url:$e(i),options:o}},getSubscriptions:async(t={})=>{const a="/v2/notifications/subscriptions",r=new URL(a,Ge);let n;e&&(n=e.baseOptions);const i={method:"GET",...n,...t},s={},o={};await Je(s,e),ze(r,o);let c=n&&n.headers?n.headers:{};return i.headers={...s,...c,...t.headers},{url:$e(r),options:i}},updateSubscription:async(t,a,r,n={})=>{Tt("updateSubscription","id",t),Tt("updateSubscription","updateSubscriptionRequest",a);const i="/v2/notifications/subscriptions/{id}".replace("{id}",encodeURIComponent(String(t))),s=new URL(i,Ge);let o;e&&(o=e.baseOptions);const c={method:"PATCH",...o,...n},l={},u={};await Je(l,e),r!=null&&(l["X-Request-Id"]=String(r)),l["Content-Type"]="application/json",ze(s,u);let d=o&&o.headers?o.headers:{};return c.headers={...l,...d,...n.headers},c.data=Xt(a,c,e),{url:$e(s),options:c}}}},tu=function(e){const t=eu(e);return{async createSubscription(a,r,n){const i=await t.createSubscription(a,r,n),s=e?.serverIndex??0,o=He["WebhookSubscriptionsApi.createSubscription"]?.[s]?.url;return(c,l)=>Qe(i,z,qe,e)(c,o||l)},async deleteSubscription(a,r,n){const i=await t.deleteSubscription(a,r,n),s=e?.serverIndex??0,o=He["WebhookSubscriptionsApi.deleteSubscription"]?.[s]?.url;return(c,l)=>Qe(i,z,qe,e)(c,o||l)},async getNotificationSignature(a,r,n){const i=await t.getNotificationSignature(a,r,n),s=e?.serverIndex??0,o=He["WebhookSubscriptionsApi.getNotificationSignature"]?.[s]?.url;return(c,l)=>Qe(i,z,qe,e)(c,o||l)},async getSubscription(a,r,n){const i=await t.getSubscription(a,r,n),s=e?.serverIndex??0,o=He["WebhookSubscriptionsApi.getSubscription"]?.[s]?.url;return(c,l)=>Qe(i,z,qe,e)(c,o||l)},async getSubscriptions(a){const r=await t.getSubscriptions(a),n=e?.serverIndex??0,i=He["WebhookSubscriptionsApi.getSubscriptions"]?.[n]?.url;return(s,o)=>Qe(r,z,qe,e)(s,i||o)},async updateSubscription(a,r,n,i){const s=await t.updateSubscription(a,r,n,i),o=e?.serverIndex??0,c=He["WebhookSubscriptionsApi.updateSubscription"]?.[o]?.url;return(l,u)=>Qe(s,z,qe,e)(l,c||u)}}},ru=function(e,t,a){const r=tu(e);return{createSubscription(n,i,s){return r.createSubscription(n,i,s).then(o=>o(a,t))},deleteSubscription(n,i,s){return r.deleteSubscription(n,i,s).then(o=>o(a,t))},getNotificationSignature(n,i,s){return r.getNotificationSignature(n,i,s).then(o=>o(a,t))},getSubscription(n,i,s){return r.getSubscription(n,i,s).then(o=>o(a,t))},getSubscriptions(n){return r.getSubscriptions(n).then(i=>i(a,t))},updateSubscription(n,i,s,o){return r.updateSubscription(n,i,s,o).then(c=>c(a,t))}}};var au=Object.defineProperty,nu=(e,t,a)=>t in e?au(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,Ot=(e,t,a)=>nu(e,typeof t!="symbol"?t+"":t,a);let su=class{constructor(t={}){Ot(this,"apiKey"),Ot(this,"username"),Ot(this,"password"),Ot(this,"accessToken"),Ot(this,"basePath"),Ot(this,"serverIndex"),Ot(this,"baseOptions"),Ot(this,"formDataCtor"),this.apiKey=t.apiKey,this.username=t.username,this.password=t.password,this.accessToken=t.accessToken,this.basePath=t.basePath,this.serverIndex=t.serverIndex,this.baseOptions=t.baseOptions,this.formDataCtor=t.formDataCtor}isJsonMime(t){const a=new RegExp("^(application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(;.*)?$","i");return t!==null&&(a.test(t)||t.toLowerCase()==="application/json-patch+json")}};var iu=Object.defineProperty,ou=(e,t,a)=>t in e?iu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,Er=(e,t,a)=>ou(e,typeof t!="symbol"?t+"":t,a);class cu{constructor(t,a,r={}){Er(this,"DeveloperAccount"),Er(this,"Faucet"),Er(this,"Health"),Er(this,"MonitorTokens"),Er(this,"WebhookSubscriptions");const n=new su({basePath:t,baseOptions:{headers:{...r,Authorization:`Bearer ${a.apiKey}`,"Content-Type":"application/json","User-Agent":`${a.userAgent?a.userAgent+" / ":""}CircleNodeJS / Configurations / ${a.version}`}}});this.DeveloperAccount=Gl(n),this.Faucet=Ql(n),this.Health=Yl(n),this.MonitorTokens=Jl(n),this.WebhookSubscriptions=ru(n)}}const et="https://api.circle.com".replace(/\/+$/,"");class lu extends Error{constructor(t,a){super(a),this.field=t,this.name="RequiredError"}}const tt={},rt="https://example.com",ft=function(e,t,a){if(a==null)throw new lu(t,`Required parameter ${t} was null or undefined when calling ${e}.`)},at=async function(e,t){if(t&&t.accessToken){const a=typeof t.accessToken=="function"?await t.accessToken():await t.accessToken;e.Authorization="Bearer "+a}};function n0(e,t,a=""){t!=null&&(typeof t=="object"?Array.isArray(t)?t.forEach(r=>n0(e,r,a)):Object.keys(t).forEach(r=>n0(e,t[r],`${a}${a!==""?".":""}${r}`)):e.has(a)?e.append(a,t):e.set(a,t))}const nt=function(e,...t){const a=new URLSearchParams(e.search);n0(a,t),e.search=a.toString()},kt=function(e,t,a){const r=typeof e!="string";return(r&&a&&a.isJsonMime?a.isJsonMime(t.headers["Content-Type"]):r)?JSON.stringify(e!==void 0?e:{}):e||""},st=function(e){return e.pathname+e.search+e.hash},it=function(e,t,a,r){return(n=t,i=a)=>{const s={...e.options,url:(r?.basePath||n.defaults.baseURL||i)+e.url};return n.request(s)}},uu=function(e){return{deployContract:async(t,a,r={})=>{ft("deployContract","contractDeploymentRequest",t);const n="/v1/w3s/contracts/deploy",i=new URL(n,rt);let s;e&&(s=e.baseOptions);const o={method:"POST",...s,...r},c={},l={};await at(c,e),a!=null&&(c["X-Request-Id"]=String(a)),c["Content-Type"]="application/json",nt(i,l);let u=s&&s.headers?s.headers:{};return o.headers={...c,...u,...r.headers},o.data=kt(t,o,e),{url:st(i),options:o}},estimateContractDeploy:async(t,a,r={})=>{ft("estimateContractDeploy","contractDeploymentEstimateFeeRequest",t);const n="/v1/w3s/contracts/deploy/estimateFee",i=new URL(n,rt);let s;e&&(s=e.baseOptions);const o={method:"POST",...s,...r},c={},l={};await at(c,e),a!=null&&(c["X-Request-Id"]=String(a)),c["Content-Type"]="application/json",nt(i,l);let u=s&&s.headers?s.headers:{};return o.headers={...c,...u,...r.headers},o.data=kt(t,o,e),{url:st(i),options:o}},importContract:async(t,a,r={})=>{ft("importContract","importContractRequest",t);const n="/v1/w3s/contracts/import",i=new URL(n,rt);let s;e&&(s=e.baseOptions);const o={method:"POST",...s,...r},c={},l={};await at(c,e),a!=null&&(c["X-Request-Id"]=String(a)),c["Content-Type"]="application/json",nt(i,l);let u=s&&s.headers?s.headers:{};return o.headers={...c,...u,...r.headers},o.data=kt(t,o,e),{url:st(i),options:o}}}},fu=function(e){const t=uu(e);return{async deployContract(a,r,n){const i=await t.deployContract(a,r,n),s=e?.serverIndex??0,o=tt["DeployImportApi.deployContract"]?.[s]?.url;return(c,l)=>it(i,z,et,e)(c,o||l)},async estimateContractDeploy(a,r,n){const i=await t.estimateContractDeploy(a,r,n),s=e?.serverIndex??0,o=tt["DeployImportApi.estimateContractDeploy"]?.[s]?.url;return(c,l)=>it(i,z,et,e)(c,o||l)},async importContract(a,r,n){const i=await t.importContract(a,r,n),s=e?.serverIndex??0,o=tt["DeployImportApi.importContract"]?.[s]?.url;return(c,l)=>it(i,z,et,e)(c,o||l)}}},du=function(e,t,a){const r=fu(e);return{deployContract(n,i,s){return r.deployContract(n,i,s).then(o=>o(a,t))},estimateContractDeploy(n,i,s){return r.estimateContractDeploy(n,i,s).then(o=>o(a,t))},importContract(n,i,s){return r.importContract(n,i,s).then(o=>o(a,t))}}},pu=function(e){return{createEventMonitor:async(t,a,r={})=>{const n="/v1/w3s/contracts/monitors",i=new URL(n,rt);let s;e&&(s=e.baseOptions);const o={method:"POST",...s,...r},c={},l={};await at(c,e),t!=null&&(c["X-Request-Id"]=String(t)),c["Content-Type"]="application/json",nt(i,l);let u=s&&s.headers?s.headers:{};return o.headers={...c,...u,...r.headers},o.data=kt(a,o,e),{url:st(i),options:o}},deleteEventMonitor:async(t,a,r={})=>{ft("deleteEventMonitor","id",t);const n="/v1/w3s/contracts/monitors/{id}".replace("{id}",encodeURIComponent(String(t))),i=new URL(n,rt);let s;e&&(s=e.baseOptions);const o={method:"DELETE",...s,...r},c={},l={};await at(c,e),a!=null&&(c["X-Request-Id"]=String(a)),nt(i,l);let u=s&&s.headers?s.headers:{};return o.headers={...c,...u,...r.headers},{url:st(i),options:o}},getEventMonitors:async(t,a,r,n,i,s,o,c,l,u={})=>{const d="/v1/w3s/contracts/monitors",v=new URL(d,rt);let E;e&&(E=e.baseOptions);const y={method:"GET",...E,...u},x={},b={};await at(x,e),t!==void 0&&(b.contractAddress=t),a!==void 0&&(b.blockchain=a),r!==void 0&&(b.eventSignature=r),n!==void 0&&(b.from=n instanceof Date?n.toISOString():n),i!==void 0&&(b.to=i instanceof Date?i.toISOString():i),s!==void 0&&(b.pageBefore=s),o!==void 0&&(b.pageAfter=o),c!==void 0&&(b.pageSize=c),l!=null&&(x["X-Request-Id"]=String(l)),nt(v,b);let A=E&&E.headers?E.headers:{};return y.headers={...x,...A,...u.headers},{url:st(v),options:y}},listEventLogs:async(t,a,r,n,i,s,o,c,l={})=>{const u="/v1/w3s/contracts/events",d=new URL(u,rt);let v;e&&(v=e.baseOptions);const E={method:"GET",...v,...l},y={},x={};await at(y,e),t!==void 0&&(x.contractAddress=t),a!==void 0&&(x.blockchain=a),r!==void 0&&(x.from=r instanceof Date?r.toISOString():r),n!==void 0&&(x.to=n instanceof Date?n.toISOString():n),i!==void 0&&(x.pageBefore=i),s!==void 0&&(x.pageAfter=s),o!==void 0&&(x.pageSize=o),c!=null&&(y["X-Request-Id"]=String(c)),nt(d,x);let b=v&&v.headers?v.headers:{};return E.headers={...y,...b,...l.headers},{url:st(d),options:E}},updateEventMonitor:async(t,a,r,n={})=>{ft("updateEventMonitor","id",t);const i="/v1/w3s/contracts/monitors/{id}".replace("{id}",encodeURIComponent(String(t))),s=new URL(i,rt);let o;e&&(o=e.baseOptions);const c={method:"PUT",...o,...n},l={},u={};await at(l,e),a!=null&&(l["X-Request-Id"]=String(a)),l["Content-Type"]="application/json",nt(s,u);let d=o&&o.headers?o.headers:{};return c.headers={...l,...d,...n.headers},c.data=kt(r,c,e),{url:st(s),options:c}}}},hu=function(e){const t=pu(e);return{async createEventMonitor(a,r,n){const i=await t.createEventMonitor(a,r,n),s=e?.serverIndex??0,o=tt["EventMonitorsApi.createEventMonitor"]?.[s]?.url;return(c,l)=>it(i,z,et,e)(c,o||l)},async deleteEventMonitor(a,r,n){const i=await t.deleteEventMonitor(a,r,n),s=e?.serverIndex??0,o=tt["EventMonitorsApi.deleteEventMonitor"]?.[s]?.url;return(c,l)=>it(i,z,et,e)(c,o||l)},async getEventMonitors(a,r,n,i,s,o,c,l,u,d){const v=await t.getEventMonitors(a,r,n,i,s,o,c,l,u,d),E=e?.serverIndex??0,y=tt["EventMonitorsApi.getEventMonitors"]?.[E]?.url;return(x,b)=>it(v,z,et,e)(x,y||b)},async listEventLogs(a,r,n,i,s,o,c,l,u){const d=await t.listEventLogs(a,r,n,i,s,o,c,l,u),v=e?.serverIndex??0,E=tt["EventMonitorsApi.listEventLogs"]?.[v]?.url;return(y,x)=>it(d,z,et,e)(y,E||x)},async updateEventMonitor(a,r,n,i){const s=await t.updateEventMonitor(a,r,n,i),o=e?.serverIndex??0,c=tt["EventMonitorsApi.updateEventMonitor"]?.[o]?.url;return(l,u)=>it(s,z,et,e)(l,c||u)}}},gu=function(e,t,a){const r=hu(e);return{createEventMonitor(n,i,s){return r.createEventMonitor(n,i,s).then(o=>o(a,t))},deleteEventMonitor(n,i,s){return r.deleteEventMonitor(n,i,s).then(o=>o(a,t))},getEventMonitors(n,i,s,o,c,l,u,d,v,E){return r.getEventMonitors(n,i,s,o,c,l,u,d,v,E).then(y=>y(a,t))},listEventLogs(n,i,s,o,c,l,u,d,v){return r.listEventLogs(n,i,s,o,c,l,u,d,v).then(E=>E(a,t))},updateEventMonitor(n,i,s,o){return r.updateEventMonitor(n,i,s,o).then(c=>c(a,t))}}},vu=function(e){return{queryContract:async(t,a,r={})=>{ft("queryContract","readContractStateRequest",t);const n="/v1/w3s/contracts/query",i=new URL(n,rt);let s;e&&(s=e.baseOptions);const o={method:"POST",...s,...r},c={},l={};await at(c,e),a!=null&&(c["X-Request-Id"]=String(a)),c["Content-Type"]="application/json",nt(i,l);let u=s&&s.headers?s.headers:{};return o.headers={...c,...u,...r.headers},o.data=kt(t,o,e),{url:st(i),options:o}}}},yu=function(e){const t=vu(e);return{async queryContract(a,r,n){const i=await t.queryContract(a,r,n),s=e?.serverIndex??0,o=tt["InteractApi.queryContract"]?.[s]?.url;return(c,l)=>it(i,z,et,e)(c,o||l)}}},mu=function(e,t,a){const r=yu(e);return{queryContract(n,i,s){return r.queryContract(n,i,s).then(o=>o(a,t))}}},Eu=function(e){return{deployContractTemplate:async(t,a,r,n={})=>{ft("deployContractTemplate","id",t),ft("deployContractTemplate","templateContractDeploymentRequest",a);const i="/v1/w3s/templates/{id}/deploy".replace("{id}",encodeURIComponent(String(t))),s=new URL(i,rt);let o;e&&(o=e.baseOptions);const c={method:"POST",...o,...n},l={},u={};await at(l,e),r!=null&&(l["X-Request-Id"]=String(r)),l["Content-Type"]="application/json",nt(s,u);let d=o&&o.headers?o.headers:{};return c.headers={...l,...d,...n.headers},c.data=kt(a,c,e),{url:st(s),options:c}},estimateContractTemplateDeploy:async(t,a,r,n={})=>{ft("estimateContractTemplateDeploy","id",t),ft("estimateContractTemplateDeploy","contractDeploymentEstimateRequest",a);const i="/v1/w3s/templates/{id}/deploy/estimateFee".replace("{id}",encodeURIComponent(String(t))),s=new URL(i,rt);let o;e&&(o=e.baseOptions);const c={method:"POST",...o,...n},l={},u={};await at(l,e),r!=null&&(l["X-Request-Id"]=String(r)),l["Content-Type"]="application/json",nt(s,u);let d=o&&o.headers?o.headers:{};return c.headers={...l,...d,...n.headers},c.data=kt(a,c,e),{url:st(s),options:c}}}},Cu=function(e){const t=Eu(e);return{async deployContractTemplate(a,r,n,i){const s=await t.deployContractTemplate(a,r,n,i),o=e?.serverIndex??0,c=tt["TemplatesApi.deployContractTemplate"]?.[o]?.url;return(l,u)=>it(s,z,et,e)(l,c||u)},async estimateContractTemplateDeploy(a,r,n,i){const s=await t.estimateContractTemplateDeploy(a,r,n,i),o=e?.serverIndex??0,c=tt["TemplatesApi.estimateContractTemplateDeploy"]?.[o]?.url;return(l,u)=>it(s,z,et,e)(l,c||u)}}},xu=function(e,t,a){const r=Cu(e);return{deployContractTemplate(n,i,s,o){return r.deployContractTemplate(n,i,s,o).then(c=>c(a,t))},estimateContractTemplateDeploy(n,i,s,o){return r.estimateContractTemplateDeploy(n,i,s,o).then(c=>c(a,t))}}},Su=function(e){return{getContract:async(t,a,r={})=>{ft("getContract","id",t);const n="/v1/w3s/contracts/{id}".replace("{id}",encodeURIComponent(String(t))),i=new URL(n,rt);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...r},c={},l={};await at(c,e),a!=null&&(c["X-Request-Id"]=String(a)),nt(i,l);let u=s&&s.headers?s.headers:{};return o.headers={...c,...u,...r.headers},{url:st(i),options:o}},listContracts:async(t,a,r,n,i,s,o,c,l,u,d,v={})=>{const E="/v1/w3s/contracts",y=new URL(E,rt);let x;e&&(x=e.baseOptions);const b={method:"GET",...x,...v},A={},w={};await at(A,e),t!==void 0&&(w.blockchain=t),a!==void 0&&(w.contractInputType=a),r!==void 0&&(w.deployerAddress=r),n!==void 0&&(w.name=n),i!==void 0&&(w.status=i),s!==void 0&&(w.from=s instanceof Date?s.toISOString():s),o!==void 0&&(w.to=o instanceof Date?o.toISOString():o),c!==void 0&&(w.pageBefore=c),l!==void 0&&(w.pageAfter=l),u!==void 0&&(w.pageSize=u),d!=null&&(A["X-Request-Id"]=String(d)),nt(y,w);let N=x&&x.headers?x.headers:{};return b.headers={...A,...N,...v.headers},{url:st(y),options:b}},updateContract:async(t,a,r,n={})=>{ft("updateContract","id",t),ft("updateContract","patchContractRequest",a);const i="/v1/w3s/contracts/{id}".replace("{id}",encodeURIComponent(String(t))),s=new URL(i,rt);let o;e&&(o=e.baseOptions);const c={method:"PATCH",...o,...n},l={},u={};await at(l,e),r!=null&&(l["X-Request-Id"]=String(r)),l["Content-Type"]="application/json",nt(s,u);let d=o&&o.headers?o.headers:{};return c.headers={...l,...d,...n.headers},c.data=kt(a,c,e),{url:st(s),options:c}}}},Tu=function(e){const t=Su(e);return{async getContract(a,r,n){const i=await t.getContract(a,r,n),s=e?.serverIndex??0,o=tt["ViewUpdateApi.getContract"]?.[s]?.url;return(c,l)=>it(i,z,et,e)(c,o||l)},async listContracts(a,r,n,i,s,o,c,l,u,d,v,E){const y=await t.listContracts(a,r,n,i,s,o,c,l,u,d,v,E),x=e?.serverIndex??0,b=tt["ViewUpdateApi.listContracts"]?.[x]?.url;return(A,w)=>it(y,z,et,e)(A,b||w)},async updateContract(a,r,n,i){const s=await t.updateContract(a,r,n,i),o=e?.serverIndex??0,c=tt["ViewUpdateApi.updateContract"]?.[o]?.url;return(l,u)=>it(s,z,et,e)(l,c||u)}}},bu=function(e,t,a){const r=Tu(e);return{getContract(n,i,s){return r.getContract(n,i,s).then(o=>o(a,t))},listContracts(n,i,s,o,c,l,u,d,v,E,y,x){return r.listContracts(n,i,s,o,c,l,u,d,v,E,y,x).then(b=>b(a,t))},updateContract(n,i,s,o){return r.updateContract(n,i,s,o).then(c=>c(a,t))}}};var Iu=Object.defineProperty,Au=(e,t,a)=>t in e?Iu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,Vt=(e,t,a)=>Au(e,typeof t!="symbol"?t+"":t,a);class Bu{constructor(t={}){Vt(this,"apiKey"),Vt(this,"username"),Vt(this,"password"),Vt(this,"accessToken"),Vt(this,"basePath"),Vt(this,"serverIndex"),Vt(this,"baseOptions"),Vt(this,"formDataCtor"),this.apiKey=t.apiKey,this.username=t.username,this.password=t.password,this.accessToken=t.accessToken,this.basePath=t.basePath,this.serverIndex=t.serverIndex,this.baseOptions=t.baseOptions,this.formDataCtor=t.formDataCtor}isJsonMime(t){const a=new RegExp("^(application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(;.*)?$","i");return t!==null&&(a.test(t)||t.toLowerCase()==="application/json-patch+json")}}const wu={Eth:"ETH",EthSepolia:"ETH-SEPOLIA",Matic:"MATIC",MaticAmoy:"MATIC-AMOY",Arb:"ARB",ArbSepolia:"ARB-SEPOLIA",Uni:"UNI",UniSepolia:"UNI-SEPOLIA",Base:"BASE",BaseSepolia:"BASE-SEPOLIA",Op:"OP",OpSepolia:"OP-SEPOLIA",Avax:"AVAX",AvaxFuji:"AVAX-FUJI",ArcTestnet:"ARC-TESTNET",Monad:"MONAD",MonadTestnet:"MONAD-TESTNET"};var Nu=Object.defineProperty,_u=(e,t,a)=>t in e?Nu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,Cr=(e,t,a)=>_u(e,typeof t!="symbol"?t+"":t,a);class Ru{constructor(t,a,r={}){Cr(this,"DeployImport"),Cr(this,"EventMonitors"),Cr(this,"Interact"),Cr(this,"Templates"),Cr(this,"ViewUpdate");const n=new Bu({basePath:t,baseOptions:{headers:{...r,Authorization:`Bearer ${a.apiKey}`,"Content-Type":"application/json","User-Agent":`${a.userAgent?a.userAgent+" / ":""}CircleNodeJS / SmartContractPlatform / ${a.version}`}}});this.DeployImport=du(n),this.EventMonitors=gu(n),this.Interact=mu(n),this.Templates=xu(n),this.ViewUpdate=bu(n)}}var ku=Object.defineProperty,Z0=e=>{throw TypeError(e)},Lu=(e,t,a)=>t in e?ku(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,ir=(e,t,a)=>Lu(e,typeof t!="symbol"?t+"":t,a),J0=(e,t,a)=>t.has(e)||Z0("Cannot "+a),Du=(e,t,a)=>(J0(e,t,"read from private field"),a?a.call(e):t.get(e)),Uu=(e,t,a)=>t.has(e)?Z0("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,a),Pu=(e,t,a,r)=>(J0(e,t,"write to private field"),r?r.call(e,a):t.set(e,a),a),wo;class xr extends Error{constructor({message:t,code:a,url:r,method:n,error:i}){super(t),ir(this,"code"),ir(this,"message"),ir(this,"url"),ir(this,"method"),Uu(this,wo),this.message=t??new.target.message,this.code=a??new.target.code,this.url=r,this.method=n,Pu(this,wo,i)}get error(){return Du(this,wo)}}wo=new WeakMap,ir(xr,"code","UNKNOWN"),ir(xr,"message","HTTP Error");var Ou=Object.defineProperty,Vu=(e,t,a)=>t in e?Ou(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,s0=(e,t,a)=>Vu(e,typeof t!="symbol"?t+"":t,a);class m extends xr{constructor({message:t,code:a,url:r,method:n,status:i,error:s}){super({message:t,code:a,url:r,method:n,error:s}),s0(this,"status"),this.status=i}}s0(m,"code",-1),s0(m,"message","HTTP Response Error");var Fu=Object.defineProperty,Mu=(e,t,a)=>t in e?Fu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,ec=(e,t,a)=>Mu(e,typeof t!="symbol"?t+"":t,a);class gt extends xr{}ec(gt,"code","UNKNOWN"),ec(gt,"message","Unknown HTTP request error");var Ku=Object.defineProperty,qu=(e,t,a)=>t in e?Ku(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,tc=(e,t,a)=>qu(e,typeof t!="symbol"?t+"":t,a);class Sr extends m{}tc(Sr,"code",400),tc(Sr,"message","Bad Request");var Hu=Object.defineProperty,Gu=(e,t,a)=>t in e?Hu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,rc=(e,t,a)=>Gu(e,typeof t!="symbol"?t+"":t,a);class Tr extends m{}rc(Tr,"code",401),rc(Tr,"message","Unauthorized");var zu=Object.defineProperty,$u=(e,t,a)=>t in e?zu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,ac=(e,t,a)=>$u(e,typeof t!="symbol"?t+"":t,a);class br extends m{}ac(br,"code",403),ac(br,"message","Forbidden");var Qu=Object.defineProperty,ju=(e,t,a)=>t in e?Qu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,nc=(e,t,a)=>ju(e,typeof t!="symbol"?t+"":t,a);class Ir extends m{}nc(Ir,"code",404),nc(Ir,"message","Not Found");var Xu=Object.defineProperty,Yu=(e,t,a)=>t in e?Xu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,sc=(e,t,a)=>Yu(e,typeof t!="symbol"?t+"":t,a);class Ar extends m{}sc(Ar,"code",429),sc(Ar,"message","Too Many Requests");var Wu=Object.defineProperty,Zu=(e,t,a)=>t in e?Wu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,ic=(e,t,a)=>Zu(e,typeof t!="symbol"?t+"":t,a);class Br extends m{}ic(Br,"code",500),ic(Br,"message","Internal Server Error");var Ju=Object.defineProperty,ef=(e,t,a)=>t in e?Ju(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,oc=(e,t,a)=>ef(e,typeof t!="symbol"?t+"":t,a);class wr extends m{}oc(wr,"code",501),oc(wr,"message","Not Implemented");var tf=Object.defineProperty,rf=(e,t,a)=>t in e?tf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,cc=(e,t,a)=>rf(e,typeof t!="symbol"?t+"":t,a);class Nr extends m{}cc(Nr,"code",502),cc(Nr,"message","Bad Gateway");var af=Object.defineProperty,nf=(e,t,a)=>t in e?af(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,lc=(e,t,a)=>nf(e,typeof t!="symbol"?t+"":t,a);class _r extends m{}lc(_r,"code",503),lc(_r,"message","Service Unavailable");var sf=Object.defineProperty,of=(e,t,a)=>t in e?sf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,uc=(e,t,a)=>of(e,typeof t!="symbol"?t+"":t,a);class Rr extends m{}uc(Rr,"code",504),uc(Rr,"message","Gateway Timeout");var cf=Object.defineProperty,lf=(e,t,a)=>t in e?cf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,fc=(e,t,a)=>lf(e,typeof t!="symbol"?t+"":t,a);class kr extends gt{}fc(kr,"code","ECONNREFUSED"),fc(kr,"message","Connection refused");var uf=Object.defineProperty,ff=(e,t,a)=>t in e?uf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,dc=(e,t,a)=>ff(e,typeof t!="symbol"?t+"":t,a);class Lr extends gt{}dc(Lr,"code","ETIMEDOUT"),dc(Lr,"message","Connection timeout");var df=Object.defineProperty,pf=(e,t,a)=>t in e?df(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,pc=(e,t,a)=>pf(e,typeof t!="symbol"?t+"":t,a);class Dr extends gt{}pc(Dr,"code","ECONNABORTED"),pc(Dr,"message","Request timeout");var hf=Object.defineProperty,gf=(e,t,a)=>t in e?hf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,hc=(e,t,a)=>gf(e,typeof t!="symbol"?t+"":t,a);class Ur extends gt{}hc(Ur,"code","ENOTFOUND"),hc(Ur,"message","DNS lookup failed - host not found");var vf=Object.defineProperty,yf=(e,t,a)=>t in e?vf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,gc=(e,t,a)=>yf(e,typeof t!="symbol"?t+"":t,a);class Pr extends gt{}gc(Pr,"code","EAI_AGAIN"),gc(Pr,"message","DNS lookup failed - timeout");var mf=Object.defineProperty,Ef=(e,t,a)=>t in e?mf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,vc=(e,t,a)=>Ef(e,typeof t!="symbol"?t+"":t,a);class Or extends gt{}vc(Or,"code","ENETUNREACH"),vc(Or,"message","Network unreachable");var Cf=Object.defineProperty,xf=(e,t,a)=>t in e?Cf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,yc=(e,t,a)=>xf(e,typeof t!="symbol"?t+"":t,a);class Vr extends gt{}yc(Vr,"code","ECONNRESET"),yc(Vr,"message","Connection reset");var Sf=Object.defineProperty,Tf=(e,t,a)=>t in e?Sf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,mc=(e,t,a)=>Tf(e,typeof t!="symbol"?t+"":t,a);class Fr extends gt{}mc(Fr,"code","EHOSTUNREACH"),mc(Fr,"message","Host unreachable");const Ec={undefined:gt,[kr.code]:kr,[Lr.code]:Lr,[Dr.code]:Dr,[Vr.code]:Vr,[Ur.code]:Ur,[Pr.code]:Pr,[Or.code]:Or,[Fr.code]:Fr};function bf(e){return Ec[e]??Ec.undefined}function If(e){return Af({code:e.code,message:e.message,url:e.config.url,method:e.config.method.toUpperCase(),error:e})}function Af({code:e,message:t,url:a,method:r,error:n}){const i=bf(e);return new i({message:t,code:e,url:a,method:r,error:n})}var Bf=Object.defineProperty,wf=(e,t,a)=>t in e?Bf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,f=(e,t,a)=>wf(e,typeof t!="symbol"?t+"":t,a);class i0 extends m{}f(i0,"code",110700),f(i0,"message","The input amount is outside trade limit.");class o0 extends m{}f(o0,"code",110701),f(o0,"message","No quote is available with given input.");class c0 extends m{}f(c0,"code",110702),f(c0,"message","No supported configurations with given input.");class l0 extends m{}f(l0,"code",110703),f(l0,"message","refId already exists, should be unique.");class Mr extends m{}f(Mr,"code",155101),f(Mr,"message","Existing user already created with the provided userId.");class Kr extends m{}f(Kr,"code",155102),f(Kr,"message","Cannot find the user id in the system.");class qr extends m{}f(qr,"code",155103),f(qr,"message","Cannot find the user token in the system.");class Hr extends m{}f(Hr,"code",155104),f(Hr,"message","The userToken had expired.");class Gr extends m{}f(Gr,"code",155105),f(Gr,"message","The userToken is invalid.");class zr extends m{}f(zr,"code",155106),f(zr,"message","The user had already been initialized.");class $r extends m{}f($r,"code",155107),f($r,"message","User has previously set a PIN. Use PUT /user/pin to reset the PIN.");class Qr extends m{}f(Qr,"code",155108),f(Qr,"message","User has previously set up their security questions, and they can't be reset.");class jr extends m{}f(jr,"code",155109),f(jr,"message","The specified user has been disabled.");class Xr extends m{}f(Xr,"code",155110),f(Xr,"message","User has not set up a PIN yet.");class Yr extends m{}f(Yr,"code",155111),f(Yr,"message","User hasn't set the security questions for PIN backup yet.");class Wr extends m{}f(Wr,"code",155112),f(Wr,"message","The user has inputted the incorrect pin.");class Zr extends m{}f(Zr,"code",155113),f(Zr,"message","Provided device ID is not found in the system.");class Jr extends m{}f(Jr,"code",155114),f(Jr,"message","Provided app ID is not recognized in the system.");class ea extends m{}f(ea,"code",155115),f(ea,"message","The user has inputted the incorrect security answers");class ta extends m{}f(ta,"code",155116),f(ta,"message","The challenge ID doesn't exist in the system.");class ra extends m{}f(ra,"code",155117),f(ra,"message","The content provided for approval is not correct.");class aa extends m{}f(aa,"code",155118),f(aa,"message","Encryption key does not match with the user's token. Call POST /users/token to get the correct token encryption key pair.");class na extends m{}f(na,"code",155119),f(na,"message","The user's PIN input is locked. It will be unlocked after the cooldown period.");class sa extends m{}f(sa,"code",155120),f(sa,"message","The user's security questions input is locked. It will be unlocked after the cooldown period.");class ia extends m{}f(ia,"code",155121),f(ia,"message","The provided challengeId has expired.");class oa extends m{}f(oa,"code",155122),f(oa,"message","The provided challengeId is invalid");class ca extends m{}f(ca,"code",155123),f(ca,"message","No extra information provided when adding PIN-related requests.");class la extends m{}f(la,"code",155124),f(la,"message","The extra information provided for PIN-related requests is invalid.");class ua extends m{}f(ua,"code",155130),f(ua,"message","User OTP token is expired.");class fa extends m{}f(fa,"code",155131),f(fa,"message","User OTP token is invalid.");class da extends m{}f(da,"code",155132),f(da,"message","User OTP value is not found.");class pa extends m{}f(pa,"code",155133),f(pa,"message","User OTP value is invalid.");class ha extends m{}f(ha,"code",155134),f(ha,"message","User OTP value is not matched.");class ga extends m{}f(ga,"code",155135),f(ga,"message","User's email is invalid.");class va extends m{}f(va,"code",155136),f(va,"message","User's email is not matched.");class ya extends m{}f(ya,"code",155137),f(ya,"message","User's device ID is invalid.");class ma extends m{}f(ma,"code",155138),f(ma,"message","Failed to send the email.");class Ea extends m{}f(Ea,"code",155139),f(Ea,"message","The idToken / accessToken of SSO is expired.");class Ca extends m{}f(Ca,"code",155140),f(Ca,"message","Failed to validate the idToken/ accessToken.");class xa extends m{}f(xa,"code",155141),f(xa,"message","The user has exceeded the max limit (5) of entering OTP at the moment.");class Sa extends m{}f(Sa,"code",155142),f(Sa,"message","The max limit (5) of sending OTP has been exceeded at the moment.");class Ta extends m{}f(Ta,"code",155143),f(Ta,"message","The device token is expired.");class ba extends m{}f(ba,"code",155144),f(ba,"message","The device token is invalid.");class Ia extends m{}f(Ia,"code",155145),f(Ia,"message","The device token is not found.");class Aa extends m{}f(Aa,"code",155146),f(Aa,"message","The one-time password token is invalid as the user has entered it incorrectly three times.");class Ba extends m{}f(Ba,"code",155150),f(Ba,"message","The SMTP server configuration is not found.");class wa extends m{}f(wa,"code",155151),f(wa,"message","The SMTP server configuration is invalid.");class Na extends m{}f(Na,"code",155152),f(Na,"message","The SSO provider configuration is not found.");class _a extends m{}f(_a,"code",155154),f(_a,"message","The OTP email template is invalid.");class Ra extends m{}f(Ra,"code",155155),f(Ra,"message","The OTP email template is not found.");class ka extends m{}f(ka,"code",155156),f(ka,"message","Failed to update the email template.");class La extends m{}f(La,"code",155157),f(La,"message","Failed to update the SMTP server configuration.");class Da extends m{}f(Da,"code",155158),f(Da,"message","Failed to dial to the SMTP server.");class Ua extends m{}f(Ua,"code",155159),f(Ua,"message","Failed to auth to the SMTP server.");class Pa extends m{}f(Pa,"code",155160),f(Pa,"message","Failed to send to the SMTP server.");class Oa extends m{}f(Oa,"code",155201),f(Oa,"message","Not enough funds to fulfill the withdraw request.");class Va extends m{}f(Va,"code",155202),f(Va,"message","Transaction nonce is inconsistent with sender's latest nonce.");class Fa extends m{}f(Fa,"code",155203),f(Fa,"message","User op nonce can not be larger than 0 when the smart contract wallet hasn't been deployed.");class Ma extends m{}f(Ma,"code",155204),f(Ma,"message","The total cost of executing transaction is higher than the balance of the user's account when estimating fee.");class Ka extends m{}f(Ka,"code",155205),f(Ka,"message","Failed to execute this request on EVM due to insufficient tokens when the estimating gas fee.");class qa extends m{}f(qa,"code",155206),f(qa,"message","The sender address is not the token owner or the sender wasn't approved to commit this transaction.");class Ha extends m{}f(Ha,"code",155207),f(Ha,"message","Gas required exceeds the maximum allowance for the account. This is based on the gas fee estimate amount.");class Ga extends m{}f(Ga,"code",155208),f(Ga,"message","Estimate fee execution reverted.");class za extends m{}f(za,"code",155209),f(za,"message","ABI function signature can't pack ABI parameter.");class $a extends m{}f($a,"code",155210),f($a,"message","Fails to perform transaction estimation.");class Qa extends m{}f(Qa,"code",155211),f(Qa,"message","MaxFee * GasLimit exceeded the maximum permitted transaction gas fee.");class ja extends m{}f(ja,"code",155215),f(ja,"message","Unsupported operation for transaction.");class Xa extends m{}f(Xa,"code",155218),f(Xa,"message","Invalid number of nft in transaction request.");class Ya extends m{}f(Ya,"code",155219),f(Ya,"message","Invalid destination address.");class Wa extends m{}f(Wa,"code",155220),f(Wa,"message","Wallet and token's blockchain mismatch.");class Za extends m{}f(Za,"code",155221),f(Za,"message","Invalid amounts in transfer request.");class Ja extends m{}f(Ja,"code",155222),f(Ja,"message","NFT metadata can not be found.");class en extends m{}f(en,"code",155223),f(en,"message","Unsupported userId for get transactions.");class tn extends m{}f(tn,"code",155224),f(tn,"message","Failed to parse the provided amounts in request to decimals.");class rn extends m{}f(rn,"code",155225),f(rn,"message","Wallet and request's blockchain mismatch.");class an extends m{}f(an,"code",155226),f(an,"message","Invalid source address.");class nn extends m{}f(nn,"code",155227),f(nn,"message","Invalid transaction type.");class sn extends m{}f(sn,"code",155228),f(sn,"message","Missing token ID.");class on extends m{}f(on,"code",155229),f(on,"message","Transaction is not eligible for operation.");class cn extends m{}f(cn,"code",155230),f(cn,"message","No abi signature provided.");class ln extends m{}f(ln,"code",155231),f(ln,"message","Transaction needs feeLevel or gasLimit provided.");class un extends m{}f(un,"code",155232),f(un,"message","SCA transaction needs feeLevel provided.");class fn extends m{}f(fn,"code",155233),f(fn,"message","Provided gasLimit is too low to complete the requested transaction.");class dn extends m{}f(dn,"code",155234),f(dn,"message","Transaction can't have both feeLevel and fee parameters provided.");class pn extends m{}f(pn,"code",155235),f(pn,"message","EIP1559 chains need maxFee/priorityFee provided.");class hn extends m{}f(hn,"code",155236),f(hn,"message","The provided fee in request is invalid.");class gn extends m{}f(gn,"code",155237),f(gn,"message","PriorityFee cannot be larger than maxFee in creating transaction request.");class vn extends m{}f(vn,"code",155238),f(vn,"message","Non-EIP1559 chains need gasPrice provided.");class yn extends m{}f(yn,"code",155239),f(yn,"message","Invalid token address for transfer.");class mn extends m{}f(mn,"code",155240),f(mn,"message","Invalid token standard for transfer.");class En extends m{}f(En,"code",155241),f(En,"message","Invalid token decimal for transfer.");class Cn extends m{}f(Cn,"code",155242),f(Cn,"message","The lengths of amounts and nft tokens don't match.");class xn extends m{}f(xn,"code",155243),f(xn,"message","Missing bytecode for contract deployment.");class Sn extends m{}f(Sn,"code",155244),f(Sn,"message","Cannot provide both WalletID and SourceAddress/Blockchain.");class Tn extends m{}f(Tn,"code",155245),f(Tn,"message","Invalid amount in contract execution request.");class bn extends m{}f(bn,"code",155247),f(bn,"message","Cannot provide both CallData and AbiFunctionSignature/AbiParameters.");class In extends m{}f(In,"code",155254),f(In,"message","Non-EIP1559 chains don't support maxFee/priorityFee.");class An extends m{}f(An,"code",155257),f(An,"message","the transfer amount is insufficient to make the destination account rent exempted or the balance of the source account is insufficient to remain rent exempted. The source address's remaining balance after transfer must be either zero or above the rent exemption threshold.");class Bn extends m{}f(Bn,"code",155258),f(Bn,"message","The asset amount owned by the wallet is insufficient for the transaction.");class wn extends m{}f(wn,"code",155262),f(wn,"message","Account is not found, could be caused by transacting from a Solana account with zero balance.");class Nn extends m{}f(Nn,"code",155264),f(Nn,"message","Wait for pending transactions to be included on the blockchain before submitting new requests. EVM chains restrict the number of queued transactions per sender address.");class _n extends m{}f(_n,"code",155501),f(_n,"message","Frozen wallets can not be updated or interact with, only query.");class Rn extends m{}f(Rn,"code",155502),f(Rn,"message","Max amount of wallets (tentative 1M) reached under 1 wallet set.");class kn extends m{}f(kn,"code",155503),f(kn,"message","Metadata array length needs to match wallet count in create developer wallets request.");class Ln extends m{}f(Ln,"code",155504),f(Ln,"message","Metadata array length needs to match number of blockchains in create user wallets request.");class Dn extends m{}f(Dn,"code",155505),f(Dn,"message","SCA wallet needs to wait for first-time transaction to be queued before processing more transactions.");class Un extends m{}f(Un,"code",155506),f(Un,"message","SCA wallet config is invalid.");class Pn extends m{}f(Pn,"code",155507),f(Pn,"message","SCA account is not supported on the given blockchain.");class On extends m{}f(On,"code",155508),f(On,"message","Can't create multiple user-controlled SCA wallets across multiple blockchains at a time.");class Vn extends m{}f(Vn,"code",155509),f(Vn,"message","Entity needs to setup paymaster policy in developer console before sending transaction on mainnet");class Fn extends m{}f(Fn,"code",155510),f(Fn,"message","The operation is not supported on the blockchain you specify.");class Mn extends m{}f(Mn,"code",155511),f(Mn,"message","Blockchain is not supported for wallet creation.");class Kn extends m{}f(Kn,"code",155512),f(Kn,"message","The owner of the SCA wallet can not be found.");class qn extends m{}f(qn,"code",155514),f(qn,"message","circle_4337_v1 SCA wallet must be deployed before being upgraded.");class Hn extends m{}f(Hn,"code",155515),f(Hn,"message","The provided wallet account type is not supported by this API.");class Gn extends m{}f(Gn,"code",155516),f(Gn,"message","The source wallet was originally created on an SCA version that does not support wallet derivation.");class zn extends m{}f(zn,"code",155517),f(zn,"message","The SCA wallet is not deployed onchain.");class $n extends m{}f($n,"code",155601),f($n,"message","Failed to retrieve wallet set which already exists.");class Qn extends m{}f(Qn,"code",155701),f(Qn,"message","User canceled");class jn extends m{}f(jn,"code",155702),f(jn,"message","<Launch UI failed reason>");class Xn extends m{}f(Xn,"code",155703),f(Xn,"message","The code you entered is not the same as the first one.");class Yn extends m{}f(Yn,"code",155704),f(Yn,"message","Your PIN can't have repeating or consecutive numbers.");class Wn extends m{}f(Wn,"code",155705),f(Wn,"message","Your hint can't be the same as the answer.");class Zn extends m{}f(Zn,"code",155706),f(Zn,"message","Network error");class Jn extends m{}f(Jn,"code",155707),f(Jn,"message","Failed to encrypt data");class es extends m{}f(es,"code",155708),f(es,"message",'"Biometrics instead of PIN" is disabled');class ts extends m{}f(ts,"code",155709),f(ts,"message","The device system doesn't support biometrics");class rs extends m{}f(rs,"code",155710),f(rs,"message","Failed to decrypt biometrics key");class as extends m{}f(as,"code",155711),f(as,"message","The user has not enabled biometrics yet");class ns extends m{}f(ns,"code",155712),f(ns,"message","The user refused to enable biometrics");class ss extends m{}f(ss,"code",155713),f(ss,"message","Too many requests. Try again later");class is extends m{}f(is,"code",155714),f(is,"message","Too many requests. The biometrics sensor on the device is locked.");class os extends m{}f(os,"code",155715),f(os,"message","The user didn't enable biometrics");class cs extends m{}f(cs,"code",155716),f(cs,"message","Unexpected error for biometrics");class ls extends m{}f(ls,"code",155717),f(ls,"message","User secret is missing.");class us extends m{}f(us,"code",155718),f(us,"message","User secret is invalid.");class fs extends m{}f(fs,"code",155719),f(fs,"message","User token and SDK API execute function does not match.");class ds extends m{}f(ds,"code",155720),f(ds,"message","Social login failed.");class ps extends m{}f(ps,"code",155721),f(ps,"message","Login info is missing.");class hs extends m{}f(hs,"code",155801),f(hs,"message","Transaction or rawTransaction is invalid.");class gs extends m{}f(gs,"code",155802),f(gs,"message","Account not found.");class vs extends m{}f(vs,"code",155803),f(vs,"message","Not signer account.");class ys extends m{}f(ys,"code",155804),f(ys,"message","Transaction already signed.");class ms extends m{}f(ms,"code",155805),f(ms,"message","Transaction failed to deserialize.");class Es extends m{}f(Es,"code",155806),f(Es,"message","The transaction size exceeds blockchain limit.");class Cs extends m{}f(Cs,"code",155807),f(Cs,"message","The chain ID is not supported for signing.");class xs extends m{}f(xs,"code",155808),f(xs,"message","The chain ID is missing in sign request.");class Ss extends m{}f(Ss,"code",156001),f(Ss,"message","Cannot find target wallet in the system. Either the specified wallet doesn't exist or it's not accessible to the caller.");class Ts extends m{}f(Ts,"code",156002),f(Ts,"message","Cannot find target token in the system. Either the specified token doesn't exist or it's not accessible to the caller.");class bs extends m{}f(bs,"code",156003),f(bs,"message","Cannot find target transaction in the system. Either the specified transaction doesn't exist or it's not accessible to the caller.");class Is extends m{}f(Is,"code",156004),f(Is,"message","Reusing an entity secret ciphertext is not allowed. Please re-encrypt the entity secret to generate new ciphertext.");class As extends m{}f(As,"code",156005),f(As,"message","Cannot find target wallet set in the system. Either no such wallet set, or it's not accessible to the caller.");class Bs extends m{}f(Bs,"code",156006),f(Bs,"message","TEST_API key cannot be used with blockchain mainnets, or LIVE_API key cannot be used with blockchain testnets.");class ws extends m{}f(ws,"code",156007),f(ws,"message","TEST_API key or LIVE_API key is not found for the request.");class Ns extends m{}f(Ns,"code",156008),f(Ns,"message","Cannot find target entity config in the system. Either no such entity config, or it's not accessible to the caller.");class _s extends m{}f(_s,"code",156009),f(_s,"message","Fail to parse id as UUID in url.");class Rs extends m{}f(Rs,"code",156010),f(Rs,"message","Cannot find the corresponding entity in the system.");class ks extends m{}f(ks,"code",156011),f(ks,"message","Cannot find target nftTokenId in the system.");class Ls extends m{}f(Ls,"code",156012),f(Ls,"message","Cannot find corresponding pagination cursor in the system.");class Ds extends m{}f(Ds,"code",156013),f(Ds,"message","The provided entity secret is invalid.");class Us extends m{}f(Us,"code",156014),f(Us,"message","Pagination params are invalid. Only UUID format is supported for pageBefore and pageAfter.");class Ps extends m{}f(Ps,"code",156015),f(Ps,"message","The secret for this entity has already been set.");class Os extends m{}f(Os,"code",156016),f(Os,"message","The entity secret has not been set yet. Please provide encrypted ciphertext in the console.");class Vs extends m{}f(Vs,"code",156017),f(Vs,"message","The specified blockchain parameters are incorrect.");class Fs extends m{}f(Fs,"code",156018),f(Fs,"message","The uploaded recovery file is invalid.");class Ms extends m{}f(Ms,"code",156019),f(Ms,"message","Current entity secret is invalid. Please rotate the entity secret first.");class Ks extends m{}f(Ks,"code",156020),f(Ks,"message","Please use a new idempotency key.");class qs extends m{}f(qs,"code",156021),f(qs,"message","A new wallet set ID is required.");class Hs extends m{}f(Hs,"code",156023),f(Hs,"message","EncodedByHex is true in sign request, but the message is not hex encoded.");class Gs extends m{}f(Gs,"code",156024),f(Gs,"message","Data is not a valid JSON string in sign request.");class zs extends m{}f(zs,"code",156025),f(zs,"message","Invalid message in request.");class $s extends m{}f($s,"code",156026),f($s,"message","Invalid typed data in request.");class Qs extends m{}f(Qs,"code",156027),f(Qs,"message","The specified blockchain is either not supported or deprecated.");class js extends m{}f(js,"code",156030),f(js,"message","Invalid unsigned delegate action in request.");class Xs extends m{}f(Xs,"code",156031),f(Xs,"message","The specified token address is not supported.");class Ys extends m{}f(Ys,"code",156032),f(Ys,"message","The provided amount is invalid.");class Ws extends m{}f(Ws,"code",175001),f(Ws,"message","contract not found");class Zs extends m{}f(Zs,"code",175002),f(Zs,"message","no ABI JSON for the target contract");class Js extends m{}f(Js,"code",175003),f(Js,"message","constructor parameters length must match constructor signature");class ei extends m{}f(ei,"code",175004),f(ei,"message","contract already exists");class ti extends m{}f(ti,"code",175005),f(ti,"message","address is not a contract address");class ri extends m{}f(ri,"code",175006),f(ri,"message","contract is archived");class ai extends m{}f(ai,"code",175007),f(ai,"message","invalid ABI JSON");class ni extends m{}f(ni,"code",175008),f(ni,"message","multi-layered proxies are not supported");class si extends m{}f(si,"code",175009),f(si,"message","contract deployment pending");class ii extends m{}f(ii,"code",175010),f(ii,"message","ABI function not found");class oi extends m{}f(oi,"code",175011),f(oi,"message","empty update on a contract");class ci extends m{}f(ci,"code",175012),f(ci,"message","unable to query contract");class li extends m{}f(li,"code",175013),f(li,"message","ABI function is not supported");class ui extends m{}f(ui,"code",175201),f(ui,"message","template not found");class fi extends m{}f(fi,"code",175202),f(fi,"message","deploying this template is temporarily disabled");class di extends m{}f(di,"code",175203),f(di,"message","invalid template deployment parameter");class pi extends m{}f(pi,"code",175204),f(pi,"message","missing required template deployment parameter");class hi extends m{}f(hi,"code",175205),f(hi,"message","estimation is not supported");class gi extends m{}f(gi,"code",175301),f(gi,"message","event subscription not found");class vi extends m{}f(vi,"code",175302),f(vi,"message","event subscription already exists");class yi extends m{}f(yi,"code",175303),f(yi,"message","the specified event signature does not exist");class mi extends m{}f(mi,"code",175401),f(mi,"message","failed to parse id as UUID in url");class Ei extends m{}f(Ei,"code",175402),f(Ei,"message","the specified blockchain is either not supported or deprecated");class Ci extends m{}f(Ci,"code",175403),f(Ci,"message","please use a new idempotency key");class xi extends m{}f(xi,"code",175404),f(xi,"message","TEST_API key cannot be used with blockchain mainnets, or LIVE_API key cannot be used with blockchain testnets");class Si extends m{}f(Si,"code",175405),f(Si,"message","TEST_API key or LIVE_API key is not found for the request");class Ti extends m{}f(Ti,"code",175406),f(Ti,"message","this feature is temporarily disabled");class bi extends m{}f(bi,"code",175407),f(bi,"message","the specified blockchain is currently unavailable");class Ii extends m{}f(Ii,"code",175408),f(Ii,"message","can not find corresponding pagination cursor in the system");class Ai extends m{}f(Ai,"code",175409),f(Ai,"message","restricted entity cannot perform this operation");class Bi extends m{}f(Bi,"code",175410),f(Bi,"message","invalid address format");class wi extends m{}f(wi,"code",177001),f(wi,"message","transaction nonce is inconsistent with sender's latest nonce");class Ni extends m{}f(Ni,"code",177002),f(Ni,"message","user op nonce can not be larger than 0 when smart contract wallet hasn't been deployed");class _i extends m{}f(_i,"code",177003),f(_i,"message","failed to execute this request on EVM due to insufficient token when estimating fee");class Ri extends m{}f(Ri,"code",177004),f(Ri,"message","the total cost of executing transaction is higher than the balance of the user's account when estimating fee");class ki extends m{}f(ki,"code",177005),f(ki,"message","the sender address is not token owner or approved when estimating token transfer");class Li extends m{}f(Li,"code",177006),f(Li,"message","gas required exceeds allowance when estimating fee");class Di extends m{}f(Di,"code",177007),f(Di,"message","estimate fee execution reverted");class Ui extends m{}f(Ui,"code",177008),f(Ui,"message","ABI function signature can't pack ABI parameter");class Pi extends m{}f(Pi,"code",177009),f(Pi,"message","fails to perform transaction estimation");class Oi extends m{}f(Oi,"code",177010),f(Oi,"message","MaxFee * GasLimit exceeds configurable max transaction fee (default is 1 native token)");class Vi extends m{}f(Vi,"code",177011),f(Vi,"message","transaction needs feeLevel or gasLimit provided");class Fi extends m{}f(Fi,"code",177012),f(Fi,"message","SCA transaction needs feeLevel provided");class Mi extends m{}f(Mi,"code",177013),f(Mi,"message","EIP1559 chains need maxFee/priorityFee provided");class Ki extends m{}f(Ki,"code",177014),f(Ki,"message","priorityFee cannot be larger than maxFee in creating transaction request");class qi extends m{}f(qi,"code",177015),f(qi,"message","missing bytecode for contract deployment");class Hi extends m{}f(Hi,"code",177016),f(Hi,"message","cannot provide both WalletID and SourceAddress/Blockchain");class Gi extends m{}f(Gi,"code",177017),f(Gi,"message","invalid amount in contract execution request");class zi extends m{}f(zi,"code",177018),f(zi,"message","policy is not activated and cannot be used");class $i extends m{}f($i,"code",177019),f($i,"message","exceeded max daily transaction of the policy");class Qi extends m{}f(Qi,"code",177020),f(Qi,"message","exceeded max spend USD per transaction of the policy");class ji extends m{}f(ji,"code",177021),f(ji,"message","exceeded max spend USD daily of the policy");class Xi extends m{}f(Xi,"code",177022),f(Xi,"message","exceeded max native token daily of the policy");class Yi extends m{}f(Yi,"code",177023),f(Yi,"message","sender is in policy blocklist");class Wi extends m{}f(Wi,"code",177024),f(Wi,"message","Wallet and request's blockchain mismatch.");class Zi extends m{}f(Zi,"code",177025),f(Zi,"message","the asset amount owned by the wallet is insufficient for the transaction");class Ji extends m{}f(Ji,"code",177026),f(Ji,"message","Wait for pending transactions to be included on the blockchain before submitting new requests. EVM chains restrict the number of queued transactions per sender address.");class eo extends m{}f(eo,"code",177301),f(eo,"message","wallet is Frozen");class to extends m{}f(to,"code",177302),f(to,"message","invalid sca wallet config");class ro extends m{}f(ro,"code",177303),f(ro,"message","SCA wallet first-time transaction is still in progress");class ao extends m{}f(ao,"code",177304),f(ao,"message","SCA account is not supported on the given blockchain");class no extends m{}f(no,"code",177305),f(no,"message","entity is not eligible for SCA account creation. Please check paymaster policy setup");class so extends m{}f(so,"code",177601),f(so,"message","cannot find target wallet in the system. Either the specified wallet doesn't exist or it's not accessible to the caller");class io extends m{}f(io,"code",177602),f(io,"message","reusing an entity secret ciphertext is not allowed. Please re-encrypt the entity secret to generate new ciphertext");class oo extends m{}f(oo,"code",177603),f(oo,"message","cannot find the corresponding entity in the system");class co extends m{}f(co,"code",177604),f(co,"message","the provided entity secret is invalid");class lo extends m{}f(lo,"code",177605),f(lo,"message","the entity secret has not been set yet. Please provide encrypted ciphertext in the console");class uo extends m{}f(uo,"code",177606),f(uo,"message","current entity secret is invalid. Please rotate the entity secret first");class fo extends m{}f(fo,"code",177607),f(fo,"message","please use a new idempotency key");class po extends m{}f(po,"code",177901),f(po,"message","smart contract query failed");const Cc={undefined:m,[Sr.code]:Sr,[Tr.code]:Tr,[br.code]:br,[Ir.code]:Ir,[Ar.code]:Ar,[Br.code]:Br,[wr.code]:wr,[Nr.code]:Nr,[_r.code]:_r,[Rr.code]:Rr,[Mr.code]:Mr,[Kr.code]:Kr,[qr.code]:qr,[Hr.code]:Hr,[Gr.code]:Gr,[zr.code]:zr,[$r.code]:$r,[Qr.code]:Qr,[jr.code]:jr,[Xr.code]:Xr,[Yr.code]:Yr,[Wr.code]:Wr,[Zr.code]:Zr,[Jr.code]:Jr,[ea.code]:ea,[ta.code]:ta,[ra.code]:ra,[aa.code]:aa,[na.code]:na,[sa.code]:sa,[ia.code]:ia,[oa.code]:oa,[ca.code]:ca,[la.code]:la,[ua.code]:ua,[fa.code]:fa,[da.code]:da,[pa.code]:pa,[ha.code]:ha,[ga.code]:ga,[va.code]:va,[ya.code]:ya,[ma.code]:ma,[Ea.code]:Ea,[Ca.code]:Ca,[xa.code]:xa,[Sa.code]:Sa,[Ta.code]:Ta,[ba.code]:ba,[Ia.code]:Ia,[Aa.code]:Aa,[Ba.code]:Ba,[wa.code]:wa,[Na.code]:Na,[_a.code]:_a,[Ra.code]:Ra,[ka.code]:ka,[La.code]:La,[Da.code]:Da,[Ua.code]:Ua,[Pa.code]:Pa,[Oa.code]:Oa,[Va.code]:Va,[Fa.code]:Fa,[Ma.code]:Ma,[Ka.code]:Ka,[qa.code]:qa,[Ha.code]:Ha,[Ga.code]:Ga,[za.code]:za,[$a.code]:$a,[Qa.code]:Qa,[ja.code]:ja,[Xa.code]:Xa,[Ya.code]:Ya,[Wa.code]:Wa,[Za.code]:Za,[Ja.code]:Ja,[en.code]:en,[tn.code]:tn,[rn.code]:rn,[an.code]:an,[nn.code]:nn,[sn.code]:sn,[on.code]:on,[cn.code]:cn,[ln.code]:ln,[un.code]:un,[fn.code]:fn,[dn.code]:dn,[pn.code]:pn,[hn.code]:hn,[gn.code]:gn,[vn.code]:vn,[yn.code]:yn,[mn.code]:mn,[En.code]:En,[Cn.code]:Cn,[xn.code]:xn,[Sn.code]:Sn,[Tn.code]:Tn,[bn.code]:bn,[In.code]:In,[An.code]:An,[Bn.code]:Bn,[wn.code]:wn,[Nn.code]:Nn,[_n.code]:_n,[Rn.code]:Rn,[kn.code]:kn,[Ln.code]:Ln,[Dn.code]:Dn,[Un.code]:Un,[Pn.code]:Pn,[On.code]:On,[Vn.code]:Vn,[Fn.code]:Fn,[Mn.code]:Mn,[Kn.code]:Kn,[qn.code]:qn,[Hn.code]:Hn,[Gn.code]:Gn,[zn.code]:zn,[$n.code]:$n,[Qn.code]:Qn,[jn.code]:jn,[Xn.code]:Xn,[Yn.code]:Yn,[Wn.code]:Wn,[Zn.code]:Zn,[Jn.code]:Jn,[es.code]:es,[ts.code]:ts,[rs.code]:rs,[as.code]:as,[ns.code]:ns,[ss.code]:ss,[is.code]:is,[os.code]:os,[cs.code]:cs,[ls.code]:ls,[us.code]:us,[fs.code]:fs,[ds.code]:ds,[ps.code]:ps,[hs.code]:hs,[gs.code]:gs,[vs.code]:vs,[ys.code]:ys,[ms.code]:ms,[Es.code]:Es,[Cs.code]:Cs,[xs.code]:xs,[Ss.code]:Ss,[Ts.code]:Ts,[bs.code]:bs,[Is.code]:Is,[As.code]:As,[Bs.code]:Bs,[ws.code]:ws,[Ns.code]:Ns,[_s.code]:_s,[Rs.code]:Rs,[ks.code]:ks,[Ls.code]:Ls,[Ds.code]:Ds,[Us.code]:Us,[Ps.code]:Ps,[Os.code]:Os,[Vs.code]:Vs,[Fs.code]:Fs,[Ms.code]:Ms,[Ks.code]:Ks,[qs.code]:qs,[Hs.code]:Hs,[Gs.code]:Gs,[zs.code]:zs,[$s.code]:$s,[Qs.code]:Qs,[js.code]:js,[Xs.code]:Xs,[Ys.code]:Ys,[Ws.code]:Ws,[Zs.code]:Zs,[Js.code]:Js,[ei.code]:ei,[ti.code]:ti,[ri.code]:ri,[ai.code]:ai,[ni.code]:ni,[si.code]:si,[ii.code]:ii,[oi.code]:oi,[ci.code]:ci,[li.code]:li,[ui.code]:ui,[fi.code]:fi,[di.code]:di,[pi.code]:pi,[hi.code]:hi,[gi.code]:gi,[vi.code]:vi,[yi.code]:yi,[mi.code]:mi,[Ei.code]:Ei,[Ci.code]:Ci,[xi.code]:xi,[Si.code]:Si,[Ti.code]:Ti,[bi.code]:bi,[Ii.code]:Ii,[Ai.code]:Ai,[Bi.code]:Bi,[wi.code]:wi,[Ni.code]:Ni,[_i.code]:_i,[Ri.code]:Ri,[ki.code]:ki,[Li.code]:Li,[Di.code]:Di,[Ui.code]:Ui,[Pi.code]:Pi,[Oi.code]:Oi,[Vi.code]:Vi,[Fi.code]:Fi,[Mi.code]:Mi,[Ki.code]:Ki,[qi.code]:qi,[Hi.code]:Hi,[Gi.code]:Gi,[zi.code]:zi,[$i.code]:$i,[Qi.code]:Qi,[ji.code]:ji,[Xi.code]:Xi,[Yi.code]:Yi,[Wi.code]:Wi,[Zi.code]:Zi,[Ji.code]:Ji,[eo.code]:eo,[to.code]:to,[ro.code]:ro,[ao.code]:ao,[no.code]:no,[so.code]:so,[io.code]:io,[oo.code]:oo,[co.code]:co,[lo.code]:lo,[uo.code]:uo,[fo.code]:fo,[po.code]:po};function Nf(e){return Cc[e]??Cc.undefined}function _f(e){const t=e.response.data,a=e.response.status;return Rf({code:t?.code??a,status:a,message:t?.message,url:e.config.url,method:e.config.method.toUpperCase(),error:e})}function Rf({code:e,status:t,message:a,url:r,method:n,error:i}){const s=Nf(e);return new s({message:a,code:e,url:r,method:n,status:t,error:i})}function Ke(e){return e.response?_f(e):If(e)}const ot=e=>{const{data:t,headers:a,...r}=e;return{...r,data:t.data,headers:a}},kf=({configurationsClient:e})=>async()=>{try{return ot(await e.DeveloperAccount.getPublicKey())}catch(t){throw z.isAxiosError(t)?Ke(t):t}};var Lf=Object.defineProperty,Df=(e,t,a)=>t in e?Lf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,Uf=(e,t,a)=>Df(e,typeof t!="symbol"?t+"":t,a);class Pf{constructor(){Uf(this,"data",{})}get(t){return Promise.resolve(this.data[t]??void 0)}set(t,a){return a===void 0?delete this.data[t]:this.data[t]=a,Promise.resolve()}}var Of=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},X={options:{usePureJavaScript:!1}},u0={},Vf=u0,xc={};u0.encode=function(e,t,a){if(typeof t!="string")throw new TypeError('"alphabet" must be a string.');if(a!==void 0&&typeof a!="number")throw new TypeError('"maxline" must be a number.');var r="";if(!(e instanceof Uint8Array))r=Ff(e,t);else{var n=0,i=t.length,s=t.charAt(0),o=[0];for(n=0;n<e.length;++n){for(var c=0,l=e[n];c<o.length;++c)l+=o[c]<<8,o[c]=l%i,l=l/i|0;for(;l>0;)o.push(l%i),l=l/i|0}for(n=0;e[n]===0&&n<e.length-1;++n)r+=s;for(n=o.length-1;n>=0;--n)r+=t[o[n]]}if(a){var u=new RegExp(".{1,"+a+"}","g");r=r.match(u).join(`\r
|
|
2
|
+
`)}return r},u0.decode=function(e,t){if(typeof e!="string")throw new TypeError('"input" must be a string.');if(typeof t!="string")throw new TypeError('"alphabet" must be a string.');var a=xc[t];if(!a){a=xc[t]=[];for(var r=0;r<t.length;++r)a[t.charCodeAt(r)]=r}e=e.replace(/\s/g,"");for(var n=t.length,i=t.charAt(0),s=[0],r=0;r<e.length;r++){var o=a[e.charCodeAt(r)];if(o===void 0)return;for(var c=0,l=o;c<s.length;++c)l+=s[c]*n,s[c]=l&255,l>>=8;for(;l>0;)s.push(l&255),l>>=8}for(var u=0;e[u]===i&&u<e.length-1;++u)s.push(0);return typeof Buffer<"u"?Buffer.from(s.reverse()):new Uint8Array(s.reverse())};function Ff(e,t){var a=0,r=t.length,n=t.charAt(0),i=[0];for(a=0;a<e.length();++a){for(var s=0,o=e.at(a);s<i.length;++s)o+=i[s]<<8,i[s]=o%r,o=o/r|0;for(;o>0;)i.push(o%r),o=o/r|0}var c="";for(a=0;e.at(a)===0&&a<e.length()-1;++a)c+=n;for(a=i.length-1;a>=0;--a)c+=t[i[a]];return c}var Sc=X,Tc=Vf,T=Sc.util=Sc.util||{};(function(){if(typeof process<"u"&&process.nextTick&&!process.browser){T.nextTick=process.nextTick,typeof setImmediate=="function"?T.setImmediate=setImmediate:T.setImmediate=T.nextTick;return}if(typeof setImmediate=="function"){T.setImmediate=function(){return setImmediate.apply(void 0,arguments)},T.nextTick=function(s){return setImmediate(s)};return}if(T.setImmediate=function(s){setTimeout(s,0)},typeof window<"u"&&typeof window.postMessage=="function"){let s=function(o){if(o.source===window&&o.data===e){o.stopPropagation();var c=t.slice();t.length=0,c.forEach(function(l){l()})}};var e="forge.setImmediate",t=[];T.setImmediate=function(o){t.push(o),t.length===1&&window.postMessage(e,"*")},window.addEventListener("message",s,!0)}if(typeof MutationObserver<"u"){var a=Date.now(),r=!0,n=document.createElement("div"),t=[];new MutationObserver(function(){var o=t.slice();t.length=0,o.forEach(function(c){c()})}).observe(n,{attributes:!0});var i=T.setImmediate;T.setImmediate=function(o){Date.now()-a>15?(a=Date.now(),i(o)):(t.push(o),t.length===1&&n.setAttribute("a",r=!r))}}T.nextTick=T.setImmediate})(),T.isNodejs=typeof process<"u"&&process.versions&&process.versions.node,T.globalScope=(function(){return T.isNodejs?Of:typeof self>"u"?window:self})(),T.isArray=Array.isArray||function(e){return Object.prototype.toString.call(e)==="[object Array]"},T.isArrayBuffer=function(e){return typeof ArrayBuffer<"u"&&e instanceof ArrayBuffer},T.isArrayBufferView=function(e){return e&&T.isArrayBuffer(e.buffer)&&e.byteLength!==void 0};function ho(e){if(!(e===8||e===16||e===24||e===32))throw new Error("Only 8, 16, 24, or 32 bits supported: "+e)}T.ByteBuffer=f0;function f0(e){if(this.data="",this.read=0,typeof e=="string")this.data=e;else if(T.isArrayBuffer(e)||T.isArrayBufferView(e))if(typeof Buffer<"u"&&e instanceof Buffer)this.data=e.toString("binary");else{var t=new Uint8Array(e);try{this.data=String.fromCharCode.apply(null,t)}catch{for(var a=0;a<t.length;++a)this.putByte(t[a])}}else(e instanceof f0||typeof e=="object"&&typeof e.data=="string"&&typeof e.read=="number")&&(this.data=e.data,this.read=e.read);this._constructedStringLength=0}T.ByteStringBuffer=f0;var Mf=4096;T.ByteStringBuffer.prototype._optimizeConstructedString=function(e){this._constructedStringLength+=e,this._constructedStringLength>Mf&&(this.data.substr(0,1),this._constructedStringLength=0)},T.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read},T.ByteStringBuffer.prototype.isEmpty=function(){return this.length()<=0},T.ByteStringBuffer.prototype.putByte=function(e){return this.putBytes(String.fromCharCode(e))},T.ByteStringBuffer.prototype.fillWithByte=function(e,t){e=String.fromCharCode(e);for(var a=this.data;t>0;)t&1&&(a+=e),t>>>=1,t>0&&(e+=e);return this.data=a,this._optimizeConstructedString(t),this},T.ByteStringBuffer.prototype.putBytes=function(e){return this.data+=e,this._optimizeConstructedString(e.length),this},T.ByteStringBuffer.prototype.putString=function(e){return this.putBytes(T.encodeUtf8(e))},T.ByteStringBuffer.prototype.putInt16=function(e){return this.putBytes(String.fromCharCode(e>>8&255)+String.fromCharCode(e&255))},T.ByteStringBuffer.prototype.putInt24=function(e){return this.putBytes(String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(e&255))},T.ByteStringBuffer.prototype.putInt32=function(e){return this.putBytes(String.fromCharCode(e>>24&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(e&255))},T.ByteStringBuffer.prototype.putInt16Le=function(e){return this.putBytes(String.fromCharCode(e&255)+String.fromCharCode(e>>8&255))},T.ByteStringBuffer.prototype.putInt24Le=function(e){return this.putBytes(String.fromCharCode(e&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(e>>16&255))},T.ByteStringBuffer.prototype.putInt32Le=function(e){return this.putBytes(String.fromCharCode(e&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>24&255))},T.ByteStringBuffer.prototype.putInt=function(e,t){ho(t);var a="";do t-=8,a+=String.fromCharCode(e>>t&255);while(t>0);return this.putBytes(a)},T.ByteStringBuffer.prototype.putSignedInt=function(e,t){return e<0&&(e+=2<<t-1),this.putInt(e,t)},T.ByteStringBuffer.prototype.putBuffer=function(e){return this.putBytes(e.getBytes())},T.ByteStringBuffer.prototype.getByte=function(){return this.data.charCodeAt(this.read++)},T.ByteStringBuffer.prototype.getInt16=function(){var e=this.data.charCodeAt(this.read)<<8^this.data.charCodeAt(this.read+1);return this.read+=2,e},T.ByteStringBuffer.prototype.getInt24=function(){var e=this.data.charCodeAt(this.read)<<16^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2);return this.read+=3,e},T.ByteStringBuffer.prototype.getInt32=function(){var e=this.data.charCodeAt(this.read)<<24^this.data.charCodeAt(this.read+1)<<16^this.data.charCodeAt(this.read+2)<<8^this.data.charCodeAt(this.read+3);return this.read+=4,e},T.ByteStringBuffer.prototype.getInt16Le=function(){var e=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8;return this.read+=2,e},T.ByteStringBuffer.prototype.getInt24Le=function(){var e=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16;return this.read+=3,e},T.ByteStringBuffer.prototype.getInt32Le=function(){var e=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16^this.data.charCodeAt(this.read+3)<<24;return this.read+=4,e},T.ByteStringBuffer.prototype.getInt=function(e){ho(e);var t=0;do t=(t<<8)+this.data.charCodeAt(this.read++),e-=8;while(e>0);return t},T.ByteStringBuffer.prototype.getSignedInt=function(e){var t=this.getInt(e),a=2<<e-2;return t>=a&&(t-=a<<1),t},T.ByteStringBuffer.prototype.getBytes=function(e){var t;return e?(e=Math.min(this.length(),e),t=this.data.slice(this.read,this.read+e),this.read+=e):e===0?t="":(t=this.read===0?this.data:this.data.slice(this.read),this.clear()),t},T.ByteStringBuffer.prototype.bytes=function(e){return typeof e>"u"?this.data.slice(this.read):this.data.slice(this.read,this.read+e)},T.ByteStringBuffer.prototype.at=function(e){return this.data.charCodeAt(this.read+e)},T.ByteStringBuffer.prototype.setAt=function(e,t){return this.data=this.data.substr(0,this.read+e)+String.fromCharCode(t)+this.data.substr(this.read+e+1),this},T.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)},T.ByteStringBuffer.prototype.copy=function(){var e=T.createBuffer(this.data);return e.read=this.read,e},T.ByteStringBuffer.prototype.compact=function(){return this.read>0&&(this.data=this.data.slice(this.read),this.read=0),this},T.ByteStringBuffer.prototype.clear=function(){return this.data="",this.read=0,this},T.ByteStringBuffer.prototype.truncate=function(e){var t=Math.max(0,this.length()-e);return this.data=this.data.substr(this.read,t),this.read=0,this},T.ByteStringBuffer.prototype.toHex=function(){for(var e="",t=this.read;t<this.data.length;++t){var a=this.data.charCodeAt(t);a<16&&(e+="0"),e+=a.toString(16)}return e},T.ByteStringBuffer.prototype.toString=function(){return T.decodeUtf8(this.bytes())};function Kf(e,t){t=t||{},this.read=t.readOffset||0,this.growSize=t.growSize||1024;var a=T.isArrayBuffer(e),r=T.isArrayBufferView(e);if(a||r){a?this.data=new DataView(e):this.data=new DataView(e.buffer,e.byteOffset,e.byteLength),this.write="writeOffset"in t?t.writeOffset:this.data.byteLength;return}this.data=new DataView(new ArrayBuffer(0)),this.write=0,e!=null&&this.putBytes(e),"writeOffset"in t&&(this.write=t.writeOffset)}T.DataBuffer=Kf,T.DataBuffer.prototype.length=function(){return this.write-this.read},T.DataBuffer.prototype.isEmpty=function(){return this.length()<=0},T.DataBuffer.prototype.accommodate=function(e,t){if(this.length()>=e)return this;t=Math.max(t||this.growSize,e);var a=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),r=new Uint8Array(this.length()+t);return r.set(a),this.data=new DataView(r.buffer),this},T.DataBuffer.prototype.putByte=function(e){return this.accommodate(1),this.data.setUint8(this.write++,e),this},T.DataBuffer.prototype.fillWithByte=function(e,t){this.accommodate(t);for(var a=0;a<t;++a)this.data.setUint8(e);return this},T.DataBuffer.prototype.putBytes=function(e,t){if(T.isArrayBufferView(e)){var a=new Uint8Array(e.buffer,e.byteOffset,e.byteLength),r=a.byteLength-a.byteOffset;this.accommodate(r);var n=new Uint8Array(this.data.buffer,this.write);return n.set(a),this.write+=r,this}if(T.isArrayBuffer(e)){var a=new Uint8Array(e);this.accommodate(a.byteLength);var n=new Uint8Array(this.data.buffer);return n.set(a,this.write),this.write+=a.byteLength,this}if(e instanceof T.DataBuffer||typeof e=="object"&&typeof e.read=="number"&&typeof e.write=="number"&&T.isArrayBufferView(e.data)){var a=new Uint8Array(e.data.byteLength,e.read,e.length());this.accommodate(a.byteLength);var n=new Uint8Array(e.data.byteLength,this.write);return n.set(a),this.write+=a.byteLength,this}if(e instanceof T.ByteStringBuffer&&(e=e.data,t="binary"),t=t||"binary",typeof e=="string"){var i;if(t==="hex")return this.accommodate(Math.ceil(e.length/2)),i=new Uint8Array(this.data.buffer,this.write),this.write+=T.binary.hex.decode(e,i,this.write),this;if(t==="base64")return this.accommodate(Math.ceil(e.length/4)*3),i=new Uint8Array(this.data.buffer,this.write),this.write+=T.binary.base64.decode(e,i,this.write),this;if(t==="utf8"&&(e=T.encodeUtf8(e),t="binary"),t==="binary"||t==="raw")return this.accommodate(e.length),i=new Uint8Array(this.data.buffer,this.write),this.write+=T.binary.raw.decode(i),this;if(t==="utf16")return this.accommodate(e.length*2),i=new Uint16Array(this.data.buffer,this.write),this.write+=T.text.utf16.encode(i),this;throw new Error("Invalid encoding: "+t)}throw Error("Invalid parameter: "+e)},T.DataBuffer.prototype.putBuffer=function(e){return this.putBytes(e),e.clear(),this},T.DataBuffer.prototype.putString=function(e){return this.putBytes(e,"utf16")},T.DataBuffer.prototype.putInt16=function(e){return this.accommodate(2),this.data.setInt16(this.write,e),this.write+=2,this},T.DataBuffer.prototype.putInt24=function(e){return this.accommodate(3),this.data.setInt16(this.write,e>>8&65535),this.data.setInt8(this.write,e>>16&255),this.write+=3,this},T.DataBuffer.prototype.putInt32=function(e){return this.accommodate(4),this.data.setInt32(this.write,e),this.write+=4,this},T.DataBuffer.prototype.putInt16Le=function(e){return this.accommodate(2),this.data.setInt16(this.write,e,!0),this.write+=2,this},T.DataBuffer.prototype.putInt24Le=function(e){return this.accommodate(3),this.data.setInt8(this.write,e>>16&255),this.data.setInt16(this.write,e>>8&65535,!0),this.write+=3,this},T.DataBuffer.prototype.putInt32Le=function(e){return this.accommodate(4),this.data.setInt32(this.write,e,!0),this.write+=4,this},T.DataBuffer.prototype.putInt=function(e,t){ho(t),this.accommodate(t/8);do t-=8,this.data.setInt8(this.write++,e>>t&255);while(t>0);return this},T.DataBuffer.prototype.putSignedInt=function(e,t){return ho(t),this.accommodate(t/8),e<0&&(e+=2<<t-1),this.putInt(e,t)},T.DataBuffer.prototype.getByte=function(){return this.data.getInt8(this.read++)},T.DataBuffer.prototype.getInt16=function(){var e=this.data.getInt16(this.read);return this.read+=2,e},T.DataBuffer.prototype.getInt24=function(){var e=this.data.getInt16(this.read)<<8^this.data.getInt8(this.read+2);return this.read+=3,e},T.DataBuffer.prototype.getInt32=function(){var e=this.data.getInt32(this.read);return this.read+=4,e},T.DataBuffer.prototype.getInt16Le=function(){var e=this.data.getInt16(this.read,!0);return this.read+=2,e},T.DataBuffer.prototype.getInt24Le=function(){var e=this.data.getInt8(this.read)^this.data.getInt16(this.read+1,!0)<<8;return this.read+=3,e},T.DataBuffer.prototype.getInt32Le=function(){var e=this.data.getInt32(this.read,!0);return this.read+=4,e},T.DataBuffer.prototype.getInt=function(e){ho(e);var t=0;do t=(t<<8)+this.data.getInt8(this.read++),e-=8;while(e>0);return t},T.DataBuffer.prototype.getSignedInt=function(e){var t=this.getInt(e),a=2<<e-2;return t>=a&&(t-=a<<1),t},T.DataBuffer.prototype.getBytes=function(e){var t;return e?(e=Math.min(this.length(),e),t=this.data.slice(this.read,this.read+e),this.read+=e):e===0?t="":(t=this.read===0?this.data:this.data.slice(this.read),this.clear()),t},T.DataBuffer.prototype.bytes=function(e){return typeof e>"u"?this.data.slice(this.read):this.data.slice(this.read,this.read+e)},T.DataBuffer.prototype.at=function(e){return this.data.getUint8(this.read+e)},T.DataBuffer.prototype.setAt=function(e,t){return this.data.setUint8(e,t),this},T.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)},T.DataBuffer.prototype.copy=function(){return new T.DataBuffer(this)},T.DataBuffer.prototype.compact=function(){if(this.read>0){var e=new Uint8Array(this.data.buffer,this.read),t=new Uint8Array(e.byteLength);t.set(e),this.data=new DataView(t),this.write-=this.read,this.read=0}return this},T.DataBuffer.prototype.clear=function(){return this.data=new DataView(new ArrayBuffer(0)),this.read=this.write=0,this},T.DataBuffer.prototype.truncate=function(e){return this.write=Math.max(0,this.length()-e),this.read=Math.min(this.read,this.write),this},T.DataBuffer.prototype.toHex=function(){for(var e="",t=this.read;t<this.data.byteLength;++t){var a=this.data.getUint8(t);a<16&&(e+="0"),e+=a.toString(16)}return e},T.DataBuffer.prototype.toString=function(e){var t=new Uint8Array(this.data,this.read,this.length());if(e=e||"utf8",e==="binary"||e==="raw")return T.binary.raw.encode(t);if(e==="hex")return T.binary.hex.encode(t);if(e==="base64")return T.binary.base64.encode(t);if(e==="utf8")return T.text.utf8.decode(t);if(e==="utf16")return T.text.utf16.decode(t);throw new Error("Invalid encoding: "+e)},T.createBuffer=function(e,t){return t=t||"raw",e!==void 0&&t==="utf8"&&(e=T.encodeUtf8(e)),new T.ByteBuffer(e)},T.fillString=function(e,t){for(var a="";t>0;)t&1&&(a+=e),t>>>=1,t>0&&(e+=e);return a},T.xorBytes=function(e,t,a){for(var r="",n="",i="",s=0,o=0;a>0;--a,++s)n=e.charCodeAt(s)^t.charCodeAt(s),o>=10&&(r+=i,i="",o=0),i+=String.fromCharCode(n),++o;return r+=i,r},T.hexToBytes=function(e){var t="",a=0;for(e.length&!0&&(a=1,t+=String.fromCharCode(parseInt(e[0],16)));a<e.length;a+=2)t+=String.fromCharCode(parseInt(e.substr(a,2),16));return t},T.bytesToHex=function(e){return T.createBuffer(e).toHex()},T.int32ToBytes=function(e){return String.fromCharCode(e>>24&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(e&255)};var Ft="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Mt=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],bc="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";T.encode64=function(e,t){for(var a="",r="",n,i,s,o=0;o<e.length;)n=e.charCodeAt(o++),i=e.charCodeAt(o++),s=e.charCodeAt(o++),a+=Ft.charAt(n>>2),a+=Ft.charAt((n&3)<<4|i>>4),isNaN(i)?a+="==":(a+=Ft.charAt((i&15)<<2|s>>6),a+=isNaN(s)?"=":Ft.charAt(s&63)),t&&a.length>t&&(r+=a.substr(0,t)+`\r
|
|
3
|
+
`,a=a.substr(t));return r+=a,r},T.decode64=function(e){e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var t="",a,r,n,i,s=0;s<e.length;)a=Mt[e.charCodeAt(s++)-43],r=Mt[e.charCodeAt(s++)-43],n=Mt[e.charCodeAt(s++)-43],i=Mt[e.charCodeAt(s++)-43],t+=String.fromCharCode(a<<2|r>>4),n!==64&&(t+=String.fromCharCode((r&15)<<4|n>>2),i!==64&&(t+=String.fromCharCode((n&3)<<6|i)));return t},T.encodeUtf8=function(e){return unescape(encodeURIComponent(e))},T.decodeUtf8=function(e){return decodeURIComponent(escape(e))},T.binary={raw:{},hex:{},base64:{},base58:{},baseN:{encode:Tc.encode,decode:Tc.decode}},T.binary.raw.encode=function(e){return String.fromCharCode.apply(null,e)},T.binary.raw.decode=function(e,t,a){var r=t;r||(r=new Uint8Array(e.length)),a=a||0;for(var n=a,i=0;i<e.length;++i)r[n++]=e.charCodeAt(i);return t?n-a:r},T.binary.hex.encode=T.bytesToHex,T.binary.hex.decode=function(e,t,a){var r=t;r||(r=new Uint8Array(Math.ceil(e.length/2))),a=a||0;var n=0,i=a;for(e.length&1&&(n=1,r[i++]=parseInt(e[0],16));n<e.length;n+=2)r[i++]=parseInt(e.substr(n,2),16);return t?i-a:r},T.binary.base64.encode=function(e,t){for(var a="",r="",n,i,s,o=0;o<e.byteLength;)n=e[o++],i=e[o++],s=e[o++],a+=Ft.charAt(n>>2),a+=Ft.charAt((n&3)<<4|i>>4),isNaN(i)?a+="==":(a+=Ft.charAt((i&15)<<2|s>>6),a+=isNaN(s)?"=":Ft.charAt(s&63)),t&&a.length>t&&(r+=a.substr(0,t)+`\r
|
|
4
|
+
`,a=a.substr(t));return r+=a,r},T.binary.base64.decode=function(e,t,a){var r=t;r||(r=new Uint8Array(Math.ceil(e.length/4)*3)),e=e.replace(/[^A-Za-z0-9\+\/\=]/g,""),a=a||0;for(var n,i,s,o,c=0,l=a;c<e.length;)n=Mt[e.charCodeAt(c++)-43],i=Mt[e.charCodeAt(c++)-43],s=Mt[e.charCodeAt(c++)-43],o=Mt[e.charCodeAt(c++)-43],r[l++]=n<<2|i>>4,s!==64&&(r[l++]=(i&15)<<4|s>>2,o!==64&&(r[l++]=(s&3)<<6|o));return t?l-a:r.subarray(0,l)},T.binary.base58.encode=function(e,t){return T.binary.baseN.encode(e,bc,t)},T.binary.base58.decode=function(e,t){return T.binary.baseN.decode(e,bc,t)},T.text={utf8:{},utf16:{}},T.text.utf8.encode=function(e,t,a){e=T.encodeUtf8(e);var r=t;r||(r=new Uint8Array(e.length)),a=a||0;for(var n=a,i=0;i<e.length;++i)r[n++]=e.charCodeAt(i);return t?n-a:r},T.text.utf8.decode=function(e){return T.decodeUtf8(String.fromCharCode.apply(null,e))},T.text.utf16.encode=function(e,t,a){var r=t;r||(r=new Uint8Array(e.length*2));var n=new Uint16Array(r.buffer);a=a||0;for(var i=a,s=a,o=0;o<e.length;++o)n[s++]=e.charCodeAt(o),i+=2;return t?i-a:r},T.text.utf16.decode=function(e){return String.fromCharCode.apply(null,new Uint16Array(e.buffer))},T.deflate=function(e,t,a){if(t=T.decode64(e.deflate(T.encode64(t)).rval),a){var r=2,n=t.charCodeAt(1);n&32&&(r=6),t=t.substring(r,t.length-4)}return t},T.inflate=function(e,t,a){var r=e.inflate(T.encode64(t)).rval;return r===null?null:T.decode64(r)};var d0=function(e,t,a){if(!e)throw new Error("WebStorage not available.");var r;if(a===null?r=e.removeItem(t):(a=T.encode64(JSON.stringify(a)),r=e.setItem(t,a)),typeof r<"u"&&r.rval!==!0){var n=new Error(r.error.message);throw n.id=r.error.id,n.name=r.error.name,n}},p0=function(e,t){if(!e)throw new Error("WebStorage not available.");var a=e.getItem(t);if(e.init)if(a.rval===null){if(a.error){var r=new Error(a.error.message);throw r.id=a.error.id,r.name=a.error.name,r}a=null}else a=a.rval;return a!==null&&(a=JSON.parse(T.decode64(a))),a},qf=function(e,t,a,r){var n=p0(e,t);n===null&&(n={}),n[a]=r,d0(e,t,n)},Hf=function(e,t,a){var r=p0(e,t);return r!==null&&(r=a in r?r[a]:null),r},Gf=function(e,t,a){var r=p0(e,t);if(r!==null&&a in r){delete r[a];var n=!0;for(var i in r){n=!1;break}n&&(r=null),d0(e,t,r)}},zf=function(e,t){d0(e,t,null)},No=function(e,t,a){var r=null;typeof a>"u"&&(a=["web","flash"]);var n,i=!1,s=null;for(var o in a){n=a[o];try{if(n==="flash"||n==="both"){if(t[0]===null)throw new Error("Flash local storage not available.");r=e.apply(this,t),i=n==="flash"}(n==="web"||n==="both")&&(t[0]=localStorage,r=e.apply(this,t),i=!0)}catch(c){s=c}if(i)break}if(!i)throw s;return r};T.setItem=function(e,t,a,r,n){No(qf,arguments,n)},T.getItem=function(e,t,a,r){return No(Hf,arguments,r)},T.removeItem=function(e,t,a,r){No(Gf,arguments,r)},T.clearItems=function(e,t,a){No(zf,arguments,a)},T.isEmpty=function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0},T.format=function(e){for(var t=/%./g,a,r,n=0,i=[],s=0;a=t.exec(e);){r=e.substring(s,t.lastIndex-2),r.length>0&&i.push(r),s=t.lastIndex;var o=a[0][1];switch(o){case"s":case"o":n<arguments.length?i.push(arguments[n+++1]):i.push("<?>");break;case"%":i.push("%");break;default:i.push("<%"+o+"?>")}}return i.push(e.substring(s)),i.join("")},T.formatNumber=function(e,t,a,r){var n=e,i=isNaN(t=Math.abs(t))?2:t,s=a===void 0?",":a,o=r===void 0?".":r,c=n<0?"-":"",l=parseInt(n=Math.abs(+n||0).toFixed(i),10)+"",u=l.length>3?l.length%3:0;return c+(u?l.substr(0,u)+o:"")+l.substr(u).replace(/(\d{3})(?=\d)/g,"$1"+o)+(i?s+Math.abs(n-l).toFixed(i).slice(2):"")},T.formatSize=function(e){return e>=1073741824?e=T.formatNumber(e/1073741824,2,".","")+" GiB":e>=1048576?e=T.formatNumber(e/1048576,2,".","")+" MiB":e>=1024?e=T.formatNumber(e/1024,0)+" KiB":e=T.formatNumber(e,0)+" bytes",e},T.bytesFromIP=function(e){return e.indexOf(".")!==-1?T.bytesFromIPv4(e):e.indexOf(":")!==-1?T.bytesFromIPv6(e):null},T.bytesFromIPv4=function(e){if(e=e.split("."),e.length!==4)return null;for(var t=T.createBuffer(),a=0;a<e.length;++a){var r=parseInt(e[a],10);if(isNaN(r))return null;t.putByte(r)}return t.getBytes()},T.bytesFromIPv6=function(e){var t=0;e=e.split(":").filter(function(s){return s.length===0&&++t,!0});for(var a=(8-e.length+t)*2,r=T.createBuffer(),n=0;n<8;++n){if(!e[n]||e[n].length===0){r.fillWithByte(0,a),a=0;continue}var i=T.hexToBytes(e[n]);i.length<2&&r.putByte(0),r.putBytes(i)}return r.getBytes()},T.bytesToIP=function(e){return e.length===4?T.bytesToIPv4(e):e.length===16?T.bytesToIPv6(e):null},T.bytesToIPv4=function(e){if(e.length!==4)return null;for(var t=[],a=0;a<e.length;++a)t.push(e.charCodeAt(a));return t.join(".")},T.bytesToIPv6=function(e){if(e.length!==16)return null;for(var t=[],a=[],r=0,n=0;n<e.length;n+=2){for(var i=T.bytesToHex(e[n]+e[n+1]);i[0]==="0"&&i!=="0";)i=i.substr(1);if(i==="0"){var s=a[a.length-1],o=t.length;!s||o!==s.end+1?a.push({start:o,end:o}):(s.end=o,s.end-s.start>a[r].end-a[r].start&&(r=a.length-1))}t.push(i)}if(a.length>0){var c=a[r];c.end-c.start>0&&(t.splice(c.start,c.end-c.start+1,""),c.start===0&&t.unshift(""),c.end===7&&t.push(""))}return t.join(":")},T.estimateCores=function(e,t){if(typeof e=="function"&&(t=e,e={}),e=e||{},"cores"in T&&!e.update)return t(null,T.cores);if(typeof navigator<"u"&&"hardwareConcurrency"in navigator&&navigator.hardwareConcurrency>0)return T.cores=navigator.hardwareConcurrency,t(null,T.cores);if(typeof Worker>"u")return T.cores=1,t(null,T.cores);if(typeof Blob>"u")return T.cores=2,t(null,T.cores);var a=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(s){var o=Date.now(),c=o+4;self.postMessage({st:o,et:c})})}.toString(),")()"],{type:"application/javascript"}));r([],5,16);function r(s,o,c){if(o===0){var l=Math.floor(s.reduce(function(u,d){return u+d},0)/s.length);return T.cores=Math.max(1,l),URL.revokeObjectURL(a),t(null,T.cores)}n(c,function(u,d){s.push(i(c,d)),r(s,o-1,c)})}function n(s,o){for(var c=[],l=[],u=0;u<s;++u){var d=new Worker(a);d.addEventListener("message",function(v){if(l.push(v.data),l.length===s){for(var E=0;E<s;++E)c[E].terminate();o(null,l)}}),c.push(d)}for(var u=0;u<s;++u)c[u].postMessage(u)}function i(s,o){for(var c=[],l=0;l<s;++l)for(var u=o[l],d=c[l]=[],v=0;v<s;++v)if(l!==v){var E=o[v];(u.st>E.st&&u.st<E.et||E.st>u.st&&E.st<u.et)&&d.push(v)}return c.reduce(function(y,x){return Math.max(y,x.length)},0)}};var Se=X;Se.cipher=Se.cipher||{},Se.cipher.algorithms=Se.cipher.algorithms||{},Se.cipher.createCipher=function(e,t){var a=e;if(typeof a=="string"&&(a=Se.cipher.getAlgorithm(a),a&&(a=a())),!a)throw new Error("Unsupported algorithm: "+e);return new Se.cipher.BlockCipher({algorithm:a,key:t,decrypt:!1})},Se.cipher.createDecipher=function(e,t){var a=e;if(typeof a=="string"&&(a=Se.cipher.getAlgorithm(a),a&&(a=a())),!a)throw new Error("Unsupported algorithm: "+e);return new Se.cipher.BlockCipher({algorithm:a,key:t,decrypt:!0})},Se.cipher.registerAlgorithm=function(e,t){e=e.toUpperCase(),Se.cipher.algorithms[e]=t},Se.cipher.getAlgorithm=function(e){return e=e.toUpperCase(),e in Se.cipher.algorithms?Se.cipher.algorithms[e]:null};var h0=Se.cipher.BlockCipher=function(e){this.algorithm=e.algorithm,this.mode=this.algorithm.mode,this.blockSize=this.mode.blockSize,this._finish=!1,this._input=null,this.output=null,this._op=e.decrypt?this.mode.decrypt:this.mode.encrypt,this._decrypt=e.decrypt,this.algorithm.initialize(e)};h0.prototype.start=function(e){e=e||{};var t={};for(var a in e)t[a]=e[a];t.decrypt=this._decrypt,this._finish=!1,this._input=Se.util.createBuffer(),this.output=e.output||Se.util.createBuffer(),this.mode.start(t)},h0.prototype.update=function(e){for(e&&this._input.putBuffer(e);!this._op.call(this.mode,this._input,this.output,this._finish)&&!this._finish;);this._input.compact()},h0.prototype.finish=function(e){e&&(this.mode.name==="ECB"||this.mode.name==="CBC")&&(this.mode.pad=function(a){return e(this.blockSize,a,!1)},this.mode.unpad=function(a){return e(this.blockSize,a,!0)});var t={};return t.decrypt=this._decrypt,t.overflow=this._input.length()%this.blockSize,!(!this._decrypt&&this.mode.pad&&!this.mode.pad(this._input,t)||(this._finish=!0,this.update(),this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,t))||this.mode.afterFinish&&!this.mode.afterFinish(this.output,t))};var Te=X;Te.cipher=Te.cipher||{};var W=Te.cipher.modes=Te.cipher.modes||{};W.ecb=function(e){e=e||{},this.name="ECB",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)},W.ecb.prototype.start=function(e){},W.ecb.prototype.encrypt=function(e,t,a){if(e.length()<this.blockSize&&!(a&&e.length()>0))return!0;for(var r=0;r<this._ints;++r)this._inBlock[r]=e.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(var r=0;r<this._ints;++r)t.putInt32(this._outBlock[r])},W.ecb.prototype.decrypt=function(e,t,a){if(e.length()<this.blockSize&&!(a&&e.length()>0))return!0;for(var r=0;r<this._ints;++r)this._inBlock[r]=e.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(var r=0;r<this._ints;++r)t.putInt32(this._outBlock[r])},W.ecb.prototype.pad=function(e,t){var a=e.length()===this.blockSize?this.blockSize:this.blockSize-e.length();return e.fillWithByte(a,a),!0},W.ecb.prototype.unpad=function(e,t){if(t.overflow>0)return!1;var a=e.length(),r=e.at(a-1);return r>this.blockSize<<2?!1:(e.truncate(r),!0)},W.cbc=function(e){e=e||{},this.name="CBC",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)},W.cbc.prototype.start=function(e){if(e.iv===null){if(!this._prev)throw new Error("Invalid IV parameter.");this._iv=this._prev.slice(0)}else if("iv"in e)this._iv=_o(e.iv,this.blockSize),this._prev=this._iv.slice(0);else throw new Error("Invalid IV parameter.")},W.cbc.prototype.encrypt=function(e,t,a){if(e.length()<this.blockSize&&!(a&&e.length()>0))return!0;for(var r=0;r<this._ints;++r)this._inBlock[r]=this._prev[r]^e.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(var r=0;r<this._ints;++r)t.putInt32(this._outBlock[r]);this._prev=this._outBlock},W.cbc.prototype.decrypt=function(e,t,a){if(e.length()<this.blockSize&&!(a&&e.length()>0))return!0;for(var r=0;r<this._ints;++r)this._inBlock[r]=e.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(var r=0;r<this._ints;++r)t.putInt32(this._prev[r]^this._outBlock[r]);this._prev=this._inBlock.slice(0)},W.cbc.prototype.pad=function(e,t){var a=e.length()===this.blockSize?this.blockSize:this.blockSize-e.length();return e.fillWithByte(a,a),!0},W.cbc.prototype.unpad=function(e,t){if(t.overflow>0)return!1;var a=e.length(),r=e.at(a-1);return r>this.blockSize<<2?!1:(e.truncate(r),!0)},W.cfb=function(e){e=e||{},this.name="CFB",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialBlock=new Array(this._ints),this._partialOutput=Te.util.createBuffer(),this._partialBytes=0},W.cfb.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=_o(e.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},W.cfb.prototype.encrypt=function(e,t,a){var r=e.length();if(r===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&r>=this.blockSize){for(var n=0;n<this._ints;++n)this._inBlock[n]=e.getInt32()^this._outBlock[n],t.putInt32(this._inBlock[n]);return}var i=(this.blockSize-r)%this.blockSize;i>0&&(i=this.blockSize-i),this._partialOutput.clear();for(var n=0;n<this._ints;++n)this._partialBlock[n]=e.getInt32()^this._outBlock[n],this._partialOutput.putInt32(this._partialBlock[n]);if(i>0)e.read-=this.blockSize;else for(var n=0;n<this._ints;++n)this._inBlock[n]=this._partialBlock[n];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),i>0&&!a)return t.putBytes(this._partialOutput.getBytes(i-this._partialBytes)),this._partialBytes=i,!0;t.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=0},W.cfb.prototype.decrypt=function(e,t,a){var r=e.length();if(r===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&r>=this.blockSize){for(var n=0;n<this._ints;++n)this._inBlock[n]=e.getInt32(),t.putInt32(this._inBlock[n]^this._outBlock[n]);return}var i=(this.blockSize-r)%this.blockSize;i>0&&(i=this.blockSize-i),this._partialOutput.clear();for(var n=0;n<this._ints;++n)this._partialBlock[n]=e.getInt32(),this._partialOutput.putInt32(this._partialBlock[n]^this._outBlock[n]);if(i>0)e.read-=this.blockSize;else for(var n=0;n<this._ints;++n)this._inBlock[n]=this._partialBlock[n];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),i>0&&!a)return t.putBytes(this._partialOutput.getBytes(i-this._partialBytes)),this._partialBytes=i,!0;t.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=0},W.ofb=function(e){e=e||{},this.name="OFB",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=Te.util.createBuffer(),this._partialBytes=0},W.ofb.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=_o(e.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},W.ofb.prototype.encrypt=function(e,t,a){var r=e.length();if(e.length()===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&r>=this.blockSize){for(var n=0;n<this._ints;++n)t.putInt32(e.getInt32()^this._outBlock[n]),this._inBlock[n]=this._outBlock[n];return}var i=(this.blockSize-r)%this.blockSize;i>0&&(i=this.blockSize-i),this._partialOutput.clear();for(var n=0;n<this._ints;++n)this._partialOutput.putInt32(e.getInt32()^this._outBlock[n]);if(i>0)e.read-=this.blockSize;else for(var n=0;n<this._ints;++n)this._inBlock[n]=this._outBlock[n];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),i>0&&!a)return t.putBytes(this._partialOutput.getBytes(i-this._partialBytes)),this._partialBytes=i,!0;t.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=0},W.ofb.prototype.decrypt=W.ofb.prototype.encrypt,W.ctr=function(e){e=e||{},this.name="CTR",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=Te.util.createBuffer(),this._partialBytes=0},W.ctr.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=_o(e.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},W.ctr.prototype.encrypt=function(e,t,a){var r=e.length();if(r===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&r>=this.blockSize)for(var n=0;n<this._ints;++n)t.putInt32(e.getInt32()^this._outBlock[n]);else{var i=(this.blockSize-r)%this.blockSize;i>0&&(i=this.blockSize-i),this._partialOutput.clear();for(var n=0;n<this._ints;++n)this._partialOutput.putInt32(e.getInt32()^this._outBlock[n]);if(i>0&&(e.read-=this.blockSize),this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),i>0&&!a)return t.putBytes(this._partialOutput.getBytes(i-this._partialBytes)),this._partialBytes=i,!0;t.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=0}Ro(this._inBlock)},W.ctr.prototype.decrypt=W.ctr.prototype.encrypt,W.gcm=function(e){e=e||{},this.name="GCM",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints),this._partialOutput=Te.util.createBuffer(),this._partialBytes=0,this._R=3774873600},W.gcm.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");var t=Te.util.createBuffer(e.iv);this._cipherLength=0;var a;if("additionalData"in e?a=Te.util.createBuffer(e.additionalData):a=Te.util.createBuffer(),"tagLength"in e?this._tagLength=e.tagLength:this._tagLength=128,this._tag=null,e.decrypt&&(this._tag=Te.util.createBuffer(e.tag).getBytes(),this._tag.length!==this._tagLength/8))throw new Error("Authentication tag does not match tag length.");this._hashBlock=new Array(this._ints),this.tag=null,this._hashSubkey=new Array(this._ints),this.cipher.encrypt([0,0,0,0],this._hashSubkey),this.componentBits=4,this._m=this.generateHashTable(this._hashSubkey,this.componentBits);var r=t.length();if(r===12)this._j0=[t.getInt32(),t.getInt32(),t.getInt32(),1];else{for(this._j0=[0,0,0,0];t.length()>0;)this._j0=this.ghash(this._hashSubkey,this._j0,[t.getInt32(),t.getInt32(),t.getInt32(),t.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(g0(r*8)))}this._inBlock=this._j0.slice(0),Ro(this._inBlock),this._partialBytes=0,a=Te.util.createBuffer(a),this._aDataLength=g0(a.length()*8);var n=a.length()%this.blockSize;for(n&&a.fillWithByte(0,this.blockSize-n),this._s=[0,0,0,0];a.length()>0;)this._s=this.ghash(this._hashSubkey,this._s,[a.getInt32(),a.getInt32(),a.getInt32(),a.getInt32()])},W.gcm.prototype.encrypt=function(e,t,a){var r=e.length();if(r===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&r>=this.blockSize){for(var n=0;n<this._ints;++n)t.putInt32(this._outBlock[n]^=e.getInt32());this._cipherLength+=this.blockSize}else{var i=(this.blockSize-r)%this.blockSize;i>0&&(i=this.blockSize-i),this._partialOutput.clear();for(var n=0;n<this._ints;++n)this._partialOutput.putInt32(e.getInt32()^this._outBlock[n]);if(i<=0||a){if(a){var s=r%this.blockSize;this._cipherLength+=s,this._partialOutput.truncate(this.blockSize-s)}else this._cipherLength+=this.blockSize;for(var n=0;n<this._ints;++n)this._outBlock[n]=this._partialOutput.getInt32();this._partialOutput.read-=this.blockSize}if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),i>0&&!a)return e.read-=this.blockSize,t.putBytes(this._partialOutput.getBytes(i-this._partialBytes)),this._partialBytes=i,!0;t.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock),Ro(this._inBlock)},W.gcm.prototype.decrypt=function(e,t,a){var r=e.length();if(r<this.blockSize&&!(a&&r>0))return!0;this.cipher.encrypt(this._inBlock,this._outBlock),Ro(this._inBlock),this._hashBlock[0]=e.getInt32(),this._hashBlock[1]=e.getInt32(),this._hashBlock[2]=e.getInt32(),this._hashBlock[3]=e.getInt32(),this._s=this.ghash(this._hashSubkey,this._s,this._hashBlock);for(var n=0;n<this._ints;++n)t.putInt32(this._outBlock[n]^this._hashBlock[n]);r<this.blockSize?this._cipherLength+=r%this.blockSize:this._cipherLength+=this.blockSize},W.gcm.prototype.afterFinish=function(e,t){var a=!0;t.decrypt&&t.overflow&&e.truncate(this.blockSize-t.overflow),this.tag=Te.util.createBuffer();var r=this._aDataLength.concat(g0(this._cipherLength*8));this._s=this.ghash(this._hashSubkey,this._s,r);var n=[];this.cipher.encrypt(this._j0,n);for(var i=0;i<this._ints;++i)this.tag.putInt32(this._s[i]^n[i]);return this.tag.truncate(this.tag.length()%(this._tagLength/8)),t.decrypt&&this.tag.bytes()!==this._tag&&(a=!1),a},W.gcm.prototype.multiply=function(e,t){for(var a=[0,0,0,0],r=t.slice(0),n=0;n<128;++n){var i=e[n/32|0]&1<<31-n%32;i&&(a[0]^=r[0],a[1]^=r[1],a[2]^=r[2],a[3]^=r[3]),this.pow(r,r)}return a},W.gcm.prototype.pow=function(e,t){for(var a=e[3]&1,r=3;r>0;--r)t[r]=e[r]>>>1|(e[r-1]&1)<<31;t[0]=e[0]>>>1,a&&(t[0]^=this._R)},W.gcm.prototype.tableMultiply=function(e){for(var t=[0,0,0,0],a=0;a<32;++a){var r=a/8|0,n=e[r]>>>(7-a%8)*4&15,i=this._m[a][n];t[0]^=i[0],t[1]^=i[1],t[2]^=i[2],t[3]^=i[3]}return t},W.gcm.prototype.ghash=function(e,t,a){return t[0]^=a[0],t[1]^=a[1],t[2]^=a[2],t[3]^=a[3],this.tableMultiply(t)},W.gcm.prototype.generateHashTable=function(e,t){for(var a=8/t,r=4*a,n=16*a,i=new Array(n),s=0;s<n;++s){var o=[0,0,0,0],c=s/r|0,l=(r-1-s%r)*t;o[c]=1<<t-1<<l,i[s]=this.generateSubHashTable(this.multiply(o,e),t)}return i},W.gcm.prototype.generateSubHashTable=function(e,t){var a=1<<t,r=a>>>1,n=new Array(a);n[r]=e.slice(0);for(var i=r>>>1;i>0;)this.pow(n[2*i],n[i]=[]),i>>=1;for(i=2;i<r;){for(var s=1;s<i;++s){var o=n[i],c=n[s];n[i+s]=[o[0]^c[0],o[1]^c[1],o[2]^c[2],o[3]^c[3]]}i*=2}for(n[0]=[0,0,0,0],i=r+1;i<a;++i){var l=n[i^r];n[i]=[e[0]^l[0],e[1]^l[1],e[2]^l[2],e[3]^l[3]]}return n};function _o(e,t){if(typeof e=="string"&&(e=Te.util.createBuffer(e)),Te.util.isArray(e)&&e.length>4){var a=e;e=Te.util.createBuffer();for(var r=0;r<a.length;++r)e.putByte(a[r])}if(e.length()<t)throw new Error("Invalid IV length; got "+e.length()+" bytes and expected "+t+" bytes.");if(!Te.util.isArray(e)){for(var n=[],i=t/4,r=0;r<i;++r)n.push(e.getInt32());e=n}return e}function Ro(e){e[e.length-1]=e[e.length-1]+1&4294967295}function g0(e){return[e/4294967296|0,e&4294967295]}var ue=X;ue.aes=ue.aes||{},ue.aes.startEncrypting=function(e,t,a,r){var n=ko({key:e,output:a,decrypt:!1,mode:r});return n.start(t),n},ue.aes.createEncryptionCipher=function(e,t){return ko({key:e,output:null,decrypt:!1,mode:t})},ue.aes.startDecrypting=function(e,t,a,r){var n=ko({key:e,output:a,decrypt:!0,mode:r});return n.start(t),n},ue.aes.createDecryptionCipher=function(e,t){return ko({key:e,output:null,decrypt:!0,mode:t})},ue.aes.Algorithm=function(e,t){v0||Ac();var a=this;a.name=e,a.mode=new t({blockSize:16,cipher:{encrypt:function(r,n){return m0(a._w,r,n,!1)},decrypt:function(r,n){return m0(a._w,r,n,!0)}}}),a._init=!1},ue.aes.Algorithm.prototype.initialize=function(e){if(!this._init){var t=e.key,a;if(typeof t=="string"&&(t.length===16||t.length===24||t.length===32))t=ue.util.createBuffer(t);else if(ue.util.isArray(t)&&(t.length===16||t.length===24||t.length===32)){a=t,t=ue.util.createBuffer();for(var r=0;r<a.length;++r)t.putByte(a[r])}if(!ue.util.isArray(t)){a=t,t=[];var n=a.length();if(n===16||n===24||n===32){n=n>>>2;for(var r=0;r<n;++r)t.push(a.getInt32())}}if(!ue.util.isArray(t)||!(t.length===4||t.length===6||t.length===8))throw new Error("Invalid key parameter.");var i=this.mode.name,s=["CFB","OFB","CTR","GCM"].indexOf(i)!==-1;this._w=Bc(t,e.decrypt&&!s),this._init=!0}},ue.aes._expandKey=function(e,t){return v0||Ac(),Bc(e,t)},ue.aes._updateBlock=m0,or("AES-ECB",ue.cipher.modes.ecb),or("AES-CBC",ue.cipher.modes.cbc),or("AES-CFB",ue.cipher.modes.cfb),or("AES-OFB",ue.cipher.modes.ofb),or("AES-CTR",ue.cipher.modes.ctr),or("AES-GCM",ue.cipher.modes.gcm);function or(e,t){var a=function(){return new ue.aes.Algorithm(e,t)};ue.cipher.registerAlgorithm(e,a)}var v0=!1,cr=4,je,y0,Ic,Yt,xt;function Ac(){v0=!0,Ic=[0,1,2,4,8,16,32,64,128,27,54];for(var e=new Array(256),t=0;t<128;++t)e[t]=t<<1,e[t+128]=t+128<<1^283;je=new Array(256),y0=new Array(256),Yt=new Array(4),xt=new Array(4);for(var t=0;t<4;++t)Yt[t]=new Array(256),xt[t]=new Array(256);for(var a=0,r=0,n,i,s,o,c,l,u,t=0;t<256;++t){o=r^r<<1^r<<2^r<<3^r<<4,o=o>>8^o&255^99,je[a]=o,y0[o]=a,c=e[o],n=e[a],i=e[n],s=e[i],l=c<<24^o<<16^o<<8^(o^c),u=(n^i^s)<<24^(a^s)<<16^(a^i^s)<<8^(a^n^s);for(var d=0;d<4;++d)Yt[d][a]=l,xt[d][o]=u,l=l<<24|l>>>8,u=u<<24|u>>>8;a===0?a=r=1:(a=n^e[e[e[n^s]]],r^=e[e[r]])}}function Bc(e,t){for(var a=e.slice(0),r,n=1,i=a.length,s=i+6+1,o=cr*s,c=i;c<o;++c)r=a[c-1],c%i===0?(r=je[r>>>16&255]<<24^je[r>>>8&255]<<16^je[r&255]<<8^je[r>>>24]^Ic[n]<<24,n++):i>6&&c%i===4&&(r=je[r>>>24]<<24^je[r>>>16&255]<<16^je[r>>>8&255]<<8^je[r&255]),a[c]=a[c-i]^r;if(t){var l,u=xt[0],d=xt[1],v=xt[2],E=xt[3],y=a.slice(0);o=a.length;for(var c=0,x=o-cr;c<o;c+=cr,x-=cr)if(c===0||c===o-cr)y[c]=a[x],y[c+1]=a[x+3],y[c+2]=a[x+2],y[c+3]=a[x+1];else for(var b=0;b<cr;++b)l=a[x+b],y[c+(3&-b)]=u[je[l>>>24]]^d[je[l>>>16&255]]^v[je[l>>>8&255]]^E[je[l&255]];a=y}return a}function m0(e,t,a,r){var n=e.length/4-1,i,s,o,c,l;r?(i=xt[0],s=xt[1],o=xt[2],c=xt[3],l=y0):(i=Yt[0],s=Yt[1],o=Yt[2],c=Yt[3],l=je);var u,d,v,E,y,x,b;u=t[0]^e[0],d=t[r?3:1]^e[1],v=t[2]^e[2],E=t[r?1:3]^e[3];for(var A=3,w=1;w<n;++w)y=i[u>>>24]^s[d>>>16&255]^o[v>>>8&255]^c[E&255]^e[++A],x=i[d>>>24]^s[v>>>16&255]^o[E>>>8&255]^c[u&255]^e[++A],b=i[v>>>24]^s[E>>>16&255]^o[u>>>8&255]^c[d&255]^e[++A],E=i[E>>>24]^s[u>>>16&255]^o[d>>>8&255]^c[v&255]^e[++A],u=y,d=x,v=b;a[0]=l[u>>>24]<<24^l[d>>>16&255]<<16^l[v>>>8&255]<<8^l[E&255]^e[++A],a[r?3:1]=l[d>>>24]<<24^l[v>>>16&255]<<16^l[E>>>8&255]<<8^l[u&255]^e[++A],a[2]=l[v>>>24]<<24^l[E>>>16&255]<<16^l[u>>>8&255]<<8^l[d&255]^e[++A],a[r?1:3]=l[E>>>24]<<24^l[u>>>16&255]<<16^l[d>>>8&255]<<8^l[v&255]^e[++A]}function ko(e){e=e||{};var t=(e.mode||"CBC").toUpperCase(),a="AES-"+t,r;e.decrypt?r=ue.cipher.createDecipher(a,e.key):r=ue.cipher.createCipher(a,e.key);var n=r.start;return r.start=function(i,s){var o=null;s instanceof ue.util.ByteBuffer&&(o=s,s={}),s=s||{},s.output=o,s.iv=i,n.call(r,s)},r}var go=X;go.pki=go.pki||{};var E0=go.pki.oids=go.oids=go.oids||{};function k(e,t){E0[e]=t,E0[t]=e}function ne(e,t){E0[e]=t}k("1.2.840.113549.1.1.1","rsaEncryption"),k("1.2.840.113549.1.1.4","md5WithRSAEncryption"),k("1.2.840.113549.1.1.5","sha1WithRSAEncryption"),k("1.2.840.113549.1.1.7","RSAES-OAEP"),k("1.2.840.113549.1.1.8","mgf1"),k("1.2.840.113549.1.1.9","pSpecified"),k("1.2.840.113549.1.1.10","RSASSA-PSS"),k("1.2.840.113549.1.1.11","sha256WithRSAEncryption"),k("1.2.840.113549.1.1.12","sha384WithRSAEncryption"),k("1.2.840.113549.1.1.13","sha512WithRSAEncryption"),k("1.3.101.112","EdDSA25519"),k("1.2.840.10040.4.3","dsa-with-sha1"),k("1.3.14.3.2.7","desCBC"),k("1.3.14.3.2.26","sha1"),k("1.3.14.3.2.29","sha1WithRSASignature"),k("2.16.840.1.101.3.4.2.1","sha256"),k("2.16.840.1.101.3.4.2.2","sha384"),k("2.16.840.1.101.3.4.2.3","sha512"),k("2.16.840.1.101.3.4.2.4","sha224"),k("2.16.840.1.101.3.4.2.5","sha512-224"),k("2.16.840.1.101.3.4.2.6","sha512-256"),k("1.2.840.113549.2.2","md2"),k("1.2.840.113549.2.5","md5"),k("1.2.840.113549.1.7.1","data"),k("1.2.840.113549.1.7.2","signedData"),k("1.2.840.113549.1.7.3","envelopedData"),k("1.2.840.113549.1.7.4","signedAndEnvelopedData"),k("1.2.840.113549.1.7.5","digestedData"),k("1.2.840.113549.1.7.6","encryptedData"),k("1.2.840.113549.1.9.1","emailAddress"),k("1.2.840.113549.1.9.2","unstructuredName"),k("1.2.840.113549.1.9.3","contentType"),k("1.2.840.113549.1.9.4","messageDigest"),k("1.2.840.113549.1.9.5","signingTime"),k("1.2.840.113549.1.9.6","counterSignature"),k("1.2.840.113549.1.9.7","challengePassword"),k("1.2.840.113549.1.9.8","unstructuredAddress"),k("1.2.840.113549.1.9.14","extensionRequest"),k("1.2.840.113549.1.9.20","friendlyName"),k("1.2.840.113549.1.9.21","localKeyId"),k("1.2.840.113549.1.9.22.1","x509Certificate"),k("1.2.840.113549.1.12.10.1.1","keyBag"),k("1.2.840.113549.1.12.10.1.2","pkcs8ShroudedKeyBag"),k("1.2.840.113549.1.12.10.1.3","certBag"),k("1.2.840.113549.1.12.10.1.4","crlBag"),k("1.2.840.113549.1.12.10.1.5","secretBag"),k("1.2.840.113549.1.12.10.1.6","safeContentsBag"),k("1.2.840.113549.1.5.13","pkcs5PBES2"),k("1.2.840.113549.1.5.12","pkcs5PBKDF2"),k("1.2.840.113549.1.12.1.1","pbeWithSHAAnd128BitRC4"),k("1.2.840.113549.1.12.1.2","pbeWithSHAAnd40BitRC4"),k("1.2.840.113549.1.12.1.3","pbeWithSHAAnd3-KeyTripleDES-CBC"),k("1.2.840.113549.1.12.1.4","pbeWithSHAAnd2-KeyTripleDES-CBC"),k("1.2.840.113549.1.12.1.5","pbeWithSHAAnd128BitRC2-CBC"),k("1.2.840.113549.1.12.1.6","pbewithSHAAnd40BitRC2-CBC"),k("1.2.840.113549.2.7","hmacWithSHA1"),k("1.2.840.113549.2.8","hmacWithSHA224"),k("1.2.840.113549.2.9","hmacWithSHA256"),k("1.2.840.113549.2.10","hmacWithSHA384"),k("1.2.840.113549.2.11","hmacWithSHA512"),k("1.2.840.113549.3.7","des-EDE3-CBC"),k("2.16.840.1.101.3.4.1.2","aes128-CBC"),k("2.16.840.1.101.3.4.1.22","aes192-CBC"),k("2.16.840.1.101.3.4.1.42","aes256-CBC"),k("2.5.4.3","commonName"),k("2.5.4.4","surname"),k("2.5.4.5","serialNumber"),k("2.5.4.6","countryName"),k("2.5.4.7","localityName"),k("2.5.4.8","stateOrProvinceName"),k("2.5.4.9","streetAddress"),k("2.5.4.10","organizationName"),k("2.5.4.11","organizationalUnitName"),k("2.5.4.12","title"),k("2.5.4.13","description"),k("2.5.4.15","businessCategory"),k("2.5.4.17","postalCode"),k("2.5.4.42","givenName"),k("2.5.4.65","pseudonym"),k("1.3.6.1.4.1.311.60.2.1.2","jurisdictionOfIncorporationStateOrProvinceName"),k("1.3.6.1.4.1.311.60.2.1.3","jurisdictionOfIncorporationCountryName"),k("2.16.840.1.113730.1.1","nsCertType"),k("2.16.840.1.113730.1.13","nsComment"),ne("2.5.29.1","authorityKeyIdentifier"),ne("2.5.29.2","keyAttributes"),ne("2.5.29.3","certificatePolicies"),ne("2.5.29.4","keyUsageRestriction"),ne("2.5.29.5","policyMapping"),ne("2.5.29.6","subtreesConstraint"),ne("2.5.29.7","subjectAltName"),ne("2.5.29.8","issuerAltName"),ne("2.5.29.9","subjectDirectoryAttributes"),ne("2.5.29.10","basicConstraints"),ne("2.5.29.11","nameConstraints"),ne("2.5.29.12","policyConstraints"),ne("2.5.29.13","basicConstraints"),k("2.5.29.14","subjectKeyIdentifier"),k("2.5.29.15","keyUsage"),ne("2.5.29.16","privateKeyUsagePeriod"),k("2.5.29.17","subjectAltName"),k("2.5.29.18","issuerAltName"),k("2.5.29.19","basicConstraints"),ne("2.5.29.20","cRLNumber"),ne("2.5.29.21","cRLReason"),ne("2.5.29.22","expirationDate"),ne("2.5.29.23","instructionCode"),ne("2.5.29.24","invalidityDate"),ne("2.5.29.25","cRLDistributionPoints"),ne("2.5.29.26","issuingDistributionPoint"),ne("2.5.29.27","deltaCRLIndicator"),ne("2.5.29.28","issuingDistributionPoint"),ne("2.5.29.29","certificateIssuer"),ne("2.5.29.30","nameConstraints"),k("2.5.29.31","cRLDistributionPoints"),k("2.5.29.32","certificatePolicies"),ne("2.5.29.33","policyMappings"),ne("2.5.29.34","policyConstraints"),k("2.5.29.35","authorityKeyIdentifier"),ne("2.5.29.36","policyConstraints"),k("2.5.29.37","extKeyUsage"),ne("2.5.29.46","freshestCRL"),ne("2.5.29.54","inhibitAnyPolicy"),k("1.3.6.1.4.1.11129.2.4.2","timestampList"),k("1.3.6.1.5.5.7.1.1","authorityInfoAccess"),k("1.3.6.1.5.5.7.3.1","serverAuth"),k("1.3.6.1.5.5.7.3.2","clientAuth"),k("1.3.6.1.5.5.7.3.3","codeSigning"),k("1.3.6.1.5.5.7.3.4","emailProtection"),k("1.3.6.1.5.5.7.3.8","timeStamping");var de=X,O=de.asn1=de.asn1||{};O.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192},O.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},O.maxDepth=256,O.create=function(e,t,a,r,n){if(de.util.isArray(r)){for(var i=[],s=0;s<r.length;++s)r[s]!==void 0&&i.push(r[s]);r=i}var o={tagClass:e,type:t,constructed:a,composed:a||de.util.isArray(r),value:r};return n&&"bitStringContents"in n&&(o.bitStringContents=n.bitStringContents,o.original=O.copy(o)),o},O.copy=function(e,t){var a;if(de.util.isArray(e)){a=[];for(var r=0;r<e.length;++r)a.push(O.copy(e[r],t));return a}return typeof e=="string"?e:(a={tagClass:e.tagClass,type:e.type,constructed:e.constructed,composed:e.composed,value:O.copy(e.value,t)},t&&!t.excludeBitStringContents&&(a.bitStringContents=e.bitStringContents),a)},O.equals=function(e,t,a){if(de.util.isArray(e)){if(!de.util.isArray(t)||e.length!==t.length)return!1;for(var r=0;r<e.length;++r)if(!O.equals(e[r],t[r]))return!1;return!0}if(typeof e!=typeof t)return!1;if(typeof e=="string")return e===t;var n=e.tagClass===t.tagClass&&e.type===t.type&&e.constructed===t.constructed&&e.composed===t.composed&&O.equals(e.value,t.value);return a&&a.includeBitStringContents&&(n=n&&e.bitStringContents===t.bitStringContents),n},O.getBerValueLength=function(e){var t=e.getByte();if(t!==128){var a,r=t&128;return r?a=e.getInt((t&127)<<3):a=t,a}};function vo(e,t,a){if(a>t){var r=new Error("Too few bytes to parse DER.");throw r.available=e.length(),r.remaining=t,r.requested=a,r}}var $f=function(e,t){var a=e.getByte();if(t--,a!==128){var r,n=a&128;if(!n)r=a;else{var i=a&127;vo(e,t,i),r=e.getInt(i<<3)}if(r<0)throw new Error("Negative length: "+r);return r}};O.fromDer=function(e,t){t===void 0&&(t={strict:!0,parseAllBytes:!0,decodeBitStrings:!0}),typeof t=="boolean"&&(t={strict:t,parseAllBytes:!0,decodeBitStrings:!0}),"strict"in t||(t.strict=!0),"parseAllBytes"in t||(t.parseAllBytes=!0),"decodeBitStrings"in t||(t.decodeBitStrings=!0),"maxDepth"in t||(t.maxDepth=O.maxDepth),typeof e=="string"&&(e=de.util.createBuffer(e));var a=e.length(),r=Lo(e,e.length(),0,t);if(t.parseAllBytes&&e.length()!==0){var n=new Error("Unparsed DER bytes remain after ASN.1 parsing.");throw n.byteCount=a,n.remaining=e.length(),n}return r};function Lo(e,t,a,r){if(a>=r.maxDepth)throw new Error("ASN.1 parsing error: Max depth exceeded.");var n;vo(e,t,2);var i=e.getByte();t--;var s=i&192,o=i&31;n=e.length();var c=$f(e,t);if(t-=n-e.length(),c!==void 0&&c>t){if(r.strict){var l=new Error("Too few bytes to read ASN.1 value.");throw l.available=e.length(),l.remaining=t,l.requested=c,l}c=t}var u,d,v=(i&32)===32;if(v)if(u=[],c===void 0)for(;;){if(vo(e,t,2),e.bytes(2)==="\0\0"){e.getBytes(2),t-=2;break}n=e.length(),u.push(Lo(e,t,a+1,r)),t-=n-e.length()}else for(;c>0;)n=e.length(),u.push(Lo(e,c,a+1,r)),t-=n-e.length(),c-=n-e.length();if(u===void 0&&s===O.Class.UNIVERSAL&&o===O.Type.BITSTRING&&(d=e.bytes(c)),u===void 0&&r.decodeBitStrings&&s===O.Class.UNIVERSAL&&o===O.Type.BITSTRING&&c>1){var E=e.read,y=t,x=0;if(o===O.Type.BITSTRING&&(vo(e,t,1),x=e.getByte(),t--),x===0)try{n=e.length();var b={strict:!0,decodeBitStrings:!0},A=Lo(e,t,a+1,b),w=n-e.length();t-=w,o==O.Type.BITSTRING&&w++;var N=A.tagClass;w===c&&(N===O.Class.UNIVERSAL||N===O.Class.CONTEXT_SPECIFIC)&&(u=[A])}catch{}u===void 0&&(e.read=E,t=y)}if(u===void 0){if(c===void 0){if(r.strict)throw new Error("Non-constructed ASN.1 object of indefinite length.");c=t}if(o===O.Type.BMPSTRING)for(u="";c>0;c-=2)vo(e,t,2),u+=String.fromCharCode(e.getInt16()),t-=2;else u=e.getBytes(c),t-=c}var F=d===void 0?null:{bitStringContents:d};return O.create(s,o,v,u,F)}O.toDer=function(e){var t=de.util.createBuffer(),a=e.tagClass|e.type,r=de.util.createBuffer(),n=!1;if("bitStringContents"in e&&(n=!0,e.original&&(n=O.equals(e,e.original))),n)r.putBytes(e.bitStringContents);else if(e.composed){e.constructed?a|=32:r.putByte(0);for(var i=0;i<e.value.length;++i)e.value[i]!==void 0&&r.putBuffer(O.toDer(e.value[i]))}else if(e.type===O.Type.BMPSTRING)for(var i=0;i<e.value.length;++i)r.putInt16(e.value.charCodeAt(i));else e.type===O.Type.INTEGER&&e.value.length>1&&(e.value.charCodeAt(0)===0&&(e.value.charCodeAt(1)&128)===0||e.value.charCodeAt(0)===255&&(e.value.charCodeAt(1)&128)===128)?r.putBytes(e.value.substr(1)):r.putBytes(e.value);if(t.putByte(a),r.length()<=127)t.putByte(r.length()&127);else{var s=r.length(),o="";do o+=String.fromCharCode(s&255),s=s>>>8;while(s>0);t.putByte(o.length|128);for(var i=o.length-1;i>=0;--i)t.putByte(o.charCodeAt(i))}return t.putBuffer(r),t},O.oidToDer=function(e){var t=e.split("."),a=de.util.createBuffer();a.putByte(40*parseInt(t[0],10)+parseInt(t[1],10));for(var r,n,i,s,o=2;o<t.length;++o){if(r=!0,n=[],i=parseInt(t[o],10),i>4294967295)throw new Error("OID value too large; max is 32-bits.");do s=i&127,i=i>>>7,r||(s|=128),n.push(s),r=!1;while(i>0);for(var c=n.length-1;c>=0;--c)a.putByte(n[c])}return a},O.derToOid=function(e){var t;typeof e=="string"&&(e=de.util.createBuffer(e));var a=e.getByte();t=Math.floor(a/40)+"."+a%40;for(var r=0;e.length()>0;){if(r>70368744177663)throw new Error("OID value too large; max is 53-bits.");a=e.getByte(),r=r*128,a&128?r+=a&127:(t+="."+(r+a),r=0)}return t},O.utcTimeToDate=function(e){var t=new Date,a=parseInt(e.substr(0,2),10);a=a>=50?1900+a:2e3+a;var r=parseInt(e.substr(2,2),10)-1,n=parseInt(e.substr(4,2),10),i=parseInt(e.substr(6,2),10),s=parseInt(e.substr(8,2),10),o=0;if(e.length>11){var c=e.charAt(10),l=10;c!=="+"&&c!=="-"&&(o=parseInt(e.substr(10,2),10),l+=2)}if(t.setUTCFullYear(a,r,n),t.setUTCHours(i,s,o,0),l&&(c=e.charAt(l),c==="+"||c==="-")){var u=parseInt(e.substr(l+1,2),10),d=parseInt(e.substr(l+4,2),10),v=u*60+d;v*=6e4,c==="+"?t.setTime(+t-v):t.setTime(+t+v)}return t},O.generalizedTimeToDate=function(e){var t=new Date,a=parseInt(e.substr(0,4),10),r=parseInt(e.substr(4,2),10)-1,n=parseInt(e.substr(6,2),10),i=parseInt(e.substr(8,2),10),s=parseInt(e.substr(10,2),10),o=parseInt(e.substr(12,2),10),c=0,l=0,u=!1;e.charAt(e.length-1)==="Z"&&(u=!0);var d=e.length-5,v=e.charAt(d);if(v==="+"||v==="-"){var E=parseInt(e.substr(d+1,2),10),y=parseInt(e.substr(d+4,2),10);l=E*60+y,l*=6e4,v==="+"&&(l*=-1),u=!0}return e.charAt(14)==="."&&(c=parseFloat(e.substr(14),10)*1e3),u?(t.setUTCFullYear(a,r,n),t.setUTCHours(i,s,o,c),t.setTime(+t+l)):(t.setFullYear(a,r,n),t.setHours(i,s,o,c)),t},O.dateToUtcTime=function(e){if(typeof e=="string")return e;var t="",a=[];a.push((""+e.getUTCFullYear()).substr(2)),a.push(""+(e.getUTCMonth()+1)),a.push(""+e.getUTCDate()),a.push(""+e.getUTCHours()),a.push(""+e.getUTCMinutes()),a.push(""+e.getUTCSeconds());for(var r=0;r<a.length;++r)a[r].length<2&&(t+="0"),t+=a[r];return t+="Z",t},O.dateToGeneralizedTime=function(e){if(typeof e=="string")return e;var t="",a=[];a.push(""+e.getUTCFullYear()),a.push(""+(e.getUTCMonth()+1)),a.push(""+e.getUTCDate()),a.push(""+e.getUTCHours()),a.push(""+e.getUTCMinutes()),a.push(""+e.getUTCSeconds());for(var r=0;r<a.length;++r)a[r].length<2&&(t+="0"),t+=a[r];return t+="Z",t},O.integerToDer=function(e){var t=de.util.createBuffer();if(e>=-128&&e<128)return t.putSignedInt(e,8);if(e>=-32768&&e<32768)return t.putSignedInt(e,16);if(e>=-8388608&&e<8388608)return t.putSignedInt(e,24);if(e>=-2147483648&&e<2147483648)return t.putSignedInt(e,32);var a=new Error("Integer too large; max is 32-bits.");throw a.integer=e,a},O.derToInteger=function(e){typeof e=="string"&&(e=de.util.createBuffer(e));var t=e.length()*8;if(t>32)throw new Error("Integer too large; max is 32-bits.");return e.getSignedInt(t)},O.validate=function(e,t,a,r){var n=!1;if((e.tagClass===t.tagClass||typeof t.tagClass>"u")&&(e.type===t.type||typeof t.type>"u"))if(e.constructed===t.constructed||typeof t.constructed>"u"){if(n=!0,t.value&&de.util.isArray(t.value))for(var i=0,s=0;n&&s<t.value.length;++s){var o=t.value[s];n=!!o.optional;var c=e.value[i];if(!c){o.optional||(n=!1,r&&r.push("["+t.name+'] Missing required element. Expected tag class "'+o.tagClass+'", type "'+o.type+'"'));continue}var l=typeof o.tagClass<"u"&&typeof o.type<"u";if(l&&(c.tagClass!==o.tagClass||c.type!==o.type))if(o.optional){n=!0;continue}else{n=!1,r&&r.push("["+t.name+"] Tag mismatch. Expected ("+o.tagClass+","+o.type+"), got ("+c.tagClass+","+c.type+")");break}var u=O.validate(c,o,a,r);if(u)++i,n=!0;else if(o.optional)n=!0;else{n=!1;break}}if(n&&a&&(t.capture&&(a[t.capture]=e.value),t.captureAsn1&&(a[t.captureAsn1]=e),t.captureBitStringContents&&"bitStringContents"in e&&(a[t.captureBitStringContents]=e.bitStringContents),t.captureBitStringValue&&"bitStringContents"in e))if(e.bitStringContents.length<2)a[t.captureBitStringValue]="";else{var d=e.bitStringContents.charCodeAt(0);if(d!==0)throw new Error("captureBitStringValue only supported for zero unused bits");a[t.captureBitStringValue]=e.bitStringContents.slice(1)}}else r&&r.push("["+t.name+'] Expected constructed "'+t.constructed+'", got "'+e.constructed+'"');else r&&(e.tagClass!==t.tagClass&&r.push("["+t.name+'] Expected tag class "'+t.tagClass+'", got "'+e.tagClass+'"'),e.type!==t.type&&r.push("["+t.name+'] Expected type "'+t.type+'", got "'+e.type+'"'));return n};var wc=/[^\\u0000-\\u00ff]/;O.prettyPrint=function(e,t,a){var r="";t=t||0,a=a||2,t>0&&(r+=`
|
|
5
|
+
`);for(var n="",i=0;i<t*a;++i)n+=" ";switch(r+=n+"Tag: ",e.tagClass){case O.Class.UNIVERSAL:r+="Universal:";break;case O.Class.APPLICATION:r+="Application:";break;case O.Class.CONTEXT_SPECIFIC:r+="Context-Specific:";break;case O.Class.PRIVATE:r+="Private:";break}if(e.tagClass===O.Class.UNIVERSAL)switch(r+=e.type,e.type){case O.Type.NONE:r+=" (None)";break;case O.Type.BOOLEAN:r+=" (Boolean)";break;case O.Type.INTEGER:r+=" (Integer)";break;case O.Type.BITSTRING:r+=" (Bit string)";break;case O.Type.OCTETSTRING:r+=" (Octet string)";break;case O.Type.NULL:r+=" (Null)";break;case O.Type.OID:r+=" (Object Identifier)";break;case O.Type.ODESC:r+=" (Object Descriptor)";break;case O.Type.EXTERNAL:r+=" (External or Instance of)";break;case O.Type.REAL:r+=" (Real)";break;case O.Type.ENUMERATED:r+=" (Enumerated)";break;case O.Type.EMBEDDED:r+=" (Embedded PDV)";break;case O.Type.UTF8:r+=" (UTF8)";break;case O.Type.ROID:r+=" (Relative Object Identifier)";break;case O.Type.SEQUENCE:r+=" (Sequence)";break;case O.Type.SET:r+=" (Set)";break;case O.Type.PRINTABLESTRING:r+=" (Printable String)";break;case O.Type.IA5String:r+=" (IA5String (ASCII))";break;case O.Type.UTCTIME:r+=" (UTC time)";break;case O.Type.GENERALIZEDTIME:r+=" (Generalized time)";break;case O.Type.BMPSTRING:r+=" (BMP String)";break}else r+=e.type;if(r+=`
|
|
30
6
|
`,r+=n+"Constructed: "+e.constructed+`
|
|
31
|
-
`,e.composed){for(var
|
|
32
|
-
`,r;if(e.procType&&(r={name:"Proc-Type",values:[String(e.procType.version),e.procType.type]},a+=
|
|
33
|
-
`),a+=
|
|
7
|
+
`,e.composed){for(var s=0,o="",i=0;i<e.value.length;++i)e.value[i]!==void 0&&(s+=1,o+=O.prettyPrint(e.value[i],t+1,a),i+1<e.value.length&&(o+=","));r+=n+"Sub values: "+s+o}else{if(r+=n+"Value: ",e.type===O.Type.OID){var c=O.derToOid(e.value);r+=c,de.pki&&de.pki.oids&&c in de.pki.oids&&(r+=" ("+de.pki.oids[c]+") ")}if(e.type===O.Type.INTEGER)try{r+=O.derToInteger(e.value)}catch{r+="0x"+de.util.bytesToHex(e.value)}else if(e.type===O.Type.BITSTRING){if(e.value.length>1?r+="0x"+de.util.bytesToHex(e.value.slice(1)):r+="(none)",e.value.length>0){var l=e.value.charCodeAt(0);l==1?r+=" (1 unused bit shown)":l>1&&(r+=" ("+l+" unused bits shown)")}}else if(e.type===O.Type.OCTETSTRING)wc.test(e.value)||(r+="("+e.value+") "),r+="0x"+de.util.bytesToHex(e.value);else if(e.type===O.Type.UTF8)try{r+=de.util.decodeUtf8(e.value)}catch(u){if(u.message==="URI malformed")r+="0x"+de.util.bytesToHex(e.value)+" (malformed UTF8)";else throw u}else e.type===O.Type.PRINTABLESTRING||e.type===O.Type.IA5String?r+=e.value:wc.test(e.value)?r+="0x"+de.util.bytesToHex(e.value):e.value.length===0?r+="[null]":r+=e.value}return r};var Do=X;Do.md=Do.md||{},Do.md.algorithms=Do.md.algorithms||{};var Lt=X,Qf=Lt.hmac=Lt.hmac||{};Qf.create=function(){var e=null,t=null,a=null,r=null,n={};return n.start=function(i,s){if(i!==null)if(typeof i=="string")if(i=i.toLowerCase(),i in Lt.md.algorithms)t=Lt.md.algorithms[i].create();else throw new Error('Unknown hash algorithm "'+i+'"');else t=i;if(s===null)s=e;else{if(typeof s=="string")s=Lt.util.createBuffer(s);else if(Lt.util.isArray(s)){var o=s;s=Lt.util.createBuffer();for(var c=0;c<o.length;++c)s.putByte(o[c])}var l=s.length();l>t.blockLength&&(t.start(),t.update(s.bytes()),s=t.digest()),a=Lt.util.createBuffer(),r=Lt.util.createBuffer(),l=s.length();for(var c=0;c<l;++c){var o=s.at(c);a.putByte(54^o),r.putByte(92^o)}if(l<t.blockLength)for(var o=t.blockLength-l,c=0;c<o;++c)a.putByte(54),r.putByte(92);e=s,a=a.bytes(),r=r.bytes()}t.start(),t.update(a)},n.update=function(i){t.update(i)},n.getMac=function(){var i=t.digest().bytes();return t.start(),t.update(r),t.update(i),t.digest()},n.digest=n.getMac,n};var bt=X,Nc=bt.md5=bt.md5||{};bt.md.md5=bt.md.algorithms.md5=Nc,Nc.create=function(){_c||jf();var e=null,t=bt.util.createBuffer(),a=new Array(16),r={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8};return r.start=function(){r.messageLength=0,r.fullMessageLength=r.messageLength64=[];for(var n=r.messageLengthSize/4,i=0;i<n;++i)r.fullMessageLength.push(0);return t=bt.util.createBuffer(),e={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878},r},r.start(),r.update=function(n,i){i==="utf8"&&(n=bt.util.encodeUtf8(n));var s=n.length;r.messageLength+=s,s=[s/4294967296>>>0,s>>>0];for(var o=r.fullMessageLength.length-1;o>=0;--o)r.fullMessageLength[o]+=s[1],s[1]=s[0]+(r.fullMessageLength[o]/4294967296>>>0),r.fullMessageLength[o]=r.fullMessageLength[o]>>>0,s[0]=s[1]/4294967296>>>0;return t.putBytes(n),Rc(e,a,t),(t.read>2048||t.length()===0)&&t.compact(),r},r.digest=function(){var n=bt.util.createBuffer();n.putBytes(t.bytes());var i=r.fullMessageLength[r.fullMessageLength.length-1]+r.messageLengthSize,s=i&r.blockLength-1;n.putBytes(C0.substr(0,r.blockLength-s));for(var o,c=0,l=r.fullMessageLength.length-1;l>=0;--l)o=r.fullMessageLength[l]*8+c,c=o/4294967296>>>0,n.putInt32Le(o>>>0);var u={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3};Rc(u,a,n);var d=bt.util.createBuffer();return d.putInt32Le(u.h0),d.putInt32Le(u.h1),d.putInt32Le(u.h2),d.putInt32Le(u.h3),d},r};var C0=null,Uo=null,yo=null,lr=null,_c=!1;function jf(){C0="\x80",C0+=bt.util.fillString("\0",64),Uo=[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],yo=[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],lr=new Array(64);for(var e=0;e<64;++e)lr[e]=Math.floor(Math.abs(Math.sin(e+1))*4294967296);_c=!0}function Rc(e,t,a){for(var r,n,i,s,o,c,l,u,d=a.length();d>=64;){for(n=e.h0,i=e.h1,s=e.h2,o=e.h3,u=0;u<16;++u)t[u]=a.getInt32Le(),c=o^i&(s^o),r=n+c+lr[u]+t[u],l=yo[u],n=o,o=s,s=i,i+=r<<l|r>>>32-l;for(;u<32;++u)c=s^o&(i^s),r=n+c+lr[u]+t[Uo[u]],l=yo[u],n=o,o=s,s=i,i+=r<<l|r>>>32-l;for(;u<48;++u)c=i^s^o,r=n+c+lr[u]+t[Uo[u]],l=yo[u],n=o,o=s,s=i,i+=r<<l|r>>>32-l;for(;u<64;++u)c=s^(i|~o),r=n+c+lr[u]+t[Uo[u]],l=yo[u],n=o,o=s,s=i,i+=r<<l|r>>>32-l;e.h0=e.h0+n|0,e.h1=e.h1+i|0,e.h2=e.h2+s|0,e.h3=e.h3+o|0,d-=64}}var Po=X,kc=Po.pem=Po.pem||{};kc.encode=function(e,t){t=t||{};var a="-----BEGIN "+e.type+`-----\r
|
|
8
|
+
`,r;if(e.procType&&(r={name:"Proc-Type",values:[String(e.procType.version),e.procType.type]},a+=Oo(r)),e.contentDomain&&(r={name:"Content-Domain",values:[e.contentDomain]},a+=Oo(r)),e.dekInfo&&(r={name:"DEK-Info",values:[e.dekInfo.algorithm]},e.dekInfo.parameters&&r.values.push(e.dekInfo.parameters),a+=Oo(r)),e.headers)for(var n=0;n<e.headers.length;++n)a+=Oo(e.headers[n]);return e.procType&&(a+=`\r
|
|
9
|
+
`),a+=Po.util.encode64(e.body,t.maxline||64)+`\r
|
|
34
10
|
`,a+="-----END "+e.type+`-----\r
|
|
35
|
-
`,a},
|
|
36
|
-
`;for(var
|
|
37
|
-
`+t.substr(
|
|
38
|
-
`+o+t.substr(i+1),s=n-i-1,i=-1,++n}else(t[n]===" "||t[n]===" "||t[n]===",")&&(i=n);return t}function X1(e){return e.replace(/^\s+/,"")}var Ue=ae;Ue.des=Ue.des||{},Ue.des.startEncrypting=function(e,t,a,r){var n=il({key:e,output:a,decrypt:!1,mode:r||(t===null?"ECB":"CBC")});return n.start(t),n},Ue.des.createEncryptionCipher=function(e,t){return il({key:e,output:null,decrypt:!1,mode:t})},Ue.des.startDecrypting=function(e,t,a,r){var n=il({key:e,output:a,decrypt:!0,mode:r||(t===null?"ECB":"CBC")});return n.start(t),n},Ue.des.createDecryptionCipher=function(e,t){return il({key:e,output:null,decrypt:!0,mode:t})},Ue.des.Algorithm=function(e,t){var a=this;a.name=e,a.mode=new t({blockSize:8,cipher:{encrypt:function(r,n){return Jf(a._keys,r,n,!1)},decrypt:function(r,n){return Jf(a._keys,r,n,!0)}}}),a._init=!1},Ue.des.Algorithm.prototype.initialize=function(e){if(!this._init){var t=Ue.util.createBuffer(e.key);if(this.name.indexOf("3DES")===0&&t.length()!==24)throw new Error("Invalid Triple-DES key size: "+t.length()*8);this._keys=ib(t),this._init=!0}},Kt("DES-ECB",Ue.cipher.modes.ecb),Kt("DES-CBC",Ue.cipher.modes.cbc),Kt("DES-CFB",Ue.cipher.modes.cfb),Kt("DES-OFB",Ue.cipher.modes.ofb),Kt("DES-CTR",Ue.cipher.modes.ctr),Kt("3DES-ECB",Ue.cipher.modes.ecb),Kt("3DES-CBC",Ue.cipher.modes.cbc),Kt("3DES-CFB",Ue.cipher.modes.cfb),Kt("3DES-OFB",Ue.cipher.modes.ofb),Kt("3DES-CTR",Ue.cipher.modes.ctr);function Kt(e,t){var a=function(){return new Ue.des.Algorithm(e,t)};Ue.cipher.registerAlgorithm(e,a)}var Y1=[16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,0,65540,66560,0,16842756],J1=[-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,-2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],Z1=[520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],eb=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],tb=[256,34078976,34078720,1107296512,524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,524288,0,1074266112,34078976,1073742080],rb=[536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,4194320,536887312,0,541081600,536870912,4194320,536887312],ab=[2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,67108866,67110912,2048,2097154],nb=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,268435456,268701696];function ib(e){for(var t=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,516,536871424,536871428,66048,66052,536936960,536936964],a=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],r=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],n=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],s=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],i=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],o=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],c=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],l=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],u=[0,268435456,8,268435464,0,268435456,8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],p=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],d=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],x=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],m=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],y=e.length()>8?3:1,b=[],C=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],B=0,_,k=0;k<y;k++){var N=e.getInt32(),D=e.getInt32();_=(N>>>4^D)&252645135,D^=_,N^=_<<4,_=(D>>>-16^N)&65535,N^=_,D^=_<<-16,_=(N>>>2^D)&858993459,D^=_,N^=_<<2,_=(D>>>-16^N)&65535,N^=_,D^=_<<-16,_=(N>>>1^D)&1431655765,D^=_,N^=_<<1,_=(D>>>8^N)&16711935,N^=_,D^=_<<8,_=(N>>>1^D)&1431655765,D^=_,N^=_<<1,_=N<<8|D>>>20&240,N=D<<24|D<<8&16711680|D>>>8&65280|D>>>24&240,D=_;for(var K=0;K<C.length;++K){C[K]?(N=N<<2|N>>>26,D=D<<2|D>>>26):(N=N<<1|N>>>27,D=D<<1|D>>>27),N&=-15,D&=-15;var W=t[N>>>28]|a[N>>>24&15]|r[N>>>20&15]|n[N>>>16&15]|s[N>>>12&15]|i[N>>>8&15]|o[N>>>4&15],X=c[D>>>28]|l[D>>>24&15]|u[D>>>20&15]|p[D>>>16&15]|d[D>>>12&15]|x[D>>>8&15]|m[D>>>4&15];_=(X>>>16^W)&65535,b[B++]=W^_,b[B++]=X^_<<16}}return b}function Jf(e,t,a,r){var n=e.length===32?3:9,s;n===3?s=r?[30,-2,-2]:[0,32,2]:s=r?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var i,o=t[0],c=t[1];i=(o>>>4^c)&252645135,c^=i,o^=i<<4,i=(o>>>16^c)&65535,c^=i,o^=i<<16,i=(c>>>2^o)&858993459,o^=i,c^=i<<2,i=(c>>>8^o)&16711935,o^=i,c^=i<<8,i=(o>>>1^c)&1431655765,c^=i,o^=i<<1,o=o<<1|o>>>31,c=c<<1|c>>>31;for(var l=0;l<n;l+=3){for(var u=s[l+1],p=s[l+2],d=s[l];d!=u;d+=p){var x=c^e[d],m=(c>>>4|c<<28)^e[d+1];i=o,o=c,c=i^(J1[x>>>24&63]|eb[x>>>16&63]|rb[x>>>8&63]|nb[x&63]|Y1[m>>>24&63]|Z1[m>>>16&63]|tb[m>>>8&63]|ab[m&63])}i=o,o=c,c=i}o=o>>>1|o<<31,c=c>>>1|c<<31,i=(o>>>1^c)&1431655765,c^=i,o^=i<<1,i=(c>>>8^o)&16711935,o^=i,c^=i<<8,i=(c>>>2^o)&858993459,o^=i,c^=i<<2,i=(o>>>16^c)&65535,c^=i,o^=i<<16,i=(o>>>4^c)&252645135,c^=i,o^=i<<4,a[0]=o,a[1]=c}function il(e){e=e||{};var t=(e.mode||"CBC").toUpperCase(),a="DES-"+t,r;e.decrypt?r=Ue.cipher.createDecipher(a,e.key):r=Ue.cipher.createCipher(a,e.key);var n=r.start;return r.start=function(s,i){var o=null;i instanceof Ue.util.ByteBuffer&&(o=i,i={}),i=i||{},i.output=o,i.iv=s,n.call(r,i)},r}var pt=ae,sb=pt.pkcs5=pt.pkcs5||{},Jt;pt.util.isNodejs&&!pt.options.usePureJavaScript&&(Jt=Lr),pt.pbkdf2=sb.pbkdf2=function(e,t,a,r,n,s){if(typeof n=="function"&&(s=n,n=null),pt.util.isNodejs&&!pt.options.usePureJavaScript&&Jt.pbkdf2&&(n===null||typeof n!="object")&&(Jt.pbkdf2Sync.length>4||!n||n==="sha1"))return typeof n!="string"&&(n="sha1"),e=Buffer.from(e,"binary"),t=Buffer.from(t,"binary"),s?Jt.pbkdf2Sync.length===4?Jt.pbkdf2(e,t,a,r,function(_,k){if(_)return s(_);s(null,k.toString("binary"))}):Jt.pbkdf2(e,t,a,r,n,function(_,k){if(_)return s(_);s(null,k.toString("binary"))}):Jt.pbkdf2Sync.length===4?Jt.pbkdf2Sync(e,t,a,r).toString("binary"):Jt.pbkdf2Sync(e,t,a,r,n).toString("binary");if((typeof n>"u"||n===null)&&(n="sha1"),typeof n=="string"){if(!(n in pt.md.algorithms))throw new Error("Unknown hash algorithm: "+n);n=pt.md[n].create()}var i=n.digestLength;if(r>4294967295*i){var o=new Error("Derived key is too long.");if(s)return s(o);throw o}var c=Math.ceil(r/i),l=r-(c-1)*i,u=pt.hmac.create();u.start(n,e);var p="",d,x,m;if(!s){for(var y=1;y<=c;++y){u.start(null,null),u.update(t),u.update(pt.util.int32ToBytes(y)),d=m=u.digest().getBytes();for(var b=2;b<=a;++b)u.start(null,null),u.update(m),x=u.digest().getBytes(),d=pt.util.xorBytes(d,x,i),m=x;p+=y<c?d:d.substr(0,l)}return p}var y=1,b;function C(){if(y>c)return s(null,p);u.start(null,null),u.update(t),u.update(pt.util.int32ToBytes(y)),d=m=u.digest().getBytes(),b=2,B()}function B(){if(b<=a)return u.start(null,null),u.update(m),x=u.digest().getBytes(),d=pt.util.xorBytes(d,x,i),m=x,++b,pt.util.setImmediate(B);p+=y<c?d:d.substr(0,l),++y,C()}C()};var zt=ae,Zf=zt.sha256=zt.sha256||{};zt.md.sha256=zt.md.algorithms.sha256=Zf,Zf.create=function(){e0||ob();var e=null,t=zt.util.createBuffer(),a=new Array(64),r={algorithm:"sha256",blockLength:64,digestLength:32,messageLength:0,fullMessageLength:null,messageLengthSize:8};return r.start=function(){r.messageLength=0,r.fullMessageLength=r.messageLength64=[];for(var n=r.messageLengthSize/4,s=0;s<n;++s)r.fullMessageLength.push(0);return t=zt.util.createBuffer(),e={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225},r},r.start(),r.update=function(n,s){s==="utf8"&&(n=zt.util.encodeUtf8(n));var i=n.length;r.messageLength+=i,i=[i/4294967296>>>0,i>>>0];for(var o=r.fullMessageLength.length-1;o>=0;--o)r.fullMessageLength[o]+=i[1],i[1]=i[0]+(r.fullMessageLength[o]/4294967296>>>0),r.fullMessageLength[o]=r.fullMessageLength[o]>>>0,i[0]=i[1]/4294967296>>>0;return t.putBytes(n),r0(e,a,t),(t.read>2048||t.length()===0)&&t.compact(),r},r.digest=function(){var n=zt.util.createBuffer();n.putBytes(t.bytes());var s=r.fullMessageLength[r.fullMessageLength.length-1]+r.messageLengthSize,i=s&r.blockLength-1;n.putBytes(zu.substr(0,r.blockLength-i));for(var o,c,l=r.fullMessageLength[0]*8,u=0;u<r.fullMessageLength.length-1;++u)o=r.fullMessageLength[u+1]*8,c=o/4294967296>>>0,l+=c,n.putInt32(l>>>0),l=o>>>0;n.putInt32(l);var p={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3,h4:e.h4,h5:e.h5,h6:e.h6,h7:e.h7};r0(p,a,n);var d=zt.util.createBuffer();return d.putInt32(p.h0),d.putInt32(p.h1),d.putInt32(p.h2),d.putInt32(p.h3),d.putInt32(p.h4),d.putInt32(p.h5),d.putInt32(p.h6),d.putInt32(p.h7),d},r};var zu=null,e0=!1,t0=null;function ob(){zu="\x80",zu+=zt.util.fillString("\0",64),t0=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],e0=!0}function r0(e,t,a){for(var r,n,s,i,o,c,l,u,p,d,x,m,y,b,C,B=a.length();B>=64;){for(l=0;l<16;++l)t[l]=a.getInt32();for(;l<64;++l)r=t[l-2],r=(r>>>17|r<<15)^(r>>>19|r<<13)^r>>>10,n=t[l-15],n=(n>>>7|n<<25)^(n>>>18|n<<14)^n>>>3,t[l]=r+t[l-7]+n+t[l-16]|0;for(u=e.h0,p=e.h1,d=e.h2,x=e.h3,m=e.h4,y=e.h5,b=e.h6,C=e.h7,l=0;l<64;++l)i=(m>>>6|m<<26)^(m>>>11|m<<21)^(m>>>25|m<<7),o=b^m&(y^b),s=(u>>>2|u<<30)^(u>>>13|u<<19)^(u>>>22|u<<10),c=u&p|d&(u^p),r=C+i+o+t0[l]+t[l],n=s+c,C=b,b=y,y=m,m=x+r>>>0,x=d,d=p,p=u,u=r+n>>>0;e.h0=e.h0+u|0,e.h1=e.h1+p|0,e.h2=e.h2+d|0,e.h3=e.h3+x|0,e.h4=e.h4+m|0,e.h5=e.h5+y|0,e.h6=e.h6+b|0,e.h7=e.h7+C|0,B-=64}}var Ht=ae,sl=null;Ht.util.isNodejs&&!Ht.options.usePureJavaScript&&!process.versions["node-webkit"]&&(sl=Lr);var cb=Ht.prng=Ht.prng||{};cb.create=function(e){for(var t={plugin:e,key:null,seed:null,time:null,reseeds:0,generated:0,keyBytes:""},a=e.md,r=new Array(32),n=0;n<32;++n)r[n]=a.create();t.pools=r,t.pool=0,t.generate=function(l,u){if(!u)return t.generateSync(l);var p=t.plugin.cipher,d=t.plugin.increment,x=t.plugin.formatKey,m=t.plugin.formatSeed,y=Ht.util.createBuffer();t.key=null,b();function b(C){if(C)return u(C);if(y.length()>=l)return u(null,y.getBytes(l));if(t.generated>1048575&&(t.key=null),t.key===null)return Ht.util.nextTick(function(){s(b)});var B=p(t.key,t.seed);t.generated+=B.length,y.putBytes(B),t.key=x(p(t.key,d(t.seed))),t.seed=m(p(t.key,t.seed)),Ht.util.setImmediate(b)}},t.generateSync=function(l){var u=t.plugin.cipher,p=t.plugin.increment,d=t.plugin.formatKey,x=t.plugin.formatSeed;t.key=null;for(var m=Ht.util.createBuffer();m.length()<l;){t.generated>1048575&&(t.key=null),t.key===null&&i();var y=u(t.key,t.seed);t.generated+=y.length,m.putBytes(y),t.key=d(u(t.key,p(t.seed))),t.seed=x(u(t.key,t.seed))}return m.getBytes(l)};function s(l){if(t.pools[0].messageLength>=32)return o(),l();var u=32-t.pools[0].messageLength<<5;t.seedFile(u,function(p,d){if(p)return l(p);t.collect(d),o(),l()})}function i(){if(t.pools[0].messageLength>=32)return o();var l=32-t.pools[0].messageLength<<5;t.collect(t.seedFileSync(l)),o()}function o(){t.reseeds=t.reseeds===4294967295?0:t.reseeds+1;var l=t.plugin.md.create();l.update(t.keyBytes);for(var u=1,p=0;p<32;++p)t.reseeds%u===0&&(l.update(t.pools[p].digest().getBytes()),t.pools[p].start()),u=u<<1;t.keyBytes=l.digest().getBytes(),l.start(),l.update(t.keyBytes);var d=l.digest().getBytes();t.key=t.plugin.formatKey(t.keyBytes),t.seed=t.plugin.formatSeed(d),t.generated=0}function c(l){var u=null,p=Ht.util.globalScope,d=p.crypto||p.msCrypto;d&&d.getRandomValues&&(u=function(N){return d.getRandomValues(N)});var x=Ht.util.createBuffer();if(u)for(;x.length()<l;){var m=Math.max(1,Math.min(l-x.length(),65536)/4),y=new Uint32Array(Math.floor(m));try{u(y);for(var b=0;b<y.length;++b)x.putInt32(y[b])}catch(N){if(!(typeof QuotaExceededError<"u"&&N instanceof QuotaExceededError))throw N}}if(x.length()<l)for(var C,B,_,k=Math.floor(Math.random()*65536);x.length()<l;){B=16807*(k&65535),C=16807*(k>>16),B+=(C&32767)<<16,B+=C>>15,B=(B&2147483647)+(B>>31),k=B&4294967295;for(var b=0;b<3;++b)_=k>>>(b<<3),_^=Math.floor(Math.random()*256),x.putByte(_&255)}return x.getBytes(l)}return sl?(t.seedFile=function(l,u){sl.randomBytes(l,function(p,d){if(p)return u(p);u(null,d.toString())})},t.seedFileSync=function(l){return sl.randomBytes(l).toString()}):(t.seedFile=function(l,u){try{u(null,c(l))}catch(p){u(p)}},t.seedFileSync=c),t.collect=function(l){for(var u=l.length,p=0;p<u;++p)t.pools[t.pool].update(l.substr(p,1)),t.pool=t.pool===31?0:t.pool+1},t.collectInt=function(l,u){for(var p="",d=0;d<u;d+=8)p+=String.fromCharCode(l>>d&255);t.collect(p)},t.registerWorker=function(l){if(l===self)t.seedFile=function(p,d){function x(m){var y=m.data;y.forge&&y.forge.prng&&(self.removeEventListener("message",x),d(y.forge.prng.err,y.forge.prng.bytes))}self.addEventListener("message",x),self.postMessage({forge:{prng:{needed:p}}})};else{var u=function(p){var d=p.data;d.forge&&d.forge.prng&&t.seedFile(d.forge.prng.needed,function(x,m){l.postMessage({forge:{prng:{err:x,bytes:m}}})})};l.addEventListener("message",u)}},t};var Qe=ae;(function(){if(Qe.random&&Qe.random.getBytes){Qe.random;return}(function(e){var t={},a=new Array(4),r=Qe.util.createBuffer();t.formatKey=function(p){var d=Qe.util.createBuffer(p);return p=new Array(4),p[0]=d.getInt32(),p[1]=d.getInt32(),p[2]=d.getInt32(),p[3]=d.getInt32(),Qe.aes._expandKey(p,!1)},t.formatSeed=function(p){var d=Qe.util.createBuffer(p);return p=new Array(4),p[0]=d.getInt32(),p[1]=d.getInt32(),p[2]=d.getInt32(),p[3]=d.getInt32(),p},t.cipher=function(p,d){return Qe.aes._updateBlock(p,d,a,!1),r.putInt32(a[0]),r.putInt32(a[1]),r.putInt32(a[2]),r.putInt32(a[3]),r.getBytes()},t.increment=function(p){return++p[3],p},t.md=Qe.md.sha256;function n(){var p=Qe.prng.create(t);return p.getBytes=function(d,x){return p.generate(d,x)},p.getBytesSync=function(d){return p.generate(d)},p}var s=n(),i=null,o=Qe.util.globalScope,c=o.crypto||o.msCrypto;if(c&&c.getRandomValues&&(i=function(p){return c.getRandomValues(p)}),Qe.options.usePureJavaScript||!Qe.util.isNodejs&&!i){if(s.collectInt(+new Date,32),typeof navigator<"u"){var l="";for(var u in navigator)try{typeof navigator[u]=="string"&&(l+=navigator[u])}catch{}s.collect(l),l=null}e&&(e().mousemove(function(p){s.collectInt(p.clientX,16),s.collectInt(p.clientY,16)}),e().keypress(function(p){s.collectInt(p.charCode,8)}))}if(!Qe.random)Qe.random=s;else for(var u in s)Qe.random[u]=s[u];Qe.random.createInstance=n,Qe.random})(typeof jQuery<"u"?jQuery:null)})();var wt=ae,Hu=[217,120,249,196,25,221,181,237,40,233,253,121,74,160,216,157,198,126,55,131,43,118,83,142,98,76,100,136,68,139,251,162,23,154,89,245,135,179,79,19,97,69,109,141,9,129,125,50,189,143,64,235,134,183,123,11,240,149,33,34,92,107,78,130,84,214,101,147,206,96,178,28,115,86,192,20,167,140,241,220,18,117,202,31,59,190,228,209,66,61,212,48,163,60,182,38,111,191,14,218,70,105,7,87,39,242,29,155,188,148,67,3,248,17,199,246,144,239,62,231,6,195,213,47,200,102,30,215,8,232,234,222,128,82,238,247,132,170,114,172,53,77,106,42,150,26,210,113,90,21,73,116,75,159,208,94,4,24,164,236,194,224,65,110,15,81,203,204,36,145,175,80,161,244,112,57,153,124,58,133,35,184,180,122,252,2,54,91,37,85,151,49,45,93,250,152,227,138,146,174,5,223,41,16,103,108,186,201,211,0,230,207,225,158,168,44,99,22,1,63,88,226,137,169,13,56,52,27,171,51,255,176,187,72,12,95,185,177,205,46,197,243,219,71,229,165,156,119,10,166,32,104,254,127,193,173],a0=[1,2,3,5],lb=function(e,t){return e<<t&65535|(e&65535)>>16-t},ub=function(e,t){return(e&65535)>>t|e<<16-t&65535};wt.rc2=wt.rc2||{},wt.rc2.expandKey=function(e,t){typeof e=="string"&&(e=wt.util.createBuffer(e)),t=t||128;var a=e,r=e.length(),n=t,s=Math.ceil(n/8),i=255>>(n&7),o;for(o=r;o<128;o++)a.putByte(Hu[a.at(o-1)+a.at(o-r)&255]);for(a.setAt(128-s,Hu[a.at(128-s)&i]),o=127-s;o>=0;o--)a.setAt(o,Hu[a.at(o+1)^a.at(o+s)]);return a};var n0=function(e,t,a){var r=!1,n=null,s=null,i=null,o,c,l,u,p=[];for(e=wt.rc2.expandKey(e,t),l=0;l<64;l++)p.push(e.getInt16Le());a?(o=function(m){for(l=0;l<4;l++)m[l]+=p[u]+(m[(l+3)%4]&m[(l+2)%4])+(~m[(l+3)%4]&m[(l+1)%4]),m[l]=lb(m[l],a0[l]),u++},c=function(m){for(l=0;l<4;l++)m[l]+=p[m[(l+3)%4]&63]}):(o=function(m){for(l=3;l>=0;l--)m[l]=ub(m[l],a0[l]),m[l]-=p[u]+(m[(l+3)%4]&m[(l+2)%4])+(~m[(l+3)%4]&m[(l+1)%4]),u--},c=function(m){for(l=3;l>=0;l--)m[l]-=p[m[(l+3)%4]&63]});var d=function(m){var y=[];for(l=0;l<4;l++){var b=n.getInt16Le();i!==null&&(a?b^=i.getInt16Le():i.putInt16Le(b)),y.push(b&65535)}u=a?0:63;for(var C=0;C<m.length;C++)for(var B=0;B<m[C][0];B++)m[C][1](y);for(l=0;l<4;l++)i!==null&&(a?i.putInt16Le(y[l]):y[l]^=i.getInt16Le()),s.putInt16Le(y[l])},x=null;return x={start:function(m,y){m&&typeof m=="string"&&(m=wt.util.createBuffer(m)),r=!1,n=wt.util.createBuffer(),s=y||new wt.util.createBuffer,i=m,x.output=s},update:function(m){for(r||n.putBuffer(m);n.length()>=8;)d([[5,o],[1,c],[6,o],[1,c],[5,o]])},finish:function(m){var y=!0;if(a)if(m)y=m(8,n,!a);else{var b=n.length()===8?8:8-n.length();n.fillWithByte(b,b)}if(y&&(r=!0,x.update()),!a&&(y=n.length()===0,y))if(m)y=m(8,s,!a);else{var C=s.length(),B=s.at(C-1);B>C?y=!1:s.truncate(B)}return y}},x};wt.rc2.startEncrypting=function(e,t,a){var r=wt.rc2.createEncryptionCipher(e,128);return r.start(t,a),r},wt.rc2.createEncryptionCipher=function(e,t){return n0(e,t,!0)},wt.rc2.startDecrypting=function(e,t,a){var r=wt.rc2.createDecryptionCipher(e,128);return r.start(t,a),r},wt.rc2.createDecryptionCipher=function(e,t){return n0(e,t,!1)};var $u=ae;$u.jsbn=$u.jsbn||{};var Zt;function L(e,t,a){this.data=[],e!=null&&(typeof e=="number"?this.fromNumber(e,t,a):t==null&&typeof e!="string"?this.fromString(e,256):this.fromString(e,t))}$u.jsbn.BigInteger=L;function ve(){return new L(null)}function pb(e,t,a,r,n,s){for(;--s>=0;){var i=t*this.data[e++]+a.data[r]+n;n=Math.floor(i/67108864),a.data[r++]=i&67108863}return n}function db(e,t,a,r,n,s){for(var i=t&32767,o=t>>15;--s>=0;){var c=this.data[e]&32767,l=this.data[e++]>>15,u=o*c+l*i;c=i*c+((u&32767)<<15)+a.data[r]+(n&1073741823),n=(c>>>30)+(u>>>15)+o*l+(n>>>30),a.data[r++]=c&1073741823}return n}function i0(e,t,a,r,n,s){for(var i=t&16383,o=t>>14;--s>=0;){var c=this.data[e]&16383,l=this.data[e++]>>14,u=o*c+l*i;c=i*c+((u&16383)<<14)+a.data[r]+n,n=(c>>28)+(u>>14)+o*l,a.data[r++]=c&268435455}return n}typeof navigator>"u"?(L.prototype.am=i0,Zt=28):navigator.appName=="Microsoft Internet Explorer"?(L.prototype.am=db,Zt=30):navigator.appName!="Netscape"?(L.prototype.am=pb,Zt=26):(L.prototype.am=i0,Zt=28),L.prototype.DB=Zt,L.prototype.DM=(1<<Zt)-1,L.prototype.DV=1<<Zt;var Gu=52;L.prototype.FV=Math.pow(2,Gu),L.prototype.F1=Gu-Zt,L.prototype.F2=2*Zt-Gu;var fb="0123456789abcdefghijklmnopqrstuvwxyz",ol=new Array,Gr,Nt;for(Gr=48,Nt=0;Nt<=9;++Nt)ol[Gr++]=Nt;for(Gr=97,Nt=10;Nt<36;++Nt)ol[Gr++]=Nt;for(Gr=65,Nt=10;Nt<36;++Nt)ol[Gr++]=Nt;function s0(e){return fb.charAt(e)}function o0(e,t){var a=ol[e.charCodeAt(t)];return a??-1}function mb(e){for(var t=this.t-1;t>=0;--t)e.data[t]=this.data[t];e.t=this.t,e.s=this.s}function hb(e){this.t=1,this.s=e<0?-1:0,e>0?this.data[0]=e:e<-1?this.data[0]=e+this.DV:this.t=0}function or(e){var t=ve();return t.fromInt(e),t}function vb(e,t){var a;if(t==16)a=4;else if(t==8)a=3;else if(t==256)a=8;else if(t==2)a=1;else if(t==32)a=5;else if(t==4)a=2;else{this.fromRadix(e,t);return}this.t=0,this.s=0;for(var r=e.length,n=!1,s=0;--r>=0;){var i=a==8?e[r]&255:o0(e,r);if(i<0){e.charAt(r)=="-"&&(n=!0);continue}n=!1,s==0?this.data[this.t++]=i:s+a>this.DB?(this.data[this.t-1]|=(i&(1<<this.DB-s)-1)<<s,this.data[this.t++]=i>>this.DB-s):this.data[this.t-1]|=i<<s,s+=a,s>=this.DB&&(s-=this.DB)}a==8&&(e[0]&128)!=0&&(this.s=-1,s>0&&(this.data[this.t-1]|=(1<<this.DB-s)-1<<s)),this.clamp(),n&&L.ZERO.subTo(this,this)}function gb(){for(var e=this.s&this.DM;this.t>0&&this.data[this.t-1]==e;)--this.t}function xb(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(e==16)t=4;else if(e==8)t=3;else if(e==2)t=1;else if(e==32)t=5;else if(e==4)t=2;else return this.toRadix(e);var a=(1<<t)-1,r,n=!1,s="",i=this.t,o=this.DB-i*this.DB%t;if(i-- >0)for(o<this.DB&&(r=this.data[i]>>o)>0&&(n=!0,s=s0(r));i>=0;)o<t?(r=(this.data[i]&(1<<o)-1)<<t-o,r|=this.data[--i]>>(o+=this.DB-t)):(r=this.data[i]>>(o-=t)&a,o<=0&&(o+=this.DB,--i)),r>0&&(n=!0),n&&(s+=s0(r));return n?s:"0"}function yb(){var e=ve();return L.ZERO.subTo(this,e),e}function bb(){return this.s<0?this.negate():this}function Eb(e){var t=this.s-e.s;if(t!=0)return t;var a=this.t;if(t=a-e.t,t!=0)return this.s<0?-t:t;for(;--a>=0;)if((t=this.data[a]-e.data[a])!=0)return t;return 0}function cl(e){var t=1,a;return(a=e>>>16)!=0&&(e=a,t+=16),(a=e>>8)!=0&&(e=a,t+=8),(a=e>>4)!=0&&(e=a,t+=4),(a=e>>2)!=0&&(e=a,t+=2),(a=e>>1)!=0&&(e=a,t+=1),t}function Cb(){return this.t<=0?0:this.DB*(this.t-1)+cl(this.data[this.t-1]^this.s&this.DM)}function Sb(e,t){var a;for(a=this.t-1;a>=0;--a)t.data[a+e]=this.data[a];for(a=e-1;a>=0;--a)t.data[a]=0;t.t=this.t+e,t.s=this.s}function Tb(e,t){for(var a=e;a<this.t;++a)t.data[a-e]=this.data[a];t.t=Math.max(this.t-e,0),t.s=this.s}function wb(e,t){var a=e%this.DB,r=this.DB-a,n=(1<<r)-1,s=Math.floor(e/this.DB),i=this.s<<a&this.DM,o;for(o=this.t-1;o>=0;--o)t.data[o+s+1]=this.data[o]>>r|i,i=(this.data[o]&n)<<a;for(o=s-1;o>=0;--o)t.data[o]=0;t.data[s]=i,t.t=this.t+s+1,t.s=this.s,t.clamp()}function Ab(e,t){t.s=this.s;var a=Math.floor(e/this.DB);if(a>=this.t){t.t=0;return}var r=e%this.DB,n=this.DB-r,s=(1<<r)-1;t.data[0]=this.data[a]>>r;for(var i=a+1;i<this.t;++i)t.data[i-a-1]|=(this.data[i]&s)<<n,t.data[i-a]=this.data[i]>>r;r>0&&(t.data[this.t-a-1]|=(this.s&s)<<n),t.t=this.t-a,t.clamp()}function Ib(e,t){for(var a=0,r=0,n=Math.min(e.t,this.t);a<n;)r+=this.data[a]-e.data[a],t.data[a++]=r&this.DM,r>>=this.DB;if(e.t<this.t){for(r-=e.s;a<this.t;)r+=this.data[a],t.data[a++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;a<e.t;)r-=e.data[a],t.data[a++]=r&this.DM,r>>=this.DB;r-=e.s}t.s=r<0?-1:0,r<-1?t.data[a++]=this.DV+r:r>0&&(t.data[a++]=r),t.t=a,t.clamp()}function Bb(e,t){var a=this.abs(),r=e.abs(),n=a.t;for(t.t=n+r.t;--n>=0;)t.data[n]=0;for(n=0;n<r.t;++n)t.data[n+a.t]=a.am(0,r.data[n],t,n,0,a.t);t.s=0,t.clamp(),this.s!=e.s&&L.ZERO.subTo(t,t)}function _b(e){for(var t=this.abs(),a=e.t=2*t.t;--a>=0;)e.data[a]=0;for(a=0;a<t.t-1;++a){var r=t.am(a,t.data[a],e,2*a,0,1);(e.data[a+t.t]+=t.am(a+1,2*t.data[a],e,2*a+1,r,t.t-a-1))>=t.DV&&(e.data[a+t.t]-=t.DV,e.data[a+t.t+1]=1)}e.t>0&&(e.data[e.t-1]+=t.am(a,t.data[a],e,2*a,0,1)),e.s=0,e.clamp()}function Rb(e,t,a){var r=e.abs();if(!(r.t<=0)){var n=this.abs();if(n.t<r.t){t?.fromInt(0),a!=null&&this.copyTo(a);return}a==null&&(a=ve());var s=ve(),i=this.s,o=e.s,c=this.DB-cl(r.data[r.t-1]);c>0?(r.lShiftTo(c,s),n.lShiftTo(c,a)):(r.copyTo(s),n.copyTo(a));var l=s.t,u=s.data[l-1];if(u!=0){var p=u*(1<<this.F1)+(l>1?s.data[l-2]>>this.F2:0),d=this.FV/p,x=(1<<this.F1)/p,m=1<<this.F2,y=a.t,b=y-l,C=t??ve();for(s.dlShiftTo(b,C),a.compareTo(C)>=0&&(a.data[a.t++]=1,a.subTo(C,a)),L.ONE.dlShiftTo(l,C),C.subTo(s,s);s.t<l;)s.data[s.t++]=0;for(;--b>=0;){var B=a.data[--y]==u?this.DM:Math.floor(a.data[y]*d+(a.data[y-1]+m)*x);if((a.data[y]+=s.am(0,B,a,b,0,l))<B)for(s.dlShiftTo(b,C),a.subTo(C,a);a.data[y]<--B;)a.subTo(C,a)}t!=null&&(a.drShiftTo(l,t),i!=o&&L.ZERO.subTo(t,t)),a.t=l,a.clamp(),c>0&&a.rShiftTo(c,a),i<0&&L.ZERO.subTo(a,a)}}}function kb(e){var t=ve();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(L.ZERO)>0&&e.subTo(t,t),t}function Ar(e){this.m=e}function Nb(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e}function Lb(e){return e}function Ub(e){e.divRemTo(this.m,null,e)}function Pb(e,t,a){e.multiplyTo(t,a),this.reduce(a)}function Db(e,t){e.squareTo(t),this.reduce(t)}Ar.prototype.convert=Nb,Ar.prototype.revert=Lb,Ar.prototype.reduce=Ub,Ar.prototype.mulTo=Pb,Ar.prototype.sqrTo=Db;function Ob(){if(this.t<1)return 0;var e=this.data[0];if((e&1)==0)return 0;var t=e&3;return t=t*(2-(e&15)*t)&15,t=t*(2-(e&255)*t)&255,t=t*(2-((e&65535)*t&65535))&65535,t=t*(2-e*t%this.DV)%this.DV,t>0?this.DV-t:-t}function Ir(e){this.m=e,this.mp=e.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}function Fb(e){var t=ve();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(L.ZERO)>0&&this.m.subTo(t,t),t}function Mb(e){var t=ve();return e.copyTo(t),this.reduce(t),t}function Vb(e){for(;e.t<=this.mt2;)e.data[e.t++]=0;for(var t=0;t<this.m.t;++t){var a=e.data[t]&32767,r=a*this.mpl+((a*this.mph+(e.data[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(a=t+this.m.t,e.data[a]+=this.m.am(0,r,e,t,0,this.m.t);e.data[a]>=e.DV;)e.data[a]-=e.DV,e.data[++a]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)}function qb(e,t){e.squareTo(t),this.reduce(t)}function jb(e,t,a){e.multiplyTo(t,a),this.reduce(a)}Ir.prototype.convert=Fb,Ir.prototype.revert=Mb,Ir.prototype.reduce=Vb,Ir.prototype.mulTo=jb,Ir.prototype.sqrTo=qb;function Kb(){return(this.t>0?this.data[0]&1:this.s)==0}function zb(e,t){if(e>4294967295||e<1)return L.ONE;var a=ve(),r=ve(),n=t.convert(this),s=cl(e)-1;for(n.copyTo(a);--s>=0;)if(t.sqrTo(a,r),(e&1<<s)>0)t.mulTo(r,n,a);else{var i=a;a=r,r=i}return t.revert(a)}function Hb(e,t){var a;return e<256||t.isEven()?a=new Ar(t):a=new Ir(t),this.exp(e,a)}L.prototype.copyTo=mb,L.prototype.fromInt=hb,L.prototype.fromString=vb,L.prototype.clamp=gb,L.prototype.dlShiftTo=Sb,L.prototype.drShiftTo=Tb,L.prototype.lShiftTo=wb,L.prototype.rShiftTo=Ab,L.prototype.subTo=Ib,L.prototype.multiplyTo=Bb,L.prototype.squareTo=_b,L.prototype.divRemTo=Rb,L.prototype.invDigit=Ob,L.prototype.isEven=Kb,L.prototype.exp=zb,L.prototype.toString=xb,L.prototype.negate=yb,L.prototype.abs=bb,L.prototype.compareTo=Eb,L.prototype.bitLength=Cb,L.prototype.mod=kb,L.prototype.modPowInt=Hb,L.ZERO=or(0),L.ONE=or(1);function $b(){var e=ve();return this.copyTo(e),e}function Gb(){if(this.s<0){if(this.t==1)return this.data[0]-this.DV;if(this.t==0)return-1}else{if(this.t==1)return this.data[0];if(this.t==0)return 0}return(this.data[1]&(1<<32-this.DB)-1)<<this.DB|this.data[0]}function Qb(){return this.t==0?this.s:this.data[0]<<24>>24}function Wb(){return this.t==0?this.s:this.data[0]<<16>>16}function Xb(e){return Math.floor(Math.LN2*this.DB/Math.log(e))}function Yb(){return this.s<0?-1:this.t<=0||this.t==1&&this.data[0]<=0?0:1}function Jb(e){if(e==null&&(e=10),this.signum()==0||e<2||e>36)return"0";var t=this.chunkSize(e),a=Math.pow(e,t),r=or(a),n=ve(),s=ve(),i="";for(this.divRemTo(r,n,s);n.signum()>0;)i=(a+s.intValue()).toString(e).substr(1)+i,n.divRemTo(r,n,s);return s.intValue().toString(e)+i}function Zb(e,t){this.fromInt(0),t==null&&(t=10);for(var a=this.chunkSize(t),r=Math.pow(t,a),n=!1,s=0,i=0,o=0;o<e.length;++o){var c=o0(e,o);if(c<0){e.charAt(o)=="-"&&this.signum()==0&&(n=!0);continue}i=t*i+c,++s>=a&&(this.dMultiply(r),this.dAddOffset(i,0),s=0,i=0)}s>0&&(this.dMultiply(Math.pow(t,s)),this.dAddOffset(i,0)),n&&L.ZERO.subTo(this,this)}function eE(e,t,a){if(typeof t=="number")if(e<2)this.fromInt(1);else for(this.fromNumber(e,a),this.testBit(e-1)||this.bitwiseTo(L.ONE.shiftLeft(e-1),Qu,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(t);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(L.ONE.shiftLeft(e-1),this);else{var r=new Array,n=e&7;r.length=(e>>3)+1,t.nextBytes(r),n>0?r[0]&=(1<<n)-1:r[0]=0,this.fromString(r,256)}}function tE(){var e=this.t,t=new Array;t[0]=this.s;var a=this.DB-e*this.DB%8,r,n=0;if(e-- >0)for(a<this.DB&&(r=this.data[e]>>a)!=(this.s&this.DM)>>a&&(t[n++]=r|this.s<<this.DB-a);e>=0;)a<8?(r=(this.data[e]&(1<<a)-1)<<8-a,r|=this.data[--e]>>(a+=this.DB-8)):(r=this.data[e]>>(a-=8)&255,a<=0&&(a+=this.DB,--e)),(r&128)!=0&&(r|=-256),n==0&&(this.s&128)!=(r&128)&&++n,(n>0||r!=this.s)&&(t[n++]=r);return t}function rE(e){return this.compareTo(e)==0}function aE(e){return this.compareTo(e)<0?this:e}function nE(e){return this.compareTo(e)>0?this:e}function iE(e,t,a){var r,n,s=Math.min(e.t,this.t);for(r=0;r<s;++r)a.data[r]=t(this.data[r],e.data[r]);if(e.t<this.t){for(n=e.s&this.DM,r=s;r<this.t;++r)a.data[r]=t(this.data[r],n);a.t=this.t}else{for(n=this.s&this.DM,r=s;r<e.t;++r)a.data[r]=t(n,e.data[r]);a.t=e.t}a.s=t(this.s,e.s),a.clamp()}function sE(e,t){return e&t}function oE(e){var t=ve();return this.bitwiseTo(e,sE,t),t}function Qu(e,t){return e|t}function cE(e){var t=ve();return this.bitwiseTo(e,Qu,t),t}function c0(e,t){return e^t}function lE(e){var t=ve();return this.bitwiseTo(e,c0,t),t}function l0(e,t){return e&~t}function uE(e){var t=ve();return this.bitwiseTo(e,l0,t),t}function pE(){for(var e=ve(),t=0;t<this.t;++t)e.data[t]=this.DM&~this.data[t];return e.t=this.t,e.s=~this.s,e}function dE(e){var t=ve();return e<0?this.rShiftTo(-e,t):this.lShiftTo(e,t),t}function fE(e){var t=ve();return e<0?this.lShiftTo(-e,t):this.rShiftTo(e,t),t}function mE(e){if(e==0)return-1;var t=0;return(e&65535)==0&&(e>>=16,t+=16),(e&255)==0&&(e>>=8,t+=8),(e&15)==0&&(e>>=4,t+=4),(e&3)==0&&(e>>=2,t+=2),(e&1)==0&&++t,t}function hE(){for(var e=0;e<this.t;++e)if(this.data[e]!=0)return e*this.DB+mE(this.data[e]);return this.s<0?this.t*this.DB:-1}function vE(e){for(var t=0;e!=0;)e&=e-1,++t;return t}function gE(){for(var e=0,t=this.s&this.DM,a=0;a<this.t;++a)e+=vE(this.data[a]^t);return e}function xE(e){var t=Math.floor(e/this.DB);return t>=this.t?this.s!=0:(this.data[t]&1<<e%this.DB)!=0}function yE(e,t){var a=L.ONE.shiftLeft(e);return this.bitwiseTo(a,t,a),a}function bE(e){return this.changeBit(e,Qu)}function EE(e){return this.changeBit(e,l0)}function CE(e){return this.changeBit(e,c0)}function SE(e,t){for(var a=0,r=0,n=Math.min(e.t,this.t);a<n;)r+=this.data[a]+e.data[a],t.data[a++]=r&this.DM,r>>=this.DB;if(e.t<this.t){for(r+=e.s;a<this.t;)r+=this.data[a],t.data[a++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;a<e.t;)r+=e.data[a],t.data[a++]=r&this.DM,r>>=this.DB;r+=e.s}t.s=r<0?-1:0,r>0?t.data[a++]=r:r<-1&&(t.data[a++]=this.DV+r),t.t=a,t.clamp()}function TE(e){var t=ve();return this.addTo(e,t),t}function wE(e){var t=ve();return this.subTo(e,t),t}function AE(e){var t=ve();return this.multiplyTo(e,t),t}function IE(){var e=ve();return this.squareTo(e),e}function BE(e){var t=ve();return this.divRemTo(e,t,null),t}function _E(e){var t=ve();return this.divRemTo(e,null,t),t}function RE(e){var t=ve(),a=ve();return this.divRemTo(e,t,a),new Array(t,a)}function kE(e){this.data[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()}function NE(e,t){if(e!=0){for(;this.t<=t;)this.data[this.t++]=0;for(this.data[t]+=e;this.data[t]>=this.DV;)this.data[t]-=this.DV,++t>=this.t&&(this.data[this.t++]=0),++this.data[t]}}function mc(){}function u0(e){return e}function LE(e,t,a){e.multiplyTo(t,a)}function UE(e,t){e.squareTo(t)}mc.prototype.convert=u0,mc.prototype.revert=u0,mc.prototype.mulTo=LE,mc.prototype.sqrTo=UE;function PE(e){return this.exp(e,new mc)}function DE(e,t,a){var r=Math.min(this.t+e.t,t);for(a.s=0,a.t=r;r>0;)a.data[--r]=0;var n;for(n=a.t-this.t;r<n;++r)a.data[r+this.t]=this.am(0,e.data[r],a,r,0,this.t);for(n=Math.min(e.t,t);r<n;++r)this.am(0,e.data[r],a,r,0,t-r);a.clamp()}function OE(e,t,a){--t;var r=a.t=this.t+e.t-t;for(a.s=0;--r>=0;)a.data[r]=0;for(r=Math.max(t-this.t,0);r<e.t;++r)a.data[this.t+r-t]=this.am(t-r,e.data[r],a,0,0,this.t+r-t);a.clamp(),a.drShiftTo(1,a)}function Qr(e){this.r2=ve(),this.q3=ve(),L.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e),this.m=e}function FE(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var t=ve();return e.copyTo(t),this.reduce(t),t}function ME(e){return e}function VE(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)}function qE(e,t){e.squareTo(t),this.reduce(t)}function jE(e,t,a){e.multiplyTo(t,a),this.reduce(a)}Qr.prototype.convert=FE,Qr.prototype.revert=ME,Qr.prototype.reduce=VE,Qr.prototype.mulTo=jE,Qr.prototype.sqrTo=qE;function KE(e,t){var a=e.bitLength(),r,n=or(1),s;if(a<=0)return n;a<18?r=1:a<48?r=3:a<144?r=4:a<768?r=5:r=6,a<8?s=new Ar(t):t.isEven()?s=new Qr(t):s=new Ir(t);var i=new Array,o=3,c=r-1,l=(1<<r)-1;if(i[1]=s.convert(this),r>1){var u=ve();for(s.sqrTo(i[1],u);o<=l;)i[o]=ve(),s.mulTo(u,i[o-2],i[o]),o+=2}var p=e.t-1,d,x=!0,m=ve(),y;for(a=cl(e.data[p])-1;p>=0;){for(a>=c?d=e.data[p]>>a-c&l:(d=(e.data[p]&(1<<a+1)-1)<<c-a,p>0&&(d|=e.data[p-1]>>this.DB+a-c)),o=r;(d&1)==0;)d>>=1,--o;if((a-=o)<0&&(a+=this.DB,--p),x)i[d].copyTo(n),x=!1;else{for(;o>1;)s.sqrTo(n,m),s.sqrTo(m,n),o-=2;o>0?s.sqrTo(n,m):(y=n,n=m,m=y),s.mulTo(m,i[d],n)}for(;p>=0&&(e.data[p]&1<<a)==0;)s.sqrTo(n,m),y=n,n=m,m=y,--a<0&&(a=this.DB-1,--p)}return s.revert(n)}function zE(e){var t=this.s<0?this.negate():this.clone(),a=e.s<0?e.negate():e.clone();if(t.compareTo(a)<0){var r=t;t=a,a=r}var n=t.getLowestSetBit(),s=a.getLowestSetBit();if(s<0)return t;for(n<s&&(s=n),s>0&&(t.rShiftTo(s,t),a.rShiftTo(s,a));t.signum()>0;)(n=t.getLowestSetBit())>0&&t.rShiftTo(n,t),(n=a.getLowestSetBit())>0&&a.rShiftTo(n,a),t.compareTo(a)>=0?(t.subTo(a,t),t.rShiftTo(1,t)):(a.subTo(t,a),a.rShiftTo(1,a));return s>0&&a.lShiftTo(s,a),a}function HE(e){if(e<=0)return 0;var t=this.DV%e,a=this.s<0?e-1:0;if(this.t>0)if(t==0)a=this.data[0]%e;else for(var r=this.t-1;r>=0;--r)a=(t*a+this.data[r])%e;return a}function $E(e){if(this.signum()==0)return L.ZERO;var t=e.isEven();if(this.isEven()&&t||e.signum()==0)return L.ZERO;for(var a=e.clone(),r=this.clone(),n=or(1),s=or(0),i=or(0),o=or(1);a.signum()!=0;){for(;a.isEven();)a.rShiftTo(1,a),t?((!n.isEven()||!s.isEven())&&(n.addTo(this,n),s.subTo(e,s)),n.rShiftTo(1,n)):s.isEven()||s.subTo(e,s),s.rShiftTo(1,s);for(;r.isEven();)r.rShiftTo(1,r),t?((!i.isEven()||!o.isEven())&&(i.addTo(this,i),o.subTo(e,o)),i.rShiftTo(1,i)):o.isEven()||o.subTo(e,o),o.rShiftTo(1,o);a.compareTo(r)>=0?(a.subTo(r,a),t&&n.subTo(i,n),s.subTo(o,s)):(r.subTo(a,r),t&&i.subTo(n,i),o.subTo(s,o))}if(r.compareTo(L.ONE)!=0)return L.ZERO;if(o.compareTo(e)>=0)return o.subtract(e);if(o.signum()<0)o.addTo(e,o);else return o;return o.signum()<0?o.add(e):o}var Vt=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],GE=(1<<26)/Vt[Vt.length-1];function QE(e){var t,a=this.abs();if(a.t==1&&a.data[0]<=Vt[Vt.length-1]){for(t=0;t<Vt.length;++t)if(a.data[0]==Vt[t])return!0;return!1}if(a.isEven())return!1;for(t=1;t<Vt.length;){for(var r=Vt[t],n=t+1;n<Vt.length&&r<GE;)r*=Vt[n++];for(r=a.modInt(r);t<n;)if(r%Vt[t++]==0)return!1}return a.millerRabin(e)}function WE(e){var t=this.subtract(L.ONE),a=t.getLowestSetBit();if(a<=0)return!1;for(var r=t.shiftRight(a),n=XE(),s,i=0;i<e;++i){do s=new L(this.bitLength(),n);while(s.compareTo(L.ONE)<=0||s.compareTo(t)>=0);var o=s.modPow(r,this);if(o.compareTo(L.ONE)!=0&&o.compareTo(t)!=0){for(var c=1;c++<a&&o.compareTo(t)!=0;)if(o=o.modPowInt(2,this),o.compareTo(L.ONE)==0)return!1;if(o.compareTo(t)!=0)return!1}}return!0}function XE(){return{nextBytes:function(e){for(var t=0;t<e.length;++t)e[t]=Math.floor(Math.random()*256)}}}L.prototype.chunkSize=Xb,L.prototype.toRadix=Jb,L.prototype.fromRadix=Zb,L.prototype.fromNumber=eE,L.prototype.bitwiseTo=iE,L.prototype.changeBit=yE,L.prototype.addTo=SE,L.prototype.dMultiply=kE,L.prototype.dAddOffset=NE,L.prototype.multiplyLowerTo=DE,L.prototype.multiplyUpperTo=OE,L.prototype.modInt=HE,L.prototype.millerRabin=WE,L.prototype.clone=$b,L.prototype.intValue=Gb,L.prototype.byteValue=Qb,L.prototype.shortValue=Wb,L.prototype.signum=Yb,L.prototype.toByteArray=tE,L.prototype.equals=rE,L.prototype.min=aE,L.prototype.max=nE,L.prototype.and=oE,L.prototype.or=cE,L.prototype.xor=lE,L.prototype.andNot=uE,L.prototype.not=pE,L.prototype.shiftLeft=dE,L.prototype.shiftRight=fE,L.prototype.getLowestSetBit=hE,L.prototype.bitCount=gE,L.prototype.testBit=xE,L.prototype.setBit=bE,L.prototype.clearBit=EE,L.prototype.flipBit=CE,L.prototype.add=TE,L.prototype.subtract=wE,L.prototype.multiply=AE,L.prototype.divide=BE,L.prototype.remainder=_E,L.prototype.divideAndRemainder=RE,L.prototype.modPow=KE,L.prototype.modInverse=$E,L.prototype.pow=PE,L.prototype.gcd=zE,L.prototype.isProbablePrime=QE,L.prototype.square=IE;var $t=ae,p0=$t.sha1=$t.sha1||{};$t.md.sha1=$t.md.algorithms.sha1=p0,p0.create=function(){d0||YE();var e=null,t=$t.util.createBuffer(),a=new Array(80),r={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8};return r.start=function(){r.messageLength=0,r.fullMessageLength=r.messageLength64=[];for(var n=r.messageLengthSize/4,s=0;s<n;++s)r.fullMessageLength.push(0);return t=$t.util.createBuffer(),e={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520},r},r.start(),r.update=function(n,s){s==="utf8"&&(n=$t.util.encodeUtf8(n));var i=n.length;r.messageLength+=i,i=[i/4294967296>>>0,i>>>0];for(var o=r.fullMessageLength.length-1;o>=0;--o)r.fullMessageLength[o]+=i[1],i[1]=i[0]+(r.fullMessageLength[o]/4294967296>>>0),r.fullMessageLength[o]=r.fullMessageLength[o]>>>0,i[0]=i[1]/4294967296>>>0;return t.putBytes(n),f0(e,a,t),(t.read>2048||t.length()===0)&&t.compact(),r},r.digest=function(){var n=$t.util.createBuffer();n.putBytes(t.bytes());var s=r.fullMessageLength[r.fullMessageLength.length-1]+r.messageLengthSize,i=s&r.blockLength-1;n.putBytes(Wu.substr(0,r.blockLength-i));for(var o,c,l=r.fullMessageLength[0]*8,u=0;u<r.fullMessageLength.length-1;++u)o=r.fullMessageLength[u+1]*8,c=o/4294967296>>>0,l+=c,n.putInt32(l>>>0),l=o>>>0;n.putInt32(l);var p={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3,h4:e.h4};f0(p,a,n);var d=$t.util.createBuffer();return d.putInt32(p.h0),d.putInt32(p.h1),d.putInt32(p.h2),d.putInt32(p.h3),d.putInt32(p.h4),d},r};var Wu=null,d0=!1;function YE(){Wu="\x80",Wu+=$t.util.fillString("\0",64),d0=!0}function f0(e,t,a){for(var r,n,s,i,o,c,l,u,p=a.length();p>=64;){for(n=e.h0,s=e.h1,i=e.h2,o=e.h3,c=e.h4,u=0;u<16;++u)r=a.getInt32(),t[u]=r,l=o^s&(i^o),r=(n<<5|n>>>27)+l+c+1518500249+r,c=o,o=i,i=(s<<30|s>>>2)>>>0,s=n,n=r;for(;u<20;++u)r=t[u-3]^t[u-8]^t[u-14]^t[u-16],r=r<<1|r>>>31,t[u]=r,l=o^s&(i^o),r=(n<<5|n>>>27)+l+c+1518500249+r,c=o,o=i,i=(s<<30|s>>>2)>>>0,s=n,n=r;for(;u<32;++u)r=t[u-3]^t[u-8]^t[u-14]^t[u-16],r=r<<1|r>>>31,t[u]=r,l=s^i^o,r=(n<<5|n>>>27)+l+c+1859775393+r,c=o,o=i,i=(s<<30|s>>>2)>>>0,s=n,n=r;for(;u<40;++u)r=t[u-6]^t[u-16]^t[u-28]^t[u-32],r=r<<2|r>>>30,t[u]=r,l=s^i^o,r=(n<<5|n>>>27)+l+c+1859775393+r,c=o,o=i,i=(s<<30|s>>>2)>>>0,s=n,n=r;for(;u<60;++u)r=t[u-6]^t[u-16]^t[u-28]^t[u-32],r=r<<2|r>>>30,t[u]=r,l=s&i|o&(s^i),r=(n<<5|n>>>27)+l+c+2400959708+r,c=o,o=i,i=(s<<30|s>>>2)>>>0,s=n,n=r;for(;u<80;++u)r=t[u-6]^t[u-16]^t[u-28]^t[u-32],r=r<<2|r>>>30,t[u]=r,l=s^i^o,r=(n<<5|n>>>27)+l+c+3395469782+r,c=o,o=i,i=(s<<30|s>>>2)>>>0,s=n,n=r;e.h0=e.h0+n|0,e.h1=e.h1+s|0,e.h2=e.h2+i|0,e.h3=e.h3+o|0,e.h4=e.h4+c|0,p-=64}}var Gt=ae,m0=Gt.pkcs1=Gt.pkcs1||{};m0.encode_rsa_oaep=function(e,t,a){var r,n,s,i;typeof a=="string"?(r=a,n=arguments[3]||void 0,s=arguments[4]||void 0):a&&(r=a.label||void 0,n=a.seed||void 0,s=a.md||void 0,a.mgf1&&a.mgf1.md&&(i=a.mgf1.md)),s?s.start():s=Gt.md.sha1.create(),i||(i=s);var o=Math.ceil(e.n.bitLength()/8),c=o-2*s.digestLength-2;if(t.length>c){var l=new Error("RSAES-OAEP input message length is too long.");throw l.length=t.length,l.maxLength=c,l}r||(r=""),s.update(r,"raw");for(var u=s.digest(),p="",d=c-t.length,x=0;x<d;x++)p+="\0";var m=u.getBytes()+p+""+t;if(!n)n=Gt.random.getBytes(s.digestLength);else if(n.length!==s.digestLength){var l=new Error("Invalid RSAES-OAEP seed. The seed length must match the digest length.");throw l.seedLength=n.length,l.digestLength=s.digestLength,l}var y=ll(n,o-s.digestLength-1,i),b=Gt.util.xorBytes(m,y,m.length),C=ll(b,s.digestLength,i),B=Gt.util.xorBytes(n,C,n.length);return"\0"+B+b},m0.decode_rsa_oaep=function(e,t,a){var r,n,s;typeof a=="string"?(r=a,n=arguments[3]||void 0):a&&(r=a.label||void 0,n=a.md||void 0,a.mgf1&&a.mgf1.md&&(s=a.mgf1.md));var i=Math.ceil(e.n.bitLength()/8);if(t.length!==i){var b=new Error("RSAES-OAEP encoded message length is invalid.");throw b.length=t.length,b.expectedLength=i,b}if(n===void 0?n=Gt.md.sha1.create():n.start(),s||(s=n),i<2*n.digestLength+2)throw new Error("RSAES-OAEP key is too short for the hash function.");r||(r=""),n.update(r,"raw");for(var o=n.digest().getBytes(),c=t.charAt(0),l=t.substring(1,n.digestLength+1),u=t.substring(1+n.digestLength),p=ll(u,n.digestLength,s),d=Gt.util.xorBytes(l,p,l.length),x=ll(d,i-n.digestLength-1,s),m=Gt.util.xorBytes(u,x,u.length),y=m.substring(0,n.digestLength),b=c!=="\0",C=0;C<n.digestLength;++C)b|=o.charAt(C)!==y.charAt(C);for(var B=1,_=n.digestLength,k=n.digestLength;k<m.length;k++){var N=m.charCodeAt(k),D=N&1^1,K=B?65534:0;b|=N&K,B=B&D,_+=B}if(b||m.charCodeAt(_)!==1)throw new Error("Invalid RSAES-OAEP padding.");return m.substring(_+1)};function ll(e,t,a){a||(a=Gt.md.sha1.create());for(var r="",n=Math.ceil(t/a.digestLength),s=0;s<n;++s){var i=String.fromCharCode(s>>24&255,s>>16&255,s>>8&255,s&255);a.start(),a.update(e+i),r+=a.digest().getBytes()}return r.substring(0,t)}var cr=ae;(function(){if(cr.prime){cr.prime;return}var e=cr.prime=cr.prime||{},t=cr.jsbn.BigInteger,a=[6,4,2,4,2,4,6,2],r=new t(null);r.fromInt(30);var n=function(p,d){return p|d};e.generateProbablePrime=function(p,d,x){typeof d=="function"&&(x=d,d={}),d=d||{};var m=d.algorithm||"PRIMEINC";typeof m=="string"&&(m={name:m}),m.options=m.options||{};var y=d.prng||cr.random,b={nextBytes:function(C){for(var B=y.getBytesSync(C.length),_=0;_<C.length;++_)C[_]=B.charCodeAt(_)}};if(m.name==="PRIMEINC")return s(p,b,m.options,x);throw new Error("Invalid prime generation algorithm: "+m.name)};function s(p,d,x,m){return"workers"in x?c(p,d,x,m):i(p,d,x,m)}function i(p,d,x,m){var y=l(p,d),b=0,C=u(y.bitLength());"millerRabinTests"in x&&(C=x.millerRabinTests);var B=10;"maxBlockTime"in x&&(B=x.maxBlockTime),o(y,p,d,b,C,B,m)}function o(p,d,x,m,y,b,C){var B=+new Date;do{if(p.bitLength()>d&&(p=l(d,x)),p.isProbablePrime(y))return C(null,p);p.dAddOffset(a[m++%8],0)}while(b<0||+new Date-B<b);cr.util.setImmediate(function(){o(p,d,x,m,y,b,C)})}function c(p,d,x,m){if(typeof Worker>"u")return i(p,d,x,m);var y=l(p,d),b=x.workers,C=x.workLoad||100,B=C*30/8,_=x.workerScript||"forge/prime.worker.js";if(b===-1)return cr.util.estimateCores(function(N,D){N&&(D=2),b=D-1,k()});k();function k(){b=Math.max(1,b);for(var N=[],D=0;D<b;++D)N[D]=new Worker(_);for(var D=0;D<b;++D)N[D].addEventListener("message",W);var K=!1;function W(X){if(!K){var pe=X.data;if(pe.found){for(var me=0;me<N.length;++me)N[me].terminate();return K=!0,m(null,new t(pe.prime,16))}y.bitLength()>p&&(y=l(p,d));var xe=y.toString(16);X.target.postMessage({hex:xe,workLoad:C}),y.dAddOffset(B,0)}}}}function l(p,d){var x=new t(p,d),m=p-1;return x.testBit(m)||x.bitwiseTo(t.ONE.shiftLeft(m),n,x),x.dAddOffset(31-x.mod(r).byteValue(),0),x}function u(p){return p<=100?27:p<=150?18:p<=200?15:p<=250?12:p<=300?9:p<=350?8:p<=400?7:p<=500?6:p<=600?5:p<=800?4:p<=1250?3:2}})();var G=ae;if(typeof ye>"u")var ye=G.jsbn.BigInteger;var Xu=G.util.isNodejs?Lr:null,I=G.asn1,Lt=G.util;G.pki=G.pki||{},G.pki.rsa=G.rsa=G.rsa||{};var Z=G.pki,JE=[6,4,2,4,2,4,6,2],ZE={name:"PrivateKeyInfo",tagClass:I.Class.UNIVERSAL,type:I.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:I.Class.UNIVERSAL,type:I.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:I.Class.UNIVERSAL,type:I.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:I.Class.UNIVERSAL,type:I.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:I.Class.UNIVERSAL,type:I.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},eC={name:"RSAPrivateKey",tagClass:I.Class.UNIVERSAL,type:I.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:I.Class.UNIVERSAL,type:I.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",tagClass:I.Class.UNIVERSAL,type:I.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:I.Class.UNIVERSAL,type:I.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:I.Class.UNIVERSAL,type:I.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:I.Class.UNIVERSAL,type:I.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",tagClass:I.Class.UNIVERSAL,type:I.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:I.Class.UNIVERSAL,type:I.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:I.Class.UNIVERSAL,type:I.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:I.Class.UNIVERSAL,type:I.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},tC={name:"RSAPublicKey",tagClass:I.Class.UNIVERSAL,type:I.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:I.Class.UNIVERSAL,type:I.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:I.Class.UNIVERSAL,type:I.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},rC=G.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:I.Class.UNIVERSAL,type:I.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:I.Class.UNIVERSAL,type:I.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:I.Class.UNIVERSAL,type:I.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:I.Class.UNIVERSAL,type:I.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:I.Class.UNIVERSAL,type:I.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},aC={name:"DigestInfo",tagClass:I.Class.UNIVERSAL,type:I.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm",tagClass:I.Class.UNIVERSAL,type:I.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm.algorithmIdentifier",tagClass:I.Class.UNIVERSAL,type:I.Type.OID,constructed:!1,capture:"algorithmIdentifier"},{name:"DigestInfo.DigestAlgorithm.parameters",tagClass:I.Class.UNIVERSAL,type:I.Type.NULL,capture:"parameters",optional:!0,constructed:!1}]},{name:"DigestInfo.digest",tagClass:I.Class.UNIVERSAL,type:I.Type.OCTETSTRING,constructed:!1,capture:"digest"}]},nC=function(e){var t;if(e.algorithm in Z.oids)t=Z.oids[e.algorithm];else{var a=new Error("Unknown message digest algorithm.");throw a.algorithm=e.algorithm,a}var r=I.oidToDer(t).getBytes(),n=I.create(I.Class.UNIVERSAL,I.Type.SEQUENCE,!0,[]),s=I.create(I.Class.UNIVERSAL,I.Type.SEQUENCE,!0,[]);s.value.push(I.create(I.Class.UNIVERSAL,I.Type.OID,!1,r)),s.value.push(I.create(I.Class.UNIVERSAL,I.Type.NULL,!1,""));var i=I.create(I.Class.UNIVERSAL,I.Type.OCTETSTRING,!1,e.digest().getBytes());return n.value.push(s),n.value.push(i),I.toDer(n).getBytes()},h0=function(e,t,a){if(a)return e.modPow(t.e,t.n);if(!t.p||!t.q)return e.modPow(t.d,t.n);t.dP||(t.dP=t.d.mod(t.p.subtract(ye.ONE))),t.dQ||(t.dQ=t.d.mod(t.q.subtract(ye.ONE))),t.qInv||(t.qInv=t.q.modInverse(t.p));var r;do r=new ye(G.util.bytesToHex(G.random.getBytes(t.n.bitLength()/8)),16);while(r.compareTo(t.n)>=0||!r.gcd(t.n).equals(ye.ONE));e=e.multiply(r.modPow(t.e,t.n)).mod(t.n);for(var n=e.mod(t.p).modPow(t.dP,t.p),s=e.mod(t.q).modPow(t.dQ,t.q);n.compareTo(s)<0;)n=n.add(t.p);var i=n.subtract(s).multiply(t.qInv).mod(t.p).multiply(t.q).add(s);return i=i.multiply(r.modInverse(t.n)).mod(t.n),i};Z.rsa.encrypt=function(e,t,a){var r=a,n,s=Math.ceil(t.n.bitLength()/8);a!==!1&&a!==!0?(r=a===2,n=v0(e,t,a)):(n=G.util.createBuffer(),n.putBytes(e));for(var i=new ye(n.toHex(),16),o=h0(i,t,r),c=o.toString(16),l=G.util.createBuffer(),u=s-Math.ceil(c.length/2);u>0;)l.putByte(0),--u;return l.putBytes(G.util.hexToBytes(c)),l.getBytes()},Z.rsa.decrypt=function(e,t,a,r){var n=Math.ceil(t.n.bitLength()/8);if(e.length!==n){var s=new Error("Encrypted message length is invalid.");throw s.length=e.length,s.expected=n,s}var i=new ye(G.util.createBuffer(e).toHex(),16);if(i.compareTo(t.n)>=0)throw new Error("Encrypted message is invalid.");for(var o=h0(i,t,a),c=o.toString(16),l=G.util.createBuffer(),u=n-Math.ceil(c.length/2);u>0;)l.putByte(0),--u;return l.putBytes(G.util.hexToBytes(c)),r!==!1?ul(l.getBytes(),t,a):l.getBytes()},Z.rsa.createKeyPairGenerationState=function(e,t,a){typeof e=="string"&&(e=parseInt(e,10)),e=e||2048,a=a||{};var r=a.prng||G.random,n={nextBytes:function(o){for(var c=r.getBytesSync(o.length),l=0;l<o.length;++l)o[l]=c.charCodeAt(l)}},s=a.algorithm||"PRIMEINC",i;if(s==="PRIMEINC")i={algorithm:s,state:0,bits:e,rng:n,eInt:t||65537,e:new ye(null),p:null,q:null,qBits:e>>1,pBits:e-(e>>1),pqState:0,num:null,keys:null},i.e.fromInt(i.eInt);else throw new Error("Invalid key generation algorithm: "+s);return i},Z.rsa.stepKeyPairGenerationState=function(e,t){"algorithm"in e||(e.algorithm="PRIMEINC");var a=new ye(null);a.fromInt(30);for(var r=0,n=function(p,d){return p|d},s=+new Date,i,o=0;e.keys===null&&(t<=0||o<t);){if(e.state===0){var c=e.p===null?e.pBits:e.qBits,l=c-1;e.pqState===0?(e.num=new ye(c,e.rng),e.num.testBit(l)||e.num.bitwiseTo(ye.ONE.shiftLeft(l),n,e.num),e.num.dAddOffset(31-e.num.mod(a).byteValue(),0),r=0,++e.pqState):e.pqState===1?e.num.bitLength()>c?e.pqState=0:e.num.isProbablePrime(sC(e.num.bitLength()))?++e.pqState:e.num.dAddOffset(JE[r++%8],0):e.pqState===2?e.pqState=e.num.subtract(ye.ONE).gcd(e.e).compareTo(ye.ONE)===0?3:0:e.pqState===3&&(e.pqState=0,e.p===null?e.p=e.num:e.q=e.num,e.p!==null&&e.q!==null&&++e.state,e.num=null)}else if(e.state===1)e.p.compareTo(e.q)<0&&(e.num=e.p,e.p=e.q,e.q=e.num),++e.state;else if(e.state===2)e.p1=e.p.subtract(ye.ONE),e.q1=e.q.subtract(ye.ONE),e.phi=e.p1.multiply(e.q1),++e.state;else if(e.state===3)e.phi.gcd(e.e).compareTo(ye.ONE)===0?++e.state:(e.p=null,e.q=null,e.state=0);else if(e.state===4)e.n=e.p.multiply(e.q),e.n.bitLength()===e.bits?++e.state:(e.q=null,e.state=0);else if(e.state===5){var u=e.e.modInverse(e.phi);e.keys={privateKey:Z.rsa.setPrivateKey(e.n,e.e,u,e.p,e.q,u.mod(e.p1),u.mod(e.q1),e.q.modInverse(e.p)),publicKey:Z.rsa.setPublicKey(e.n,e.e)}}i=+new Date,o+=i-s,s=i}return e.keys!==null},Z.rsa.generateKeyPair=function(e,t,a,r){if(arguments.length===1?typeof e=="object"?(a=e,e=void 0):typeof e=="function"&&(r=e,e=void 0):arguments.length===2?typeof e=="number"?typeof t=="function"?(r=t,t=void 0):typeof t!="number"&&(a=t,t=void 0):(a=e,r=t,e=void 0,t=void 0):arguments.length===3&&(typeof t=="number"?typeof a=="function"&&(r=a,a=void 0):(r=a,a=t,t=void 0)),a=a||{},e===void 0&&(e=a.bits||2048),t===void 0&&(t=a.e||65537),!G.options.usePureJavaScript&&!a.prng&&e>=256&&e<=16384&&(t===65537||t===3)){if(r){if(g0("generateKeyPair"))return Xu.generateKeyPair("rsa",{modulusLength:e,publicExponent:t,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}},function(o,c,l){if(o)return r(o);r(null,{privateKey:Z.privateKeyFromPem(l),publicKey:Z.publicKeyFromPem(c)})});if(x0("generateKey")&&x0("exportKey"))return Lt.globalScope.crypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:b0(t),hash:{name:"SHA-256"}},!0,["sign","verify"]).then(function(o){return Lt.globalScope.crypto.subtle.exportKey("pkcs8",o.privateKey)}).then(void 0,function(o){r(o)}).then(function(o){if(o){var c=Z.privateKeyFromAsn1(I.fromDer(G.util.createBuffer(o)));r(null,{privateKey:c,publicKey:Z.setRsaPublicKey(c.n,c.e)})}});if(y0("generateKey")&&y0("exportKey")){var n=Lt.globalScope.msCrypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:b0(t),hash:{name:"SHA-256"}},!0,["sign","verify"]);n.oncomplete=function(o){var c=o.target.result,l=Lt.globalScope.msCrypto.subtle.exportKey("pkcs8",c.privateKey);l.oncomplete=function(u){var p=u.target.result,d=Z.privateKeyFromAsn1(I.fromDer(G.util.createBuffer(p)));r(null,{privateKey:d,publicKey:Z.setRsaPublicKey(d.n,d.e)})},l.onerror=function(u){r(u)}},n.onerror=function(o){r(o)};return}}else if(g0("generateKeyPairSync")){var s=Xu.generateKeyPairSync("rsa",{modulusLength:e,publicExponent:t,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}});return{privateKey:Z.privateKeyFromPem(s.privateKey),publicKey:Z.publicKeyFromPem(s.publicKey)}}}var i=Z.rsa.createKeyPairGenerationState(e,t,a);if(!r)return Z.rsa.stepKeyPairGenerationState(i,0),i.keys;iC(i,a,r)},Z.setRsaPublicKey=Z.rsa.setPublicKey=function(e,t){var a={n:e,e:t};return a.encrypt=function(r,n,s){if(typeof n=="string"?n=n.toUpperCase():n===void 0&&(n="RSAES-PKCS1-V1_5"),n==="RSAES-PKCS1-V1_5")n={encode:function(o,c,l){return v0(o,c,2).getBytes()}};else if(n==="RSA-OAEP"||n==="RSAES-OAEP")n={encode:function(o,c){return G.pkcs1.encode_rsa_oaep(c,o,s)}};else if(["RAW","NONE","NULL",null].indexOf(n)!==-1)n={encode:function(o){return o}};else if(typeof n=="string")throw new Error('Unsupported encryption scheme: "'+n+'".');var i=n.encode(r,a,!0);return Z.rsa.encrypt(i,a,!0)},a.verify=function(r,n,s,i){typeof s=="string"?s=s.toUpperCase():s===void 0&&(s="RSASSA-PKCS1-V1_5"),i===void 0&&(i={_parseAllDigestBytes:!0,_skipPaddingChecks:!1}),"_parseAllDigestBytes"in i||(i._parseAllDigestBytes=!0),"_skipPaddingChecks"in i||(i._skipPaddingChecks=!1),s==="RSASSA-PKCS1-V1_5"?s={verify:function(c,l){l=ul(l,a,!0,void 0,i);var u=I.fromDer(l,{parseAllBytes:i._parseAllDigestBytes}),p={},d=[];if(!I.validate(u,aC,p,d)||u.value.length!==2){var x=new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value.");throw x.errors=d,x}var m=I.derToOid(p.algorithmIdentifier);if(!(m===G.oids.md2||m===G.oids.md5||m===G.oids.sha1||m===G.oids.sha224||m===G.oids.sha256||m===G.oids.sha384||m===G.oids.sha512||m===G.oids["sha512-224"]||m===G.oids["sha512-256"])){var x=new Error("Unknown RSASSA-PKCS1-v1_5 DigestAlgorithm identifier.");throw x.oid=m,x}if((m===G.oids.md2||m===G.oids.md5)&&!("parameters"in p))throw new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value. Missing algorithm identifier NULL parameters.");return c===p.digest}}:(s==="NONE"||s==="NULL"||s===null)&&(s={verify:function(c,l){return l=ul(l,a,!0,void 0,i),c===l}});var o=Z.rsa.decrypt(n,a,!0,!1);return s.verify(r,o,a.n.bitLength())},a},Z.setRsaPrivateKey=Z.rsa.setPrivateKey=function(e,t,a,r,n,s,i,o){var c={n:e,e:t,d:a,p:r,q:n,dP:s,dQ:i,qInv:o};return c.decrypt=function(l,u,p){typeof u=="string"?u=u.toUpperCase():u===void 0&&(u="RSAES-PKCS1-V1_5");var d=Z.rsa.decrypt(l,c,!1,!1);if(u==="RSAES-PKCS1-V1_5")u={decode:ul};else if(u==="RSA-OAEP"||u==="RSAES-OAEP")u={decode:function(x,m){return G.pkcs1.decode_rsa_oaep(m,x,p)}};else if(["RAW","NONE","NULL",null].indexOf(u)!==-1)u={decode:function(x){return x}};else throw new Error('Unsupported encryption scheme: "'+u+'".');return u.decode(d,c,!1)},c.sign=function(l,u){var p=!1;typeof u=="string"&&(u=u.toUpperCase()),u===void 0||u==="RSASSA-PKCS1-V1_5"?(u={encode:nC},p=1):(u==="NONE"||u==="NULL"||u===null)&&(u={encode:function(){return l}},p=1);var d=u.encode(l,c.n.bitLength());return Z.rsa.encrypt(d,c,p)},c},Z.wrapRsaPrivateKey=function(e){return I.create(I.Class.UNIVERSAL,I.Type.SEQUENCE,!0,[I.create(I.Class.UNIVERSAL,I.Type.INTEGER,!1,I.integerToDer(0).getBytes()),I.create(I.Class.UNIVERSAL,I.Type.SEQUENCE,!0,[I.create(I.Class.UNIVERSAL,I.Type.OID,!1,I.oidToDer(Z.oids.rsaEncryption).getBytes()),I.create(I.Class.UNIVERSAL,I.Type.NULL,!1,"")]),I.create(I.Class.UNIVERSAL,I.Type.OCTETSTRING,!1,I.toDer(e).getBytes())])},Z.privateKeyFromAsn1=function(e){var t={},a=[];if(I.validate(e,ZE,t,a)&&(e=I.fromDer(G.util.createBuffer(t.privateKey))),t={},a=[],!I.validate(e,eC,t,a)){var r=new Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey.");throw r.errors=a,r}var n,s,i,o,c,l,u,p;return n=G.util.createBuffer(t.privateKeyModulus).toHex(),s=G.util.createBuffer(t.privateKeyPublicExponent).toHex(),i=G.util.createBuffer(t.privateKeyPrivateExponent).toHex(),o=G.util.createBuffer(t.privateKeyPrime1).toHex(),c=G.util.createBuffer(t.privateKeyPrime2).toHex(),l=G.util.createBuffer(t.privateKeyExponent1).toHex(),u=G.util.createBuffer(t.privateKeyExponent2).toHex(),p=G.util.createBuffer(t.privateKeyCoefficient).toHex(),Z.setRsaPrivateKey(new ye(n,16),new ye(s,16),new ye(i,16),new ye(o,16),new ye(c,16),new ye(l,16),new ye(u,16),new ye(p,16))},Z.privateKeyToAsn1=Z.privateKeyToRSAPrivateKey=function(e){return I.create(I.Class.UNIVERSAL,I.Type.SEQUENCE,!0,[I.create(I.Class.UNIVERSAL,I.Type.INTEGER,!1,I.integerToDer(0).getBytes()),I.create(I.Class.UNIVERSAL,I.Type.INTEGER,!1,Qt(e.n)),I.create(I.Class.UNIVERSAL,I.Type.INTEGER,!1,Qt(e.e)),I.create(I.Class.UNIVERSAL,I.Type.INTEGER,!1,Qt(e.d)),I.create(I.Class.UNIVERSAL,I.Type.INTEGER,!1,Qt(e.p)),I.create(I.Class.UNIVERSAL,I.Type.INTEGER,!1,Qt(e.q)),I.create(I.Class.UNIVERSAL,I.Type.INTEGER,!1,Qt(e.dP)),I.create(I.Class.UNIVERSAL,I.Type.INTEGER,!1,Qt(e.dQ)),I.create(I.Class.UNIVERSAL,I.Type.INTEGER,!1,Qt(e.qInv))])},Z.publicKeyFromAsn1=function(e){var t={},a=[];if(I.validate(e,rC,t,a)){var r=I.derToOid(t.publicKeyOid);if(r!==Z.oids.rsaEncryption){var n=new Error("Cannot read public key. Unknown OID.");throw n.oid=r,n}e=t.rsaPublicKey}if(a=[],!I.validate(e,tC,t,a)){var n=new Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey.");throw n.errors=a,n}var s=G.util.createBuffer(t.publicKeyModulus).toHex(),i=G.util.createBuffer(t.publicKeyExponent).toHex();return Z.setRsaPublicKey(new ye(s,16),new ye(i,16))},Z.publicKeyToAsn1=Z.publicKeyToSubjectPublicKeyInfo=function(e){return I.create(I.Class.UNIVERSAL,I.Type.SEQUENCE,!0,[I.create(I.Class.UNIVERSAL,I.Type.SEQUENCE,!0,[I.create(I.Class.UNIVERSAL,I.Type.OID,!1,I.oidToDer(Z.oids.rsaEncryption).getBytes()),I.create(I.Class.UNIVERSAL,I.Type.NULL,!1,"")]),I.create(I.Class.UNIVERSAL,I.Type.BITSTRING,!1,[Z.publicKeyToRSAPublicKey(e)])])},Z.publicKeyToRSAPublicKey=function(e){return I.create(I.Class.UNIVERSAL,I.Type.SEQUENCE,!0,[I.create(I.Class.UNIVERSAL,I.Type.INTEGER,!1,Qt(e.n)),I.create(I.Class.UNIVERSAL,I.Type.INTEGER,!1,Qt(e.e))])};function v0(e,t,a){var r=G.util.createBuffer(),n=Math.ceil(t.n.bitLength()/8);if(e.length>n-11){var s=new Error("Message is too long for PKCS#1 v1.5 padding.");throw s.length=e.length,s.max=n-11,s}r.putByte(0),r.putByte(a);var i=n-3-e.length,o;if(a===0||a===1){o=a===0?0:255;for(var c=0;c<i;++c)r.putByte(o)}else for(;i>0;){for(var l=0,u=G.random.getBytes(i),c=0;c<i;++c)o=u.charCodeAt(c),o===0?++l:r.putByte(o);i=l}return r.putByte(0),r.putBytes(e),r}function ul(e,t,a,r,n){var s=Math.ceil(t.n.bitLength()/8),i=G.util.createBuffer(e),o=i.getByte(),c=i.getByte();if(o!==0||a&&c!==0&&c!==1||!a&&c!==2||a&&c===0&&typeof r>"u")throw new Error("Encryption block is invalid.");var l=0;if(c===0){l=s-3-r;for(var u=0;u<l;++u)if(i.getByte()!==0)throw new Error("Encryption block is invalid.")}else if(c===1){for(l=0;i.length()>1;){if(i.getByte()!==255){--i.read;break}++l}if(l<8&&!(n&&n._skipPaddingChecks))throw new Error("Encryption block is invalid.")}else if(c===2){for(l=0;i.length()>1;){if(i.getByte()===0){--i.read;break}++l}if(l<8&&!(n&&n._skipPaddingChecks))throw new Error("Encryption block is invalid.")}var p=i.getByte();if(p!==0||l!==s-3-i.length())throw new Error("Encryption block is invalid.");return i.getBytes()}function iC(e,t,a){typeof t=="function"&&(a=t,t={}),t=t||{};var r={algorithm:{name:t.algorithm||"PRIMEINC",options:{workers:t.workers||2,workLoad:t.workLoad||100,workerScript:t.workerScript}}};"prng"in t&&(r.prng=t.prng),n();function n(){s(e.pBits,function(o,c){if(o)return a(o);if(e.p=c,e.q!==null)return i(o,e.q);s(e.qBits,i)})}function s(o,c){G.prime.generateProbablePrime(o,r,c)}function i(o,c){if(o)return a(o);if(e.q=c,e.p.compareTo(e.q)<0){var l=e.p;e.p=e.q,e.q=l}if(e.p.subtract(ye.ONE).gcd(e.e).compareTo(ye.ONE)!==0){e.p=null,n();return}if(e.q.subtract(ye.ONE).gcd(e.e).compareTo(ye.ONE)!==0){e.q=null,s(e.qBits,i);return}if(e.p1=e.p.subtract(ye.ONE),e.q1=e.q.subtract(ye.ONE),e.phi=e.p1.multiply(e.q1),e.phi.gcd(e.e).compareTo(ye.ONE)!==0){e.p=e.q=null,n();return}if(e.n=e.p.multiply(e.q),e.n.bitLength()!==e.bits){e.q=null,s(e.qBits,i);return}var u=e.e.modInverse(e.phi);e.keys={privateKey:Z.rsa.setPrivateKey(e.n,e.e,u,e.p,e.q,u.mod(e.p1),u.mod(e.q1),e.q.modInverse(e.p)),publicKey:Z.rsa.setPublicKey(e.n,e.e)},a(null,e.keys)}}function Qt(e){var t=e.toString(16);t[0]>="8"&&(t="00"+t);var a=G.util.hexToBytes(t);return a.length>1&&(a.charCodeAt(0)===0&&(a.charCodeAt(1)&128)===0||a.charCodeAt(0)===255&&(a.charCodeAt(1)&128)===128)?a.substr(1):a}function sC(e){return e<=100?27:e<=150?18:e<=200?15:e<=250?12:e<=300?9:e<=350?8:e<=400?7:e<=500?6:e<=600?5:e<=800?4:e<=1250?3:2}function g0(e){return G.util.isNodejs&&typeof Xu[e]=="function"}function x0(e){return typeof Lt.globalScope<"u"&&typeof Lt.globalScope.crypto=="object"&&typeof Lt.globalScope.crypto.subtle=="object"&&typeof Lt.globalScope.crypto.subtle[e]=="function"}function y0(e){return typeof Lt.globalScope<"u"&&typeof Lt.globalScope.msCrypto=="object"&&typeof Lt.globalScope.msCrypto.subtle=="object"&&typeof Lt.globalScope.msCrypto.subtle[e]=="function"}function b0(e){for(var t=G.util.hexToBytes(e.toString(16)),a=new Uint8Array(t.length),r=0;r<t.length;++r)a[r]=t.charCodeAt(r);return a}var H=ae;if(typeof oC>"u")var oC=H.jsbn.BigInteger;var R=H.asn1,re=H.pki=H.pki||{};re.pbe=H.pbe=H.pbe||{};var Br=re.oids,cC={name:"EncryptedPrivateKeyInfo",tagClass:R.Class.UNIVERSAL,type:R.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:R.Class.UNIVERSAL,type:R.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:R.Class.UNIVERSAL,type:R.Type.OID,constructed:!1,capture:"encryptionOid"},{name:"AlgorithmIdentifier.parameters",tagClass:R.Class.UNIVERSAL,type:R.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:R.Class.UNIVERSAL,type:R.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},lC={name:"PBES2Algorithms",tagClass:R.Class.UNIVERSAL,type:R.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:R.Class.UNIVERSAL,type:R.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",tagClass:R.Class.UNIVERSAL,type:R.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:R.Class.UNIVERSAL,type:R.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:R.Class.UNIVERSAL,type:R.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:R.Class.UNIVERSAL,type:R.Type.INTEGER,constructed:!1,capture:"kdfIterationCount"},{name:"PBES2Algorithms.params.keyLength",tagClass:R.Class.UNIVERSAL,type:R.Type.INTEGER,constructed:!1,optional:!0,capture:"keyLength"},{name:"PBES2Algorithms.params.prf",tagClass:R.Class.UNIVERSAL,type:R.Type.SEQUENCE,constructed:!0,optional:!0,value:[{name:"PBES2Algorithms.params.prf.algorithm",tagClass:R.Class.UNIVERSAL,type:R.Type.OID,constructed:!1,capture:"prfOid"}]}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:R.Class.UNIVERSAL,type:R.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:R.Class.UNIVERSAL,type:R.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:R.Class.UNIVERSAL,type:R.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},uC={name:"pkcs-12PbeParams",tagClass:R.Class.UNIVERSAL,type:R.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:R.Class.UNIVERSAL,type:R.Type.OCTETSTRING,constructed:!1,capture:"salt"},{name:"pkcs-12PbeParams.iterations",tagClass:R.Class.UNIVERSAL,type:R.Type.INTEGER,constructed:!1,capture:"iterations"}]};re.encryptPrivateKeyInfo=function(e,t,a){a=a||{},a.saltSize=a.saltSize||8,a.count=a.count||2048,a.algorithm=a.algorithm||"aes128",a.prfAlgorithm=a.prfAlgorithm||"sha1";var r=H.random.getBytesSync(a.saltSize),n=a.count,s=R.integerToDer(n),i,o,c;if(a.algorithm.indexOf("aes")===0||a.algorithm==="des"){var l,u,p;switch(a.algorithm){case"aes128":i=16,l=16,u=Br["aes128-CBC"],p=H.aes.createEncryptionCipher;break;case"aes192":i=24,l=16,u=Br["aes192-CBC"],p=H.aes.createEncryptionCipher;break;case"aes256":i=32,l=16,u=Br["aes256-CBC"],p=H.aes.createEncryptionCipher;break;case"des":i=8,l=8,u=Br.desCBC,p=H.des.createEncryptionCipher;break;default:var d=new Error("Cannot encrypt private key. Unknown encryption algorithm.");throw d.algorithm=a.algorithm,d}var x="hmacWith"+a.prfAlgorithm.toUpperCase(),m=S0(x),y=H.pkcs5.pbkdf2(t,r,n,i,m),b=H.random.getBytesSync(l),C=p(y);C.start(b),C.update(R.toDer(e)),C.finish(),c=C.output.getBytes();var B=pC(r,s,i,x);o=R.create(R.Class.UNIVERSAL,R.Type.SEQUENCE,!0,[R.create(R.Class.UNIVERSAL,R.Type.OID,!1,R.oidToDer(Br.pkcs5PBES2).getBytes()),R.create(R.Class.UNIVERSAL,R.Type.SEQUENCE,!0,[R.create(R.Class.UNIVERSAL,R.Type.SEQUENCE,!0,[R.create(R.Class.UNIVERSAL,R.Type.OID,!1,R.oidToDer(Br.pkcs5PBKDF2).getBytes()),B]),R.create(R.Class.UNIVERSAL,R.Type.SEQUENCE,!0,[R.create(R.Class.UNIVERSAL,R.Type.OID,!1,R.oidToDer(u).getBytes()),R.create(R.Class.UNIVERSAL,R.Type.OCTETSTRING,!1,b)])])])}else if(a.algorithm==="3des"){i=24;var _=new H.util.ByteBuffer(r),y=re.pbe.generatePkcs12Key(t,_,1,n,i),b=re.pbe.generatePkcs12Key(t,_,2,n,i),C=H.des.createEncryptionCipher(y);C.start(b),C.update(R.toDer(e)),C.finish(),c=C.output.getBytes(),o=R.create(R.Class.UNIVERSAL,R.Type.SEQUENCE,!0,[R.create(R.Class.UNIVERSAL,R.Type.OID,!1,R.oidToDer(Br["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),R.create(R.Class.UNIVERSAL,R.Type.SEQUENCE,!0,[R.create(R.Class.UNIVERSAL,R.Type.OCTETSTRING,!1,r),R.create(R.Class.UNIVERSAL,R.Type.INTEGER,!1,s.getBytes())])])}else{var d=new Error("Cannot encrypt private key. Unknown encryption algorithm.");throw d.algorithm=a.algorithm,d}var k=R.create(R.Class.UNIVERSAL,R.Type.SEQUENCE,!0,[o,R.create(R.Class.UNIVERSAL,R.Type.OCTETSTRING,!1,c)]);return k},re.decryptPrivateKeyInfo=function(e,t){var a=null,r={},n=[];if(!R.validate(e,cC,r,n)){var s=new Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw s.errors=n,s}var i=R.derToOid(r.encryptionOid),o=re.pbe.getCipher(i,r.encryptionParams,t),c=H.util.createBuffer(r.encryptedData);return o.update(c),o.finish()&&(a=R.fromDer(o.output)),a},re.encryptedPrivateKeyToPem=function(e,t){var a={type:"ENCRYPTED PRIVATE KEY",body:R.toDer(e).getBytes()};return H.pem.encode(a,{maxline:t})},re.encryptedPrivateKeyFromPem=function(e){var t=H.pem.decode(e)[0];if(t.type!=="ENCRYPTED PRIVATE KEY"){var a=new Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');throw a.headerType=t.type,a}if(t.procType&&t.procType.type==="ENCRYPTED")throw new Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return R.fromDer(t.body)},re.encryptRsaPrivateKey=function(e,t,a){if(a=a||{},!a.legacy){var r=re.wrapRsaPrivateKey(re.privateKeyToAsn1(e));return r=re.encryptPrivateKeyInfo(r,t,a),re.encryptedPrivateKeyToPem(r)}var n,s,i,o;switch(a.algorithm){case"aes128":n="AES-128-CBC",i=16,s=H.random.getBytesSync(16),o=H.aes.createEncryptionCipher;break;case"aes192":n="AES-192-CBC",i=24,s=H.random.getBytesSync(16),o=H.aes.createEncryptionCipher;break;case"aes256":n="AES-256-CBC",i=32,s=H.random.getBytesSync(16),o=H.aes.createEncryptionCipher;break;case"3des":n="DES-EDE3-CBC",i=24,s=H.random.getBytesSync(8),o=H.des.createEncryptionCipher;break;case"des":n="DES-CBC",i=8,s=H.random.getBytesSync(8),o=H.des.createEncryptionCipher;break;default:var c=new Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+a.algorithm+'".');throw c.algorithm=a.algorithm,c}var l=H.pbe.opensslDeriveBytes(t,s.substr(0,8),i),u=o(l);u.start(s),u.update(R.toDer(re.privateKeyToAsn1(e))),u.finish();var p={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:n,parameters:H.util.bytesToHex(s).toUpperCase()},body:u.output.getBytes()};return H.pem.encode(p)},re.decryptRsaPrivateKey=function(e,t){var a=null,r=H.pem.decode(e)[0];if(r.type!=="ENCRYPTED PRIVATE KEY"&&r.type!=="PRIVATE KEY"&&r.type!=="RSA PRIVATE KEY"){var n=new Error('Could not convert private key from PEM; PEM header type is not "ENCRYPTED PRIVATE KEY", "PRIVATE KEY", or "RSA PRIVATE KEY".');throw n.headerType=n,n}if(r.procType&&r.procType.type==="ENCRYPTED"){var s,i;switch(r.dekInfo.algorithm){case"DES-CBC":s=8,i=H.des.createDecryptionCipher;break;case"DES-EDE3-CBC":s=24,i=H.des.createDecryptionCipher;break;case"AES-128-CBC":s=16,i=H.aes.createDecryptionCipher;break;case"AES-192-CBC":s=24,i=H.aes.createDecryptionCipher;break;case"AES-256-CBC":s=32,i=H.aes.createDecryptionCipher;break;case"RC2-40-CBC":s=5,i=function(p){return H.rc2.createDecryptionCipher(p,40)};break;case"RC2-64-CBC":s=8,i=function(p){return H.rc2.createDecryptionCipher(p,64)};break;case"RC2-128-CBC":s=16,i=function(p){return H.rc2.createDecryptionCipher(p,128)};break;default:var n=new Error('Could not decrypt private key; unsupported encryption algorithm "'+r.dekInfo.algorithm+'".');throw n.algorithm=r.dekInfo.algorithm,n}var o=H.util.hexToBytes(r.dekInfo.parameters),c=H.pbe.opensslDeriveBytes(t,o.substr(0,8),s),l=i(c);if(l.start(o),l.update(H.util.createBuffer(r.body)),l.finish())a=l.output.getBytes();else return a}else a=r.body;return r.type==="ENCRYPTED PRIVATE KEY"?a=re.decryptPrivateKeyInfo(R.fromDer(a),t):a=R.fromDer(a),a!==null&&(a=re.privateKeyFromAsn1(a)),a},re.pbe.generatePkcs12Key=function(e,t,a,r,n,s){var i,o;if(typeof s>"u"||s===null){if(!("sha1"in H.md))throw new Error('"sha1" hash algorithm unavailable.');s=H.md.sha1.create()}var c=s.digestLength,l=s.blockLength,u=new H.util.ByteBuffer,p=new H.util.ByteBuffer;if(e!=null){for(o=0;o<e.length;o++)p.putInt16(e.charCodeAt(o));p.putInt16(0)}var d=p.length(),x=t.length(),m=new H.util.ByteBuffer;m.fillWithByte(a,l);var y=l*Math.ceil(x/l),b=new H.util.ByteBuffer;for(o=0;o<y;o++)b.putByte(t.at(o%x));var C=l*Math.ceil(d/l),B=new H.util.ByteBuffer;for(o=0;o<C;o++)B.putByte(p.at(o%d));var _=b;_.putBuffer(B);for(var k=Math.ceil(n/c),N=1;N<=k;N++){var D=new H.util.ByteBuffer;D.putBytes(m.bytes()),D.putBytes(_.bytes());for(var K=0;K<r;K++)s.start(),s.update(D.getBytes()),D=s.digest();var W=new H.util.ByteBuffer;for(o=0;o<l;o++)W.putByte(D.at(o%c));var X=Math.ceil(x/l)+Math.ceil(d/l),pe=new H.util.ByteBuffer;for(i=0;i<X;i++){var me=new H.util.ByteBuffer(_.getBytes(l)),xe=511;for(o=W.length()-1;o>=0;o--)xe=xe>>8,xe+=W.at(o)+me.at(o),me.setAt(o,xe&255);pe.putBuffer(me)}_=pe,u.putBuffer(D)}return u.truncate(u.length()-n),u},re.pbe.getCipher=function(e,t,a){switch(e){case re.oids.pkcs5PBES2:return re.pbe.getCipherForPBES2(e,t,a);case re.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case re.oids["pbewithSHAAnd40BitRC2-CBC"]:return re.pbe.getCipherForPKCS12PBE(e,t,a);default:var r=new Error("Cannot read encrypted PBE data block. Unsupported OID.");throw r.oid=e,r.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC","pbewithSHAAnd40BitRC2-CBC"],r}},re.pbe.getCipherForPBES2=function(e,t,a){var r={},n=[];if(!R.validate(t,lC,r,n)){var s=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw s.errors=n,s}if(e=R.derToOid(r.kdfOid),e!==re.oids.pkcs5PBKDF2){var s=new Error("Cannot read encrypted private key. Unsupported key derivation function OID.");throw s.oid=e,s.supportedOids=["pkcs5PBKDF2"],s}if(e=R.derToOid(r.encOid),e!==re.oids["aes128-CBC"]&&e!==re.oids["aes192-CBC"]&&e!==re.oids["aes256-CBC"]&&e!==re.oids["des-EDE3-CBC"]&&e!==re.oids.desCBC){var s=new Error("Cannot read encrypted private key. Unsupported encryption scheme OID.");throw s.oid=e,s.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],s}var i=r.kdfSalt,o=H.util.createBuffer(r.kdfIterationCount);o=o.getInt(o.length()<<3);var c,l;switch(re.oids[e]){case"aes128-CBC":c=16,l=H.aes.createDecryptionCipher;break;case"aes192-CBC":c=24,l=H.aes.createDecryptionCipher;break;case"aes256-CBC":c=32,l=H.aes.createDecryptionCipher;break;case"des-EDE3-CBC":c=24,l=H.des.createDecryptionCipher;break;case"desCBC":c=8,l=H.des.createDecryptionCipher;break}var u=C0(r.prfOid),p=H.pkcs5.pbkdf2(a,i,o,c,u),d=r.encIv,x=l(p);return x.start(d),x},re.pbe.getCipherForPKCS12PBE=function(e,t,a){var r={},n=[];if(!R.validate(t,uC,r,n)){var s=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw s.errors=n,s}var i=H.util.createBuffer(r.salt),o=H.util.createBuffer(r.iterations);o=o.getInt(o.length()<<3);var c,l,u;switch(e){case re.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:c=24,l=8,u=H.des.startDecrypting;break;case re.oids["pbewithSHAAnd40BitRC2-CBC"]:c=5,l=8,u=function(y,b){var C=H.rc2.createDecryptionCipher(y,40);return C.start(b,null),C};break;default:var s=new Error("Cannot read PKCS #12 PBE data block. Unsupported OID.");throw s.oid=e,s}var p=C0(r.prfOid),d=re.pbe.generatePkcs12Key(a,i,1,o,c,p);p.start();var x=re.pbe.generatePkcs12Key(a,i,2,o,l,p);return u(d,x)},re.pbe.opensslDeriveBytes=function(e,t,a,r){if(typeof r>"u"||r===null){if(!("md5"in H.md))throw new Error('"md5" hash algorithm unavailable.');r=H.md.md5.create()}t===null&&(t="");for(var n=[E0(r,e+t)],s=16,i=1;s<a;++i,s+=16)n.push(E0(r,n[i-1]+e+t));return n.join("").substr(0,a)};function E0(e,t){return e.start().update(t).digest().getBytes()}function C0(e){var t;if(!e)t="hmacWithSHA1";else if(t=re.oids[R.derToOid(e)],!t){var a=new Error("Unsupported PRF OID.");throw a.oid=e,a.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],a}return S0(t)}function S0(e){var t=H.md;switch(e){case"hmacWithSHA224":t=H.md.sha512;case"hmacWithSHA1":case"hmacWithSHA256":case"hmacWithSHA384":case"hmacWithSHA512":e=e.substr(8).toLowerCase();break;default:var a=new Error("Unsupported PRF algorithm.");throw a.algorithm=e,a.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],a}if(!t||!(e in t))throw new Error("Unknown hash algorithm: "+e);return t[e].create()}function pC(e,t,a,r){var n=R.create(R.Class.UNIVERSAL,R.Type.SEQUENCE,!0,[R.create(R.Class.UNIVERSAL,R.Type.OCTETSTRING,!1,e),R.create(R.Class.UNIVERSAL,R.Type.INTEGER,!1,t.getBytes())]);return r!=="hmacWithSHA1"&&n.value.push(R.create(R.Class.UNIVERSAL,R.Type.INTEGER,!1,H.util.hexToBytes(a.toString(16))),R.create(R.Class.UNIVERSAL,R.Type.SEQUENCE,!0,[R.create(R.Class.UNIVERSAL,R.Type.OID,!1,R.oidToDer(re.oids[r]).getBytes()),R.create(R.Class.UNIVERSAL,R.Type.NULL,!1,"")])),n}var Wr=ae,z=Wr.asn1,Xr=Wr.pkcs7asn1=Wr.pkcs7asn1||{};Wr.pkcs7=Wr.pkcs7||{},Wr.pkcs7.asn1=Xr;var T0={name:"ContentInfo",tagClass:z.Class.UNIVERSAL,type:z.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:z.Class.UNIVERSAL,type:z.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:z.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};Xr.contentInfoValidator=T0;var w0={name:"EncryptedContentInfo",tagClass:z.Class.UNIVERSAL,type:z.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",tagClass:z.Class.UNIVERSAL,type:z.Type.OID,constructed:!1,capture:"contentType"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm",tagClass:z.Class.UNIVERSAL,type:z.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentEncryptionAlgorithm.algorithm",tagClass:z.Class.UNIVERSAL,type:z.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm.parameter",tagClass:z.Class.UNIVERSAL,captureAsn1:"encParameter"}]},{name:"EncryptedContentInfo.encryptedContent",tagClass:z.Class.CONTEXT_SPECIFIC,type:0,capture:"encryptedContent",captureAsn1:"encryptedContentAsn1"}]};Xr.envelopedDataValidator={name:"EnvelopedData",tagClass:z.Class.UNIVERSAL,type:z.Type.SEQUENCE,constructed:!0,value:[{name:"EnvelopedData.Version",tagClass:z.Class.UNIVERSAL,type:z.Type.INTEGER,constructed:!1,capture:"version"},{name:"EnvelopedData.RecipientInfos",tagClass:z.Class.UNIVERSAL,type:z.Type.SET,constructed:!0,captureAsn1:"recipientInfos"}].concat(w0)},Xr.encryptedDataValidator={name:"EncryptedData",tagClass:z.Class.UNIVERSAL,type:z.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedData.Version",tagClass:z.Class.UNIVERSAL,type:z.Type.INTEGER,constructed:!1,capture:"version"}].concat(w0)};var dC={name:"SignerInfo",tagClass:z.Class.UNIVERSAL,type:z.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.version",tagClass:z.Class.UNIVERSAL,type:z.Type.INTEGER,constructed:!1},{name:"SignerInfo.issuerAndSerialNumber",tagClass:z.Class.UNIVERSAL,type:z.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.issuerAndSerialNumber.issuer",tagClass:z.Class.UNIVERSAL,type:z.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"SignerInfo.issuerAndSerialNumber.serialNumber",tagClass:z.Class.UNIVERSAL,type:z.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"SignerInfo.digestAlgorithm",tagClass:z.Class.UNIVERSAL,type:z.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.digestAlgorithm.algorithm",tagClass:z.Class.UNIVERSAL,type:z.Type.OID,constructed:!1,capture:"digestAlgorithm"},{name:"SignerInfo.digestAlgorithm.parameter",tagClass:z.Class.UNIVERSAL,constructed:!1,captureAsn1:"digestParameter",optional:!0}]},{name:"SignerInfo.authenticatedAttributes",tagClass:z.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"authenticatedAttributes"},{name:"SignerInfo.digestEncryptionAlgorithm",tagClass:z.Class.UNIVERSAL,type:z.Type.SEQUENCE,constructed:!0,capture:"signatureAlgorithm"},{name:"SignerInfo.encryptedDigest",tagClass:z.Class.UNIVERSAL,type:z.Type.OCTETSTRING,constructed:!1,capture:"signature"},{name:"SignerInfo.unauthenticatedAttributes",tagClass:z.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,capture:"unauthenticatedAttributes"}]};Xr.signedDataValidator={name:"SignedData",tagClass:z.Class.UNIVERSAL,type:z.Type.SEQUENCE,constructed:!0,value:[{name:"SignedData.Version",tagClass:z.Class.UNIVERSAL,type:z.Type.INTEGER,constructed:!1,capture:"version"},{name:"SignedData.DigestAlgorithms",tagClass:z.Class.UNIVERSAL,type:z.Type.SET,constructed:!0,captureAsn1:"digestAlgorithms"},T0,{name:"SignedData.Certificates",tagClass:z.Class.CONTEXT_SPECIFIC,type:0,optional:!0,captureAsn1:"certificates"},{name:"SignedData.CertificateRevocationLists",tagClass:z.Class.CONTEXT_SPECIFIC,type:1,optional:!0,captureAsn1:"crls"},{name:"SignedData.SignerInfos",tagClass:z.Class.UNIVERSAL,type:z.Type.SET,capture:"signerInfos",optional:!0,value:[dC]}]},Xr.recipientInfoValidator={name:"RecipientInfo",tagClass:z.Class.UNIVERSAL,type:z.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.version",tagClass:z.Class.UNIVERSAL,type:z.Type.INTEGER,constructed:!1,capture:"version"},{name:"RecipientInfo.issuerAndSerial",tagClass:z.Class.UNIVERSAL,type:z.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.issuerAndSerial.issuer",tagClass:z.Class.UNIVERSAL,type:z.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"RecipientInfo.issuerAndSerial.serialNumber",tagClass:z.Class.UNIVERSAL,type:z.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"RecipientInfo.keyEncryptionAlgorithm",tagClass:z.Class.UNIVERSAL,type:z.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.keyEncryptionAlgorithm.algorithm",tagClass:z.Class.UNIVERSAL,type:z.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"RecipientInfo.keyEncryptionAlgorithm.parameter",tagClass:z.Class.UNIVERSAL,constructed:!1,captureAsn1:"encParameter",optional:!0}]},{name:"RecipientInfo.encryptedKey",tagClass:z.Class.UNIVERSAL,type:z.Type.OCTETSTRING,constructed:!1,capture:"encKey"}]};var _r=ae;_r.mgf=_r.mgf||{};var fC=_r.mgf.mgf1=_r.mgf1=_r.mgf1||{};fC.create=function(e){var t={generate:function(a,r){for(var n=new _r.util.ByteBuffer,s=Math.ceil(r/e.digestLength),i=0;i<s;i++){var o=new _r.util.ByteBuffer;o.putInt32(i),e.start(),e.update(a+o.getBytes()),n.putBuffer(e.digest())}return n.truncate(n.length()-r),n.getBytes()}};return t};var pl=ae;pl.mgf=pl.mgf||{},pl.mgf.mgf1=pl.mgf1;var Rr=ae,mC=Rr.pss=Rr.pss||{};mC.create=function(e){arguments.length===3&&(e={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var t=e.md,a=e.mgf,r=t.digestLength,n=e.salt||null;typeof n=="string"&&(n=Rr.util.createBuffer(n));var s;if("saltLength"in e)s=e.saltLength;else if(n!==null)s=n.length();else throw new Error("Salt length not specified or specific salt not given.");if(n!==null&&n.length()!==s)throw new Error("Given salt length does not match length of given salt.");var i=e.prng||Rr.random,o={};return o.encode=function(c,l){var u,p=l-1,d=Math.ceil(p/8),x=c.digest().getBytes();if(d<r+s+2)throw new Error("Message is too long to encrypt.");var m;n===null?m=i.getBytesSync(s):m=n.bytes();var y=new Rr.util.ByteBuffer;y.fillWithByte(0,8),y.putBytes(x),y.putBytes(m),t.start(),t.update(y.getBytes());var b=t.digest().getBytes(),C=new Rr.util.ByteBuffer;C.fillWithByte(0,d-s-r-2),C.putByte(1),C.putBytes(m);var B=C.getBytes(),_=d-r-1,k=a.generate(b,_),N="";for(u=0;u<_;u++)N+=String.fromCharCode(B.charCodeAt(u)^k.charCodeAt(u));var D=65280>>8*d-p&255;return N=String.fromCharCode(N.charCodeAt(0)&~D)+N.substr(1),N+b+"\xBC"},o.verify=function(c,l,u){var p,d=u-1,x=Math.ceil(d/8);if(l=l.substr(-x),x<r+s+2)throw new Error("Inconsistent parameters to PSS signature verification.");if(l.charCodeAt(x-1)!==188)throw new Error("Encoded message does not end in 0xBC.");var m=x-r-1,y=l.substr(0,m),b=l.substr(m,r),C=65280>>8*x-d&255;if((y.charCodeAt(0)&C)!==0)throw new Error("Bits beyond keysize not zero as expected.");var B=a.generate(b,m),_="";for(p=0;p<m;p++)_+=String.fromCharCode(y.charCodeAt(p)^B.charCodeAt(p));_=String.fromCharCode(_.charCodeAt(0)&~C)+_.substr(1);var k=x-r-s-2;for(p=0;p<k;p++)if(_.charCodeAt(p)!==0)throw new Error("Leftmost octets not zero as expected");if(_.charCodeAt(k)!==1)throw new Error("Inconsistent PSS signature, 0x01 marker not found");var N=_.substr(-s),D=new Rr.util.ByteBuffer;D.fillWithByte(0,8),D.putBytes(c),D.putBytes(N),t.start(),t.update(D.getBytes());var K=t.digest().getBytes();return b===K},o};var Q=ae,h=Q.asn1,F=Q.pki=Q.pki||{},ge=F.oids,Me={};Me.CN=ge.commonName,Me.commonName="CN",Me.C=ge.countryName,Me.countryName="C",Me.L=ge.localityName,Me.localityName="L",Me.ST=ge.stateOrProvinceName,Me.stateOrProvinceName="ST",Me.O=ge.organizationName,Me.organizationName="O",Me.OU=ge.organizationalUnitName,Me.organizationalUnitName="OU",Me.E=ge.emailAddress,Me.emailAddress="E";var A0=Q.pki.rsa.publicKeyValidator,hC={name:"Certificate",tagClass:h.Class.UNIVERSAL,type:h.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate",tagClass:h.Class.UNIVERSAL,type:h.Type.SEQUENCE,constructed:!0,captureAsn1:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",tagClass:h.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",tagClass:h.Class.UNIVERSAL,type:h.Type.INTEGER,constructed:!1,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",tagClass:h.Class.UNIVERSAL,type:h.Type.INTEGER,constructed:!1,capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",tagClass:h.Class.UNIVERSAL,type:h.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.signature.algorithm",tagClass:h.Class.UNIVERSAL,type:h.Type.OID,constructed:!1,capture:"certinfoSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:h.Class.UNIVERSAL,optional:!0,captureAsn1:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",tagClass:h.Class.UNIVERSAL,type:h.Type.SEQUENCE,constructed:!0,captureAsn1:"certIssuer"},{name:"Certificate.TBSCertificate.validity",tagClass:h.Class.UNIVERSAL,type:h.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.validity.notBefore (utc)",tagClass:h.Class.UNIVERSAL,type:h.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity1UTCTime"},{name:"Certificate.TBSCertificate.validity.notBefore (generalized)",tagClass:h.Class.UNIVERSAL,type:h.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity2GeneralizedTime"},{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:h.Class.UNIVERSAL,type:h.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:h.Class.UNIVERSAL,type:h.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:h.Class.UNIVERSAL,type:h.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},A0,{name:"Certificate.TBSCertificate.issuerUniqueID",tagClass:h.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",tagClass:h.Class.UNIVERSAL,type:h.Type.BITSTRING,constructed:!1,captureBitStringValue:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",tagClass:h.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",tagClass:h.Class.UNIVERSAL,type:h.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSubjectUniqueId"}]},{name:"Certificate.TBSCertificate.extensions",tagClass:h.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,captureAsn1:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",tagClass:h.Class.UNIVERSAL,type:h.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.signatureAlgorithm.algorithm",tagClass:h.Class.UNIVERSAL,type:h.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:h.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParams"}]},{name:"Certificate.signatureValue",tagClass:h.Class.UNIVERSAL,type:h.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSignature"}]},vC={name:"rsapss",tagClass:h.Class.UNIVERSAL,type:h.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:h.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:h.Class.UNIVERSAL,type:h.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:h.Class.UNIVERSAL,type:h.Type.OID,constructed:!1,capture:"hashOid"}]}]},{name:"rsapss.maskGenAlgorithm",tagClass:h.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier",tagClass:h.Class.UNIVERSAL,type:h.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm",tagClass:h.Class.UNIVERSAL,type:h.Type.OID,constructed:!1,capture:"maskGenOid"},{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params",tagClass:h.Class.UNIVERSAL,type:h.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm",tagClass:h.Class.UNIVERSAL,type:h.Type.OID,constructed:!1,capture:"maskGenHashOid"}]}]}]},{name:"rsapss.saltLength",tagClass:h.Class.CONTEXT_SPECIFIC,type:2,optional:!0,value:[{name:"rsapss.saltLength.saltLength",tagClass:h.Class.UNIVERSAL,type:h.Class.INTEGER,constructed:!1,capture:"saltLength"}]},{name:"rsapss.trailerField",tagClass:h.Class.CONTEXT_SPECIFIC,type:3,optional:!0,value:[{name:"rsapss.trailer.trailer",tagClass:h.Class.UNIVERSAL,type:h.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},gC={name:"CertificationRequestInfo",tagClass:h.Class.UNIVERSAL,type:h.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:h.Class.UNIVERSAL,type:h.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",tagClass:h.Class.UNIVERSAL,type:h.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},A0,{name:"CertificationRequestInfo.attributes",tagClass:h.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:h.Class.UNIVERSAL,type:h.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:h.Class.UNIVERSAL,type:h.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",tagClass:h.Class.UNIVERSAL,type:h.Type.SET,constructed:!0}]}]}]},xC={name:"CertificationRequest",tagClass:h.Class.UNIVERSAL,type:h.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[gC,{name:"CertificationRequest.signatureAlgorithm",tagClass:h.Class.UNIVERSAL,type:h.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequest.signatureAlgorithm.algorithm",tagClass:h.Class.UNIVERSAL,type:h.Type.OID,constructed:!1,capture:"csrSignatureOid"},{name:"CertificationRequest.signatureAlgorithm.parameters",tagClass:h.Class.UNIVERSAL,optional:!0,captureAsn1:"csrSignatureParams"}]},{name:"CertificationRequest.signature",tagClass:h.Class.UNIVERSAL,type:h.Type.BITSTRING,constructed:!1,captureBitStringValue:"csrSignature"}]};F.RDNAttributesAsArray=function(e,t){for(var a=[],r,n,s,i=0;i<e.value.length;++i){r=e.value[i];for(var o=0;o<r.value.length;++o)s={},n=r.value[o],s.type=h.derToOid(n.value[0].value),s.value=n.value[1].value,s.valueTagClass=n.value[1].type,s.type in ge&&(s.name=ge[s.type],s.name in Me&&(s.shortName=Me[s.name])),t&&(t.update(s.type),t.update(s.value)),a.push(s)}return a},F.CRIAttributesAsArray=function(e){for(var t=[],a=0;a<e.length;++a)for(var r=e[a],n=h.derToOid(r.value[0].value),s=r.value[1].value,i=0;i<s.length;++i){var o={};if(o.type=n,o.value=s[i].value,o.valueTagClass=s[i].type,o.type in ge&&(o.name=ge[o.type],o.name in Me&&(o.shortName=Me[o.name])),o.type===ge.extensionRequest){o.extensions=[];for(var c=0;c<o.value.length;++c)o.extensions.push(F.certificateExtensionFromAsn1(o.value[c]))}t.push(o)}return t};function lr(e,t){typeof t=="string"&&(t={shortName:t});for(var a=null,r,n=0;a===null&&n<e.attributes.length;++n)r=e.attributes[n],(t.type&&t.type===r.type||t.name&&t.name===r.name||t.shortName&&t.shortName===r.shortName)&&(a=r);return a}var dl=function(e,t,a){var r={};if(e!==ge["RSASSA-PSS"])return r;a&&(r={hash:{algorithmOid:ge.sha1},mgf:{algorithmOid:ge.mgf1,hash:{algorithmOid:ge.sha1}},saltLength:20});var n={},s=[];if(!h.validate(t,vC,n,s)){var i=new Error("Cannot read RSASSA-PSS parameter block.");throw i.errors=s,i}return n.hashOid!==void 0&&(r.hash=r.hash||{},r.hash.algorithmOid=h.derToOid(n.hashOid)),n.maskGenOid!==void 0&&(r.mgf=r.mgf||{},r.mgf.algorithmOid=h.derToOid(n.maskGenOid),r.mgf.hash=r.mgf.hash||{},r.mgf.hash.algorithmOid=h.derToOid(n.maskGenHashOid)),n.saltLength!==void 0&&(r.saltLength=n.saltLength.charCodeAt(0)),r},fl=function(e){switch(ge[e.signatureOid]){case"sha1WithRSAEncryption":case"sha1WithRSASignature":return Q.md.sha1.create();case"md5WithRSAEncryption":return Q.md.md5.create();case"sha256WithRSAEncryption":return Q.md.sha256.create();case"sha384WithRSAEncryption":return Q.md.sha384.create();case"sha512WithRSAEncryption":return Q.md.sha512.create();case"RSASSA-PSS":return Q.md.sha256.create();default:var t=new Error("Could not compute "+e.type+" digest. Unknown signature OID.");throw t.signatureOid=e.signatureOid,t}},I0=function(e){var t=e.certificate,a;switch(t.signatureOid){case ge.sha1WithRSAEncryption:case ge.sha1WithRSASignature:break;case ge["RSASSA-PSS"]:var r,n;if(r=ge[t.signatureParameters.mgf.hash.algorithmOid],r===void 0||Q.md[r]===void 0){var s=new Error("Unsupported MGF hash function.");throw s.oid=t.signatureParameters.mgf.hash.algorithmOid,s.name=r,s}if(n=ge[t.signatureParameters.mgf.algorithmOid],n===void 0||Q.mgf[n]===void 0){var s=new Error("Unsupported MGF function.");throw s.oid=t.signatureParameters.mgf.algorithmOid,s.name=n,s}if(n=Q.mgf[n].create(Q.md[r].create()),r=ge[t.signatureParameters.hash.algorithmOid],r===void 0||Q.md[r]===void 0){var s=new Error("Unsupported RSASSA-PSS hash function.");throw s.oid=t.signatureParameters.hash.algorithmOid,s.name=r,s}a=Q.pss.create(Q.md[r].create(),n,t.signatureParameters.saltLength);break}return t.publicKey.verify(e.md.digest().getBytes(),e.signature,a)};F.certificateFromPem=function(e,t,a){var r=Q.pem.decode(e)[0];if(r.type!=="CERTIFICATE"&&r.type!=="X509 CERTIFICATE"&&r.type!=="TRUSTED CERTIFICATE"){var n=new Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');throw n.headerType=r.type,n}if(r.procType&&r.procType.type==="ENCRYPTED")throw new Error("Could not convert certificate from PEM; PEM is encrypted.");var s=h.fromDer(r.body,a);return F.certificateFromAsn1(s,t)},F.certificateToPem=function(e,t){var a={type:"CERTIFICATE",body:h.toDer(F.certificateToAsn1(e)).getBytes()};return Q.pem.encode(a,{maxline:t})},F.publicKeyFromPem=function(e){var t=Q.pem.decode(e)[0];if(t.type!=="PUBLIC KEY"&&t.type!=="RSA PUBLIC KEY"){var a=new Error('Could not convert public key from PEM; PEM header type is not "PUBLIC KEY" or "RSA PUBLIC KEY".');throw a.headerType=t.type,a}if(t.procType&&t.procType.type==="ENCRYPTED")throw new Error("Could not convert public key from PEM; PEM is encrypted.");var r=h.fromDer(t.body);return F.publicKeyFromAsn1(r)},F.publicKeyToPem=function(e,t){var a={type:"PUBLIC KEY",body:h.toDer(F.publicKeyToAsn1(e)).getBytes()};return Q.pem.encode(a,{maxline:t})},F.publicKeyToRSAPublicKeyPem=function(e,t){var a={type:"RSA PUBLIC KEY",body:h.toDer(F.publicKeyToRSAPublicKey(e)).getBytes()};return Q.pem.encode(a,{maxline:t})},F.getPublicKeyFingerprint=function(e,t){t=t||{};var a=t.md||Q.md.sha1.create(),r=t.type||"RSAPublicKey",n;switch(r){case"RSAPublicKey":n=h.toDer(F.publicKeyToRSAPublicKey(e)).getBytes();break;case"SubjectPublicKeyInfo":n=h.toDer(F.publicKeyToAsn1(e)).getBytes();break;default:throw new Error('Unknown fingerprint type "'+t.type+'".')}a.start(),a.update(n);var s=a.digest();if(t.encoding==="hex"){var i=s.toHex();return t.delimiter?i.match(/.{2}/g).join(t.delimiter):i}else{if(t.encoding==="binary")return s.getBytes();if(t.encoding)throw new Error('Unknown encoding "'+t.encoding+'".')}return s},F.certificationRequestFromPem=function(e,t,a){var r=Q.pem.decode(e)[0];if(r.type!=="CERTIFICATE REQUEST"){var n=new Error('Could not convert certification request from PEM; PEM header type is not "CERTIFICATE REQUEST".');throw n.headerType=r.type,n}if(r.procType&&r.procType.type==="ENCRYPTED")throw new Error("Could not convert certification request from PEM; PEM is encrypted.");var s=h.fromDer(r.body,a);return F.certificationRequestFromAsn1(s,t)},F.certificationRequestToPem=function(e,t){var a={type:"CERTIFICATE REQUEST",body:h.toDer(F.certificationRequestToAsn1(e)).getBytes()};return Q.pem.encode(a,{maxline:t})},F.createCertificate=function(){var e={};return e.version=2,e.serialNumber="00",e.signatureOid=null,e.signature=null,e.siginfo={},e.siginfo.algorithmOid=null,e.validity={},e.validity.notBefore=new Date,e.validity.notAfter=new Date,e.issuer={},e.issuer.getField=function(t){return lr(e.issuer,t)},e.issuer.addField=function(t){Ut([t]),e.issuer.attributes.push(t)},e.issuer.attributes=[],e.issuer.hash=null,e.subject={},e.subject.getField=function(t){return lr(e.subject,t)},e.subject.addField=function(t){Ut([t]),e.subject.attributes.push(t)},e.subject.attributes=[],e.subject.hash=null,e.extensions=[],e.publicKey=null,e.md=null,e.setSubject=function(t,a){Ut(t),e.subject.attributes=t,delete e.subject.uniqueId,a&&(e.subject.uniqueId=a),e.subject.hash=null},e.setIssuer=function(t,a){Ut(t),e.issuer.attributes=t,delete e.issuer.uniqueId,a&&(e.issuer.uniqueId=a),e.issuer.hash=null},e.setExtensions=function(t){for(var a=0;a<t.length;++a)B0(t[a],{cert:e});e.extensions=t},e.getExtension=function(t){typeof t=="string"&&(t={name:t});for(var a=null,r,n=0;a===null&&n<e.extensions.length;++n)r=e.extensions[n],(t.id&&r.id===t.id||t.name&&r.name===t.name)&&(a=r);return a},e.sign=function(t,a){e.md=a||Q.md.sha1.create();var r=ge[e.md.algorithm+"WithRSAEncryption"];if(!r){var n=new Error("Could not compute certificate digest. Unknown message digest algorithm OID.");throw n.algorithm=e.md.algorithm,n}e.signatureOid=e.siginfo.algorithmOid=r,e.tbsCertificate=F.getTBSCertificate(e);var s=h.toDer(e.tbsCertificate);e.md.update(s.getBytes()),e.signature=t.sign(e.md)},e.verify=function(t){var a=!1;if(!e.issued(t)){var r=t.issuer,n=e.subject,s=new Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.");throw s.expectedIssuer=n.attributes,s.actualIssuer=r.attributes,s}var i=t.md;if(i===null){i=fl({signatureOid:t.signatureOid,type:"certificate"});var o=t.tbsCertificate||F.getTBSCertificate(t),c=h.toDer(o);i.update(c.getBytes())}return i!==null&&(a=I0({certificate:e,md:i,signature:t.signature})),a},e.isIssuer=function(t){var a=!1,r=e.issuer,n=t.subject;if(r.hash&&n.hash)a=r.hash===n.hash;else if(r.attributes.length===n.attributes.length){a=!0;for(var s,i,o=0;a&&o<r.attributes.length;++o)s=r.attributes[o],i=n.attributes[o],(s.type!==i.type||s.value!==i.value)&&(a=!1)}return a},e.issued=function(t){return t.isIssuer(e)},e.generateSubjectKeyIdentifier=function(){return F.getPublicKeyFingerprint(e.publicKey,{type:"RSAPublicKey"})},e.verifySubjectKeyIdentifier=function(){for(var t=ge.subjectKeyIdentifier,a=0;a<e.extensions.length;++a){var r=e.extensions[a];if(r.id===t){var n=e.generateSubjectKeyIdentifier().getBytes();return Q.util.hexToBytes(r.subjectKeyIdentifier)===n}}return!1},e},F.certificateFromAsn1=function(e,t){var a={},r=[];if(!h.validate(e,hC,a,r)){var n=new Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate.");throw n.errors=r,n}var s=h.derToOid(a.publicKeyOid);if(s!==F.oids.rsaEncryption)throw new Error("Cannot read public key. OID is not RSA.");var i=F.createCertificate();i.version=a.certVersion?a.certVersion.charCodeAt(0):0;var o=Q.util.createBuffer(a.certSerialNumber);i.serialNumber=o.toHex(),i.signatureOid=Q.asn1.derToOid(a.certSignatureOid),i.signatureParameters=dl(i.signatureOid,a.certSignatureParams,!0),i.siginfo.algorithmOid=Q.asn1.derToOid(a.certinfoSignatureOid),i.siginfo.parameters=dl(i.siginfo.algorithmOid,a.certinfoSignatureParams,!1),i.signature=a.certSignature;var c=[];if(a.certValidity1UTCTime!==void 0&&c.push(h.utcTimeToDate(a.certValidity1UTCTime)),a.certValidity2GeneralizedTime!==void 0&&c.push(h.generalizedTimeToDate(a.certValidity2GeneralizedTime)),a.certValidity3UTCTime!==void 0&&c.push(h.utcTimeToDate(a.certValidity3UTCTime)),a.certValidity4GeneralizedTime!==void 0&&c.push(h.generalizedTimeToDate(a.certValidity4GeneralizedTime)),c.length>2)throw new Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(c.length<2)throw new Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");if(i.validity.notBefore=c[0],i.validity.notAfter=c[1],i.tbsCertificate=a.tbsCertificate,t){i.md=fl({signatureOid:i.signatureOid,type:"certificate"});var l=h.toDer(i.tbsCertificate);i.md.update(l.getBytes())}var u=Q.md.sha1.create(),p=h.toDer(a.certIssuer);u.update(p.getBytes()),i.issuer.getField=function(m){return lr(i.issuer,m)},i.issuer.addField=function(m){Ut([m]),i.issuer.attributes.push(m)},i.issuer.attributes=F.RDNAttributesAsArray(a.certIssuer),a.certIssuerUniqueId&&(i.issuer.uniqueId=a.certIssuerUniqueId),i.issuer.hash=u.digest().toHex();var d=Q.md.sha1.create(),x=h.toDer(a.certSubject);return d.update(x.getBytes()),i.subject.getField=function(m){return lr(i.subject,m)},i.subject.addField=function(m){Ut([m]),i.subject.attributes.push(m)},i.subject.attributes=F.RDNAttributesAsArray(a.certSubject),a.certSubjectUniqueId&&(i.subject.uniqueId=a.certSubjectUniqueId),i.subject.hash=d.digest().toHex(),a.certExtensions?i.extensions=F.certificateExtensionsFromAsn1(a.certExtensions):i.extensions=[],i.publicKey=F.publicKeyFromAsn1(a.subjectPublicKeyInfo),i},F.certificateExtensionsFromAsn1=function(e){for(var t=[],a=0;a<e.value.length;++a)for(var r=e.value[a],n=0;n<r.value.length;++n)t.push(F.certificateExtensionFromAsn1(r.value[n]));return t},F.certificateExtensionFromAsn1=function(e){var t={};if(t.id=h.derToOid(e.value[0].value),t.critical=!1,e.value[1].type===h.Type.BOOLEAN?(t.critical=e.value[1].value.charCodeAt(0)!==0,t.value=e.value[2].value):t.value=e.value[1].value,t.id in ge){if(t.name=ge[t.id],t.name==="keyUsage"){var a=h.fromDer(t.value),r=0,n=0;a.value.length>1&&(r=a.value.charCodeAt(1),n=a.value.length>2?a.value.charCodeAt(2):0),t.digitalSignature=(r&128)===128,t.nonRepudiation=(r&64)===64,t.keyEncipherment=(r&32)===32,t.dataEncipherment=(r&16)===16,t.keyAgreement=(r&8)===8,t.keyCertSign=(r&4)===4,t.cRLSign=(r&2)===2,t.encipherOnly=(r&1)===1,t.decipherOnly=(n&128)===128}else if(t.name==="basicConstraints"){var a=h.fromDer(t.value);a.value.length>0&&a.value[0].type===h.Type.BOOLEAN?t.cA=a.value[0].value.charCodeAt(0)!==0:t.cA=!1;var s=null;a.value.length>0&&a.value[0].type===h.Type.INTEGER?s=a.value[0].value:a.value.length>1&&(s=a.value[1].value),s!==null&&(t.pathLenConstraint=h.derToInteger(s))}else if(t.name==="extKeyUsage")for(var a=h.fromDer(t.value),i=0;i<a.value.length;++i){var o=h.derToOid(a.value[i].value);o in ge?t[ge[o]]=!0:t[o]=!0}else if(t.name==="nsCertType"){var a=h.fromDer(t.value),r=0;a.value.length>1&&(r=a.value.charCodeAt(1)),t.client=(r&128)===128,t.server=(r&64)===64,t.email=(r&32)===32,t.objsign=(r&16)===16,t.reserved=(r&8)===8,t.sslCA=(r&4)===4,t.emailCA=(r&2)===2,t.objCA=(r&1)===1}else if(t.name==="subjectAltName"||t.name==="issuerAltName"){t.altNames=[];for(var c,a=h.fromDer(t.value),l=0;l<a.value.length;++l){c=a.value[l];var u={type:c.type,value:c.value};switch(t.altNames.push(u),c.type){case 1:case 2:case 6:break;case 7:u.ip=Q.util.bytesToIP(c.value);break;case 8:u.oid=h.derToOid(c.value);break}}}else if(t.name==="subjectKeyIdentifier"){var a=h.fromDer(t.value);t.subjectKeyIdentifier=Q.util.bytesToHex(a.value)}}return t},F.certificationRequestFromAsn1=function(e,t){var a={},r=[];if(!h.validate(e,xC,a,r)){var n=new Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest.");throw n.errors=r,n}var s=h.derToOid(a.publicKeyOid);if(s!==F.oids.rsaEncryption)throw new Error("Cannot read public key. OID is not RSA.");var i=F.createCertificationRequest();if(i.version=a.csrVersion?a.csrVersion.charCodeAt(0):0,i.signatureOid=Q.asn1.derToOid(a.csrSignatureOid),i.signatureParameters=dl(i.signatureOid,a.csrSignatureParams,!0),i.siginfo.algorithmOid=Q.asn1.derToOid(a.csrSignatureOid),i.siginfo.parameters=dl(i.siginfo.algorithmOid,a.csrSignatureParams,!1),i.signature=a.csrSignature,i.certificationRequestInfo=a.certificationRequestInfo,t){i.md=fl({signatureOid:i.signatureOid,type:"certification request"});var o=h.toDer(i.certificationRequestInfo);i.md.update(o.getBytes())}var c=Q.md.sha1.create();return i.subject.getField=function(l){return lr(i.subject,l)},i.subject.addField=function(l){Ut([l]),i.subject.attributes.push(l)},i.subject.attributes=F.RDNAttributesAsArray(a.certificationRequestInfoSubject,c),i.subject.hash=c.digest().toHex(),i.publicKey=F.publicKeyFromAsn1(a.subjectPublicKeyInfo),i.getAttribute=function(l){return lr(i,l)},i.addAttribute=function(l){Ut([l]),i.attributes.push(l)},i.attributes=F.CRIAttributesAsArray(a.certificationRequestInfoAttributes||[]),i},F.createCertificationRequest=function(){var e={};return e.version=0,e.signatureOid=null,e.signature=null,e.siginfo={},e.siginfo.algorithmOid=null,e.subject={},e.subject.getField=function(t){return lr(e.subject,t)},e.subject.addField=function(t){Ut([t]),e.subject.attributes.push(t)},e.subject.attributes=[],e.subject.hash=null,e.publicKey=null,e.attributes=[],e.getAttribute=function(t){return lr(e,t)},e.addAttribute=function(t){Ut([t]),e.attributes.push(t)},e.md=null,e.setSubject=function(t){Ut(t),e.subject.attributes=t,e.subject.hash=null},e.setAttributes=function(t){Ut(t),e.attributes=t},e.sign=function(t,a){e.md=a||Q.md.sha1.create();var r=ge[e.md.algorithm+"WithRSAEncryption"];if(!r){var n=new Error("Could not compute certification request digest. Unknown message digest algorithm OID.");throw n.algorithm=e.md.algorithm,n}e.signatureOid=e.siginfo.algorithmOid=r,e.certificationRequestInfo=F.getCertificationRequestInfo(e);var s=h.toDer(e.certificationRequestInfo);e.md.update(s.getBytes()),e.signature=t.sign(e.md)},e.verify=function(){var t=!1,a=e.md;if(a===null){a=fl({signatureOid:e.signatureOid,type:"certification request"});var r=e.certificationRequestInfo||F.getCertificationRequestInfo(e),n=h.toDer(r);a.update(n.getBytes())}return a!==null&&(t=I0({certificate:e,md:a,signature:e.signature})),t},e};function Yr(e){for(var t=h.create(h.Class.UNIVERSAL,h.Type.SEQUENCE,!0,[]),a,r,n=e.attributes,s=0;s<n.length;++s){a=n[s];var i=a.value,o=h.Type.PRINTABLESTRING;"valueTagClass"in a&&(o=a.valueTagClass,o===h.Type.UTF8&&(i=Q.util.encodeUtf8(i))),r=h.create(h.Class.UNIVERSAL,h.Type.SET,!0,[h.create(h.Class.UNIVERSAL,h.Type.SEQUENCE,!0,[h.create(h.Class.UNIVERSAL,h.Type.OID,!1,h.oidToDer(a.type).getBytes()),h.create(h.Class.UNIVERSAL,o,!1,i)])]),t.value.push(r)}return t}function Ut(e){for(var t,a=0;a<e.length;++a){if(t=e[a],typeof t.name>"u"&&(t.type&&t.type in F.oids?t.name=F.oids[t.type]:t.shortName&&t.shortName in Me&&(t.name=F.oids[Me[t.shortName]])),typeof t.type>"u")if(t.name&&t.name in F.oids)t.type=F.oids[t.name];else{var r=new Error("Attribute type not specified.");throw r.attribute=t,r}if(typeof t.shortName>"u"&&t.name&&t.name in Me&&(t.shortName=Me[t.name]),t.type===ge.extensionRequest&&(t.valueConstructed=!0,t.valueTagClass=h.Type.SEQUENCE,!t.value&&t.extensions)){t.value=[];for(var n=0;n<t.extensions.length;++n)t.value.push(F.certificateExtensionToAsn1(B0(t.extensions[n])))}if(typeof t.value>"u"){var r=new Error("Attribute value not specified.");throw r.attribute=t,r}}}function B0(e,t){if(t=t||{},typeof e.name>"u"&&e.id&&e.id in F.oids&&(e.name=F.oids[e.id]),typeof e.id>"u")if(e.name&&e.name in F.oids)e.id=F.oids[e.name];else{var a=new Error("Extension ID not specified.");throw a.extension=e,a}if(typeof e.value<"u")return e;if(e.name==="keyUsage"){var r=0,n=0,s=0;e.digitalSignature&&(n|=128,r=7),e.nonRepudiation&&(n|=64,r=6),e.keyEncipherment&&(n|=32,r=5),e.dataEncipherment&&(n|=16,r=4),e.keyAgreement&&(n|=8,r=3),e.keyCertSign&&(n|=4,r=2),e.cRLSign&&(n|=2,r=1),e.encipherOnly&&(n|=1,r=0),e.decipherOnly&&(s|=128,r=7);var i=String.fromCharCode(r);s!==0?i+=String.fromCharCode(n)+String.fromCharCode(s):n!==0&&(i+=String.fromCharCode(n)),e.value=h.create(h.Class.UNIVERSAL,h.Type.BITSTRING,!1,i)}else if(e.name==="basicConstraints")e.value=h.create(h.Class.UNIVERSAL,h.Type.SEQUENCE,!0,[]),e.cA&&e.value.value.push(h.create(h.Class.UNIVERSAL,h.Type.BOOLEAN,!1,"\xFF")),"pathLenConstraint"in e&&e.value.value.push(h.create(h.Class.UNIVERSAL,h.Type.INTEGER,!1,h.integerToDer(e.pathLenConstraint).getBytes()));else if(e.name==="extKeyUsage"){e.value=h.create(h.Class.UNIVERSAL,h.Type.SEQUENCE,!0,[]);var o=e.value.value;for(var c in e)e[c]===!0&&(c in ge?o.push(h.create(h.Class.UNIVERSAL,h.Type.OID,!1,h.oidToDer(ge[c]).getBytes())):c.indexOf(".")!==-1&&o.push(h.create(h.Class.UNIVERSAL,h.Type.OID,!1,h.oidToDer(c).getBytes())))}else if(e.name==="nsCertType"){var r=0,n=0;e.client&&(n|=128,r=7),e.server&&(n|=64,r=6),e.email&&(n|=32,r=5),e.objsign&&(n|=16,r=4),e.reserved&&(n|=8,r=3),e.sslCA&&(n|=4,r=2),e.emailCA&&(n|=2,r=1),e.objCA&&(n|=1,r=0);var i=String.fromCharCode(r);n!==0&&(i+=String.fromCharCode(n)),e.value=h.create(h.Class.UNIVERSAL,h.Type.BITSTRING,!1,i)}else if(e.name==="subjectAltName"||e.name==="issuerAltName"){e.value=h.create(h.Class.UNIVERSAL,h.Type.SEQUENCE,!0,[]);for(var l,u=0;u<e.altNames.length;++u){l=e.altNames[u];var i=l.value;if(l.type===7&&l.ip){if(i=Q.util.bytesFromIP(l.ip),i===null){var a=new Error('Extension "ip" value is not a valid IPv4 or IPv6 address.');throw a.extension=e,a}}else l.type===8&&(l.oid?i=h.oidToDer(h.oidToDer(l.oid)):i=h.oidToDer(i));e.value.value.push(h.create(h.Class.CONTEXT_SPECIFIC,l.type,!1,i))}}else if(e.name==="nsComment"&&t.cert){if(!/^[\x00-\x7F]*$/.test(e.comment)||e.comment.length<1||e.comment.length>128)throw new Error('Invalid "nsComment" content.');e.value=h.create(h.Class.UNIVERSAL,h.Type.IA5STRING,!1,e.comment)}else if(e.name==="subjectKeyIdentifier"&&t.cert){var p=t.cert.generateSubjectKeyIdentifier();e.subjectKeyIdentifier=p.toHex(),e.value=h.create(h.Class.UNIVERSAL,h.Type.OCTETSTRING,!1,p.getBytes())}else if(e.name==="authorityKeyIdentifier"&&t.cert){e.value=h.create(h.Class.UNIVERSAL,h.Type.SEQUENCE,!0,[]);var o=e.value.value;if(e.keyIdentifier){var d=e.keyIdentifier===!0?t.cert.generateSubjectKeyIdentifier().getBytes():e.keyIdentifier;o.push(h.create(h.Class.CONTEXT_SPECIFIC,0,!1,d))}if(e.authorityCertIssuer){var x=[h.create(h.Class.CONTEXT_SPECIFIC,4,!0,[Yr(e.authorityCertIssuer===!0?t.cert.issuer:e.authorityCertIssuer)])];o.push(h.create(h.Class.CONTEXT_SPECIFIC,1,!0,x))}if(e.serialNumber){var m=Q.util.hexToBytes(e.serialNumber===!0?t.cert.serialNumber:e.serialNumber);o.push(h.create(h.Class.CONTEXT_SPECIFIC,2,!1,m))}}else if(e.name==="cRLDistributionPoints"){e.value=h.create(h.Class.UNIVERSAL,h.Type.SEQUENCE,!0,[]);for(var o=e.value.value,y=h.create(h.Class.UNIVERSAL,h.Type.SEQUENCE,!0,[]),b=h.create(h.Class.CONTEXT_SPECIFIC,0,!0,[]),l,u=0;u<e.altNames.length;++u){l=e.altNames[u];var i=l.value;if(l.type===7&&l.ip){if(i=Q.util.bytesFromIP(l.ip),i===null){var a=new Error('Extension "ip" value is not a valid IPv4 or IPv6 address.');throw a.extension=e,a}}else l.type===8&&(l.oid?i=h.oidToDer(h.oidToDer(l.oid)):i=h.oidToDer(i));b.value.push(h.create(h.Class.CONTEXT_SPECIFIC,l.type,!1,i))}y.value.push(h.create(h.Class.CONTEXT_SPECIFIC,0,!0,[b])),o.push(y)}if(typeof e.value>"u"){var a=new Error("Extension value not specified.");throw a.extension=e,a}return e}function Yu(e,t){switch(e){case ge["RSASSA-PSS"]:var a=[];return t.hash.algorithmOid!==void 0&&a.push(h.create(h.Class.CONTEXT_SPECIFIC,0,!0,[h.create(h.Class.UNIVERSAL,h.Type.SEQUENCE,!0,[h.create(h.Class.UNIVERSAL,h.Type.OID,!1,h.oidToDer(t.hash.algorithmOid).getBytes()),h.create(h.Class.UNIVERSAL,h.Type.NULL,!1,"")])])),t.mgf.algorithmOid!==void 0&&a.push(h.create(h.Class.CONTEXT_SPECIFIC,1,!0,[h.create(h.Class.UNIVERSAL,h.Type.SEQUENCE,!0,[h.create(h.Class.UNIVERSAL,h.Type.OID,!1,h.oidToDer(t.mgf.algorithmOid).getBytes()),h.create(h.Class.UNIVERSAL,h.Type.SEQUENCE,!0,[h.create(h.Class.UNIVERSAL,h.Type.OID,!1,h.oidToDer(t.mgf.hash.algorithmOid).getBytes()),h.create(h.Class.UNIVERSAL,h.Type.NULL,!1,"")])])])),t.saltLength!==void 0&&a.push(h.create(h.Class.CONTEXT_SPECIFIC,2,!0,[h.create(h.Class.UNIVERSAL,h.Type.INTEGER,!1,h.integerToDer(t.saltLength).getBytes())])),h.create(h.Class.UNIVERSAL,h.Type.SEQUENCE,!0,a);default:return h.create(h.Class.UNIVERSAL,h.Type.NULL,!1,"")}}function yC(e){var t=h.create(h.Class.CONTEXT_SPECIFIC,0,!0,[]);if(e.attributes.length===0)return t;for(var a=e.attributes,r=0;r<a.length;++r){var n=a[r],s=n.value,i=h.Type.UTF8;"valueTagClass"in n&&(i=n.valueTagClass),i===h.Type.UTF8&&(s=Q.util.encodeUtf8(s));var o=!1;"valueConstructed"in n&&(o=n.valueConstructed);var c=h.create(h.Class.UNIVERSAL,h.Type.SEQUENCE,!0,[h.create(h.Class.UNIVERSAL,h.Type.OID,!1,h.oidToDer(n.type).getBytes()),h.create(h.Class.UNIVERSAL,h.Type.SET,!0,[h.create(h.Class.UNIVERSAL,i,o,s)])]);t.value.push(c)}return t}var bC=new Date("1950-01-01T00:00:00Z"),EC=new Date("2050-01-01T00:00:00Z");function _0(e){return e>=bC&&e<EC?h.create(h.Class.UNIVERSAL,h.Type.UTCTIME,!1,h.dateToUtcTime(e)):h.create(h.Class.UNIVERSAL,h.Type.GENERALIZEDTIME,!1,h.dateToGeneralizedTime(e))}F.getTBSCertificate=function(e){var t=_0(e.validity.notBefore),a=_0(e.validity.notAfter),r=h.create(h.Class.UNIVERSAL,h.Type.SEQUENCE,!0,[h.create(h.Class.CONTEXT_SPECIFIC,0,!0,[h.create(h.Class.UNIVERSAL,h.Type.INTEGER,!1,h.integerToDer(e.version).getBytes())]),h.create(h.Class.UNIVERSAL,h.Type.INTEGER,!1,Q.util.hexToBytes(e.serialNumber)),h.create(h.Class.UNIVERSAL,h.Type.SEQUENCE,!0,[h.create(h.Class.UNIVERSAL,h.Type.OID,!1,h.oidToDer(e.siginfo.algorithmOid).getBytes()),Yu(e.siginfo.algorithmOid,e.siginfo.parameters)]),Yr(e.issuer),h.create(h.Class.UNIVERSAL,h.Type.SEQUENCE,!0,[t,a]),Yr(e.subject),F.publicKeyToAsn1(e.publicKey)]);return e.issuer.uniqueId&&r.value.push(h.create(h.Class.CONTEXT_SPECIFIC,1,!0,[h.create(h.Class.UNIVERSAL,h.Type.BITSTRING,!1,"\0"+e.issuer.uniqueId)])),e.subject.uniqueId&&r.value.push(h.create(h.Class.CONTEXT_SPECIFIC,2,!0,[h.create(h.Class.UNIVERSAL,h.Type.BITSTRING,!1,"\0"+e.subject.uniqueId)])),e.extensions.length>0&&r.value.push(F.certificateExtensionsToAsn1(e.extensions)),r},F.getCertificationRequestInfo=function(e){var t=h.create(h.Class.UNIVERSAL,h.Type.SEQUENCE,!0,[h.create(h.Class.UNIVERSAL,h.Type.INTEGER,!1,h.integerToDer(e.version).getBytes()),Yr(e.subject),F.publicKeyToAsn1(e.publicKey),yC(e)]);return t},F.distinguishedNameToAsn1=function(e){return Yr(e)},F.certificateToAsn1=function(e){var t=e.tbsCertificate||F.getTBSCertificate(e);return h.create(h.Class.UNIVERSAL,h.Type.SEQUENCE,!0,[t,h.create(h.Class.UNIVERSAL,h.Type.SEQUENCE,!0,[h.create(h.Class.UNIVERSAL,h.Type.OID,!1,h.oidToDer(e.signatureOid).getBytes()),Yu(e.signatureOid,e.signatureParameters)]),h.create(h.Class.UNIVERSAL,h.Type.BITSTRING,!1,"\0"+e.signature)])},F.certificateExtensionsToAsn1=function(e){var t=h.create(h.Class.CONTEXT_SPECIFIC,3,!0,[]),a=h.create(h.Class.UNIVERSAL,h.Type.SEQUENCE,!0,[]);t.value.push(a);for(var r=0;r<e.length;++r)a.value.push(F.certificateExtensionToAsn1(e[r]));return t},F.certificateExtensionToAsn1=function(e){var t=h.create(h.Class.UNIVERSAL,h.Type.SEQUENCE,!0,[]);t.value.push(h.create(h.Class.UNIVERSAL,h.Type.OID,!1,h.oidToDer(e.id).getBytes())),e.critical&&t.value.push(h.create(h.Class.UNIVERSAL,h.Type.BOOLEAN,!1,"\xFF"));var a=e.value;return typeof e.value!="string"&&(a=h.toDer(a).getBytes()),t.value.push(h.create(h.Class.UNIVERSAL,h.Type.OCTETSTRING,!1,a)),t},F.certificationRequestToAsn1=function(e){var t=e.certificationRequestInfo||F.getCertificationRequestInfo(e);return h.create(h.Class.UNIVERSAL,h.Type.SEQUENCE,!0,[t,h.create(h.Class.UNIVERSAL,h.Type.SEQUENCE,!0,[h.create(h.Class.UNIVERSAL,h.Type.OID,!1,h.oidToDer(e.signatureOid).getBytes()),Yu(e.signatureOid,e.signatureParameters)]),h.create(h.Class.UNIVERSAL,h.Type.BITSTRING,!1,"\0"+e.signature)])},F.createCaStore=function(e){var t={certs:{}};t.getIssuer=function(i){var o=a(i.issuer);return o},t.addCertificate=function(i){if(typeof i=="string"&&(i=Q.pki.certificateFromPem(i)),r(i.subject),!t.hasCertificate(i))if(i.subject.hash in t.certs){var o=t.certs[i.subject.hash];Q.util.isArray(o)||(o=[o]),o.push(i),t.certs[i.subject.hash]=o}else t.certs[i.subject.hash]=i},t.hasCertificate=function(i){typeof i=="string"&&(i=Q.pki.certificateFromPem(i));var o=a(i.subject);if(!o)return!1;Q.util.isArray(o)||(o=[o]);for(var c=h.toDer(F.certificateToAsn1(i)).getBytes(),l=0;l<o.length;++l){var u=h.toDer(F.certificateToAsn1(o[l])).getBytes();if(c===u)return!0}return!1},t.listAllCertificates=function(){var i=[];for(var o in t.certs)if(t.certs.hasOwnProperty(o)){var c=t.certs[o];if(!Q.util.isArray(c))i.push(c);else for(var l=0;l<c.length;++l)i.push(c[l])}return i},t.removeCertificate=function(i){var o;if(typeof i=="string"&&(i=Q.pki.certificateFromPem(i)),r(i.subject),!t.hasCertificate(i))return null;var c=a(i.subject);if(!Q.util.isArray(c))return o=t.certs[i.subject.hash],delete t.certs[i.subject.hash],o;for(var l=h.toDer(F.certificateToAsn1(i)).getBytes(),u=0;u<c.length;++u){var p=h.toDer(F.certificateToAsn1(c[u])).getBytes();l===p&&(o=c[u],c.splice(u,1))}return c.length===0&&delete t.certs[i.subject.hash],o};function a(i){return r(i),t.certs[i.hash]||null}function r(i){if(!i.hash){var o=Q.md.sha1.create();i.attributes=F.RDNAttributesAsArray(Yr(i),o),i.hash=o.digest().toHex()}}if(e)for(var n=0;n<e.length;++n){var s=e[n];t.addCertificate(s)}return t},F.certificateError={bad_certificate:"forge.pki.BadCertificate",unsupported_certificate:"forge.pki.UnsupportedCertificate",certificate_revoked:"forge.pki.CertificateRevoked",certificate_expired:"forge.pki.CertificateExpired",certificate_unknown:"forge.pki.CertificateUnknown",unknown_ca:"forge.pki.UnknownCertificateAuthority"},F.verifyCertificateChain=function(e,t,a){typeof a=="function"&&(a={verify:a}),a=a||{},t=t.slice(0);var r=t.slice(0),n=a.validityCheckDate;typeof n>"u"&&(n=new Date);var s=!0,i=null,o=0;do{var c=t.shift(),l=null,u=!1;if(n&&(n<c.validity.notBefore||n>c.validity.notAfter)&&(i={message:"Certificate is not valid yet or has expired.",error:F.certificateError.certificate_expired,notBefore:c.validity.notBefore,notAfter:c.validity.notAfter,now:n}),i===null){if(l=t[0]||e.getIssuer(c),l===null&&c.isIssuer(c)&&(u=!0,l=c),l){var p=l;Q.util.isArray(p)||(p=[p]);for(var d=!1;!d&&p.length>0;){l=p.shift();try{d=l.verify(c)}catch{}}d||(i={message:"Certificate signature is invalid.",error:F.certificateError.bad_certificate})}i===null&&(!l||u)&&!e.hasCertificate(c)&&(i={message:"Certificate is not trusted.",error:F.certificateError.unknown_ca})}if(i===null&&l&&!c.isIssuer(l)&&(i={message:"Certificate issuer is invalid.",error:F.certificateError.bad_certificate}),i===null)for(var x={keyUsage:!0,basicConstraints:!0},m=0;i===null&&m<c.extensions.length;++m){var y=c.extensions[m];y.critical&&!(y.name in x)&&(i={message:"Certificate has an unsupported critical extension.",error:F.certificateError.unsupported_certificate})}if(i===null&&(!s||t.length===0&&(!l||u))){var b=c.getExtension("basicConstraints"),C=c.getExtension("keyUsage");if(C!==null&&(!C.keyCertSign||b===null)&&(i={message:"Certificate keyUsage or basicConstraints conflict or indicate that the certificate is not a CA. If the certificate is the only one in the chain or isn't the first then the certificate must be a valid CA.",error:F.certificateError.bad_certificate}),i===null&&b===null&&(i={message:"Certificate is missing basicConstraints extension and cannot be used as a CA.",error:F.certificateError.bad_certificate}),i===null&&b!==null&&!b.cA&&(i={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:F.certificateError.bad_certificate}),i===null&&C!==null&&"pathLenConstraint"in b){var B=o-1;B>b.pathLenConstraint&&(i={message:"Certificate basicConstraints pathLenConstraint violated.",error:F.certificateError.bad_certificate})}}var _=i===null?!0:i.error,k=a.verify?a.verify(_,o,r):_;if(k===!0)i=null;else throw _===!0&&(i={message:"The application rejected the certificate.",error:F.certificateError.bad_certificate}),(k||k===0)&&(typeof k=="object"&&!Q.util.isArray(k)?(k.message&&(i.message=k.message),k.error&&(i.error=k.error)):typeof k=="string"&&(i.error=k)),i;s=!1,++o}while(t.length>0);return!0};var Be=ae,S=Be.asn1,le=Be.pki,hc=Be.pkcs12=Be.pkcs12||{},R0={name:"ContentInfo",tagClass:S.Class.UNIVERSAL,type:S.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:S.Class.UNIVERSAL,type:S.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:S.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},CC={name:"PFX",tagClass:S.Class.UNIVERSAL,type:S.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:S.Class.UNIVERSAL,type:S.Type.INTEGER,constructed:!1,capture:"version"},R0,{name:"PFX.macData",tagClass:S.Class.UNIVERSAL,type:S.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:S.Class.UNIVERSAL,type:S.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:S.Class.UNIVERSAL,type:S.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:S.Class.UNIVERSAL,type:S.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",optional:!0,tagClass:S.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:S.Class.UNIVERSAL,type:S.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:S.Class.UNIVERSAL,type:S.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:S.Class.UNIVERSAL,type:S.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},SC={name:"SafeBag",tagClass:S.Class.UNIVERSAL,type:S.Type.SEQUENCE,constructed:!0,value:[{name:"SafeBag.bagId",tagClass:S.Class.UNIVERSAL,type:S.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:S.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:S.Class.UNIVERSAL,type:S.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},TC={name:"Attribute",tagClass:S.Class.UNIVERSAL,type:S.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:S.Class.UNIVERSAL,type:S.Type.OID,constructed:!1,capture:"oid"},{name:"Attribute.attrValues",tagClass:S.Class.UNIVERSAL,type:S.Type.SET,constructed:!0,capture:"values"}]},wC={name:"CertBag",tagClass:S.Class.UNIVERSAL,type:S.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:S.Class.UNIVERSAL,type:S.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:S.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:S.Class.UNIVERSAL,type:S.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};function vc(e,t,a,r){for(var n=[],s=0;s<e.length;s++)for(var i=0;i<e[s].safeBags.length;i++){var o=e[s].safeBags[i];if(!(r!==void 0&&o.type!==r)){if(t===null){n.push(o);continue}o.attributes[t]!==void 0&&o.attributes[t].indexOf(a)>=0&&n.push(o)}}return n}hc.pkcs12FromAsn1=function(e,t,a){typeof t=="string"?(a=t,t=!0):t===void 0&&(t=!0);var r={},n=[];if(!S.validate(e,CC,r,n)){var s=new Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX.");throw s.errors=s,s}var i={version:r.version.charCodeAt(0),safeContents:[],getBags:function(b){var C={},B;return"localKeyId"in b?B=b.localKeyId:"localKeyIdHex"in b&&(B=Be.util.hexToBytes(b.localKeyIdHex)),B===void 0&&!("friendlyName"in b)&&"bagType"in b&&(C[b.bagType]=vc(i.safeContents,null,null,b.bagType)),B!==void 0&&(C.localKeyId=vc(i.safeContents,"localKeyId",B,b.bagType)),"friendlyName"in b&&(C.friendlyName=vc(i.safeContents,"friendlyName",b.friendlyName,b.bagType)),C},getBagsByFriendlyName:function(b,C){return vc(i.safeContents,"friendlyName",b,C)},getBagsByLocalKeyId:function(b,C){return vc(i.safeContents,"localKeyId",b,C)}};if(r.version.charCodeAt(0)!==3){var s=new Error("PKCS#12 PFX of version other than 3 not supported.");throw s.version=r.version.charCodeAt(0),s}if(S.derToOid(r.contentType)!==le.oids.data){var s=new Error("Only PKCS#12 PFX in password integrity mode supported.");throw s.oid=S.derToOid(r.contentType),s}var o=r.content.value[0];if(o.tagClass!==S.Class.UNIVERSAL||o.type!==S.Type.OCTETSTRING)throw new Error("PKCS#12 authSafe content data is not an OCTET STRING.");if(o=Ju(o),r.mac){var c=null,l=0,u=S.derToOid(r.macAlgorithm);switch(u){case le.oids.sha1:c=Be.md.sha1.create(),l=20;break;case le.oids.sha256:c=Be.md.sha256.create(),l=32;break;case le.oids.sha384:c=Be.md.sha384.create(),l=48;break;case le.oids.sha512:c=Be.md.sha512.create(),l=64;break;case le.oids.md5:c=Be.md.md5.create(),l=16;break}if(c===null)throw new Error("PKCS#12 uses unsupported MAC algorithm: "+u);var p=new Be.util.ByteBuffer(r.macSalt),d="macIterations"in r?parseInt(Be.util.bytesToHex(r.macIterations),16):1,x=hc.generateKey(a,p,3,d,l,c),m=Be.hmac.create();m.start(c,x),m.update(o.value);var y=m.getMac();if(y.getBytes()!==r.macDigest)throw new Error("PKCS#12 MAC could not be verified. Invalid password?")}else if(Array.isArray(e.value)&&e.value.length>2)throw new Error("Invalid PKCS#12. macData field present but MAC was not validated.");return AC(i,o.value,t,a),i};function Ju(e){if(e.composed||e.constructed){for(var t=Be.util.createBuffer(),a=0;a<e.value.length;++a)t.putBytes(e.value[a].value);e.composed=e.constructed=!1,e.value=t.getBytes()}return e}function AC(e,t,a,r){if(t=S.fromDer(t,a),t.tagClass!==S.Class.UNIVERSAL||t.type!==S.Type.SEQUENCE||t.constructed!==!0)throw new Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");for(var n=0;n<t.value.length;n++){var s=t.value[n],i={},o=[];if(!S.validate(s,R0,i,o)){var c=new Error("Cannot read ContentInfo.");throw c.errors=o,c}var l={encrypted:!1},u=null,p=i.content.value[0];switch(S.derToOid(i.contentType)){case le.oids.data:if(p.tagClass!==S.Class.UNIVERSAL||p.type!==S.Type.OCTETSTRING)throw new Error("PKCS#12 SafeContents Data is not an OCTET STRING.");u=Ju(p).value;break;case le.oids.encryptedData:u=IC(p,r),l.encrypted=!0;break;default:var c=new Error("Unsupported PKCS#12 contentType.");throw c.contentType=S.derToOid(i.contentType),c}l.safeBags=BC(u,a,r),e.safeContents.push(l)}}function IC(e,t){var a={},r=[];if(!S.validate(e,Be.pkcs7.asn1.encryptedDataValidator,a,r)){var n=new Error("Cannot read EncryptedContentInfo.");throw n.errors=r,n}var s=S.derToOid(a.contentType);if(s!==le.oids.data){var n=new Error("PKCS#12 EncryptedContentInfo ContentType is not Data.");throw n.oid=s,n}s=S.derToOid(a.encAlgorithm);var i=le.pbe.getCipher(s,a.encParameter,t),o=Ju(a.encryptedContentAsn1),c=Be.util.createBuffer(o.value);if(i.update(c),!i.finish())throw new Error("Failed to decrypt PKCS#12 SafeContents.");return i.output.getBytes()}function BC(e,t,a){if(!t&&e.length===0)return[];if(e=S.fromDer(e,t),e.tagClass!==S.Class.UNIVERSAL||e.type!==S.Type.SEQUENCE||e.constructed!==!0)throw new Error("PKCS#12 SafeContents expected to be a SEQUENCE OF SafeBag.");for(var r=[],n=0;n<e.value.length;n++){var s=e.value[n],i={},o=[];if(!S.validate(s,SC,i,o)){var c=new Error("Cannot read SafeBag.");throw c.errors=o,c}var l={type:S.derToOid(i.bagId),attributes:_C(i.bagAttributes)};r.push(l);var u,p,d=i.bagValue.value[0];switch(l.type){case le.oids.pkcs8ShroudedKeyBag:if(d=le.decryptPrivateKeyInfo(d,a),d===null)throw new Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case le.oids.keyBag:try{l.key=le.privateKeyFromAsn1(d)}catch{l.key=null,l.asn1=d}continue;case le.oids.certBag:u=wC,p=function(){if(S.derToOid(i.certId)!==le.oids.x509Certificate){var m=new Error("Unsupported certificate type, only X.509 supported.");throw m.oid=S.derToOid(i.certId),m}var y=S.fromDer(i.cert,t);try{l.cert=le.certificateFromAsn1(y,!0)}catch{l.cert=null,l.asn1=y}};break;default:var c=new Error("Unsupported PKCS#12 SafeBag type.");throw c.oid=l.type,c}if(u!==void 0&&!S.validate(d,u,i,o)){var c=new Error("Cannot read PKCS#12 "+u.name);throw c.errors=o,c}p()}return r}function _C(e){var t={};if(e!==void 0)for(var a=0;a<e.length;++a){var r={},n=[];if(!S.validate(e[a],TC,r,n)){var s=new Error("Cannot read PKCS#12 BagAttribute.");throw s.errors=n,s}var i=S.derToOid(r.oid);if(le.oids[i]!==void 0){t[le.oids[i]]=[];for(var o=0;o<r.values.length;++o)t[le.oids[i]].push(r.values[o].value)}}return t}hc.toPkcs12Asn1=function(e,t,a,r){r=r||{},r.saltSize=r.saltSize||8,r.count=r.count||2048,r.algorithm=r.algorithm||r.encAlgorithm||"aes128","useMac"in r||(r.useMac=!0),"localKeyId"in r||(r.localKeyId=null),"generateLocalKeyId"in r||(r.generateLocalKeyId=!0);var n=r.localKeyId,s;if(n!==null)n=Be.util.hexToBytes(n);else if(r.generateLocalKeyId)if(t){var i=Be.util.isArray(t)?t[0]:t;typeof i=="string"&&(i=le.certificateFromPem(i));var o=Be.md.sha1.create();o.update(S.toDer(le.certificateToAsn1(i)).getBytes()),n=o.digest().getBytes()}else n=Be.random.getBytes(20);var c=[];n!==null&&c.push(S.create(S.Class.UNIVERSAL,S.Type.SEQUENCE,!0,[S.create(S.Class.UNIVERSAL,S.Type.OID,!1,S.oidToDer(le.oids.localKeyId).getBytes()),S.create(S.Class.UNIVERSAL,S.Type.SET,!0,[S.create(S.Class.UNIVERSAL,S.Type.OCTETSTRING,!1,n)])])),"friendlyName"in r&&c.push(S.create(S.Class.UNIVERSAL,S.Type.SEQUENCE,!0,[S.create(S.Class.UNIVERSAL,S.Type.OID,!1,S.oidToDer(le.oids.friendlyName).getBytes()),S.create(S.Class.UNIVERSAL,S.Type.SET,!0,[S.create(S.Class.UNIVERSAL,S.Type.BMPSTRING,!1,r.friendlyName)])])),c.length>0&&(s=S.create(S.Class.UNIVERSAL,S.Type.SET,!0,c));var l=[],u=[];t!==null&&(Be.util.isArray(t)?u=t:u=[t]);for(var p=[],d=0;d<u.length;++d){t=u[d],typeof t=="string"&&(t=le.certificateFromPem(t));var x=d===0?s:void 0,m=le.certificateToAsn1(t),y=S.create(S.Class.UNIVERSAL,S.Type.SEQUENCE,!0,[S.create(S.Class.UNIVERSAL,S.Type.OID,!1,S.oidToDer(le.oids.certBag).getBytes()),S.create(S.Class.CONTEXT_SPECIFIC,0,!0,[S.create(S.Class.UNIVERSAL,S.Type.SEQUENCE,!0,[S.create(S.Class.UNIVERSAL,S.Type.OID,!1,S.oidToDer(le.oids.x509Certificate).getBytes()),S.create(S.Class.CONTEXT_SPECIFIC,0,!0,[S.create(S.Class.UNIVERSAL,S.Type.OCTETSTRING,!1,S.toDer(m).getBytes())])])]),x]);p.push(y)}if(p.length>0){var b=S.create(S.Class.UNIVERSAL,S.Type.SEQUENCE,!0,p),C=S.create(S.Class.UNIVERSAL,S.Type.SEQUENCE,!0,[S.create(S.Class.UNIVERSAL,S.Type.OID,!1,S.oidToDer(le.oids.data).getBytes()),S.create(S.Class.CONTEXT_SPECIFIC,0,!0,[S.create(S.Class.UNIVERSAL,S.Type.OCTETSTRING,!1,S.toDer(b).getBytes())])]);l.push(C)}var B=null;if(e!==null){var _=le.wrapRsaPrivateKey(le.privateKeyToAsn1(e));a===null?B=S.create(S.Class.UNIVERSAL,S.Type.SEQUENCE,!0,[S.create(S.Class.UNIVERSAL,S.Type.OID,!1,S.oidToDer(le.oids.keyBag).getBytes()),S.create(S.Class.CONTEXT_SPECIFIC,0,!0,[_]),s]):B=S.create(S.Class.UNIVERSAL,S.Type.SEQUENCE,!0,[S.create(S.Class.UNIVERSAL,S.Type.OID,!1,S.oidToDer(le.oids.pkcs8ShroudedKeyBag).getBytes()),S.create(S.Class.CONTEXT_SPECIFIC,0,!0,[le.encryptPrivateKeyInfo(_,a,r)]),s]);var k=S.create(S.Class.UNIVERSAL,S.Type.SEQUENCE,!0,[B]),N=S.create(S.Class.UNIVERSAL,S.Type.SEQUENCE,!0,[S.create(S.Class.UNIVERSAL,S.Type.OID,!1,S.oidToDer(le.oids.data).getBytes()),S.create(S.Class.CONTEXT_SPECIFIC,0,!0,[S.create(S.Class.UNIVERSAL,S.Type.OCTETSTRING,!1,S.toDer(k).getBytes())])]);l.push(N)}var D=S.create(S.Class.UNIVERSAL,S.Type.SEQUENCE,!0,l),K;if(r.useMac){var o=Be.md.sha1.create(),W=new Be.util.ByteBuffer(Be.random.getBytes(r.saltSize)),X=r.count,e=hc.generateKey(a,W,3,X,20),pe=Be.hmac.create();pe.start(o,e),pe.update(S.toDer(D).getBytes());var me=pe.getMac();K=S.create(S.Class.UNIVERSAL,S.Type.SEQUENCE,!0,[S.create(S.Class.UNIVERSAL,S.Type.SEQUENCE,!0,[S.create(S.Class.UNIVERSAL,S.Type.SEQUENCE,!0,[S.create(S.Class.UNIVERSAL,S.Type.OID,!1,S.oidToDer(le.oids.sha1).getBytes()),S.create(S.Class.UNIVERSAL,S.Type.NULL,!1,"")]),S.create(S.Class.UNIVERSAL,S.Type.OCTETSTRING,!1,me.getBytes())]),S.create(S.Class.UNIVERSAL,S.Type.OCTETSTRING,!1,W.getBytes()),S.create(S.Class.UNIVERSAL,S.Type.INTEGER,!1,S.integerToDer(X).getBytes())])}return S.create(S.Class.UNIVERSAL,S.Type.SEQUENCE,!0,[S.create(S.Class.UNIVERSAL,S.Type.INTEGER,!1,S.integerToDer(3).getBytes()),S.create(S.Class.UNIVERSAL,S.Type.SEQUENCE,!0,[S.create(S.Class.UNIVERSAL,S.Type.OID,!1,S.oidToDer(le.oids.data).getBytes()),S.create(S.Class.CONTEXT_SPECIFIC,0,!0,[S.create(S.Class.UNIVERSAL,S.Type.OCTETSTRING,!1,S.toDer(D).getBytes())])]),K])},hc.generateKey=Be.pbe.generatePkcs12Key;var ur=ae,Zu=ur.asn1,Jr=ur.pki=ur.pki||{};Jr.pemToDer=function(e){var t=ur.pem.decode(e)[0];if(t.procType&&t.procType.type==="ENCRYPTED")throw new Error("Could not convert PEM to DER; PEM is encrypted.");return ur.util.createBuffer(t.body)},Jr.privateKeyFromPem=function(e){var t=ur.pem.decode(e)[0];if(t.type!=="PRIVATE KEY"&&t.type!=="RSA PRIVATE KEY"){var a=new Error('Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".');throw a.headerType=t.type,a}if(t.procType&&t.procType.type==="ENCRYPTED")throw new Error("Could not convert private key from PEM; PEM is encrypted.");var r=Zu.fromDer(t.body);return Jr.privateKeyFromAsn1(r)},Jr.privateKeyToPem=function(e,t){var a={type:"RSA PRIVATE KEY",body:Zu.toDer(Jr.privateKeyToAsn1(e)).getBytes()};return ur.pem.encode(a,{maxline:t})},Jr.privateKeyInfoToPem=function(e,t){var a={type:"PRIVATE KEY",body:Zu.toDer(e).getBytes()};return ur.pem.encode(a,{maxline:t})};var U=ae,ml=function(e,t,a,r){var n=U.util.createBuffer(),s=e.length>>1,i=s+(e.length&1),o=e.substr(0,i),c=e.substr(s,i),l=U.util.createBuffer(),u=U.hmac.create();a=t+a;var p=Math.ceil(r/16),d=Math.ceil(r/20);u.start("MD5",o);var x=U.util.createBuffer();l.putBytes(a);for(var m=0;m<p;++m)u.start(null,null),u.update(l.getBytes()),l.putBuffer(u.digest()),u.start(null,null),u.update(l.bytes()+a),x.putBuffer(u.digest());u.start("SHA1",c);var y=U.util.createBuffer();l.clear(),l.putBytes(a);for(var m=0;m<d;++m)u.start(null,null),u.update(l.getBytes()),l.putBuffer(u.digest()),u.start(null,null),u.update(l.bytes()+a),y.putBuffer(u.digest());return n.putBytes(U.util.xorBytes(x.getBytes(),y.getBytes(),r)),n},RC=function(e,t,a){var r=U.hmac.create();r.start("SHA1",e);var n=U.util.createBuffer();return n.putInt32(t[0]),n.putInt32(t[1]),n.putByte(a.type),n.putByte(a.version.major),n.putByte(a.version.minor),n.putInt16(a.length),n.putBytes(a.fragment.bytes()),r.update(n.getBytes()),r.digest().getBytes()},kC=function(e,t,a){var r=!1;try{var n=e.deflate(t.fragment.getBytes());t.fragment=U.util.createBuffer(n),t.length=n.length,r=!0}catch{}return r},NC=function(e,t,a){var r=!1;try{var n=e.inflate(t.fragment.getBytes());t.fragment=U.util.createBuffer(n),t.length=n.length,r=!0}catch{}return r},Bt=function(e,t){var a=0;switch(t){case 1:a=e.getByte();break;case 2:a=e.getInt16();break;case 3:a=e.getInt24();break;case 4:a=e.getInt32();break}return U.util.createBuffer(e.getBytes(a))},Pt=function(e,t,a){e.putInt(a.length(),t<<3),e.putBuffer(a)},g={};g.Versions={TLS_1_0:{major:3,minor:1},TLS_1_1:{major:3,minor:2},TLS_1_2:{major:3,minor:3}},g.SupportedVersions=[g.Versions.TLS_1_1,g.Versions.TLS_1_0],g.Version=g.SupportedVersions[0],g.MaxFragment=15360,g.ConnectionEnd={server:0,client:1},g.PRFAlgorithm={tls_prf_sha256:0},g.BulkCipherAlgorithm={none:null,rc4:0,des3:1,aes:2},g.CipherType={stream:0,block:1,aead:2},g.MACAlgorithm={none:null,hmac_md5:0,hmac_sha1:1,hmac_sha256:2,hmac_sha384:3,hmac_sha512:4},g.CompressionMethod={none:0,deflate:1},g.ContentType={change_cipher_spec:20,alert:21,handshake:22,application_data:23,heartbeat:24},g.HandshakeType={hello_request:0,client_hello:1,server_hello:2,certificate:11,server_key_exchange:12,certificate_request:13,server_hello_done:14,certificate_verify:15,client_key_exchange:16,finished:20},g.Alert={},g.Alert.Level={warning:1,fatal:2},g.Alert.Description={close_notify:0,unexpected_message:10,bad_record_mac:20,decryption_failed:21,record_overflow:22,decompression_failure:30,handshake_failure:40,bad_certificate:42,unsupported_certificate:43,certificate_revoked:44,certificate_expired:45,certificate_unknown:46,illegal_parameter:47,unknown_ca:48,access_denied:49,decode_error:50,decrypt_error:51,export_restriction:60,protocol_version:70,insufficient_security:71,internal_error:80,user_canceled:90,no_renegotiation:100},g.HeartbeatMessageType={heartbeat_request:1,heartbeat_response:2},g.CipherSuites={},g.getCipherSuite=function(e){var t=null;for(var a in g.CipherSuites){var r=g.CipherSuites[a];if(r.id[0]===e.charCodeAt(0)&&r.id[1]===e.charCodeAt(1)){t=r;break}}return t},g.handleUnexpected=function(e,t){var a=!e.open&&e.entity===g.ConnectionEnd.client;a||e.error(e,{message:"Unexpected message. Received TLS record out of order.",send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.unexpected_message}})},g.handleHelloRequest=function(e,t,a){!e.handshaking&&e.handshakes>0&&(g.queue(e,g.createAlert(e,{level:g.Alert.Level.warning,description:g.Alert.Description.no_renegotiation})),g.flush(e)),e.process()},g.parseHelloMessage=function(e,t,a){var r=null,n=e.entity===g.ConnectionEnd.client;if(a<38)e.error(e,{message:n?"Invalid ServerHello message. Message too short.":"Invalid ClientHello message. Message too short.",send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.illegal_parameter}});else{var s=t.fragment,i=s.length();if(r={version:{major:s.getByte(),minor:s.getByte()},random:U.util.createBuffer(s.getBytes(32)),session_id:Bt(s,1),extensions:[]},n?(r.cipher_suite=s.getBytes(2),r.compression_method=s.getByte()):(r.cipher_suites=Bt(s,2),r.compression_methods=Bt(s,1)),i=a-(i-s.length()),i>0){for(var o=Bt(s,2);o.length()>0;)r.extensions.push({type:[o.getByte(),o.getByte()],data:Bt(o,2)});if(!n)for(var c=0;c<r.extensions.length;++c){var l=r.extensions[c];if(l.type[0]===0&&l.type[1]===0)for(var u=Bt(l.data,2);u.length()>0;){var p=u.getByte();if(p!==0)break;e.session.extensions.server_name.serverNameList.push(Bt(u,2).getBytes())}}}if(e.session.version&&(r.version.major!==e.session.version.major||r.version.minor!==e.session.version.minor))return e.error(e,{message:"TLS version change is disallowed during renegotiation.",send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.protocol_version}});if(n)e.session.cipherSuite=g.getCipherSuite(r.cipher_suite);else for(var d=U.util.createBuffer(r.cipher_suites.bytes());d.length()>0&&(e.session.cipherSuite=g.getCipherSuite(d.getBytes(2)),e.session.cipherSuite===null););if(e.session.cipherSuite===null)return e.error(e,{message:"No cipher suites in common.",send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.handshake_failure},cipherSuite:U.util.bytesToHex(r.cipher_suite)});n?e.session.compressionMethod=r.compression_method:e.session.compressionMethod=g.CompressionMethod.none}return r},g.createSecurityParameters=function(e,t){var a=e.entity===g.ConnectionEnd.client,r=t.random.bytes(),n=a?e.session.sp.client_random:r,s=a?r:g.createRandom().getBytes();e.session.sp={entity:e.entity,prf_algorithm:g.PRFAlgorithm.tls_prf_sha256,bulk_cipher_algorithm:null,cipher_type:null,enc_key_length:null,block_length:null,fixed_iv_length:null,record_iv_length:null,mac_algorithm:null,mac_length:null,mac_key_length:null,compression_algorithm:e.session.compressionMethod,pre_master_secret:null,master_secret:null,client_random:n,server_random:s}},g.handleServerHello=function(e,t,a){var r=g.parseHelloMessage(e,t,a);if(!e.fail){if(r.version.minor<=e.version.minor)e.version.minor=r.version.minor;else return e.error(e,{message:"Incompatible TLS version.",send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.protocol_version}});e.session.version=e.version;var n=r.session_id.bytes();n.length>0&&n===e.session.id?(e.expect=N0,e.session.resuming=!0,e.session.sp.server_random=r.random.bytes()):(e.expect=UC,e.session.resuming=!1,g.createSecurityParameters(e,r)),e.session.id=n,e.process()}},g.handleClientHello=function(e,t,a){var r=g.parseHelloMessage(e,t,a);if(!e.fail){var n=r.session_id.bytes(),s=null;if(e.sessionCache&&(s=e.sessionCache.getSession(n),s===null?n="":(s.version.major!==r.version.major||s.version.minor>r.version.minor)&&(s=null,n="")),n.length===0&&(n=U.random.getBytes(32)),e.session.id=n,e.session.clientHelloVersion=r.version,e.session.sp={},s)e.version=e.session.version=s.version,e.session.sp=s.sp;else{for(var i,o=1;o<g.SupportedVersions.length&&(i=g.SupportedVersions[o],!(i.minor<=r.version.minor));++o);e.version={major:i.major,minor:i.minor},e.session.version=e.version}s!==null?(e.expect=tp,e.session.resuming=!0,e.session.sp.client_random=r.random.bytes()):(e.expect=e.verifyClient!==!1?qC:ep,e.session.resuming=!1,g.createSecurityParameters(e,r)),e.open=!0,g.queue(e,g.createRecord(e,{type:g.ContentType.handshake,data:g.createServerHello(e)})),e.session.resuming?(g.queue(e,g.createRecord(e,{type:g.ContentType.change_cipher_spec,data:g.createChangeCipherSpec()})),e.state.pending=g.createConnectionState(e),e.state.current.write=e.state.pending.write,g.queue(e,g.createRecord(e,{type:g.ContentType.handshake,data:g.createFinished(e)}))):(g.queue(e,g.createRecord(e,{type:g.ContentType.handshake,data:g.createCertificate(e)})),e.fail||(g.queue(e,g.createRecord(e,{type:g.ContentType.handshake,data:g.createServerKeyExchange(e)})),e.verifyClient!==!1&&g.queue(e,g.createRecord(e,{type:g.ContentType.handshake,data:g.createCertificateRequest(e)})),g.queue(e,g.createRecord(e,{type:g.ContentType.handshake,data:g.createServerHelloDone(e)})))),g.flush(e),e.process()}},g.handleCertificate=function(e,t,a){if(a<3)return e.error(e,{message:"Invalid Certificate message. Message too short.",send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.illegal_parameter}});var r=t.fragment,n={certificate_list:Bt(r,3)},s,i,o=[];try{for(;n.certificate_list.length()>0;)s=Bt(n.certificate_list,3),i=U.asn1.fromDer(s),s=U.pki.certificateFromAsn1(i,!0),o.push(s)}catch(l){return e.error(e,{message:"Could not parse certificate list.",cause:l,send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.bad_certificate}})}var c=e.entity===g.ConnectionEnd.client;(c||e.verifyClient===!0)&&o.length===0?e.error(e,{message:c?"No server certificate provided.":"No client certificate provided.",send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.illegal_parameter}}):o.length===0?e.expect=c?k0:ep:(c?e.session.serverCertificate=o[0]:e.session.clientCertificate=o[0],g.verifyCertificateChain(e,o)&&(e.expect=c?k0:ep)),e.process()},g.handleServerKeyExchange=function(e,t,a){if(a>0)return e.error(e,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.unsupported_certificate}});e.expect=PC,e.process()},g.handleClientKeyExchange=function(e,t,a){if(a<48)return e.error(e,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.unsupported_certificate}});var r=t.fragment,n={enc_pre_master_secret:Bt(r,2).getBytes()},s=null;if(e.getPrivateKey)try{s=e.getPrivateKey(e,e.session.serverCertificate),s=U.pki.privateKeyFromPem(s)}catch(c){e.error(e,{message:"Could not get private key.",cause:c,send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.internal_error}})}if(s===null)return e.error(e,{message:"No private key set.",send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.internal_error}});try{var i=e.session.sp;i.pre_master_secret=s.decrypt(n.enc_pre_master_secret);var o=e.session.clientHelloVersion;if(o.major!==i.pre_master_secret.charCodeAt(0)||o.minor!==i.pre_master_secret.charCodeAt(1))throw new Error("TLS version rollback attack detected.")}catch{i.pre_master_secret=U.random.getBytes(48)}e.expect=tp,e.session.clientCertificate!==null&&(e.expect=jC),e.process()},g.handleCertificateRequest=function(e,t,a){if(a<3)return e.error(e,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.illegal_parameter}});var r=t.fragment,n={certificate_types:Bt(r,1),certificate_authorities:Bt(r,2)};e.session.certificateRequest=n,e.expect=DC,e.process()},g.handleCertificateVerify=function(e,t,a){if(a<2)return e.error(e,{message:"Invalid CertificateVerify. Message too short.",send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.illegal_parameter}});var r=t.fragment;r.read-=4;var n=r.bytes();r.read+=4;var s={signature:Bt(r,2).getBytes()},i=U.util.createBuffer();i.putBuffer(e.session.md5.digest()),i.putBuffer(e.session.sha1.digest()),i=i.getBytes();try{var o=e.session.clientCertificate;if(!o.publicKey.verify(i,s.signature,"NONE"))throw new Error("CertificateVerify signature does not match.");e.session.md5.update(n),e.session.sha1.update(n)}catch{return e.error(e,{message:"Bad signature in CertificateVerify.",send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.handshake_failure}})}e.expect=tp,e.process()},g.handleServerHelloDone=function(e,t,a){if(a>0)return e.error(e,{message:"Invalid ServerHelloDone message. Invalid length.",send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.record_overflow}});if(e.serverCertificate===null){var r={message:"No server certificate provided. Not enough security.",send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.insufficient_security}},n=0,s=e.verify(e,r.alert.description,n,[]);if(s!==!0)return(s||s===0)&&(typeof s=="object"&&!U.util.isArray(s)?(s.message&&(r.message=s.message),s.alert&&(r.alert.description=s.alert)):typeof s=="number"&&(r.alert.description=s)),e.error(e,r)}e.session.certificateRequest!==null&&(t=g.createRecord(e,{type:g.ContentType.handshake,data:g.createCertificate(e)}),g.queue(e,t)),t=g.createRecord(e,{type:g.ContentType.handshake,data:g.createClientKeyExchange(e)}),g.queue(e,t),e.expect=MC;var i=function(o,c){o.session.certificateRequest!==null&&o.session.clientCertificate!==null&&g.queue(o,g.createRecord(o,{type:g.ContentType.handshake,data:g.createCertificateVerify(o,c)})),g.queue(o,g.createRecord(o,{type:g.ContentType.change_cipher_spec,data:g.createChangeCipherSpec()})),o.state.pending=g.createConnectionState(o),o.state.current.write=o.state.pending.write,g.queue(o,g.createRecord(o,{type:g.ContentType.handshake,data:g.createFinished(o)})),o.expect=N0,g.flush(o),o.process()};if(e.session.certificateRequest===null||e.session.clientCertificate===null)return i(e,null);g.getClientSignature(e,i)},g.handleChangeCipherSpec=function(e,t){if(t.fragment.getByte()!==1)return e.error(e,{message:"Invalid ChangeCipherSpec message received.",send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.illegal_parameter}});var a=e.entity===g.ConnectionEnd.client;(e.session.resuming&&a||!e.session.resuming&&!a)&&(e.state.pending=g.createConnectionState(e)),e.state.current.read=e.state.pending.read,(!e.session.resuming&&a||e.session.resuming&&!a)&&(e.state.pending=null),e.expect=a?OC:KC,e.process()},g.handleFinished=function(e,t,a){var r=t.fragment;r.read-=4;var n=r.bytes();r.read+=4;var s=t.fragment.getBytes();r=U.util.createBuffer(),r.putBuffer(e.session.md5.digest()),r.putBuffer(e.session.sha1.digest());var i=e.entity===g.ConnectionEnd.client,o=i?"server finished":"client finished",c=e.session.sp,l=12,u=ml;if(r=u(c.master_secret,o,r.getBytes(),l),r.getBytes()!==s)return e.error(e,{message:"Invalid verify_data in Finished message.",send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.decrypt_error}});e.session.md5.update(n),e.session.sha1.update(n),(e.session.resuming&&i||!e.session.resuming&&!i)&&(g.queue(e,g.createRecord(e,{type:g.ContentType.change_cipher_spec,data:g.createChangeCipherSpec()})),e.state.current.write=e.state.pending.write,e.state.pending=null,g.queue(e,g.createRecord(e,{type:g.ContentType.handshake,data:g.createFinished(e)}))),e.expect=i?FC:zC,e.handshaking=!1,++e.handshakes,e.peerCertificate=i?e.session.serverCertificate:e.session.clientCertificate,g.flush(e),e.isConnected=!0,e.connected(e),e.process()},g.handleAlert=function(e,t){var a=t.fragment,r={level:a.getByte(),description:a.getByte()},n;switch(r.description){case g.Alert.Description.close_notify:n="Connection closed.";break;case g.Alert.Description.unexpected_message:n="Unexpected message.";break;case g.Alert.Description.bad_record_mac:n="Bad record MAC.";break;case g.Alert.Description.decryption_failed:n="Decryption failed.";break;case g.Alert.Description.record_overflow:n="Record overflow.";break;case g.Alert.Description.decompression_failure:n="Decompression failed.";break;case g.Alert.Description.handshake_failure:n="Handshake failure.";break;case g.Alert.Description.bad_certificate:n="Bad certificate.";break;case g.Alert.Description.unsupported_certificate:n="Unsupported certificate.";break;case g.Alert.Description.certificate_revoked:n="Certificate revoked.";break;case g.Alert.Description.certificate_expired:n="Certificate expired.";break;case g.Alert.Description.certificate_unknown:n="Certificate unknown.";break;case g.Alert.Description.illegal_parameter:n="Illegal parameter.";break;case g.Alert.Description.unknown_ca:n="Unknown certificate authority.";break;case g.Alert.Description.access_denied:n="Access denied.";break;case g.Alert.Description.decode_error:n="Decode error.";break;case g.Alert.Description.decrypt_error:n="Decrypt error.";break;case g.Alert.Description.export_restriction:n="Export restriction.";break;case g.Alert.Description.protocol_version:n="Unsupported protocol version.";break;case g.Alert.Description.insufficient_security:n="Insufficient security.";break;case g.Alert.Description.internal_error:n="Internal error.";break;case g.Alert.Description.user_canceled:n="User canceled.";break;case g.Alert.Description.no_renegotiation:n="Renegotiation not supported.";break;default:n="Unknown error.";break}if(r.description===g.Alert.Description.close_notify)return e.close();e.error(e,{message:n,send:!1,origin:e.entity===g.ConnectionEnd.client?"server":"client",alert:r}),e.process()},g.handleHandshake=function(e,t){var a=t.fragment,r=a.getByte(),n=a.getInt24();if(n>a.length())return e.fragmented=t,t.fragment=U.util.createBuffer(),a.read-=4,e.process();e.fragmented=null,a.read-=4;var s=a.bytes(n+4);a.read+=4,r in vl[e.entity][e.expect]?(e.entity===g.ConnectionEnd.server&&!e.open&&!e.fail&&(e.handshaking=!0,e.session={version:null,extensions:{server_name:{serverNameList:[]}},cipherSuite:null,compressionMethod:null,serverCertificate:null,clientCertificate:null,md5:U.md.md5.create(),sha1:U.md.sha1.create()}),r!==g.HandshakeType.hello_request&&r!==g.HandshakeType.certificate_verify&&r!==g.HandshakeType.finished&&(e.session.md5.update(s),e.session.sha1.update(s)),vl[e.entity][e.expect][r](e,t,n)):g.handleUnexpected(e,t)},g.handleApplicationData=function(e,t){e.data.putBuffer(t.fragment),e.dataReady(e),e.process()},g.handleHeartbeat=function(e,t){var a=t.fragment,r=a.getByte(),n=a.getInt16(),s=a.getBytes(n);if(r===g.HeartbeatMessageType.heartbeat_request){if(e.handshaking||n>s.length)return e.process();g.queue(e,g.createRecord(e,{type:g.ContentType.heartbeat,data:g.createHeartbeat(g.HeartbeatMessageType.heartbeat_response,s)})),g.flush(e)}else if(r===g.HeartbeatMessageType.heartbeat_response){if(s!==e.expectedHeartbeatPayload)return e.process();e.heartbeatReceived&&e.heartbeatReceived(e,U.util.createBuffer(s))}e.process()};var LC=0,UC=1,k0=2,PC=3,DC=4,N0=5,OC=6,FC=7,MC=8,VC=0,qC=1,ep=2,jC=3,tp=4,KC=5,zC=6,v=g.handleUnexpected,L0=g.handleChangeCipherSpec,Ye=g.handleAlert,dt=g.handleHandshake,U0=g.handleApplicationData,Je=g.handleHeartbeat,rp=[];rp[g.ConnectionEnd.client]=[[v,Ye,dt,v,Je],[v,Ye,dt,v,Je],[v,Ye,dt,v,Je],[v,Ye,dt,v,Je],[v,Ye,dt,v,Je],[L0,Ye,v,v,Je],[v,Ye,dt,v,Je],[v,Ye,dt,U0,Je],[v,Ye,dt,v,Je]],rp[g.ConnectionEnd.server]=[[v,Ye,dt,v,Je],[v,Ye,dt,v,Je],[v,Ye,dt,v,Je],[v,Ye,dt,v,Je],[L0,Ye,v,v,Je],[v,Ye,dt,v,Je],[v,Ye,dt,U0,Je],[v,Ye,dt,v,Je]];var pr=g.handleHelloRequest,HC=g.handleServerHello,P0=g.handleCertificate,D0=g.handleServerKeyExchange,ap=g.handleCertificateRequest,hl=g.handleServerHelloDone,O0=g.handleFinished,vl=[];vl[g.ConnectionEnd.client]=[[v,v,HC,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v],[pr,v,v,v,v,v,v,v,v,v,v,P0,D0,ap,hl,v,v,v,v,v,v],[pr,v,v,v,v,v,v,v,v,v,v,v,D0,ap,hl,v,v,v,v,v,v],[pr,v,v,v,v,v,v,v,v,v,v,v,v,ap,hl,v,v,v,v,v,v],[pr,v,v,v,v,v,v,v,v,v,v,v,v,v,hl,v,v,v,v,v,v],[pr,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v],[pr,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,O0],[pr,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v],[pr,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v]];var $C=g.handleClientHello,GC=g.handleClientKeyExchange,QC=g.handleCertificateVerify;vl[g.ConnectionEnd.server]=[[v,$C,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v],[v,v,v,v,v,v,v,v,v,v,v,P0,v,v,v,v,v,v,v,v,v],[v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,GC,v,v,v,v],[v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,QC,v,v,v,v,v],[v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v],[v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,O0],[v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v],[v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v]],g.generateKeys=function(e,t){var a=ml,r=t.client_random+t.server_random;e.session.resuming||(t.master_secret=a(t.pre_master_secret,"master secret",r,48).bytes(),t.pre_master_secret=null),r=t.server_random+t.client_random;var n=2*t.mac_key_length+2*t.enc_key_length,s=e.version.major===g.Versions.TLS_1_0.major&&e.version.minor===g.Versions.TLS_1_0.minor;s&&(n+=2*t.fixed_iv_length);var i=a(t.master_secret,"key expansion",r,n),o={client_write_MAC_key:i.getBytes(t.mac_key_length),server_write_MAC_key:i.getBytes(t.mac_key_length),client_write_key:i.getBytes(t.enc_key_length),server_write_key:i.getBytes(t.enc_key_length)};return s&&(o.client_write_IV=i.getBytes(t.fixed_iv_length),o.server_write_IV=i.getBytes(t.fixed_iv_length)),o},g.createConnectionState=function(e){var t=e.entity===g.ConnectionEnd.client,a=function(){var s={sequenceNumber:[0,0],macKey:null,macLength:0,macFunction:null,cipherState:null,cipherFunction:function(i){return!0},compressionState:null,compressFunction:function(i){return!0},updateSequenceNumber:function(){s.sequenceNumber[1]===4294967295?(s.sequenceNumber[1]=0,++s.sequenceNumber[0]):++s.sequenceNumber[1]}};return s},r={read:a(),write:a()};if(r.read.update=function(s,i){return r.read.cipherFunction(i,r.read)?r.read.compressFunction(s,i,r.read)||s.error(s,{message:"Could not decompress record.",send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.decompression_failure}}):s.error(s,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.bad_record_mac}}),!s.fail},r.write.update=function(s,i){return r.write.compressFunction(s,i,r.write)?r.write.cipherFunction(i,r.write)||s.error(s,{message:"Could not encrypt record.",send:!1,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.internal_error}}):s.error(s,{message:"Could not compress record.",send:!1,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.internal_error}}),!s.fail},e.session){var n=e.session.sp;switch(e.session.cipherSuite.initSecurityParameters(n),n.keys=g.generateKeys(e,n),r.read.macKey=t?n.keys.server_write_MAC_key:n.keys.client_write_MAC_key,r.write.macKey=t?n.keys.client_write_MAC_key:n.keys.server_write_MAC_key,e.session.cipherSuite.initConnectionState(r,e,n),n.compression_algorithm){case g.CompressionMethod.none:break;case g.CompressionMethod.deflate:r.read.compressFunction=NC,r.write.compressFunction=kC;break;default:throw new Error("Unsupported compression algorithm.")}}return r},g.createRandom=function(){var e=new Date,t=+e+e.getTimezoneOffset()*6e4,a=U.util.createBuffer();return a.putInt32(t),a.putBytes(U.random.getBytes(28)),a},g.createRecord=function(e,t){if(!t.data)return null;var a={type:t.type,version:{major:e.version.major,minor:e.version.minor},length:t.data.length(),fragment:t.data};return a},g.createAlert=function(e,t){var a=U.util.createBuffer();return a.putByte(t.level),a.putByte(t.description),g.createRecord(e,{type:g.ContentType.alert,data:a})},g.createClientHello=function(e){e.session.clientHelloVersion={major:e.version.major,minor:e.version.minor};for(var t=U.util.createBuffer(),a=0;a<e.cipherSuites.length;++a){var r=e.cipherSuites[a];t.putByte(r.id[0]),t.putByte(r.id[1])}var n=t.length(),s=U.util.createBuffer();s.putByte(g.CompressionMethod.none);var i=s.length(),o=U.util.createBuffer();if(e.virtualHost){var c=U.util.createBuffer();c.putByte(0),c.putByte(0);var l=U.util.createBuffer();l.putByte(0),Pt(l,2,U.util.createBuffer(e.virtualHost));var u=U.util.createBuffer();Pt(u,2,l),Pt(c,2,u),o.putBuffer(c)}var p=o.length();p>0&&(p+=2);var d=e.session.id,x=d.length+1+2+4+28+2+n+1+i+p,m=U.util.createBuffer();return m.putByte(g.HandshakeType.client_hello),m.putInt24(x),m.putByte(e.version.major),m.putByte(e.version.minor),m.putBytes(e.session.sp.client_random),Pt(m,1,U.util.createBuffer(d)),Pt(m,2,t),Pt(m,1,s),p>0&&Pt(m,2,o),m},g.createServerHello=function(e){var t=e.session.id,a=t.length+1+2+4+28+2+1,r=U.util.createBuffer();return r.putByte(g.HandshakeType.server_hello),r.putInt24(a),r.putByte(e.version.major),r.putByte(e.version.minor),r.putBytes(e.session.sp.server_random),Pt(r,1,U.util.createBuffer(t)),r.putByte(e.session.cipherSuite.id[0]),r.putByte(e.session.cipherSuite.id[1]),r.putByte(e.session.compressionMethod),r},g.createCertificate=function(e){var t=e.entity===g.ConnectionEnd.client,a=null;if(e.getCertificate){var r;t?r=e.session.certificateRequest:r=e.session.extensions.server_name.serverNameList,a=e.getCertificate(e,r)}var n=U.util.createBuffer();if(a!==null)try{U.util.isArray(a)||(a=[a]);for(var s=null,i=0;i<a.length;++i){var o=U.pem.decode(a[i])[0];if(o.type!=="CERTIFICATE"&&o.type!=="X509 CERTIFICATE"&&o.type!=="TRUSTED CERTIFICATE"){var c=new Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');throw c.headerType=o.type,c}if(o.procType&&o.procType.type==="ENCRYPTED")throw new Error("Could not convert certificate from PEM; PEM is encrypted.");var l=U.util.createBuffer(o.body);s===null&&(s=U.asn1.fromDer(l.bytes(),!1));var u=U.util.createBuffer();Pt(u,3,l),n.putBuffer(u)}a=U.pki.certificateFromAsn1(s),t?e.session.clientCertificate=a:e.session.serverCertificate=a}catch(x){return e.error(e,{message:"Could not send certificate list.",cause:x,send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.bad_certificate}})}var p=3+n.length(),d=U.util.createBuffer();return d.putByte(g.HandshakeType.certificate),d.putInt24(p),Pt(d,3,n),d},g.createClientKeyExchange=function(e){var t=U.util.createBuffer();t.putByte(e.session.clientHelloVersion.major),t.putByte(e.session.clientHelloVersion.minor),t.putBytes(U.random.getBytes(46));var a=e.session.sp;a.pre_master_secret=t.getBytes();var r=e.session.serverCertificate.publicKey;t=r.encrypt(a.pre_master_secret);var n=t.length+2,s=U.util.createBuffer();return s.putByte(g.HandshakeType.client_key_exchange),s.putInt24(n),s.putInt16(t.length),s.putBytes(t),s},g.createServerKeyExchange=function(e){var t=U.util.createBuffer();return t},g.getClientSignature=function(e,t){var a=U.util.createBuffer();a.putBuffer(e.session.md5.digest()),a.putBuffer(e.session.sha1.digest()),a=a.getBytes(),e.getSignature=e.getSignature||function(r,n,s){var i=null;if(r.getPrivateKey)try{i=r.getPrivateKey(r,r.session.clientCertificate),i=U.pki.privateKeyFromPem(i)}catch(o){r.error(r,{message:"Could not get private key.",cause:o,send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.internal_error}})}i===null?r.error(r,{message:"No private key set.",send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.internal_error}}):n=i.sign(n,null),s(r,n)},e.getSignature(e,a,t)},g.createCertificateVerify=function(e,t){var a=t.length+2,r=U.util.createBuffer();return r.putByte(g.HandshakeType.certificate_verify),r.putInt24(a),r.putInt16(t.length),r.putBytes(t),r},g.createCertificateRequest=function(e){var t=U.util.createBuffer();t.putByte(1);var a=U.util.createBuffer();for(var r in e.caStore.certs){var n=e.caStore.certs[r],s=U.pki.distinguishedNameToAsn1(n.subject),i=U.asn1.toDer(s);a.putInt16(i.length()),a.putBuffer(i)}var o=1+t.length()+2+a.length(),c=U.util.createBuffer();return c.putByte(g.HandshakeType.certificate_request),c.putInt24(o),Pt(c,1,t),Pt(c,2,a),c},g.createServerHelloDone=function(e){var t=U.util.createBuffer();return t.putByte(g.HandshakeType.server_hello_done),t.putInt24(0),t},g.createChangeCipherSpec=function(){var e=U.util.createBuffer();return e.putByte(1),e},g.createFinished=function(e){var t=U.util.createBuffer();t.putBuffer(e.session.md5.digest()),t.putBuffer(e.session.sha1.digest());var a=e.entity===g.ConnectionEnd.client,r=e.session.sp,n=12,s=ml,i=a?"client finished":"server finished";t=s(r.master_secret,i,t.getBytes(),n);var o=U.util.createBuffer();return o.putByte(g.HandshakeType.finished),o.putInt24(t.length()),o.putBuffer(t),o},g.createHeartbeat=function(e,t,a){typeof a>"u"&&(a=t.length);var r=U.util.createBuffer();r.putByte(e),r.putInt16(a),r.putBytes(t);var n=r.length(),s=Math.max(16,n-a-3);return r.putBytes(U.random.getBytes(s)),r},g.queue=function(e,t){if(t&&!(t.fragment.length()===0&&(t.type===g.ContentType.handshake||t.type===g.ContentType.alert||t.type===g.ContentType.change_cipher_spec))){if(t.type===g.ContentType.handshake){var a=t.fragment.bytes();e.session.md5.update(a),e.session.sha1.update(a),a=null}var r;if(t.fragment.length()<=g.MaxFragment)r=[t];else{r=[];for(var n=t.fragment.bytes();n.length>g.MaxFragment;)r.push(g.createRecord(e,{type:t.type,data:U.util.createBuffer(n.slice(0,g.MaxFragment))})),n=n.slice(g.MaxFragment);n.length>0&&r.push(g.createRecord(e,{type:t.type,data:U.util.createBuffer(n)}))}for(var s=0;s<r.length&&!e.fail;++s){var i=r[s],o=e.state.current.write;o.update(e,i)&&e.records.push(i)}}},g.flush=function(e){for(var t=0;t<e.records.length;++t){var a=e.records[t];e.tlsData.putByte(a.type),e.tlsData.putByte(a.version.major),e.tlsData.putByte(a.version.minor),e.tlsData.putInt16(a.fragment.length()),e.tlsData.putBuffer(e.records[t].fragment)}return e.records=[],e.tlsDataReady(e)};var np=function(e){switch(e){case!0:return!0;case U.pki.certificateError.bad_certificate:return g.Alert.Description.bad_certificate;case U.pki.certificateError.unsupported_certificate:return g.Alert.Description.unsupported_certificate;case U.pki.certificateError.certificate_revoked:return g.Alert.Description.certificate_revoked;case U.pki.certificateError.certificate_expired:return g.Alert.Description.certificate_expired;case U.pki.certificateError.certificate_unknown:return g.Alert.Description.certificate_unknown;case U.pki.certificateError.unknown_ca:return g.Alert.Description.unknown_ca;default:return g.Alert.Description.bad_certificate}},WC=function(e){switch(e){case!0:return!0;case g.Alert.Description.bad_certificate:return U.pki.certificateError.bad_certificate;case g.Alert.Description.unsupported_certificate:return U.pki.certificateError.unsupported_certificate;case g.Alert.Description.certificate_revoked:return U.pki.certificateError.certificate_revoked;case g.Alert.Description.certificate_expired:return U.pki.certificateError.certificate_expired;case g.Alert.Description.certificate_unknown:return U.pki.certificateError.certificate_unknown;case g.Alert.Description.unknown_ca:return U.pki.certificateError.unknown_ca;default:return U.pki.certificateError.bad_certificate}};g.verifyCertificateChain=function(e,t){try{var a={};for(var r in e.verifyOptions)a[r]=e.verifyOptions[r];a.verify=function(s,i,o){var c=np(s),l=e.verify(e,s,i,o);if(l!==!0){if(typeof l=="object"&&!U.util.isArray(l)){var u=new Error("The application rejected the certificate.");throw u.send=!0,u.alert={level:g.Alert.Level.fatal,description:g.Alert.Description.bad_certificate},l.message&&(u.message=l.message),l.alert&&(u.alert.description=l.alert),u}l!==s&&(l=WC(l))}return l},U.pki.verifyCertificateChain(e.caStore,t,a)}catch(s){var n=s;(typeof n!="object"||U.util.isArray(n))&&(n={send:!0,alert:{level:g.Alert.Level.fatal,description:np(s)}}),"send"in n||(n.send=!0),"alert"in n||(n.alert={level:g.Alert.Level.fatal,description:np(n.error)}),e.error(e,n)}return!e.fail},g.createSessionCache=function(e,t){var a=null;if(e&&e.getSession&&e.setSession&&e.order)a=e;else{a={},a.cache=e||{},a.capacity=Math.max(t||100,1),a.order=[];for(var r in e)a.order.length<=t?a.order.push(r):delete e[r];a.getSession=function(n){var s=null,i=null;if(n?i=U.util.bytesToHex(n):a.order.length>0&&(i=a.order[0]),i!==null&&i in a.cache){s=a.cache[i],delete a.cache[i];for(var o in a.order)if(a.order[o]===i){a.order.splice(o,1);break}}return s},a.setSession=function(n,s){if(a.order.length===a.capacity){var i=a.order.shift();delete a.cache[i]}var i=U.util.bytesToHex(n);a.order.push(i),a.cache[i]=s}}return a},g.createConnection=function(e){var t=null;e.caStore?U.util.isArray(e.caStore)?t=U.pki.createCaStore(e.caStore):t=e.caStore:t=U.pki.createCaStore();var a=e.cipherSuites||null;if(a===null){a=[];for(var r in g.CipherSuites)a.push(g.CipherSuites[r])}var n=e.server?g.ConnectionEnd.server:g.ConnectionEnd.client,s=e.sessionCache?g.createSessionCache(e.sessionCache):null,i={version:{major:g.Version.major,minor:g.Version.minor},entity:n,sessionId:e.sessionId,caStore:t,sessionCache:s,cipherSuites:a,connected:e.connected,virtualHost:e.virtualHost||null,verifyClient:e.verifyClient||!1,verify:e.verify||function(u,p,d,x){return p},verifyOptions:e.verifyOptions||{},getCertificate:e.getCertificate||null,getPrivateKey:e.getPrivateKey||null,getSignature:e.getSignature||null,input:U.util.createBuffer(),tlsData:U.util.createBuffer(),data:U.util.createBuffer(),tlsDataReady:e.tlsDataReady,dataReady:e.dataReady,heartbeatReceived:e.heartbeatReceived,closed:e.closed,error:function(u,p){p.origin=p.origin||(u.entity===g.ConnectionEnd.client?"client":"server"),p.send&&(g.queue(u,g.createAlert(u,p.alert)),g.flush(u));var d=p.fatal!==!1;d&&(u.fail=!0),e.error(u,p),d&&u.close(!1)},deflate:e.deflate||null,inflate:e.inflate||null};i.reset=function(u){i.version={major:g.Version.major,minor:g.Version.minor},i.record=null,i.session=null,i.peerCertificate=null,i.state={pending:null,current:null},i.expect=i.entity===g.ConnectionEnd.client?LC:VC,i.fragmented=null,i.records=[],i.open=!1,i.handshakes=0,i.handshaking=!1,i.isConnected=!1,i.fail=!(u||typeof u>"u"),i.input.clear(),i.tlsData.clear(),i.data.clear(),i.state.current=g.createConnectionState(i)},i.reset();var o=function(u,p){var d=p.type-g.ContentType.change_cipher_spec,x=rp[u.entity][u.expect];d in x?x[d](u,p):g.handleUnexpected(u,p)},c=function(u){var p=0,d=u.input,x=d.length();if(x<5)p=5-x;else{u.record={type:d.getByte(),version:{major:d.getByte(),minor:d.getByte()},length:d.getInt16(),fragment:U.util.createBuffer(),ready:!1};var m=u.record.version.major===u.version.major;m&&u.session&&u.session.version&&(m=u.record.version.minor===u.version.minor),m||u.error(u,{message:"Incompatible TLS version.",send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.protocol_version}})}return p},l=function(u){var p=0,d=u.input,x=d.length();if(x<u.record.length)p=u.record.length-x;else{u.record.fragment.putBytes(d.getBytes(u.record.length)),d.compact();var m=u.state.current.read;m.update(u,u.record)&&(u.fragmented!==null&&(u.fragmented.type===u.record.type?(u.fragmented.fragment.putBuffer(u.record.fragment),u.record=u.fragmented):u.error(u,{message:"Invalid fragmented record.",send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.unexpected_message}})),u.record.ready=!0)}return p};return i.handshake=function(u){if(i.entity!==g.ConnectionEnd.client)i.error(i,{message:"Cannot initiate handshake as a server.",fatal:!1});else if(i.handshaking)i.error(i,{message:"Handshake already in progress.",fatal:!1});else{i.fail&&!i.open&&i.handshakes===0&&(i.fail=!1),i.handshaking=!0,u=u||"";var p=null;u.length>0&&(i.sessionCache&&(p=i.sessionCache.getSession(u)),p===null&&(u="")),u.length===0&&i.sessionCache&&(p=i.sessionCache.getSession(),p!==null&&(u=p.id)),i.session={id:u,version:null,cipherSuite:null,compressionMethod:null,serverCertificate:null,certificateRequest:null,clientCertificate:null,sp:{},md5:U.md.md5.create(),sha1:U.md.sha1.create()},p&&(i.version=p.version,i.session.sp=p.sp),i.session.sp.client_random=g.createRandom().getBytes(),i.open=!0,g.queue(i,g.createRecord(i,{type:g.ContentType.handshake,data:g.createClientHello(i)})),g.flush(i)}},i.process=function(u){var p=0;return u&&i.input.putBytes(u),i.fail||(i.record!==null&&i.record.ready&&i.record.fragment.isEmpty()&&(i.record=null),i.record===null&&(p=c(i)),!i.fail&&i.record!==null&&!i.record.ready&&(p=l(i)),!i.fail&&i.record!==null&&i.record.ready&&o(i,i.record)),p},i.prepare=function(u){return g.queue(i,g.createRecord(i,{type:g.ContentType.application_data,data:U.util.createBuffer(u)})),g.flush(i)},i.prepareHeartbeatRequest=function(u,p){return u instanceof U.util.ByteBuffer&&(u=u.bytes()),typeof p>"u"&&(p=u.length),i.expectedHeartbeatPayload=u,g.queue(i,g.createRecord(i,{type:g.ContentType.heartbeat,data:g.createHeartbeat(g.HeartbeatMessageType.heartbeat_request,u,p)})),g.flush(i)},i.close=function(u){if(!i.fail&&i.sessionCache&&i.session){var p={id:i.session.id,version:i.session.version,sp:i.session.sp};p.sp.keys=null,i.sessionCache.setSession(p.id,p)}i.open&&(i.open=!1,i.input.clear(),(i.isConnected||i.handshaking)&&(i.isConnected=i.handshaking=!1,g.queue(i,g.createAlert(i,{level:g.Alert.Level.warning,description:g.Alert.Description.close_notify})),g.flush(i)),i.closed(i)),i.reset(u)},i},U.tls=U.tls||{};for(var ip in g)typeof g[ip]!="function"&&(U.tls[ip]=g[ip]);U.tls.prf_tls1=ml,U.tls.hmac_sha1=RC,U.tls.createSessionCache=g.createSessionCache,U.tls.createConnection=g.createConnection;var dr=ae,Dt=dr.tls;Dt.CipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA={id:[0,47],name:"TLS_RSA_WITH_AES_128_CBC_SHA",initSecurityParameters:function(e){e.bulk_cipher_algorithm=Dt.BulkCipherAlgorithm.aes,e.cipher_type=Dt.CipherType.block,e.enc_key_length=16,e.block_length=16,e.fixed_iv_length=16,e.record_iv_length=16,e.mac_algorithm=Dt.MACAlgorithm.hmac_sha1,e.mac_length=20,e.mac_key_length=20},initConnectionState:F0},Dt.CipherSuites.TLS_RSA_WITH_AES_256_CBC_SHA={id:[0,53],name:"TLS_RSA_WITH_AES_256_CBC_SHA",initSecurityParameters:function(e){e.bulk_cipher_algorithm=Dt.BulkCipherAlgorithm.aes,e.cipher_type=Dt.CipherType.block,e.enc_key_length=32,e.block_length=16,e.fixed_iv_length=16,e.record_iv_length=16,e.mac_algorithm=Dt.MACAlgorithm.hmac_sha1,e.mac_length=20,e.mac_key_length=20},initConnectionState:F0};function F0(e,t,a){var r=t.entity===dr.tls.ConnectionEnd.client;e.read.cipherState={init:!1,cipher:dr.cipher.createDecipher("AES-CBC",r?a.keys.server_write_key:a.keys.client_write_key),iv:r?a.keys.server_write_IV:a.keys.client_write_IV},e.write.cipherState={init:!1,cipher:dr.cipher.createCipher("AES-CBC",r?a.keys.client_write_key:a.keys.server_write_key),iv:r?a.keys.client_write_IV:a.keys.server_write_IV},e.read.cipherFunction=ZC,e.write.cipherFunction=XC,e.read.macLength=e.write.macLength=a.mac_length,e.read.macFunction=e.write.macFunction=Dt.hmac_sha1}function XC(e,t){var a=!1,r=t.macFunction(t.macKey,t.sequenceNumber,e);e.fragment.putBytes(r),t.updateSequenceNumber();var n;e.version.minor===Dt.Versions.TLS_1_0.minor?n=t.cipherState.init?null:t.cipherState.iv:n=dr.random.getBytesSync(16),t.cipherState.init=!0;var s=t.cipherState.cipher;return s.start({iv:n}),e.version.minor>=Dt.Versions.TLS_1_1.minor&&s.output.putBytes(n),s.update(e.fragment),s.finish(YC)&&(e.fragment=s.output,e.length=e.fragment.length(),a=!0),a}function YC(e,t,a){if(!a){var r=e-t.length()%e;t.fillWithByte(r-1,r)}return!0}function JC(e,t,a){var r=!0;if(a){for(var n=t.length(),s=t.last(),i=n-1-s;i<n-1;++i)r=r&&t.at(i)==s;r&&t.truncate(s+1)}return r}function ZC(e,t){var a=!1,r;e.version.minor===Dt.Versions.TLS_1_0.minor?r=t.cipherState.init?null:t.cipherState.iv:r=e.fragment.getBytes(16),t.cipherState.init=!0;var n=t.cipherState.cipher;n.start({iv:r}),n.update(e.fragment),a=n.finish(JC);var s=t.macLength,i=dr.random.getBytesSync(s),o=n.output.length();o>=s?(e.fragment=n.output.getBytes(o-s),i=n.output.getBytes(s)):e.fragment=n.output.getBytes(),e.fragment=dr.util.createBuffer(e.fragment),e.length=e.fragment.length();var c=t.macFunction(t.macKey,t.sequenceNumber,e);return t.updateSequenceNumber(),a=e2(t.macKey,i,c)&&a,a}function e2(e,t,a){var r=dr.hmac.create();return r.start("SHA1",e),r.update(t),t=r.digest().getBytes(),r.start(null,null),r.update(a),a=r.digest().getBytes(),t===a}var ke=ae,gc=ke.sha512=ke.sha512||{};ke.md.sha512=ke.md.algorithms.sha512=gc;var M0=ke.sha384=ke.sha512.sha384=ke.sha512.sha384||{};M0.create=function(){return gc.create("SHA-384")},ke.md.sha384=ke.md.algorithms.sha384=M0,ke.sha512.sha256=ke.sha512.sha256||{create:function(){return gc.create("SHA-512/256")}},ke.md["sha512/256"]=ke.md.algorithms["sha512/256"]=ke.sha512.sha256,ke.sha512.sha224=ke.sha512.sha224||{create:function(){return gc.create("SHA-512/224")}},ke.md["sha512/224"]=ke.md.algorithms["sha512/224"]=ke.sha512.sha224,gc.create=function(e){if(V0||t2(),typeof e>"u"&&(e="SHA-512"),!(e in kr))throw new Error("Invalid SHA-512 algorithm: "+e);for(var t=kr[e],a=null,r=ke.util.createBuffer(),n=new Array(80),s=0;s<80;++s)n[s]=new Array(2);var i=64;switch(e){case"SHA-384":i=48;break;case"SHA-512/256":i=32;break;case"SHA-512/224":i=28;break}var o={algorithm:e.replace("-","").toLowerCase(),blockLength:128,digestLength:i,messageLength:0,fullMessageLength:null,messageLengthSize:16};return o.start=function(){o.messageLength=0,o.fullMessageLength=o.messageLength128=[];for(var c=o.messageLengthSize/4,l=0;l<c;++l)o.fullMessageLength.push(0);r=ke.util.createBuffer(),a=new Array(t.length);for(var l=0;l<t.length;++l)a[l]=t[l].slice(0);return o},o.start(),o.update=function(c,l){l==="utf8"&&(c=ke.util.encodeUtf8(c));var u=c.length;o.messageLength+=u,u=[u/4294967296>>>0,u>>>0];for(var p=o.fullMessageLength.length-1;p>=0;--p)o.fullMessageLength[p]+=u[1],u[1]=u[0]+(o.fullMessageLength[p]/4294967296>>>0),o.fullMessageLength[p]=o.fullMessageLength[p]>>>0,u[0]=u[1]/4294967296>>>0;return r.putBytes(c),q0(a,n,r),(r.read>2048||r.length()===0)&&r.compact(),o},o.digest=function(){var c=ke.util.createBuffer();c.putBytes(r.bytes());var l=o.fullMessageLength[o.fullMessageLength.length-1]+o.messageLengthSize,u=l&o.blockLength-1;c.putBytes(sp.substr(0,o.blockLength-u));for(var p,d,x=o.fullMessageLength[0]*8,m=0;m<o.fullMessageLength.length-1;++m)p=o.fullMessageLength[m+1]*8,d=p/4294967296>>>0,x+=d,c.putInt32(x>>>0),x=p>>>0;c.putInt32(x);for(var y=new Array(a.length),m=0;m<a.length;++m)y[m]=a[m].slice(0);q0(y,n,c);var b=ke.util.createBuffer(),C;e==="SHA-512"?C=y.length:e==="SHA-384"?C=y.length-2:C=y.length-4;for(var m=0;m<C;++m)b.putInt32(y[m][0]),(m!==C-1||e!=="SHA-512/224")&&b.putInt32(y[m][1]);return b},o};var sp=null,V0=!1,op=null,kr=null;function t2(){sp="\x80",sp+=ke.util.fillString("\0",128),op=[[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]],kr={},kr["SHA-512"]=[[1779033703,4089235720],[3144134277,2227873595],[1013904242,4271175723],[2773480762,1595750129],[1359893119,2917565137],[2600822924,725511199],[528734635,4215389547],[1541459225,327033209]],kr["SHA-384"]=[[3418070365,3238371032],[1654270250,914150663],[2438529370,812702999],[355462360,4144912697],[1731405415,4290775857],[2394180231,1750603025],[3675008525,1694076839],[1203062813,3204075428]],kr["SHA-512/256"]=[[573645204,4230739756],[2673172387,3360449730],[596883563,1867755857],[2520282905,1497426621],[2519219938,2827943907],[3193839141,1401305490],[721525244,746961066],[246885852,2177182882]],kr["SHA-512/224"]=[[2352822216,424955298],[1944164710,2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]],V0=!0}function q0(e,t,a){for(var r,n,s,i,o,c,l,u,p,d,x,m,y,b,C,B,_,k,N,D,K,W,X,pe,me,xe,Ne,_e,be,te,$,je,Le,Te,ie,q=a.length();q>=128;){for(be=0;be<16;++be)t[be][0]=a.getInt32()>>>0,t[be][1]=a.getInt32()>>>0;for(;be<80;++be)je=t[be-2],te=je[0],$=je[1],r=((te>>>19|$<<13)^($>>>29|te<<3)^te>>>6)>>>0,n=((te<<13|$>>>19)^($<<3|te>>>29)^(te<<26|$>>>6))>>>0,Te=t[be-15],te=Te[0],$=Te[1],s=((te>>>1|$<<31)^(te>>>8|$<<24)^te>>>7)>>>0,i=((te<<31|$>>>1)^(te<<24|$>>>8)^(te<<25|$>>>7))>>>0,Le=t[be-7],ie=t[be-16],$=n+Le[1]+i+ie[1],t[be][0]=r+Le[0]+s+ie[0]+($/4294967296>>>0)>>>0,t[be][1]=$>>>0;for(y=e[0][0],b=e[0][1],C=e[1][0],B=e[1][1],_=e[2][0],k=e[2][1],N=e[3][0],D=e[3][1],K=e[4][0],W=e[4][1],X=e[5][0],pe=e[5][1],me=e[6][0],xe=e[6][1],Ne=e[7][0],_e=e[7][1],be=0;be<80;++be)l=((K>>>14|W<<18)^(K>>>18|W<<14)^(W>>>9|K<<23))>>>0,u=((K<<18|W>>>14)^(K<<14|W>>>18)^(W<<23|K>>>9))>>>0,p=(me^K&(X^me))>>>0,d=(xe^W&(pe^xe))>>>0,o=((y>>>28|b<<4)^(b>>>2|y<<30)^(b>>>7|y<<25))>>>0,c=((y<<4|b>>>28)^(b<<30|y>>>2)^(b<<25|y>>>7))>>>0,x=(y&C|_&(y^C))>>>0,m=(b&B|k&(b^B))>>>0,$=_e+u+d+op[be][1]+t[be][1],r=Ne+l+p+op[be][0]+t[be][0]+($/4294967296>>>0)>>>0,n=$>>>0,$=c+m,s=o+x+($/4294967296>>>0)>>>0,i=$>>>0,Ne=me,_e=xe,me=X,xe=pe,X=K,pe=W,$=D+n,K=N+r+($/4294967296>>>0)>>>0,W=$>>>0,N=_,D=k,_=C,k=B,C=y,B=b,$=n+i,y=r+s+($/4294967296>>>0)>>>0,b=$>>>0;$=e[0][1]+b,e[0][0]=e[0][0]+y+($/4294967296>>>0)>>>0,e[0][1]=$>>>0,$=e[1][1]+B,e[1][0]=e[1][0]+C+($/4294967296>>>0)>>>0,e[1][1]=$>>>0,$=e[2][1]+k,e[2][0]=e[2][0]+_+($/4294967296>>>0)>>>0,e[2][1]=$>>>0,$=e[3][1]+D,e[3][0]=e[3][0]+N+($/4294967296>>>0)>>>0,e[3][1]=$>>>0,$=e[4][1]+W,e[4][0]=e[4][0]+K+($/4294967296>>>0)>>>0,e[4][1]=$>>>0,$=e[5][1]+pe,e[5][0]=e[5][0]+X+($/4294967296>>>0)>>>0,e[5][1]=$>>>0,$=e[6][1]+xe,e[6][0]=e[6][0]+me+($/4294967296>>>0)>>>0,e[6][1]=$>>>0,$=e[7][1]+_e,e[7][0]=e[7][0]+Ne+($/4294967296>>>0)>>>0,e[7][1]=$>>>0,q-=128}}var cp={},r2=ae,We=r2.asn1;cp.privateKeyValidator={name:"PrivateKeyInfo",tagClass:We.Class.UNIVERSAL,type:We.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:We.Class.UNIVERSAL,type:We.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:We.Class.UNIVERSAL,type:We.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:We.Class.UNIVERSAL,type:We.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:We.Class.UNIVERSAL,type:We.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},cp.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:We.Class.UNIVERSAL,type:We.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:We.Class.UNIVERSAL,type:We.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:We.Class.UNIVERSAL,type:We.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{tagClass:We.Class.UNIVERSAL,type:We.Type.BITSTRING,constructed:!1,composed:!0,captureBitStringValue:"ed25519PublicKey"}]};var Ze=ae,j0=cp,a2=j0.publicKeyValidator,n2=j0.privateKeyValidator;if(typeof i2>"u")var i2=Ze.jsbn.BigInteger;var lp=Ze.util.ByteBuffer,At=typeof Buffer>"u"?Uint8Array:Buffer;Ze.pki=Ze.pki||{},Ze.pki.ed25519=Ze.ed25519=Ze.ed25519||{};var ue=Ze.ed25519;ue.constants={},ue.constants.PUBLIC_KEY_BYTE_LENGTH=32,ue.constants.PRIVATE_KEY_BYTE_LENGTH=64,ue.constants.SEED_BYTE_LENGTH=32,ue.constants.SIGN_BYTE_LENGTH=64,ue.constants.HASH_BYTE_LENGTH=64,ue.generateKeyPair=function(e){e=e||{};var t=e.seed;if(t===void 0)t=Ze.random.getBytesSync(ue.constants.SEED_BYTE_LENGTH);else if(typeof t=="string"){if(t.length!==ue.constants.SEED_BYTE_LENGTH)throw new TypeError('"seed" must be '+ue.constants.SEED_BYTE_LENGTH+" bytes in length.")}else if(!(t instanceof Uint8Array))throw new TypeError('"seed" must be a node.js Buffer, Uint8Array, or a binary string.');t=er({message:t,encoding:"binary"});for(var a=new At(ue.constants.PUBLIC_KEY_BYTE_LENGTH),r=new At(ue.constants.PRIVATE_KEY_BYTE_LENGTH),n=0;n<32;++n)r[n]=t[n];return l2(a,r),{publicKey:a,privateKey:r}},ue.privateKeyFromAsn1=function(e){var t={},a=[],r=Ze.asn1.validate(e,n2,t,a);if(!r){var n=new Error("Invalid Key.");throw n.errors=a,n}var s=Ze.asn1.derToOid(t.privateKeyOid),i=Ze.oids.EdDSA25519;if(s!==i)throw new Error('Invalid OID "'+s+'"; OID must be "'+i+'".');var o=t.privateKey,c=er({message:Ze.asn1.fromDer(o).value,encoding:"binary"});return{privateKeyBytes:c}},ue.publicKeyFromAsn1=function(e){var t={},a=[],r=Ze.asn1.validate(e,a2,t,a);if(!r){var n=new Error("Invalid Key.");throw n.errors=a,n}var s=Ze.asn1.derToOid(t.publicKeyOid),i=Ze.oids.EdDSA25519;if(s!==i)throw new Error('Invalid OID "'+s+'"; OID must be "'+i+'".');var o=t.ed25519PublicKey;if(o.length!==ue.constants.PUBLIC_KEY_BYTE_LENGTH)throw new Error("Key length is invalid.");return er({message:o,encoding:"binary"})},ue.publicKeyFromPrivateKey=function(e){e=e||{};var t=er({message:e.privateKey,encoding:"binary"});if(t.length!==ue.constants.PRIVATE_KEY_BYTE_LENGTH)throw new TypeError('"options.privateKey" must have a byte length of '+ue.constants.PRIVATE_KEY_BYTE_LENGTH);for(var a=new At(ue.constants.PUBLIC_KEY_BYTE_LENGTH),r=0;r<a.length;++r)a[r]=t[32+r];return a},ue.sign=function(e){e=e||{};var t=er(e),a=er({message:e.privateKey,encoding:"binary"});if(a.length===ue.constants.SEED_BYTE_LENGTH){var r=ue.generateKeyPair({seed:a});a=r.privateKey}else if(a.length!==ue.constants.PRIVATE_KEY_BYTE_LENGTH)throw new TypeError('"options.privateKey" must have a byte length of '+ue.constants.SEED_BYTE_LENGTH+" or "+ue.constants.PRIVATE_KEY_BYTE_LENGTH);var n=new At(ue.constants.SIGN_BYTE_LENGTH+t.length);u2(n,t,t.length,a);for(var s=new At(ue.constants.SIGN_BYTE_LENGTH),i=0;i<s.length;++i)s[i]=n[i];return s},ue.verify=function(e){e=e||{};var t=er(e);if(e.signature===void 0)throw new TypeError('"options.signature" must be a node.js Buffer, a Uint8Array, a forge ByteBuffer, or a binary string.');var a=er({message:e.signature,encoding:"binary"});if(a.length!==ue.constants.SIGN_BYTE_LENGTH)throw new TypeError('"options.signature" must have a byte length of '+ue.constants.SIGN_BYTE_LENGTH);var r=er({message:e.publicKey,encoding:"binary"});if(r.length!==ue.constants.PUBLIC_KEY_BYTE_LENGTH)throw new TypeError('"options.publicKey" must have a byte length of '+ue.constants.PUBLIC_KEY_BYTE_LENGTH);var n=new At(ue.constants.SIGN_BYTE_LENGTH+t.length),s=new At(ue.constants.SIGN_BYTE_LENGTH+t.length),i;for(i=0;i<ue.constants.SIGN_BYTE_LENGTH;++i)n[i]=a[i];for(i=0;i<t.length;++i)n[i+ue.constants.SIGN_BYTE_LENGTH]=t[i];return p2(s,n,n.length,r)>=0};function er(e){var t=e.message;if(t instanceof Uint8Array||t instanceof At)return t;var a=e.encoding;if(t===void 0)if(e.md)t=e.md.digest().getBytes(),a="binary";else throw new TypeError('"options.message" or "options.md" not specified.');if(typeof t=="string"&&!a)throw new TypeError('"options.encoding" must be "binary" or "utf8".');if(typeof t=="string"){if(typeof Buffer<"u")return Buffer.from(t,a);t=new lp(t,a)}else if(!(t instanceof lp))throw new TypeError('"options.message" must be a node.js Buffer, a Uint8Array, a forge ByteBuffer, or a string with "options.encoding" specifying its encoding.');for(var r=new At(t.length()),n=0;n<r.length;++n)r[n]=t.at(n);return r}var up=Y(),gl=Y([1]),s2=Y([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),o2=Y([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),K0=Y([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),z0=Y([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),xc=new Float64Array([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]),c2=Y([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function yc(e,t){var a=Ze.md.sha512.create(),r=new lp(e);a.update(r.getBytes(t),"binary");var n=a.digest().getBytes();if(typeof Buffer<"u")return Buffer.from(n,"binary");for(var s=new At(ue.constants.HASH_BYTE_LENGTH),i=0;i<64;++i)s[i]=n.charCodeAt(i);return s}function l2(e,t){var a=[Y(),Y(),Y(),Y()],r,n=yc(t,32);for(n[0]&=248,n[31]&=127,n[31]|=64,mp(a,n),fp(e,a),r=0;r<32;++r)t[r+32]=e[r];return 0}function u2(e,t,a,r){var n,s,i=new Float64Array(64),o=[Y(),Y(),Y(),Y()],c=yc(r,32);c[0]&=248,c[31]&=127,c[31]|=64;var l=a+64;for(n=0;n<a;++n)e[64+n]=t[n];for(n=0;n<32;++n)e[32+n]=c[32+n];var u=yc(e.subarray(32),a+32);for(pp(u),mp(o,u),fp(e,o),n=32;n<64;++n)e[n]=r[n];var p=yc(e,a+64);for(pp(p),n=32;n<64;++n)i[n]=0;for(n=0;n<32;++n)i[n]=u[n];for(n=0;n<32;++n)for(s=0;s<32;s++)i[n+s]+=p[n]*c[s];return H0(e.subarray(32),i),l}function p2(e,t,a,r){var n,s,i=new At(32),o=[Y(),Y(),Y(),Y()],c=[Y(),Y(),Y(),Y()];if(s=-1,a<64||f2(c,r)||!d2(t,32))return-1;for(n=0;n<a;++n)e[n]=t[n];for(n=0;n<32;++n)e[n+32]=r[n];var l=yc(e,a);if(pp(l),X0(o,c,l),mp(c,t.subarray(32)),dp(o,c),fp(i,o),a-=64,Q0(t,0,i,0)){for(n=0;n<a;++n)e[n]=0;return-1}for(n=0;n<a;++n)e[n]=t[n+64];return s=a,s}function d2(e,t){var a;for(a=31;a>=0;--a){if(e[t+a]<xc[a])return!0;if(e[t+a]>xc[a])return!1}return!1}function H0(e,t){var a,r,n,s;for(r=63;r>=32;--r){for(a=0,n=r-32,s=r-12;n<s;++n)t[n]+=a-16*t[r]*xc[n-(r-32)],a=t[n]+128>>8,t[n]-=a*256;t[n]+=a,t[r]=0}for(a=0,n=0;n<32;++n)t[n]+=a-(t[31]>>4)*xc[n],a=t[n]>>8,t[n]&=255;for(n=0;n<32;++n)t[n]-=a*xc[n];for(r=0;r<32;++r)t[r+1]+=t[r]>>8,e[r]=t[r]&255}function pp(e){for(var t=new Float64Array(64),a=0;a<64;++a)t[a]=e[a],e[a]=0;H0(e,t)}function dp(e,t){var a=Y(),r=Y(),n=Y(),s=Y(),i=Y(),o=Y(),c=Y(),l=Y(),u=Y();ea(a,e[1],e[0]),ea(u,t[1],t[0]),we(a,a,u),Zr(r,e[0],e[1]),Zr(u,t[0],t[1]),we(r,r,u),we(n,e[3],t[3]),we(n,n,o2),we(s,e[2],t[2]),Zr(s,s,s),ea(i,r,a),ea(o,s,n),Zr(c,s,n),Zr(l,r,a),we(e[0],i,o),we(e[1],l,c),we(e[2],c,o),we(e[3],i,l)}function $0(e,t,a){for(var r=0;r<4;++r)Y0(e[r],t[r],a)}function fp(e,t){var a=Y(),r=Y(),n=Y();g2(n,t[2]),we(a,t[0],n),we(r,t[1],n),xl(e,r),e[31]^=W0(a)<<7}function xl(e,t){var a,r,n,s=Y(),i=Y();for(a=0;a<16;++a)i[a]=t[a];for(hp(i),hp(i),hp(i),r=0;r<2;++r){for(s[0]=i[0]-65517,a=1;a<15;++a)s[a]=i[a]-65535-(s[a-1]>>16&1),s[a-1]&=65535;s[15]=i[15]-32767-(s[14]>>16&1),n=s[15]>>16&1,s[14]&=65535,Y0(i,s,1-n)}for(a=0;a<16;a++)e[2*a]=i[a]&255,e[2*a+1]=i[a]>>8}function f2(e,t){var a=Y(),r=Y(),n=Y(),s=Y(),i=Y(),o=Y(),c=Y();return fr(e[2],gl),m2(e[1],t),Nr(n,e[1]),we(s,n,s2),ea(n,n,e[2]),Zr(s,e[2],s),Nr(i,s),Nr(o,i),we(c,o,i),we(a,c,n),we(a,a,s),h2(a,a),we(a,a,n),we(a,a,s),we(a,a,s),we(e[0],a,s),Nr(r,e[0]),we(r,r,s),G0(r,n)&&we(e[0],e[0],c2),Nr(r,e[0]),we(r,r,s),G0(r,n)?-1:(W0(e[0])===t[31]>>7&&ea(e[0],up,e[0]),we(e[3],e[0],e[1]),0)}function m2(e,t){var a;for(a=0;a<16;++a)e[a]=t[2*a]+(t[2*a+1]<<8);e[15]&=32767}function h2(e,t){var a=Y(),r;for(r=0;r<16;++r)a[r]=t[r];for(r=250;r>=0;--r)Nr(a,a),r!==1&&we(a,a,t);for(r=0;r<16;++r)e[r]=a[r]}function G0(e,t){var a=new At(32),r=new At(32);return xl(a,e),xl(r,t),Q0(a,0,r,0)}function Q0(e,t,a,r){return v2(e,t,a,r,32)}function v2(e,t,a,r,n){var s,i=0;for(s=0;s<n;++s)i|=e[t+s]^a[r+s];return(1&i-1>>>8)-1}function W0(e){var t=new At(32);return xl(t,e),t[0]&1}function X0(e,t,a){var r,n;for(fr(e[0],up),fr(e[1],gl),fr(e[2],gl),fr(e[3],up),n=255;n>=0;--n)r=a[n/8|0]>>(n&7)&1,$0(e,t,r),dp(t,e),dp(e,e),$0(e,t,r)}function mp(e,t){var a=[Y(),Y(),Y(),Y()];fr(a[0],K0),fr(a[1],z0),fr(a[2],gl),we(a[3],K0,z0),X0(e,a,t)}function fr(e,t){var a;for(a=0;a<16;a++)e[a]=t[a]|0}function g2(e,t){var a=Y(),r;for(r=0;r<16;++r)a[r]=t[r];for(r=253;r>=0;--r)Nr(a,a),r!==2&&r!==4&&we(a,a,t);for(r=0;r<16;++r)e[r]=a[r]}function hp(e){var t,a,r=1;for(t=0;t<16;++t)a=e[t]+r+65535,r=Math.floor(a/65536),e[t]=a-r*65536;e[0]+=r-1+37*(r-1)}function Y0(e,t,a){for(var r,n=~(a-1),s=0;s<16;++s)r=n&(e[s]^t[s]),e[s]^=r,t[s]^=r}function Y(e){var t,a=new Float64Array(16);if(e)for(t=0;t<e.length;++t)a[t]=e[t];return a}function Zr(e,t,a){for(var r=0;r<16;++r)e[r]=t[r]+a[r]}function ea(e,t,a){for(var r=0;r<16;++r)e[r]=t[r]-a[r]}function Nr(e,t){we(e,t,t)}function we(e,t,a){var r,n,s=0,i=0,o=0,c=0,l=0,u=0,p=0,d=0,x=0,m=0,y=0,b=0,C=0,B=0,_=0,k=0,N=0,D=0,K=0,W=0,X=0,pe=0,me=0,xe=0,Ne=0,_e=0,be=0,te=0,$=0,je=0,Le=0,Te=a[0],ie=a[1],q=a[2],M=a[3],J=a[4],ne=a[5],ee=a[6],Ee=a[7],Ae=a[8],se=a[9],Pe=a[10],De=a[11],fe=a[12],Ke=a[13],et=a[14],tt=a[15];r=t[0],s+=r*Te,i+=r*ie,o+=r*q,c+=r*M,l+=r*J,u+=r*ne,p+=r*ee,d+=r*Ee,x+=r*Ae,m+=r*se,y+=r*Pe,b+=r*De,C+=r*fe,B+=r*Ke,_+=r*et,k+=r*tt,r=t[1],i+=r*Te,o+=r*ie,c+=r*q,l+=r*M,u+=r*J,p+=r*ne,d+=r*ee,x+=r*Ee,m+=r*Ae,y+=r*se,b+=r*Pe,C+=r*De,B+=r*fe,_+=r*Ke,k+=r*et,N+=r*tt,r=t[2],o+=r*Te,c+=r*ie,l+=r*q,u+=r*M,p+=r*J,d+=r*ne,x+=r*ee,m+=r*Ee,y+=r*Ae,b+=r*se,C+=r*Pe,B+=r*De,_+=r*fe,k+=r*Ke,N+=r*et,D+=r*tt,r=t[3],c+=r*Te,l+=r*ie,u+=r*q,p+=r*M,d+=r*J,x+=r*ne,m+=r*ee,y+=r*Ee,b+=r*Ae,C+=r*se,B+=r*Pe,_+=r*De,k+=r*fe,N+=r*Ke,D+=r*et,K+=r*tt,r=t[4],l+=r*Te,u+=r*ie,p+=r*q,d+=r*M,x+=r*J,m+=r*ne,y+=r*ee,b+=r*Ee,C+=r*Ae,B+=r*se,_+=r*Pe,k+=r*De,N+=r*fe,D+=r*Ke,K+=r*et,W+=r*tt,r=t[5],u+=r*Te,p+=r*ie,d+=r*q,x+=r*M,m+=r*J,y+=r*ne,b+=r*ee,C+=r*Ee,B+=r*Ae,_+=r*se,k+=r*Pe,N+=r*De,D+=r*fe,K+=r*Ke,W+=r*et,X+=r*tt,r=t[6],p+=r*Te,d+=r*ie,x+=r*q,m+=r*M,y+=r*J,b+=r*ne,C+=r*ee,B+=r*Ee,_+=r*Ae,k+=r*se,N+=r*Pe,D+=r*De,K+=r*fe,W+=r*Ke,X+=r*et,pe+=r*tt,r=t[7],d+=r*Te,x+=r*ie,m+=r*q,y+=r*M,b+=r*J,C+=r*ne,B+=r*ee,_+=r*Ee,k+=r*Ae,N+=r*se,D+=r*Pe,K+=r*De,W+=r*fe,X+=r*Ke,pe+=r*et,me+=r*tt,r=t[8],x+=r*Te,m+=r*ie,y+=r*q,b+=r*M,C+=r*J,B+=r*ne,_+=r*ee,k+=r*Ee,N+=r*Ae,D+=r*se,K+=r*Pe,W+=r*De,X+=r*fe,pe+=r*Ke,me+=r*et,xe+=r*tt,r=t[9],m+=r*Te,y+=r*ie,b+=r*q,C+=r*M,B+=r*J,_+=r*ne,k+=r*ee,N+=r*Ee,D+=r*Ae,K+=r*se,W+=r*Pe,X+=r*De,pe+=r*fe,me+=r*Ke,xe+=r*et,Ne+=r*tt,r=t[10],y+=r*Te,b+=r*ie,C+=r*q,B+=r*M,_+=r*J,k+=r*ne,N+=r*ee,D+=r*Ee,K+=r*Ae,W+=r*se,X+=r*Pe,pe+=r*De,me+=r*fe,xe+=r*Ke,Ne+=r*et,_e+=r*tt,r=t[11],b+=r*Te,C+=r*ie,B+=r*q,_+=r*M,k+=r*J,N+=r*ne,D+=r*ee,K+=r*Ee,W+=r*Ae,X+=r*se,pe+=r*Pe,me+=r*De,xe+=r*fe,Ne+=r*Ke,_e+=r*et,be+=r*tt,r=t[12],C+=r*Te,B+=r*ie,_+=r*q,k+=r*M,N+=r*J,D+=r*ne,K+=r*ee,W+=r*Ee,X+=r*Ae,pe+=r*se,me+=r*Pe,xe+=r*De,Ne+=r*fe,_e+=r*Ke,be+=r*et,te+=r*tt,r=t[13],B+=r*Te,_+=r*ie,k+=r*q,N+=r*M,D+=r*J,K+=r*ne,W+=r*ee,X+=r*Ee,pe+=r*Ae,me+=r*se,xe+=r*Pe,Ne+=r*De,_e+=r*fe,be+=r*Ke,te+=r*et,$+=r*tt,r=t[14],_+=r*Te,k+=r*ie,N+=r*q,D+=r*M,K+=r*J,W+=r*ne,X+=r*ee,pe+=r*Ee,me+=r*Ae,xe+=r*se,Ne+=r*Pe,_e+=r*De,be+=r*fe,te+=r*Ke,$+=r*et,je+=r*tt,r=t[15],k+=r*Te,N+=r*ie,D+=r*q,K+=r*M,W+=r*J,X+=r*ne,pe+=r*ee,me+=r*Ee,xe+=r*Ae,Ne+=r*se,_e+=r*Pe,be+=r*De,te+=r*fe,$+=r*Ke,je+=r*et,Le+=r*tt,s+=38*N,i+=38*D,o+=38*K,c+=38*W,l+=38*X,u+=38*pe,p+=38*me,d+=38*xe,x+=38*Ne,m+=38*_e,y+=38*be,b+=38*te,C+=38*$,B+=38*je,_+=38*Le,n=1,r=s+n+65535,n=Math.floor(r/65536),s=r-n*65536,r=i+n+65535,n=Math.floor(r/65536),i=r-n*65536,r=o+n+65535,n=Math.floor(r/65536),o=r-n*65536,r=c+n+65535,n=Math.floor(r/65536),c=r-n*65536,r=l+n+65535,n=Math.floor(r/65536),l=r-n*65536,r=u+n+65535,n=Math.floor(r/65536),u=r-n*65536,r=p+n+65535,n=Math.floor(r/65536),p=r-n*65536,r=d+n+65535,n=Math.floor(r/65536),d=r-n*65536,r=x+n+65535,n=Math.floor(r/65536),x=r-n*65536,r=m+n+65535,n=Math.floor(r/65536),m=r-n*65536,r=y+n+65535,n=Math.floor(r/65536),y=r-n*65536,r=b+n+65535,n=Math.floor(r/65536),b=r-n*65536,r=C+n+65535,n=Math.floor(r/65536),C=r-n*65536,r=B+n+65535,n=Math.floor(r/65536),B=r-n*65536,r=_+n+65535,n=Math.floor(r/65536),_=r-n*65536,r=k+n+65535,n=Math.floor(r/65536),k=r-n*65536,s+=n-1+37*(n-1),n=1,r=s+n+65535,n=Math.floor(r/65536),s=r-n*65536,r=i+n+65535,n=Math.floor(r/65536),i=r-n*65536,r=o+n+65535,n=Math.floor(r/65536),o=r-n*65536,r=c+n+65535,n=Math.floor(r/65536),c=r-n*65536,r=l+n+65535,n=Math.floor(r/65536),l=r-n*65536,r=u+n+65535,n=Math.floor(r/65536),u=r-n*65536,r=p+n+65535,n=Math.floor(r/65536),p=r-n*65536,r=d+n+65535,n=Math.floor(r/65536),d=r-n*65536,r=x+n+65535,n=Math.floor(r/65536),x=r-n*65536,r=m+n+65535,n=Math.floor(r/65536),m=r-n*65536,r=y+n+65535,n=Math.floor(r/65536),y=r-n*65536,r=b+n+65535,n=Math.floor(r/65536),b=r-n*65536,r=C+n+65535,n=Math.floor(r/65536),C=r-n*65536,r=B+n+65535,n=Math.floor(r/65536),B=r-n*65536,r=_+n+65535,n=Math.floor(r/65536),_=r-n*65536,r=k+n+65535,n=Math.floor(r/65536),k=r-n*65536,s+=n-1+37*(n-1),e[0]=s,e[1]=i,e[2]=o,e[3]=c,e[4]=l,e[5]=u,e[6]=p,e[7]=d,e[8]=x,e[9]=m,e[10]=y,e[11]=b,e[12]=C,e[13]=B,e[14]=_,e[15]=k}var _t=ae;_t.kem=_t.kem||{};var J0=_t.jsbn.BigInteger;_t.kem.rsa={},_t.kem.rsa.create=function(e,t){t=t||{};var a=t.prng||_t.random,r={};return r.encrypt=function(n,s){var i=Math.ceil(n.n.bitLength()/8),o;do o=new J0(_t.util.bytesToHex(a.getBytesSync(i)),16).mod(n.n);while(o.compareTo(J0.ONE)<=0);o=_t.util.hexToBytes(o.toString(16));var c=i-o.length;c>0&&(o=_t.util.fillString("\0",c)+o);var l=n.encrypt(o,"NONE"),u=e.generate(o,s);return{encapsulation:l,key:u}},r.decrypt=function(n,s,i){var o=n.decrypt(s,"NONE");return e.generate(o,i)},r},_t.kem.kdf1=function(e,t){Z0(this,e,0,t||e.digestLength)},_t.kem.kdf2=function(e,t){Z0(this,e,1,t||e.digestLength)};function Z0(e,t,a,r){e.generate=function(n,s){for(var i=new _t.util.ByteBuffer,o=Math.ceil(s/r)+a,c=new _t.util.ByteBuffer,l=a;l<o;++l){c.putInt32(l),t.start(),t.update(n+c.getBytes());var u=t.digest();i.putBytes(u.getBytes(r))}return i.truncate(i.length()-s),i.getBytes()}}var de=ae;de.log=de.log||{},de.log.levels=["none","error","warning","info","debug","verbose","max"];var yl={},vp=[],bc=null;de.log.LEVEL_LOCKED=2,de.log.NO_LEVEL_CHECK=4,de.log.INTERPOLATE=8;for(var mr=0;mr<de.log.levels.length;++mr){var em=de.log.levels[mr];yl[em]={index:mr,name:em.toUpperCase()}}de.log.logMessage=function(e){for(var t=yl[e.level].index,a=0;a<vp.length;++a){var r=vp[a];if(r.flags&de.log.NO_LEVEL_CHECK)r.f(e);else{var n=yl[r.level].index;t<=n&&r.f(r,e)}}},de.log.prepareStandard=function(e){"standard"in e||(e.standard=yl[e.level].name+" ["+e.category+"] "+e.message)},de.log.prepareFull=function(e){if(!("full"in e)){var t=[e.message];t=t.concat([]),e.full=de.util.format.apply(this,t)}},de.log.prepareStandardFull=function(e){"standardFull"in e||(de.log.prepareStandard(e),e.standardFull=e.standard)};for(var tm=["error","warning","info","debug","verbose"],mr=0;mr<tm.length;++mr)(function(t){de.log[t]=function(a,r){var n=Array.prototype.slice.call(arguments).slice(2),s={timestamp:new Date,level:t,category:a,message:r,arguments:n};de.log.logMessage(s)}})(tm[mr]);if(de.log.makeLogger=function(e){var t={flags:0,f:e};return de.log.setLevel(t,"none"),t},de.log.setLevel=function(e,t){var a=!1;if(e&&!(e.flags&de.log.LEVEL_LOCKED))for(var r=0;r<de.log.levels.length;++r){var n=de.log.levels[r];if(t==n){e.level=t,a=!0;break}}return a},de.log.lock=function(e,t){typeof t>"u"||t?e.flags|=de.log.LEVEL_LOCKED:e.flags&=~de.log.LEVEL_LOCKED},de.log.addLogger=function(e){vp.push(e)},typeof console<"u"&&"log"in console){var Ec;if(console.error&&console.warn&&console.info&&console.debug){var x2={error:console.error,warning:console.warn,info:console.info,debug:console.debug,verbose:console.debug},bp=function(e,t){de.log.prepareStandard(t);var a=x2[t.level],r=[t.standard];r=r.concat(t.arguments.slice()),a.apply(console,r)};Ec=de.log.makeLogger(bp)}else{var bp=function(t,a){de.log.prepareStandardFull(a),console.log(a.standardFull)};Ec=de.log.makeLogger(bp)}de.log.setLevel(Ec,"debug"),de.log.addLogger(Ec),bc=Ec}else console={log:function(){}};if(bc!==null&&typeof window<"u"&&window.location){var bl=new URL(window.location.href).searchParams;if(bl.has("console.level")&&de.log.setLevel(bc,bl.get("console.level").slice(-1)[0]),bl.has("console.lock")){var y2=bl.get("console.lock").slice(-1)[0];y2=="true"&&de.log.lock(bc)}}de.log.consoleLogger=bc;var V=ae,T=V.asn1,ft=V.pkcs7=V.pkcs7||{};ft.messageFromPem=function(e){var t=V.pem.decode(e)[0];if(t.type!=="PKCS7"){var a=new Error('Could not convert PKCS#7 message from PEM; PEM header type is not "PKCS#7".');throw a.headerType=t.type,a}if(t.procType&&t.procType.type==="ENCRYPTED")throw new Error("Could not convert PKCS#7 message from PEM; PEM is encrypted.");var r=T.fromDer(t.body);return ft.messageFromAsn1(r)},ft.messageToPem=function(e,t){var a={type:"PKCS7",body:T.toDer(e.toAsn1()).getBytes()};return V.pem.encode(a,{maxline:t})},ft.messageFromAsn1=function(e){var t={},a=[];if(!T.validate(e,ft.asn1.contentInfoValidator,t,a)){var r=new Error("Cannot read PKCS#7 message. ASN.1 object is not an PKCS#7 ContentInfo.");throw r.errors=a,r}var n=T.derToOid(t.contentType),s;switch(n){case V.pki.oids.envelopedData:s=ft.createEnvelopedData();break;case V.pki.oids.encryptedData:s=ft.createEncryptedData();break;case V.pki.oids.signedData:s=ft.createSignedData();break;default:throw new Error("Cannot read PKCS#7 message. ContentType with OID "+n+" is not (yet) supported.")}return s.fromAsn1(t.content.value[0]),s},ft.createSignedData=function(){var e=null;return e={type:V.pki.oids.signedData,version:1,certificates:[],crls:[],signers:[],digestAlgorithmIdentifiers:[],contentInfo:null,signerInfos:[],fromAsn1:function(r){if(xp(e,r,ft.asn1.signedDataValidator),e.certificates=[],e.crls=[],e.digestAlgorithmIdentifiers=[],e.contentInfo=null,e.signerInfos=[],e.rawCapture.certificates)for(var n=e.rawCapture.certificates.value,s=0;s<n.length;++s)e.certificates.push(V.pki.certificateFromAsn1(n[s]))},toAsn1:function(){e.contentInfo||e.sign();for(var r=[],n=0;n<e.certificates.length;++n)r.push(V.pki.certificateToAsn1(e.certificates[n]));var s=[],i=T.create(T.Class.CONTEXT_SPECIFIC,0,!0,[T.create(T.Class.UNIVERSAL,T.Type.SEQUENCE,!0,[T.create(T.Class.UNIVERSAL,T.Type.INTEGER,!1,T.integerToDer(e.version).getBytes()),T.create(T.Class.UNIVERSAL,T.Type.SET,!0,e.digestAlgorithmIdentifiers),e.contentInfo])]);return r.length>0&&i.value[0].value.push(T.create(T.Class.CONTEXT_SPECIFIC,0,!0,r)),s.length>0&&i.value[0].value.push(T.create(T.Class.CONTEXT_SPECIFIC,1,!0,s)),i.value[0].value.push(T.create(T.Class.UNIVERSAL,T.Type.SET,!0,e.signerInfos)),T.create(T.Class.UNIVERSAL,T.Type.SEQUENCE,!0,[T.create(T.Class.UNIVERSAL,T.Type.OID,!1,T.oidToDer(e.type).getBytes()),i])},addSigner:function(r){var n=r.issuer,s=r.serialNumber;if(r.certificate){var i=r.certificate;typeof i=="string"&&(i=V.pki.certificateFromPem(i)),n=i.issuer.attributes,s=i.serialNumber}var o=r.key;if(!o)throw new Error("Could not add PKCS#7 signer; no private key specified.");typeof o=="string"&&(o=V.pki.privateKeyFromPem(o));var c=r.digestAlgorithm||V.pki.oids.sha1;switch(c){case V.pki.oids.sha1:case V.pki.oids.sha256:case V.pki.oids.sha384:case V.pki.oids.sha512:case V.pki.oids.md5:break;default:throw new Error("Could not add PKCS#7 signer; unknown message digest algorithm: "+c)}var l=r.authenticatedAttributes||[];if(l.length>0){for(var u=!1,p=!1,d=0;d<l.length;++d){var x=l[d];if(!u&&x.type===V.pki.oids.contentType){if(u=!0,p)break;continue}if(!p&&x.type===V.pki.oids.messageDigest){if(p=!0,u)break;continue}}if(!u||!p)throw new Error("Invalid signer.authenticatedAttributes. If signer.authenticatedAttributes is specified, then it must contain at least two attributes, PKCS #9 content-type and PKCS #9 message-digest.")}e.signers.push({key:o,version:1,issuer:n,serialNumber:s,digestAlgorithm:c,signatureAlgorithm:V.pki.oids.rsaEncryption,signature:null,authenticatedAttributes:l,unauthenticatedAttributes:[]})},sign:function(r){if(r=r||{},(typeof e.content!="object"||e.contentInfo===null)&&(e.contentInfo=T.create(T.Class.UNIVERSAL,T.Type.SEQUENCE,!0,[T.create(T.Class.UNIVERSAL,T.Type.OID,!1,T.oidToDer(V.pki.oids.data).getBytes())]),"content"in e)){var n;e.content instanceof V.util.ByteBuffer?n=e.content.bytes():typeof e.content=="string"&&(n=V.util.encodeUtf8(e.content)),r.detached?e.detachedContent=T.create(T.Class.UNIVERSAL,T.Type.OCTETSTRING,!1,n):e.contentInfo.value.push(T.create(T.Class.CONTEXT_SPECIFIC,0,!0,[T.create(T.Class.UNIVERSAL,T.Type.OCTETSTRING,!1,n)]))}if(e.signers.length!==0){var s=t();a(s)}},verify:function(){throw new Error("PKCS#7 signature verification not yet implemented.")},addCertificate:function(r){typeof r=="string"&&(r=V.pki.certificateFromPem(r)),e.certificates.push(r)},addCertificateRevokationList:function(r){throw new Error("PKCS#7 CRL support not yet implemented.")}},e;function t(){for(var r={},n=0;n<e.signers.length;++n){var s=e.signers[n],i=s.digestAlgorithm;i in r||(r[i]=V.md[V.pki.oids[i]].create()),s.authenticatedAttributes.length===0?s.md=r[i]:s.md=V.md[V.pki.oids[i]].create()}e.digestAlgorithmIdentifiers=[];for(var i in r)e.digestAlgorithmIdentifiers.push(T.create(T.Class.UNIVERSAL,T.Type.SEQUENCE,!0,[T.create(T.Class.UNIVERSAL,T.Type.OID,!1,T.oidToDer(i).getBytes()),T.create(T.Class.UNIVERSAL,T.Type.NULL,!1,"")]));return r}function a(r){var n;if(e.detachedContent?n=e.detachedContent:(n=e.contentInfo.value[1],n=n.value[0]),!n)throw new Error("Could not sign PKCS#7 message; there is no content to sign.");var s=T.derToOid(e.contentInfo.value[0].value),i=T.toDer(n);i.getByte(),T.getBerValueLength(i),i=i.getBytes();for(var o in r)r[o].start().update(i);for(var c=new Date,l=0;l<e.signers.length;++l){var u=e.signers[l];if(u.authenticatedAttributes.length===0){if(s!==V.pki.oids.data)throw new Error("Invalid signer; authenticatedAttributes must be present when the ContentInfo content type is not PKCS#7 Data.")}else{u.authenticatedAttributesAsn1=T.create(T.Class.CONTEXT_SPECIFIC,0,!0,[]);for(var p=T.create(T.Class.UNIVERSAL,T.Type.SET,!0,[]),d=0;d<u.authenticatedAttributes.length;++d){var x=u.authenticatedAttributes[d];x.type===V.pki.oids.messageDigest?x.value=r[u.digestAlgorithm].digest():x.type===V.pki.oids.signingTime&&(x.value||(x.value=c)),p.value.push(gp(x)),u.authenticatedAttributesAsn1.value.push(gp(x))}i=T.toDer(p).getBytes(),u.md.start().update(i)}u.signature=u.key.sign(u.md,"RSASSA-PKCS1-V1_5")}e.signerInfos=w2(e.signers)}},ft.createEncryptedData=function(){var e=null;return e={type:V.pki.oids.encryptedData,version:0,encryptedContent:{algorithm:V.pki.oids["aes256-CBC"]},fromAsn1:function(t){xp(e,t,ft.asn1.encryptedDataValidator)},decrypt:function(t){t!==void 0&&(e.encryptedContent.key=t),rm(e)}},e},ft.createEnvelopedData=function(){var e=null;return e={type:V.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:V.pki.oids["aes256-CBC"]},fromAsn1:function(t){var a=xp(e,t,ft.asn1.envelopedDataValidator);e.recipients=C2(a.recipientInfos.value)},toAsn1:function(){return T.create(T.Class.UNIVERSAL,T.Type.SEQUENCE,!0,[T.create(T.Class.UNIVERSAL,T.Type.OID,!1,T.oidToDer(e.type).getBytes()),T.create(T.Class.CONTEXT_SPECIFIC,0,!0,[T.create(T.Class.UNIVERSAL,T.Type.SEQUENCE,!0,[T.create(T.Class.UNIVERSAL,T.Type.INTEGER,!1,T.integerToDer(e.version).getBytes()),T.create(T.Class.UNIVERSAL,T.Type.SET,!0,S2(e.recipients)),T.create(T.Class.UNIVERSAL,T.Type.SEQUENCE,!0,A2(e.encryptedContent))])])])},findRecipient:function(t){for(var a=t.issuer.attributes,r=0;r<e.recipients.length;++r){var n=e.recipients[r],s=n.issuer;if(n.serialNumber===t.serialNumber&&s.length===a.length){for(var i=!0,o=0;o<a.length;++o)if(s[o].type!==a[o].type||s[o].value!==a[o].value){i=!1;break}if(i)return n}}return null},decrypt:function(t,a){if(e.encryptedContent.key===void 0&&t!==void 0&&a!==void 0)switch(t.encryptedContent.algorithm){case V.pki.oids.rsaEncryption:case V.pki.oids.desCBC:var r=a.decrypt(t.encryptedContent.content);e.encryptedContent.key=V.util.createBuffer(r);break;default:throw new Error("Unsupported asymmetric cipher, OID "+t.encryptedContent.algorithm)}rm(e)},addRecipient:function(t){e.recipients.push({version:0,issuer:t.issuer.attributes,serialNumber:t.serialNumber,encryptedContent:{algorithm:V.pki.oids.rsaEncryption,key:t.publicKey}})},encrypt:function(t,a){if(e.encryptedContent.content===void 0){a=a||e.encryptedContent.algorithm,t=t||e.encryptedContent.key;var r,n,s;switch(a){case V.pki.oids["aes128-CBC"]:r=16,n=16,s=V.aes.createEncryptionCipher;break;case V.pki.oids["aes192-CBC"]:r=24,n=16,s=V.aes.createEncryptionCipher;break;case V.pki.oids["aes256-CBC"]:r=32,n=16,s=V.aes.createEncryptionCipher;break;case V.pki.oids["des-EDE3-CBC"]:r=24,n=8,s=V.des.createEncryptionCipher;break;default:throw new Error("Unsupported symmetric cipher, OID "+a)}if(t===void 0)t=V.util.createBuffer(V.random.getBytes(r));else if(t.length()!=r)throw new Error("Symmetric key has wrong length; got "+t.length()+" bytes, expected "+r+".");e.encryptedContent.algorithm=a,e.encryptedContent.key=t,e.encryptedContent.parameter=V.util.createBuffer(V.random.getBytes(n));var i=s(t);if(i.start(e.encryptedContent.parameter.copy()),i.update(e.content),!i.finish())throw new Error("Symmetric encryption failed.");e.encryptedContent.content=i.output}for(var o=0;o<e.recipients.length;++o){var c=e.recipients[o];if(c.encryptedContent.content===void 0)switch(c.encryptedContent.algorithm){case V.pki.oids.rsaEncryption:c.encryptedContent.content=c.encryptedContent.key.encrypt(e.encryptedContent.key.data);break;default:throw new Error("Unsupported asymmetric cipher, OID "+c.encryptedContent.algorithm)}}}},e};function b2(e){var t={},a=[];if(!T.validate(e,ft.asn1.recipientInfoValidator,t,a)){var r=new Error("Cannot read PKCS#7 RecipientInfo. ASN.1 object is not an PKCS#7 RecipientInfo.");throw r.errors=a,r}return{version:t.version.charCodeAt(0),issuer:V.pki.RDNAttributesAsArray(t.issuer),serialNumber:V.util.createBuffer(t.serial).toHex(),encryptedContent:{algorithm:T.derToOid(t.encAlgorithm),parameter:t.encParameter?t.encParameter.value:void 0,content:t.encKey}}}function E2(e){return T.create(T.Class.UNIVERSAL,T.Type.SEQUENCE,!0,[T.create(T.Class.UNIVERSAL,T.Type.INTEGER,!1,T.integerToDer(e.version).getBytes()),T.create(T.Class.UNIVERSAL,T.Type.SEQUENCE,!0,[V.pki.distinguishedNameToAsn1({attributes:e.issuer}),T.create(T.Class.UNIVERSAL,T.Type.INTEGER,!1,V.util.hexToBytes(e.serialNumber))]),T.create(T.Class.UNIVERSAL,T.Type.SEQUENCE,!0,[T.create(T.Class.UNIVERSAL,T.Type.OID,!1,T.oidToDer(e.encryptedContent.algorithm).getBytes()),T.create(T.Class.UNIVERSAL,T.Type.NULL,!1,"")]),T.create(T.Class.UNIVERSAL,T.Type.OCTETSTRING,!1,e.encryptedContent.content)])}function C2(e){for(var t=[],a=0;a<e.length;++a)t.push(b2(e[a]));return t}function S2(e){for(var t=[],a=0;a<e.length;++a)t.push(E2(e[a]));return t}function T2(e){var t=T.create(T.Class.UNIVERSAL,T.Type.SEQUENCE,!0,[T.create(T.Class.UNIVERSAL,T.Type.INTEGER,!1,T.integerToDer(e.version).getBytes()),T.create(T.Class.UNIVERSAL,T.Type.SEQUENCE,!0,[V.pki.distinguishedNameToAsn1({attributes:e.issuer}),T.create(T.Class.UNIVERSAL,T.Type.INTEGER,!1,V.util.hexToBytes(e.serialNumber))]),T.create(T.Class.UNIVERSAL,T.Type.SEQUENCE,!0,[T.create(T.Class.UNIVERSAL,T.Type.OID,!1,T.oidToDer(e.digestAlgorithm).getBytes()),T.create(T.Class.UNIVERSAL,T.Type.NULL,!1,"")])]);if(e.authenticatedAttributesAsn1&&t.value.push(e.authenticatedAttributesAsn1),t.value.push(T.create(T.Class.UNIVERSAL,T.Type.SEQUENCE,!0,[T.create(T.Class.UNIVERSAL,T.Type.OID,!1,T.oidToDer(e.signatureAlgorithm).getBytes()),T.create(T.Class.UNIVERSAL,T.Type.NULL,!1,"")])),t.value.push(T.create(T.Class.UNIVERSAL,T.Type.OCTETSTRING,!1,e.signature)),e.unauthenticatedAttributes.length>0){for(var a=T.create(T.Class.CONTEXT_SPECIFIC,1,!0,[]),r=0;r<e.unauthenticatedAttributes.length;++r){var n=e.unauthenticatedAttributes[r];a.values.push(gp(n))}t.value.push(a)}return t}function w2(e){for(var t=[],a=0;a<e.length;++a)t.push(T2(e[a]));return t}function gp(e){var t;if(e.type===V.pki.oids.contentType)t=T.create(T.Class.UNIVERSAL,T.Type.OID,!1,T.oidToDer(e.value).getBytes());else if(e.type===V.pki.oids.messageDigest)t=T.create(T.Class.UNIVERSAL,T.Type.OCTETSTRING,!1,e.value.bytes());else if(e.type===V.pki.oids.signingTime){var a=new Date("1950-01-01T00:00:00Z"),r=new Date("2050-01-01T00:00:00Z"),n=e.value;if(typeof n=="string"){var s=Date.parse(n);isNaN(s)?n.length===13?n=T.utcTimeToDate(n):n=T.generalizedTimeToDate(n):n=new Date(s)}n>=a&&n<r?t=T.create(T.Class.UNIVERSAL,T.Type.UTCTIME,!1,T.dateToUtcTime(n)):t=T.create(T.Class.UNIVERSAL,T.Type.GENERALIZEDTIME,!1,T.dateToGeneralizedTime(n))}return T.create(T.Class.UNIVERSAL,T.Type.SEQUENCE,!0,[T.create(T.Class.UNIVERSAL,T.Type.OID,!1,T.oidToDer(e.type).getBytes()),T.create(T.Class.UNIVERSAL,T.Type.SET,!0,[t])])}function A2(e){return[T.create(T.Class.UNIVERSAL,T.Type.OID,!1,T.oidToDer(V.pki.oids.data).getBytes()),T.create(T.Class.UNIVERSAL,T.Type.SEQUENCE,!0,[T.create(T.Class.UNIVERSAL,T.Type.OID,!1,T.oidToDer(e.algorithm).getBytes()),e.parameter?T.create(T.Class.UNIVERSAL,T.Type.OCTETSTRING,!1,e.parameter.getBytes()):void 0]),T.create(T.Class.CONTEXT_SPECIFIC,0,!0,[T.create(T.Class.UNIVERSAL,T.Type.OCTETSTRING,!1,e.content.getBytes())])]}function xp(e,t,a){var r={},n=[];if(!T.validate(t,a,r,n)){var s=new Error("Cannot read PKCS#7 message. ASN.1 object is not a supported PKCS#7 message.");throw s.errors=s,s}var i=T.derToOid(r.contentType);if(i!==V.pki.oids.data)throw new Error("Unsupported PKCS#7 message. Only wrapped ContentType Data supported.");if(r.encryptedContent){var o="";if(V.util.isArray(r.encryptedContent))for(var c=0;c<r.encryptedContent.length;++c){if(r.encryptedContent[c].type!==T.Type.OCTETSTRING)throw new Error("Malformed PKCS#7 message, expecting encrypted content constructed of only OCTET STRING objects.");o+=r.encryptedContent[c].value}else o=r.encryptedContent;e.encryptedContent={algorithm:T.derToOid(r.encAlgorithm),parameter:V.util.createBuffer(r.encParameter.value),content:V.util.createBuffer(o)}}if(r.content){var o="";if(V.util.isArray(r.content))for(var c=0;c<r.content.length;++c){if(r.content[c].type!==T.Type.OCTETSTRING)throw new Error("Malformed PKCS#7 message, expecting content constructed of only OCTET STRING objects.");o+=r.content[c].value}else o=r.content;e.content=V.util.createBuffer(o)}return e.version=r.version.charCodeAt(0),e.rawCapture=r,r}function rm(e){if(e.encryptedContent.key===void 0)throw new Error("Symmetric key not available.");if(e.content===void 0){var t;switch(e.encryptedContent.algorithm){case V.pki.oids["aes128-CBC"]:case V.pki.oids["aes192-CBC"]:case V.pki.oids["aes256-CBC"]:t=V.aes.createDecryptionCipher(e.encryptedContent.key);break;case V.pki.oids.desCBC:case V.pki.oids["des-EDE3-CBC"]:t=V.des.createDecryptionCipher(e.encryptedContent.key);break;default:throw new Error("Unsupported symmetric cipher, OID "+e.encryptedContent.algorithm)}if(t.start(e.encryptedContent.parameter),t.update(e.encryptedContent.content),!t.finish())throw new Error("Symmetric decryption failed.");e.content=t.output}}var qe=ae,El=qe.ssh=qe.ssh||{};El.privateKeyToPutty=function(e,t,a){a=a||"",t=t||"";var r="ssh-rsa",n=t===""?"none":"aes256-cbc",s="PuTTY-User-Key-File-2: "+r+`\r
|
|
39
|
-
`;
|
|
40
|
-
`,
|
|
41
|
-
`;var
|
|
42
|
-
`,
|
|
11
|
+
`,a},kc.decode=function(e){for(var t=[],a=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,r=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,n=/\r?\n/,i;i=a.exec(e),!!i;){var s=i[1];s==="NEW CERTIFICATE REQUEST"&&(s="CERTIFICATE REQUEST");var o={type:s,procType:null,contentDomain:null,dekInfo:null,headers:[],body:Po.util.decode64(i[3])};if(t.push(o),!!i[2]){for(var c=i[2].split(n),l=0;i&&l<c.length;){for(var u=c[l].replace(/\s+$/,""),d=l+1;d<c.length;++d){var v=c[d];if(!/\s/.test(v[0]))break;u+=v,l=d}if(i=u.match(r),i){for(var E={name:i[1],values:[]},y=i[2].split(","),x=0;x<y.length;++x)E.values.push(Xf(y[x]));if(o.procType)if(!o.contentDomain&&E.name==="Content-Domain")o.contentDomain=y[0]||"";else if(!o.dekInfo&&E.name==="DEK-Info"){if(E.values.length===0)throw new Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');o.dekInfo={algorithm:y[0],parameters:y[1]||null}}else o.headers.push(E);else{if(E.name!=="Proc-Type")throw new Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');if(E.values.length!==2)throw new Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');o.procType={version:y[0],type:y[1]}}}++l}if(o.procType==="ENCRYPTED"&&!o.dekInfo)throw new Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".')}}if(t.length===0)throw new Error("Invalid PEM formatted message.");return t};function Oo(e){for(var t=e.name+": ",a=[],r=function(c,l){return" "+l},n=0;n<e.values.length;++n)a.push(e.values[n].replace(/^(\S+\r\n)/,r));t+=a.join(",")+`\r
|
|
12
|
+
`;for(var i=0,s=-1,n=0;n<t.length;++n,++i)if(i>65&&s!==-1){var o=t[s];o===","?(++s,t=t.substr(0,s)+`\r
|
|
13
|
+
`+t.substr(s)):t=t.substr(0,s)+`\r
|
|
14
|
+
`+o+t.substr(s+1),i=n-s-1,s=-1,++n}else(t[n]===" "||t[n]===" "||t[n]===",")&&(s=n);return t}function Xf(e){return e.replace(/^\s+/,"")}var he=X;he.des=he.des||{},he.des.startEncrypting=function(e,t,a,r){var n=Vo({key:e,output:a,decrypt:!1,mode:r||(t===null?"ECB":"CBC")});return n.start(t),n},he.des.createEncryptionCipher=function(e,t){return Vo({key:e,output:null,decrypt:!1,mode:t})},he.des.startDecrypting=function(e,t,a,r){var n=Vo({key:e,output:a,decrypt:!0,mode:r||(t===null?"ECB":"CBC")});return n.start(t),n},he.des.createDecryptionCipher=function(e,t){return Vo({key:e,output:null,decrypt:!0,mode:t})},he.des.Algorithm=function(e,t){var a=this;a.name=e,a.mode=new t({blockSize:8,cipher:{encrypt:function(r,n){return Lc(a._keys,r,n,!1)},decrypt:function(r,n){return Lc(a._keys,r,n,!0)}}}),a._init=!1},he.des.Algorithm.prototype.initialize=function(e){if(!this._init){var t=he.util.createBuffer(e.key);if(this.name.indexOf("3DES")===0&&t.length()!==24)throw new Error("Invalid Triple-DES key size: "+t.length()*8);this._keys=nd(t),this._init=!0}},It("DES-ECB",he.cipher.modes.ecb),It("DES-CBC",he.cipher.modes.cbc),It("DES-CFB",he.cipher.modes.cfb),It("DES-OFB",he.cipher.modes.ofb),It("DES-CTR",he.cipher.modes.ctr),It("3DES-ECB",he.cipher.modes.ecb),It("3DES-CBC",he.cipher.modes.cbc),It("3DES-CFB",he.cipher.modes.cfb),It("3DES-OFB",he.cipher.modes.ofb),It("3DES-CTR",he.cipher.modes.ctr);function It(e,t){var a=function(){return new he.des.Algorithm(e,t)};he.cipher.registerAlgorithm(e,a)}var Yf=[16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,0,65540,66560,0,16842756],Wf=[-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,-2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],Zf=[520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],Jf=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],ed=[256,34078976,34078720,1107296512,524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,524288,0,1074266112,34078976,1073742080],td=[536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,4194320,536887312,0,541081600,536870912,4194320,536887312],rd=[2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,67108866,67110912,2048,2097154],ad=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,268435456,268701696];function nd(e){for(var t=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,516,536871424,536871428,66048,66052,536936960,536936964],a=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],r=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],n=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],i=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],s=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],o=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],c=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],l=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],u=[0,268435456,8,268435464,0,268435456,8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],d=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],v=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],E=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],y=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],x=e.length()>8?3:1,b=[],A=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],w=0,N,F=0;F<x;F++){var U=e.getInt32(),L=e.getInt32();N=(U>>>4^L)&252645135,L^=N,U^=N<<4,N=(L>>>-16^U)&65535,U^=N,L^=N<<-16,N=(U>>>2^L)&858993459,L^=N,U^=N<<2,N=(L>>>-16^U)&65535,U^=N,L^=N<<-16,N=(U>>>1^L)&1431655765,L^=N,U^=N<<1,N=(L>>>8^U)&16711935,U^=N,L^=N<<8,N=(U>>>1^L)&1431655765,L^=N,U^=N<<1,N=U<<8|L>>>20&240,U=L<<24|L<<8&16711680|L>>>8&65280|L>>>24&240,L=N;for(var $=0;$<A.length;++$){A[$]?(U=U<<2|U>>>26,L=L<<2|L>>>26):(U=U<<1|U>>>27,L=L<<1|L>>>27),U&=-15,L&=-15;var Y=t[U>>>28]|a[U>>>24&15]|r[U>>>20&15]|n[U>>>16&15]|i[U>>>12&15]|s[U>>>8&15]|o[U>>>4&15],se=c[L>>>28]|l[L>>>24&15]|u[L>>>20&15]|d[L>>>16&15]|v[L>>>12&15]|E[L>>>8&15]|y[L>>>4&15];N=(se>>>16^Y)&65535,b[w++]=Y^N,b[w++]=se^N<<16}}return b}function Lc(e,t,a,r){var n=e.length===32?3:9,i;n===3?i=r?[30,-2,-2]:[0,32,2]:i=r?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var s,o=t[0],c=t[1];s=(o>>>4^c)&252645135,c^=s,o^=s<<4,s=(o>>>16^c)&65535,c^=s,o^=s<<16,s=(c>>>2^o)&858993459,o^=s,c^=s<<2,s=(c>>>8^o)&16711935,o^=s,c^=s<<8,s=(o>>>1^c)&1431655765,c^=s,o^=s<<1,o=o<<1|o>>>31,c=c<<1|c>>>31;for(var l=0;l<n;l+=3){for(var u=i[l+1],d=i[l+2],v=i[l];v!=u;v+=d){var E=c^e[v],y=(c>>>4|c<<28)^e[v+1];s=o,o=c,c=s^(Wf[E>>>24&63]|Jf[E>>>16&63]|td[E>>>8&63]|ad[E&63]|Yf[y>>>24&63]|Zf[y>>>16&63]|ed[y>>>8&63]|rd[y&63])}s=o,o=c,c=s}o=o>>>1|o<<31,c=c>>>1|c<<31,s=(o>>>1^c)&1431655765,c^=s,o^=s<<1,s=(c>>>8^o)&16711935,o^=s,c^=s<<8,s=(c>>>2^o)&858993459,o^=s,c^=s<<2,s=(o>>>16^c)&65535,c^=s,o^=s<<16,s=(o>>>4^c)&252645135,c^=s,o^=s<<4,a[0]=o,a[1]=c}function Vo(e){e=e||{};var t=(e.mode||"CBC").toUpperCase(),a="DES-"+t,r;e.decrypt?r=he.cipher.createDecipher(a,e.key):r=he.cipher.createCipher(a,e.key);var n=r.start;return r.start=function(i,s){var o=null;s instanceof he.util.ByteBuffer&&(o=s,s={}),s=s||{},s.output=o,s.iv=i,n.call(r,s)},r}var Xe=X,sd=Xe.pkcs5=Xe.pkcs5||{},Dt;Xe.util.isNodejs&&!Xe.options.usePureJavaScript&&(Dt=Bo),Xe.pbkdf2=sd.pbkdf2=function(e,t,a,r,n,i){if(typeof n=="function"&&(i=n,n=null),Xe.util.isNodejs&&!Xe.options.usePureJavaScript&&Dt.pbkdf2&&(n===null||typeof n!="object")&&(Dt.pbkdf2Sync.length>4||!n||n==="sha1"))return typeof n!="string"&&(n="sha1"),e=Buffer.from(e,"binary"),t=Buffer.from(t,"binary"),i?Dt.pbkdf2Sync.length===4?Dt.pbkdf2(e,t,a,r,function(N,F){if(N)return i(N);i(null,F.toString("binary"))}):Dt.pbkdf2(e,t,a,r,n,function(N,F){if(N)return i(N);i(null,F.toString("binary"))}):Dt.pbkdf2Sync.length===4?Dt.pbkdf2Sync(e,t,a,r).toString("binary"):Dt.pbkdf2Sync(e,t,a,r,n).toString("binary");if((typeof n>"u"||n===null)&&(n="sha1"),typeof n=="string"){if(!(n in Xe.md.algorithms))throw new Error("Unknown hash algorithm: "+n);n=Xe.md[n].create()}var s=n.digestLength;if(r>4294967295*s){var o=new Error("Derived key is too long.");if(i)return i(o);throw o}var c=Math.ceil(r/s),l=r-(c-1)*s,u=Xe.hmac.create();u.start(n,e);var d="",v,E,y;if(!i){for(var x=1;x<=c;++x){u.start(null,null),u.update(t),u.update(Xe.util.int32ToBytes(x)),v=y=u.digest().getBytes();for(var b=2;b<=a;++b)u.start(null,null),u.update(y),E=u.digest().getBytes(),v=Xe.util.xorBytes(v,E,s),y=E;d+=x<c?v:v.substr(0,l)}return d}var x=1,b;function A(){if(x>c)return i(null,d);u.start(null,null),u.update(t),u.update(Xe.util.int32ToBytes(x)),v=y=u.digest().getBytes(),b=2,w()}function w(){if(b<=a)return u.start(null,null),u.update(y),E=u.digest().getBytes(),v=Xe.util.xorBytes(v,E,s),y=E,++b,Xe.util.setImmediate(w);d+=x<c?v:v.substr(0,l),++x,A()}A()};var At=X,Dc=At.sha256=At.sha256||{};At.md.sha256=At.md.algorithms.sha256=Dc,Dc.create=function(){Uc||id();var e=null,t=At.util.createBuffer(),a=new Array(64),r={algorithm:"sha256",blockLength:64,digestLength:32,messageLength:0,fullMessageLength:null,messageLengthSize:8};return r.start=function(){r.messageLength=0,r.fullMessageLength=r.messageLength64=[];for(var n=r.messageLengthSize/4,i=0;i<n;++i)r.fullMessageLength.push(0);return t=At.util.createBuffer(),e={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225},r},r.start(),r.update=function(n,i){i==="utf8"&&(n=At.util.encodeUtf8(n));var s=n.length;r.messageLength+=s,s=[s/4294967296>>>0,s>>>0];for(var o=r.fullMessageLength.length-1;o>=0;--o)r.fullMessageLength[o]+=s[1],s[1]=s[0]+(r.fullMessageLength[o]/4294967296>>>0),r.fullMessageLength[o]=r.fullMessageLength[o]>>>0,s[0]=s[1]/4294967296>>>0;return t.putBytes(n),Oc(e,a,t),(t.read>2048||t.length()===0)&&t.compact(),r},r.digest=function(){var n=At.util.createBuffer();n.putBytes(t.bytes());var i=r.fullMessageLength[r.fullMessageLength.length-1]+r.messageLengthSize,s=i&r.blockLength-1;n.putBytes(x0.substr(0,r.blockLength-s));for(var o,c,l=r.fullMessageLength[0]*8,u=0;u<r.fullMessageLength.length-1;++u)o=r.fullMessageLength[u+1]*8,c=o/4294967296>>>0,l+=c,n.putInt32(l>>>0),l=o>>>0;n.putInt32(l);var d={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3,h4:e.h4,h5:e.h5,h6:e.h6,h7:e.h7};Oc(d,a,n);var v=At.util.createBuffer();return v.putInt32(d.h0),v.putInt32(d.h1),v.putInt32(d.h2),v.putInt32(d.h3),v.putInt32(d.h4),v.putInt32(d.h5),v.putInt32(d.h6),v.putInt32(d.h7),v},r};var x0=null,Uc=!1,Pc=null;function id(){x0="\x80",x0+=At.util.fillString("\0",64),Pc=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],Uc=!0}function Oc(e,t,a){for(var r,n,i,s,o,c,l,u,d,v,E,y,x,b,A,w=a.length();w>=64;){for(l=0;l<16;++l)t[l]=a.getInt32();for(;l<64;++l)r=t[l-2],r=(r>>>17|r<<15)^(r>>>19|r<<13)^r>>>10,n=t[l-15],n=(n>>>7|n<<25)^(n>>>18|n<<14)^n>>>3,t[l]=r+t[l-7]+n+t[l-16]|0;for(u=e.h0,d=e.h1,v=e.h2,E=e.h3,y=e.h4,x=e.h5,b=e.h6,A=e.h7,l=0;l<64;++l)s=(y>>>6|y<<26)^(y>>>11|y<<21)^(y>>>25|y<<7),o=b^y&(x^b),i=(u>>>2|u<<30)^(u>>>13|u<<19)^(u>>>22|u<<10),c=u&d|v&(u^d),r=A+s+o+Pc[l]+t[l],n=i+c,A=b,b=x,x=y,y=E+r>>>0,E=v,v=d,d=u,u=r+n>>>0;e.h0=e.h0+u|0,e.h1=e.h1+d|0,e.h2=e.h2+v|0,e.h3=e.h3+E|0,e.h4=e.h4+y|0,e.h5=e.h5+x|0,e.h6=e.h6+b|0,e.h7=e.h7+A|0,w-=64}}var Bt=X,Fo=null;Bt.util.isNodejs&&!Bt.options.usePureJavaScript&&!process.versions["node-webkit"]&&(Fo=Bo);var od=Bt.prng=Bt.prng||{};od.create=function(e){for(var t={plugin:e,key:null,seed:null,time:null,reseeds:0,generated:0,keyBytes:""},a=e.md,r=new Array(32),n=0;n<32;++n)r[n]=a.create();t.pools=r,t.pool=0,t.generate=function(l,u){if(!u)return t.generateSync(l);var d=t.plugin.cipher,v=t.plugin.increment,E=t.plugin.formatKey,y=t.plugin.formatSeed,x=Bt.util.createBuffer();t.key=null,b();function b(A){if(A)return u(A);if(x.length()>=l)return u(null,x.getBytes(l));if(t.generated>1048575&&(t.key=null),t.key===null)return Bt.util.nextTick(function(){i(b)});var w=d(t.key,t.seed);t.generated+=w.length,x.putBytes(w),t.key=E(d(t.key,v(t.seed))),t.seed=y(d(t.key,t.seed)),Bt.util.setImmediate(b)}},t.generateSync=function(l){var u=t.plugin.cipher,d=t.plugin.increment,v=t.plugin.formatKey,E=t.plugin.formatSeed;t.key=null;for(var y=Bt.util.createBuffer();y.length()<l;){t.generated>1048575&&(t.key=null),t.key===null&&s();var x=u(t.key,t.seed);t.generated+=x.length,y.putBytes(x),t.key=v(u(t.key,d(t.seed))),t.seed=E(u(t.key,t.seed))}return y.getBytes(l)};function i(l){if(t.pools[0].messageLength>=32)return o(),l();var u=32-t.pools[0].messageLength<<5;t.seedFile(u,function(d,v){if(d)return l(d);t.collect(v),o(),l()})}function s(){if(t.pools[0].messageLength>=32)return o();var l=32-t.pools[0].messageLength<<5;t.collect(t.seedFileSync(l)),o()}function o(){t.reseeds=t.reseeds===4294967295?0:t.reseeds+1;var l=t.plugin.md.create();l.update(t.keyBytes);for(var u=1,d=0;d<32;++d)t.reseeds%u===0&&(l.update(t.pools[d].digest().getBytes()),t.pools[d].start()),u=u<<1;t.keyBytes=l.digest().getBytes(),l.start(),l.update(t.keyBytes);var v=l.digest().getBytes();t.key=t.plugin.formatKey(t.keyBytes),t.seed=t.plugin.formatSeed(v),t.generated=0}function c(l){var u=null,d=Bt.util.globalScope,v=d.crypto||d.msCrypto;v&&v.getRandomValues&&(u=function(U){return v.getRandomValues(U)});var E=Bt.util.createBuffer();if(u)for(;E.length()<l;){var y=Math.max(1,Math.min(l-E.length(),65536)/4),x=new Uint32Array(Math.floor(y));try{u(x);for(var b=0;b<x.length;++b)E.putInt32(x[b])}catch(U){if(!(typeof QuotaExceededError<"u"&&U instanceof QuotaExceededError))throw U}}if(E.length()<l)for(var A,w,N,F=Math.floor(Math.random()*65536);E.length()<l;){w=16807*(F&65535),A=16807*(F>>16),w+=(A&32767)<<16,w+=A>>15,w=(w&2147483647)+(w>>31),F=w&4294967295;for(var b=0;b<3;++b)N=F>>>(b<<3),N^=Math.floor(Math.random()*256),E.putByte(N&255)}return E.getBytes(l)}return Fo?(t.seedFile=function(l,u){Fo.randomBytes(l,function(d,v){if(d)return u(d);u(null,v.toString())})},t.seedFileSync=function(l){return Fo.randomBytes(l).toString()}):(t.seedFile=function(l,u){try{u(null,c(l))}catch(d){u(d)}},t.seedFileSync=c),t.collect=function(l){for(var u=l.length,d=0;d<u;++d)t.pools[t.pool].update(l.substr(d,1)),t.pool=t.pool===31?0:t.pool+1},t.collectInt=function(l,u){for(var d="",v=0;v<u;v+=8)d+=String.fromCharCode(l>>v&255);t.collect(d)},t.registerWorker=function(l){if(l===self)t.seedFile=function(d,v){function E(y){var x=y.data;x.forge&&x.forge.prng&&(self.removeEventListener("message",E),v(x.forge.prng.err,x.forge.prng.bytes))}self.addEventListener("message",E),self.postMessage({forge:{prng:{needed:d}}})};else{var u=function(d){var v=d.data;v.forge&&v.forge.prng&&t.seedFile(v.forge.prng.needed,function(E,y){l.postMessage({forge:{prng:{err:E,bytes:y}}})})};l.addEventListener("message",u)}},t};var Ye=X;(function(){Ye.random&&Ye.random.getBytes||(function(e){var t={},a=new Array(4),r=Ye.util.createBuffer();t.formatKey=function(d){var v=Ye.util.createBuffer(d);return d=new Array(4),d[0]=v.getInt32(),d[1]=v.getInt32(),d[2]=v.getInt32(),d[3]=v.getInt32(),Ye.aes._expandKey(d,!1)},t.formatSeed=function(d){var v=Ye.util.createBuffer(d);return d=new Array(4),d[0]=v.getInt32(),d[1]=v.getInt32(),d[2]=v.getInt32(),d[3]=v.getInt32(),d},t.cipher=function(d,v){return Ye.aes._updateBlock(d,v,a,!1),r.putInt32(a[0]),r.putInt32(a[1]),r.putInt32(a[2]),r.putInt32(a[3]),r.getBytes()},t.increment=function(d){return++d[3],d},t.md=Ye.md.sha256;function n(){var d=Ye.prng.create(t);return d.getBytes=function(v,E){return d.generate(v,E)},d.getBytesSync=function(v){return d.generate(v)},d}var i=n(),s=null,o=Ye.util.globalScope,c=o.crypto||o.msCrypto;if(c&&c.getRandomValues&&(s=function(d){return c.getRandomValues(d)}),!Ye.util.isNodejs&&!s){if(i.collectInt(+new Date,32),typeof navigator<"u"){var l="";for(var u in navigator)try{typeof navigator[u]=="string"&&(l+=navigator[u])}catch{}i.collect(l),l=null}e&&(e().mousemove(function(d){i.collectInt(d.clientX,16),i.collectInt(d.clientY,16)}),e().keypress(function(d){i.collectInt(d.charCode,8)}))}if(!Ye.random)Ye.random=i;else for(var u in i)Ye.random[u]=i[u];Ye.random.createInstance=n})(typeof jQuery<"u"?jQuery:null)})();var ct=X,S0=[217,120,249,196,25,221,181,237,40,233,253,121,74,160,216,157,198,126,55,131,43,118,83,142,98,76,100,136,68,139,251,162,23,154,89,245,135,179,79,19,97,69,109,141,9,129,125,50,189,143,64,235,134,183,123,11,240,149,33,34,92,107,78,130,84,214,101,147,206,96,178,28,115,86,192,20,167,140,241,220,18,117,202,31,59,190,228,209,66,61,212,48,163,60,182,38,111,191,14,218,70,105,7,87,39,242,29,155,188,148,67,3,248,17,199,246,144,239,62,231,6,195,213,47,200,102,30,215,8,232,234,222,128,82,238,247,132,170,114,172,53,77,106,42,150,26,210,113,90,21,73,116,75,159,208,94,4,24,164,236,194,224,65,110,15,81,203,204,36,145,175,80,161,244,112,57,153,124,58,133,35,184,180,122,252,2,54,91,37,85,151,49,45,93,250,152,227,138,146,174,5,223,41,16,103,108,186,201,211,0,230,207,225,158,168,44,99,22,1,63,88,226,137,169,13,56,52,27,171,51,255,176,187,72,12,95,185,177,205,46,197,243,219,71,229,165,156,119,10,166,32,104,254,127,193,173],Vc=[1,2,3,5],cd=function(e,t){return e<<t&65535|(e&65535)>>16-t},ld=function(e,t){return(e&65535)>>t|e<<16-t&65535};ct.rc2=ct.rc2||{},ct.rc2.expandKey=function(e,t){typeof e=="string"&&(e=ct.util.createBuffer(e)),t=t||128;var a=e,r=e.length(),n=t,i=Math.ceil(n/8),s=255>>(n&7),o;for(o=r;o<128;o++)a.putByte(S0[a.at(o-1)+a.at(o-r)&255]);for(a.setAt(128-i,S0[a.at(128-i)&s]),o=127-i;o>=0;o--)a.setAt(o,S0[a.at(o+1)^a.at(o+i)]);return a};var Fc=function(e,t,a){var r=!1,n=null,i=null,s=null,o,c,l,u,d=[];for(e=ct.rc2.expandKey(e,t),l=0;l<64;l++)d.push(e.getInt16Le());a?(o=function(y){for(l=0;l<4;l++)y[l]+=d[u]+(y[(l+3)%4]&y[(l+2)%4])+(~y[(l+3)%4]&y[(l+1)%4]),y[l]=cd(y[l],Vc[l]),u++},c=function(y){for(l=0;l<4;l++)y[l]+=d[y[(l+3)%4]&63]}):(o=function(y){for(l=3;l>=0;l--)y[l]=ld(y[l],Vc[l]),y[l]-=d[u]+(y[(l+3)%4]&y[(l+2)%4])+(~y[(l+3)%4]&y[(l+1)%4]),u--},c=function(y){for(l=3;l>=0;l--)y[l]-=d[y[(l+3)%4]&63]});var v=function(y){var x=[];for(l=0;l<4;l++){var b=n.getInt16Le();s!==null&&(a?b^=s.getInt16Le():s.putInt16Le(b)),x.push(b&65535)}u=a?0:63;for(var A=0;A<y.length;A++)for(var w=0;w<y[A][0];w++)y[A][1](x);for(l=0;l<4;l++)s!==null&&(a?s.putInt16Le(x[l]):x[l]^=s.getInt16Le()),i.putInt16Le(x[l])},E=null;return E={start:function(y,x){y&&typeof y=="string"&&(y=ct.util.createBuffer(y)),r=!1,n=ct.util.createBuffer(),i=x||new ct.util.createBuffer,s=y,E.output=i},update:function(y){for(r||n.putBuffer(y);n.length()>=8;)v([[5,o],[1,c],[6,o],[1,c],[5,o]])},finish:function(y){var x=!0;if(a)if(y)x=y(8,n,!a);else{var b=n.length()===8?8:8-n.length();n.fillWithByte(b,b)}if(x&&(r=!0,E.update()),!a&&(x=n.length()===0,x))if(y)x=y(8,i,!a);else{var A=i.length(),w=i.at(A-1);w>A?x=!1:i.truncate(w)}return x}},E};ct.rc2.startEncrypting=function(e,t,a){var r=ct.rc2.createEncryptionCipher(e,128);return r.start(t,a),r},ct.rc2.createEncryptionCipher=function(e,t){return Fc(e,t,!0)},ct.rc2.startDecrypting=function(e,t,a){var r=ct.rc2.createDecryptionCipher(e,128);return r.start(t,a),r},ct.rc2.createDecryptionCipher=function(e,t){return Fc(e,t,!1)};var T0=X;T0.jsbn=T0.jsbn||{};var Ut;function _(e,t,a){this.data=[],e!=null&&(typeof e=="number"?this.fromNumber(e,t,a):t==null&&typeof e!="string"?this.fromString(e,256):this.fromString(e,t))}T0.jsbn.BigInteger=_;function te(){return new _(null)}function ud(e,t,a,r,n,i){for(;--i>=0;){var s=t*this.data[e++]+a.data[r]+n;n=Math.floor(s/67108864),a.data[r++]=s&67108863}return n}function fd(e,t,a,r,n,i){for(var s=t&32767,o=t>>15;--i>=0;){var c=this.data[e]&32767,l=this.data[e++]>>15,u=o*c+l*s;c=s*c+((u&32767)<<15)+a.data[r]+(n&1073741823),n=(c>>>30)+(u>>>15)+o*l+(n>>>30),a.data[r++]=c&1073741823}return n}function Mc(e,t,a,r,n,i){for(var s=t&16383,o=t>>14;--i>=0;){var c=this.data[e]&16383,l=this.data[e++]>>14,u=o*c+l*s;c=s*c+((u&16383)<<14)+a.data[r]+n,n=(c>>28)+(u>>14)+o*l,a.data[r++]=c&268435455}return n}typeof navigator>"u"?(_.prototype.am=Mc,Ut=28):navigator.appName=="Microsoft Internet Explorer"?(_.prototype.am=fd,Ut=30):navigator.appName!="Netscape"?(_.prototype.am=ud,Ut=26):(_.prototype.am=Mc,Ut=28),_.prototype.DB=Ut,_.prototype.DM=(1<<Ut)-1,_.prototype.DV=1<<Ut;var b0=52;_.prototype.FV=Math.pow(2,b0),_.prototype.F1=b0-Ut,_.prototype.F2=2*Ut-b0;var dd="0123456789abcdefghijklmnopqrstuvwxyz",Mo=new Array,ur,vt;for(ur=48,vt=0;vt<=9;++vt)Mo[ur++]=vt;for(ur=97,vt=10;vt<36;++vt)Mo[ur++]=vt;for(ur=65,vt=10;vt<36;++vt)Mo[ur++]=vt;function Kc(e){return dd.charAt(e)}function qc(e,t){var a=Mo[e.charCodeAt(t)];return a??-1}function pd(e){for(var t=this.t-1;t>=0;--t)e.data[t]=this.data[t];e.t=this.t,e.s=this.s}function hd(e){this.t=1,this.s=e<0?-1:0,e>0?this.data[0]=e:e<-1?this.data[0]=e+this.DV:this.t=0}function Kt(e){var t=te();return t.fromInt(e),t}function gd(e,t){var a;if(t==16)a=4;else if(t==8)a=3;else if(t==256)a=8;else if(t==2)a=1;else if(t==32)a=5;else if(t==4)a=2;else{this.fromRadix(e,t);return}this.t=0,this.s=0;for(var r=e.length,n=!1,i=0;--r>=0;){var s=a==8?e[r]&255:qc(e,r);if(s<0){e.charAt(r)=="-"&&(n=!0);continue}n=!1,i==0?this.data[this.t++]=s:i+a>this.DB?(this.data[this.t-1]|=(s&(1<<this.DB-i)-1)<<i,this.data[this.t++]=s>>this.DB-i):this.data[this.t-1]|=s<<i,i+=a,i>=this.DB&&(i-=this.DB)}a==8&&(e[0]&128)!=0&&(this.s=-1,i>0&&(this.data[this.t-1]|=(1<<this.DB-i)-1<<i)),this.clamp(),n&&_.ZERO.subTo(this,this)}function vd(){for(var e=this.s&this.DM;this.t>0&&this.data[this.t-1]==e;)--this.t}function yd(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(e==16)t=4;else if(e==8)t=3;else if(e==2)t=1;else if(e==32)t=5;else if(e==4)t=2;else return this.toRadix(e);var a=(1<<t)-1,r,n=!1,i="",s=this.t,o=this.DB-s*this.DB%t;if(s-- >0)for(o<this.DB&&(r=this.data[s]>>o)>0&&(n=!0,i=Kc(r));s>=0;)o<t?(r=(this.data[s]&(1<<o)-1)<<t-o,r|=this.data[--s]>>(o+=this.DB-t)):(r=this.data[s]>>(o-=t)&a,o<=0&&(o+=this.DB,--s)),r>0&&(n=!0),n&&(i+=Kc(r));return n?i:"0"}function md(){var e=te();return _.ZERO.subTo(this,e),e}function Ed(){return this.s<0?this.negate():this}function Cd(e){var t=this.s-e.s;if(t!=0)return t;var a=this.t;if(t=a-e.t,t!=0)return this.s<0?-t:t;for(;--a>=0;)if((t=this.data[a]-e.data[a])!=0)return t;return 0}function Ko(e){var t=1,a;return(a=e>>>16)!=0&&(e=a,t+=16),(a=e>>8)!=0&&(e=a,t+=8),(a=e>>4)!=0&&(e=a,t+=4),(a=e>>2)!=0&&(e=a,t+=2),(a=e>>1)!=0&&(e=a,t+=1),t}function xd(){return this.t<=0?0:this.DB*(this.t-1)+Ko(this.data[this.t-1]^this.s&this.DM)}function Sd(e,t){var a;for(a=this.t-1;a>=0;--a)t.data[a+e]=this.data[a];for(a=e-1;a>=0;--a)t.data[a]=0;t.t=this.t+e,t.s=this.s}function Td(e,t){for(var a=e;a<this.t;++a)t.data[a-e]=this.data[a];t.t=Math.max(this.t-e,0),t.s=this.s}function bd(e,t){var a=e%this.DB,r=this.DB-a,n=(1<<r)-1,i=Math.floor(e/this.DB),s=this.s<<a&this.DM,o;for(o=this.t-1;o>=0;--o)t.data[o+i+1]=this.data[o]>>r|s,s=(this.data[o]&n)<<a;for(o=i-1;o>=0;--o)t.data[o]=0;t.data[i]=s,t.t=this.t+i+1,t.s=this.s,t.clamp()}function Id(e,t){t.s=this.s;var a=Math.floor(e/this.DB);if(a>=this.t){t.t=0;return}var r=e%this.DB,n=this.DB-r,i=(1<<r)-1;t.data[0]=this.data[a]>>r;for(var s=a+1;s<this.t;++s)t.data[s-a-1]|=(this.data[s]&i)<<n,t.data[s-a]=this.data[s]>>r;r>0&&(t.data[this.t-a-1]|=(this.s&i)<<n),t.t=this.t-a,t.clamp()}function Ad(e,t){for(var a=0,r=0,n=Math.min(e.t,this.t);a<n;)r+=this.data[a]-e.data[a],t.data[a++]=r&this.DM,r>>=this.DB;if(e.t<this.t){for(r-=e.s;a<this.t;)r+=this.data[a],t.data[a++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;a<e.t;)r-=e.data[a],t.data[a++]=r&this.DM,r>>=this.DB;r-=e.s}t.s=r<0?-1:0,r<-1?t.data[a++]=this.DV+r:r>0&&(t.data[a++]=r),t.t=a,t.clamp()}function Bd(e,t){var a=this.abs(),r=e.abs(),n=a.t;for(t.t=n+r.t;--n>=0;)t.data[n]=0;for(n=0;n<r.t;++n)t.data[n+a.t]=a.am(0,r.data[n],t,n,0,a.t);t.s=0,t.clamp(),this.s!=e.s&&_.ZERO.subTo(t,t)}function wd(e){for(var t=this.abs(),a=e.t=2*t.t;--a>=0;)e.data[a]=0;for(a=0;a<t.t-1;++a){var r=t.am(a,t.data[a],e,2*a,0,1);(e.data[a+t.t]+=t.am(a+1,2*t.data[a],e,2*a+1,r,t.t-a-1))>=t.DV&&(e.data[a+t.t]-=t.DV,e.data[a+t.t+1]=1)}e.t>0&&(e.data[e.t-1]+=t.am(a,t.data[a],e,2*a,0,1)),e.s=0,e.clamp()}function Nd(e,t,a){var r=e.abs();if(!(r.t<=0)){var n=this.abs();if(n.t<r.t){t?.fromInt(0),a!=null&&this.copyTo(a);return}a==null&&(a=te());var i=te(),s=this.s,o=e.s,c=this.DB-Ko(r.data[r.t-1]);c>0?(r.lShiftTo(c,i),n.lShiftTo(c,a)):(r.copyTo(i),n.copyTo(a));var l=i.t,u=i.data[l-1];if(u!=0){var d=u*(1<<this.F1)+(l>1?i.data[l-2]>>this.F2:0),v=this.FV/d,E=(1<<this.F1)/d,y=1<<this.F2,x=a.t,b=x-l,A=t??te();for(i.dlShiftTo(b,A),a.compareTo(A)>=0&&(a.data[a.t++]=1,a.subTo(A,a)),_.ONE.dlShiftTo(l,A),A.subTo(i,i);i.t<l;)i.data[i.t++]=0;for(;--b>=0;){var w=a.data[--x]==u?this.DM:Math.floor(a.data[x]*v+(a.data[x-1]+y)*E);if((a.data[x]+=i.am(0,w,a,b,0,l))<w)for(i.dlShiftTo(b,A),a.subTo(A,a);a.data[x]<--w;)a.subTo(A,a)}t!=null&&(a.drShiftTo(l,t),s!=o&&_.ZERO.subTo(t,t)),a.t=l,a.clamp(),c>0&&a.rShiftTo(c,a),s<0&&_.ZERO.subTo(a,a)}}}function _d(e){var t=te();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(_.ZERO)>0&&e.subTo(t,t),t}function Wt(e){this.m=e}function Rd(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e}function kd(e){return e}function Ld(e){e.divRemTo(this.m,null,e)}function Dd(e,t,a){e.multiplyTo(t,a),this.reduce(a)}function Ud(e,t){e.squareTo(t),this.reduce(t)}Wt.prototype.convert=Rd,Wt.prototype.revert=kd,Wt.prototype.reduce=Ld,Wt.prototype.mulTo=Dd,Wt.prototype.sqrTo=Ud;function Pd(){if(this.t<1)return 0;var e=this.data[0];if((e&1)==0)return 0;var t=e&3;return t=t*(2-(e&15)*t)&15,t=t*(2-(e&255)*t)&255,t=t*(2-((e&65535)*t&65535))&65535,t=t*(2-e*t%this.DV)%this.DV,t>0?this.DV-t:-t}function Zt(e){this.m=e,this.mp=e.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}function Od(e){var t=te();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(_.ZERO)>0&&this.m.subTo(t,t),t}function Vd(e){var t=te();return e.copyTo(t),this.reduce(t),t}function Fd(e){for(;e.t<=this.mt2;)e.data[e.t++]=0;for(var t=0;t<this.m.t;++t){var a=e.data[t]&32767,r=a*this.mpl+((a*this.mph+(e.data[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(a=t+this.m.t,e.data[a]+=this.m.am(0,r,e,t,0,this.m.t);e.data[a]>=e.DV;)e.data[a]-=e.DV,e.data[++a]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)}function Md(e,t){e.squareTo(t),this.reduce(t)}function Kd(e,t,a){e.multiplyTo(t,a),this.reduce(a)}Zt.prototype.convert=Od,Zt.prototype.revert=Vd,Zt.prototype.reduce=Fd,Zt.prototype.mulTo=Kd,Zt.prototype.sqrTo=Md;function qd(){return(this.t>0?this.data[0]&1:this.s)==0}function Hd(e,t){if(e>4294967295||e<1)return _.ONE;var a=te(),r=te(),n=t.convert(this),i=Ko(e)-1;for(n.copyTo(a);--i>=0;)if(t.sqrTo(a,r),(e&1<<i)>0)t.mulTo(r,n,a);else{var s=a;a=r,r=s}return t.revert(a)}function Gd(e,t){var a;return e<256||t.isEven()?a=new Wt(t):a=new Zt(t),this.exp(e,a)}_.prototype.copyTo=pd,_.prototype.fromInt=hd,_.prototype.fromString=gd,_.prototype.clamp=vd,_.prototype.dlShiftTo=Sd,_.prototype.drShiftTo=Td,_.prototype.lShiftTo=bd,_.prototype.rShiftTo=Id,_.prototype.subTo=Ad,_.prototype.multiplyTo=Bd,_.prototype.squareTo=wd,_.prototype.divRemTo=Nd,_.prototype.invDigit=Pd,_.prototype.isEven=qd,_.prototype.exp=Hd,_.prototype.toString=yd,_.prototype.negate=md,_.prototype.abs=Ed,_.prototype.compareTo=Cd,_.prototype.bitLength=xd,_.prototype.mod=_d,_.prototype.modPowInt=Gd,_.ZERO=Kt(0),_.ONE=Kt(1);function zd(){var e=te();return this.copyTo(e),e}function $d(){if(this.s<0){if(this.t==1)return this.data[0]-this.DV;if(this.t==0)return-1}else{if(this.t==1)return this.data[0];if(this.t==0)return 0}return(this.data[1]&(1<<32-this.DB)-1)<<this.DB|this.data[0]}function Qd(){return this.t==0?this.s:this.data[0]<<24>>24}function jd(){return this.t==0?this.s:this.data[0]<<16>>16}function Xd(e){return Math.floor(Math.LN2*this.DB/Math.log(e))}function Yd(){return this.s<0?-1:this.t<=0||this.t==1&&this.data[0]<=0?0:1}function Wd(e){if(e==null&&(e=10),this.signum()==0||e<2||e>36)return"0";var t=this.chunkSize(e),a=Math.pow(e,t),r=Kt(a),n=te(),i=te(),s="";for(this.divRemTo(r,n,i);n.signum()>0;)s=(a+i.intValue()).toString(e).substr(1)+s,n.divRemTo(r,n,i);return i.intValue().toString(e)+s}function Zd(e,t){this.fromInt(0),t==null&&(t=10);for(var a=this.chunkSize(t),r=Math.pow(t,a),n=!1,i=0,s=0,o=0;o<e.length;++o){var c=qc(e,o);if(c<0){e.charAt(o)=="-"&&this.signum()==0&&(n=!0);continue}s=t*s+c,++i>=a&&(this.dMultiply(r),this.dAddOffset(s,0),i=0,s=0)}i>0&&(this.dMultiply(Math.pow(t,i)),this.dAddOffset(s,0)),n&&_.ZERO.subTo(this,this)}function Jd(e,t,a){if(typeof t=="number")if(e<2)this.fromInt(1);else for(this.fromNumber(e,a),this.testBit(e-1)||this.bitwiseTo(_.ONE.shiftLeft(e-1),I0,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(t);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(_.ONE.shiftLeft(e-1),this);else{var r=new Array,n=e&7;r.length=(e>>3)+1,t.nextBytes(r),n>0?r[0]&=(1<<n)-1:r[0]=0,this.fromString(r,256)}}function ep(){var e=this.t,t=new Array;t[0]=this.s;var a=this.DB-e*this.DB%8,r,n=0;if(e-- >0)for(a<this.DB&&(r=this.data[e]>>a)!=(this.s&this.DM)>>a&&(t[n++]=r|this.s<<this.DB-a);e>=0;)a<8?(r=(this.data[e]&(1<<a)-1)<<8-a,r|=this.data[--e]>>(a+=this.DB-8)):(r=this.data[e]>>(a-=8)&255,a<=0&&(a+=this.DB,--e)),(r&128)!=0&&(r|=-256),n==0&&(this.s&128)!=(r&128)&&++n,(n>0||r!=this.s)&&(t[n++]=r);return t}function tp(e){return this.compareTo(e)==0}function rp(e){return this.compareTo(e)<0?this:e}function ap(e){return this.compareTo(e)>0?this:e}function np(e,t,a){var r,n,i=Math.min(e.t,this.t);for(r=0;r<i;++r)a.data[r]=t(this.data[r],e.data[r]);if(e.t<this.t){for(n=e.s&this.DM,r=i;r<this.t;++r)a.data[r]=t(this.data[r],n);a.t=this.t}else{for(n=this.s&this.DM,r=i;r<e.t;++r)a.data[r]=t(n,e.data[r]);a.t=e.t}a.s=t(this.s,e.s),a.clamp()}function sp(e,t){return e&t}function ip(e){var t=te();return this.bitwiseTo(e,sp,t),t}function I0(e,t){return e|t}function op(e){var t=te();return this.bitwiseTo(e,I0,t),t}function Hc(e,t){return e^t}function cp(e){var t=te();return this.bitwiseTo(e,Hc,t),t}function Gc(e,t){return e&~t}function lp(e){var t=te();return this.bitwiseTo(e,Gc,t),t}function up(){for(var e=te(),t=0;t<this.t;++t)e.data[t]=this.DM&~this.data[t];return e.t=this.t,e.s=~this.s,e}function fp(e){var t=te();return e<0?this.rShiftTo(-e,t):this.lShiftTo(e,t),t}function dp(e){var t=te();return e<0?this.lShiftTo(-e,t):this.rShiftTo(e,t),t}function pp(e){if(e==0)return-1;var t=0;return(e&65535)==0&&(e>>=16,t+=16),(e&255)==0&&(e>>=8,t+=8),(e&15)==0&&(e>>=4,t+=4),(e&3)==0&&(e>>=2,t+=2),(e&1)==0&&++t,t}function hp(){for(var e=0;e<this.t;++e)if(this.data[e]!=0)return e*this.DB+pp(this.data[e]);return this.s<0?this.t*this.DB:-1}function gp(e){for(var t=0;e!=0;)e&=e-1,++t;return t}function vp(){for(var e=0,t=this.s&this.DM,a=0;a<this.t;++a)e+=gp(this.data[a]^t);return e}function yp(e){var t=Math.floor(e/this.DB);return t>=this.t?this.s!=0:(this.data[t]&1<<e%this.DB)!=0}function mp(e,t){var a=_.ONE.shiftLeft(e);return this.bitwiseTo(a,t,a),a}function Ep(e){return this.changeBit(e,I0)}function Cp(e){return this.changeBit(e,Gc)}function xp(e){return this.changeBit(e,Hc)}function Sp(e,t){for(var a=0,r=0,n=Math.min(e.t,this.t);a<n;)r+=this.data[a]+e.data[a],t.data[a++]=r&this.DM,r>>=this.DB;if(e.t<this.t){for(r+=e.s;a<this.t;)r+=this.data[a],t.data[a++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;a<e.t;)r+=e.data[a],t.data[a++]=r&this.DM,r>>=this.DB;r+=e.s}t.s=r<0?-1:0,r>0?t.data[a++]=r:r<-1&&(t.data[a++]=this.DV+r),t.t=a,t.clamp()}function Tp(e){var t=te();return this.addTo(e,t),t}function bp(e){var t=te();return this.subTo(e,t),t}function Ip(e){var t=te();return this.multiplyTo(e,t),t}function Ap(){var e=te();return this.squareTo(e),e}function Bp(e){var t=te();return this.divRemTo(e,t,null),t}function wp(e){var t=te();return this.divRemTo(e,null,t),t}function Np(e){var t=te(),a=te();return this.divRemTo(e,t,a),new Array(t,a)}function _p(e){this.data[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()}function Rp(e,t){if(e!=0){for(;this.t<=t;)this.data[this.t++]=0;for(this.data[t]+=e;this.data[t]>=this.DV;)this.data[t]-=this.DV,++t>=this.t&&(this.data[this.t++]=0),++this.data[t]}}function mo(){}function zc(e){return e}function kp(e,t,a){e.multiplyTo(t,a)}function Lp(e,t){e.squareTo(t)}mo.prototype.convert=zc,mo.prototype.revert=zc,mo.prototype.mulTo=kp,mo.prototype.sqrTo=Lp;function Dp(e){return this.exp(e,new mo)}function Up(e,t,a){var r=Math.min(this.t+e.t,t);for(a.s=0,a.t=r;r>0;)a.data[--r]=0;var n;for(n=a.t-this.t;r<n;++r)a.data[r+this.t]=this.am(0,e.data[r],a,r,0,this.t);for(n=Math.min(e.t,t);r<n;++r)this.am(0,e.data[r],a,r,0,t-r);a.clamp()}function Pp(e,t,a){--t;var r=a.t=this.t+e.t-t;for(a.s=0;--r>=0;)a.data[r]=0;for(r=Math.max(t-this.t,0);r<e.t;++r)a.data[this.t+r-t]=this.am(t-r,e.data[r],a,0,0,this.t+r-t);a.clamp(),a.drShiftTo(1,a)}function fr(e){this.r2=te(),this.q3=te(),_.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e),this.m=e}function Op(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var t=te();return e.copyTo(t),this.reduce(t),t}function Vp(e){return e}function Fp(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)}function Mp(e,t){e.squareTo(t),this.reduce(t)}function Kp(e,t,a){e.multiplyTo(t,a),this.reduce(a)}fr.prototype.convert=Op,fr.prototype.revert=Vp,fr.prototype.reduce=Fp,fr.prototype.mulTo=Kp,fr.prototype.sqrTo=Mp;function qp(e,t){var a=e.bitLength(),r,n=Kt(1),i;if(a<=0)return n;a<18?r=1:a<48?r=3:a<144?r=4:a<768?r=5:r=6,a<8?i=new Wt(t):t.isEven()?i=new fr(t):i=new Zt(t);var s=new Array,o=3,c=r-1,l=(1<<r)-1;if(s[1]=i.convert(this),r>1){var u=te();for(i.sqrTo(s[1],u);o<=l;)s[o]=te(),i.mulTo(u,s[o-2],s[o]),o+=2}var d=e.t-1,v,E=!0,y=te(),x;for(a=Ko(e.data[d])-1;d>=0;){for(a>=c?v=e.data[d]>>a-c&l:(v=(e.data[d]&(1<<a+1)-1)<<c-a,d>0&&(v|=e.data[d-1]>>this.DB+a-c)),o=r;(v&1)==0;)v>>=1,--o;if((a-=o)<0&&(a+=this.DB,--d),E)s[v].copyTo(n),E=!1;else{for(;o>1;)i.sqrTo(n,y),i.sqrTo(y,n),o-=2;o>0?i.sqrTo(n,y):(x=n,n=y,y=x),i.mulTo(y,s[v],n)}for(;d>=0&&(e.data[d]&1<<a)==0;)i.sqrTo(n,y),x=n,n=y,y=x,--a<0&&(a=this.DB-1,--d)}return i.revert(n)}function Hp(e){var t=this.s<0?this.negate():this.clone(),a=e.s<0?e.negate():e.clone();if(t.compareTo(a)<0){var r=t;t=a,a=r}var n=t.getLowestSetBit(),i=a.getLowestSetBit();if(i<0)return t;for(n<i&&(i=n),i>0&&(t.rShiftTo(i,t),a.rShiftTo(i,a));t.signum()>0;)(n=t.getLowestSetBit())>0&&t.rShiftTo(n,t),(n=a.getLowestSetBit())>0&&a.rShiftTo(n,a),t.compareTo(a)>=0?(t.subTo(a,t),t.rShiftTo(1,t)):(a.subTo(t,a),a.rShiftTo(1,a));return i>0&&a.lShiftTo(i,a),a}function Gp(e){if(e<=0)return 0;var t=this.DV%e,a=this.s<0?e-1:0;if(this.t>0)if(t==0)a=this.data[0]%e;else for(var r=this.t-1;r>=0;--r)a=(t*a+this.data[r])%e;return a}function zp(e){if(this.signum()==0)return _.ZERO;var t=e.isEven();if(this.isEven()&&t||e.signum()==0)return _.ZERO;for(var a=e.clone(),r=this.clone(),n=Kt(1),i=Kt(0),s=Kt(0),o=Kt(1);a.signum()!=0;){for(;a.isEven();)a.rShiftTo(1,a),t?((!n.isEven()||!i.isEven())&&(n.addTo(this,n),i.subTo(e,i)),n.rShiftTo(1,n)):i.isEven()||i.subTo(e,i),i.rShiftTo(1,i);for(;r.isEven();)r.rShiftTo(1,r),t?((!s.isEven()||!o.isEven())&&(s.addTo(this,s),o.subTo(e,o)),s.rShiftTo(1,s)):o.isEven()||o.subTo(e,o),o.rShiftTo(1,o);a.compareTo(r)>=0?(a.subTo(r,a),t&&n.subTo(s,n),i.subTo(o,i)):(r.subTo(a,r),t&&s.subTo(n,s),o.subTo(i,o))}if(r.compareTo(_.ONE)!=0)return _.ZERO;if(o.compareTo(e)>=0)return o.subtract(e);if(o.signum()<0)o.addTo(e,o);else return o;return o.signum()<0?o.add(e):o}var St=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],$p=(1<<26)/St[St.length-1];function Qp(e){var t,a=this.abs();if(a.t==1&&a.data[0]<=St[St.length-1]){for(t=0;t<St.length;++t)if(a.data[0]==St[t])return!0;return!1}if(a.isEven())return!1;for(t=1;t<St.length;){for(var r=St[t],n=t+1;n<St.length&&r<$p;)r*=St[n++];for(r=a.modInt(r);t<n;)if(r%St[t++]==0)return!1}return a.millerRabin(e)}function jp(e){var t=this.subtract(_.ONE),a=t.getLowestSetBit();if(a<=0)return!1;for(var r=t.shiftRight(a),n=Xp(),i,s=0;s<e;++s){do i=new _(this.bitLength(),n);while(i.compareTo(_.ONE)<=0||i.compareTo(t)>=0);var o=i.modPow(r,this);if(o.compareTo(_.ONE)!=0&&o.compareTo(t)!=0){for(var c=1;c++<a&&o.compareTo(t)!=0;)if(o=o.modPowInt(2,this),o.compareTo(_.ONE)==0)return!1;if(o.compareTo(t)!=0)return!1}}return!0}function Xp(){return{nextBytes:function(e){for(var t=0;t<e.length;++t)e[t]=Math.floor(Math.random()*256)}}}_.prototype.chunkSize=Xd,_.prototype.toRadix=Wd,_.prototype.fromRadix=Zd,_.prototype.fromNumber=Jd,_.prototype.bitwiseTo=np,_.prototype.changeBit=mp,_.prototype.addTo=Sp,_.prototype.dMultiply=_p,_.prototype.dAddOffset=Rp,_.prototype.multiplyLowerTo=Up,_.prototype.multiplyUpperTo=Pp,_.prototype.modInt=Gp,_.prototype.millerRabin=jp,_.prototype.clone=zd,_.prototype.intValue=$d,_.prototype.byteValue=Qd,_.prototype.shortValue=jd,_.prototype.signum=Yd,_.prototype.toByteArray=ep,_.prototype.equals=tp,_.prototype.min=rp,_.prototype.max=ap,_.prototype.and=ip,_.prototype.or=op,_.prototype.xor=cp,_.prototype.andNot=lp,_.prototype.not=up,_.prototype.shiftLeft=fp,_.prototype.shiftRight=dp,_.prototype.getLowestSetBit=hp,_.prototype.bitCount=vp,_.prototype.testBit=yp,_.prototype.setBit=Ep,_.prototype.clearBit=Cp,_.prototype.flipBit=xp,_.prototype.add=Tp,_.prototype.subtract=bp,_.prototype.multiply=Ip,_.prototype.divide=Bp,_.prototype.remainder=wp,_.prototype.divideAndRemainder=Np,_.prototype.modPow=qp,_.prototype.modInverse=zp,_.prototype.pow=Dp,_.prototype.gcd=Hp,_.prototype.isProbablePrime=Qp,_.prototype.square=Ap;var wt=X,$c=wt.sha1=wt.sha1||{};wt.md.sha1=wt.md.algorithms.sha1=$c,$c.create=function(){Qc||Yp();var e=null,t=wt.util.createBuffer(),a=new Array(80),r={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8};return r.start=function(){r.messageLength=0,r.fullMessageLength=r.messageLength64=[];for(var n=r.messageLengthSize/4,i=0;i<n;++i)r.fullMessageLength.push(0);return t=wt.util.createBuffer(),e={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520},r},r.start(),r.update=function(n,i){i==="utf8"&&(n=wt.util.encodeUtf8(n));var s=n.length;r.messageLength+=s,s=[s/4294967296>>>0,s>>>0];for(var o=r.fullMessageLength.length-1;o>=0;--o)r.fullMessageLength[o]+=s[1],s[1]=s[0]+(r.fullMessageLength[o]/4294967296>>>0),r.fullMessageLength[o]=r.fullMessageLength[o]>>>0,s[0]=s[1]/4294967296>>>0;return t.putBytes(n),jc(e,a,t),(t.read>2048||t.length()===0)&&t.compact(),r},r.digest=function(){var n=wt.util.createBuffer();n.putBytes(t.bytes());var i=r.fullMessageLength[r.fullMessageLength.length-1]+r.messageLengthSize,s=i&r.blockLength-1;n.putBytes(A0.substr(0,r.blockLength-s));for(var o,c,l=r.fullMessageLength[0]*8,u=0;u<r.fullMessageLength.length-1;++u)o=r.fullMessageLength[u+1]*8,c=o/4294967296>>>0,l+=c,n.putInt32(l>>>0),l=o>>>0;n.putInt32(l);var d={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3,h4:e.h4};jc(d,a,n);var v=wt.util.createBuffer();return v.putInt32(d.h0),v.putInt32(d.h1),v.putInt32(d.h2),v.putInt32(d.h3),v.putInt32(d.h4),v},r};var A0=null,Qc=!1;function Yp(){A0="\x80",A0+=wt.util.fillString("\0",64),Qc=!0}function jc(e,t,a){for(var r,n,i,s,o,c,l,u,d=a.length();d>=64;){for(n=e.h0,i=e.h1,s=e.h2,o=e.h3,c=e.h4,u=0;u<16;++u)r=a.getInt32(),t[u]=r,l=o^i&(s^o),r=(n<<5|n>>>27)+l+c+1518500249+r,c=o,o=s,s=(i<<30|i>>>2)>>>0,i=n,n=r;for(;u<20;++u)r=t[u-3]^t[u-8]^t[u-14]^t[u-16],r=r<<1|r>>>31,t[u]=r,l=o^i&(s^o),r=(n<<5|n>>>27)+l+c+1518500249+r,c=o,o=s,s=(i<<30|i>>>2)>>>0,i=n,n=r;for(;u<32;++u)r=t[u-3]^t[u-8]^t[u-14]^t[u-16],r=r<<1|r>>>31,t[u]=r,l=i^s^o,r=(n<<5|n>>>27)+l+c+1859775393+r,c=o,o=s,s=(i<<30|i>>>2)>>>0,i=n,n=r;for(;u<40;++u)r=t[u-6]^t[u-16]^t[u-28]^t[u-32],r=r<<2|r>>>30,t[u]=r,l=i^s^o,r=(n<<5|n>>>27)+l+c+1859775393+r,c=o,o=s,s=(i<<30|i>>>2)>>>0,i=n,n=r;for(;u<60;++u)r=t[u-6]^t[u-16]^t[u-28]^t[u-32],r=r<<2|r>>>30,t[u]=r,l=i&s|o&(i^s),r=(n<<5|n>>>27)+l+c+2400959708+r,c=o,o=s,s=(i<<30|i>>>2)>>>0,i=n,n=r;for(;u<80;++u)r=t[u-6]^t[u-16]^t[u-28]^t[u-32],r=r<<2|r>>>30,t[u]=r,l=i^s^o,r=(n<<5|n>>>27)+l+c+3395469782+r,c=o,o=s,s=(i<<30|i>>>2)>>>0,i=n,n=r;e.h0=e.h0+n|0,e.h1=e.h1+i|0,e.h2=e.h2+s|0,e.h3=e.h3+o|0,e.h4=e.h4+c|0,d-=64}}var Nt=X,Xc=Nt.pkcs1=Nt.pkcs1||{};Xc.encode_rsa_oaep=function(e,t,a){var r,n,i,s;typeof a=="string"?(r=a,n=arguments[3]||void 0,i=arguments[4]||void 0):a&&(r=a.label||void 0,n=a.seed||void 0,i=a.md||void 0,a.mgf1&&a.mgf1.md&&(s=a.mgf1.md)),i?i.start():i=Nt.md.sha1.create(),s||(s=i);var o=Math.ceil(e.n.bitLength()/8),c=o-2*i.digestLength-2;if(t.length>c){var l=new Error("RSAES-OAEP input message length is too long.");throw l.length=t.length,l.maxLength=c,l}r||(r=""),i.update(r,"raw");for(var u=i.digest(),d="",v=c-t.length,E=0;E<v;E++)d+="\0";var y=u.getBytes()+d+""+t;if(!n)n=Nt.random.getBytes(i.digestLength);else if(n.length!==i.digestLength){var l=new Error("Invalid RSAES-OAEP seed. The seed length must match the digest length.");throw l.seedLength=n.length,l.digestLength=i.digestLength,l}var x=qo(n,o-i.digestLength-1,s),b=Nt.util.xorBytes(y,x,y.length),A=qo(b,i.digestLength,s),w=Nt.util.xorBytes(n,A,n.length);return"\0"+w+b},Xc.decode_rsa_oaep=function(e,t,a){var r,n,i;typeof a=="string"?(r=a,n=arguments[3]||void 0):a&&(r=a.label||void 0,n=a.md||void 0,a.mgf1&&a.mgf1.md&&(i=a.mgf1.md));var s=Math.ceil(e.n.bitLength()/8);if(t.length!==s){var b=new Error("RSAES-OAEP encoded message length is invalid.");throw b.length=t.length,b.expectedLength=s,b}if(n===void 0?n=Nt.md.sha1.create():n.start(),i||(i=n),s<2*n.digestLength+2)throw new Error("RSAES-OAEP key is too short for the hash function.");r||(r=""),n.update(r,"raw");for(var o=n.digest().getBytes(),c=t.charAt(0),l=t.substring(1,n.digestLength+1),u=t.substring(1+n.digestLength),d=qo(u,n.digestLength,i),v=Nt.util.xorBytes(l,d,l.length),E=qo(v,s-n.digestLength-1,i),y=Nt.util.xorBytes(u,E,u.length),x=y.substring(0,n.digestLength),b=c!=="\0",A=0;A<n.digestLength;++A)b|=o.charAt(A)!==x.charAt(A);for(var w=1,N=n.digestLength,F=n.digestLength;F<y.length;F++){var U=y.charCodeAt(F),L=U&1^1,$=w?65534:0;b|=U&$,w=w&L,N+=w}if(b||y.charCodeAt(N)!==1)throw new Error("Invalid RSAES-OAEP padding.");return y.substring(N+1)};function qo(e,t,a){a||(a=Nt.md.sha1.create());for(var r="",n=Math.ceil(t/a.digestLength),i=0;i<n;++i){var s=String.fromCharCode(i>>24&255,i>>16&255,i>>8&255,i&255);a.start(),a.update(e+s),r+=a.digest().getBytes()}return r.substring(0,t)}var Jt=X;(function(){if(Jt.prime)return;var e=Jt.prime=Jt.prime||{},t=Jt.jsbn.BigInteger,a=[6,4,2,4,2,4,6,2],r=new t(null);r.fromInt(30);var n=function(d,v){return d|v};e.generateProbablePrime=function(d,v,E){typeof v=="function"&&(E=v,v={}),v=v||{};var y=v.algorithm||"PRIMEINC";typeof y=="string"&&(y={name:y}),y.options=y.options||{};var x=v.prng||Jt.random,b={nextBytes:function(A){for(var w=x.getBytesSync(A.length),N=0;N<A.length;++N)A[N]=w.charCodeAt(N)}};if(y.name==="PRIMEINC")return i(d,b,y.options,E);throw new Error("Invalid prime generation algorithm: "+y.name)};function i(d,v,E,y){return"workers"in E?c(d,v,E,y):s(d,v,E,y)}function s(d,v,E,y){var x=l(d,v),b=0,A=u(x.bitLength());"millerRabinTests"in E&&(A=E.millerRabinTests);var w=10;"maxBlockTime"in E&&(w=E.maxBlockTime),o(x,d,v,b,A,w,y)}function o(d,v,E,y,x,b,A){var w=+new Date;do{if(d.bitLength()>v&&(d=l(v,E)),d.isProbablePrime(x))return A(null,d);d.dAddOffset(a[y++%8],0)}while(b<0||+new Date-w<b);Jt.util.setImmediate(function(){o(d,v,E,y,x,b,A)})}function c(d,v,E,y){if(typeof Worker>"u")return s(d,v,E,y);var x=l(d,v),b=E.workers,A=E.workLoad||100,w=A*30/8,N=E.workerScript||"forge/prime.worker.js";if(b===-1)return Jt.util.estimateCores(function(U,L){U&&(L=2),b=L-1,F()});F();function F(){b=Math.max(1,b);for(var U=[],L=0;L<b;++L)U[L]=new Worker(N);for(var L=0;L<b;++L)U[L].addEventListener("message",Y);var $=!1;function Y(se){if(!$){var ie=se.data;if(ie.found){for(var oe=0;oe<U.length;++oe)U[oe].terminate();return $=!0,y(null,new t(ie.prime,16))}x.bitLength()>d&&(x=l(d,v));var ge=x.toString(16);se.target.postMessage({hex:ge,workLoad:A}),x.dAddOffset(w,0)}}}}function l(d,v){var E=new t(d,v),y=d-1;return E.testBit(y)||E.bitwiseTo(t.ONE.shiftLeft(y),n,E),E.dAddOffset(31-E.mod(r).byteValue(),0),E}function u(d){return d<=100?27:d<=150?18:d<=200?15:d<=250?12:d<=300?9:d<=350?8:d<=400?7:d<=500?6:d<=600?5:d<=800?4:d<=1250?3:2}})();var H=X;if(typeof ae>"u")var ae=H.jsbn.BigInteger;var B0=H.util.isNodejs?Bo:null,I=H.asn1,yt=H.util;H.pki=H.pki||{},H.pki.rsa=H.rsa=H.rsa||{};var Q=H.pki,Wp=[6,4,2,4,2,4,6,2],Zp={name:"PrivateKeyInfo",tagClass:I.Class.UNIVERSAL,type:I.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:I.Class.UNIVERSAL,type:I.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:I.Class.UNIVERSAL,type:I.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:I.Class.UNIVERSAL,type:I.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:I.Class.UNIVERSAL,type:I.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},Jp={name:"RSAPrivateKey",tagClass:I.Class.UNIVERSAL,type:I.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:I.Class.UNIVERSAL,type:I.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",tagClass:I.Class.UNIVERSAL,type:I.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:I.Class.UNIVERSAL,type:I.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:I.Class.UNIVERSAL,type:I.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:I.Class.UNIVERSAL,type:I.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",tagClass:I.Class.UNIVERSAL,type:I.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:I.Class.UNIVERSAL,type:I.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:I.Class.UNIVERSAL,type:I.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:I.Class.UNIVERSAL,type:I.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},eh={name:"RSAPublicKey",tagClass:I.Class.UNIVERSAL,type:I.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:I.Class.UNIVERSAL,type:I.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:I.Class.UNIVERSAL,type:I.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},th=H.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:I.Class.UNIVERSAL,type:I.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:I.Class.UNIVERSAL,type:I.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:I.Class.UNIVERSAL,type:I.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:I.Class.UNIVERSAL,type:I.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:I.Class.UNIVERSAL,type:I.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},rh={name:"DigestInfo",tagClass:I.Class.UNIVERSAL,type:I.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm",tagClass:I.Class.UNIVERSAL,type:I.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm.algorithmIdentifier",tagClass:I.Class.UNIVERSAL,type:I.Type.OID,constructed:!1,capture:"algorithmIdentifier"},{name:"DigestInfo.DigestAlgorithm.parameters",tagClass:I.Class.UNIVERSAL,type:I.Type.NULL,capture:"parameters",optional:!0,constructed:!1}]},{name:"DigestInfo.digest",tagClass:I.Class.UNIVERSAL,type:I.Type.OCTETSTRING,constructed:!1,capture:"digest"}]},ah=function(e){var t;if(e.algorithm in Q.oids)t=Q.oids[e.algorithm];else{var a=new Error("Unknown message digest algorithm.");throw a.algorithm=e.algorithm,a}var r=I.oidToDer(t).getBytes(),n=I.create(I.Class.UNIVERSAL,I.Type.SEQUENCE,!0,[]),i=I.create(I.Class.UNIVERSAL,I.Type.SEQUENCE,!0,[]);i.value.push(I.create(I.Class.UNIVERSAL,I.Type.OID,!1,r)),i.value.push(I.create(I.Class.UNIVERSAL,I.Type.NULL,!1,""));var s=I.create(I.Class.UNIVERSAL,I.Type.OCTETSTRING,!1,e.digest().getBytes());return n.value.push(i),n.value.push(s),I.toDer(n).getBytes()},Yc=function(e,t,a){if(a)return e.modPow(t.e,t.n);if(!t.p||!t.q)return e.modPow(t.d,t.n);t.dP||(t.dP=t.d.mod(t.p.subtract(ae.ONE))),t.dQ||(t.dQ=t.d.mod(t.q.subtract(ae.ONE))),t.qInv||(t.qInv=t.q.modInverse(t.p));var r;do r=new ae(H.util.bytesToHex(H.random.getBytes(t.n.bitLength()/8)),16);while(r.compareTo(t.n)>=0||!r.gcd(t.n).equals(ae.ONE));e=e.multiply(r.modPow(t.e,t.n)).mod(t.n);for(var n=e.mod(t.p).modPow(t.dP,t.p),i=e.mod(t.q).modPow(t.dQ,t.q);n.compareTo(i)<0;)n=n.add(t.p);var s=n.subtract(i).multiply(t.qInv).mod(t.p).multiply(t.q).add(i);return s=s.multiply(r.modInverse(t.n)).mod(t.n),s};Q.rsa.encrypt=function(e,t,a){var r=a,n,i=Math.ceil(t.n.bitLength()/8);a!==!1&&a!==!0?(r=a===2,n=Wc(e,t,a)):(n=H.util.createBuffer(),n.putBytes(e));for(var s=new ae(n.toHex(),16),o=Yc(s,t,r),c=o.toString(16),l=H.util.createBuffer(),u=i-Math.ceil(c.length/2);u>0;)l.putByte(0),--u;return l.putBytes(H.util.hexToBytes(c)),l.getBytes()},Q.rsa.decrypt=function(e,t,a,r){var n=Math.ceil(t.n.bitLength()/8);if(e.length!==n){var i=new Error("Encrypted message length is invalid.");throw i.length=e.length,i.expected=n,i}var s=new ae(H.util.createBuffer(e).toHex(),16);if(s.compareTo(t.n)>=0)throw new Error("Encrypted message is invalid.");for(var o=Yc(s,t,a),c=o.toString(16),l=H.util.createBuffer(),u=n-Math.ceil(c.length/2);u>0;)l.putByte(0),--u;return l.putBytes(H.util.hexToBytes(c)),r!==!1?Ho(l.getBytes(),t,a):l.getBytes()},Q.rsa.createKeyPairGenerationState=function(e,t,a){typeof e=="string"&&(e=parseInt(e,10)),e=e||2048,a=a||{};var r=a.prng||H.random,n={nextBytes:function(o){for(var c=r.getBytesSync(o.length),l=0;l<o.length;++l)o[l]=c.charCodeAt(l)}},i=a.algorithm||"PRIMEINC",s;if(i==="PRIMEINC")s={algorithm:i,state:0,bits:e,rng:n,eInt:t||65537,e:new ae(null),p:null,q:null,qBits:e>>1,pBits:e-(e>>1),pqState:0,num:null,keys:null},s.e.fromInt(s.eInt);else throw new Error("Invalid key generation algorithm: "+i);return s},Q.rsa.stepKeyPairGenerationState=function(e,t){"algorithm"in e||(e.algorithm="PRIMEINC");var a=new ae(null);a.fromInt(30);for(var r=0,n=function(d,v){return d|v},i=+new Date,s,o=0;e.keys===null&&(t<=0||o<t);){if(e.state===0){var c=e.p===null?e.pBits:e.qBits,l=c-1;e.pqState===0?(e.num=new ae(c,e.rng),e.num.testBit(l)||e.num.bitwiseTo(ae.ONE.shiftLeft(l),n,e.num),e.num.dAddOffset(31-e.num.mod(a).byteValue(),0),r=0,++e.pqState):e.pqState===1?e.num.bitLength()>c?e.pqState=0:e.num.isProbablePrime(sh(e.num.bitLength()))?++e.pqState:e.num.dAddOffset(Wp[r++%8],0):e.pqState===2?e.pqState=e.num.subtract(ae.ONE).gcd(e.e).compareTo(ae.ONE)===0?3:0:e.pqState===3&&(e.pqState=0,e.p===null?e.p=e.num:e.q=e.num,e.p!==null&&e.q!==null&&++e.state,e.num=null)}else if(e.state===1)e.p.compareTo(e.q)<0&&(e.num=e.p,e.p=e.q,e.q=e.num),++e.state;else if(e.state===2)e.p1=e.p.subtract(ae.ONE),e.q1=e.q.subtract(ae.ONE),e.phi=e.p1.multiply(e.q1),++e.state;else if(e.state===3)e.phi.gcd(e.e).compareTo(ae.ONE)===0?++e.state:(e.p=null,e.q=null,e.state=0);else if(e.state===4)e.n=e.p.multiply(e.q),e.n.bitLength()===e.bits?++e.state:(e.q=null,e.state=0);else if(e.state===5){var u=e.e.modInverse(e.phi);e.keys={privateKey:Q.rsa.setPrivateKey(e.n,e.e,u,e.p,e.q,u.mod(e.p1),u.mod(e.q1),e.q.modInverse(e.p)),publicKey:Q.rsa.setPublicKey(e.n,e.e)}}s=+new Date,o+=s-i,i=s}return e.keys!==null},Q.rsa.generateKeyPair=function(e,t,a,r){if(arguments.length===1?typeof e=="object"?(a=e,e=void 0):typeof e=="function"&&(r=e,e=void 0):arguments.length===2?typeof e=="number"?typeof t=="function"?(r=t,t=void 0):typeof t!="number"&&(a=t,t=void 0):(a=e,r=t,e=void 0,t=void 0):arguments.length===3&&(typeof t=="number"?typeof a=="function"&&(r=a,a=void 0):(r=a,a=t,t=void 0)),a=a||{},e===void 0&&(e=a.bits||2048),t===void 0&&(t=a.e||65537),!a.prng&&e>=256&&e<=16384&&(t===65537||t===3)){if(r){if(Zc("generateKeyPair"))return B0.generateKeyPair("rsa",{modulusLength:e,publicExponent:t,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}},function(o,c,l){if(o)return r(o);r(null,{privateKey:Q.privateKeyFromPem(l),publicKey:Q.publicKeyFromPem(c)})});if(Jc("generateKey")&&Jc("exportKey"))return yt.globalScope.crypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:tl(t),hash:{name:"SHA-256"}},!0,["sign","verify"]).then(function(o){return yt.globalScope.crypto.subtle.exportKey("pkcs8",o.privateKey)}).then(void 0,function(o){r(o)}).then(function(o){if(o){var c=Q.privateKeyFromAsn1(I.fromDer(H.util.createBuffer(o)));r(null,{privateKey:c,publicKey:Q.setRsaPublicKey(c.n,c.e)})}});if(el("generateKey")&&el("exportKey")){var n=yt.globalScope.msCrypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:tl(t),hash:{name:"SHA-256"}},!0,["sign","verify"]);n.oncomplete=function(o){var c=o.target.result,l=yt.globalScope.msCrypto.subtle.exportKey("pkcs8",c.privateKey);l.oncomplete=function(u){var d=u.target.result,v=Q.privateKeyFromAsn1(I.fromDer(H.util.createBuffer(d)));r(null,{privateKey:v,publicKey:Q.setRsaPublicKey(v.n,v.e)})},l.onerror=function(u){r(u)}},n.onerror=function(o){r(o)};return}}else if(Zc("generateKeyPairSync")){var i=B0.generateKeyPairSync("rsa",{modulusLength:e,publicExponent:t,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}});return{privateKey:Q.privateKeyFromPem(i.privateKey),publicKey:Q.publicKeyFromPem(i.publicKey)}}}var s=Q.rsa.createKeyPairGenerationState(e,t,a);if(!r)return Q.rsa.stepKeyPairGenerationState(s,0),s.keys;nh(s,a,r)},Q.setRsaPublicKey=Q.rsa.setPublicKey=function(e,t){var a={n:e,e:t};return a.encrypt=function(r,n,i){if(typeof n=="string"?n=n.toUpperCase():n===void 0&&(n="RSAES-PKCS1-V1_5"),n==="RSAES-PKCS1-V1_5")n={encode:function(o,c,l){return Wc(o,c,2).getBytes()}};else if(n==="RSA-OAEP"||n==="RSAES-OAEP")n={encode:function(o,c){return H.pkcs1.encode_rsa_oaep(c,o,i)}};else if(["RAW","NONE","NULL",null].indexOf(n)!==-1)n={encode:function(o){return o}};else if(typeof n=="string")throw new Error('Unsupported encryption scheme: "'+n+'".');var s=n.encode(r,a,!0);return Q.rsa.encrypt(s,a,!0)},a.verify=function(r,n,i,s){typeof i=="string"?i=i.toUpperCase():i===void 0&&(i="RSASSA-PKCS1-V1_5"),s===void 0&&(s={_parseAllDigestBytes:!0,_skipPaddingChecks:!1}),"_parseAllDigestBytes"in s||(s._parseAllDigestBytes=!0),"_skipPaddingChecks"in s||(s._skipPaddingChecks=!1),i==="RSASSA-PKCS1-V1_5"?i={verify:function(c,l){l=Ho(l,a,!0,void 0,s);var u=I.fromDer(l,{parseAllBytes:s._parseAllDigestBytes}),d={},v=[];if(!I.validate(u,rh,d,v)||u.value.length!==2){var E=new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value.");throw E.errors=v,E}var y=I.derToOid(d.algorithmIdentifier);if(!(y===H.oids.md2||y===H.oids.md5||y===H.oids.sha1||y===H.oids.sha224||y===H.oids.sha256||y===H.oids.sha384||y===H.oids.sha512||y===H.oids["sha512-224"]||y===H.oids["sha512-256"])){var E=new Error("Unknown RSASSA-PKCS1-v1_5 DigestAlgorithm identifier.");throw E.oid=y,E}if((y===H.oids.md2||y===H.oids.md5)&&!("parameters"in d))throw new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value. Missing algorithm identifier NULL parameters.");return c===d.digest}}:(i==="NONE"||i==="NULL"||i===null)&&(i={verify:function(c,l){return l=Ho(l,a,!0,void 0,s),c===l}});var o=Q.rsa.decrypt(n,a,!0,!1);return i.verify(r,o,a.n.bitLength())},a},Q.setRsaPrivateKey=Q.rsa.setPrivateKey=function(e,t,a,r,n,i,s,o){var c={n:e,e:t,d:a,p:r,q:n,dP:i,dQ:s,qInv:o};return c.decrypt=function(l,u,d){typeof u=="string"?u=u.toUpperCase():u===void 0&&(u="RSAES-PKCS1-V1_5");var v=Q.rsa.decrypt(l,c,!1,!1);if(u==="RSAES-PKCS1-V1_5")u={decode:Ho};else if(u==="RSA-OAEP"||u==="RSAES-OAEP")u={decode:function(E,y){return H.pkcs1.decode_rsa_oaep(y,E,d)}};else if(["RAW","NONE","NULL",null].indexOf(u)!==-1)u={decode:function(E){return E}};else throw new Error('Unsupported encryption scheme: "'+u+'".');return u.decode(v,c,!1)},c.sign=function(l,u){var d=!1;typeof u=="string"&&(u=u.toUpperCase()),u===void 0||u==="RSASSA-PKCS1-V1_5"?(u={encode:ah},d=1):(u==="NONE"||u==="NULL"||u===null)&&(u={encode:function(){return l}},d=1);var v=u.encode(l,c.n.bitLength());return Q.rsa.encrypt(v,c,d)},c},Q.wrapRsaPrivateKey=function(e){return I.create(I.Class.UNIVERSAL,I.Type.SEQUENCE,!0,[I.create(I.Class.UNIVERSAL,I.Type.INTEGER,!1,I.integerToDer(0).getBytes()),I.create(I.Class.UNIVERSAL,I.Type.SEQUENCE,!0,[I.create(I.Class.UNIVERSAL,I.Type.OID,!1,I.oidToDer(Q.oids.rsaEncryption).getBytes()),I.create(I.Class.UNIVERSAL,I.Type.NULL,!1,"")]),I.create(I.Class.UNIVERSAL,I.Type.OCTETSTRING,!1,I.toDer(e).getBytes())])},Q.privateKeyFromAsn1=function(e){var t={},a=[];if(I.validate(e,Zp,t,a)&&(e=I.fromDer(H.util.createBuffer(t.privateKey))),t={},a=[],!I.validate(e,Jp,t,a)){var r=new Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey.");throw r.errors=a,r}var n,i,s,o,c,l,u,d;return n=H.util.createBuffer(t.privateKeyModulus).toHex(),i=H.util.createBuffer(t.privateKeyPublicExponent).toHex(),s=H.util.createBuffer(t.privateKeyPrivateExponent).toHex(),o=H.util.createBuffer(t.privateKeyPrime1).toHex(),c=H.util.createBuffer(t.privateKeyPrime2).toHex(),l=H.util.createBuffer(t.privateKeyExponent1).toHex(),u=H.util.createBuffer(t.privateKeyExponent2).toHex(),d=H.util.createBuffer(t.privateKeyCoefficient).toHex(),Q.setRsaPrivateKey(new ae(n,16),new ae(i,16),new ae(s,16),new ae(o,16),new ae(c,16),new ae(l,16),new ae(u,16),new ae(d,16))},Q.privateKeyToAsn1=Q.privateKeyToRSAPrivateKey=function(e){return I.create(I.Class.UNIVERSAL,I.Type.SEQUENCE,!0,[I.create(I.Class.UNIVERSAL,I.Type.INTEGER,!1,I.integerToDer(0).getBytes()),I.create(I.Class.UNIVERSAL,I.Type.INTEGER,!1,_t(e.n)),I.create(I.Class.UNIVERSAL,I.Type.INTEGER,!1,_t(e.e)),I.create(I.Class.UNIVERSAL,I.Type.INTEGER,!1,_t(e.d)),I.create(I.Class.UNIVERSAL,I.Type.INTEGER,!1,_t(e.p)),I.create(I.Class.UNIVERSAL,I.Type.INTEGER,!1,_t(e.q)),I.create(I.Class.UNIVERSAL,I.Type.INTEGER,!1,_t(e.dP)),I.create(I.Class.UNIVERSAL,I.Type.INTEGER,!1,_t(e.dQ)),I.create(I.Class.UNIVERSAL,I.Type.INTEGER,!1,_t(e.qInv))])},Q.publicKeyFromAsn1=function(e){var t={},a=[];if(I.validate(e,th,t,a)){var r=I.derToOid(t.publicKeyOid);if(r!==Q.oids.rsaEncryption){var n=new Error("Cannot read public key. Unknown OID.");throw n.oid=r,n}e=t.rsaPublicKey}if(a=[],!I.validate(e,eh,t,a)){var n=new Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey.");throw n.errors=a,n}var i=H.util.createBuffer(t.publicKeyModulus).toHex(),s=H.util.createBuffer(t.publicKeyExponent).toHex();return Q.setRsaPublicKey(new ae(i,16),new ae(s,16))},Q.publicKeyToAsn1=Q.publicKeyToSubjectPublicKeyInfo=function(e){return I.create(I.Class.UNIVERSAL,I.Type.SEQUENCE,!0,[I.create(I.Class.UNIVERSAL,I.Type.SEQUENCE,!0,[I.create(I.Class.UNIVERSAL,I.Type.OID,!1,I.oidToDer(Q.oids.rsaEncryption).getBytes()),I.create(I.Class.UNIVERSAL,I.Type.NULL,!1,"")]),I.create(I.Class.UNIVERSAL,I.Type.BITSTRING,!1,[Q.publicKeyToRSAPublicKey(e)])])},Q.publicKeyToRSAPublicKey=function(e){return I.create(I.Class.UNIVERSAL,I.Type.SEQUENCE,!0,[I.create(I.Class.UNIVERSAL,I.Type.INTEGER,!1,_t(e.n)),I.create(I.Class.UNIVERSAL,I.Type.INTEGER,!1,_t(e.e))])};function Wc(e,t,a){var r=H.util.createBuffer(),n=Math.ceil(t.n.bitLength()/8);if(e.length>n-11){var i=new Error("Message is too long for PKCS#1 v1.5 padding.");throw i.length=e.length,i.max=n-11,i}r.putByte(0),r.putByte(a);var s=n-3-e.length,o;if(a===0||a===1){o=a===0?0:255;for(var c=0;c<s;++c)r.putByte(o)}else for(;s>0;){for(var l=0,u=H.random.getBytes(s),c=0;c<s;++c)o=u.charCodeAt(c),o===0?++l:r.putByte(o);s=l}return r.putByte(0),r.putBytes(e),r}function Ho(e,t,a,r,n){var i=Math.ceil(t.n.bitLength()/8),s=H.util.createBuffer(e),o=s.getByte(),c=s.getByte();if(o!==0||a&&c!==0&&c!==1||!a&&c!==2||a&&c===0&&typeof r>"u")throw new Error("Encryption block is invalid.");var l=0;if(c===0){l=i-3-r;for(var u=0;u<l;++u)if(s.getByte()!==0)throw new Error("Encryption block is invalid.")}else if(c===1){for(l=0;s.length()>1;){if(s.getByte()!==255){--s.read;break}++l}if(l<8&&!(n&&n._skipPaddingChecks))throw new Error("Encryption block is invalid.")}else if(c===2){for(l=0;s.length()>1;){if(s.getByte()===0){--s.read;break}++l}if(l<8&&!(n&&n._skipPaddingChecks))throw new Error("Encryption block is invalid.")}var d=s.getByte();if(d!==0||l!==i-3-s.length())throw new Error("Encryption block is invalid.");return s.getBytes()}function nh(e,t,a){typeof t=="function"&&(a=t,t={}),t=t||{};var r={algorithm:{name:t.algorithm||"PRIMEINC",options:{workers:t.workers||2,workLoad:t.workLoad||100,workerScript:t.workerScript}}};"prng"in t&&(r.prng=t.prng),n();function n(){i(e.pBits,function(o,c){if(o)return a(o);if(e.p=c,e.q!==null)return s(o,e.q);i(e.qBits,s)})}function i(o,c){H.prime.generateProbablePrime(o,r,c)}function s(o,c){if(o)return a(o);if(e.q=c,e.p.compareTo(e.q)<0){var l=e.p;e.p=e.q,e.q=l}if(e.p.subtract(ae.ONE).gcd(e.e).compareTo(ae.ONE)!==0){e.p=null,n();return}if(e.q.subtract(ae.ONE).gcd(e.e).compareTo(ae.ONE)!==0){e.q=null,i(e.qBits,s);return}if(e.p1=e.p.subtract(ae.ONE),e.q1=e.q.subtract(ae.ONE),e.phi=e.p1.multiply(e.q1),e.phi.gcd(e.e).compareTo(ae.ONE)!==0){e.p=e.q=null,n();return}if(e.n=e.p.multiply(e.q),e.n.bitLength()!==e.bits){e.q=null,i(e.qBits,s);return}var u=e.e.modInverse(e.phi);e.keys={privateKey:Q.rsa.setPrivateKey(e.n,e.e,u,e.p,e.q,u.mod(e.p1),u.mod(e.q1),e.q.modInverse(e.p)),publicKey:Q.rsa.setPublicKey(e.n,e.e)},a(null,e.keys)}}function _t(e){var t=e.toString(16);t[0]>="8"&&(t="00"+t);var a=H.util.hexToBytes(t);return a.length>1&&(a.charCodeAt(0)===0&&(a.charCodeAt(1)&128)===0||a.charCodeAt(0)===255&&(a.charCodeAt(1)&128)===128)?a.substr(1):a}function sh(e){return e<=100?27:e<=150?18:e<=200?15:e<=250?12:e<=300?9:e<=350?8:e<=400?7:e<=500?6:e<=600?5:e<=800?4:e<=1250?3:2}function Zc(e){return H.util.isNodejs&&typeof B0[e]=="function"}function Jc(e){return typeof yt.globalScope<"u"&&typeof yt.globalScope.crypto=="object"&&typeof yt.globalScope.crypto.subtle=="object"&&typeof yt.globalScope.crypto.subtle[e]=="function"}function el(e){return typeof yt.globalScope<"u"&&typeof yt.globalScope.msCrypto=="object"&&typeof yt.globalScope.msCrypto.subtle=="object"&&typeof yt.globalScope.msCrypto.subtle[e]=="function"}function tl(e){for(var t=H.util.hexToBytes(e.toString(16)),a=new Uint8Array(t.length),r=0;r<t.length;++r)a[r]=t.charCodeAt(r);return a}var M=X;if(typeof ih>"u")var ih=M.jsbn.BigInteger;var B=M.asn1,j=M.pki=M.pki||{};j.pbe=M.pbe=M.pbe||{};var er=j.oids,oh={name:"EncryptedPrivateKeyInfo",tagClass:B.Class.UNIVERSAL,type:B.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:B.Class.UNIVERSAL,type:B.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:B.Class.UNIVERSAL,type:B.Type.OID,constructed:!1,capture:"encryptionOid"},{name:"AlgorithmIdentifier.parameters",tagClass:B.Class.UNIVERSAL,type:B.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:B.Class.UNIVERSAL,type:B.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},ch={name:"PBES2Algorithms",tagClass:B.Class.UNIVERSAL,type:B.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:B.Class.UNIVERSAL,type:B.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",tagClass:B.Class.UNIVERSAL,type:B.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:B.Class.UNIVERSAL,type:B.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:B.Class.UNIVERSAL,type:B.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:B.Class.UNIVERSAL,type:B.Type.INTEGER,constructed:!1,capture:"kdfIterationCount"},{name:"PBES2Algorithms.params.keyLength",tagClass:B.Class.UNIVERSAL,type:B.Type.INTEGER,constructed:!1,optional:!0,capture:"keyLength"},{name:"PBES2Algorithms.params.prf",tagClass:B.Class.UNIVERSAL,type:B.Type.SEQUENCE,constructed:!0,optional:!0,value:[{name:"PBES2Algorithms.params.prf.algorithm",tagClass:B.Class.UNIVERSAL,type:B.Type.OID,constructed:!1,capture:"prfOid"}]}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:B.Class.UNIVERSAL,type:B.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:B.Class.UNIVERSAL,type:B.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:B.Class.UNIVERSAL,type:B.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},lh={name:"pkcs-12PbeParams",tagClass:B.Class.UNIVERSAL,type:B.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:B.Class.UNIVERSAL,type:B.Type.OCTETSTRING,constructed:!1,capture:"salt"},{name:"pkcs-12PbeParams.iterations",tagClass:B.Class.UNIVERSAL,type:B.Type.INTEGER,constructed:!1,capture:"iterations"}]};j.encryptPrivateKeyInfo=function(e,t,a){a=a||{},a.saltSize=a.saltSize||8,a.count=a.count||2048,a.algorithm=a.algorithm||"aes128",a.prfAlgorithm=a.prfAlgorithm||"sha1";var r=M.random.getBytesSync(a.saltSize),n=a.count,i=B.integerToDer(n),s,o,c;if(a.algorithm.indexOf("aes")===0||a.algorithm==="des"){var l,u,d;switch(a.algorithm){case"aes128":s=16,l=16,u=er["aes128-CBC"],d=M.aes.createEncryptionCipher;break;case"aes192":s=24,l=16,u=er["aes192-CBC"],d=M.aes.createEncryptionCipher;break;case"aes256":s=32,l=16,u=er["aes256-CBC"],d=M.aes.createEncryptionCipher;break;case"des":s=8,l=8,u=er.desCBC,d=M.des.createEncryptionCipher;break;default:var v=new Error("Cannot encrypt private key. Unknown encryption algorithm.");throw v.algorithm=a.algorithm,v}var E="hmacWith"+a.prfAlgorithm.toUpperCase(),y=nl(E),x=M.pkcs5.pbkdf2(t,r,n,s,y),b=M.random.getBytesSync(l),A=d(x);A.start(b),A.update(B.toDer(e)),A.finish(),c=A.output.getBytes();var w=uh(r,i,s,E);o=B.create(B.Class.UNIVERSAL,B.Type.SEQUENCE,!0,[B.create(B.Class.UNIVERSAL,B.Type.OID,!1,B.oidToDer(er.pkcs5PBES2).getBytes()),B.create(B.Class.UNIVERSAL,B.Type.SEQUENCE,!0,[B.create(B.Class.UNIVERSAL,B.Type.SEQUENCE,!0,[B.create(B.Class.UNIVERSAL,B.Type.OID,!1,B.oidToDer(er.pkcs5PBKDF2).getBytes()),w]),B.create(B.Class.UNIVERSAL,B.Type.SEQUENCE,!0,[B.create(B.Class.UNIVERSAL,B.Type.OID,!1,B.oidToDer(u).getBytes()),B.create(B.Class.UNIVERSAL,B.Type.OCTETSTRING,!1,b)])])])}else if(a.algorithm==="3des"){s=24;var N=new M.util.ByteBuffer(r),x=j.pbe.generatePkcs12Key(t,N,1,n,s),b=j.pbe.generatePkcs12Key(t,N,2,n,s),A=M.des.createEncryptionCipher(x);A.start(b),A.update(B.toDer(e)),A.finish(),c=A.output.getBytes(),o=B.create(B.Class.UNIVERSAL,B.Type.SEQUENCE,!0,[B.create(B.Class.UNIVERSAL,B.Type.OID,!1,B.oidToDer(er["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),B.create(B.Class.UNIVERSAL,B.Type.SEQUENCE,!0,[B.create(B.Class.UNIVERSAL,B.Type.OCTETSTRING,!1,r),B.create(B.Class.UNIVERSAL,B.Type.INTEGER,!1,i.getBytes())])])}else{var v=new Error("Cannot encrypt private key. Unknown encryption algorithm.");throw v.algorithm=a.algorithm,v}var F=B.create(B.Class.UNIVERSAL,B.Type.SEQUENCE,!0,[o,B.create(B.Class.UNIVERSAL,B.Type.OCTETSTRING,!1,c)]);return F},j.decryptPrivateKeyInfo=function(e,t){var a=null,r={},n=[];if(!B.validate(e,oh,r,n)){var i=new Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw i.errors=n,i}var s=B.derToOid(r.encryptionOid),o=j.pbe.getCipher(s,r.encryptionParams,t),c=M.util.createBuffer(r.encryptedData);return o.update(c),o.finish()&&(a=B.fromDer(o.output)),a},j.encryptedPrivateKeyToPem=function(e,t){var a={type:"ENCRYPTED PRIVATE KEY",body:B.toDer(e).getBytes()};return M.pem.encode(a,{maxline:t})},j.encryptedPrivateKeyFromPem=function(e){var t=M.pem.decode(e)[0];if(t.type!=="ENCRYPTED PRIVATE KEY"){var a=new Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');throw a.headerType=t.type,a}if(t.procType&&t.procType.type==="ENCRYPTED")throw new Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return B.fromDer(t.body)},j.encryptRsaPrivateKey=function(e,t,a){if(a=a||{},!a.legacy){var r=j.wrapRsaPrivateKey(j.privateKeyToAsn1(e));return r=j.encryptPrivateKeyInfo(r,t,a),j.encryptedPrivateKeyToPem(r)}var n,i,s,o;switch(a.algorithm){case"aes128":n="AES-128-CBC",s=16,i=M.random.getBytesSync(16),o=M.aes.createEncryptionCipher;break;case"aes192":n="AES-192-CBC",s=24,i=M.random.getBytesSync(16),o=M.aes.createEncryptionCipher;break;case"aes256":n="AES-256-CBC",s=32,i=M.random.getBytesSync(16),o=M.aes.createEncryptionCipher;break;case"3des":n="DES-EDE3-CBC",s=24,i=M.random.getBytesSync(8),o=M.des.createEncryptionCipher;break;case"des":n="DES-CBC",s=8,i=M.random.getBytesSync(8),o=M.des.createEncryptionCipher;break;default:var c=new Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+a.algorithm+'".');throw c.algorithm=a.algorithm,c}var l=M.pbe.opensslDeriveBytes(t,i.substr(0,8),s),u=o(l);u.start(i),u.update(B.toDer(j.privateKeyToAsn1(e))),u.finish();var d={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:n,parameters:M.util.bytesToHex(i).toUpperCase()},body:u.output.getBytes()};return M.pem.encode(d)},j.decryptRsaPrivateKey=function(e,t){var a=null,r=M.pem.decode(e)[0];if(r.type!=="ENCRYPTED PRIVATE KEY"&&r.type!=="PRIVATE KEY"&&r.type!=="RSA PRIVATE KEY"){var n=new Error('Could not convert private key from PEM; PEM header type is not "ENCRYPTED PRIVATE KEY", "PRIVATE KEY", or "RSA PRIVATE KEY".');throw n.headerType=n,n}if(r.procType&&r.procType.type==="ENCRYPTED"){var i,s;switch(r.dekInfo.algorithm){case"DES-CBC":i=8,s=M.des.createDecryptionCipher;break;case"DES-EDE3-CBC":i=24,s=M.des.createDecryptionCipher;break;case"AES-128-CBC":i=16,s=M.aes.createDecryptionCipher;break;case"AES-192-CBC":i=24,s=M.aes.createDecryptionCipher;break;case"AES-256-CBC":i=32,s=M.aes.createDecryptionCipher;break;case"RC2-40-CBC":i=5,s=function(d){return M.rc2.createDecryptionCipher(d,40)};break;case"RC2-64-CBC":i=8,s=function(d){return M.rc2.createDecryptionCipher(d,64)};break;case"RC2-128-CBC":i=16,s=function(d){return M.rc2.createDecryptionCipher(d,128)};break;default:var n=new Error('Could not decrypt private key; unsupported encryption algorithm "'+r.dekInfo.algorithm+'".');throw n.algorithm=r.dekInfo.algorithm,n}var o=M.util.hexToBytes(r.dekInfo.parameters),c=M.pbe.opensslDeriveBytes(t,o.substr(0,8),i),l=s(c);if(l.start(o),l.update(M.util.createBuffer(r.body)),l.finish())a=l.output.getBytes();else return a}else a=r.body;return r.type==="ENCRYPTED PRIVATE KEY"?a=j.decryptPrivateKeyInfo(B.fromDer(a),t):a=B.fromDer(a),a!==null&&(a=j.privateKeyFromAsn1(a)),a},j.pbe.generatePkcs12Key=function(e,t,a,r,n,i){var s,o;if(typeof i>"u"||i===null){if(!("sha1"in M.md))throw new Error('"sha1" hash algorithm unavailable.');i=M.md.sha1.create()}var c=i.digestLength,l=i.blockLength,u=new M.util.ByteBuffer,d=new M.util.ByteBuffer;if(e!=null){for(o=0;o<e.length;o++)d.putInt16(e.charCodeAt(o));d.putInt16(0)}var v=d.length(),E=t.length(),y=new M.util.ByteBuffer;y.fillWithByte(a,l);var x=l*Math.ceil(E/l),b=new M.util.ByteBuffer;for(o=0;o<x;o++)b.putByte(t.at(o%E));var A=l*Math.ceil(v/l),w=new M.util.ByteBuffer;for(o=0;o<A;o++)w.putByte(d.at(o%v));var N=b;N.putBuffer(w);for(var F=Math.ceil(n/c),U=1;U<=F;U++){var L=new M.util.ByteBuffer;L.putBytes(y.bytes()),L.putBytes(N.bytes());for(var $=0;$<r;$++)i.start(),i.update(L.getBytes()),L=i.digest();var Y=new M.util.ByteBuffer;for(o=0;o<l;o++)Y.putByte(L.at(o%c));var se=Math.ceil(E/l)+Math.ceil(v/l),ie=new M.util.ByteBuffer;for(s=0;s<se;s++){var oe=new M.util.ByteBuffer(N.getBytes(l)),ge=511;for(o=Y.length()-1;o>=0;o--)ge=ge>>8,ge+=Y.at(o)+oe.at(o),oe.setAt(o,ge&255);ie.putBuffer(oe)}N=ie,u.putBuffer(L)}return u.truncate(u.length()-n),u},j.pbe.getCipher=function(e,t,a){switch(e){case j.oids.pkcs5PBES2:return j.pbe.getCipherForPBES2(e,t,a);case j.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case j.oids["pbewithSHAAnd40BitRC2-CBC"]:return j.pbe.getCipherForPKCS12PBE(e,t,a);default:var r=new Error("Cannot read encrypted PBE data block. Unsupported OID.");throw r.oid=e,r.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC","pbewithSHAAnd40BitRC2-CBC"],r}},j.pbe.getCipherForPBES2=function(e,t,a){var r={},n=[];if(!B.validate(t,ch,r,n)){var i=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw i.errors=n,i}if(e=B.derToOid(r.kdfOid),e!==j.oids.pkcs5PBKDF2){var i=new Error("Cannot read encrypted private key. Unsupported key derivation function OID.");throw i.oid=e,i.supportedOids=["pkcs5PBKDF2"],i}if(e=B.derToOid(r.encOid),e!==j.oids["aes128-CBC"]&&e!==j.oids["aes192-CBC"]&&e!==j.oids["aes256-CBC"]&&e!==j.oids["des-EDE3-CBC"]&&e!==j.oids.desCBC){var i=new Error("Cannot read encrypted private key. Unsupported encryption scheme OID.");throw i.oid=e,i.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],i}var s=r.kdfSalt,o=M.util.createBuffer(r.kdfIterationCount);o=o.getInt(o.length()<<3);var c,l;switch(j.oids[e]){case"aes128-CBC":c=16,l=M.aes.createDecryptionCipher;break;case"aes192-CBC":c=24,l=M.aes.createDecryptionCipher;break;case"aes256-CBC":c=32,l=M.aes.createDecryptionCipher;break;case"des-EDE3-CBC":c=24,l=M.des.createDecryptionCipher;break;case"desCBC":c=8,l=M.des.createDecryptionCipher;break}var u=al(r.prfOid),d=M.pkcs5.pbkdf2(a,s,o,c,u),v=r.encIv,E=l(d);return E.start(v),E},j.pbe.getCipherForPKCS12PBE=function(e,t,a){var r={},n=[];if(!B.validate(t,lh,r,n)){var i=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw i.errors=n,i}var s=M.util.createBuffer(r.salt),o=M.util.createBuffer(r.iterations);o=o.getInt(o.length()<<3);var c,l,u;switch(e){case j.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:c=24,l=8,u=M.des.startDecrypting;break;case j.oids["pbewithSHAAnd40BitRC2-CBC"]:c=5,l=8,u=function(x,b){var A=M.rc2.createDecryptionCipher(x,40);return A.start(b,null),A};break;default:var i=new Error("Cannot read PKCS #12 PBE data block. Unsupported OID.");throw i.oid=e,i}var d=al(r.prfOid),v=j.pbe.generatePkcs12Key(a,s,1,o,c,d);d.start();var E=j.pbe.generatePkcs12Key(a,s,2,o,l,d);return u(v,E)},j.pbe.opensslDeriveBytes=function(e,t,a,r){if(typeof r>"u"||r===null){if(!("md5"in M.md))throw new Error('"md5" hash algorithm unavailable.');r=M.md.md5.create()}t===null&&(t="");for(var n=[rl(r,e+t)],i=16,s=1;i<a;++s,i+=16)n.push(rl(r,n[s-1]+e+t));return n.join("").substr(0,a)};function rl(e,t){return e.start().update(t).digest().getBytes()}function al(e){var t;if(!e)t="hmacWithSHA1";else if(t=j.oids[B.derToOid(e)],!t){var a=new Error("Unsupported PRF OID.");throw a.oid=e,a.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],a}return nl(t)}function nl(e){var t=M.md;switch(e){case"hmacWithSHA224":t=M.md.sha512;case"hmacWithSHA1":case"hmacWithSHA256":case"hmacWithSHA384":case"hmacWithSHA512":e=e.substr(8).toLowerCase();break;default:var a=new Error("Unsupported PRF algorithm.");throw a.algorithm=e,a.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],a}if(!t||!(e in t))throw new Error("Unknown hash algorithm: "+e);return t[e].create()}function uh(e,t,a,r){var n=B.create(B.Class.UNIVERSAL,B.Type.SEQUENCE,!0,[B.create(B.Class.UNIVERSAL,B.Type.OCTETSTRING,!1,e),B.create(B.Class.UNIVERSAL,B.Type.INTEGER,!1,t.getBytes())]);return r!=="hmacWithSHA1"&&n.value.push(B.create(B.Class.UNIVERSAL,B.Type.INTEGER,!1,M.util.hexToBytes(a.toString(16))),B.create(B.Class.UNIVERSAL,B.Type.SEQUENCE,!0,[B.create(B.Class.UNIVERSAL,B.Type.OID,!1,B.oidToDer(j.oids[r]).getBytes()),B.create(B.Class.UNIVERSAL,B.Type.NULL,!1,"")])),n}var dr=X,V=dr.asn1,pr=dr.pkcs7asn1=dr.pkcs7asn1||{};dr.pkcs7=dr.pkcs7||{},dr.pkcs7.asn1=pr;var sl={name:"ContentInfo",tagClass:V.Class.UNIVERSAL,type:V.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:V.Class.UNIVERSAL,type:V.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:V.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};pr.contentInfoValidator=sl;var il={name:"EncryptedContentInfo",tagClass:V.Class.UNIVERSAL,type:V.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",tagClass:V.Class.UNIVERSAL,type:V.Type.OID,constructed:!1,capture:"contentType"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm",tagClass:V.Class.UNIVERSAL,type:V.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentEncryptionAlgorithm.algorithm",tagClass:V.Class.UNIVERSAL,type:V.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm.parameter",tagClass:V.Class.UNIVERSAL,captureAsn1:"encParameter"}]},{name:"EncryptedContentInfo.encryptedContent",tagClass:V.Class.CONTEXT_SPECIFIC,type:0,capture:"encryptedContent",captureAsn1:"encryptedContentAsn1"}]};pr.envelopedDataValidator={name:"EnvelopedData",tagClass:V.Class.UNIVERSAL,type:V.Type.SEQUENCE,constructed:!0,value:[{name:"EnvelopedData.Version",tagClass:V.Class.UNIVERSAL,type:V.Type.INTEGER,constructed:!1,capture:"version"},{name:"EnvelopedData.RecipientInfos",tagClass:V.Class.UNIVERSAL,type:V.Type.SET,constructed:!0,captureAsn1:"recipientInfos"}].concat(il)},pr.encryptedDataValidator={name:"EncryptedData",tagClass:V.Class.UNIVERSAL,type:V.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedData.Version",tagClass:V.Class.UNIVERSAL,type:V.Type.INTEGER,constructed:!1,capture:"version"}].concat(il)};var fh={name:"SignerInfo",tagClass:V.Class.UNIVERSAL,type:V.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.version",tagClass:V.Class.UNIVERSAL,type:V.Type.INTEGER,constructed:!1},{name:"SignerInfo.issuerAndSerialNumber",tagClass:V.Class.UNIVERSAL,type:V.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.issuerAndSerialNumber.issuer",tagClass:V.Class.UNIVERSAL,type:V.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"SignerInfo.issuerAndSerialNumber.serialNumber",tagClass:V.Class.UNIVERSAL,type:V.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"SignerInfo.digestAlgorithm",tagClass:V.Class.UNIVERSAL,type:V.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.digestAlgorithm.algorithm",tagClass:V.Class.UNIVERSAL,type:V.Type.OID,constructed:!1,capture:"digestAlgorithm"},{name:"SignerInfo.digestAlgorithm.parameter",tagClass:V.Class.UNIVERSAL,constructed:!1,captureAsn1:"digestParameter",optional:!0}]},{name:"SignerInfo.authenticatedAttributes",tagClass:V.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"authenticatedAttributes"},{name:"SignerInfo.digestEncryptionAlgorithm",tagClass:V.Class.UNIVERSAL,type:V.Type.SEQUENCE,constructed:!0,capture:"signatureAlgorithm"},{name:"SignerInfo.encryptedDigest",tagClass:V.Class.UNIVERSAL,type:V.Type.OCTETSTRING,constructed:!1,capture:"signature"},{name:"SignerInfo.unauthenticatedAttributes",tagClass:V.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,capture:"unauthenticatedAttributes"}]};pr.signedDataValidator={name:"SignedData",tagClass:V.Class.UNIVERSAL,type:V.Type.SEQUENCE,constructed:!0,value:[{name:"SignedData.Version",tagClass:V.Class.UNIVERSAL,type:V.Type.INTEGER,constructed:!1,capture:"version"},{name:"SignedData.DigestAlgorithms",tagClass:V.Class.UNIVERSAL,type:V.Type.SET,constructed:!0,captureAsn1:"digestAlgorithms"},sl,{name:"SignedData.Certificates",tagClass:V.Class.CONTEXT_SPECIFIC,type:0,optional:!0,captureAsn1:"certificates"},{name:"SignedData.CertificateRevocationLists",tagClass:V.Class.CONTEXT_SPECIFIC,type:1,optional:!0,captureAsn1:"crls"},{name:"SignedData.SignerInfos",tagClass:V.Class.UNIVERSAL,type:V.Type.SET,capture:"signerInfos",optional:!0,value:[fh]}]},pr.recipientInfoValidator={name:"RecipientInfo",tagClass:V.Class.UNIVERSAL,type:V.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.version",tagClass:V.Class.UNIVERSAL,type:V.Type.INTEGER,constructed:!1,capture:"version"},{name:"RecipientInfo.issuerAndSerial",tagClass:V.Class.UNIVERSAL,type:V.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.issuerAndSerial.issuer",tagClass:V.Class.UNIVERSAL,type:V.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"RecipientInfo.issuerAndSerial.serialNumber",tagClass:V.Class.UNIVERSAL,type:V.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"RecipientInfo.keyEncryptionAlgorithm",tagClass:V.Class.UNIVERSAL,type:V.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.keyEncryptionAlgorithm.algorithm",tagClass:V.Class.UNIVERSAL,type:V.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"RecipientInfo.keyEncryptionAlgorithm.parameter",tagClass:V.Class.UNIVERSAL,constructed:!1,captureAsn1:"encParameter",optional:!0}]},{name:"RecipientInfo.encryptedKey",tagClass:V.Class.UNIVERSAL,type:V.Type.OCTETSTRING,constructed:!1,capture:"encKey"}]};var tr=X;tr.mgf=tr.mgf||{};var dh=tr.mgf.mgf1=tr.mgf1=tr.mgf1||{};dh.create=function(e){var t={generate:function(a,r){for(var n=new tr.util.ByteBuffer,i=Math.ceil(r/e.digestLength),s=0;s<i;s++){var o=new tr.util.ByteBuffer;o.putInt32(s),e.start(),e.update(a+o.getBytes()),n.putBuffer(e.digest())}return n.truncate(n.length()-r),n.getBytes()}};return t};var Go=X;Go.mgf=Go.mgf||{},Go.mgf.mgf1=Go.mgf1;var rr=X,ph=rr.pss=rr.pss||{};ph.create=function(e){arguments.length===3&&(e={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var t=e.md,a=e.mgf,r=t.digestLength,n=e.salt||null;typeof n=="string"&&(n=rr.util.createBuffer(n));var i;if("saltLength"in e)i=e.saltLength;else if(n!==null)i=n.length();else throw new Error("Salt length not specified or specific salt not given.");if(n!==null&&n.length()!==i)throw new Error("Given salt length does not match length of given salt.");var s=e.prng||rr.random,o={};return o.encode=function(c,l){var u,d=l-1,v=Math.ceil(d/8),E=c.digest().getBytes();if(v<r+i+2)throw new Error("Message is too long to encrypt.");var y;n===null?y=s.getBytesSync(i):y=n.bytes();var x=new rr.util.ByteBuffer;x.fillWithByte(0,8),x.putBytes(E),x.putBytes(y),t.start(),t.update(x.getBytes());var b=t.digest().getBytes(),A=new rr.util.ByteBuffer;A.fillWithByte(0,v-i-r-2),A.putByte(1),A.putBytes(y);var w=A.getBytes(),N=v-r-1,F=a.generate(b,N),U="";for(u=0;u<N;u++)U+=String.fromCharCode(w.charCodeAt(u)^F.charCodeAt(u));var L=65280>>8*v-d&255;return U=String.fromCharCode(U.charCodeAt(0)&~L)+U.substr(1),U+b+"\xBC"},o.verify=function(c,l,u){var d,v=u-1,E=Math.ceil(v/8);if(l=l.substr(-E),E<r+i+2)throw new Error("Inconsistent parameters to PSS signature verification.");if(l.charCodeAt(E-1)!==188)throw new Error("Encoded message does not end in 0xBC.");var y=E-r-1,x=l.substr(0,y),b=l.substr(y,r),A=65280>>8*E-v&255;if((x.charCodeAt(0)&A)!==0)throw new Error("Bits beyond keysize not zero as expected.");var w=a.generate(b,y),N="";for(d=0;d<y;d++)N+=String.fromCharCode(x.charCodeAt(d)^w.charCodeAt(d));N=String.fromCharCode(N.charCodeAt(0)&~A)+N.substr(1);var F=E-r-i-2;for(d=0;d<F;d++)if(N.charCodeAt(d)!==0)throw new Error("Leftmost octets not zero as expected");if(N.charCodeAt(F)!==1)throw new Error("Inconsistent PSS signature, 0x01 marker not found");var U=N.substr(-i),L=new rr.util.ByteBuffer;L.fillWithByte(0,8),L.putBytes(c),L.putBytes(U),t.start(),t.update(L.getBytes());var $=t.digest().getBytes();return b===$},o};var q=X,p=q.asn1,D=q.pki=q.pki||{},re=D.oids,ve={};ve.CN=re.commonName,ve.commonName="CN",ve.C=re.countryName,ve.countryName="C",ve.L=re.localityName,ve.localityName="L",ve.ST=re.stateOrProvinceName,ve.stateOrProvinceName="ST",ve.O=re.organizationName,ve.organizationName="O",ve.OU=re.organizationalUnitName,ve.organizationalUnitName="OU",ve.E=re.emailAddress,ve.emailAddress="E";var ol=q.pki.rsa.publicKeyValidator,hh={name:"Certificate",tagClass:p.Class.UNIVERSAL,type:p.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate",tagClass:p.Class.UNIVERSAL,type:p.Type.SEQUENCE,constructed:!0,captureAsn1:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",tagClass:p.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",tagClass:p.Class.UNIVERSAL,type:p.Type.INTEGER,constructed:!1,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",tagClass:p.Class.UNIVERSAL,type:p.Type.INTEGER,constructed:!1,capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",tagClass:p.Class.UNIVERSAL,type:p.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.signature.algorithm",tagClass:p.Class.UNIVERSAL,type:p.Type.OID,constructed:!1,capture:"certinfoSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:p.Class.UNIVERSAL,optional:!0,captureAsn1:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",tagClass:p.Class.UNIVERSAL,type:p.Type.SEQUENCE,constructed:!0,captureAsn1:"certIssuer"},{name:"Certificate.TBSCertificate.validity",tagClass:p.Class.UNIVERSAL,type:p.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.validity.notBefore (utc)",tagClass:p.Class.UNIVERSAL,type:p.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity1UTCTime"},{name:"Certificate.TBSCertificate.validity.notBefore (generalized)",tagClass:p.Class.UNIVERSAL,type:p.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity2GeneralizedTime"},{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:p.Class.UNIVERSAL,type:p.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:p.Class.UNIVERSAL,type:p.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:p.Class.UNIVERSAL,type:p.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},ol,{name:"Certificate.TBSCertificate.issuerUniqueID",tagClass:p.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",tagClass:p.Class.UNIVERSAL,type:p.Type.BITSTRING,constructed:!1,captureBitStringValue:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",tagClass:p.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",tagClass:p.Class.UNIVERSAL,type:p.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSubjectUniqueId"}]},{name:"Certificate.TBSCertificate.extensions",tagClass:p.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,captureAsn1:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",tagClass:p.Class.UNIVERSAL,type:p.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.signatureAlgorithm.algorithm",tagClass:p.Class.UNIVERSAL,type:p.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:p.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParams"}]},{name:"Certificate.signatureValue",tagClass:p.Class.UNIVERSAL,type:p.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSignature"}]},gh={name:"rsapss",tagClass:p.Class.UNIVERSAL,type:p.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:p.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:p.Class.UNIVERSAL,type:p.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:p.Class.UNIVERSAL,type:p.Type.OID,constructed:!1,capture:"hashOid"}]}]},{name:"rsapss.maskGenAlgorithm",tagClass:p.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier",tagClass:p.Class.UNIVERSAL,type:p.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm",tagClass:p.Class.UNIVERSAL,type:p.Type.OID,constructed:!1,capture:"maskGenOid"},{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params",tagClass:p.Class.UNIVERSAL,type:p.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm",tagClass:p.Class.UNIVERSAL,type:p.Type.OID,constructed:!1,capture:"maskGenHashOid"}]}]}]},{name:"rsapss.saltLength",tagClass:p.Class.CONTEXT_SPECIFIC,type:2,optional:!0,value:[{name:"rsapss.saltLength.saltLength",tagClass:p.Class.UNIVERSAL,type:p.Class.INTEGER,constructed:!1,capture:"saltLength"}]},{name:"rsapss.trailerField",tagClass:p.Class.CONTEXT_SPECIFIC,type:3,optional:!0,value:[{name:"rsapss.trailer.trailer",tagClass:p.Class.UNIVERSAL,type:p.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},vh={name:"CertificationRequestInfo",tagClass:p.Class.UNIVERSAL,type:p.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:p.Class.UNIVERSAL,type:p.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",tagClass:p.Class.UNIVERSAL,type:p.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},ol,{name:"CertificationRequestInfo.attributes",tagClass:p.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:p.Class.UNIVERSAL,type:p.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:p.Class.UNIVERSAL,type:p.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",tagClass:p.Class.UNIVERSAL,type:p.Type.SET,constructed:!0}]}]}]},yh={name:"CertificationRequest",tagClass:p.Class.UNIVERSAL,type:p.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[vh,{name:"CertificationRequest.signatureAlgorithm",tagClass:p.Class.UNIVERSAL,type:p.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequest.signatureAlgorithm.algorithm",tagClass:p.Class.UNIVERSAL,type:p.Type.OID,constructed:!1,capture:"csrSignatureOid"},{name:"CertificationRequest.signatureAlgorithm.parameters",tagClass:p.Class.UNIVERSAL,optional:!0,captureAsn1:"csrSignatureParams"}]},{name:"CertificationRequest.signature",tagClass:p.Class.UNIVERSAL,type:p.Type.BITSTRING,constructed:!1,captureBitStringValue:"csrSignature"}]};D.RDNAttributesAsArray=function(e,t){for(var a=[],r,n,i,s=0;s<e.value.length;++s){r=e.value[s];for(var o=0;o<r.value.length;++o)i={},n=r.value[o],i.type=p.derToOid(n.value[0].value),i.value=n.value[1].value,i.valueTagClass=n.value[1].type,i.type in re&&(i.name=re[i.type],i.name in ve&&(i.shortName=ve[i.name])),t&&(t.update(i.type),t.update(i.value)),a.push(i)}return a},D.CRIAttributesAsArray=function(e){for(var t=[],a=0;a<e.length;++a)for(var r=e[a],n=p.derToOid(r.value[0].value),i=r.value[1].value,s=0;s<i.length;++s){var o={};if(o.type=n,o.value=i[s].value,o.valueTagClass=i[s].type,o.type in re&&(o.name=re[o.type],o.name in ve&&(o.shortName=ve[o.name])),o.type===re.extensionRequest){o.extensions=[];for(var c=0;c<o.value.length;++c)o.extensions.push(D.certificateExtensionFromAsn1(o.value[c]))}t.push(o)}return t};function qt(e,t){typeof t=="string"&&(t={shortName:t});for(var a=null,r,n=0;a===null&&n<e.attributes.length;++n)r=e.attributes[n],(t.type&&t.type===r.type||t.name&&t.name===r.name||t.shortName&&t.shortName===r.shortName)&&(a=r);return a}var zo=function(e,t,a){var r={};if(e!==re["RSASSA-PSS"])return r;a&&(r={hash:{algorithmOid:re.sha1},mgf:{algorithmOid:re.mgf1,hash:{algorithmOid:re.sha1}},saltLength:20});var n={},i=[];if(!p.validate(t,gh,n,i)){var s=new Error("Cannot read RSASSA-PSS parameter block.");throw s.errors=i,s}return n.hashOid!==void 0&&(r.hash=r.hash||{},r.hash.algorithmOid=p.derToOid(n.hashOid)),n.maskGenOid!==void 0&&(r.mgf=r.mgf||{},r.mgf.algorithmOid=p.derToOid(n.maskGenOid),r.mgf.hash=r.mgf.hash||{},r.mgf.hash.algorithmOid=p.derToOid(n.maskGenHashOid)),n.saltLength!==void 0&&(r.saltLength=n.saltLength.charCodeAt(0)),r},$o=function(e){switch(re[e.signatureOid]){case"sha1WithRSAEncryption":case"sha1WithRSASignature":return q.md.sha1.create();case"md5WithRSAEncryption":return q.md.md5.create();case"sha256WithRSAEncryption":return q.md.sha256.create();case"sha384WithRSAEncryption":return q.md.sha384.create();case"sha512WithRSAEncryption":return q.md.sha512.create();case"RSASSA-PSS":return q.md.sha256.create();default:var t=new Error("Could not compute "+e.type+" digest. Unknown signature OID.");throw t.signatureOid=e.signatureOid,t}},cl=function(e){var t=e.certificate,a;switch(t.signatureOid){case re.sha1WithRSAEncryption:case re.sha1WithRSASignature:break;case re["RSASSA-PSS"]:var r,n;if(r=re[t.signatureParameters.mgf.hash.algorithmOid],r===void 0||q.md[r]===void 0){var i=new Error("Unsupported MGF hash function.");throw i.oid=t.signatureParameters.mgf.hash.algorithmOid,i.name=r,i}if(n=re[t.signatureParameters.mgf.algorithmOid],n===void 0||q.mgf[n]===void 0){var i=new Error("Unsupported MGF function.");throw i.oid=t.signatureParameters.mgf.algorithmOid,i.name=n,i}if(n=q.mgf[n].create(q.md[r].create()),r=re[t.signatureParameters.hash.algorithmOid],r===void 0||q.md[r]===void 0){var i=new Error("Unsupported RSASSA-PSS hash function.");throw i.oid=t.signatureParameters.hash.algorithmOid,i.name=r,i}a=q.pss.create(q.md[r].create(),n,t.signatureParameters.saltLength);break}return t.publicKey.verify(e.md.digest().getBytes(),e.signature,a)};D.certificateFromPem=function(e,t,a){var r=q.pem.decode(e)[0];if(r.type!=="CERTIFICATE"&&r.type!=="X509 CERTIFICATE"&&r.type!=="TRUSTED CERTIFICATE"){var n=new Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');throw n.headerType=r.type,n}if(r.procType&&r.procType.type==="ENCRYPTED")throw new Error("Could not convert certificate from PEM; PEM is encrypted.");var i=p.fromDer(r.body,a);return D.certificateFromAsn1(i,t)},D.certificateToPem=function(e,t){var a={type:"CERTIFICATE",body:p.toDer(D.certificateToAsn1(e)).getBytes()};return q.pem.encode(a,{maxline:t})},D.publicKeyFromPem=function(e){var t=q.pem.decode(e)[0];if(t.type!=="PUBLIC KEY"&&t.type!=="RSA PUBLIC KEY"){var a=new Error('Could not convert public key from PEM; PEM header type is not "PUBLIC KEY" or "RSA PUBLIC KEY".');throw a.headerType=t.type,a}if(t.procType&&t.procType.type==="ENCRYPTED")throw new Error("Could not convert public key from PEM; PEM is encrypted.");var r=p.fromDer(t.body);return D.publicKeyFromAsn1(r)},D.publicKeyToPem=function(e,t){var a={type:"PUBLIC KEY",body:p.toDer(D.publicKeyToAsn1(e)).getBytes()};return q.pem.encode(a,{maxline:t})},D.publicKeyToRSAPublicKeyPem=function(e,t){var a={type:"RSA PUBLIC KEY",body:p.toDer(D.publicKeyToRSAPublicKey(e)).getBytes()};return q.pem.encode(a,{maxline:t})},D.getPublicKeyFingerprint=function(e,t){t=t||{};var a=t.md||q.md.sha1.create(),r=t.type||"RSAPublicKey",n;switch(r){case"RSAPublicKey":n=p.toDer(D.publicKeyToRSAPublicKey(e)).getBytes();break;case"SubjectPublicKeyInfo":n=p.toDer(D.publicKeyToAsn1(e)).getBytes();break;default:throw new Error('Unknown fingerprint type "'+t.type+'".')}a.start(),a.update(n);var i=a.digest();if(t.encoding==="hex"){var s=i.toHex();return t.delimiter?s.match(/.{2}/g).join(t.delimiter):s}else{if(t.encoding==="binary")return i.getBytes();if(t.encoding)throw new Error('Unknown encoding "'+t.encoding+'".')}return i},D.certificationRequestFromPem=function(e,t,a){var r=q.pem.decode(e)[0];if(r.type!=="CERTIFICATE REQUEST"){var n=new Error('Could not convert certification request from PEM; PEM header type is not "CERTIFICATE REQUEST".');throw n.headerType=r.type,n}if(r.procType&&r.procType.type==="ENCRYPTED")throw new Error("Could not convert certification request from PEM; PEM is encrypted.");var i=p.fromDer(r.body,a);return D.certificationRequestFromAsn1(i,t)},D.certificationRequestToPem=function(e,t){var a={type:"CERTIFICATE REQUEST",body:p.toDer(D.certificationRequestToAsn1(e)).getBytes()};return q.pem.encode(a,{maxline:t})},D.createCertificate=function(){var e={};return e.version=2,e.serialNumber="00",e.signatureOid=null,e.signature=null,e.siginfo={},e.siginfo.algorithmOid=null,e.validity={},e.validity.notBefore=new Date,e.validity.notAfter=new Date,e.issuer={},e.issuer.getField=function(t){return qt(e.issuer,t)},e.issuer.addField=function(t){mt([t]),e.issuer.attributes.push(t)},e.issuer.attributes=[],e.issuer.hash=null,e.subject={},e.subject.getField=function(t){return qt(e.subject,t)},e.subject.addField=function(t){mt([t]),e.subject.attributes.push(t)},e.subject.attributes=[],e.subject.hash=null,e.extensions=[],e.publicKey=null,e.md=null,e.setSubject=function(t,a){mt(t),e.subject.attributes=t,delete e.subject.uniqueId,a&&(e.subject.uniqueId=a),e.subject.hash=null},e.setIssuer=function(t,a){mt(t),e.issuer.attributes=t,delete e.issuer.uniqueId,a&&(e.issuer.uniqueId=a),e.issuer.hash=null},e.setExtensions=function(t){for(var a=0;a<t.length;++a)ll(t[a],{cert:e});e.extensions=t},e.getExtension=function(t){typeof t=="string"&&(t={name:t});for(var a=null,r,n=0;a===null&&n<e.extensions.length;++n)r=e.extensions[n],(t.id&&r.id===t.id||t.name&&r.name===t.name)&&(a=r);return a},e.sign=function(t,a){e.md=a||q.md.sha1.create();var r=re[e.md.algorithm+"WithRSAEncryption"];if(!r){var n=new Error("Could not compute certificate digest. Unknown message digest algorithm OID.");throw n.algorithm=e.md.algorithm,n}e.signatureOid=e.siginfo.algorithmOid=r,e.tbsCertificate=D.getTBSCertificate(e);var i=p.toDer(e.tbsCertificate);e.md.update(i.getBytes()),e.signature=t.sign(e.md)},e.verify=function(t){var a=!1;if(!e.issued(t)){var r=t.issuer,n=e.subject,i=new Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.");throw i.expectedIssuer=n.attributes,i.actualIssuer=r.attributes,i}var s=t.md;if(s===null){s=$o({signatureOid:t.signatureOid,type:"certificate"});var o=t.tbsCertificate||D.getTBSCertificate(t),c=p.toDer(o);s.update(c.getBytes())}return s!==null&&(a=cl({certificate:e,md:s,signature:t.signature})),a},e.isIssuer=function(t){var a=!1,r=e.issuer,n=t.subject;if(r.hash&&n.hash)a=r.hash===n.hash;else if(r.attributes.length===n.attributes.length){a=!0;for(var i,s,o=0;a&&o<r.attributes.length;++o)i=r.attributes[o],s=n.attributes[o],(i.type!==s.type||i.value!==s.value)&&(a=!1)}return a},e.issued=function(t){return t.isIssuer(e)},e.generateSubjectKeyIdentifier=function(){return D.getPublicKeyFingerprint(e.publicKey,{type:"RSAPublicKey"})},e.verifySubjectKeyIdentifier=function(){for(var t=re.subjectKeyIdentifier,a=0;a<e.extensions.length;++a){var r=e.extensions[a];if(r.id===t){var n=e.generateSubjectKeyIdentifier().getBytes();return q.util.hexToBytes(r.subjectKeyIdentifier)===n}}return!1},e},D.certificateFromAsn1=function(e,t){var a={},r=[];if(!p.validate(e,hh,a,r)){var n=new Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate.");throw n.errors=r,n}var i=p.derToOid(a.publicKeyOid);if(i!==D.oids.rsaEncryption)throw new Error("Cannot read public key. OID is not RSA.");var s=D.createCertificate();s.version=a.certVersion?a.certVersion.charCodeAt(0):0;var o=q.util.createBuffer(a.certSerialNumber);s.serialNumber=o.toHex(),s.signatureOid=q.asn1.derToOid(a.certSignatureOid),s.signatureParameters=zo(s.signatureOid,a.certSignatureParams,!0),s.siginfo.algorithmOid=q.asn1.derToOid(a.certinfoSignatureOid),s.siginfo.parameters=zo(s.siginfo.algorithmOid,a.certinfoSignatureParams,!1),s.signature=a.certSignature;var c=[];if(a.certValidity1UTCTime!==void 0&&c.push(p.utcTimeToDate(a.certValidity1UTCTime)),a.certValidity2GeneralizedTime!==void 0&&c.push(p.generalizedTimeToDate(a.certValidity2GeneralizedTime)),a.certValidity3UTCTime!==void 0&&c.push(p.utcTimeToDate(a.certValidity3UTCTime)),a.certValidity4GeneralizedTime!==void 0&&c.push(p.generalizedTimeToDate(a.certValidity4GeneralizedTime)),c.length>2)throw new Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(c.length<2)throw new Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");if(s.validity.notBefore=c[0],s.validity.notAfter=c[1],s.tbsCertificate=a.tbsCertificate,t){s.md=$o({signatureOid:s.signatureOid,type:"certificate"});var l=p.toDer(s.tbsCertificate);s.md.update(l.getBytes())}var u=q.md.sha1.create(),d=p.toDer(a.certIssuer);u.update(d.getBytes()),s.issuer.getField=function(y){return qt(s.issuer,y)},s.issuer.addField=function(y){mt([y]),s.issuer.attributes.push(y)},s.issuer.attributes=D.RDNAttributesAsArray(a.certIssuer),a.certIssuerUniqueId&&(s.issuer.uniqueId=a.certIssuerUniqueId),s.issuer.hash=u.digest().toHex();var v=q.md.sha1.create(),E=p.toDer(a.certSubject);return v.update(E.getBytes()),s.subject.getField=function(y){return qt(s.subject,y)},s.subject.addField=function(y){mt([y]),s.subject.attributes.push(y)},s.subject.attributes=D.RDNAttributesAsArray(a.certSubject),a.certSubjectUniqueId&&(s.subject.uniqueId=a.certSubjectUniqueId),s.subject.hash=v.digest().toHex(),a.certExtensions?s.extensions=D.certificateExtensionsFromAsn1(a.certExtensions):s.extensions=[],s.publicKey=D.publicKeyFromAsn1(a.subjectPublicKeyInfo),s},D.certificateExtensionsFromAsn1=function(e){for(var t=[],a=0;a<e.value.length;++a)for(var r=e.value[a],n=0;n<r.value.length;++n)t.push(D.certificateExtensionFromAsn1(r.value[n]));return t},D.certificateExtensionFromAsn1=function(e){var t={};if(t.id=p.derToOid(e.value[0].value),t.critical=!1,e.value[1].type===p.Type.BOOLEAN?(t.critical=e.value[1].value.charCodeAt(0)!==0,t.value=e.value[2].value):t.value=e.value[1].value,t.id in re){if(t.name=re[t.id],t.name==="keyUsage"){var a=p.fromDer(t.value),r=0,n=0;a.value.length>1&&(r=a.value.charCodeAt(1),n=a.value.length>2?a.value.charCodeAt(2):0),t.digitalSignature=(r&128)===128,t.nonRepudiation=(r&64)===64,t.keyEncipherment=(r&32)===32,t.dataEncipherment=(r&16)===16,t.keyAgreement=(r&8)===8,t.keyCertSign=(r&4)===4,t.cRLSign=(r&2)===2,t.encipherOnly=(r&1)===1,t.decipherOnly=(n&128)===128}else if(t.name==="basicConstraints"){var a=p.fromDer(t.value);a.value.length>0&&a.value[0].type===p.Type.BOOLEAN?t.cA=a.value[0].value.charCodeAt(0)!==0:t.cA=!1;var i=null;a.value.length>0&&a.value[0].type===p.Type.INTEGER?i=a.value[0].value:a.value.length>1&&(i=a.value[1].value),i!==null&&(t.pathLenConstraint=p.derToInteger(i))}else if(t.name==="extKeyUsage")for(var a=p.fromDer(t.value),s=0;s<a.value.length;++s){var o=p.derToOid(a.value[s].value);o in re?t[re[o]]=!0:t[o]=!0}else if(t.name==="nsCertType"){var a=p.fromDer(t.value),r=0;a.value.length>1&&(r=a.value.charCodeAt(1)),t.client=(r&128)===128,t.server=(r&64)===64,t.email=(r&32)===32,t.objsign=(r&16)===16,t.reserved=(r&8)===8,t.sslCA=(r&4)===4,t.emailCA=(r&2)===2,t.objCA=(r&1)===1}else if(t.name==="subjectAltName"||t.name==="issuerAltName"){t.altNames=[];for(var c,a=p.fromDer(t.value),l=0;l<a.value.length;++l){c=a.value[l];var u={type:c.type,value:c.value};switch(t.altNames.push(u),c.type){case 1:case 2:case 6:break;case 7:u.ip=q.util.bytesToIP(c.value);break;case 8:u.oid=p.derToOid(c.value);break}}}else if(t.name==="subjectKeyIdentifier"){var a=p.fromDer(t.value);t.subjectKeyIdentifier=q.util.bytesToHex(a.value)}}return t},D.certificationRequestFromAsn1=function(e,t){var a={},r=[];if(!p.validate(e,yh,a,r)){var n=new Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest.");throw n.errors=r,n}var i=p.derToOid(a.publicKeyOid);if(i!==D.oids.rsaEncryption)throw new Error("Cannot read public key. OID is not RSA.");var s=D.createCertificationRequest();if(s.version=a.csrVersion?a.csrVersion.charCodeAt(0):0,s.signatureOid=q.asn1.derToOid(a.csrSignatureOid),s.signatureParameters=zo(s.signatureOid,a.csrSignatureParams,!0),s.siginfo.algorithmOid=q.asn1.derToOid(a.csrSignatureOid),s.siginfo.parameters=zo(s.siginfo.algorithmOid,a.csrSignatureParams,!1),s.signature=a.csrSignature,s.certificationRequestInfo=a.certificationRequestInfo,t){s.md=$o({signatureOid:s.signatureOid,type:"certification request"});var o=p.toDer(s.certificationRequestInfo);s.md.update(o.getBytes())}var c=q.md.sha1.create();return s.subject.getField=function(l){return qt(s.subject,l)},s.subject.addField=function(l){mt([l]),s.subject.attributes.push(l)},s.subject.attributes=D.RDNAttributesAsArray(a.certificationRequestInfoSubject,c),s.subject.hash=c.digest().toHex(),s.publicKey=D.publicKeyFromAsn1(a.subjectPublicKeyInfo),s.getAttribute=function(l){return qt(s,l)},s.addAttribute=function(l){mt([l]),s.attributes.push(l)},s.attributes=D.CRIAttributesAsArray(a.certificationRequestInfoAttributes||[]),s},D.createCertificationRequest=function(){var e={};return e.version=0,e.signatureOid=null,e.signature=null,e.siginfo={},e.siginfo.algorithmOid=null,e.subject={},e.subject.getField=function(t){return qt(e.subject,t)},e.subject.addField=function(t){mt([t]),e.subject.attributes.push(t)},e.subject.attributes=[],e.subject.hash=null,e.publicKey=null,e.attributes=[],e.getAttribute=function(t){return qt(e,t)},e.addAttribute=function(t){mt([t]),e.attributes.push(t)},e.md=null,e.setSubject=function(t){mt(t),e.subject.attributes=t,e.subject.hash=null},e.setAttributes=function(t){mt(t),e.attributes=t},e.sign=function(t,a){e.md=a||q.md.sha1.create();var r=re[e.md.algorithm+"WithRSAEncryption"];if(!r){var n=new Error("Could not compute certification request digest. Unknown message digest algorithm OID.");throw n.algorithm=e.md.algorithm,n}e.signatureOid=e.siginfo.algorithmOid=r,e.certificationRequestInfo=D.getCertificationRequestInfo(e);var i=p.toDer(e.certificationRequestInfo);e.md.update(i.getBytes()),e.signature=t.sign(e.md)},e.verify=function(){var t=!1,a=e.md;if(a===null){a=$o({signatureOid:e.signatureOid,type:"certification request"});var r=e.certificationRequestInfo||D.getCertificationRequestInfo(e),n=p.toDer(r);a.update(n.getBytes())}return a!==null&&(t=cl({certificate:e,md:a,signature:e.signature})),t},e};function hr(e){for(var t=p.create(p.Class.UNIVERSAL,p.Type.SEQUENCE,!0,[]),a,r,n=e.attributes,i=0;i<n.length;++i){a=n[i];var s=a.value,o=p.Type.PRINTABLESTRING;"valueTagClass"in a&&(o=a.valueTagClass,o===p.Type.UTF8&&(s=q.util.encodeUtf8(s))),r=p.create(p.Class.UNIVERSAL,p.Type.SET,!0,[p.create(p.Class.UNIVERSAL,p.Type.SEQUENCE,!0,[p.create(p.Class.UNIVERSAL,p.Type.OID,!1,p.oidToDer(a.type).getBytes()),p.create(p.Class.UNIVERSAL,o,!1,s)])]),t.value.push(r)}return t}function mt(e){for(var t,a=0;a<e.length;++a){if(t=e[a],typeof t.name>"u"&&(t.type&&t.type in D.oids?t.name=D.oids[t.type]:t.shortName&&t.shortName in ve&&(t.name=D.oids[ve[t.shortName]])),typeof t.type>"u")if(t.name&&t.name in D.oids)t.type=D.oids[t.name];else{var r=new Error("Attribute type not specified.");throw r.attribute=t,r}if(typeof t.shortName>"u"&&t.name&&t.name in ve&&(t.shortName=ve[t.name]),t.type===re.extensionRequest&&(t.valueConstructed=!0,t.valueTagClass=p.Type.SEQUENCE,!t.value&&t.extensions)){t.value=[];for(var n=0;n<t.extensions.length;++n)t.value.push(D.certificateExtensionToAsn1(ll(t.extensions[n])))}if(typeof t.value>"u"){var r=new Error("Attribute value not specified.");throw r.attribute=t,r}}}function ll(e,t){if(t=t||{},typeof e.name>"u"&&e.id&&e.id in D.oids&&(e.name=D.oids[e.id]),typeof e.id>"u")if(e.name&&e.name in D.oids)e.id=D.oids[e.name];else{var a=new Error("Extension ID not specified.");throw a.extension=e,a}if(typeof e.value<"u")return e;if(e.name==="keyUsage"){var r=0,n=0,i=0;e.digitalSignature&&(n|=128,r=7),e.nonRepudiation&&(n|=64,r=6),e.keyEncipherment&&(n|=32,r=5),e.dataEncipherment&&(n|=16,r=4),e.keyAgreement&&(n|=8,r=3),e.keyCertSign&&(n|=4,r=2),e.cRLSign&&(n|=2,r=1),e.encipherOnly&&(n|=1,r=0),e.decipherOnly&&(i|=128,r=7);var s=String.fromCharCode(r);i!==0?s+=String.fromCharCode(n)+String.fromCharCode(i):n!==0&&(s+=String.fromCharCode(n)),e.value=p.create(p.Class.UNIVERSAL,p.Type.BITSTRING,!1,s)}else if(e.name==="basicConstraints")e.value=p.create(p.Class.UNIVERSAL,p.Type.SEQUENCE,!0,[]),e.cA&&e.value.value.push(p.create(p.Class.UNIVERSAL,p.Type.BOOLEAN,!1,"\xFF")),"pathLenConstraint"in e&&e.value.value.push(p.create(p.Class.UNIVERSAL,p.Type.INTEGER,!1,p.integerToDer(e.pathLenConstraint).getBytes()));else if(e.name==="extKeyUsage"){e.value=p.create(p.Class.UNIVERSAL,p.Type.SEQUENCE,!0,[]);var o=e.value.value;for(var c in e)e[c]===!0&&(c in re?o.push(p.create(p.Class.UNIVERSAL,p.Type.OID,!1,p.oidToDer(re[c]).getBytes())):c.indexOf(".")!==-1&&o.push(p.create(p.Class.UNIVERSAL,p.Type.OID,!1,p.oidToDer(c).getBytes())))}else if(e.name==="nsCertType"){var r=0,n=0;e.client&&(n|=128,r=7),e.server&&(n|=64,r=6),e.email&&(n|=32,r=5),e.objsign&&(n|=16,r=4),e.reserved&&(n|=8,r=3),e.sslCA&&(n|=4,r=2),e.emailCA&&(n|=2,r=1),e.objCA&&(n|=1,r=0);var s=String.fromCharCode(r);n!==0&&(s+=String.fromCharCode(n)),e.value=p.create(p.Class.UNIVERSAL,p.Type.BITSTRING,!1,s)}else if(e.name==="subjectAltName"||e.name==="issuerAltName"){e.value=p.create(p.Class.UNIVERSAL,p.Type.SEQUENCE,!0,[]);for(var l,u=0;u<e.altNames.length;++u){l=e.altNames[u];var s=l.value;if(l.type===7&&l.ip){if(s=q.util.bytesFromIP(l.ip),s===null){var a=new Error('Extension "ip" value is not a valid IPv4 or IPv6 address.');throw a.extension=e,a}}else l.type===8&&(l.oid?s=p.oidToDer(p.oidToDer(l.oid)):s=p.oidToDer(s));e.value.value.push(p.create(p.Class.CONTEXT_SPECIFIC,l.type,!1,s))}}else if(e.name==="nsComment"&&t.cert){if(!/^[\x00-\x7F]*$/.test(e.comment)||e.comment.length<1||e.comment.length>128)throw new Error('Invalid "nsComment" content.');e.value=p.create(p.Class.UNIVERSAL,p.Type.IA5STRING,!1,e.comment)}else if(e.name==="subjectKeyIdentifier"&&t.cert){var d=t.cert.generateSubjectKeyIdentifier();e.subjectKeyIdentifier=d.toHex(),e.value=p.create(p.Class.UNIVERSAL,p.Type.OCTETSTRING,!1,d.getBytes())}else if(e.name==="authorityKeyIdentifier"&&t.cert){e.value=p.create(p.Class.UNIVERSAL,p.Type.SEQUENCE,!0,[]);var o=e.value.value;if(e.keyIdentifier){var v=e.keyIdentifier===!0?t.cert.generateSubjectKeyIdentifier().getBytes():e.keyIdentifier;o.push(p.create(p.Class.CONTEXT_SPECIFIC,0,!1,v))}if(e.authorityCertIssuer){var E=[p.create(p.Class.CONTEXT_SPECIFIC,4,!0,[hr(e.authorityCertIssuer===!0?t.cert.issuer:e.authorityCertIssuer)])];o.push(p.create(p.Class.CONTEXT_SPECIFIC,1,!0,E))}if(e.serialNumber){var y=q.util.hexToBytes(e.serialNumber===!0?t.cert.serialNumber:e.serialNumber);o.push(p.create(p.Class.CONTEXT_SPECIFIC,2,!1,y))}}else if(e.name==="cRLDistributionPoints"){e.value=p.create(p.Class.UNIVERSAL,p.Type.SEQUENCE,!0,[]);for(var o=e.value.value,x=p.create(p.Class.UNIVERSAL,p.Type.SEQUENCE,!0,[]),b=p.create(p.Class.CONTEXT_SPECIFIC,0,!0,[]),l,u=0;u<e.altNames.length;++u){l=e.altNames[u];var s=l.value;if(l.type===7&&l.ip){if(s=q.util.bytesFromIP(l.ip),s===null){var a=new Error('Extension "ip" value is not a valid IPv4 or IPv6 address.');throw a.extension=e,a}}else l.type===8&&(l.oid?s=p.oidToDer(p.oidToDer(l.oid)):s=p.oidToDer(s));b.value.push(p.create(p.Class.CONTEXT_SPECIFIC,l.type,!1,s))}x.value.push(p.create(p.Class.CONTEXT_SPECIFIC,0,!0,[b])),o.push(x)}if(typeof e.value>"u"){var a=new Error("Extension value not specified.");throw a.extension=e,a}return e}function w0(e,t){switch(e){case re["RSASSA-PSS"]:var a=[];return t.hash.algorithmOid!==void 0&&a.push(p.create(p.Class.CONTEXT_SPECIFIC,0,!0,[p.create(p.Class.UNIVERSAL,p.Type.SEQUENCE,!0,[p.create(p.Class.UNIVERSAL,p.Type.OID,!1,p.oidToDer(t.hash.algorithmOid).getBytes()),p.create(p.Class.UNIVERSAL,p.Type.NULL,!1,"")])])),t.mgf.algorithmOid!==void 0&&a.push(p.create(p.Class.CONTEXT_SPECIFIC,1,!0,[p.create(p.Class.UNIVERSAL,p.Type.SEQUENCE,!0,[p.create(p.Class.UNIVERSAL,p.Type.OID,!1,p.oidToDer(t.mgf.algorithmOid).getBytes()),p.create(p.Class.UNIVERSAL,p.Type.SEQUENCE,!0,[p.create(p.Class.UNIVERSAL,p.Type.OID,!1,p.oidToDer(t.mgf.hash.algorithmOid).getBytes()),p.create(p.Class.UNIVERSAL,p.Type.NULL,!1,"")])])])),t.saltLength!==void 0&&a.push(p.create(p.Class.CONTEXT_SPECIFIC,2,!0,[p.create(p.Class.UNIVERSAL,p.Type.INTEGER,!1,p.integerToDer(t.saltLength).getBytes())])),p.create(p.Class.UNIVERSAL,p.Type.SEQUENCE,!0,a);default:return p.create(p.Class.UNIVERSAL,p.Type.NULL,!1,"")}}function mh(e){var t=p.create(p.Class.CONTEXT_SPECIFIC,0,!0,[]);if(e.attributes.length===0)return t;for(var a=e.attributes,r=0;r<a.length;++r){var n=a[r],i=n.value,s=p.Type.UTF8;"valueTagClass"in n&&(s=n.valueTagClass),s===p.Type.UTF8&&(i=q.util.encodeUtf8(i));var o=!1;"valueConstructed"in n&&(o=n.valueConstructed);var c=p.create(p.Class.UNIVERSAL,p.Type.SEQUENCE,!0,[p.create(p.Class.UNIVERSAL,p.Type.OID,!1,p.oidToDer(n.type).getBytes()),p.create(p.Class.UNIVERSAL,p.Type.SET,!0,[p.create(p.Class.UNIVERSAL,s,o,i)])]);t.value.push(c)}return t}var Eh=new Date("1950-01-01T00:00:00Z"),Ch=new Date("2050-01-01T00:00:00Z");function ul(e){return e>=Eh&&e<Ch?p.create(p.Class.UNIVERSAL,p.Type.UTCTIME,!1,p.dateToUtcTime(e)):p.create(p.Class.UNIVERSAL,p.Type.GENERALIZEDTIME,!1,p.dateToGeneralizedTime(e))}D.getTBSCertificate=function(e){var t=ul(e.validity.notBefore),a=ul(e.validity.notAfter),r=p.create(p.Class.UNIVERSAL,p.Type.SEQUENCE,!0,[p.create(p.Class.CONTEXT_SPECIFIC,0,!0,[p.create(p.Class.UNIVERSAL,p.Type.INTEGER,!1,p.integerToDer(e.version).getBytes())]),p.create(p.Class.UNIVERSAL,p.Type.INTEGER,!1,q.util.hexToBytes(e.serialNumber)),p.create(p.Class.UNIVERSAL,p.Type.SEQUENCE,!0,[p.create(p.Class.UNIVERSAL,p.Type.OID,!1,p.oidToDer(e.siginfo.algorithmOid).getBytes()),w0(e.siginfo.algorithmOid,e.siginfo.parameters)]),hr(e.issuer),p.create(p.Class.UNIVERSAL,p.Type.SEQUENCE,!0,[t,a]),hr(e.subject),D.publicKeyToAsn1(e.publicKey)]);return e.issuer.uniqueId&&r.value.push(p.create(p.Class.CONTEXT_SPECIFIC,1,!0,[p.create(p.Class.UNIVERSAL,p.Type.BITSTRING,!1,"\0"+e.issuer.uniqueId)])),e.subject.uniqueId&&r.value.push(p.create(p.Class.CONTEXT_SPECIFIC,2,!0,[p.create(p.Class.UNIVERSAL,p.Type.BITSTRING,!1,"\0"+e.subject.uniqueId)])),e.extensions.length>0&&r.value.push(D.certificateExtensionsToAsn1(e.extensions)),r},D.getCertificationRequestInfo=function(e){var t=p.create(p.Class.UNIVERSAL,p.Type.SEQUENCE,!0,[p.create(p.Class.UNIVERSAL,p.Type.INTEGER,!1,p.integerToDer(e.version).getBytes()),hr(e.subject),D.publicKeyToAsn1(e.publicKey),mh(e)]);return t},D.distinguishedNameToAsn1=function(e){return hr(e)},D.certificateToAsn1=function(e){var t=e.tbsCertificate||D.getTBSCertificate(e);return p.create(p.Class.UNIVERSAL,p.Type.SEQUENCE,!0,[t,p.create(p.Class.UNIVERSAL,p.Type.SEQUENCE,!0,[p.create(p.Class.UNIVERSAL,p.Type.OID,!1,p.oidToDer(e.signatureOid).getBytes()),w0(e.signatureOid,e.signatureParameters)]),p.create(p.Class.UNIVERSAL,p.Type.BITSTRING,!1,"\0"+e.signature)])},D.certificateExtensionsToAsn1=function(e){var t=p.create(p.Class.CONTEXT_SPECIFIC,3,!0,[]),a=p.create(p.Class.UNIVERSAL,p.Type.SEQUENCE,!0,[]);t.value.push(a);for(var r=0;r<e.length;++r)a.value.push(D.certificateExtensionToAsn1(e[r]));return t},D.certificateExtensionToAsn1=function(e){var t=p.create(p.Class.UNIVERSAL,p.Type.SEQUENCE,!0,[]);t.value.push(p.create(p.Class.UNIVERSAL,p.Type.OID,!1,p.oidToDer(e.id).getBytes())),e.critical&&t.value.push(p.create(p.Class.UNIVERSAL,p.Type.BOOLEAN,!1,"\xFF"));var a=e.value;return typeof e.value!="string"&&(a=p.toDer(a).getBytes()),t.value.push(p.create(p.Class.UNIVERSAL,p.Type.OCTETSTRING,!1,a)),t},D.certificationRequestToAsn1=function(e){var t=e.certificationRequestInfo||D.getCertificationRequestInfo(e);return p.create(p.Class.UNIVERSAL,p.Type.SEQUENCE,!0,[t,p.create(p.Class.UNIVERSAL,p.Type.SEQUENCE,!0,[p.create(p.Class.UNIVERSAL,p.Type.OID,!1,p.oidToDer(e.signatureOid).getBytes()),w0(e.signatureOid,e.signatureParameters)]),p.create(p.Class.UNIVERSAL,p.Type.BITSTRING,!1,"\0"+e.signature)])},D.createCaStore=function(e){var t={certs:{}};t.getIssuer=function(s){var o=a(s.issuer);return o},t.addCertificate=function(s){if(typeof s=="string"&&(s=q.pki.certificateFromPem(s)),r(s.subject),!t.hasCertificate(s))if(s.subject.hash in t.certs){var o=t.certs[s.subject.hash];q.util.isArray(o)||(o=[o]),o.push(s),t.certs[s.subject.hash]=o}else t.certs[s.subject.hash]=s},t.hasCertificate=function(s){typeof s=="string"&&(s=q.pki.certificateFromPem(s));var o=a(s.subject);if(!o)return!1;q.util.isArray(o)||(o=[o]);for(var c=p.toDer(D.certificateToAsn1(s)).getBytes(),l=0;l<o.length;++l){var u=p.toDer(D.certificateToAsn1(o[l])).getBytes();if(c===u)return!0}return!1},t.listAllCertificates=function(){var s=[];for(var o in t.certs)if(t.certs.hasOwnProperty(o)){var c=t.certs[o];if(!q.util.isArray(c))s.push(c);else for(var l=0;l<c.length;++l)s.push(c[l])}return s},t.removeCertificate=function(s){var o;if(typeof s=="string"&&(s=q.pki.certificateFromPem(s)),r(s.subject),!t.hasCertificate(s))return null;var c=a(s.subject);if(!q.util.isArray(c))return o=t.certs[s.subject.hash],delete t.certs[s.subject.hash],o;for(var l=p.toDer(D.certificateToAsn1(s)).getBytes(),u=0;u<c.length;++u){var d=p.toDer(D.certificateToAsn1(c[u])).getBytes();l===d&&(o=c[u],c.splice(u,1))}return c.length===0&&delete t.certs[s.subject.hash],o};function a(s){return r(s),t.certs[s.hash]||null}function r(s){if(!s.hash){var o=q.md.sha1.create();s.attributes=D.RDNAttributesAsArray(hr(s),o),s.hash=o.digest().toHex()}}if(e)for(var n=0;n<e.length;++n){var i=e[n];t.addCertificate(i)}return t},D.certificateError={bad_certificate:"forge.pki.BadCertificate",unsupported_certificate:"forge.pki.UnsupportedCertificate",certificate_revoked:"forge.pki.CertificateRevoked",certificate_expired:"forge.pki.CertificateExpired",certificate_unknown:"forge.pki.CertificateUnknown",unknown_ca:"forge.pki.UnknownCertificateAuthority"},D.verifyCertificateChain=function(e,t,a){typeof a=="function"&&(a={verify:a}),a=a||{},t=t.slice(0);var r=t.slice(0),n=a.validityCheckDate;typeof n>"u"&&(n=new Date);var i=!0,s=null,o=0;do{var c=t.shift(),l=null,u=!1;if(n&&(n<c.validity.notBefore||n>c.validity.notAfter)&&(s={message:"Certificate is not valid yet or has expired.",error:D.certificateError.certificate_expired,notBefore:c.validity.notBefore,notAfter:c.validity.notAfter,now:n}),s===null){if(l=t[0]||e.getIssuer(c),l===null&&c.isIssuer(c)&&(u=!0,l=c),l){var d=l;q.util.isArray(d)||(d=[d]);for(var v=!1;!v&&d.length>0;){l=d.shift();try{v=l.verify(c)}catch{}}v||(s={message:"Certificate signature is invalid.",error:D.certificateError.bad_certificate})}s===null&&(!l||u)&&!e.hasCertificate(c)&&(s={message:"Certificate is not trusted.",error:D.certificateError.unknown_ca})}if(s===null&&l&&!c.isIssuer(l)&&(s={message:"Certificate issuer is invalid.",error:D.certificateError.bad_certificate}),s===null)for(var E={keyUsage:!0,basicConstraints:!0},y=0;s===null&&y<c.extensions.length;++y){var x=c.extensions[y];x.critical&&!(x.name in E)&&(s={message:"Certificate has an unsupported critical extension.",error:D.certificateError.unsupported_certificate})}if(s===null&&(!i||t.length===0&&(!l||u))){var b=c.getExtension("basicConstraints"),A=c.getExtension("keyUsage");if(A!==null&&(!A.keyCertSign||b===null)&&(s={message:"Certificate keyUsage or basicConstraints conflict or indicate that the certificate is not a CA. If the certificate is the only one in the chain or isn't the first then the certificate must be a valid CA.",error:D.certificateError.bad_certificate}),s===null&&b===null&&(s={message:"Certificate is missing basicConstraints extension and cannot be used as a CA.",error:D.certificateError.bad_certificate}),s===null&&b!==null&&!b.cA&&(s={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:D.certificateError.bad_certificate}),s===null&&A!==null&&"pathLenConstraint"in b){var w=o-1;w>b.pathLenConstraint&&(s={message:"Certificate basicConstraints pathLenConstraint violated.",error:D.certificateError.bad_certificate})}}var N=s===null?!0:s.error,F=a.verify?a.verify(N,o,r):N;if(F===!0)s=null;else throw N===!0&&(s={message:"The application rejected the certificate.",error:D.certificateError.bad_certificate}),(F||F===0)&&(typeof F=="object"&&!q.util.isArray(F)?(F.message&&(s.message=F.message),F.error&&(s.error=F.error)):typeof F=="string"&&(s.error=F)),s;i=!1,++o}while(t.length>0);return!0};var fe=X,C=fe.asn1,Z=fe.pki,Eo=fe.pkcs12=fe.pkcs12||{},fl={name:"ContentInfo",tagClass:C.Class.UNIVERSAL,type:C.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:C.Class.UNIVERSAL,type:C.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:C.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},xh={name:"PFX",tagClass:C.Class.UNIVERSAL,type:C.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:C.Class.UNIVERSAL,type:C.Type.INTEGER,constructed:!1,capture:"version"},fl,{name:"PFX.macData",tagClass:C.Class.UNIVERSAL,type:C.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:C.Class.UNIVERSAL,type:C.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:C.Class.UNIVERSAL,type:C.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:C.Class.UNIVERSAL,type:C.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",optional:!0,tagClass:C.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:C.Class.UNIVERSAL,type:C.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:C.Class.UNIVERSAL,type:C.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:C.Class.UNIVERSAL,type:C.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},Sh={name:"SafeBag",tagClass:C.Class.UNIVERSAL,type:C.Type.SEQUENCE,constructed:!0,value:[{name:"SafeBag.bagId",tagClass:C.Class.UNIVERSAL,type:C.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:C.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:C.Class.UNIVERSAL,type:C.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},Th={name:"Attribute",tagClass:C.Class.UNIVERSAL,type:C.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:C.Class.UNIVERSAL,type:C.Type.OID,constructed:!1,capture:"oid"},{name:"Attribute.attrValues",tagClass:C.Class.UNIVERSAL,type:C.Type.SET,constructed:!0,capture:"values"}]},bh={name:"CertBag",tagClass:C.Class.UNIVERSAL,type:C.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:C.Class.UNIVERSAL,type:C.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:C.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:C.Class.UNIVERSAL,type:C.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};function Co(e,t,a,r){for(var n=[],i=0;i<e.length;i++)for(var s=0;s<e[i].safeBags.length;s++){var o=e[i].safeBags[s];if(!(r!==void 0&&o.type!==r)){if(t===null){n.push(o);continue}o.attributes[t]!==void 0&&o.attributes[t].indexOf(a)>=0&&n.push(o)}}return n}Eo.pkcs12FromAsn1=function(e,t,a){typeof t=="string"?(a=t,t=!0):t===void 0&&(t=!0);var r={},n=[];if(!C.validate(e,xh,r,n)){var i=new Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX.");throw i.errors=i,i}var s={version:r.version.charCodeAt(0),safeContents:[],getBags:function(b){var A={},w;return"localKeyId"in b?w=b.localKeyId:"localKeyIdHex"in b&&(w=fe.util.hexToBytes(b.localKeyIdHex)),w===void 0&&!("friendlyName"in b)&&"bagType"in b&&(A[b.bagType]=Co(s.safeContents,null,null,b.bagType)),w!==void 0&&(A.localKeyId=Co(s.safeContents,"localKeyId",w,b.bagType)),"friendlyName"in b&&(A.friendlyName=Co(s.safeContents,"friendlyName",b.friendlyName,b.bagType)),A},getBagsByFriendlyName:function(b,A){return Co(s.safeContents,"friendlyName",b,A)},getBagsByLocalKeyId:function(b,A){return Co(s.safeContents,"localKeyId",b,A)}};if(r.version.charCodeAt(0)!==3){var i=new Error("PKCS#12 PFX of version other than 3 not supported.");throw i.version=r.version.charCodeAt(0),i}if(C.derToOid(r.contentType)!==Z.oids.data){var i=new Error("Only PKCS#12 PFX in password integrity mode supported.");throw i.oid=C.derToOid(r.contentType),i}var o=r.content.value[0];if(o.tagClass!==C.Class.UNIVERSAL||o.type!==C.Type.OCTETSTRING)throw new Error("PKCS#12 authSafe content data is not an OCTET STRING.");if(o=N0(o),r.mac){var c=null,l=0,u=C.derToOid(r.macAlgorithm);switch(u){case Z.oids.sha1:c=fe.md.sha1.create(),l=20;break;case Z.oids.sha256:c=fe.md.sha256.create(),l=32;break;case Z.oids.sha384:c=fe.md.sha384.create(),l=48;break;case Z.oids.sha512:c=fe.md.sha512.create(),l=64;break;case Z.oids.md5:c=fe.md.md5.create(),l=16;break}if(c===null)throw new Error("PKCS#12 uses unsupported MAC algorithm: "+u);var d=new fe.util.ByteBuffer(r.macSalt),v="macIterations"in r?parseInt(fe.util.bytesToHex(r.macIterations),16):1,E=Eo.generateKey(a,d,3,v,l,c),y=fe.hmac.create();y.start(c,E),y.update(o.value);var x=y.getMac();if(x.getBytes()!==r.macDigest)throw new Error("PKCS#12 MAC could not be verified. Invalid password?")}else if(Array.isArray(e.value)&&e.value.length>2)throw new Error("Invalid PKCS#12. macData field present but MAC was not validated.");return Ih(s,o.value,t,a),s};function N0(e){if(e.composed||e.constructed){for(var t=fe.util.createBuffer(),a=0;a<e.value.length;++a)t.putBytes(e.value[a].value);e.composed=e.constructed=!1,e.value=t.getBytes()}return e}function Ih(e,t,a,r){if(t=C.fromDer(t,a),t.tagClass!==C.Class.UNIVERSAL||t.type!==C.Type.SEQUENCE||t.constructed!==!0)throw new Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");for(var n=0;n<t.value.length;n++){var i=t.value[n],s={},o=[];if(!C.validate(i,fl,s,o)){var c=new Error("Cannot read ContentInfo.");throw c.errors=o,c}var l={encrypted:!1},u=null,d=s.content.value[0];switch(C.derToOid(s.contentType)){case Z.oids.data:if(d.tagClass!==C.Class.UNIVERSAL||d.type!==C.Type.OCTETSTRING)throw new Error("PKCS#12 SafeContents Data is not an OCTET STRING.");u=N0(d).value;break;case Z.oids.encryptedData:u=Ah(d,r),l.encrypted=!0;break;default:var c=new Error("Unsupported PKCS#12 contentType.");throw c.contentType=C.derToOid(s.contentType),c}l.safeBags=Bh(u,a,r),e.safeContents.push(l)}}function Ah(e,t){var a={},r=[];if(!C.validate(e,fe.pkcs7.asn1.encryptedDataValidator,a,r)){var n=new Error("Cannot read EncryptedContentInfo.");throw n.errors=r,n}var i=C.derToOid(a.contentType);if(i!==Z.oids.data){var n=new Error("PKCS#12 EncryptedContentInfo ContentType is not Data.");throw n.oid=i,n}i=C.derToOid(a.encAlgorithm);var s=Z.pbe.getCipher(i,a.encParameter,t),o=N0(a.encryptedContentAsn1),c=fe.util.createBuffer(o.value);if(s.update(c),!s.finish())throw new Error("Failed to decrypt PKCS#12 SafeContents.");return s.output.getBytes()}function Bh(e,t,a){if(!t&&e.length===0)return[];if(e=C.fromDer(e,t),e.tagClass!==C.Class.UNIVERSAL||e.type!==C.Type.SEQUENCE||e.constructed!==!0)throw new Error("PKCS#12 SafeContents expected to be a SEQUENCE OF SafeBag.");for(var r=[],n=0;n<e.value.length;n++){var i=e.value[n],s={},o=[];if(!C.validate(i,Sh,s,o)){var c=new Error("Cannot read SafeBag.");throw c.errors=o,c}var l={type:C.derToOid(s.bagId),attributes:wh(s.bagAttributes)};r.push(l);var u,d,v=s.bagValue.value[0];switch(l.type){case Z.oids.pkcs8ShroudedKeyBag:if(v=Z.decryptPrivateKeyInfo(v,a),v===null)throw new Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case Z.oids.keyBag:try{l.key=Z.privateKeyFromAsn1(v)}catch{l.key=null,l.asn1=v}continue;case Z.oids.certBag:u=bh,d=function(){if(C.derToOid(s.certId)!==Z.oids.x509Certificate){var y=new Error("Unsupported certificate type, only X.509 supported.");throw y.oid=C.derToOid(s.certId),y}var x=C.fromDer(s.cert,t);try{l.cert=Z.certificateFromAsn1(x,!0)}catch{l.cert=null,l.asn1=x}};break;default:var c=new Error("Unsupported PKCS#12 SafeBag type.");throw c.oid=l.type,c}if(u!==void 0&&!C.validate(v,u,s,o)){var c=new Error("Cannot read PKCS#12 "+u.name);throw c.errors=o,c}d()}return r}function wh(e){var t={};if(e!==void 0)for(var a=0;a<e.length;++a){var r={},n=[];if(!C.validate(e[a],Th,r,n)){var i=new Error("Cannot read PKCS#12 BagAttribute.");throw i.errors=n,i}var s=C.derToOid(r.oid);if(Z.oids[s]!==void 0){t[Z.oids[s]]=[];for(var o=0;o<r.values.length;++o)t[Z.oids[s]].push(r.values[o].value)}}return t}Eo.toPkcs12Asn1=function(e,t,a,r){r=r||{},r.saltSize=r.saltSize||8,r.count=r.count||2048,r.algorithm=r.algorithm||r.encAlgorithm||"aes128","useMac"in r||(r.useMac=!0),"localKeyId"in r||(r.localKeyId=null),"generateLocalKeyId"in r||(r.generateLocalKeyId=!0);var n=r.localKeyId,i;if(n!==null)n=fe.util.hexToBytes(n);else if(r.generateLocalKeyId)if(t){var s=fe.util.isArray(t)?t[0]:t;typeof s=="string"&&(s=Z.certificateFromPem(s));var o=fe.md.sha1.create();o.update(C.toDer(Z.certificateToAsn1(s)).getBytes()),n=o.digest().getBytes()}else n=fe.random.getBytes(20);var c=[];n!==null&&c.push(C.create(C.Class.UNIVERSAL,C.Type.SEQUENCE,!0,[C.create(C.Class.UNIVERSAL,C.Type.OID,!1,C.oidToDer(Z.oids.localKeyId).getBytes()),C.create(C.Class.UNIVERSAL,C.Type.SET,!0,[C.create(C.Class.UNIVERSAL,C.Type.OCTETSTRING,!1,n)])])),"friendlyName"in r&&c.push(C.create(C.Class.UNIVERSAL,C.Type.SEQUENCE,!0,[C.create(C.Class.UNIVERSAL,C.Type.OID,!1,C.oidToDer(Z.oids.friendlyName).getBytes()),C.create(C.Class.UNIVERSAL,C.Type.SET,!0,[C.create(C.Class.UNIVERSAL,C.Type.BMPSTRING,!1,r.friendlyName)])])),c.length>0&&(i=C.create(C.Class.UNIVERSAL,C.Type.SET,!0,c));var l=[],u=[];t!==null&&(fe.util.isArray(t)?u=t:u=[t]);for(var d=[],v=0;v<u.length;++v){t=u[v],typeof t=="string"&&(t=Z.certificateFromPem(t));var E=v===0?i:void 0,y=Z.certificateToAsn1(t),x=C.create(C.Class.UNIVERSAL,C.Type.SEQUENCE,!0,[C.create(C.Class.UNIVERSAL,C.Type.OID,!1,C.oidToDer(Z.oids.certBag).getBytes()),C.create(C.Class.CONTEXT_SPECIFIC,0,!0,[C.create(C.Class.UNIVERSAL,C.Type.SEQUENCE,!0,[C.create(C.Class.UNIVERSAL,C.Type.OID,!1,C.oidToDer(Z.oids.x509Certificate).getBytes()),C.create(C.Class.CONTEXT_SPECIFIC,0,!0,[C.create(C.Class.UNIVERSAL,C.Type.OCTETSTRING,!1,C.toDer(y).getBytes())])])]),E]);d.push(x)}if(d.length>0){var b=C.create(C.Class.UNIVERSAL,C.Type.SEQUENCE,!0,d),A=C.create(C.Class.UNIVERSAL,C.Type.SEQUENCE,!0,[C.create(C.Class.UNIVERSAL,C.Type.OID,!1,C.oidToDer(Z.oids.data).getBytes()),C.create(C.Class.CONTEXT_SPECIFIC,0,!0,[C.create(C.Class.UNIVERSAL,C.Type.OCTETSTRING,!1,C.toDer(b).getBytes())])]);l.push(A)}var w=null;if(e!==null){var N=Z.wrapRsaPrivateKey(Z.privateKeyToAsn1(e));a===null?w=C.create(C.Class.UNIVERSAL,C.Type.SEQUENCE,!0,[C.create(C.Class.UNIVERSAL,C.Type.OID,!1,C.oidToDer(Z.oids.keyBag).getBytes()),C.create(C.Class.CONTEXT_SPECIFIC,0,!0,[N]),i]):w=C.create(C.Class.UNIVERSAL,C.Type.SEQUENCE,!0,[C.create(C.Class.UNIVERSAL,C.Type.OID,!1,C.oidToDer(Z.oids.pkcs8ShroudedKeyBag).getBytes()),C.create(C.Class.CONTEXT_SPECIFIC,0,!0,[Z.encryptPrivateKeyInfo(N,a,r)]),i]);var F=C.create(C.Class.UNIVERSAL,C.Type.SEQUENCE,!0,[w]),U=C.create(C.Class.UNIVERSAL,C.Type.SEQUENCE,!0,[C.create(C.Class.UNIVERSAL,C.Type.OID,!1,C.oidToDer(Z.oids.data).getBytes()),C.create(C.Class.CONTEXT_SPECIFIC,0,!0,[C.create(C.Class.UNIVERSAL,C.Type.OCTETSTRING,!1,C.toDer(F).getBytes())])]);l.push(U)}var L=C.create(C.Class.UNIVERSAL,C.Type.SEQUENCE,!0,l),$;if(r.useMac){var o=fe.md.sha1.create(),Y=new fe.util.ByteBuffer(fe.random.getBytes(r.saltSize)),se=r.count,e=Eo.generateKey(a,Y,3,se,20),ie=fe.hmac.create();ie.start(o,e),ie.update(C.toDer(L).getBytes());var oe=ie.getMac();$=C.create(C.Class.UNIVERSAL,C.Type.SEQUENCE,!0,[C.create(C.Class.UNIVERSAL,C.Type.SEQUENCE,!0,[C.create(C.Class.UNIVERSAL,C.Type.SEQUENCE,!0,[C.create(C.Class.UNIVERSAL,C.Type.OID,!1,C.oidToDer(Z.oids.sha1).getBytes()),C.create(C.Class.UNIVERSAL,C.Type.NULL,!1,"")]),C.create(C.Class.UNIVERSAL,C.Type.OCTETSTRING,!1,oe.getBytes())]),C.create(C.Class.UNIVERSAL,C.Type.OCTETSTRING,!1,Y.getBytes()),C.create(C.Class.UNIVERSAL,C.Type.INTEGER,!1,C.integerToDer(se).getBytes())])}return C.create(C.Class.UNIVERSAL,C.Type.SEQUENCE,!0,[C.create(C.Class.UNIVERSAL,C.Type.INTEGER,!1,C.integerToDer(3).getBytes()),C.create(C.Class.UNIVERSAL,C.Type.SEQUENCE,!0,[C.create(C.Class.UNIVERSAL,C.Type.OID,!1,C.oidToDer(Z.oids.data).getBytes()),C.create(C.Class.CONTEXT_SPECIFIC,0,!0,[C.create(C.Class.UNIVERSAL,C.Type.OCTETSTRING,!1,C.toDer(L).getBytes())])]),$])},Eo.generateKey=fe.pbe.generatePkcs12Key;var Ht=X,_0=Ht.asn1,gr=Ht.pki=Ht.pki||{};gr.pemToDer=function(e){var t=Ht.pem.decode(e)[0];if(t.procType&&t.procType.type==="ENCRYPTED")throw new Error("Could not convert PEM to DER; PEM is encrypted.");return Ht.util.createBuffer(t.body)},gr.privateKeyFromPem=function(e){var t=Ht.pem.decode(e)[0];if(t.type!=="PRIVATE KEY"&&t.type!=="RSA PRIVATE KEY"){var a=new Error('Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".');throw a.headerType=t.type,a}if(t.procType&&t.procType.type==="ENCRYPTED")throw new Error("Could not convert private key from PEM; PEM is encrypted.");var r=_0.fromDer(t.body);return gr.privateKeyFromAsn1(r)},gr.privateKeyToPem=function(e,t){var a={type:"RSA PRIVATE KEY",body:_0.toDer(gr.privateKeyToAsn1(e)).getBytes()};return Ht.pem.encode(a,{maxline:t})},gr.privateKeyInfoToPem=function(e,t){var a={type:"PRIVATE KEY",body:_0.toDer(e).getBytes()};return Ht.pem.encode(a,{maxline:t})};var R=X,Qo=function(e,t,a,r){var n=R.util.createBuffer(),i=e.length>>1,s=i+(e.length&1),o=e.substr(0,s),c=e.substr(i,s),l=R.util.createBuffer(),u=R.hmac.create();a=t+a;var d=Math.ceil(r/16),v=Math.ceil(r/20);u.start("MD5",o);var E=R.util.createBuffer();l.putBytes(a);for(var y=0;y<d;++y)u.start(null,null),u.update(l.getBytes()),l.putBuffer(u.digest()),u.start(null,null),u.update(l.bytes()+a),E.putBuffer(u.digest());u.start("SHA1",c);var x=R.util.createBuffer();l.clear(),l.putBytes(a);for(var y=0;y<v;++y)u.start(null,null),u.update(l.getBytes()),l.putBuffer(u.digest()),u.start(null,null),u.update(l.bytes()+a),x.putBuffer(u.digest());return n.putBytes(R.util.xorBytes(E.getBytes(),x.getBytes(),r)),n},Nh=function(e,t,a){var r=R.hmac.create();r.start("SHA1",e);var n=R.util.createBuffer();return n.putInt32(t[0]),n.putInt32(t[1]),n.putByte(a.type),n.putByte(a.version.major),n.putByte(a.version.minor),n.putInt16(a.length),n.putBytes(a.fragment.bytes()),r.update(n.getBytes()),r.digest().getBytes()},_h=function(e,t,a){var r=!1;try{var n=e.deflate(t.fragment.getBytes());t.fragment=R.util.createBuffer(n),t.length=n.length,r=!0}catch{}return r},Rh=function(e,t,a){var r=!1;try{var n=e.inflate(t.fragment.getBytes());t.fragment=R.util.createBuffer(n),t.length=n.length,r=!0}catch{}return r},dt=function(e,t){var a=0;switch(t){case 1:a=e.getByte();break;case 2:a=e.getInt16();break;case 3:a=e.getInt24();break;case 4:a=e.getInt32();break}return R.util.createBuffer(e.getBytes(a))},Et=function(e,t,a){e.putInt(a.length(),t<<3),e.putBuffer(a)},g={};g.Versions={TLS_1_0:{major:3,minor:1},TLS_1_1:{major:3,minor:2},TLS_1_2:{major:3,minor:3}},g.SupportedVersions=[g.Versions.TLS_1_1,g.Versions.TLS_1_0],g.Version=g.SupportedVersions[0],g.MaxFragment=15360,g.ConnectionEnd={server:0,client:1},g.PRFAlgorithm={tls_prf_sha256:0},g.BulkCipherAlgorithm={none:null,rc4:0,des3:1,aes:2},g.CipherType={stream:0,block:1,aead:2},g.MACAlgorithm={none:null,hmac_md5:0,hmac_sha1:1,hmac_sha256:2,hmac_sha384:3,hmac_sha512:4},g.CompressionMethod={none:0,deflate:1},g.ContentType={change_cipher_spec:20,alert:21,handshake:22,application_data:23,heartbeat:24},g.HandshakeType={hello_request:0,client_hello:1,server_hello:2,certificate:11,server_key_exchange:12,certificate_request:13,server_hello_done:14,certificate_verify:15,client_key_exchange:16,finished:20},g.Alert={},g.Alert.Level={warning:1,fatal:2},g.Alert.Description={close_notify:0,unexpected_message:10,bad_record_mac:20,decryption_failed:21,record_overflow:22,decompression_failure:30,handshake_failure:40,bad_certificate:42,unsupported_certificate:43,certificate_revoked:44,certificate_expired:45,certificate_unknown:46,illegal_parameter:47,unknown_ca:48,access_denied:49,decode_error:50,decrypt_error:51,export_restriction:60,protocol_version:70,insufficient_security:71,internal_error:80,user_canceled:90,no_renegotiation:100},g.HeartbeatMessageType={heartbeat_request:1,heartbeat_response:2},g.CipherSuites={},g.getCipherSuite=function(e){var t=null;for(var a in g.CipherSuites){var r=g.CipherSuites[a];if(r.id[0]===e.charCodeAt(0)&&r.id[1]===e.charCodeAt(1)){t=r;break}}return t},g.handleUnexpected=function(e,t){var a=!e.open&&e.entity===g.ConnectionEnd.client;a||e.error(e,{message:"Unexpected message. Received TLS record out of order.",send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.unexpected_message}})},g.handleHelloRequest=function(e,t,a){!e.handshaking&&e.handshakes>0&&(g.queue(e,g.createAlert(e,{level:g.Alert.Level.warning,description:g.Alert.Description.no_renegotiation})),g.flush(e)),e.process()},g.parseHelloMessage=function(e,t,a){var r=null,n=e.entity===g.ConnectionEnd.client;if(a<38)e.error(e,{message:n?"Invalid ServerHello message. Message too short.":"Invalid ClientHello message. Message too short.",send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.illegal_parameter}});else{var i=t.fragment,s=i.length();if(r={version:{major:i.getByte(),minor:i.getByte()},random:R.util.createBuffer(i.getBytes(32)),session_id:dt(i,1),extensions:[]},n?(r.cipher_suite=i.getBytes(2),r.compression_method=i.getByte()):(r.cipher_suites=dt(i,2),r.compression_methods=dt(i,1)),s=a-(s-i.length()),s>0){for(var o=dt(i,2);o.length()>0;)r.extensions.push({type:[o.getByte(),o.getByte()],data:dt(o,2)});if(!n)for(var c=0;c<r.extensions.length;++c){var l=r.extensions[c];if(l.type[0]===0&&l.type[1]===0)for(var u=dt(l.data,2);u.length()>0;){var d=u.getByte();if(d!==0)break;e.session.extensions.server_name.serverNameList.push(dt(u,2).getBytes())}}}if(e.session.version&&(r.version.major!==e.session.version.major||r.version.minor!==e.session.version.minor))return e.error(e,{message:"TLS version change is disallowed during renegotiation.",send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.protocol_version}});if(n)e.session.cipherSuite=g.getCipherSuite(r.cipher_suite);else for(var v=R.util.createBuffer(r.cipher_suites.bytes());v.length()>0&&(e.session.cipherSuite=g.getCipherSuite(v.getBytes(2)),e.session.cipherSuite===null););if(e.session.cipherSuite===null)return e.error(e,{message:"No cipher suites in common.",send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.handshake_failure},cipherSuite:R.util.bytesToHex(r.cipher_suite)});n?e.session.compressionMethod=r.compression_method:e.session.compressionMethod=g.CompressionMethod.none}return r},g.createSecurityParameters=function(e,t){var a=e.entity===g.ConnectionEnd.client,r=t.random.bytes(),n=a?e.session.sp.client_random:r,i=a?r:g.createRandom().getBytes();e.session.sp={entity:e.entity,prf_algorithm:g.PRFAlgorithm.tls_prf_sha256,bulk_cipher_algorithm:null,cipher_type:null,enc_key_length:null,block_length:null,fixed_iv_length:null,record_iv_length:null,mac_algorithm:null,mac_length:null,mac_key_length:null,compression_algorithm:e.session.compressionMethod,pre_master_secret:null,master_secret:null,client_random:n,server_random:i}},g.handleServerHello=function(e,t,a){var r=g.parseHelloMessage(e,t,a);if(!e.fail){if(r.version.minor<=e.version.minor)e.version.minor=r.version.minor;else return e.error(e,{message:"Incompatible TLS version.",send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.protocol_version}});e.session.version=e.version;var n=r.session_id.bytes();n.length>0&&n===e.session.id?(e.expect=pl,e.session.resuming=!0,e.session.sp.server_random=r.random.bytes()):(e.expect=Lh,e.session.resuming=!1,g.createSecurityParameters(e,r)),e.session.id=n,e.process()}},g.handleClientHello=function(e,t,a){var r=g.parseHelloMessage(e,t,a);if(!e.fail){var n=r.session_id.bytes(),i=null;if(e.sessionCache&&(i=e.sessionCache.getSession(n),i===null?n="":(i.version.major!==r.version.major||i.version.minor>r.version.minor)&&(i=null,n="")),n.length===0&&(n=R.random.getBytes(32)),e.session.id=n,e.session.clientHelloVersion=r.version,e.session.sp={},i)e.version=e.session.version=i.version,e.session.sp=i.sp;else{for(var s,o=1;o<g.SupportedVersions.length&&(s=g.SupportedVersions[o],!(s.minor<=r.version.minor));++o);e.version={major:s.major,minor:s.minor},e.session.version=e.version}i!==null?(e.expect=k0,e.session.resuming=!0,e.session.sp.client_random=r.random.bytes()):(e.expect=e.verifyClient!==!1?Mh:R0,e.session.resuming=!1,g.createSecurityParameters(e,r)),e.open=!0,g.queue(e,g.createRecord(e,{type:g.ContentType.handshake,data:g.createServerHello(e)})),e.session.resuming?(g.queue(e,g.createRecord(e,{type:g.ContentType.change_cipher_spec,data:g.createChangeCipherSpec()})),e.state.pending=g.createConnectionState(e),e.state.current.write=e.state.pending.write,g.queue(e,g.createRecord(e,{type:g.ContentType.handshake,data:g.createFinished(e)}))):(g.queue(e,g.createRecord(e,{type:g.ContentType.handshake,data:g.createCertificate(e)})),e.fail||(g.queue(e,g.createRecord(e,{type:g.ContentType.handshake,data:g.createServerKeyExchange(e)})),e.verifyClient!==!1&&g.queue(e,g.createRecord(e,{type:g.ContentType.handshake,data:g.createCertificateRequest(e)})),g.queue(e,g.createRecord(e,{type:g.ContentType.handshake,data:g.createServerHelloDone(e)})))),g.flush(e),e.process()}},g.handleCertificate=function(e,t,a){if(a<3)return e.error(e,{message:"Invalid Certificate message. Message too short.",send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.illegal_parameter}});var r=t.fragment,n={certificate_list:dt(r,3)},i,s,o=[];try{for(;n.certificate_list.length()>0;)i=dt(n.certificate_list,3),s=R.asn1.fromDer(i),i=R.pki.certificateFromAsn1(s,!0),o.push(i)}catch(l){return e.error(e,{message:"Could not parse certificate list.",cause:l,send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.bad_certificate}})}var c=e.entity===g.ConnectionEnd.client;(c||e.verifyClient===!0)&&o.length===0?e.error(e,{message:c?"No server certificate provided.":"No client certificate provided.",send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.illegal_parameter}}):o.length===0?e.expect=c?dl:R0:(c?e.session.serverCertificate=o[0]:e.session.clientCertificate=o[0],g.verifyCertificateChain(e,o)&&(e.expect=c?dl:R0)),e.process()},g.handleServerKeyExchange=function(e,t,a){if(a>0)return e.error(e,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.unsupported_certificate}});e.expect=Dh,e.process()},g.handleClientKeyExchange=function(e,t,a){if(a<48)return e.error(e,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.unsupported_certificate}});var r=t.fragment,n={enc_pre_master_secret:dt(r,2).getBytes()},i=null;if(e.getPrivateKey)try{i=e.getPrivateKey(e,e.session.serverCertificate),i=R.pki.privateKeyFromPem(i)}catch(c){e.error(e,{message:"Could not get private key.",cause:c,send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.internal_error}})}if(i===null)return e.error(e,{message:"No private key set.",send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.internal_error}});try{var s=e.session.sp;s.pre_master_secret=i.decrypt(n.enc_pre_master_secret);var o=e.session.clientHelloVersion;if(o.major!==s.pre_master_secret.charCodeAt(0)||o.minor!==s.pre_master_secret.charCodeAt(1))throw new Error("TLS version rollback attack detected.")}catch{s.pre_master_secret=R.random.getBytes(48)}e.expect=k0,e.session.clientCertificate!==null&&(e.expect=Kh),e.process()},g.handleCertificateRequest=function(e,t,a){if(a<3)return e.error(e,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.illegal_parameter}});var r=t.fragment,n={certificate_types:dt(r,1),certificate_authorities:dt(r,2)};e.session.certificateRequest=n,e.expect=Uh,e.process()},g.handleCertificateVerify=function(e,t,a){if(a<2)return e.error(e,{message:"Invalid CertificateVerify. Message too short.",send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.illegal_parameter}});var r=t.fragment;r.read-=4;var n=r.bytes();r.read+=4;var i={signature:dt(r,2).getBytes()},s=R.util.createBuffer();s.putBuffer(e.session.md5.digest()),s.putBuffer(e.session.sha1.digest()),s=s.getBytes();try{var o=e.session.clientCertificate;if(!o.publicKey.verify(s,i.signature,"NONE"))throw new Error("CertificateVerify signature does not match.");e.session.md5.update(n),e.session.sha1.update(n)}catch{return e.error(e,{message:"Bad signature in CertificateVerify.",send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.handshake_failure}})}e.expect=k0,e.process()},g.handleServerHelloDone=function(e,t,a){if(a>0)return e.error(e,{message:"Invalid ServerHelloDone message. Invalid length.",send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.record_overflow}});if(e.serverCertificate===null){var r={message:"No server certificate provided. Not enough security.",send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.insufficient_security}},n=0,i=e.verify(e,r.alert.description,n,[]);if(i!==!0)return(i||i===0)&&(typeof i=="object"&&!R.util.isArray(i)?(i.message&&(r.message=i.message),i.alert&&(r.alert.description=i.alert)):typeof i=="number"&&(r.alert.description=i)),e.error(e,r)}e.session.certificateRequest!==null&&(t=g.createRecord(e,{type:g.ContentType.handshake,data:g.createCertificate(e)}),g.queue(e,t)),t=g.createRecord(e,{type:g.ContentType.handshake,data:g.createClientKeyExchange(e)}),g.queue(e,t),e.expect=Vh;var s=function(o,c){o.session.certificateRequest!==null&&o.session.clientCertificate!==null&&g.queue(o,g.createRecord(o,{type:g.ContentType.handshake,data:g.createCertificateVerify(o,c)})),g.queue(o,g.createRecord(o,{type:g.ContentType.change_cipher_spec,data:g.createChangeCipherSpec()})),o.state.pending=g.createConnectionState(o),o.state.current.write=o.state.pending.write,g.queue(o,g.createRecord(o,{type:g.ContentType.handshake,data:g.createFinished(o)})),o.expect=pl,g.flush(o),o.process()};if(e.session.certificateRequest===null||e.session.clientCertificate===null)return s(e,null);g.getClientSignature(e,s)},g.handleChangeCipherSpec=function(e,t){if(t.fragment.getByte()!==1)return e.error(e,{message:"Invalid ChangeCipherSpec message received.",send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.illegal_parameter}});var a=e.entity===g.ConnectionEnd.client;(e.session.resuming&&a||!e.session.resuming&&!a)&&(e.state.pending=g.createConnectionState(e)),e.state.current.read=e.state.pending.read,(!e.session.resuming&&a||e.session.resuming&&!a)&&(e.state.pending=null),e.expect=a?Ph:qh,e.process()},g.handleFinished=function(e,t,a){var r=t.fragment;r.read-=4;var n=r.bytes();r.read+=4;var i=t.fragment.getBytes();r=R.util.createBuffer(),r.putBuffer(e.session.md5.digest()),r.putBuffer(e.session.sha1.digest());var s=e.entity===g.ConnectionEnd.client,o=s?"server finished":"client finished",c=e.session.sp,l=12,u=Qo;if(r=u(c.master_secret,o,r.getBytes(),l),r.getBytes()!==i)return e.error(e,{message:"Invalid verify_data in Finished message.",send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.decrypt_error}});e.session.md5.update(n),e.session.sha1.update(n),(e.session.resuming&&s||!e.session.resuming&&!s)&&(g.queue(e,g.createRecord(e,{type:g.ContentType.change_cipher_spec,data:g.createChangeCipherSpec()})),e.state.current.write=e.state.pending.write,e.state.pending=null,g.queue(e,g.createRecord(e,{type:g.ContentType.handshake,data:g.createFinished(e)}))),e.expect=s?Oh:Hh,e.handshaking=!1,++e.handshakes,e.peerCertificate=s?e.session.serverCertificate:e.session.clientCertificate,g.flush(e),e.isConnected=!0,e.connected(e),e.process()},g.handleAlert=function(e,t){var a=t.fragment,r={level:a.getByte(),description:a.getByte()},n;switch(r.description){case g.Alert.Description.close_notify:n="Connection closed.";break;case g.Alert.Description.unexpected_message:n="Unexpected message.";break;case g.Alert.Description.bad_record_mac:n="Bad record MAC.";break;case g.Alert.Description.decryption_failed:n="Decryption failed.";break;case g.Alert.Description.record_overflow:n="Record overflow.";break;case g.Alert.Description.decompression_failure:n="Decompression failed.";break;case g.Alert.Description.handshake_failure:n="Handshake failure.";break;case g.Alert.Description.bad_certificate:n="Bad certificate.";break;case g.Alert.Description.unsupported_certificate:n="Unsupported certificate.";break;case g.Alert.Description.certificate_revoked:n="Certificate revoked.";break;case g.Alert.Description.certificate_expired:n="Certificate expired.";break;case g.Alert.Description.certificate_unknown:n="Certificate unknown.";break;case g.Alert.Description.illegal_parameter:n="Illegal parameter.";break;case g.Alert.Description.unknown_ca:n="Unknown certificate authority.";break;case g.Alert.Description.access_denied:n="Access denied.";break;case g.Alert.Description.decode_error:n="Decode error.";break;case g.Alert.Description.decrypt_error:n="Decrypt error.";break;case g.Alert.Description.export_restriction:n="Export restriction.";break;case g.Alert.Description.protocol_version:n="Unsupported protocol version.";break;case g.Alert.Description.insufficient_security:n="Insufficient security.";break;case g.Alert.Description.internal_error:n="Internal error.";break;case g.Alert.Description.user_canceled:n="User canceled.";break;case g.Alert.Description.no_renegotiation:n="Renegotiation not supported.";break;default:n="Unknown error.";break}if(r.description===g.Alert.Description.close_notify)return e.close();e.error(e,{message:n,send:!1,origin:e.entity===g.ConnectionEnd.client?"server":"client",alert:r}),e.process()},g.handleHandshake=function(e,t){var a=t.fragment,r=a.getByte(),n=a.getInt24();if(n>a.length())return e.fragmented=t,t.fragment=R.util.createBuffer(),a.read-=4,e.process();e.fragmented=null,a.read-=4;var i=a.bytes(n+4);a.read+=4,r in Xo[e.entity][e.expect]?(e.entity===g.ConnectionEnd.server&&!e.open&&!e.fail&&(e.handshaking=!0,e.session={version:null,extensions:{server_name:{serverNameList:[]}},cipherSuite:null,compressionMethod:null,serverCertificate:null,clientCertificate:null,md5:R.md.md5.create(),sha1:R.md.sha1.create()}),r!==g.HandshakeType.hello_request&&r!==g.HandshakeType.certificate_verify&&r!==g.HandshakeType.finished&&(e.session.md5.update(i),e.session.sha1.update(i)),Xo[e.entity][e.expect][r](e,t,n)):g.handleUnexpected(e,t)},g.handleApplicationData=function(e,t){e.data.putBuffer(t.fragment),e.dataReady(e),e.process()},g.handleHeartbeat=function(e,t){var a=t.fragment,r=a.getByte(),n=a.getInt16(),i=a.getBytes(n);if(r===g.HeartbeatMessageType.heartbeat_request){if(e.handshaking||n>i.length)return e.process();g.queue(e,g.createRecord(e,{type:g.ContentType.heartbeat,data:g.createHeartbeat(g.HeartbeatMessageType.heartbeat_response,i)})),g.flush(e)}else if(r===g.HeartbeatMessageType.heartbeat_response){if(i!==e.expectedHeartbeatPayload)return e.process();e.heartbeatReceived&&e.heartbeatReceived(e,R.util.createBuffer(i))}e.process()};var kh=0,Lh=1,dl=2,Dh=3,Uh=4,pl=5,Ph=6,Oh=7,Vh=8,Fh=0,Mh=1,R0=2,Kh=3,k0=4,qh=5,Hh=6,h=g.handleUnexpected,hl=g.handleChangeCipherSpec,Ie=g.handleAlert,We=g.handleHandshake,gl=g.handleApplicationData,Ae=g.handleHeartbeat,L0=[];L0[g.ConnectionEnd.client]=[[h,Ie,We,h,Ae],[h,Ie,We,h,Ae],[h,Ie,We,h,Ae],[h,Ie,We,h,Ae],[h,Ie,We,h,Ae],[hl,Ie,h,h,Ae],[h,Ie,We,h,Ae],[h,Ie,We,gl,Ae],[h,Ie,We,h,Ae]],L0[g.ConnectionEnd.server]=[[h,Ie,We,h,Ae],[h,Ie,We,h,Ae],[h,Ie,We,h,Ae],[h,Ie,We,h,Ae],[hl,Ie,h,h,Ae],[h,Ie,We,h,Ae],[h,Ie,We,gl,Ae],[h,Ie,We,h,Ae]];var Gt=g.handleHelloRequest,Gh=g.handleServerHello,vl=g.handleCertificate,yl=g.handleServerKeyExchange,D0=g.handleCertificateRequest,jo=g.handleServerHelloDone,ml=g.handleFinished,Xo=[];Xo[g.ConnectionEnd.client]=[[h,h,Gh,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h],[Gt,h,h,h,h,h,h,h,h,h,h,vl,yl,D0,jo,h,h,h,h,h,h],[Gt,h,h,h,h,h,h,h,h,h,h,h,yl,D0,jo,h,h,h,h,h,h],[Gt,h,h,h,h,h,h,h,h,h,h,h,h,D0,jo,h,h,h,h,h,h],[Gt,h,h,h,h,h,h,h,h,h,h,h,h,h,jo,h,h,h,h,h,h],[Gt,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h],[Gt,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,ml],[Gt,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h],[Gt,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h]];var zh=g.handleClientHello,$h=g.handleClientKeyExchange,Qh=g.handleCertificateVerify;Xo[g.ConnectionEnd.server]=[[h,zh,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h],[h,h,h,h,h,h,h,h,h,h,h,vl,h,h,h,h,h,h,h,h,h],[h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,$h,h,h,h,h],[h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,Qh,h,h,h,h,h],[h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h],[h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,ml],[h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h],[h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h]],g.generateKeys=function(e,t){var a=Qo,r=t.client_random+t.server_random;e.session.resuming||(t.master_secret=a(t.pre_master_secret,"master secret",r,48).bytes(),t.pre_master_secret=null),r=t.server_random+t.client_random;var n=2*t.mac_key_length+2*t.enc_key_length,i=e.version.major===g.Versions.TLS_1_0.major&&e.version.minor===g.Versions.TLS_1_0.minor;i&&(n+=2*t.fixed_iv_length);var s=a(t.master_secret,"key expansion",r,n),o={client_write_MAC_key:s.getBytes(t.mac_key_length),server_write_MAC_key:s.getBytes(t.mac_key_length),client_write_key:s.getBytes(t.enc_key_length),server_write_key:s.getBytes(t.enc_key_length)};return i&&(o.client_write_IV=s.getBytes(t.fixed_iv_length),o.server_write_IV=s.getBytes(t.fixed_iv_length)),o},g.createConnectionState=function(e){var t=e.entity===g.ConnectionEnd.client,a=function(){var i={sequenceNumber:[0,0],macKey:null,macLength:0,macFunction:null,cipherState:null,cipherFunction:function(s){return!0},compressionState:null,compressFunction:function(s){return!0},updateSequenceNumber:function(){i.sequenceNumber[1]===4294967295?(i.sequenceNumber[1]=0,++i.sequenceNumber[0]):++i.sequenceNumber[1]}};return i},r={read:a(),write:a()};if(r.read.update=function(i,s){return r.read.cipherFunction(s,r.read)?r.read.compressFunction(i,s,r.read)||i.error(i,{message:"Could not decompress record.",send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.decompression_failure}}):i.error(i,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.bad_record_mac}}),!i.fail},r.write.update=function(i,s){return r.write.compressFunction(i,s,r.write)?r.write.cipherFunction(s,r.write)||i.error(i,{message:"Could not encrypt record.",send:!1,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.internal_error}}):i.error(i,{message:"Could not compress record.",send:!1,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.internal_error}}),!i.fail},e.session){var n=e.session.sp;switch(e.session.cipherSuite.initSecurityParameters(n),n.keys=g.generateKeys(e,n),r.read.macKey=t?n.keys.server_write_MAC_key:n.keys.client_write_MAC_key,r.write.macKey=t?n.keys.client_write_MAC_key:n.keys.server_write_MAC_key,e.session.cipherSuite.initConnectionState(r,e,n),n.compression_algorithm){case g.CompressionMethod.none:break;case g.CompressionMethod.deflate:r.read.compressFunction=Rh,r.write.compressFunction=_h;break;default:throw new Error("Unsupported compression algorithm.")}}return r},g.createRandom=function(){var e=new Date,t=+e+e.getTimezoneOffset()*6e4,a=R.util.createBuffer();return a.putInt32(t),a.putBytes(R.random.getBytes(28)),a},g.createRecord=function(e,t){if(!t.data)return null;var a={type:t.type,version:{major:e.version.major,minor:e.version.minor},length:t.data.length(),fragment:t.data};return a},g.createAlert=function(e,t){var a=R.util.createBuffer();return a.putByte(t.level),a.putByte(t.description),g.createRecord(e,{type:g.ContentType.alert,data:a})},g.createClientHello=function(e){e.session.clientHelloVersion={major:e.version.major,minor:e.version.minor};for(var t=R.util.createBuffer(),a=0;a<e.cipherSuites.length;++a){var r=e.cipherSuites[a];t.putByte(r.id[0]),t.putByte(r.id[1])}var n=t.length(),i=R.util.createBuffer();i.putByte(g.CompressionMethod.none);var s=i.length(),o=R.util.createBuffer();if(e.virtualHost){var c=R.util.createBuffer();c.putByte(0),c.putByte(0);var l=R.util.createBuffer();l.putByte(0),Et(l,2,R.util.createBuffer(e.virtualHost));var u=R.util.createBuffer();Et(u,2,l),Et(c,2,u),o.putBuffer(c)}var d=o.length();d>0&&(d+=2);var v=e.session.id,E=v.length+1+2+4+28+2+n+1+s+d,y=R.util.createBuffer();return y.putByte(g.HandshakeType.client_hello),y.putInt24(E),y.putByte(e.version.major),y.putByte(e.version.minor),y.putBytes(e.session.sp.client_random),Et(y,1,R.util.createBuffer(v)),Et(y,2,t),Et(y,1,i),d>0&&Et(y,2,o),y},g.createServerHello=function(e){var t=e.session.id,a=t.length+1+2+4+28+2+1,r=R.util.createBuffer();return r.putByte(g.HandshakeType.server_hello),r.putInt24(a),r.putByte(e.version.major),r.putByte(e.version.minor),r.putBytes(e.session.sp.server_random),Et(r,1,R.util.createBuffer(t)),r.putByte(e.session.cipherSuite.id[0]),r.putByte(e.session.cipherSuite.id[1]),r.putByte(e.session.compressionMethod),r},g.createCertificate=function(e){var t=e.entity===g.ConnectionEnd.client,a=null;if(e.getCertificate){var r;t?r=e.session.certificateRequest:r=e.session.extensions.server_name.serverNameList,a=e.getCertificate(e,r)}var n=R.util.createBuffer();if(a!==null)try{R.util.isArray(a)||(a=[a]);for(var i=null,s=0;s<a.length;++s){var o=R.pem.decode(a[s])[0];if(o.type!=="CERTIFICATE"&&o.type!=="X509 CERTIFICATE"&&o.type!=="TRUSTED CERTIFICATE"){var c=new Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');throw c.headerType=o.type,c}if(o.procType&&o.procType.type==="ENCRYPTED")throw new Error("Could not convert certificate from PEM; PEM is encrypted.");var l=R.util.createBuffer(o.body);i===null&&(i=R.asn1.fromDer(l.bytes(),!1));var u=R.util.createBuffer();Et(u,3,l),n.putBuffer(u)}a=R.pki.certificateFromAsn1(i),t?e.session.clientCertificate=a:e.session.serverCertificate=a}catch(E){return e.error(e,{message:"Could not send certificate list.",cause:E,send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.bad_certificate}})}var d=3+n.length(),v=R.util.createBuffer();return v.putByte(g.HandshakeType.certificate),v.putInt24(d),Et(v,3,n),v},g.createClientKeyExchange=function(e){var t=R.util.createBuffer();t.putByte(e.session.clientHelloVersion.major),t.putByte(e.session.clientHelloVersion.minor),t.putBytes(R.random.getBytes(46));var a=e.session.sp;a.pre_master_secret=t.getBytes();var r=e.session.serverCertificate.publicKey;t=r.encrypt(a.pre_master_secret);var n=t.length+2,i=R.util.createBuffer();return i.putByte(g.HandshakeType.client_key_exchange),i.putInt24(n),i.putInt16(t.length),i.putBytes(t),i},g.createServerKeyExchange=function(e){var t=R.util.createBuffer();return t},g.getClientSignature=function(e,t){var a=R.util.createBuffer();a.putBuffer(e.session.md5.digest()),a.putBuffer(e.session.sha1.digest()),a=a.getBytes(),e.getSignature=e.getSignature||function(r,n,i){var s=null;if(r.getPrivateKey)try{s=r.getPrivateKey(r,r.session.clientCertificate),s=R.pki.privateKeyFromPem(s)}catch(o){r.error(r,{message:"Could not get private key.",cause:o,send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.internal_error}})}s===null?r.error(r,{message:"No private key set.",send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.internal_error}}):n=s.sign(n,null),i(r,n)},e.getSignature(e,a,t)},g.createCertificateVerify=function(e,t){var a=t.length+2,r=R.util.createBuffer();return r.putByte(g.HandshakeType.certificate_verify),r.putInt24(a),r.putInt16(t.length),r.putBytes(t),r},g.createCertificateRequest=function(e){var t=R.util.createBuffer();t.putByte(1);var a=R.util.createBuffer();for(var r in e.caStore.certs){var n=e.caStore.certs[r],i=R.pki.distinguishedNameToAsn1(n.subject),s=R.asn1.toDer(i);a.putInt16(s.length()),a.putBuffer(s)}var o=1+t.length()+2+a.length(),c=R.util.createBuffer();return c.putByte(g.HandshakeType.certificate_request),c.putInt24(o),Et(c,1,t),Et(c,2,a),c},g.createServerHelloDone=function(e){var t=R.util.createBuffer();return t.putByte(g.HandshakeType.server_hello_done),t.putInt24(0),t},g.createChangeCipherSpec=function(){var e=R.util.createBuffer();return e.putByte(1),e},g.createFinished=function(e){var t=R.util.createBuffer();t.putBuffer(e.session.md5.digest()),t.putBuffer(e.session.sha1.digest());var a=e.entity===g.ConnectionEnd.client,r=e.session.sp,n=12,i=Qo,s=a?"client finished":"server finished";t=i(r.master_secret,s,t.getBytes(),n);var o=R.util.createBuffer();return o.putByte(g.HandshakeType.finished),o.putInt24(t.length()),o.putBuffer(t),o},g.createHeartbeat=function(e,t,a){typeof a>"u"&&(a=t.length);var r=R.util.createBuffer();r.putByte(e),r.putInt16(a),r.putBytes(t);var n=r.length(),i=Math.max(16,n-a-3);return r.putBytes(R.random.getBytes(i)),r},g.queue=function(e,t){if(t&&!(t.fragment.length()===0&&(t.type===g.ContentType.handshake||t.type===g.ContentType.alert||t.type===g.ContentType.change_cipher_spec))){if(t.type===g.ContentType.handshake){var a=t.fragment.bytes();e.session.md5.update(a),e.session.sha1.update(a),a=null}var r;if(t.fragment.length()<=g.MaxFragment)r=[t];else{r=[];for(var n=t.fragment.bytes();n.length>g.MaxFragment;)r.push(g.createRecord(e,{type:t.type,data:R.util.createBuffer(n.slice(0,g.MaxFragment))})),n=n.slice(g.MaxFragment);n.length>0&&r.push(g.createRecord(e,{type:t.type,data:R.util.createBuffer(n)}))}for(var i=0;i<r.length&&!e.fail;++i){var s=r[i],o=e.state.current.write;o.update(e,s)&&e.records.push(s)}}},g.flush=function(e){for(var t=0;t<e.records.length;++t){var a=e.records[t];e.tlsData.putByte(a.type),e.tlsData.putByte(a.version.major),e.tlsData.putByte(a.version.minor),e.tlsData.putInt16(a.fragment.length()),e.tlsData.putBuffer(e.records[t].fragment)}return e.records=[],e.tlsDataReady(e)};var U0=function(e){switch(e){case!0:return!0;case R.pki.certificateError.bad_certificate:return g.Alert.Description.bad_certificate;case R.pki.certificateError.unsupported_certificate:return g.Alert.Description.unsupported_certificate;case R.pki.certificateError.certificate_revoked:return g.Alert.Description.certificate_revoked;case R.pki.certificateError.certificate_expired:return g.Alert.Description.certificate_expired;case R.pki.certificateError.certificate_unknown:return g.Alert.Description.certificate_unknown;case R.pki.certificateError.unknown_ca:return g.Alert.Description.unknown_ca;default:return g.Alert.Description.bad_certificate}},jh=function(e){switch(e){case!0:return!0;case g.Alert.Description.bad_certificate:return R.pki.certificateError.bad_certificate;case g.Alert.Description.unsupported_certificate:return R.pki.certificateError.unsupported_certificate;case g.Alert.Description.certificate_revoked:return R.pki.certificateError.certificate_revoked;case g.Alert.Description.certificate_expired:return R.pki.certificateError.certificate_expired;case g.Alert.Description.certificate_unknown:return R.pki.certificateError.certificate_unknown;case g.Alert.Description.unknown_ca:return R.pki.certificateError.unknown_ca;default:return R.pki.certificateError.bad_certificate}};g.verifyCertificateChain=function(e,t){try{var a={};for(var r in e.verifyOptions)a[r]=e.verifyOptions[r];a.verify=function(i,s,o){var c=U0(i),l=e.verify(e,i,s,o);if(l!==!0){if(typeof l=="object"&&!R.util.isArray(l)){var u=new Error("The application rejected the certificate.");throw u.send=!0,u.alert={level:g.Alert.Level.fatal,description:g.Alert.Description.bad_certificate},l.message&&(u.message=l.message),l.alert&&(u.alert.description=l.alert),u}l!==i&&(l=jh(l))}return l},R.pki.verifyCertificateChain(e.caStore,t,a)}catch(i){var n=i;(typeof n!="object"||R.util.isArray(n))&&(n={send:!0,alert:{level:g.Alert.Level.fatal,description:U0(i)}}),"send"in n||(n.send=!0),"alert"in n||(n.alert={level:g.Alert.Level.fatal,description:U0(n.error)}),e.error(e,n)}return!e.fail},g.createSessionCache=function(e,t){var a=null;if(e&&e.getSession&&e.setSession&&e.order)a=e;else{a={},a.cache=e||{},a.capacity=Math.max(t||100,1),a.order=[];for(var r in e)a.order.length<=t?a.order.push(r):delete e[r];a.getSession=function(n){var i=null,s=null;if(n?s=R.util.bytesToHex(n):a.order.length>0&&(s=a.order[0]),s!==null&&s in a.cache){i=a.cache[s],delete a.cache[s];for(var o in a.order)if(a.order[o]===s){a.order.splice(o,1);break}}return i},a.setSession=function(n,i){if(a.order.length===a.capacity){var s=a.order.shift();delete a.cache[s]}var s=R.util.bytesToHex(n);a.order.push(s),a.cache[s]=i}}return a},g.createConnection=function(e){var t=null;e.caStore?R.util.isArray(e.caStore)?t=R.pki.createCaStore(e.caStore):t=e.caStore:t=R.pki.createCaStore();var a=e.cipherSuites||null;if(a===null){a=[];for(var r in g.CipherSuites)a.push(g.CipherSuites[r])}var n=e.server?g.ConnectionEnd.server:g.ConnectionEnd.client,i=e.sessionCache?g.createSessionCache(e.sessionCache):null,s={version:{major:g.Version.major,minor:g.Version.minor},entity:n,sessionId:e.sessionId,caStore:t,sessionCache:i,cipherSuites:a,connected:e.connected,virtualHost:e.virtualHost||null,verifyClient:e.verifyClient||!1,verify:e.verify||function(u,d,v,E){return d},verifyOptions:e.verifyOptions||{},getCertificate:e.getCertificate||null,getPrivateKey:e.getPrivateKey||null,getSignature:e.getSignature||null,input:R.util.createBuffer(),tlsData:R.util.createBuffer(),data:R.util.createBuffer(),tlsDataReady:e.tlsDataReady,dataReady:e.dataReady,heartbeatReceived:e.heartbeatReceived,closed:e.closed,error:function(u,d){d.origin=d.origin||(u.entity===g.ConnectionEnd.client?"client":"server"),d.send&&(g.queue(u,g.createAlert(u,d.alert)),g.flush(u));var v=d.fatal!==!1;v&&(u.fail=!0),e.error(u,d),v&&u.close(!1)},deflate:e.deflate||null,inflate:e.inflate||null};s.reset=function(u){s.version={major:g.Version.major,minor:g.Version.minor},s.record=null,s.session=null,s.peerCertificate=null,s.state={pending:null,current:null},s.expect=s.entity===g.ConnectionEnd.client?kh:Fh,s.fragmented=null,s.records=[],s.open=!1,s.handshakes=0,s.handshaking=!1,s.isConnected=!1,s.fail=!(u||typeof u>"u"),s.input.clear(),s.tlsData.clear(),s.data.clear(),s.state.current=g.createConnectionState(s)},s.reset();var o=function(u,d){var v=d.type-g.ContentType.change_cipher_spec,E=L0[u.entity][u.expect];v in E?E[v](u,d):g.handleUnexpected(u,d)},c=function(u){var d=0,v=u.input,E=v.length();if(E<5)d=5-E;else{u.record={type:v.getByte(),version:{major:v.getByte(),minor:v.getByte()},length:v.getInt16(),fragment:R.util.createBuffer(),ready:!1};var y=u.record.version.major===u.version.major;y&&u.session&&u.session.version&&(y=u.record.version.minor===u.version.minor),y||u.error(u,{message:"Incompatible TLS version.",send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.protocol_version}})}return d},l=function(u){var d=0,v=u.input,E=v.length();if(E<u.record.length)d=u.record.length-E;else{u.record.fragment.putBytes(v.getBytes(u.record.length)),v.compact();var y=u.state.current.read;y.update(u,u.record)&&(u.fragmented!==null&&(u.fragmented.type===u.record.type?(u.fragmented.fragment.putBuffer(u.record.fragment),u.record=u.fragmented):u.error(u,{message:"Invalid fragmented record.",send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.unexpected_message}})),u.record.ready=!0)}return d};return s.handshake=function(u){if(s.entity!==g.ConnectionEnd.client)s.error(s,{message:"Cannot initiate handshake as a server.",fatal:!1});else if(s.handshaking)s.error(s,{message:"Handshake already in progress.",fatal:!1});else{s.fail&&!s.open&&s.handshakes===0&&(s.fail=!1),s.handshaking=!0,u=u||"";var d=null;u.length>0&&(s.sessionCache&&(d=s.sessionCache.getSession(u)),d===null&&(u="")),u.length===0&&s.sessionCache&&(d=s.sessionCache.getSession(),d!==null&&(u=d.id)),s.session={id:u,version:null,cipherSuite:null,compressionMethod:null,serverCertificate:null,certificateRequest:null,clientCertificate:null,sp:{},md5:R.md.md5.create(),sha1:R.md.sha1.create()},d&&(s.version=d.version,s.session.sp=d.sp),s.session.sp.client_random=g.createRandom().getBytes(),s.open=!0,g.queue(s,g.createRecord(s,{type:g.ContentType.handshake,data:g.createClientHello(s)})),g.flush(s)}},s.process=function(u){var d=0;return u&&s.input.putBytes(u),s.fail||(s.record!==null&&s.record.ready&&s.record.fragment.isEmpty()&&(s.record=null),s.record===null&&(d=c(s)),!s.fail&&s.record!==null&&!s.record.ready&&(d=l(s)),!s.fail&&s.record!==null&&s.record.ready&&o(s,s.record)),d},s.prepare=function(u){return g.queue(s,g.createRecord(s,{type:g.ContentType.application_data,data:R.util.createBuffer(u)})),g.flush(s)},s.prepareHeartbeatRequest=function(u,d){return u instanceof R.util.ByteBuffer&&(u=u.bytes()),typeof d>"u"&&(d=u.length),s.expectedHeartbeatPayload=u,g.queue(s,g.createRecord(s,{type:g.ContentType.heartbeat,data:g.createHeartbeat(g.HeartbeatMessageType.heartbeat_request,u,d)})),g.flush(s)},s.close=function(u){if(!s.fail&&s.sessionCache&&s.session){var d={id:s.session.id,version:s.session.version,sp:s.session.sp};d.sp.keys=null,s.sessionCache.setSession(d.id,d)}s.open&&(s.open=!1,s.input.clear(),(s.isConnected||s.handshaking)&&(s.isConnected=s.handshaking=!1,g.queue(s,g.createAlert(s,{level:g.Alert.Level.warning,description:g.Alert.Description.close_notify})),g.flush(s)),s.closed(s)),s.reset(u)},s},R.tls=R.tls||{};for(var P0 in g)typeof g[P0]!="function"&&(R.tls[P0]=g[P0]);R.tls.prf_tls1=Qo,R.tls.hmac_sha1=Nh,R.tls.createSessionCache=g.createSessionCache,R.tls.createConnection=g.createConnection;var zt=X,Ct=zt.tls;Ct.CipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA={id:[0,47],name:"TLS_RSA_WITH_AES_128_CBC_SHA",initSecurityParameters:function(e){e.bulk_cipher_algorithm=Ct.BulkCipherAlgorithm.aes,e.cipher_type=Ct.CipherType.block,e.enc_key_length=16,e.block_length=16,e.fixed_iv_length=16,e.record_iv_length=16,e.mac_algorithm=Ct.MACAlgorithm.hmac_sha1,e.mac_length=20,e.mac_key_length=20},initConnectionState:El},Ct.CipherSuites.TLS_RSA_WITH_AES_256_CBC_SHA={id:[0,53],name:"TLS_RSA_WITH_AES_256_CBC_SHA",initSecurityParameters:function(e){e.bulk_cipher_algorithm=Ct.BulkCipherAlgorithm.aes,e.cipher_type=Ct.CipherType.block,e.enc_key_length=32,e.block_length=16,e.fixed_iv_length=16,e.record_iv_length=16,e.mac_algorithm=Ct.MACAlgorithm.hmac_sha1,e.mac_length=20,e.mac_key_length=20},initConnectionState:El};function El(e,t,a){var r=t.entity===zt.tls.ConnectionEnd.client;e.read.cipherState={init:!1,cipher:zt.cipher.createDecipher("AES-CBC",r?a.keys.server_write_key:a.keys.client_write_key),iv:r?a.keys.server_write_IV:a.keys.client_write_IV},e.write.cipherState={init:!1,cipher:zt.cipher.createCipher("AES-CBC",r?a.keys.client_write_key:a.keys.server_write_key),iv:r?a.keys.client_write_IV:a.keys.server_write_IV},e.read.cipherFunction=Zh,e.write.cipherFunction=Xh,e.read.macLength=e.write.macLength=a.mac_length,e.read.macFunction=e.write.macFunction=Ct.hmac_sha1}function Xh(e,t){var a=!1,r=t.macFunction(t.macKey,t.sequenceNumber,e);e.fragment.putBytes(r),t.updateSequenceNumber();var n;e.version.minor===Ct.Versions.TLS_1_0.minor?n=t.cipherState.init?null:t.cipherState.iv:n=zt.random.getBytesSync(16),t.cipherState.init=!0;var i=t.cipherState.cipher;return i.start({iv:n}),e.version.minor>=Ct.Versions.TLS_1_1.minor&&i.output.putBytes(n),i.update(e.fragment),i.finish(Yh)&&(e.fragment=i.output,e.length=e.fragment.length(),a=!0),a}function Yh(e,t,a){if(!a){var r=e-t.length()%e;t.fillWithByte(r-1,r)}return!0}function Wh(e,t,a){var r=!0;if(a){for(var n=t.length(),i=t.last(),s=n-1-i;s<n-1;++s)r=r&&t.at(s)==i;r&&t.truncate(i+1)}return r}function Zh(e,t){var a=!1,r;e.version.minor===Ct.Versions.TLS_1_0.minor?r=t.cipherState.init?null:t.cipherState.iv:r=e.fragment.getBytes(16),t.cipherState.init=!0;var n=t.cipherState.cipher;n.start({iv:r}),n.update(e.fragment),a=n.finish(Wh);var i=t.macLength,s=zt.random.getBytesSync(i),o=n.output.length();o>=i?(e.fragment=n.output.getBytes(o-i),s=n.output.getBytes(i)):e.fragment=n.output.getBytes(),e.fragment=zt.util.createBuffer(e.fragment),e.length=e.fragment.length();var c=t.macFunction(t.macKey,t.sequenceNumber,e);return t.updateSequenceNumber(),a=Jh(t.macKey,s,c)&&a,a}function Jh(e,t,a){var r=zt.hmac.create();return r.start("SHA1",e),r.update(t),t=r.digest().getBytes(),r.start(null,null),r.update(a),a=r.digest().getBytes(),t===a}var pe=X,xo=pe.sha512=pe.sha512||{};pe.md.sha512=pe.md.algorithms.sha512=xo;var Cl=pe.sha384=pe.sha512.sha384=pe.sha512.sha384||{};Cl.create=function(){return xo.create("SHA-384")},pe.md.sha384=pe.md.algorithms.sha384=Cl,pe.sha512.sha256=pe.sha512.sha256||{create:function(){return xo.create("SHA-512/256")}},pe.md["sha512/256"]=pe.md.algorithms["sha512/256"]=pe.sha512.sha256,pe.sha512.sha224=pe.sha512.sha224||{create:function(){return xo.create("SHA-512/224")}},pe.md["sha512/224"]=pe.md.algorithms["sha512/224"]=pe.sha512.sha224,xo.create=function(e){if(xl||e1(),typeof e>"u"&&(e="SHA-512"),!(e in ar))throw new Error("Invalid SHA-512 algorithm: "+e);for(var t=ar[e],a=null,r=pe.util.createBuffer(),n=new Array(80),i=0;i<80;++i)n[i]=new Array(2);var s=64;switch(e){case"SHA-384":s=48;break;case"SHA-512/256":s=32;break;case"SHA-512/224":s=28;break}var o={algorithm:e.replace("-","").toLowerCase(),blockLength:128,digestLength:s,messageLength:0,fullMessageLength:null,messageLengthSize:16};return o.start=function(){o.messageLength=0,o.fullMessageLength=o.messageLength128=[];for(var c=o.messageLengthSize/4,l=0;l<c;++l)o.fullMessageLength.push(0);r=pe.util.createBuffer(),a=new Array(t.length);for(var l=0;l<t.length;++l)a[l]=t[l].slice(0);return o},o.start(),o.update=function(c,l){l==="utf8"&&(c=pe.util.encodeUtf8(c));var u=c.length;o.messageLength+=u,u=[u/4294967296>>>0,u>>>0];for(var d=o.fullMessageLength.length-1;d>=0;--d)o.fullMessageLength[d]+=u[1],u[1]=u[0]+(o.fullMessageLength[d]/4294967296>>>0),o.fullMessageLength[d]=o.fullMessageLength[d]>>>0,u[0]=u[1]/4294967296>>>0;return r.putBytes(c),Sl(a,n,r),(r.read>2048||r.length()===0)&&r.compact(),o},o.digest=function(){var c=pe.util.createBuffer();c.putBytes(r.bytes());var l=o.fullMessageLength[o.fullMessageLength.length-1]+o.messageLengthSize,u=l&o.blockLength-1;c.putBytes(O0.substr(0,o.blockLength-u));for(var d,v,E=o.fullMessageLength[0]*8,y=0;y<o.fullMessageLength.length-1;++y)d=o.fullMessageLength[y+1]*8,v=d/4294967296>>>0,E+=v,c.putInt32(E>>>0),E=d>>>0;c.putInt32(E);for(var x=new Array(a.length),y=0;y<a.length;++y)x[y]=a[y].slice(0);Sl(x,n,c);var b=pe.util.createBuffer(),A;e==="SHA-512"?A=x.length:e==="SHA-384"?A=x.length-2:A=x.length-4;for(var y=0;y<A;++y)b.putInt32(x[y][0]),(y!==A-1||e!=="SHA-512/224")&&b.putInt32(x[y][1]);return b},o};var O0=null,xl=!1,V0=null,ar=null;function e1(){O0="\x80",O0+=pe.util.fillString("\0",128),V0=[[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]],ar={},ar["SHA-512"]=[[1779033703,4089235720],[3144134277,2227873595],[1013904242,4271175723],[2773480762,1595750129],[1359893119,2917565137],[2600822924,725511199],[528734635,4215389547],[1541459225,327033209]],ar["SHA-384"]=[[3418070365,3238371032],[1654270250,914150663],[2438529370,812702999],[355462360,4144912697],[1731405415,4290775857],[2394180231,1750603025],[3675008525,1694076839],[1203062813,3204075428]],ar["SHA-512/256"]=[[573645204,4230739756],[2673172387,3360449730],[596883563,1867755857],[2520282905,1497426621],[2519219938,2827943907],[3193839141,1401305490],[721525244,746961066],[246885852,2177182882]],ar["SHA-512/224"]=[[2352822216,424955298],[1944164710,2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]],xl=!0}function Sl(e,t,a){for(var r,n,i,s,o,c,l,u,d,v,E,y,x,b,A,w,N,F,U,L,$,Y,se,ie,oe,ge,ut,ht,ce,ye,K,jt,sr,me,Ee,xe=a.length();xe>=128;){for(ce=0;ce<16;++ce)t[ce][0]=a.getInt32()>>>0,t[ce][1]=a.getInt32()>>>0;for(;ce<80;++ce)jt=t[ce-2],ye=jt[0],K=jt[1],r=((ye>>>19|K<<13)^(K>>>29|ye<<3)^ye>>>6)>>>0,n=((ye<<13|K>>>19)^(K<<3|ye>>>29)^(ye<<26|K>>>6))>>>0,me=t[ce-15],ye=me[0],K=me[1],i=((ye>>>1|K<<31)^(ye>>>8|K<<24)^ye>>>7)>>>0,s=((ye<<31|K>>>1)^(ye<<24|K>>>8)^(ye<<25|K>>>7))>>>0,sr=t[ce-7],Ee=t[ce-16],K=n+sr[1]+s+Ee[1],t[ce][0]=r+sr[0]+i+Ee[0]+(K/4294967296>>>0)>>>0,t[ce][1]=K>>>0;for(x=e[0][0],b=e[0][1],A=e[1][0],w=e[1][1],N=e[2][0],F=e[2][1],U=e[3][0],L=e[3][1],$=e[4][0],Y=e[4][1],se=e[5][0],ie=e[5][1],oe=e[6][0],ge=e[6][1],ut=e[7][0],ht=e[7][1],ce=0;ce<80;++ce)l=(($>>>14|Y<<18)^($>>>18|Y<<14)^(Y>>>9|$<<23))>>>0,u=(($<<18|Y>>>14)^($<<14|Y>>>18)^(Y<<23|$>>>9))>>>0,d=(oe^$&(se^oe))>>>0,v=(ge^Y&(ie^ge))>>>0,o=((x>>>28|b<<4)^(b>>>2|x<<30)^(b>>>7|x<<25))>>>0,c=((x<<4|b>>>28)^(b<<30|x>>>2)^(b<<25|x>>>7))>>>0,E=(x&A|N&(x^A))>>>0,y=(b&w|F&(b^w))>>>0,K=ht+u+v+V0[ce][1]+t[ce][1],r=ut+l+d+V0[ce][0]+t[ce][0]+(K/4294967296>>>0)>>>0,n=K>>>0,K=c+y,i=o+E+(K/4294967296>>>0)>>>0,s=K>>>0,ut=oe,ht=ge,oe=se,ge=ie,se=$,ie=Y,K=L+n,$=U+r+(K/4294967296>>>0)>>>0,Y=K>>>0,U=N,L=F,N=A,F=w,A=x,w=b,K=n+s,x=r+i+(K/4294967296>>>0)>>>0,b=K>>>0;K=e[0][1]+b,e[0][0]=e[0][0]+x+(K/4294967296>>>0)>>>0,e[0][1]=K>>>0,K=e[1][1]+w,e[1][0]=e[1][0]+A+(K/4294967296>>>0)>>>0,e[1][1]=K>>>0,K=e[2][1]+F,e[2][0]=e[2][0]+N+(K/4294967296>>>0)>>>0,e[2][1]=K>>>0,K=e[3][1]+L,e[3][0]=e[3][0]+U+(K/4294967296>>>0)>>>0,e[3][1]=K>>>0,K=e[4][1]+Y,e[4][0]=e[4][0]+$+(K/4294967296>>>0)>>>0,e[4][1]=K>>>0,K=e[5][1]+ie,e[5][0]=e[5][0]+se+(K/4294967296>>>0)>>>0,e[5][1]=K>>>0,K=e[6][1]+ge,e[6][0]=e[6][0]+oe+(K/4294967296>>>0)>>>0,e[6][1]=K>>>0,K=e[7][1]+ht,e[7][0]=e[7][0]+ut+(K/4294967296>>>0)>>>0,e[7][1]=K>>>0,xe-=128}}var F0={},t1=X,be=t1.asn1;F0.privateKeyValidator={name:"PrivateKeyInfo",tagClass:be.Class.UNIVERSAL,type:be.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:be.Class.UNIVERSAL,type:be.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:be.Class.UNIVERSAL,type:be.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:be.Class.UNIVERSAL,type:be.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:be.Class.UNIVERSAL,type:be.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},F0.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:be.Class.UNIVERSAL,type:be.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:be.Class.UNIVERSAL,type:be.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:be.Class.UNIVERSAL,type:be.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{tagClass:be.Class.UNIVERSAL,type:be.Type.BITSTRING,constructed:!1,composed:!0,captureBitStringValue:"ed25519PublicKey"}]};var Be=X,Tl=F0,r1=Tl.publicKeyValidator,a1=Tl.privateKeyValidator;if(typeof n1>"u")var n1=Be.jsbn.BigInteger;var M0=Be.util.ByteBuffer,lt=typeof Buffer>"u"?Uint8Array:Buffer;Be.pki=Be.pki||{},Be.pki.ed25519=Be.ed25519=Be.ed25519||{};var J=Be.ed25519;J.constants={},J.constants.PUBLIC_KEY_BYTE_LENGTH=32,J.constants.PRIVATE_KEY_BYTE_LENGTH=64,J.constants.SEED_BYTE_LENGTH=32,J.constants.SIGN_BYTE_LENGTH=64,J.constants.HASH_BYTE_LENGTH=64,J.generateKeyPair=function(e){e=e||{};var t=e.seed;if(t===void 0)t=Be.random.getBytesSync(J.constants.SEED_BYTE_LENGTH);else if(typeof t=="string"){if(t.length!==J.constants.SEED_BYTE_LENGTH)throw new TypeError('"seed" must be '+J.constants.SEED_BYTE_LENGTH+" bytes in length.")}else if(!(t instanceof Uint8Array))throw new TypeError('"seed" must be a node.js Buffer, Uint8Array, or a binary string.');t=Pt({message:t,encoding:"binary"});for(var a=new lt(J.constants.PUBLIC_KEY_BYTE_LENGTH),r=new lt(J.constants.PRIVATE_KEY_BYTE_LENGTH),n=0;n<32;++n)r[n]=t[n];return c1(a,r),{publicKey:a,privateKey:r}},J.privateKeyFromAsn1=function(e){var t={},a=[],r=Be.asn1.validate(e,a1,t,a);if(!r){var n=new Error("Invalid Key.");throw n.errors=a,n}var i=Be.asn1.derToOid(t.privateKeyOid),s=Be.oids.EdDSA25519;if(i!==s)throw new Error('Invalid OID "'+i+'"; OID must be "'+s+'".');var o=t.privateKey,c=Pt({message:Be.asn1.fromDer(o).value,encoding:"binary"});return{privateKeyBytes:c}},J.publicKeyFromAsn1=function(e){var t={},a=[],r=Be.asn1.validate(e,r1,t,a);if(!r){var n=new Error("Invalid Key.");throw n.errors=a,n}var i=Be.asn1.derToOid(t.publicKeyOid),s=Be.oids.EdDSA25519;if(i!==s)throw new Error('Invalid OID "'+i+'"; OID must be "'+s+'".');var o=t.ed25519PublicKey;if(o.length!==J.constants.PUBLIC_KEY_BYTE_LENGTH)throw new Error("Key length is invalid.");return Pt({message:o,encoding:"binary"})},J.publicKeyFromPrivateKey=function(e){e=e||{};var t=Pt({message:e.privateKey,encoding:"binary"});if(t.length!==J.constants.PRIVATE_KEY_BYTE_LENGTH)throw new TypeError('"options.privateKey" must have a byte length of '+J.constants.PRIVATE_KEY_BYTE_LENGTH);for(var a=new lt(J.constants.PUBLIC_KEY_BYTE_LENGTH),r=0;r<a.length;++r)a[r]=t[32+r];return a},J.sign=function(e){e=e||{};var t=Pt(e),a=Pt({message:e.privateKey,encoding:"binary"});if(a.length===J.constants.SEED_BYTE_LENGTH){var r=J.generateKeyPair({seed:a});a=r.privateKey}else if(a.length!==J.constants.PRIVATE_KEY_BYTE_LENGTH)throw new TypeError('"options.privateKey" must have a byte length of '+J.constants.SEED_BYTE_LENGTH+" or "+J.constants.PRIVATE_KEY_BYTE_LENGTH);var n=new lt(J.constants.SIGN_BYTE_LENGTH+t.length);l1(n,t,t.length,a);for(var i=new lt(J.constants.SIGN_BYTE_LENGTH),s=0;s<i.length;++s)i[s]=n[s];return i},J.verify=function(e){e=e||{};var t=Pt(e);if(e.signature===void 0)throw new TypeError('"options.signature" must be a node.js Buffer, a Uint8Array, a forge ByteBuffer, or a binary string.');var a=Pt({message:e.signature,encoding:"binary"});if(a.length!==J.constants.SIGN_BYTE_LENGTH)throw new TypeError('"options.signature" must have a byte length of '+J.constants.SIGN_BYTE_LENGTH);var r=Pt({message:e.publicKey,encoding:"binary"});if(r.length!==J.constants.PUBLIC_KEY_BYTE_LENGTH)throw new TypeError('"options.publicKey" must have a byte length of '+J.constants.PUBLIC_KEY_BYTE_LENGTH);var n=new lt(J.constants.SIGN_BYTE_LENGTH+t.length),i=new lt(J.constants.SIGN_BYTE_LENGTH+t.length),s;for(s=0;s<J.constants.SIGN_BYTE_LENGTH;++s)n[s]=a[s];for(s=0;s<t.length;++s)n[s+J.constants.SIGN_BYTE_LENGTH]=t[s];return u1(i,n,n.length,r)>=0};function Pt(e){var t=e.message;if(t instanceof Uint8Array||t instanceof lt)return t;var a=e.encoding;if(t===void 0)if(e.md)t=e.md.digest().getBytes(),a="binary";else throw new TypeError('"options.message" or "options.md" not specified.');if(typeof t=="string"&&!a)throw new TypeError('"options.encoding" must be "binary" or "utf8".');if(typeof t=="string"){if(typeof Buffer<"u")return Buffer.from(t,a);t=new M0(t,a)}else if(!(t instanceof M0))throw new TypeError('"options.message" must be a node.js Buffer, a Uint8Array, a forge ByteBuffer, or a string with "options.encoding" specifying its encoding.');for(var r=new lt(t.length()),n=0;n<r.length;++n)r[n]=t.at(n);return r}var K0=G(),Yo=G([1]),s1=G([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),i1=G([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),bl=G([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),Il=G([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),So=new Float64Array([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]),o1=G([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function To(e,t){var a=Be.md.sha512.create(),r=new M0(e);a.update(r.getBytes(t),"binary");var n=a.digest().getBytes();if(typeof Buffer<"u")return Buffer.from(n,"binary");for(var i=new lt(J.constants.HASH_BYTE_LENGTH),s=0;s<64;++s)i[s]=n.charCodeAt(s);return i}function c1(e,t){var a=[G(),G(),G(),G()],r,n=To(t,32);for(n[0]&=248,n[31]&=127,n[31]|=64,z0(a,n),G0(e,a),r=0;r<32;++r)t[r+32]=e[r];return 0}function l1(e,t,a,r){var n,i,s=new Float64Array(64),o=[G(),G(),G(),G()],c=To(r,32);c[0]&=248,c[31]&=127,c[31]|=64;var l=a+64;for(n=0;n<a;++n)e[64+n]=t[n];for(n=0;n<32;++n)e[32+n]=c[32+n];var u=To(e.subarray(32),a+32);for(q0(u),z0(o,u),G0(e,o),n=32;n<64;++n)e[n]=r[n];var d=To(e,a+64);for(q0(d),n=32;n<64;++n)s[n]=0;for(n=0;n<32;++n)s[n]=u[n];for(n=0;n<32;++n)for(i=0;i<32;i++)s[n+i]+=d[n]*c[i];return Al(e.subarray(32),s),l}function u1(e,t,a,r){var n,i,s=new lt(32),o=[G(),G(),G(),G()],c=[G(),G(),G(),G()];if(i=-1,a<64||d1(c,r)||!f1(t,32))return-1;for(n=0;n<a;++n)e[n]=t[n];for(n=0;n<32;++n)e[n+32]=r[n];var l=To(e,a);if(q0(l),Rl(o,c,l),z0(c,t.subarray(32)),H0(o,c),G0(s,o),a-=64,Nl(t,0,s,0)){for(n=0;n<a;++n)e[n]=0;return-1}for(n=0;n<a;++n)e[n]=t[n+64];return i=a,i}function f1(e,t){var a;for(a=31;a>=0;--a){if(e[t+a]<So[a])return!0;if(e[t+a]>So[a])return!1}return!1}function Al(e,t){var a,r,n,i;for(r=63;r>=32;--r){for(a=0,n=r-32,i=r-12;n<i;++n)t[n]+=a-16*t[r]*So[n-(r-32)],a=t[n]+128>>8,t[n]-=a*256;t[n]+=a,t[r]=0}for(a=0,n=0;n<32;++n)t[n]+=a-(t[31]>>4)*So[n],a=t[n]>>8,t[n]&=255;for(n=0;n<32;++n)t[n]-=a*So[n];for(r=0;r<32;++r)t[r+1]+=t[r]>>8,e[r]=t[r]&255}function q0(e){for(var t=new Float64Array(64),a=0;a<64;++a)t[a]=e[a],e[a]=0;Al(e,t)}function H0(e,t){var a=G(),r=G(),n=G(),i=G(),s=G(),o=G(),c=G(),l=G(),u=G();yr(a,e[1],e[0]),yr(u,t[1],t[0]),le(a,a,u),vr(r,e[0],e[1]),vr(u,t[0],t[1]),le(r,r,u),le(n,e[3],t[3]),le(n,n,i1),le(i,e[2],t[2]),vr(i,i,i),yr(s,r,a),yr(o,i,n),vr(c,i,n),vr(l,r,a),le(e[0],s,o),le(e[1],l,c),le(e[2],c,o),le(e[3],s,l)}function Bl(e,t,a){for(var r=0;r<4;++r)kl(e[r],t[r],a)}function G0(e,t){var a=G(),r=G(),n=G();v1(n,t[2]),le(a,t[0],n),le(r,t[1],n),Wo(e,r),e[31]^=_l(a)<<7}function Wo(e,t){var a,r,n,i=G(),s=G();for(a=0;a<16;++a)s[a]=t[a];for($0(s),$0(s),$0(s),r=0;r<2;++r){for(i[0]=s[0]-65517,a=1;a<15;++a)i[a]=s[a]-65535-(i[a-1]>>16&1),i[a-1]&=65535;i[15]=s[15]-32767-(i[14]>>16&1),n=i[15]>>16&1,i[14]&=65535,kl(s,i,1-n)}for(a=0;a<16;a++)e[2*a]=s[a]&255,e[2*a+1]=s[a]>>8}function d1(e,t){var a=G(),r=G(),n=G(),i=G(),s=G(),o=G(),c=G();return $t(e[2],Yo),p1(e[1],t),nr(n,e[1]),le(i,n,s1),yr(n,n,e[2]),vr(i,e[2],i),nr(s,i),nr(o,s),le(c,o,s),le(a,c,n),le(a,a,i),h1(a,a),le(a,a,n),le(a,a,i),le(a,a,i),le(e[0],a,i),nr(r,e[0]),le(r,r,i),wl(r,n)&&le(e[0],e[0],o1),nr(r,e[0]),le(r,r,i),wl(r,n)?-1:(_l(e[0])===t[31]>>7&&yr(e[0],K0,e[0]),le(e[3],e[0],e[1]),0)}function p1(e,t){var a;for(a=0;a<16;++a)e[a]=t[2*a]+(t[2*a+1]<<8);e[15]&=32767}function h1(e,t){var a=G(),r;for(r=0;r<16;++r)a[r]=t[r];for(r=250;r>=0;--r)nr(a,a),r!==1&&le(a,a,t);for(r=0;r<16;++r)e[r]=a[r]}function wl(e,t){var a=new lt(32),r=new lt(32);return Wo(a,e),Wo(r,t),Nl(a,0,r,0)}function Nl(e,t,a,r){return g1(e,t,a,r,32)}function g1(e,t,a,r,n){var i,s=0;for(i=0;i<n;++i)s|=e[t+i]^a[r+i];return(1&s-1>>>8)-1}function _l(e){var t=new lt(32);return Wo(t,e),t[0]&1}function Rl(e,t,a){var r,n;for($t(e[0],K0),$t(e[1],Yo),$t(e[2],Yo),$t(e[3],K0),n=255;n>=0;--n)r=a[n/8|0]>>(n&7)&1,Bl(e,t,r),H0(t,e),H0(e,e),Bl(e,t,r)}function z0(e,t){var a=[G(),G(),G(),G()];$t(a[0],bl),$t(a[1],Il),$t(a[2],Yo),le(a[3],bl,Il),Rl(e,a,t)}function $t(e,t){var a;for(a=0;a<16;a++)e[a]=t[a]|0}function v1(e,t){var a=G(),r;for(r=0;r<16;++r)a[r]=t[r];for(r=253;r>=0;--r)nr(a,a),r!==2&&r!==4&&le(a,a,t);for(r=0;r<16;++r)e[r]=a[r]}function $0(e){var t,a,r=1;for(t=0;t<16;++t)a=e[t]+r+65535,r=Math.floor(a/65536),e[t]=a-r*65536;e[0]+=r-1+37*(r-1)}function kl(e,t,a){for(var r,n=~(a-1),i=0;i<16;++i)r=n&(e[i]^t[i]),e[i]^=r,t[i]^=r}function G(e){var t,a=new Float64Array(16);if(e)for(t=0;t<e.length;++t)a[t]=e[t];return a}function vr(e,t,a){for(var r=0;r<16;++r)e[r]=t[r]+a[r]}function yr(e,t,a){for(var r=0;r<16;++r)e[r]=t[r]-a[r]}function nr(e,t){le(e,t,t)}function le(e,t,a){var r,n,i=0,s=0,o=0,c=0,l=0,u=0,d=0,v=0,E=0,y=0,x=0,b=0,A=0,w=0,N=0,F=0,U=0,L=0,$=0,Y=0,se=0,ie=0,oe=0,ge=0,ut=0,ht=0,ce=0,ye=0,K=0,jt=0,sr=0,me=a[0],Ee=a[1],xe=a[2],we=a[3],Ne=a[4],_e=a[5],Re=a[6],ke=a[7],Le=a[8],De=a[9],Ue=a[10],Pe=a[11],Oe=a[12],Ve=a[13],Fe=a[14],Me=a[15];r=t[0],i+=r*me,s+=r*Ee,o+=r*xe,c+=r*we,l+=r*Ne,u+=r*_e,d+=r*Re,v+=r*ke,E+=r*Le,y+=r*De,x+=r*Ue,b+=r*Pe,A+=r*Oe,w+=r*Ve,N+=r*Fe,F+=r*Me,r=t[1],s+=r*me,o+=r*Ee,c+=r*xe,l+=r*we,u+=r*Ne,d+=r*_e,v+=r*Re,E+=r*ke,y+=r*Le,x+=r*De,b+=r*Ue,A+=r*Pe,w+=r*Oe,N+=r*Ve,F+=r*Fe,U+=r*Me,r=t[2],o+=r*me,c+=r*Ee,l+=r*xe,u+=r*we,d+=r*Ne,v+=r*_e,E+=r*Re,y+=r*ke,x+=r*Le,b+=r*De,A+=r*Ue,w+=r*Pe,N+=r*Oe,F+=r*Ve,U+=r*Fe,L+=r*Me,r=t[3],c+=r*me,l+=r*Ee,u+=r*xe,d+=r*we,v+=r*Ne,E+=r*_e,y+=r*Re,x+=r*ke,b+=r*Le,A+=r*De,w+=r*Ue,N+=r*Pe,F+=r*Oe,U+=r*Ve,L+=r*Fe,$+=r*Me,r=t[4],l+=r*me,u+=r*Ee,d+=r*xe,v+=r*we,E+=r*Ne,y+=r*_e,x+=r*Re,b+=r*ke,A+=r*Le,w+=r*De,N+=r*Ue,F+=r*Pe,U+=r*Oe,L+=r*Ve,$+=r*Fe,Y+=r*Me,r=t[5],u+=r*me,d+=r*Ee,v+=r*xe,E+=r*we,y+=r*Ne,x+=r*_e,b+=r*Re,A+=r*ke,w+=r*Le,N+=r*De,F+=r*Ue,U+=r*Pe,L+=r*Oe,$+=r*Ve,Y+=r*Fe,se+=r*Me,r=t[6],d+=r*me,v+=r*Ee,E+=r*xe,y+=r*we,x+=r*Ne,b+=r*_e,A+=r*Re,w+=r*ke,N+=r*Le,F+=r*De,U+=r*Ue,L+=r*Pe,$+=r*Oe,Y+=r*Ve,se+=r*Fe,ie+=r*Me,r=t[7],v+=r*me,E+=r*Ee,y+=r*xe,x+=r*we,b+=r*Ne,A+=r*_e,w+=r*Re,N+=r*ke,F+=r*Le,U+=r*De,L+=r*Ue,$+=r*Pe,Y+=r*Oe,se+=r*Ve,ie+=r*Fe,oe+=r*Me,r=t[8],E+=r*me,y+=r*Ee,x+=r*xe,b+=r*we,A+=r*Ne,w+=r*_e,N+=r*Re,F+=r*ke,U+=r*Le,L+=r*De,$+=r*Ue,Y+=r*Pe,se+=r*Oe,ie+=r*Ve,oe+=r*Fe,ge+=r*Me,r=t[9],y+=r*me,x+=r*Ee,b+=r*xe,A+=r*we,w+=r*Ne,N+=r*_e,F+=r*Re,U+=r*ke,L+=r*Le,$+=r*De,Y+=r*Ue,se+=r*Pe,ie+=r*Oe,oe+=r*Ve,ge+=r*Fe,ut+=r*Me,r=t[10],x+=r*me,b+=r*Ee,A+=r*xe,w+=r*we,N+=r*Ne,F+=r*_e,U+=r*Re,L+=r*ke,$+=r*Le,Y+=r*De,se+=r*Ue,ie+=r*Pe,oe+=r*Oe,ge+=r*Ve,ut+=r*Fe,ht+=r*Me,r=t[11],b+=r*me,A+=r*Ee,w+=r*xe,N+=r*we,F+=r*Ne,U+=r*_e,L+=r*Re,$+=r*ke,Y+=r*Le,se+=r*De,ie+=r*Ue,oe+=r*Pe,ge+=r*Oe,ut+=r*Ve,ht+=r*Fe,ce+=r*Me,r=t[12],A+=r*me,w+=r*Ee,N+=r*xe,F+=r*we,U+=r*Ne,L+=r*_e,$+=r*Re,Y+=r*ke,se+=r*Le,ie+=r*De,oe+=r*Ue,ge+=r*Pe,ut+=r*Oe,ht+=r*Ve,ce+=r*Fe,ye+=r*Me,r=t[13],w+=r*me,N+=r*Ee,F+=r*xe,U+=r*we,L+=r*Ne,$+=r*_e,Y+=r*Re,se+=r*ke,ie+=r*Le,oe+=r*De,ge+=r*Ue,ut+=r*Pe,ht+=r*Oe,ce+=r*Ve,ye+=r*Fe,K+=r*Me,r=t[14],N+=r*me,F+=r*Ee,U+=r*xe,L+=r*we,$+=r*Ne,Y+=r*_e,se+=r*Re,ie+=r*ke,oe+=r*Le,ge+=r*De,ut+=r*Ue,ht+=r*Pe,ce+=r*Oe,ye+=r*Ve,K+=r*Fe,jt+=r*Me,r=t[15],F+=r*me,U+=r*Ee,L+=r*xe,$+=r*we,Y+=r*Ne,se+=r*_e,ie+=r*Re,oe+=r*ke,ge+=r*Le,ut+=r*De,ht+=r*Ue,ce+=r*Pe,ye+=r*Oe,K+=r*Ve,jt+=r*Fe,sr+=r*Me,i+=38*U,s+=38*L,o+=38*$,c+=38*Y,l+=38*se,u+=38*ie,d+=38*oe,v+=38*ge,E+=38*ut,y+=38*ht,x+=38*ce,b+=38*ye,A+=38*K,w+=38*jt,N+=38*sr,n=1,r=i+n+65535,n=Math.floor(r/65536),i=r-n*65536,r=s+n+65535,n=Math.floor(r/65536),s=r-n*65536,r=o+n+65535,n=Math.floor(r/65536),o=r-n*65536,r=c+n+65535,n=Math.floor(r/65536),c=r-n*65536,r=l+n+65535,n=Math.floor(r/65536),l=r-n*65536,r=u+n+65535,n=Math.floor(r/65536),u=r-n*65536,r=d+n+65535,n=Math.floor(r/65536),d=r-n*65536,r=v+n+65535,n=Math.floor(r/65536),v=r-n*65536,r=E+n+65535,n=Math.floor(r/65536),E=r-n*65536,r=y+n+65535,n=Math.floor(r/65536),y=r-n*65536,r=x+n+65535,n=Math.floor(r/65536),x=r-n*65536,r=b+n+65535,n=Math.floor(r/65536),b=r-n*65536,r=A+n+65535,n=Math.floor(r/65536),A=r-n*65536,r=w+n+65535,n=Math.floor(r/65536),w=r-n*65536,r=N+n+65535,n=Math.floor(r/65536),N=r-n*65536,r=F+n+65535,n=Math.floor(r/65536),F=r-n*65536,i+=n-1+37*(n-1),n=1,r=i+n+65535,n=Math.floor(r/65536),i=r-n*65536,r=s+n+65535,n=Math.floor(r/65536),s=r-n*65536,r=o+n+65535,n=Math.floor(r/65536),o=r-n*65536,r=c+n+65535,n=Math.floor(r/65536),c=r-n*65536,r=l+n+65535,n=Math.floor(r/65536),l=r-n*65536,r=u+n+65535,n=Math.floor(r/65536),u=r-n*65536,r=d+n+65535,n=Math.floor(r/65536),d=r-n*65536,r=v+n+65535,n=Math.floor(r/65536),v=r-n*65536,r=E+n+65535,n=Math.floor(r/65536),E=r-n*65536,r=y+n+65535,n=Math.floor(r/65536),y=r-n*65536,r=x+n+65535,n=Math.floor(r/65536),x=r-n*65536,r=b+n+65535,n=Math.floor(r/65536),b=r-n*65536,r=A+n+65535,n=Math.floor(r/65536),A=r-n*65536,r=w+n+65535,n=Math.floor(r/65536),w=r-n*65536,r=N+n+65535,n=Math.floor(r/65536),N=r-n*65536,r=F+n+65535,n=Math.floor(r/65536),F=r-n*65536,i+=n-1+37*(n-1),e[0]=i,e[1]=s,e[2]=o,e[3]=c,e[4]=l,e[5]=u,e[6]=d,e[7]=v,e[8]=E,e[9]=y,e[10]=x,e[11]=b,e[12]=A,e[13]=w,e[14]=N,e[15]=F}var pt=X;pt.kem=pt.kem||{};var Ll=pt.jsbn.BigInteger;pt.kem.rsa={},pt.kem.rsa.create=function(e,t){t=t||{};var a=t.prng||pt.random,r={};return r.encrypt=function(n,i){var s=Math.ceil(n.n.bitLength()/8),o;do o=new Ll(pt.util.bytesToHex(a.getBytesSync(s)),16).mod(n.n);while(o.compareTo(Ll.ONE)<=0);o=pt.util.hexToBytes(o.toString(16));var c=s-o.length;c>0&&(o=pt.util.fillString("\0",c)+o);var l=n.encrypt(o,"NONE"),u=e.generate(o,i);return{encapsulation:l,key:u}},r.decrypt=function(n,i,s){var o=n.decrypt(i,"NONE");return e.generate(o,s)},r},pt.kem.kdf1=function(e,t){Dl(this,e,0,t||e.digestLength)},pt.kem.kdf2=function(e,t){Dl(this,e,1,t||e.digestLength)};function Dl(e,t,a,r){e.generate=function(n,i){for(var s=new pt.util.ByteBuffer,o=Math.ceil(i/r)+a,c=new pt.util.ByteBuffer,l=a;l<o;++l){c.putInt32(l),t.start(),t.update(n+c.getBytes());var u=t.digest();s.putBytes(u.getBytes(r))}return s.truncate(s.length()-i),s.getBytes()}}var ee=X;ee.log=ee.log||{},ee.log.levels=["none","error","warning","info","debug","verbose","max"];var Zo={},Q0=[],bo=null;ee.log.LEVEL_LOCKED=2,ee.log.NO_LEVEL_CHECK=4,ee.log.INTERPOLATE=8;for(var Qt=0;Qt<ee.log.levels.length;++Qt){var Ul=ee.log.levels[Qt];Zo[Ul]={index:Qt,name:Ul.toUpperCase()}}ee.log.logMessage=function(e){for(var t=Zo[e.level].index,a=0;a<Q0.length;++a){var r=Q0[a];if(r.flags&ee.log.NO_LEVEL_CHECK)r.f(e);else{var n=Zo[r.level].index;t<=n&&r.f(r,e)}}},ee.log.prepareStandard=function(e){"standard"in e||(e.standard=Zo[e.level].name+" ["+e.category+"] "+e.message)},ee.log.prepareFull=function(e){if(!("full"in e)){var t=[e.message];t=t.concat([]),e.full=ee.util.format.apply(this,t)}},ee.log.prepareStandardFull=function(e){"standardFull"in e||(ee.log.prepareStandard(e),e.standardFull=e.standard)};for(var Pl=["error","warning","info","debug","verbose"],Qt=0;Qt<Pl.length;++Qt)(function(t){ee.log[t]=function(a,r){var n=Array.prototype.slice.call(arguments).slice(2),i={timestamp:new Date,level:t,category:a,message:r,arguments:n};ee.log.logMessage(i)}})(Pl[Qt]);if(ee.log.makeLogger=function(e){var t={flags:0,f:e};return ee.log.setLevel(t,"none"),t},ee.log.setLevel=function(e,t){var a=!1;if(e&&!(e.flags&ee.log.LEVEL_LOCKED))for(var r=0;r<ee.log.levels.length;++r){var n=ee.log.levels[r];if(t==n){e.level=t,a=!0;break}}return a},ee.log.lock=function(e,t){typeof t>"u"||t?e.flags|=ee.log.LEVEL_LOCKED:e.flags&=~ee.log.LEVEL_LOCKED},ee.log.addLogger=function(e){Q0.push(e)},typeof console<"u"&&"log"in console){var Io;if(console.error&&console.warn&&console.info&&console.debug){var y1={error:console.error,warning:console.warn,info:console.info,debug:console.debug,verbose:console.debug},W0=function(e,t){ee.log.prepareStandard(t);var a=y1[t.level],r=[t.standard];r=r.concat(t.arguments.slice()),a.apply(console,r)};Io=ee.log.makeLogger(W0)}else{var W0=function(t,a){ee.log.prepareStandardFull(a),console.log(a.standardFull)};Io=ee.log.makeLogger(W0)}ee.log.setLevel(Io,"debug"),ee.log.addLogger(Io),bo=Io}else console={log:function(){}};if(bo!==null&&typeof window<"u"&&window.location){var Jo=new URL(window.location.href).searchParams;if(Jo.has("console.level")&&ee.log.setLevel(bo,Jo.get("console.level").slice(-1)[0]),Jo.has("console.lock")){var m1=Jo.get("console.lock").slice(-1)[0];m1=="true"&&ee.log.lock(bo)}}ee.log.consoleLogger=bo;var P=X,S=P.asn1,Ze=P.pkcs7=P.pkcs7||{};Ze.messageFromPem=function(e){var t=P.pem.decode(e)[0];if(t.type!=="PKCS7"){var a=new Error('Could not convert PKCS#7 message from PEM; PEM header type is not "PKCS#7".');throw a.headerType=t.type,a}if(t.procType&&t.procType.type==="ENCRYPTED")throw new Error("Could not convert PKCS#7 message from PEM; PEM is encrypted.");var r=S.fromDer(t.body);return Ze.messageFromAsn1(r)},Ze.messageToPem=function(e,t){var a={type:"PKCS7",body:S.toDer(e.toAsn1()).getBytes()};return P.pem.encode(a,{maxline:t})},Ze.messageFromAsn1=function(e){var t={},a=[];if(!S.validate(e,Ze.asn1.contentInfoValidator,t,a)){var r=new Error("Cannot read PKCS#7 message. ASN.1 object is not an PKCS#7 ContentInfo.");throw r.errors=a,r}var n=S.derToOid(t.contentType),i;switch(n){case P.pki.oids.envelopedData:i=Ze.createEnvelopedData();break;case P.pki.oids.encryptedData:i=Ze.createEncryptedData();break;case P.pki.oids.signedData:i=Ze.createSignedData();break;default:throw new Error("Cannot read PKCS#7 message. ContentType with OID "+n+" is not (yet) supported.")}return i.fromAsn1(t.content.value[0]),i},Ze.createSignedData=function(){var e=null;return e={type:P.pki.oids.signedData,version:1,certificates:[],crls:[],signers:[],digestAlgorithmIdentifiers:[],contentInfo:null,signerInfos:[],fromAsn1:function(r){if(X0(e,r,Ze.asn1.signedDataValidator),e.certificates=[],e.crls=[],e.digestAlgorithmIdentifiers=[],e.contentInfo=null,e.signerInfos=[],e.rawCapture.certificates)for(var n=e.rawCapture.certificates.value,i=0;i<n.length;++i)e.certificates.push(P.pki.certificateFromAsn1(n[i]))},toAsn1:function(){e.contentInfo||e.sign();for(var r=[],n=0;n<e.certificates.length;++n)r.push(P.pki.certificateToAsn1(e.certificates[n]));var i=[],s=S.create(S.Class.CONTEXT_SPECIFIC,0,!0,[S.create(S.Class.UNIVERSAL,S.Type.SEQUENCE,!0,[S.create(S.Class.UNIVERSAL,S.Type.INTEGER,!1,S.integerToDer(e.version).getBytes()),S.create(S.Class.UNIVERSAL,S.Type.SET,!0,e.digestAlgorithmIdentifiers),e.contentInfo])]);return r.length>0&&s.value[0].value.push(S.create(S.Class.CONTEXT_SPECIFIC,0,!0,r)),i.length>0&&s.value[0].value.push(S.create(S.Class.CONTEXT_SPECIFIC,1,!0,i)),s.value[0].value.push(S.create(S.Class.UNIVERSAL,S.Type.SET,!0,e.signerInfos)),S.create(S.Class.UNIVERSAL,S.Type.SEQUENCE,!0,[S.create(S.Class.UNIVERSAL,S.Type.OID,!1,S.oidToDer(e.type).getBytes()),s])},addSigner:function(r){var n=r.issuer,i=r.serialNumber;if(r.certificate){var s=r.certificate;typeof s=="string"&&(s=P.pki.certificateFromPem(s)),n=s.issuer.attributes,i=s.serialNumber}var o=r.key;if(!o)throw new Error("Could not add PKCS#7 signer; no private key specified.");typeof o=="string"&&(o=P.pki.privateKeyFromPem(o));var c=r.digestAlgorithm||P.pki.oids.sha1;switch(c){case P.pki.oids.sha1:case P.pki.oids.sha256:case P.pki.oids.sha384:case P.pki.oids.sha512:case P.pki.oids.md5:break;default:throw new Error("Could not add PKCS#7 signer; unknown message digest algorithm: "+c)}var l=r.authenticatedAttributes||[];if(l.length>0){for(var u=!1,d=!1,v=0;v<l.length;++v){var E=l[v];if(!u&&E.type===P.pki.oids.contentType){if(u=!0,d)break;continue}if(!d&&E.type===P.pki.oids.messageDigest){if(d=!0,u)break;continue}}if(!u||!d)throw new Error("Invalid signer.authenticatedAttributes. If signer.authenticatedAttributes is specified, then it must contain at least two attributes, PKCS #9 content-type and PKCS #9 message-digest.")}e.signers.push({key:o,version:1,issuer:n,serialNumber:i,digestAlgorithm:c,signatureAlgorithm:P.pki.oids.rsaEncryption,signature:null,authenticatedAttributes:l,unauthenticatedAttributes:[]})},sign:function(r){if(r=r||{},(typeof e.content!="object"||e.contentInfo===null)&&(e.contentInfo=S.create(S.Class.UNIVERSAL,S.Type.SEQUENCE,!0,[S.create(S.Class.UNIVERSAL,S.Type.OID,!1,S.oidToDer(P.pki.oids.data).getBytes())]),"content"in e)){var n;e.content instanceof P.util.ByteBuffer?n=e.content.bytes():typeof e.content=="string"&&(n=P.util.encodeUtf8(e.content)),r.detached?e.detachedContent=S.create(S.Class.UNIVERSAL,S.Type.OCTETSTRING,!1,n):e.contentInfo.value.push(S.create(S.Class.CONTEXT_SPECIFIC,0,!0,[S.create(S.Class.UNIVERSAL,S.Type.OCTETSTRING,!1,n)]))}if(e.signers.length!==0){var i=t();a(i)}},verify:function(){throw new Error("PKCS#7 signature verification not yet implemented.")},addCertificate:function(r){typeof r=="string"&&(r=P.pki.certificateFromPem(r)),e.certificates.push(r)},addCertificateRevokationList:function(r){throw new Error("PKCS#7 CRL support not yet implemented.")}},e;function t(){for(var r={},n=0;n<e.signers.length;++n){var i=e.signers[n],s=i.digestAlgorithm;s in r||(r[s]=P.md[P.pki.oids[s]].create()),i.authenticatedAttributes.length===0?i.md=r[s]:i.md=P.md[P.pki.oids[s]].create()}e.digestAlgorithmIdentifiers=[];for(var s in r)e.digestAlgorithmIdentifiers.push(S.create(S.Class.UNIVERSAL,S.Type.SEQUENCE,!0,[S.create(S.Class.UNIVERSAL,S.Type.OID,!1,S.oidToDer(s).getBytes()),S.create(S.Class.UNIVERSAL,S.Type.NULL,!1,"")]));return r}function a(r){var n;if(e.detachedContent?n=e.detachedContent:(n=e.contentInfo.value[1],n=n.value[0]),!n)throw new Error("Could not sign PKCS#7 message; there is no content to sign.");var i=S.derToOid(e.contentInfo.value[0].value),s=S.toDer(n);s.getByte(),S.getBerValueLength(s),s=s.getBytes();for(var o in r)r[o].start().update(s);for(var c=new Date,l=0;l<e.signers.length;++l){var u=e.signers[l];if(u.authenticatedAttributes.length===0){if(i!==P.pki.oids.data)throw new Error("Invalid signer; authenticatedAttributes must be present when the ContentInfo content type is not PKCS#7 Data.")}else{u.authenticatedAttributesAsn1=S.create(S.Class.CONTEXT_SPECIFIC,0,!0,[]);for(var d=S.create(S.Class.UNIVERSAL,S.Type.SET,!0,[]),v=0;v<u.authenticatedAttributes.length;++v){var E=u.authenticatedAttributes[v];E.type===P.pki.oids.messageDigest?E.value=r[u.digestAlgorithm].digest():E.type===P.pki.oids.signingTime&&(E.value||(E.value=c)),d.value.push(j0(E)),u.authenticatedAttributesAsn1.value.push(j0(E))}s=S.toDer(d).getBytes(),u.md.start().update(s)}u.signature=u.key.sign(u.md,"RSASSA-PKCS1-V1_5")}e.signerInfos=b1(e.signers)}},Ze.createEncryptedData=function(){var e=null;return e={type:P.pki.oids.encryptedData,version:0,encryptedContent:{algorithm:P.pki.oids["aes256-CBC"]},fromAsn1:function(t){X0(e,t,Ze.asn1.encryptedDataValidator)},decrypt:function(t){t!==void 0&&(e.encryptedContent.key=t),Ol(e)}},e},Ze.createEnvelopedData=function(){var e=null;return e={type:P.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:P.pki.oids["aes256-CBC"]},fromAsn1:function(t){var a=X0(e,t,Ze.asn1.envelopedDataValidator);e.recipients=x1(a.recipientInfos.value)},toAsn1:function(){return S.create(S.Class.UNIVERSAL,S.Type.SEQUENCE,!0,[S.create(S.Class.UNIVERSAL,S.Type.OID,!1,S.oidToDer(e.type).getBytes()),S.create(S.Class.CONTEXT_SPECIFIC,0,!0,[S.create(S.Class.UNIVERSAL,S.Type.SEQUENCE,!0,[S.create(S.Class.UNIVERSAL,S.Type.INTEGER,!1,S.integerToDer(e.version).getBytes()),S.create(S.Class.UNIVERSAL,S.Type.SET,!0,S1(e.recipients)),S.create(S.Class.UNIVERSAL,S.Type.SEQUENCE,!0,I1(e.encryptedContent))])])])},findRecipient:function(t){for(var a=t.issuer.attributes,r=0;r<e.recipients.length;++r){var n=e.recipients[r],i=n.issuer;if(n.serialNumber===t.serialNumber&&i.length===a.length){for(var s=!0,o=0;o<a.length;++o)if(i[o].type!==a[o].type||i[o].value!==a[o].value){s=!1;break}if(s)return n}}return null},decrypt:function(t,a){if(e.encryptedContent.key===void 0&&t!==void 0&&a!==void 0)switch(t.encryptedContent.algorithm){case P.pki.oids.rsaEncryption:case P.pki.oids.desCBC:var r=a.decrypt(t.encryptedContent.content);e.encryptedContent.key=P.util.createBuffer(r);break;default:throw new Error("Unsupported asymmetric cipher, OID "+t.encryptedContent.algorithm)}Ol(e)},addRecipient:function(t){e.recipients.push({version:0,issuer:t.issuer.attributes,serialNumber:t.serialNumber,encryptedContent:{algorithm:P.pki.oids.rsaEncryption,key:t.publicKey}})},encrypt:function(t,a){if(e.encryptedContent.content===void 0){a=a||e.encryptedContent.algorithm,t=t||e.encryptedContent.key;var r,n,i;switch(a){case P.pki.oids["aes128-CBC"]:r=16,n=16,i=P.aes.createEncryptionCipher;break;case P.pki.oids["aes192-CBC"]:r=24,n=16,i=P.aes.createEncryptionCipher;break;case P.pki.oids["aes256-CBC"]:r=32,n=16,i=P.aes.createEncryptionCipher;break;case P.pki.oids["des-EDE3-CBC"]:r=24,n=8,i=P.des.createEncryptionCipher;break;default:throw new Error("Unsupported symmetric cipher, OID "+a)}if(t===void 0)t=P.util.createBuffer(P.random.getBytes(r));else if(t.length()!=r)throw new Error("Symmetric key has wrong length; got "+t.length()+" bytes, expected "+r+".");e.encryptedContent.algorithm=a,e.encryptedContent.key=t,e.encryptedContent.parameter=P.util.createBuffer(P.random.getBytes(n));var s=i(t);if(s.start(e.encryptedContent.parameter.copy()),s.update(e.content),!s.finish())throw new Error("Symmetric encryption failed.");e.encryptedContent.content=s.output}for(var o=0;o<e.recipients.length;++o){var c=e.recipients[o];if(c.encryptedContent.content===void 0)switch(c.encryptedContent.algorithm){case P.pki.oids.rsaEncryption:c.encryptedContent.content=c.encryptedContent.key.encrypt(e.encryptedContent.key.data);break;default:throw new Error("Unsupported asymmetric cipher, OID "+c.encryptedContent.algorithm)}}}},e};function E1(e){var t={},a=[];if(!S.validate(e,Ze.asn1.recipientInfoValidator,t,a)){var r=new Error("Cannot read PKCS#7 RecipientInfo. ASN.1 object is not an PKCS#7 RecipientInfo.");throw r.errors=a,r}return{version:t.version.charCodeAt(0),issuer:P.pki.RDNAttributesAsArray(t.issuer),serialNumber:P.util.createBuffer(t.serial).toHex(),encryptedContent:{algorithm:S.derToOid(t.encAlgorithm),parameter:t.encParameter?t.encParameter.value:void 0,content:t.encKey}}}function C1(e){return S.create(S.Class.UNIVERSAL,S.Type.SEQUENCE,!0,[S.create(S.Class.UNIVERSAL,S.Type.INTEGER,!1,S.integerToDer(e.version).getBytes()),S.create(S.Class.UNIVERSAL,S.Type.SEQUENCE,!0,[P.pki.distinguishedNameToAsn1({attributes:e.issuer}),S.create(S.Class.UNIVERSAL,S.Type.INTEGER,!1,P.util.hexToBytes(e.serialNumber))]),S.create(S.Class.UNIVERSAL,S.Type.SEQUENCE,!0,[S.create(S.Class.UNIVERSAL,S.Type.OID,!1,S.oidToDer(e.encryptedContent.algorithm).getBytes()),S.create(S.Class.UNIVERSAL,S.Type.NULL,!1,"")]),S.create(S.Class.UNIVERSAL,S.Type.OCTETSTRING,!1,e.encryptedContent.content)])}function x1(e){for(var t=[],a=0;a<e.length;++a)t.push(E1(e[a]));return t}function S1(e){for(var t=[],a=0;a<e.length;++a)t.push(C1(e[a]));return t}function T1(e){var t=S.create(S.Class.UNIVERSAL,S.Type.SEQUENCE,!0,[S.create(S.Class.UNIVERSAL,S.Type.INTEGER,!1,S.integerToDer(e.version).getBytes()),S.create(S.Class.UNIVERSAL,S.Type.SEQUENCE,!0,[P.pki.distinguishedNameToAsn1({attributes:e.issuer}),S.create(S.Class.UNIVERSAL,S.Type.INTEGER,!1,P.util.hexToBytes(e.serialNumber))]),S.create(S.Class.UNIVERSAL,S.Type.SEQUENCE,!0,[S.create(S.Class.UNIVERSAL,S.Type.OID,!1,S.oidToDer(e.digestAlgorithm).getBytes()),S.create(S.Class.UNIVERSAL,S.Type.NULL,!1,"")])]);if(e.authenticatedAttributesAsn1&&t.value.push(e.authenticatedAttributesAsn1),t.value.push(S.create(S.Class.UNIVERSAL,S.Type.SEQUENCE,!0,[S.create(S.Class.UNIVERSAL,S.Type.OID,!1,S.oidToDer(e.signatureAlgorithm).getBytes()),S.create(S.Class.UNIVERSAL,S.Type.NULL,!1,"")])),t.value.push(S.create(S.Class.UNIVERSAL,S.Type.OCTETSTRING,!1,e.signature)),e.unauthenticatedAttributes.length>0){for(var a=S.create(S.Class.CONTEXT_SPECIFIC,1,!0,[]),r=0;r<e.unauthenticatedAttributes.length;++r){var n=e.unauthenticatedAttributes[r];a.values.push(j0(n))}t.value.push(a)}return t}function b1(e){for(var t=[],a=0;a<e.length;++a)t.push(T1(e[a]));return t}function j0(e){var t;if(e.type===P.pki.oids.contentType)t=S.create(S.Class.UNIVERSAL,S.Type.OID,!1,S.oidToDer(e.value).getBytes());else if(e.type===P.pki.oids.messageDigest)t=S.create(S.Class.UNIVERSAL,S.Type.OCTETSTRING,!1,e.value.bytes());else if(e.type===P.pki.oids.signingTime){var a=new Date("1950-01-01T00:00:00Z"),r=new Date("2050-01-01T00:00:00Z"),n=e.value;if(typeof n=="string"){var i=Date.parse(n);isNaN(i)?n.length===13?n=S.utcTimeToDate(n):n=S.generalizedTimeToDate(n):n=new Date(i)}n>=a&&n<r?t=S.create(S.Class.UNIVERSAL,S.Type.UTCTIME,!1,S.dateToUtcTime(n)):t=S.create(S.Class.UNIVERSAL,S.Type.GENERALIZEDTIME,!1,S.dateToGeneralizedTime(n))}return S.create(S.Class.UNIVERSAL,S.Type.SEQUENCE,!0,[S.create(S.Class.UNIVERSAL,S.Type.OID,!1,S.oidToDer(e.type).getBytes()),S.create(S.Class.UNIVERSAL,S.Type.SET,!0,[t])])}function I1(e){return[S.create(S.Class.UNIVERSAL,S.Type.OID,!1,S.oidToDer(P.pki.oids.data).getBytes()),S.create(S.Class.UNIVERSAL,S.Type.SEQUENCE,!0,[S.create(S.Class.UNIVERSAL,S.Type.OID,!1,S.oidToDer(e.algorithm).getBytes()),e.parameter?S.create(S.Class.UNIVERSAL,S.Type.OCTETSTRING,!1,e.parameter.getBytes()):void 0]),S.create(S.Class.CONTEXT_SPECIFIC,0,!0,[S.create(S.Class.UNIVERSAL,S.Type.OCTETSTRING,!1,e.content.getBytes())])]}function X0(e,t,a){var r={},n=[];if(!S.validate(t,a,r,n)){var i=new Error("Cannot read PKCS#7 message. ASN.1 object is not a supported PKCS#7 message.");throw i.errors=i,i}var s=S.derToOid(r.contentType);if(s!==P.pki.oids.data)throw new Error("Unsupported PKCS#7 message. Only wrapped ContentType Data supported.");if(r.encryptedContent){var o="";if(P.util.isArray(r.encryptedContent))for(var c=0;c<r.encryptedContent.length;++c){if(r.encryptedContent[c].type!==S.Type.OCTETSTRING)throw new Error("Malformed PKCS#7 message, expecting encrypted content constructed of only OCTET STRING objects.");o+=r.encryptedContent[c].value}else o=r.encryptedContent;e.encryptedContent={algorithm:S.derToOid(r.encAlgorithm),parameter:P.util.createBuffer(r.encParameter.value),content:P.util.createBuffer(o)}}if(r.content){var o="";if(P.util.isArray(r.content))for(var c=0;c<r.content.length;++c){if(r.content[c].type!==S.Type.OCTETSTRING)throw new Error("Malformed PKCS#7 message, expecting content constructed of only OCTET STRING objects.");o+=r.content[c].value}else o=r.content;e.content=P.util.createBuffer(o)}return e.version=r.version.charCodeAt(0),e.rawCapture=r,r}function Ol(e){if(e.encryptedContent.key===void 0)throw new Error("Symmetric key not available.");if(e.content===void 0){var t;switch(e.encryptedContent.algorithm){case P.pki.oids["aes128-CBC"]:case P.pki.oids["aes192-CBC"]:case P.pki.oids["aes256-CBC"]:t=P.aes.createDecryptionCipher(e.encryptedContent.key);break;case P.pki.oids.desCBC:case P.pki.oids["des-EDE3-CBC"]:t=P.des.createDecryptionCipher(e.encryptedContent.key);break;default:throw new Error("Unsupported symmetric cipher, OID "+e.encryptedContent.algorithm)}if(t.start(e.encryptedContent.parameter),t.update(e.encryptedContent.content),!t.finish())throw new Error("Symmetric decryption failed.");e.content=t.output}}var Ce=X,e0=Ce.ssh=Ce.ssh||{};e0.privateKeyToPutty=function(e,t,a){a=a||"",t=t||"";var r="ssh-rsa",n=t===""?"none":"aes256-cbc",i="PuTTY-User-Key-File-2: "+r+`\r
|
|
15
|
+
`;i+="Encryption: "+n+`\r
|
|
16
|
+
`,i+="Comment: "+a+`\r
|
|
17
|
+
`;var s=Ce.util.createBuffer();mr(s,r),Rt(s,e.e),Rt(s,e.n);var o=Ce.util.encode64(s.bytes(),64),c=Math.floor(o.length/66)+1;i+="Public-Lines: "+c+`\r
|
|
18
|
+
`,i+=o;var l=Ce.util.createBuffer();Rt(l,e.d),Rt(l,e.p),Rt(l,e.q),Rt(l,e.qInv);var u;if(!t)u=Ce.util.encode64(l.bytes(),64);else{var d=l.length()+16-1;d-=d%16;var v=t0(l.bytes());v.truncate(v.length()-d+l.length()),l.putBuffer(v);var E=Ce.util.createBuffer();E.putBuffer(t0("\0\0\0\0",t)),E.putBuffer(t0("\0\0\0",t));var y=Ce.aes.createEncryptionCipher(E.truncate(8),"CBC");y.start(Ce.util.createBuffer().fillWithByte(0,16)),y.update(l.copy()),y.finish();var x=y.output;x.truncate(16),u=Ce.util.encode64(x.bytes(),64)}c=Math.floor(u.length/66)+1,i+=`\r
|
|
43
19
|
Private-Lines: `+c+`\r
|
|
44
|
-
`,
|
|
45
|
-
Private-MAC: `+
|
|
46
|
-
`,s},El.publicKeyToOpenSSH=function(e,t){var a="ssh-rsa";t=t||"";var r=qe.util.createBuffer();return ta(r,a),Wt(r,e.e),Wt(r,e.n),a+" "+qe.util.encode64(r.bytes())+" "+t},El.privateKeyToOpenSSH=function(e,t){return t?qe.pki.encryptRsaPrivateKey(e,t,{legacy:!0,algorithm:"aes128"}):qe.pki.privateKeyToPem(e)},El.getPublicKeyFingerprint=function(e,t){t=t||{};var a=t.md||qe.md.md5.create(),r="ssh-rsa",n=qe.util.createBuffer();ta(n,r),Wt(n,e.e),Wt(n,e.n),a.start(),a.update(n.getBytes());var s=a.digest();if(t.encoding==="hex"){var i=s.toHex();return t.delimiter?i.match(/.{2}/g).join(t.delimiter):i}else{if(t.encoding==="binary")return s.getBytes();if(t.encoding)throw new Error('Unknown encoding "'+t.encoding+'".')}return s};function Wt(e,t){var a=t.toString(16);a[0]>="8"&&(a="00"+a);var r=qe.util.hexToBytes(a);e.putInt32(r.length),e.putBytes(r)}function ta(e,t){e.putInt32(t.length),e.putString(t)}function Cl(){for(var e=qe.md.sha1.create(),t=arguments.length,a=0;a<t;++a)e.update(arguments[a]);return e.digest()}var Cc=ae;const I2=e=>{const t=Cc.util.hexToBytes(e.entitySecret),a=Cc.pki.publicKeyFromPem(e.publicKey).encrypt(t,"RSA-OAEP",{md:Cc.md.sha256.create(),mgf1:{md:Cc.md.sha256.create()}});return Cc.util.encode64(a)},am=e=>async()=>{let t=e.storage?await e.storage.get("publicKey"):void 0;if(t===void 0){const a=await U1(e)();if(!a.data?.publicKey)throw new Error("Could not fetch public key");t=a.data.publicKey,e.storage&&await e.storage.set("publicKey",t)}return I2({entitySecret:e.entitySecret,publicKey:t})},Sl=()=>Lr.randomUUID();var nm="10.5.4";const B2=e=>async({idempotencyKey:t,fee:a,xRequestId:r,...n})=>{try{return Tt(await e.client.DeployImport.deployContract({entitySecretCiphertext:await am(e)(),idempotencyKey:t??Sl(),...a.config,...n},r))}catch(s){throw at(s)?rt(s):s}},_2=e=>async({xRequestId:t,...a})=>{try{return Tt(await e.client.DeployImport.estimateContractDeploy(a,t))}catch(r){throw at(r)?rt(r):r}},R2=e=>async({id:t,xRequestId:a})=>{try{return Tt(await e.client.ViewUpdate.getContract(t,a))}catch(r){throw at(r)?rt(r):r}},k2=e=>async({idempotencyKey:t,xRequestId:a,...r})=>{try{return Tt(await e.client.DeployImport.importContract({idempotencyKey:t??Sl(),...r},a))}catch(n){throw at(n)?rt(n):n}},N2=e=>async t=>{try{return Tt(await e.client.ViewUpdate.listContracts(t?.blockchain,t?.contractInputType,t?.deployerAddress,t?.name,t?.status,t?.from,t?.to,t?.pageBefore,t?.pageAfter,t?.pageSize,t?.xRequestId))}catch(a){throw at(a)?rt(a):a}},L2=e=>async({xRequestId:t,...a})=>{try{return Tt(await e.client.Interact.queryContract(a,t))}catch(r){throw at(r)?rt(r):r}},U2=e=>async({id:t,xRequestId:a,...r})=>{try{return Tt(await e.client.ViewUpdate.updateContract(t,r,a))}catch(n){throw at(n)?rt(n):n}},P2=e=>async({idempotencyKey:t,xRequestId:a,...r})=>{try{return Tt(await e.client.EventMonitors.createEventMonitor(a,{idempotencyKey:t??Sl(),...r}))}catch(n){throw at(n)?rt(n):n}},D2=e=>async({xRequestId:t,...a})=>{try{return await e.client.EventMonitors.deleteEventMonitor(a.id,t)}catch(r){throw at(r)?rt(r):r}},O2=e=>async t=>{try{return Tt(await e.client.EventMonitors.getEventMonitors(t?.contractAddress,t?.blockchain,t?.eventSignature,t?.from,t?.to,t?.pageBefore,t?.pageAfter,t?.pageSize,t?.xRequestId))}catch(a){throw at(a)?rt(a):a}},F2=e=>async t=>{try{return Tt(await e.client.EventMonitors.listEventLogs(t?.contractAddress,t?.blockchain,t?.from,t?.to,t?.pageBefore,t?.pageAfter,t?.pageSize,t?.xRequestId))}catch(a){throw at(a)?rt(a):a}},M2=e=>async({id:t,xRequestId:a,...r})=>{try{return Tt(await e.client.EventMonitors.updateEventMonitor(t,a,r))}catch(n){throw at(n)?rt(n):n}},V2=e=>async({id:t,idempotencyKey:a,fee:r,xRequestId:n,...s})=>{try{return Tt(await e.client.Templates.deployContractTemplate(t,{entitySecretCiphertext:await am(e)(),idempotencyKey:a??Sl(),...r.config,...s},n))}catch(i){throw at(i)?rt(i):i}},q2=e=>async({id:t,xRequestId:a,...r})=>{try{return Tt(await e.client.Templates.estimateContractTemplateDeploy(t,r,a))}catch(n){throw at(n)?rt(n):n}};var j2=Object.defineProperty,K2=(e,t,a)=>t in e?j2(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,z2=(e,t,a)=>K2(e,typeof t!="symbol"?t+"":t,a);const yp="https://api.circle.com";class im{constructor(t){z2(this,"params");const{apiKey:a,baseUrl:r,entitySecret:n,storage:s,userAgent:i,headers:o}=t;this.params={client:new Uy(r??yp,{apiKey:a,version:nm,userAgent:i},o),configurationsClient:new py(r??yp,{apiKey:a,version:nm,userAgent:i},o),entitySecret:n,storage:s??new F1}}deployContract(t){return B2(this.params)(t)}estimateContractDeploymentFee(t){return _2(this.params)(t)}importContract(t){return k2(this.params)(t)}getContract(t){return R2(this.params)(t)}listContracts(t){return N2(this.params)(t)}updateContract(t){return U2(this.params)(t)}queryContract(t){return L2(this.params)(t)}deployContractTemplate(t){return V2(this.params)(t)}estimateContractTemplateDeploymentFee(t){return q2(this.params)(t)}createEventMonitor(t){return P2(this.params)(t)}listEventMonitors(t){return O2(this.params)(t)}updateEventMonitor(t){return M2(this.params)(t)}deleteEventMonitor(t){return D2(this.params)(t)}listEventLogs(t){return F2(this.params)(t)}}function H2(e){return new im(e)}exports.BadGatewayError=wa,exports.BadRequestError=xa,exports.Blockchain=ky,exports.CircleSmartContractPlatformClient=im,exports.ConnectionAbortedError=Ra,exports.ConnectionRefusedError=Ba,exports.ConnectionResetError=Ua,exports.ConnectionTimeoutError=_a,exports.DNSNotFoundError=ka,exports.DNSTimeoutError=Na,exports.Error110700=_u,exports.Error110701=Ru,exports.Error110702=ku,exports.Error110703=Nu,exports.Error155101=Da,exports.Error155102=Oa,exports.Error155103=Fa,exports.Error155104=Ma,exports.Error155105=Va,exports.Error155106=qa,exports.Error155107=ja,exports.Error155108=Ka,exports.Error155109=za,exports.Error155110=Ha,exports.Error155111=$a,exports.Error155112=Ga,exports.Error155113=Qa,exports.Error155114=Wa,exports.Error155115=Xa,exports.Error155116=Ya,exports.Error155117=Ja,exports.Error155118=Za,exports.Error155119=en,exports.Error155120=tn,exports.Error155121=rn,exports.Error155122=an,exports.Error155123=nn,exports.Error155124=sn,exports.Error155130=on,exports.Error155131=cn,exports.Error155132=ln,exports.Error155133=un,exports.Error155134=pn,exports.Error155135=dn,exports.Error155136=fn,exports.Error155137=mn,exports.Error155138=hn,exports.Error155139=vn,exports.Error155140=gn,exports.Error155141=xn,exports.Error155142=yn,exports.Error155143=bn,exports.Error155144=En,exports.Error155145=Cn,exports.Error155146=Sn,exports.Error155150=Tn,exports.Error155151=wn,exports.Error155152=An,exports.Error155154=In,exports.Error155155=Bn,exports.Error155156=_n,exports.Error155157=Rn,exports.Error155158=kn,exports.Error155159=Nn,exports.Error155160=Ln,exports.Error155201=Un,exports.Error155202=Pn,exports.Error155203=Dn,exports.Error155204=On,exports.Error155205=Fn,exports.Error155206=Mn,exports.Error155207=Vn,exports.Error155208=qn,exports.Error155209=jn,exports.Error155210=Kn,exports.Error155211=zn,exports.Error155215=Hn,exports.Error155218=$n,exports.Error155219=Gn,exports.Error155220=Qn,exports.Error155221=Wn,exports.Error155222=Xn,exports.Error155223=Yn,exports.Error155224=Jn,exports.Error155225=Zn,exports.Error155226=ei,exports.Error155227=ti,exports.Error155228=ri,exports.Error155229=ai,exports.Error155230=ni,exports.Error155231=ii,exports.Error155232=si,exports.Error155233=oi,exports.Error155234=ci,exports.Error155235=li,exports.Error155236=ui,exports.Error155237=pi,exports.Error155238=di,exports.Error155239=fi,exports.Error155240=mi,exports.Error155241=hi,exports.Error155242=vi,exports.Error155243=gi,exports.Error155244=xi,exports.Error155245=yi,exports.Error155247=bi,exports.Error155254=Ei,exports.Error155257=Ci,exports.Error155258=Si,exports.Error155262=Ti,exports.Error155264=wi,exports.Error155501=Ai,exports.Error155502=Ii,exports.Error155503=Bi,exports.Error155504=_i,exports.Error155505=Ri,exports.Error155506=ki,exports.Error155507=Ni,exports.Error155508=Li,exports.Error155509=Ui,exports.Error155510=Pi,exports.Error155511=Di,exports.Error155512=Oi,exports.Error155514=Fi,exports.Error155515=Mi,exports.Error155516=Vi,exports.Error155517=qi,exports.Error155601=ji,exports.Error155701=Ki,exports.Error155702=zi,exports.Error155703=Hi,exports.Error155704=$i,exports.Error155705=Gi,exports.Error155706=Qi,exports.Error155707=Wi,exports.Error155708=Xi,exports.Error155709=Yi,exports.Error155710=Ji,exports.Error155711=Zi,exports.Error155712=es,exports.Error155713=ts,exports.Error155714=rs,exports.Error155715=as,exports.Error155716=ns,exports.Error155717=is,exports.Error155718=ss,exports.Error155719=os,exports.Error155720=cs,exports.Error155721=ls,exports.Error155801=us,exports.Error155802=ps,exports.Error155803=ds,exports.Error155804=fs,exports.Error155805=ms,exports.Error155806=hs,exports.Error155807=vs,exports.Error155808=gs,exports.Error156001=xs,exports.Error156002=ys,exports.Error156003=bs,exports.Error156004=Es,exports.Error156005=Cs,exports.Error156006=Ss,exports.Error156007=Ts,exports.Error156008=ws,exports.Error156009=As,exports.Error156010=Is,exports.Error156011=Bs,exports.Error156012=_s,exports.Error156013=Rs,exports.Error156014=ks,exports.Error156015=Ns,exports.Error156016=Ls,exports.Error156017=Us,exports.Error156018=Ps,exports.Error156019=Ds,exports.Error156020=Os,exports.Error156021=Fs,exports.Error156023=Ms,exports.Error156024=Vs,exports.Error156025=qs,exports.Error156026=js,exports.Error156027=Ks,exports.Error156030=zs,exports.Error156031=Hs,exports.Error156032=$s,exports.Error175001=Gs,exports.Error175002=Qs,exports.Error175003=Ws,exports.Error175004=Xs,exports.Error175005=Ys,exports.Error175006=Js,exports.Error175007=Zs,exports.Error175008=eo,exports.Error175009=to,exports.Error175010=ro,exports.Error175011=ao,exports.Error175012=no,exports.Error175013=io,exports.Error175201=so,exports.Error175202=oo,exports.Error175203=co,exports.Error175204=lo,exports.Error175205=uo,exports.Error175301=po,exports.Error175302=fo,exports.Error175303=mo,exports.Error175401=ho,exports.Error175402=vo,exports.Error175403=go,exports.Error175404=xo,exports.Error175405=yo,exports.Error175406=bo,exports.Error175407=Eo,exports.Error175408=Co,exports.Error175409=So,exports.Error175410=To,exports.Error177001=wo,exports.Error177002=Ao,exports.Error177003=Io,exports.Error177004=Bo,exports.Error177005=_o,exports.Error177006=Ro,exports.Error177007=ko,exports.Error177008=No,exports.Error177009=Lo,exports.Error177010=Uo,exports.Error177011=Po,exports.Error177012=Do,exports.Error177013=Oo,exports.Error177014=Fo,exports.Error177015=Mo,exports.Error177016=Vo,exports.Error177017=qo,exports.Error177018=jo,exports.Error177019=Ko,exports.Error177020=zo,exports.Error177021=Ho,exports.Error177022=$o,exports.Error177023=Go,exports.Error177024=Qo,exports.Error177025=Wo,exports.Error177026=Xo,exports.Error177301=Yo,exports.Error177302=Jo,exports.Error177303=Zo,exports.Error177304=ec,exports.Error177305=tc,exports.Error177601=rc,exports.Error177602=ac,exports.Error177603=nc,exports.Error177604=ic,exports.Error177605=sc,exports.Error177606=oc,exports.Error177607=cc,exports.Error177901=lc,exports.ForbiddenError=ba,exports.GatewayTimeoutError=Ia,exports.HostUnreachableError=Pa,exports.HttpError=ga,exports.HttpRequestError=kt,exports.HttpResponseError=E,exports.InternalServerError=Sa,exports.NetworkUnreachableError=La,exports.NotFoundError=Ea,exports.NotImplementedError=Ta,exports.RatelimitError=Ca,exports.ServiceUnavailableError=Aa,exports.UnauthorizedError=ya,exports.defaultBaseUrl=yp,exports.fromAxiosError=rt,exports.initiateSmartContractPlatformClient=H2;
|
|
20
|
+
`,i+=u;var b=t0("putty-private-key-file-mac-key",t),A=Ce.util.createBuffer();mr(A,r),mr(A,n),mr(A,a),A.putInt32(s.length()),A.putBuffer(s),A.putInt32(l.length()),A.putBuffer(l);var w=Ce.hmac.create();return w.start("sha1",b),w.update(A.bytes()),i+=`\r
|
|
21
|
+
Private-MAC: `+w.digest().toHex()+`\r
|
|
22
|
+
`,i},e0.publicKeyToOpenSSH=function(e,t){var a="ssh-rsa";t=t||"";var r=Ce.util.createBuffer();return mr(r,a),Rt(r,e.e),Rt(r,e.n),a+" "+Ce.util.encode64(r.bytes())+" "+t},e0.privateKeyToOpenSSH=function(e,t){return t?Ce.pki.encryptRsaPrivateKey(e,t,{legacy:!0,algorithm:"aes128"}):Ce.pki.privateKeyToPem(e)},e0.getPublicKeyFingerprint=function(e,t){t=t||{};var a=t.md||Ce.md.md5.create(),r="ssh-rsa",n=Ce.util.createBuffer();mr(n,r),Rt(n,e.e),Rt(n,e.n),a.start(),a.update(n.getBytes());var i=a.digest();if(t.encoding==="hex"){var s=i.toHex();return t.delimiter?s.match(/.{2}/g).join(t.delimiter):s}else{if(t.encoding==="binary")return i.getBytes();if(t.encoding)throw new Error('Unknown encoding "'+t.encoding+'".')}return i};function Rt(e,t){var a=t.toString(16);a[0]>="8"&&(a="00"+a);var r=Ce.util.hexToBytes(a);e.putInt32(r.length),e.putBytes(r)}function mr(e,t){e.putInt32(t.length),e.putString(t)}function t0(){for(var e=Ce.md.sha1.create(),t=arguments.length,a=0;a<t;++a)e.update(arguments[a]);return e.digest()}var Ao=X;const A1=e=>{const t=Ao.util.hexToBytes(e.entitySecret),a=Ao.pki.publicKeyFromPem(e.publicKey).encrypt(t,"RSA-OAEP",{md:Ao.md.sha256.create(),mgf1:{md:Ao.md.sha256.create()}});return Ao.util.encode64(a)},Vl=e=>async()=>{let t=e.storage?await e.storage.get("publicKey"):void 0;if(t===void 0){const a=await kf(e)();if(!a.data?.publicKey)throw new Error("Could not fetch public key");t=a.data.publicKey,e.storage&&await e.storage.set("publicKey",t)}return A1({entitySecret:e.entitySecret,publicKey:t})},r0=()=>Bo.randomUUID();var Fl="10.5.5";const B1=e=>async({idempotencyKey:t,fee:a,xRequestId:r,...n})=>{try{return ot(await e.client.DeployImport.deployContract({entitySecretCiphertext:await Vl(e)(),idempotencyKey:t??r0(),...a.config,...n},r))}catch(i){throw z.isAxiosError(i)?Ke(i):i}},w1=e=>async({xRequestId:t,...a})=>{try{return ot(await e.client.DeployImport.estimateContractDeploy(a,t))}catch(r){throw z.isAxiosError(r)?Ke(r):r}},N1=e=>async({id:t,xRequestId:a})=>{try{return ot(await e.client.ViewUpdate.getContract(t,a))}catch(r){throw z.isAxiosError(r)?Ke(r):r}},_1=e=>async({idempotencyKey:t,xRequestId:a,...r})=>{try{return ot(await e.client.DeployImport.importContract({idempotencyKey:t??r0(),...r},a))}catch(n){throw z.isAxiosError(n)?Ke(n):n}},R1=e=>async t=>{try{return ot(await e.client.ViewUpdate.listContracts(t?.blockchain,t?.contractInputType,t?.deployerAddress,t?.name,t?.status,t?.from,t?.to,t?.pageBefore,t?.pageAfter,t?.pageSize,t?.xRequestId))}catch(a){throw z.isAxiosError(a)?Ke(a):a}},k1=e=>async({xRequestId:t,...a})=>{try{return ot(await e.client.Interact.queryContract(a,t))}catch(r){throw z.isAxiosError(r)?Ke(r):r}},L1=e=>async({id:t,xRequestId:a,...r})=>{try{return ot(await e.client.ViewUpdate.updateContract(t,r,a))}catch(n){throw z.isAxiosError(n)?Ke(n):n}},D1=e=>async({idempotencyKey:t,xRequestId:a,...r})=>{try{return ot(await e.client.EventMonitors.createEventMonitor(a,{idempotencyKey:t??r0(),...r}))}catch(n){throw z.isAxiosError(n)?Ke(n):n}},U1=e=>async({xRequestId:t,...a})=>{try{return await e.client.EventMonitors.deleteEventMonitor(a.id,t)}catch(r){throw z.isAxiosError(r)?Ke(r):r}},P1=e=>async t=>{try{return ot(await e.client.EventMonitors.getEventMonitors(t?.contractAddress,t?.blockchain,t?.eventSignature,t?.from,t?.to,t?.pageBefore,t?.pageAfter,t?.pageSize,t?.xRequestId))}catch(a){throw z.isAxiosError(a)?Ke(a):a}},O1=e=>async t=>{try{return ot(await e.client.EventMonitors.listEventLogs(t?.contractAddress,t?.blockchain,t?.from,t?.to,t?.pageBefore,t?.pageAfter,t?.pageSize,t?.xRequestId))}catch(a){throw z.isAxiosError(a)?Ke(a):a}},V1=e=>async({id:t,xRequestId:a,...r})=>{try{return ot(await e.client.EventMonitors.updateEventMonitor(t,a,r))}catch(n){throw z.isAxiosError(n)?Ke(n):n}},F1=e=>async({id:t,idempotencyKey:a,fee:r,xRequestId:n,...i})=>{try{return ot(await e.client.Templates.deployContractTemplate(t,{entitySecretCiphertext:await Vl(e)(),idempotencyKey:a??r0(),...r.config,...i},n))}catch(s){throw z.isAxiosError(s)?Ke(s):s}},M1=e=>async({id:t,xRequestId:a,...r})=>{try{return ot(await e.client.Templates.estimateContractTemplateDeploy(t,r,a))}catch(n){throw z.isAxiosError(n)?Ke(n):n}};var K1=Object.defineProperty,q1=(e,t,a)=>t in e?K1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,H1=(e,t,a)=>q1(e,typeof t!="symbol"?t+"":t,a);const Y0="https://api.circle.com";class Ml{constructor(t){H1(this,"params");const{apiKey:a,baseUrl:r,entitySecret:n,storage:i,userAgent:s,headers:o}=t;this.params={client:new Ru(r??Y0,{apiKey:a,version:Fl,userAgent:s},o),configurationsClient:new cu(r??Y0,{apiKey:a,version:Fl,userAgent:s},o),entitySecret:n,storage:i??new Pf}}deployContract(t){return B1(this.params)(t)}estimateContractDeploymentFee(t){return w1(this.params)(t)}importContract(t){return _1(this.params)(t)}getContract(t){return N1(this.params)(t)}listContracts(t){return R1(this.params)(t)}updateContract(t){return L1(this.params)(t)}queryContract(t){return k1(this.params)(t)}deployContractTemplate(t){return F1(this.params)(t)}estimateContractTemplateDeploymentFee(t){return M1(this.params)(t)}createEventMonitor(t){return D1(this.params)(t)}listEventMonitors(t){return P1(this.params)(t)}updateEventMonitor(t){return V1(this.params)(t)}deleteEventMonitor(t){return U1(this.params)(t)}listEventLogs(t){return O1(this.params)(t)}}function G1(e){return new Ml(e)}exports.BadGatewayError=Nr,exports.BadRequestError=Sr,exports.Blockchain=wu,exports.CircleSmartContractPlatformClient=Ml,exports.ConnectionAbortedError=Dr,exports.ConnectionRefusedError=kr,exports.ConnectionResetError=Vr,exports.ConnectionTimeoutError=Lr,exports.DNSNotFoundError=Ur,exports.DNSTimeoutError=Pr,exports.Error110700=i0,exports.Error110701=o0,exports.Error110702=c0,exports.Error110703=l0,exports.Error155101=Mr,exports.Error155102=Kr,exports.Error155103=qr,exports.Error155104=Hr,exports.Error155105=Gr,exports.Error155106=zr,exports.Error155107=$r,exports.Error155108=Qr,exports.Error155109=jr,exports.Error155110=Xr,exports.Error155111=Yr,exports.Error155112=Wr,exports.Error155113=Zr,exports.Error155114=Jr,exports.Error155115=ea,exports.Error155116=ta,exports.Error155117=ra,exports.Error155118=aa,exports.Error155119=na,exports.Error155120=sa,exports.Error155121=ia,exports.Error155122=oa,exports.Error155123=ca,exports.Error155124=la,exports.Error155130=ua,exports.Error155131=fa,exports.Error155132=da,exports.Error155133=pa,exports.Error155134=ha,exports.Error155135=ga,exports.Error155136=va,exports.Error155137=ya,exports.Error155138=ma,exports.Error155139=Ea,exports.Error155140=Ca,exports.Error155141=xa,exports.Error155142=Sa,exports.Error155143=Ta,exports.Error155144=ba,exports.Error155145=Ia,exports.Error155146=Aa,exports.Error155150=Ba,exports.Error155151=wa,exports.Error155152=Na,exports.Error155154=_a,exports.Error155155=Ra,exports.Error155156=ka,exports.Error155157=La,exports.Error155158=Da,exports.Error155159=Ua,exports.Error155160=Pa,exports.Error155201=Oa,exports.Error155202=Va,exports.Error155203=Fa,exports.Error155204=Ma,exports.Error155205=Ka,exports.Error155206=qa,exports.Error155207=Ha,exports.Error155208=Ga,exports.Error155209=za,exports.Error155210=$a,exports.Error155211=Qa,exports.Error155215=ja,exports.Error155218=Xa,exports.Error155219=Ya,exports.Error155220=Wa,exports.Error155221=Za,exports.Error155222=Ja,exports.Error155223=en,exports.Error155224=tn,exports.Error155225=rn,exports.Error155226=an,exports.Error155227=nn,exports.Error155228=sn,exports.Error155229=on,exports.Error155230=cn,exports.Error155231=ln,exports.Error155232=un,exports.Error155233=fn,exports.Error155234=dn,exports.Error155235=pn,exports.Error155236=hn,exports.Error155237=gn,exports.Error155238=vn,exports.Error155239=yn,exports.Error155240=mn,exports.Error155241=En,exports.Error155242=Cn,exports.Error155243=xn,exports.Error155244=Sn,exports.Error155245=Tn,exports.Error155247=bn,exports.Error155254=In,exports.Error155257=An,exports.Error155258=Bn,exports.Error155262=wn,exports.Error155264=Nn,exports.Error155501=_n,exports.Error155502=Rn,exports.Error155503=kn,exports.Error155504=Ln,exports.Error155505=Dn,exports.Error155506=Un,exports.Error155507=Pn,exports.Error155508=On,exports.Error155509=Vn,exports.Error155510=Fn,exports.Error155511=Mn,exports.Error155512=Kn,exports.Error155514=qn,exports.Error155515=Hn,exports.Error155516=Gn,exports.Error155517=zn,exports.Error155601=$n,exports.Error155701=Qn,exports.Error155702=jn,exports.Error155703=Xn,exports.Error155704=Yn,exports.Error155705=Wn,exports.Error155706=Zn,exports.Error155707=Jn,exports.Error155708=es,exports.Error155709=ts,exports.Error155710=rs,exports.Error155711=as,exports.Error155712=ns,exports.Error155713=ss,exports.Error155714=is,exports.Error155715=os,exports.Error155716=cs,exports.Error155717=ls,exports.Error155718=us,exports.Error155719=fs,exports.Error155720=ds,exports.Error155721=ps,exports.Error155801=hs,exports.Error155802=gs,exports.Error155803=vs,exports.Error155804=ys,exports.Error155805=ms,exports.Error155806=Es,exports.Error155807=Cs,exports.Error155808=xs,exports.Error156001=Ss,exports.Error156002=Ts,exports.Error156003=bs,exports.Error156004=Is,exports.Error156005=As,exports.Error156006=Bs,exports.Error156007=ws,exports.Error156008=Ns,exports.Error156009=_s,exports.Error156010=Rs,exports.Error156011=ks,exports.Error156012=Ls,exports.Error156013=Ds,exports.Error156014=Us,exports.Error156015=Ps,exports.Error156016=Os,exports.Error156017=Vs,exports.Error156018=Fs,exports.Error156019=Ms,exports.Error156020=Ks,exports.Error156021=qs,exports.Error156023=Hs,exports.Error156024=Gs,exports.Error156025=zs,exports.Error156026=$s,exports.Error156027=Qs,exports.Error156030=js,exports.Error156031=Xs,exports.Error156032=Ys,exports.Error175001=Ws,exports.Error175002=Zs,exports.Error175003=Js,exports.Error175004=ei,exports.Error175005=ti,exports.Error175006=ri,exports.Error175007=ai,exports.Error175008=ni,exports.Error175009=si,exports.Error175010=ii,exports.Error175011=oi,exports.Error175012=ci,exports.Error175013=li,exports.Error175201=ui,exports.Error175202=fi,exports.Error175203=di,exports.Error175204=pi,exports.Error175205=hi,exports.Error175301=gi,exports.Error175302=vi,exports.Error175303=yi,exports.Error175401=mi,exports.Error175402=Ei,exports.Error175403=Ci,exports.Error175404=xi,exports.Error175405=Si,exports.Error175406=Ti,exports.Error175407=bi,exports.Error175408=Ii,exports.Error175409=Ai,exports.Error175410=Bi,exports.Error177001=wi,exports.Error177002=Ni,exports.Error177003=_i,exports.Error177004=Ri,exports.Error177005=ki,exports.Error177006=Li,exports.Error177007=Di,exports.Error177008=Ui,exports.Error177009=Pi,exports.Error177010=Oi,exports.Error177011=Vi,exports.Error177012=Fi,exports.Error177013=Mi,exports.Error177014=Ki,exports.Error177015=qi,exports.Error177016=Hi,exports.Error177017=Gi,exports.Error177018=zi,exports.Error177019=$i,exports.Error177020=Qi,exports.Error177021=ji,exports.Error177022=Xi,exports.Error177023=Yi,exports.Error177024=Wi,exports.Error177025=Zi,exports.Error177026=Ji,exports.Error177301=eo,exports.Error177302=to,exports.Error177303=ro,exports.Error177304=ao,exports.Error177305=no,exports.Error177601=so,exports.Error177602=io,exports.Error177603=oo,exports.Error177604=co,exports.Error177605=lo,exports.Error177606=uo,exports.Error177607=fo,exports.Error177901=po,exports.ForbiddenError=br,exports.GatewayTimeoutError=Rr,exports.HostUnreachableError=Fr,exports.HttpError=xr,exports.HttpRequestError=gt,exports.HttpResponseError=m,exports.InternalServerError=Br,exports.NetworkUnreachableError=Or,exports.NotFoundError=Ir,exports.NotImplementedError=wr,exports.RatelimitError=Ar,exports.ServiceUnavailableError=_r,exports.UnauthorizedError=Tr,exports.defaultBaseUrl=Y0,exports.fromAxiosError=Ke,exports.initiateSmartContractPlatformClient=G1;
|