@truebit/cli 1.120.0-beta.93 → 1.120.0-beta.94

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.
package/build/index.mjs CHANGED
@@ -8,5 +8,5 @@ r.version="2.30.1",i(Gn),r.fn=cs,r.min=Qn,r.max=er,r.now=tr,r.utc=h,r.unix=us,r.
8
8
  * Copyright(c) 2017 Roger C.
9
9
  * MIT Licensed
10
10
  */
11
- var e=n,t=s,r=po(),i=E,o=f,c={};eo=c;var u=["daily","test","m","h","custom"],l="YYYYMMDDHHmm";function d(t,n){if(t.hash===i.createHash(t.hashType).update(t.name+"LOG_FILE"+t.date).digest("hex"))try{e.existsSync(t.name)&&e.unlinkSync(t.name)}catch(e){n&&console.error(new Date,"[FileStreamRotator] Could not remove old log file: ",t.name)}}c.getFrequency=function(e){var t=e.toLowerCase().match(/^(\d+)([mh])$/);if(t)return function(e,t){if("number"==typeof t){switch(e){case"m":if(t<0||t>60)return!1;break;case"h":if(t<0||t>24)return!1}return{type:e,digit:t}}}(t[2],parseInt(t[1]));var n=function(e){switch(e){case"custom":case"daily":return{type:e,digit:void 0};case"test":return{type:e,digit:0}}return!1}(e);return n||!1},c.parseFileSize=function(e){if(e&&"string"==typeof e){var t=e.toLowerCase().match(/^((?:0\.)?\d+)([kmg])$/);if(t)switch(t[2]){case"k":return 1024*t[1];case"m":return 1024*t[1]*1024;case"g":return 1024*t[1]*1024*1024}}return null},c.getDate=function(e,t,n){t=t||l;let i=n?r.utc():r().local();if(e&&-1!==u.indexOf(e.type))switch(e.type){case"m":var s=Math.floor(i.minutes()/e.digit)*e.digit;return i.minutes(s).format(t);case"h":var a=Math.floor(i.hour()/e.digit)*e.digit;return i.hour(a).format(t);case"daily":case"custom":case"test":return i.format(t)}return i.format(t)},c.setAuditLog=function(n,r,i){var s=null;if(n){var a=n.toString().substr(-1),o=n.toString().match(/^(\d+)/);if(Number(o[1])>0){var c=t.dirname(i.replace(/%DATE%.+/,"_filename"));try{if(r){var u=t.resolve(r);s=JSON.parse(e.readFileSync(u,{encoding:"utf-8"}))}else{u=t.resolve(c+"/.audit.json");s=JSON.parse(e.readFileSync(u,{encoding:"utf-8"}))}}catch(e){if("ENOENT"!==e.code)return null;s={keep:{days:!1,amount:Number(o[1])},auditLog:r||c+"/.audit.json",files:[]}}s.keep={days:"d"===a,amount:Number(o[1])}}}return s},c.writeAuditLog=function(t,n){try{p(t.auditLog),e.writeFileSync(t.auditLog,JSON.stringify(t,null,4))}catch(e){n&&console.error(new Date,"[FileStreamRotator] Failed to store log audit at:",t.auditLog,"Error:",e)}},c.addLogToAudit=function(e,t,n,s){if(t&&t.files){var a=t.files.findIndex((function(t){return t.name===e}));if(-1!==a)return t;var o=Date.now();if(t.files.push({date:o,name:e,hash:i.createHash(t.hashType).update(e+"LOG_FILE"+o).digest("hex")}),t.keep.days){var u=r().subtract(t.keep.amount,"days").valueOf(),l=t.files.filter((function(e){return e.date>u||(e.hashType=t.hashType,d(e,s),n.emit("logRemoved",e),!1)}));t.files=l}else{var p=t.files.splice(-t.keep.amount);t.files.length>0&&t.files.filter((function(e){return e.hashType=t.hashType,d(e,s),n.emit("logRemoved",e),!1})),t.files=p}c.writeAuditLog(t,s)}return t},c.getStream=function(n){var i=null,s=null,d=this;if(!n.filename)return console.error(new Date,"[FileStreamRotator] No filename supplied. Defaulting to STDOUT"),process.stdout;n.frequency&&(i=d.getFrequency(n.frequency));let f=d.setAuditLog(n.max_logs,n.audit_file,n.filename);null!=f&&(f.hashType=void 0!==n.audit_hash_type?n.audit_hash_type:"md5"),d.verbose=void 0===n.verbose||n.verbose;var m=null,g=0,y=0;n.size&&(m=c.parseFileSize(n.size));var b=n.date_format||l;i&&"daily"==i.type&&(n.date_format||(b="YYYY-MM-DD"),r().format(b)==r().endOf("day").format(b)&&r().format(b)!=r().add(1,"day").format(b)||(d.verbose&&console.log(new Date,"[FileStreamRotator] Changing type to custom as date format changes more often than once a day or not every day"),i.type="custom")),i&&(s=n.frequency?d.getDate(i,b,n.utc):""),n.create_symlink=n.create_symlink||!1,n.extension=n.extension||"";var v=n.filename,w=null,x=v+(s?"."+s:"");if(v.match(/%DATE%/)&&(x=v.replace(/%DATE%/g,s||d.getDate(null,b,n.utc))),m){var _=null,E=x;if(f&&f.files&&f.files instanceof Array&&f.files.length>0){var S=f.files[f.files.length-1].name;if(S.match(E)){var k=S.match(E+"\\.(\\d+)");k&&(E=S,g=k[1])}}for(0==g&&E==x&&(E+=n.extension);e.existsSync(E);)_=E,g++,E=x+"."+g+n.extension;if(_){var A=e.statSync(_);A.size<m&&(E=_,g--,y=A.size)}x=E}else x+=n.extension;d.verbose&&console.log(new Date,"[FileStreamRotator] Logging to: ",x),p(x);var T=n.file_options||{flags:"a"},M=e.createWriteStream(x,T);if(s&&i&&u.indexOf(i.type)>-1||m>0){d.verbose&&console.log(new Date,"[FileStreamRotator] Rotating file: ",i?i.type:"",m?"size: "+m:"");var R,O=new o;return O.auditLog=f,O.end=function(){M.end.apply(M,arguments)},h(M,O),O.on("close",(function(){R&&R.close()})),O.on("new",(function(r){O.auditLog=d.addLogToAudit(r,O.auditLog,O,d.verbose),n.create_symlink&&function(n,r,i){let s=r||"current.log",a=t.dirname(n),o=t.basename(n),c=a+"/"+s;try{e.lstatSync(c).isSymbolicLink()&&(e.unlinkSync(c),e.symlinkSync(o,c))}catch(t){if(t&&"ENOENT"==t.code)try{e.symlinkSync(o,c)}catch(e){i&&console.error(new Date,"[FileStreamRotator] Could not create symlink file: ",c," -> ",o)}}}(r,n.symlink_name,d.verbose),n.watch_log&&O.emit("addWatcher",r)})),O.on("addWatcher",(function(t){R&&R.close(),n.watch_log&&(R=function(t,n,r){if(!t)return null;try{return e.lstatSync(t),e.watch(t,(function(n,i){if("rename"==n)try{e.lstatSync(t)}catch(e){r(e,t)}}))}catch(e){n&&console.log(new Date,"[FileStreamRotator] Could not add watcher for "+t)}}(t,d.verbose,(function(e,t){O.emit("createLog",t)})))})),O.on("createLog",(function(t){try{e.lstatSync(t)}catch(n){M&&"function"==M.end&&M.end(),M=e.createWriteStream(t,T),O.emit("new",t),h(M,O)}})),O.write=function(t,r){var o=i?this.getDate(i,b,n.utc):s;if(o!=s||m&&y>m){var c=v+(s&&i?"."+o:"");v.match(/%DATE%/)&&s&&(c=v.replace(/%DATE%/g,o)),m&&y>m?c+="."+ ++g+n.extension:(g=0,c+=n.extension),y=0,d.verbose&&console.log(new Date,a.format("[FileStreamRotator] Changing logs from %s to %s",x,c)),s=o,w=x,x=c,!0===n.end_stream?M.end():M.destroy(),p(x),M=e.createWriteStream(c,T),O.emit("new",c),O.emit("rotate",w,c),h(M,O)}M.write(t,r),y+=Buffer.byteLength(t,r)}.bind(this),process.nextTick((function(){O.emit("new",x)})),O.emit("new",x),O}return d.verbose&&console.log(new Date,"[FileStreamRotator] File won't be rotated: ",n.frequency,n.size),process.nextTick((function(){M.emit("new",x)})),M};var p=function(n){t.dirname(n).split(t.sep).reduce((function(n,r){if(n+=r+t.sep,!e.existsSync(n))try{e.mkdirSync(n)}catch(e){if("EEXIST"!==e.code)throw e}return n}),"")},h=function(e,t){e.on("close",(function(){t.emit("close")})),e.on("finish",(function(){t.emit("finish")})),e.on("error",(function(e){t.emit("error",e)})),e.on("open",(function(e){t.emit("open",e)}))};return eo}!function(){if(so)return io;so=1;const e=Wa(),t=function(){if(ro)return no;ro=1;const e=n,t=l,r=s,i=a,o=m,c=Za(),u=vt().MESSAGE,p=d.PassThrough,f=qr(),h={json:!1,colorize:!1,eol:t.EOL,logstash:null,prettyPrint:!1,label:null,stringify:!1,depth:null,showLevel:!0,timestamp:()=>(new Date).toISOString()},g=function(t){if(t=t||{},f.call(this,t),this.options=Object.assign({},h,t),t.stream)!function(e){Array.prototype.slice.call(arguments,1).forEach((n=>{if(t[n])throw new Error("Cannot set "+n+" and "+e+" together")}))}("stream","filename","maxsize"),this.logStream=new p,this.logStream.pipe(t.stream);else{if(this.filename=t.filename?r.basename(t.filename):"winston.log",this.dirname=t.dirname||r.dirname(t.filename),i=this.filename,/["<>|:*?\\/\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f]/g.test(i)||(n=this.dirname,/["<>|\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f]/g.test(n)))throw new Error("Your path or filename contain an invalid character.");this.logStream=fo().getStream({filename:r.join(this.dirname,this.filename),frequency:t.frequency?t.frequency:"custom",date_format:t.datePattern?t.datePattern:"YYYY-MM-DD",verbose:!1,size:function(e){if(e&&"string"==typeof e){if(e.toLowerCase().match(/^((?:0\.)?\d+)([kmg])$/))return e}else if(e&&Number.isInteger(e)){const t=Math.round(e/1024);return 0===t?"1k":t+"k"}return null}(t.maxSize),max_logs:t.maxFiles,end_stream:!0,audit_file:t.auditFile?t.auditFile:r.join(this.dirname,"."+c(t)+"-audit.json"),file_options:t.options?t.options:{flags:"a"},utc:!!t.utc&&t.utc,extension:t.extension?t.extension:"",create_symlink:!!t.createSymlink&&t.createSymlink,symlink_name:t.symlinkName?t.symlinkName:"current.log",watch_log:!!t.watchLog&&t.watchLog,audit_hash_type:t.auditHashType?t.auditHashType:"sha256"}),this.logStream.on("new",(e=>{this.emit("new",e)})),this.logStream.on("rotate",((e,t)=>{this.emit("rotate",e,t)})),this.logStream.on("logRemoved",(n=>{if(t.zippedArchive){const t=n.name+".gz";try{e.unlinkSync(t)}catch(e){if("ENOENT"!==e.code)return e.message=`Error occurred while removing ${t}: ${e.message}`,void this.emit("error",e)}this.emit("logRemoved",t)}else this.emit("logRemoved",n.name)})),t.zippedArchive&&this.logStream.on("rotate",(t=>{try{if(!e.existsSync(t))return}catch(e){return e.message=`Error occurred while checking existence of ${t}: ${e.message}`,void this.emit("error",e)}try{if(e.existsSync(`${t}.gz`))return}catch(e){return e.message=`Error occurred while checking existence of ${t}.gz: ${e.message}`,void this.emit("error",e)}const n=o.createGzip(),r=e.createReadStream(t);r.on("error",(e=>{e.message=`Error occurred while reading ${t}: ${e.message}`,this.emit("error",e)}));const i=e.createWriteStream(t+".gz");i.on("error",(e=>{e.message=`Error occurred while writing ${t}.gz: ${e.message}`,this.emit("error",e)})),r.pipe(n).pipe(i).on("finish",(()=>{try{e.unlinkSync(t)}catch(e){if("ENOENT"!==e.code)return e.message=`Error occurred while removing ${t}: ${e.message}`,void this.emit("error",e)}this.emit("archive",t+".gz")}))})),t.watchLog&&this.logStream.on("addWatcher",(e=>{this.emit("addWatcher",e)}))}var n,i};no=g,i.inherits(g,f),g.prototype.name="dailyRotateFile";const y=function(){};return g.prototype.log=function(e,t){t=t||y,this.logStream.write(e[u]+this.options.eol),this.emit("logged",e),t(null,!0)},g.prototype.close=function(){this.logStream&&this.logStream.end((()=>{this.emit("finish")}))},g.prototype.query=function(t,n){if("function"==typeof t&&(n=t,t={}),!this.options.json)throw new Error("query() may not be used without the json option being set to true");if(!this.filename)throw new Error("query() may not be used when initializing with a stream");let i=[];(t=t||{}).rows=t.rows||t.limit||10,t.start=t.start||0,t.until=t.until||new Date,"object"!=typeof t.until&&(t.until=new Date(t.until)),t.from=t.from||t.until-864e5,"object"!=typeof t.from&&(t.from=new Date(t.from)),t.order=t.order||"desc";const s=(()=>{const t=new RegExp(this.filename.replace("%DATE%",".*"),"i");return e.readdirSync(this.dirname).filter((e=>r.basename(e).match(t)))})();0===s.length&&n&&n(null,i);const a=c=>{if(!c)return;const u=r.join(this.dirname,c);let l,d="";if(c.endsWith(".gz")){l=new p;const t=e.createReadStream(u);t.on("error",(e=>{e.message=`Error occurred while reading ${u}: ${e.message}`,l.emit("error",e)})),t.pipe(o.createGunzip()).pipe(l)}else l=e.createReadStream(u,{encoding:"utf8"});function f(e,n){try{const n=JSON.parse(e);if(!n||"object"!=typeof n)return;const r=new Date(n.timestamp);if(t.from&&r<t.from||t.until&&r>t.until||t.level&&t.level!==n.level)return;i.push(n)}catch(e){n||l.emit("error",e)}}l.on("error",(e=>{if(l.readable&&l.destroy(),n)return"ENOENT"===e.code?n(null,i):n(e)})),l.on("data",(e=>{const t=(e=(d+e).split(/\n+/)).length-1;for(let n=0;n<t;n++)f(e[n]);d=e[t]})),l.on("end",(()=>{if(d&&f(d,!0),s.length)a(s.shift());else if(n){i.sort(((e,t)=>{const n=new Date(e.timestamp).getTime(),r=new Date(t.timestamp).getTime();return n>r?1:n<r?-1:0})),"desc"===t.order&&(i=i.reverse());const e=t.start||0,r=t.limit||i.length;i=i.slice(e,e+r),t.fields&&(i=i.map((e=>{const n={};return t.fields.forEach((t=>{n[t]=e[t]})),n}))),n(null,i)}}))};a(s.shift())},no}();e.transports.DailyRotateFile=t,io=t}(),function(e){e.RUST="rs",e.C="c",e.JS="js",e.API="api",e.PYTHON="py"}(ao||(ao={})),function(e){e.API="api"}(oo||(oo={})),Object.values(ao),function(e){e.JSON="application/json",e.WASM="application/wasm",e.PLAIN_TXT="text/plain",e.JS="application/x-javascript",e.TAR="application/x-tar"}(co||(co={})),function(e){e.JSON="json",e.WASM="wasm",e.PLAIN_TXT="txt",e.JS="js",e.DTA="dta",e.PY="py",e.TAR="tar"}(uo||(uo={}));var ho,mo,go,yo,bo,vo,wo,xo,_o,Eo,So,ko,Ao,To,Mo,Ro,Oo,Io,No,Po,Co,jo,Lo,Do,$o,Uo,Bo,zo,qo,Ho,Fo,Yo,Vo,Ko,Wo,Go,Jo,Zo,Xo,Qo,ec,tc,nc,rc,ic,sc,ac,oc,cc,uc,lc,dc,pc,fc,hc,mc,gc,yc,bc,vc,wc,xc,_c,Ec,Sc,kc,Ac,Tc,Mc,Rc,Oc,Ic,Nc,Pc,Cc,jc,Lc,Dc,$c,Uc,Bc,zc,qc,Hc,Fc,Yc,Vc,Kc,Wc,Gc={exports:{}};function Jc(){if(mo)return ho;mo=1;const e=Number.MAX_SAFE_INTEGER||9007199254740991;return ho={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:e,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}}function Zc(){if(yo)return go;yo=1;const e="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};return go=e}function Xc(){return bo||(bo=1,function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:i}=Jc(),s=Zc(),a=(t=e.exports={}).re=[],o=t.safeRe=[],c=t.src=[],u=t.safeSrc=[],l=t.t={};let d=0;const p="[a-zA-Z0-9-]",f=[["\\s",1],["\\d",i],[p,r]],h=(e,t,n)=>{const r=(e=>{for(const[t,n]of f)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e})(t),i=d++;s(e,i,t),l[e]=i,c[i]=t,u[i]=r,a[i]=new RegExp(t,n?"g":void 0),o[i]=new RegExp(r,n?"g":void 0)};h("NUMERICIDENTIFIER","0|[1-9]\\d*"),h("NUMERICIDENTIFIERLOOSE","\\d+"),h("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${p}*`),h("MAINVERSION",`(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})`),h("MAINVERSIONLOOSE",`(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})`),h("PRERELEASEIDENTIFIER",`(?:${c[l.NUMERICIDENTIFIER]}|${c[l.NONNUMERICIDENTIFIER]})`),h("PRERELEASEIDENTIFIERLOOSE",`(?:${c[l.NUMERICIDENTIFIERLOOSE]}|${c[l.NONNUMERICIDENTIFIER]})`),h("PRERELEASE",`(?:-(${c[l.PRERELEASEIDENTIFIER]}(?:\\.${c[l.PRERELEASEIDENTIFIER]})*))`),h("PRERELEASELOOSE",`(?:-?(${c[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[l.PRERELEASEIDENTIFIERLOOSE]})*))`),h("BUILDIDENTIFIER",`${p}+`),h("BUILD",`(?:\\+(${c[l.BUILDIDENTIFIER]}(?:\\.${c[l.BUILDIDENTIFIER]})*))`),h("FULLPLAIN",`v?${c[l.MAINVERSION]}${c[l.PRERELEASE]}?${c[l.BUILD]}?`),h("FULL",`^${c[l.FULLPLAIN]}$`),h("LOOSEPLAIN",`[v=\\s]*${c[l.MAINVERSIONLOOSE]}${c[l.PRERELEASELOOSE]}?${c[l.BUILD]}?`),h("LOOSE",`^${c[l.LOOSEPLAIN]}$`),h("GTLT","((?:<|>)?=?)"),h("XRANGEIDENTIFIERLOOSE",`${c[l.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),h("XRANGEIDENTIFIER",`${c[l.NUMERICIDENTIFIER]}|x|X|\\*`),h("XRANGEPLAIN",`[v=\\s]*(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:${c[l.PRERELEASE]})?${c[l.BUILD]}?)?)?`),h("XRANGEPLAINLOOSE",`[v=\\s]*(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:${c[l.PRERELEASELOOSE]})?${c[l.BUILD]}?)?)?`),h("XRANGE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAIN]}$`),h("XRANGELOOSE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAINLOOSE]}$`),h("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),h("COERCE",`${c[l.COERCEPLAIN]}(?:$|[^\\d])`),h("COERCEFULL",c[l.COERCEPLAIN]+`(?:${c[l.PRERELEASE]})?`+`(?:${c[l.BUILD]})?(?:$|[^\\d])`),h("COERCERTL",c[l.COERCE],!0),h("COERCERTLFULL",c[l.COERCEFULL],!0),h("LONETILDE","(?:~>?)"),h("TILDETRIM",`(\\s*)${c[l.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",h("TILDE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAIN]}$`),h("TILDELOOSE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAINLOOSE]}$`),h("LONECARET","(?:\\^)"),h("CARETTRIM",`(\\s*)${c[l.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",h("CARET",`^${c[l.LONECARET]}${c[l.XRANGEPLAIN]}$`),h("CARETLOOSE",`^${c[l.LONECARET]}${c[l.XRANGEPLAINLOOSE]}$`),h("COMPARATORLOOSE",`^${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]})$|^$`),h("COMPARATOR",`^${c[l.GTLT]}\\s*(${c[l.FULLPLAIN]})$|^$`),h("COMPARATORTRIM",`(\\s*)${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]}|${c[l.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",h("HYPHENRANGE",`^\\s*(${c[l.XRANGEPLAIN]})\\s+-\\s+(${c[l.XRANGEPLAIN]})\\s*$`),h("HYPHENRANGELOOSE",`^\\s*(${c[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[l.XRANGEPLAINLOOSE]})\\s*$`),h("STAR","(<|>)?=?\\s*\\*"),h("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),h("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(Gc,Gc.exports)),Gc.exports}function Qc(){if(wo)return vo;wo=1;const e=Object.freeze({loose:!0}),t=Object.freeze({});return vo=n=>n?"object"!=typeof n?e:n:t,vo}function eu(){if(_o)return xo;_o=1;const e=/^[0-9]+$/,t=(t,n)=>{const r=e.test(t),i=e.test(n);return r&&i&&(t=+t,n=+n),t===n?0:r&&!i?-1:i&&!r?1:t<n?-1:1};return xo={compareIdentifiers:t,rcompareIdentifiers:(e,n)=>t(n,e)}}function tu(){if(So)return Eo;So=1;const e=Zc(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:n}=Jc(),{safeRe:r,safeSrc:i,t:s}=Xc(),a=Qc(),{compareIdentifiers:o}=eu();class c{constructor(i,o){if(o=a(o),i instanceof c){if(i.loose===!!o.loose&&i.includePrerelease===!!o.includePrerelease)return i;i=i.version}else if("string"!=typeof i)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof i}".`);if(i.length>t)throw new TypeError(`version is longer than ${t} characters`);e("SemVer",i,o),this.options=o,this.loose=!!o.loose,this.includePrerelease=!!o.includePrerelease;const u=i.trim().match(o.loose?r[s.LOOSE]:r[s.FULL]);if(!u)throw new TypeError(`Invalid Version: ${i}`);if(this.raw=i,this.major=+u[1],this.minor=+u[2],this.patch=+u[3],this.major>n||this.major<0)throw new TypeError("Invalid major version");if(this.minor>n||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>n||this.patch<0)throw new TypeError("Invalid patch version");u[4]?this.prerelease=u[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<n)return t}return e})):this.prerelease=[],this.build=u[5]?u[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(t){if(e("SemVer.compare",this.version,this.options,t),!(t instanceof c)){if("string"==typeof t&&t===this.version)return 0;t=new c(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(e){return e instanceof c||(e=new c(e,this.options)),o(this.major,e.major)||o(this.minor,e.minor)||o(this.patch,e.patch)}comparePre(t){if(t instanceof c||(t=new c(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let n=0;do{const r=this.prerelease[n],i=t.prerelease[n];if(e("prerelease compare",n,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return o(r,i)}while(++n)}compareBuild(t){t instanceof c||(t=new c(t,this.options));let n=0;do{const r=this.build[n],i=t.build[n];if(e("build compare",n,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return o(r,i)}while(++n)}inc(e,t,n){if(e.startsWith("pre")){if(!t&&!1===n)throw new Error("invalid increment argument: identifier is empty");if(t){const e=new RegExp(`^${this.options.loose?i[s.PRERELEASELOOSE]:i[s.PRERELEASE]}$`),n=`-${t}`.match(e);if(!n||n[1]!==t)throw new Error(`invalid identifier: ${t}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,n),this.inc("pre",t,n);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,n),this.inc("pre",t,n);break;case"release":if(0===this.prerelease.length)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const e=Number(n)?1:0;if(0===this.prerelease.length)this.prerelease=[e];else{let r=this.prerelease.length;for(;--r>=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);if(-1===r){if(t===this.prerelease.join(".")&&!1===n)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let r=[t,e];!1===n&&(r=[t]),0===o(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=r):this.prerelease=r}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return Eo=c}function nu(){if(Ao)return ko;Ao=1;const e=tu();return ko=(t,n,r=!1)=>{if(t instanceof e)return t;try{return new e(t,n)}catch(e){if(!r)return null;throw e}},ko}function ru(){if(Fo)return Ho;Fo=1;const e=tu();return Ho=(t,n,r)=>new e(t,r).compare(new e(n,r))}function iu(){if(Jo)return Go;Jo=1;const e=tu();return Go=(t,n,r)=>{const i=new e(t,r),s=new e(n,r);return i.compare(s)||i.compareBuild(s)}}function su(){if(nc)return tc;nc=1;const e=ru();return tc=(t,n,r)=>e(t,n,r)>0}function au(){if(ic)return rc;ic=1;const e=ru();return rc=(t,n,r)=>e(t,n,r)<0}function ou(){if(ac)return sc;ac=1;const e=ru();return sc=(t,n,r)=>0===e(t,n,r)}function cu(){if(cc)return oc;cc=1;const e=ru();return oc=(t,n,r)=>0!==e(t,n,r)}function uu(){if(lc)return uc;lc=1;const e=ru();return uc=(t,n,r)=>e(t,n,r)>=0}function lu(){if(pc)return dc;pc=1;const e=ru();return dc=(t,n,r)=>e(t,n,r)<=0}function du(){if(hc)return fc;hc=1;const e=ou(),t=cu(),n=su(),r=uu(),i=au(),s=lu();return fc=(a,o,c,u)=>{switch(o){case"===":return"object"==typeof a&&(a=a.version),"object"==typeof c&&(c=c.version),a===c;case"!==":return"object"==typeof a&&(a=a.version),"object"==typeof c&&(c=c.version),a!==c;case"":case"=":case"==":return e(a,c,u);case"!=":return t(a,c,u);case">":return n(a,c,u);case">=":return r(a,c,u);case"<":return i(a,c,u);case"<=":return s(a,c,u);default:throw new TypeError(`Invalid operator: ${o}`)}}}function pu(){if(wc)return vc;wc=1;const e=/\s+/g;class t{constructor(n,r){if(r=i(r),n instanceof t)return n.loose===!!r.loose&&n.includePrerelease===!!r.includePrerelease?n:new t(n.raw,r);if(n instanceof s)return this.raw=n.value,this.set=[[n]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=n.trim().replace(e," "),this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!m(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&g(e[0])){this.set=[e];break}}this.formatted=void 0}get range(){if(void 0===this.formatted){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");const t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=" "),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&f)|(this.options.loose&&h))+":"+e,n=r.get(t);if(n)return n;const i=this.options.loose,o=i?c[u.HYPHENRANGELOOSE]:c[u.HYPHENRANGE];e=e.replace(o,M(this.options.includePrerelease)),a("hyphen replace",e),e=e.replace(c[u.COMPARATORTRIM],l),a("comparator trim",e),e=e.replace(c[u.TILDETRIM],d),a("tilde trim",e),e=e.replace(c[u.CARETTRIM],p),a("caret trim",e);let g=e.split(" ").map((e=>b(e,this.options))).join(" ").split(/\s+/).map((e=>T(e,this.options)));i&&(g=g.filter((e=>(a("loose invalid filter",e,this.options),!!e.match(c[u.COMPARATORLOOSE]))))),a("range list",g);const y=new Map,v=g.map((e=>new s(e,this.options)));for(const e of v){if(m(e))return[e];y.set(e.value,e)}y.size>1&&y.has("")&&y.delete("");const w=[...y.values()];return r.set(t,w),w}intersects(e,n){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some((t=>y(t,n)&&e.set.some((e=>y(e,n)&&t.every((t=>e.every((e=>t.intersects(e,n)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new o(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(R(this.set[t],e,this.options))return!0;return!1}}vc=t;const n=(bc||(bc=1,yc=class{constructor(){this.max=1e3,this.map=new Map}get(e){const t=this.map.get(e);return void 0===t?void 0:(this.map.delete(e),this.map.set(e,t),t)}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&void 0!==t){if(this.map.size>=this.max){const e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}),yc),r=new n,i=Qc(),s=fu(),a=Zc(),o=tu(),{safeRe:c,t:u,comparatorTrimReplace:l,tildeTrimReplace:d,caretTrimReplace:p}=Xc(),{FLAG_INCLUDE_PRERELEASE:f,FLAG_LOOSE:h}=Jc(),m=e=>"<0.0.0-0"===e.value,g=e=>""===e.value,y=(e,t)=>{let n=!0;const r=e.slice();let i=r.pop();for(;n&&r.length;)n=r.every((e=>i.intersects(e,t))),i=r.pop();return n},b=(e,t)=>(a("comp",e,t),e=_(e,t),a("caret",e),e=w(e,t),a("tildes",e),e=S(e,t),a("xrange",e),e=A(e,t),a("stars",e),e),v=e=>!e||"x"===e.toLowerCase()||"*"===e,w=(e,t)=>e.trim().split(/\s+/).map((e=>x(e,t))).join(" "),x=(e,t)=>{const n=t.loose?c[u.TILDELOOSE]:c[u.TILDE];return e.replace(n,((t,n,r,i,s)=>{let o;return a("tilde",e,t,n,r,i,s),v(n)?o="":v(r)?o=`>=${n}.0.0 <${+n+1}.0.0-0`:v(i)?o=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:s?(a("replaceTilde pr",s),o=`>=${n}.${r}.${i}-${s} <${n}.${+r+1}.0-0`):o=`>=${n}.${r}.${i} <${n}.${+r+1}.0-0`,a("tilde return",o),o}))},_=(e,t)=>e.trim().split(/\s+/).map((e=>E(e,t))).join(" "),E=(e,t)=>{a("caret",e,t);const n=t.loose?c[u.CARETLOOSE]:c[u.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,((t,n,i,s,o)=>{let c;return a("caret",e,t,n,i,s,o),v(n)?c="":v(i)?c=`>=${n}.0.0${r} <${+n+1}.0.0-0`:v(s)?c="0"===n?`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.0${r} <${+n+1}.0.0-0`:o?(a("replaceCaret pr",o),c="0"===n?"0"===i?`>=${n}.${i}.${s}-${o} <${n}.${i}.${+s+1}-0`:`>=${n}.${i}.${s}-${o} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${s}-${o} <${+n+1}.0.0-0`):(a("no pr"),c="0"===n?"0"===i?`>=${n}.${i}.${s}${r} <${n}.${i}.${+s+1}-0`:`>=${n}.${i}.${s}${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${s} <${+n+1}.0.0-0`),a("caret return",c),c}))},S=(e,t)=>(a("replaceXRanges",e,t),e.split(/\s+/).map((e=>k(e,t))).join(" ")),k=(e,t)=>{e=e.trim();const n=t.loose?c[u.XRANGELOOSE]:c[u.XRANGE];return e.replace(n,((n,r,i,s,o,c)=>{a("xRange",e,n,r,i,s,o,c);const u=v(i),l=u||v(s),d=l||v(o),p=d;return"="===r&&p&&(r=""),c=t.includePrerelease?"-0":"",u?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&p?(l&&(s=0),o=0,">"===r?(r=">=",l?(i=+i+1,s=0,o=0):(s=+s+1,o=0)):"<="===r&&(r="<",l?i=+i+1:s=+s+1),"<"===r&&(c="-0"),n=`${r+i}.${s}.${o}${c}`):l?n=`>=${i}.0.0${c} <${+i+1}.0.0-0`:d&&(n=`>=${i}.${s}.0${c} <${i}.${+s+1}.0-0`),a("xRange return",n),n}))},A=(e,t)=>(a("replaceStars",e,t),e.trim().replace(c[u.STAR],"")),T=(e,t)=>(a("replaceGTE0",e,t),e.trim().replace(c[t.includePrerelease?u.GTE0PRE:u.GTE0],"")),M=e=>(t,n,r,i,s,a,o,c,u,l,d,p)=>`${n=v(r)?"":v(i)?`>=${r}.0.0${e?"-0":""}`:v(s)?`>=${r}.${i}.0${e?"-0":""}`:a?`>=${n}`:`>=${n}${e?"-0":""}`} ${c=v(u)?"":v(l)?`<${+u+1}.0.0-0`:v(d)?`<${u}.${+l+1}.0-0`:p?`<=${u}.${l}.${d}-${p}`:e?`<${u}.${l}.${+d+1}-0`:`<=${c}`}`.trim(),R=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(a(e[n].semver),e[n].semver!==s.ANY&&e[n].semver.prerelease.length>0){const r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0};return vc}function fu(){if(_c)return xc;_c=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(r,i){if(i=n(i),r instanceof t){if(r.loose===!!i.loose)return r;r=r.value}r=r.trim().split(/\s+/).join(" "),a("comparator",r,i),this.options=i,this.loose=!!i.loose,this.parse(r),this.semver===e?this.value="":this.value=this.operator+this.semver.version,a("comp",this)}parse(t){const n=this.options.loose?r[i.COMPARATORLOOSE]:r[i.COMPARATOR],s=t.match(n);if(!s)throw new TypeError(`Invalid comparator: ${t}`);this.operator=void 0!==s[1]?s[1]:"","="===this.operator&&(this.operator=""),s[2]?this.semver=new o(s[2],this.options.loose):this.semver=e}toString(){return this.value}test(t){if(a("Comparator.test",t,this.options.loose),this.semver===e||t===e)return!0;if("string"==typeof t)try{t=new o(t,this.options)}catch(e){return!1}return s(t,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new c(e.value,r).test(this.value):""===e.operator?""===e.value||new c(this.value,r).test(e.semver):(!(r=n(r)).includePrerelease||"<0.0.0-0"!==this.value&&"<0.0.0-0"!==e.value)&&(!(!r.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0")))&&(!(!this.operator.startsWith(">")||!e.operator.startsWith(">"))||(!(!this.operator.startsWith("<")||!e.operator.startsWith("<"))||(!(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))||(!!(s(this.semver,"<",e.semver,r)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))||!!(s(this.semver,">",e.semver,r)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))))))}}xc=t;const n=Qc(),{safeRe:r,t:i}=Xc(),s=du(),a=Zc(),o=tu(),c=pu();return xc}function hu(){if(Sc)return Ec;Sc=1;const e=pu();return Ec=(t,n,r)=>{try{n=new e(n,r)}catch(e){return!1}return n.test(t)},Ec}function mu(){if(Cc)return Pc;Cc=1;const e=pu();return Pc=(t,n)=>{try{return new e(t,n).range||"*"}catch(e){return null}},Pc}function gu(){if(Lc)return jc;Lc=1;const e=tu(),t=fu(),{ANY:n}=t,r=pu(),i=hu(),s=su(),a=au(),o=lu(),c=uu();return jc=(u,l,d,p)=>{let f,h,m,g,y;switch(u=new e(u,p),l=new r(l,p),d){case">":f=s,h=o,m=a,g=">",y=">=";break;case"<":f=a,h=c,m=s,g="<",y="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(i(u,l,p))return!1;for(let e=0;e<l.set.length;++e){const r=l.set[e];let i=null,s=null;if(r.forEach((e=>{e.semver===n&&(e=new t(">=0.0.0")),i=i||e,s=s||e,f(e.semver,i.semver,p)?i=e:m(e.semver,s.semver,p)&&(s=e)})),i.operator===g||i.operator===y)return!1;if((!s.operator||s.operator===g)&&h(u,s.semver))return!1;if(s.operator===y&&m(u,s.semver))return!1}return!0},jc}var yu,bu,vu,wu=function(){if(Wc)return Kc;Wc=1;const e=Xc(),t=Jc(),n=tu(),r=eu(),i=nu(),s=function(){if(Mo)return To;Mo=1;const e=nu();return To=(t,n)=>{const r=e(t,n);return r?r.version:null},To}(),a=function(){if(Oo)return Ro;Oo=1;const e=nu();return Ro=(t,n)=>{const r=e(t.trim().replace(/^[=v]+/,""),n);return r?r.version:null},Ro}(),o=function(){if(No)return Io;No=1;const e=tu();return Io=(t,n,r,i,s)=>{"string"==typeof r&&(s=i,i=r,r=void 0);try{return new e(t instanceof e?t.version:t,r).inc(n,i,s).version}catch(e){return null}},Io}(),c=function(){if(Co)return Po;Co=1;const e=nu();return Po=(t,n)=>{const r=e(t,null,!0),i=e(n,null,!0),s=r.compare(i);if(0===s)return null;const a=s>0,o=a?r:i,c=a?i:r,u=!!o.prerelease.length;if(c.prerelease.length&&!u){if(!c.patch&&!c.minor)return"major";if(0===c.compareMain(o))return c.minor&&!c.patch?"minor":"patch"}const l=u?"pre":"";return r.major!==i.major?l+"major":r.minor!==i.minor?l+"minor":r.patch!==i.patch?l+"patch":"prerelease"}}(),u=function(){if(Lo)return jo;Lo=1;const e=tu();return jo=(t,n)=>new e(t,n).major}(),l=function(){if($o)return Do;$o=1;const e=tu();return Do=(t,n)=>new e(t,n).minor}(),d=function(){if(Bo)return Uo;Bo=1;const e=tu();return Uo=(t,n)=>new e(t,n).patch}(),p=function(){if(qo)return zo;qo=1;const e=nu();return zo=(t,n)=>{const r=e(t,n);return r&&r.prerelease.length?r.prerelease:null},zo}(),f=ru(),h=function(){if(Vo)return Yo;Vo=1;const e=ru();return Yo=(t,n,r)=>e(n,t,r)}(),m=function(){if(Wo)return Ko;Wo=1;const e=ru();return Ko=(t,n)=>e(t,n,!0)}(),g=iu(),y=function(){if(Xo)return Zo;Xo=1;const e=iu();return Zo=(t,n)=>t.sort(((t,r)=>e(t,r,n)))}(),b=function(){if(ec)return Qo;ec=1;const e=iu();return Qo=(t,n)=>t.sort(((t,r)=>e(r,t,n)))}(),v=su(),w=au(),x=ou(),_=cu(),E=uu(),S=lu(),k=du(),A=function(){if(gc)return mc;gc=1;const e=tu(),t=nu(),{safeRe:n,t:r}=Xc();return mc=(i,s)=>{if(i instanceof e)return i;if("number"==typeof i&&(i=String(i)),"string"!=typeof i)return null;let a=null;if((s=s||{}).rtl){const e=s.includePrerelease?n[r.COERCERTLFULL]:n[r.COERCERTL];let t;for(;(t=e.exec(i))&&(!a||a.index+a[0].length!==i.length);)a&&t.index+t[0].length===a.index+a[0].length||(a=t),e.lastIndex=t.index+t[1].length+t[2].length;e.lastIndex=-1}else a=i.match(s.includePrerelease?n[r.COERCEFULL]:n[r.COERCE]);if(null===a)return null;const o=a[2],c=a[3]||"0",u=a[4]||"0",l=s.includePrerelease&&a[5]?`-${a[5]}`:"",d=s.includePrerelease&&a[6]?`+${a[6]}`:"";return t(`${o}.${c}.${u}${l}${d}`,s)},mc}(),T=fu(),M=pu(),R=hu(),O=function(){if(Ac)return kc;Ac=1;const e=pu();return kc=(t,n)=>new e(t,n).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" "))),kc}(),I=function(){if(Mc)return Tc;Mc=1;const e=tu(),t=pu();return Tc=(n,r,i)=>{let s=null,a=null,o=null;try{o=new t(r,i)}catch(e){return null}return n.forEach((t=>{o.test(t)&&(s&&-1!==a.compare(t)||(s=t,a=new e(s,i)))})),s},Tc}(),N=function(){if(Oc)return Rc;Oc=1;const e=tu(),t=pu();return Rc=(n,r,i)=>{let s=null,a=null,o=null;try{o=new t(r,i)}catch(e){return null}return n.forEach((t=>{o.test(t)&&(s&&1!==a.compare(t)||(s=t,a=new e(s,i)))})),s},Rc}(),P=function(){if(Nc)return Ic;Nc=1;const e=tu(),t=pu(),n=su();return Ic=(r,i)=>{r=new t(r,i);let s=new e("0.0.0");if(r.test(s))return s;if(s=new e("0.0.0-0"),r.test(s))return s;s=null;for(let t=0;t<r.set.length;++t){const i=r.set[t];let a=null;i.forEach((t=>{const r=new e(t.semver.version);switch(t.operator){case">":0===r.prerelease.length?r.patch++:r.prerelease.push(0),r.raw=r.format();case"":case">=":a&&!n(r,a)||(a=r);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${t.operator}`)}})),!a||s&&!n(s,a)||(s=a)}return s&&r.test(s)?s:null},Ic}(),C=mu(),j=gu(),L=function(){if($c)return Dc;$c=1;const e=gu();return Dc=(t,n,r)=>e(t,n,">",r),Dc}(),D=function(){if(Bc)return Uc;Bc=1;const e=gu();return Uc=(t,n,r)=>e(t,n,"<",r),Uc}(),$=function(){if(qc)return zc;qc=1;const e=pu();return zc=(t,n,r)=>(t=new e(t,r),n=new e(n,r),t.intersects(n,r)),zc}(),U=function(){if(Fc)return Hc;Fc=1;const e=hu(),t=ru();return Hc=(n,r,i)=>{const s=[];let a=null,o=null;const c=n.sort(((e,n)=>t(e,n,i)));for(const t of c)e(t,r,i)?(o=t,a||(a=t)):(o&&s.push([a,o]),o=null,a=null);a&&s.push([a,null]);const u=[];for(const[e,t]of s)e===t?u.push(e):t||e!==c[0]?t?e===c[0]?u.push(`<=${t}`):u.push(`${e} - ${t}`):u.push(`>=${e}`):u.push("*");const l=u.join(" || "),d="string"==typeof r.raw?r.raw:String(r);return l.length<d.length?l:r},Hc}(),B=function(){if(Vc)return Yc;Vc=1;const e=pu(),t=fu(),{ANY:n}=t,r=hu(),i=ru(),s=[new t(">=0.0.0-0")],a=[new t(">=0.0.0")],o=(e,t,o)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===n){if(1===t.length&&t[0].semver===n)return!0;e=o.includePrerelease?s:a}if(1===t.length&&t[0].semver===n){if(o.includePrerelease)return!0;t=a}const l=new Set;let d,p,f,h,m,g,y;for(const t of e)">"===t.operator||">="===t.operator?d=c(d,t,o):"<"===t.operator||"<="===t.operator?p=u(p,t,o):l.add(t.semver);if(l.size>1)return null;if(d&&p){if(f=i(d.semver,p.semver,o),f>0)return null;if(0===f&&(">="!==d.operator||"<="!==p.operator))return null}for(const e of l){if(d&&!r(e,String(d),o))return null;if(p&&!r(e,String(p),o))return null;for(const n of t)if(!r(e,String(n),o))return!1;return!0}let b=!(!p||o.includePrerelease||!p.semver.prerelease.length)&&p.semver,v=!(!d||o.includePrerelease||!d.semver.prerelease.length)&&d.semver;b&&1===b.prerelease.length&&"<"===p.operator&&0===b.prerelease[0]&&(b=!1);for(const e of t){if(y=y||">"===e.operator||">="===e.operator,g=g||"<"===e.operator||"<="===e.operator,d)if(v&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===v.major&&e.semver.minor===v.minor&&e.semver.patch===v.patch&&(v=!1),">"===e.operator||">="===e.operator){if(h=c(d,e,o),h===e&&h!==d)return!1}else if(">="===d.operator&&!r(d.semver,String(e),o))return!1;if(p)if(b&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===b.major&&e.semver.minor===b.minor&&e.semver.patch===b.patch&&(b=!1),"<"===e.operator||"<="===e.operator){if(m=u(p,e,o),m===e&&m!==p)return!1}else if("<="===p.operator&&!r(p.semver,String(e),o))return!1;if(!e.operator&&(p||d)&&0!==f)return!1}return!(d&&g&&!p&&0!==f||p&&y&&!d&&0!==f||v||b)},c=(e,t,n)=>{if(!e)return t;const r=i(e.semver,t.semver,n);return r>0?e:r<0||">"===t.operator&&">="===e.operator?t:e},u=(e,t,n)=>{if(!e)return t;const r=i(e.semver,t.semver,n);return r<0?e:r>0||"<"===t.operator&&"<="===e.operator?t:e};return Yc=(t,n,r={})=>{if(t===n)return!0;t=new e(t,r),n=new e(n,r);let i=!1;e:for(const e of t.set){for(const t of n.set){const n=o(e,t,r);if(i=i||null!==n,n)continue e}if(i)return!1}return!0},Yc}();return Kc={parse:i,valid:s,clean:a,inc:o,diff:c,major:u,minor:l,patch:d,prerelease:p,compare:f,rcompare:h,compareLoose:m,compareBuild:g,sort:y,rsort:b,gt:v,lt:w,eq:x,neq:_,gte:E,lte:S,cmp:k,coerce:A,Comparator:T,Range:M,satisfies:R,toComparators:O,maxSatisfying:I,minSatisfying:N,minVersion:P,validRange:C,outside:j,gtr:L,ltr:D,intersects:$,simplifyRange:U,subset:B,SemVer:n,re:e.re,src:e.src,tokens:e.t,SEMVER_SPEC_VERSION:t.SEMVER_SPEC_VERSION,RELEASE_TYPES:t.RELEASE_TYPES,compareIdentifiers:r.compareIdentifiers,rcompareIdentifiers:r.rcompareIdentifiers}}();!function(e){e.LEDGER="ledger",e.HTTP_ADAPTER="http-adapter",e.EVENTS_ADAPTER="events-adapter",e.FILESYSTEM_ADAPTER="filesystem-adapter",e.WASM_CHECKPOINTER="wasm-checkpointer",e.WASM_INSTRUMENTER="wasm-instrumenter",e.WASM_RUNNER="wasm-runner"}(yu||(yu={})),function(e){e.FAILED="failed",e.SUCCEED="succeed",e.RUNNING="running"}(bu||(bu={})),function(e){e.BINDLE="bindle",e.S3="s3"}(vu||(vu={}));var xu,_u,Eu,Su,ku,Au,Tu,Mu;!function(e){e.TASK_CREATED="task_created",e.TASK_SOLVED="task_solved",e.FILE_SYSTEM="file_system",e.DISPATCH_TASK="dispatch_task",e.DISPATCH_API_TASK="dispatch_api_task",e.MESSAGE_SAVED="message_saved",e.COMPUTED_OUTCOME="computed_outcome",e.API_FETCH="api_fetch",e.API_OUTCOME="api_outcome",e.API_SOLVED="api_solved",e.READY_TO_SHUTDOWN="ready_to_shutdown",e.INVOICE="invoice",e.ENTITLEMENT="entitlement",e.HEALTH_CHECK="health_check",e.RUNNER_TASK_EXECUTED="runner_task_executed",e.DEPLOYER_EXECUTE_TASK="deployer_execute_task",e.DEPLOYER_TASK_EXECUTED="deployer_task_executed",e.HTTP_ADAPTER_TASK_EXECUTED="http_adapter_task_executed",e.HTTP_ADAPTER_TASK_INSTRUMENTED="http_adapter_task_instrumented",e.HTTP_ADAPTER_TASK_PUSHED="http_adapter_task_pushed",e.HTTP_ADAPTER_TASK_PULLED="http_adapter_task_pulled",e.HTTP_ADAPTER_TASK_CHECKPOINTED="http_adapter_task_checkpointed",e.HTTP_ADAPTER_TASK_CHECKPOINTS_LISTED="http_adapter_task_checkpoints_listed",e.HTTP_ADAPTER_READY_TO_SHUTDOWN="http_adapter_ready_to_shutdown",e.EVENTS_ADAPTER_TASK_EXECUTED="events_adapter_task_executed",e.EVENTS_ADAPTER_TASK_INSTRUMENTED="events_adapter_task_instrumented",e.EVENTS_ADAPTER_TASK_PUSHED="events_adapter_task_pushed",e.EVENTS_ADAPTER_TASK_PULLED="events_adapter_task_pulled",e.EVENTS_ADAPTER_TASK_CHECKPOINTED="events_adapter_task_checkpointed",e.EVENTS_ADAPTER_TASK_CHECKPOINTS_LISTED="events_adapter_task_checkpoints_listed",e.EVENTS_ADAPTER_COMPUTED_OUTCOME="events_adapter_compute_outcome",e.EVENTS_ADAPTER_TASK_CREATED="events_adapter_task_created",e.EVENTS_ADAPTER_NODE_DEREGISTERED="events_adapter_node_deregistered",e.EVENTS_ADAPTER_SERVICE_STARTED_CHECK="events_adapter_service_started_check",e.DISPATCHER_TASK_SOLVED_CLEAR="dispatcher_task_solved_clear",e.DISPATCHER_TASK_CREATED="dispatcher_task_created",e.WASM_INSTRUMENTER_INSTRUMENT_TASK="wasm_instrumenter_instrument_task",e.WASM_INSTRUMENTER_TASK_INSTRUMENTED="wasm_instrumenter_task_instrumented",e.FILESYSTEM_ADAPTER_PUSH_TASK="filesystem_adapter_push_task",e.FILESYSTEM_ADAPTER_TASK_PUSHED="filesystem_adapter_task_pushed",e.FILESYSTEM_ADAPTER_PULL_TASK="filesystem_adapter_pull_task",e.FILESYSTEM_ADAPTER_TASK_PULLED="filesystem_adapter_task_pulled",e.FILESYSTEM_ADAPTER_SERVICE_STARTED_CHECK="filesystem_adapter_service_started_check",e.WASM_CHECKPOINTER_CHECKPOINT_TASK="wasm_checkpointer_checkpoint_task",e.WASM_CHECKPOINTER_LIST_TASK_CHECKPOINTS="wasm_checkpointer_list_task_checkpoints",e.TRANSCRIPT_WRITER_SAVE_MESSAGE="transcript_writer_save_message",e.TRANSCRIPT_WRITER_INVOICE="transcript_writer_save_invoice",e.SEQUENCER_MESSAGE_SAVED="sequencer_message_saved",e.VERIFICATION_MESSAGE_SAVED="verification_message_saved",e.VERIFICATION_VALIDATE_MESSAGE="verification_validate_message",e.VERIFICATION_REVEAL_SOLUTION="verification_reveal_solution",e.VERIFICATION_ERRORS="verification_errors",e.LEDGER_SHUTDOWN="ledger_shutdown",e.LEDGER_SERVICE_STARTED="ledger_service_started"}(xu||(xu={})),function(e){e.TASK_INSTRUMENTED="task_instrumented",e.TASK_CREATED="task_created",e.API_TASK_CREATED="api_task_created",e.TASK_EXECUTED="task_executed",e.TASK_PUSHED="task_pushed",e.TASK_PULLED="task_pulled",e.TASK_CHECKPOINTED="task_checkpointed",e.TASK_CHECKPOINTS_LISTED="task_checkpoints_listed",e.COMPUTED_OUTCOME="computed_outcome",e.MESSAGE_SAVED="message_saved",e.TASK_SOLVED="task_solved",e.TASK_SOLVED_CLEAR="task_solved_clear",e.NODE_OUTCOME="node_outcome",e.PLATFORM_ERRORS="errors",e.REVEAL_SOLUTIONS="reveal_solutions",e.SOLUTIONS_REVEALED="solutions_revealed",e.API_FETCHER_OUTCOME="api_fetcher_outcome",e.API_SOLVED="api_solved",e.API_OUTCOME="api_outcome",e.NODE_DEREGISTERED="node_deregistered",e.READY_TO_SHUTDOWN="ready_to_shutdown",e.EXECUTION_COMPLETED="execution_completed",e.SERVICE_STARTED="service_started",e.INVOICE="invoice",e.ENTITLEMENT_REQ="entitlement_req",e.ENTITLEMENT_RES="entitlement_res",e.HEALTH_CHECK="health_check",e.EXECUTION_METADATA="execution_metadata"}(_u||(_u={})),function(e){e.SHUTDOWN="shutdown",e.LIST_TASK_CHECKPOINTS="list_task_checkpoints",e.EXECUTE_TASK="execute_task",e.CHECKPOINT_TASK="checkpoint_task",e.INSTRUMENT_TASK="instrument_task",e.PUSH_TASK="push_task",e.PULL_TASK="pull_task",e.DISPATCH_TASK="dispatch_task",e.DISPATCH_API_TASK="dispatch_api_task",e.SAVE_MESSAGE="save_message",e.REVEAL_SOLUTION="reveal_solution",e.VALIDATE_MESSAGE="validate_message",e.API_FETCH="api_fetch",e.ENTITLEMENT="entitlement",e.HEALTH_CHECK="health_check"}(Eu||(Eu={})),function(e){e.ERRORS="errors",e.TASK_INSTRUMENTED="task_instrumented",e.TASK_CREATED="task_created",e.API_TASK_CREATED="api_task_created",e.TASK_EXECUTED="task_executed",e.TASK_PUSHED="task_pushed",e.TASK_SOLVED="task_solved",e.TASK_SOLVED_CLEAR="task_solved_clear",e.TASK_PULLED="task_pulled",e.TASK_CHECKPOINTED="task_checkpointed",e.TASK_CHECKPOINTS_LISTED="task_checkpoints_listed",e.COMPUTED_OUTCOME="computed_outcome",e.MESSAGE_SAVED="message_saved",e.API_FETCHER_OUTCOME="api_fetcher_outcome",e.API_SOLVED="api_solved",e.API_OUTCOME="api_outcome",e.NODE_DEREGISTERED="node_deregistered",e.READY_TO_SHUTDOWN="ready_to_shutdown",e.SERVICE_STARTED="service_started",e.INVOICES="invoice",e.ENTITLEMENTS_REQ="entitlement_req",e.ENTITLEMENTS_RES="entitlement_res",e.HEALTH_CHECK="health_check",e.SHUTDOWN="shutdown",e.LIST_TASK_CHECKPOINTS="list_task_checkpoints",e.EXECUTE_TASK="execute_task",e.CHECKPOINT_TASK="checkpoint_task",e.INSTRUMENT_TASK="instrument_task",e.PUSH_TASK="push_task",e.PULL_TASK="pull_task",e.DISPATCH_TASK="dispatch_task",e.DISPATCH_API_TASK="dispatch_api_task",e.SAVE_MESSAGE="save_message",e.REVEAL_SOLUTION="reveal_solution",e.VALIDATE_MESSAGE="validate_message",e.API_FETCH="api_fetch",e.DUMMY="DUMMY"}(Su||(Su={})),function(e){e.VALIDATION_ERROR="validation_error"}(ku||(ku={})),function(e){e.GAME_PENDING="GamePending",e.READY_FOR_INVOICE="ReadyForInvoice",e.ERROR="Error"}(Au||(Au={})),function(e){!function(e){e.Pay="pay",e.Charge="charge"}(e.Operation||(e.Operation={})),(e.EntitlementOperation||(e.EntitlementOperation={})).IS_USER_REGISTER="isUserRegister"}(Tu||(Tu={})),function(e){e.Pay="pay",e.Charge="charge"}(Mu||(Mu={})),_u.TASK_SOLVED,_u.TASK_CREATED,_u.API_TASK_CREATED,_u.NODE_OUTCOME,_u.SOLUTIONS_REVEALED,_u.REVEAL_SOLUTIONS,_u.API_OUTCOME,_u.EXECUTION_COMPLETED,_u.EXECUTION_METADATA;var Ru=function(e){this.groups=[],this.each=!1,this.context=void 0,this.type=e.type,this.name=e.name,this.target=e.target,this.propertyName=e.propertyName,this.constraints=null==e?void 0:e.constraints,this.constraintCls=e.constraintCls,this.validationTypeOptions=e.validationTypeOptions,e.validationOptions&&(this.message=e.validationOptions.message,this.groups=e.validationOptions.groups,this.always=e.validationOptions.always,this.each=e.validationOptions.each,this.context=e.validationOptions.context)},Ou=function(){function e(){}return e.prototype.transform=function(e){var t=[];return Object.keys(e.properties).forEach((function(n){e.properties[n].forEach((function(r){var i={message:r.message,groups:r.groups,always:r.always,each:r.each},s={type:r.type,name:r.name,target:e.name,propertyName:n,constraints:r.constraints,validationTypeOptions:r.options,validationOptions:i};t.push(new Ru(s))}))})),t},e}();function Iu(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:void 0}var Nu=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Pu=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,s=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=s.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=s.return)&&n.call(s)}finally{if(i)throw i.error}}return a},Cu=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,s=t.length;i<s;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},ju=function(){function e(){this.validationMetadatas=new Map,this.constraintMetadatas=new Map}return Object.defineProperty(e.prototype,"hasValidationMetaData",{get:function(){return!!this.validationMetadatas.size},enumerable:!1,configurable:!0}),e.prototype.addValidationSchema=function(e){var t=this;(new Ou).transform(e).forEach((function(e){return t.addValidationMetadata(e)}))},e.prototype.addValidationMetadata=function(e){var t=this.validationMetadatas.get(e.target);t?t.push(e):this.validationMetadatas.set(e.target,[e])},e.prototype.addConstraintMetadata=function(e){var t=this.constraintMetadatas.get(e.target);t?t.push(e):this.constraintMetadatas.set(e.target,[e])},e.prototype.groupByPropertyName=function(e){var t={};return e.forEach((function(e){t[e.propertyName]||(t[e.propertyName]=[]),t[e.propertyName].push(e)})),t},e.prototype.getTargetValidationMetadatas=function(e,t,n,r,i){var s,a,o=function(e){return void 0!==e.always?e.always:(!e.groups||!e.groups.length)&&n},c=function(e){return!(!r||i&&i.length||!e.groups||!e.groups.length)},u=(this.validationMetadatas.get(e)||[]).filter((function(n){return(n.target===e||n.target===t)&&(!!o(n)||!c(n)&&(!(i&&i.length>0)||n.groups&&!!n.groups.find((function(e){return-1!==i.indexOf(e)}))))})),l=[];try{for(var d=Nu(this.validationMetadatas.entries()),p=d.next();!p.done;p=d.next()){var f=Pu(p.value,2),h=f[0],m=f[1];e.prototype instanceof h&&l.push.apply(l,Cu([],Pu(m),!1))}}catch(e){s={error:e}}finally{try{p&&!p.done&&(a=d.return)&&a.call(d)}finally{if(s)throw s.error}}var g=l.filter((function(t){return"string"!=typeof t.target&&(t.target!==e&&((!(t.target instanceof Function)||e.prototype instanceof t.target)&&(!!o(t)||!c(t)&&(!(i&&i.length>0)||t.groups&&!!t.groups.find((function(e){return-1!==i.indexOf(e)}))))))})),y=g.filter((function(e){return!u.find((function(t){return t.propertyName===e.propertyName&&t.type===e.type}))}));return u.concat(y)},e.prototype.getTargetValidatorConstraints=function(e){return this.constraintMetadatas.get(e)||[]},e}();function Lu(){var e=Iu();return e.classValidatorMetadataStorage||(e.classValidatorMetadataStorage=new ju),e.classValidatorMetadataStorage}var Du=function(){function e(){}return e.isValid=function(e){var t=this;return"isValid"!==e&&"getMessage"!==e&&-1!==Object.keys(this).map((function(e){return t[e]})).indexOf(e)},e.CUSTOM_VALIDATION="customValidation",e.NESTED_VALIDATION="nestedValidation",e.PROMISE_VALIDATION="promiseValidation",e.CONDITIONAL_VALIDATION="conditionalValidation",e.WHITELIST="whitelistValidation",e.IS_DEFINED="isDefined",e}(),$u=new(function(){function e(){this.instances=[]}return e.prototype.get=function(e){var t=this.instances.find((function(t){return t.type===e}));return t||(t={type:e,object:new e},this.instances.push(t)),t.object},e}());function Uu(e){return $u.get(e)}function Bu(e){return function(t,n){var r={type:Du.WHITELIST,target:t.constructor,propertyName:n,validationOptions:e};Lu().addValidationMetadata(new Ru(r))}}var zu=function(){function e(e,t,n){void 0===n&&(n=!1),this.target=e,this.name=t,this.async=n}return Object.defineProperty(e.prototype,"instance",{get:function(){return Uu(this.target)},enumerable:!1,configurable:!0}),e}();function qu(e){var t;if(e.validator instanceof Function){if(t=e.validator,Uu(ju).getTargetValidatorConstraints(e.validator).length>1)throw"More than one implementation of ValidatorConstraintInterface found for validator on: ".concat(e.target.name,":").concat(e.propertyName)}else{var n=e.validator;t=function(){function e(){}return e.prototype.validate=function(e,t){return n.validate(e,t)},e.prototype.defaultMessage=function(e){return n.defaultMessage?n.defaultMessage(e):""},e}(),Lu().addConstraintMetadata(new zu(t,e.name,e.async))}var r={type:e.name&&Du.isValid(e.name)?e.name:Du.CUSTOM_VALIDATION,name:e.name,target:e.target,propertyName:e.propertyName,validationOptions:e.options,constraintCls:t,constraints:e.constraints};Lu().addValidationMetadata(new Ru(r))}function Hu(e,t){return function(n){var r=t&&t.each?"each value in ":"";return e(r,n)}}function Fu(e,t){return function(n,r){qu({name:e.name,target:n.constructor,propertyName:r,options:t,constraints:e.constraints,validator:e.validator})}}function Yu(e){return function(t,n){var r={type:Du.CONDITIONAL_VALIDATION,target:t.constructor,propertyName:n,constraints:[function(e,t){return null!==e[n]&&void 0!==e[n]}],validationOptions:e};Lu().addValidationMetadata(new Ru(r))}}var Vu=function(){return Vu=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Vu.apply(this,arguments)};function Ku(e){var t=Vu({},e),n=t.each?"each value in ":"";return t.message=t.message||n+"nested property $property must be either object or array",function(e,n){var r={type:Du.NESTED_VALIDATION,target:e.constructor,propertyName:n,validationOptions:t};Lu().addValidationMetadata(new Ru(r))}}var Wu,Gu={exports:{}};function Ju(){return Wu||(Wu=1,function(e,t){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t="string"==typeof e||e instanceof String;if(!t){var r=n(e);throw null===e?r="null":"object"===r&&(r=e.constructor.name),new TypeError("Expected a string but received a ".concat(r))}},e.exports=t.default,e.exports.default=t.default}(Gu,Gu.exports)),Gu.exports}function Zu(e){return Fu({name:"isNotEmpty",validator:{validate:function(e,t){return function(e){return""!==e&&null!=e}(e)},defaultMessage:Hu((function(e){return e+"$property should not be empty"}),e)}},e)}function Xu(e,t){return Fu({name:"min",constraints:[e],validator:{validate:function(e,t){return function(e,t){return"number"==typeof e&&"number"==typeof t&&e>=t}(e,null==t?void 0:t.constraints[0])},defaultMessage:Hu((function(e){return e+"$property must not be less than $constraint1"}),t)}},t)}var Qu,el={exports:{}};function tl(){return Qu||(Qu=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,r.default)(e),null==t&&(t="all");return t in i&&i[t].test(e)};var n,r=(n=Ju())&&n.__esModule?n:{default:n};var i={1:/^[0-9A-F]{8}-[0-9A-F]{4}-1[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,2:/^[0-9A-F]{8}-[0-9A-F]{4}-2[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,3:/^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,4:/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,5:/^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,6:/^[0-9A-F]{8}-[0-9A-F]{4}-6[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,7:/^[0-9A-F]{8}-[0-9A-F]{4}-7[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,8:/^[0-9A-F]{8}-[0-9A-F]{4}-8[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,nil:/^00000000-0000-0000-0000-000000000000$/i,max:/^ffffffff-ffff-ffff-ffff-ffffffffffff$/i,all:/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i};e.exports=t.default,e.exports.default=t.default}(el,el.exports)),el.exports}var nl=we(tl());function rl(e,t){return Fu({name:"isUuid",constraints:[e],validator:{validate:function(e,t){return function(e,t){return"string"==typeof e&&nl(e,t)}(e,null==t?void 0:t.constraints[0])},defaultMessage:Hu((function(e){return e+"$property must be a UUID"}),t)}},t)}var il,sl={exports:{}};function al(){return il||(il=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,r.default)(e);var n=new RegExp("^[a-fA-F0-9]{".concat(i[t],"}$"));return n.test(e)};var n,r=(n=Ju())&&n.__esModule?n:{default:n};var i={md5:32,md4:32,sha1:40,sha256:64,sha384:96,sha512:128,ripemd128:32,ripemd160:40,tiger128:32,tiger160:40,tiger192:48,crc32:8,crc32b:8};e.exports=t.default,e.exports.default=t.default}(sl,sl.exports)),sl.exports}var ol=we(al());function cl(e,t){return Fu({name:"isHash",constraints:[e],validator:{validate:function(e,t){return function(e,t){return"string"==typeof e&&ol(e,t)}(e,null==t?void 0:t.constraints[0])},defaultMessage:Hu((function(e){return e+"$property must be a hash of type $constraint1"}),t)}},t)}var ul,ll={exports:{}};function dl(){return ul||(ul=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,r.default)(e),i.test(e)};var n,r=(n=Ju())&&n.__esModule?n:{default:n};var i=/^(0x)[0-9a-f]{40}$/i;e.exports=t.default,e.exports.default=t.default}(ll,ll.exports)),ll.exports}var pl=we(dl());function fl(e){return Fu({name:"isEthereumAddress",validator:{validate:function(e,t){return function(e){return"string"==typeof e&&pl(e)}(e)},defaultMessage:Hu((function(e){return e+"$property must be an Ethereum address"}),e)}},e)}function hl(e,t){return void 0===e&&(e={}),Fu({name:"isNumber",constraints:[e],validator:{validate:function(e,t){return function(e,t){if(void 0===t&&(t={}),"number"!=typeof e)return!1;if(e===1/0||e===-1/0)return!!t.allowInfinity;if(Number.isNaN(e))return!!t.allowNaN;if(void 0!==t.maxDecimalPlaces){var n=0;if(e%1!=0&&(n=e.toString().split(".")[1].length),n>t.maxDecimalPlaces)return!1}return Number.isFinite(e)}(e,null==t?void 0:t.constraints[0])},defaultMessage:Hu((function(e){return e+"$property must be a number conforming to the specified constraints"}),t)}},t)}var ml=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,s=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=s.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=s.return)&&n.call(s)}finally{if(i)throw i.error}}return a};function gl(e){return Object.entries(e).filter((function(e){var t=ml(e,2),n=t[0];return t[1],isNaN(parseInt(n))})).map((function(e){var t=ml(e,2);return t[0],t[1]}))}function yl(e,t){return Fu({name:"isEnum",constraints:[e,gl(e)],validator:{validate:function(e,t){return function(e,t){return Object.keys(t).map((function(e){return t[e]})).includes(e)}(e,null==t?void 0:t.constraints[0])},defaultMessage:Hu((function(e){return e+"$property must be one of the following values: $constraint2"}),t)}},t)}function bl(e){return Fu({name:"isString",validator:{validate:function(e,t){return function(e){return e instanceof String||"string"==typeof e}(e)},defaultMessage:Hu((function(e){return e+"$property must be a string"}),e)}},e)}function vl(){return function(e,t){qu({name:"IsUnixTimestamp",target:e.constructor,propertyName:t,validator:{validate(e){const t=e,n=new Date(t);return!isNaN(n.getTime())&&t>16725312e5}}})}}function wl(){return function(e,t){qu({name:"IsUnixTimestamp",target:e.constructor,propertyName:t,validator:{validate(e){const t=e,n=new Date(t);return!isNaN(n.getTime())&&t>1672531200}}})}}var xl,_l,El,Sl=function(e,t,n,r){var i,s=arguments.length,a=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(a=(s<3?i(a):s>3?i(t,n,a):i(t,n))||a);return s>3&&a&&Object.defineProperty(t,n,a),a},kl=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};!function(e){e.FAILED="failed",e.SUCCEED="succeed",e.RUNNING="running"}(xl||(xl={}));class Al{iv;ephemPublicKey;ciphertext;mac;constructor(e,t,n,r){this.iv=e,this.ephemPublicKey=t,this.ciphertext=n,this.mac=r}}Sl([Zu(),bl(),kl("design:type",String)],Al.prototype,"iv",void 0),Sl([Zu(),bl(),kl("design:type",String)],Al.prototype,"ephemPublicKey",void 0),Sl([Zu(),bl(),kl("design:type",String)],Al.prototype,"ciphertext",void 0),Sl([Zu(),bl(),kl("design:type",String)],Al.prototype,"mac",void 0);class Tl{v;r;s;constructor(e,t,n){this.v=e,this.r=t,this.s=n}}Sl([Zu(),hl(),kl("design:type",Number)],Tl.prototype,"v",void 0),Sl([Zu(),bl(),kl("design:type",String)],Tl.prototype,"r",void 0),Sl([Zu(),bl(),kl("design:type",String)],Tl.prototype,"s",void 0);class Ml{memoryGrowDelta;call;frame;steps;constructor(e,t,n,r){this.call=e,this.frame=t,this.steps=n,this.memoryGrowDelta=r}}Sl([hl(),Yu(),kl("design:type",Number)],Ml.prototype,"memoryGrowDelta",void 0),Sl([hl(),Zu(),kl("design:type",Number)],Ml.prototype,"call",void 0),Sl([hl(),Zu(),kl("design:type",Number)],Ml.prototype,"frame",void 0),Sl([hl(),Zu(),kl("design:type",Number)],Ml.prototype,"steps",void 0);class Rl{call;frame;gas;memory;constructor(e,t,n,r){this.call=e,this.frame=t,this.gas=n,this.memory=r}}Sl([hl(),Zu(),kl("design:type",Number)],Rl.prototype,"call",void 0),Sl([hl(),Zu(),kl("design:type",Number)],Rl.prototype,"frame",void 0),Sl([hl(),Zu(),kl("design:type",Number)],Rl.prototype,"gas",void 0),Sl([hl(),Zu(),kl("design:type",Number)],Rl.prototype,"memory",void 0);class Ol{call;frame;memory;constructor(e,t,n){this.call=e,this.frame=t,this.memory=n}}Sl([hl(),Zu(),kl("design:type",Number)],Ol.prototype,"call",void 0),Sl([hl(),Zu(),kl("design:type",Number)],Ol.prototype,"frame",void 0),Sl([hl(),Zu(),kl("design:type",Number)],Ol.prototype,"memory",void 0);class Il{protocol;constructor(e){this.protocol=e}}Sl([bl(),Zu(),kl("design:type",String)],Il.prototype,"protocol",void 0);class Nl{last;limits;peak;versions;constructor(e,t,n,r){this.last=e,this.limits=t,this.peak=n,this.versions=r}}Sl([Ku(),kl("design:type",Ml)],Nl.prototype,"last",void 0),Sl([Ku(),kl("design:type",Rl)],Nl.prototype,"limits",void 0),Sl([Ku(),kl("design:type",Ol)],Nl.prototype,"peak",void 0),Sl([Yu(),Ku(),kl("design:type",Il)],Nl.prototype,"versions",void 0);class Pl{senderAddress;status;output;metering;constructor(e,t,n,r){this.senderAddress=e,this.status=t,this.output=n,this.metering=r}}Sl([Zu(),fl(),kl("design:type",String)],Pl.prototype,"senderAddress",void 0),Sl([Zu(),yl(xl),kl("design:type",String)],Pl.prototype,"status",void 0),Sl([Yu(),bl(),kl("design:type",String)],Pl.prototype,"output",void 0),Sl([Yu(),Ku(),kl("design:type",Nl)],Pl.prototype,"metering",void 0);class Cl{signature;clearTextSolution;constructor(e,t){this.signature=e,this.clearTextSolution=t}}Sl([Ku(),kl("design:type",Tl)],Cl.prototype,"signature",void 0),Sl([Ku(),kl("design:type",Pl)],Cl.prototype,"clearTextSolution",void 0);class jl{blockNumber;selectionStrategy;setNodes;constructor(e,t,n){this.blockNumber=e,this.selectionStrategy=t,this.setNodes=Array.from(n)}}Sl([Zu(),Xu(0),kl("design:type",Number)],jl.prototype,"blockNumber",void 0),Sl([Zu(),bl(),kl("design:type",String)],jl.prototype,"selectionStrategy",void 0),Sl([Fu({name:"arrayNotEmpty",validator:{validate:function(e,t){return n=e,Array.isArray(n)&&n.length>0;var n},defaultMessage:Hu((function(e){return e+"$property should not be empty"}),_l)}},_l),Zu({each:!0}),fl({each:!0}),kl("design:type",Array)],jl.prototype,"setNodes",void 0);class Ll{gas;call;frame;memory;constructor(e,t,n,r){this.gas=e,this.call=t,this.frame=n,this.memory=r}}Sl([Zu(),bl(),kl("design:type",String)],Ll.prototype,"gas",void 0),Sl([Zu(),bl(),kl("design:type",String)],Ll.prototype,"call",void 0),Sl([Zu(),bl(),kl("design:type",String)],Ll.prototype,"frame",void 0),Sl([Zu(),bl(),kl("design:type",String)],Ll.prototype,"memory",void 0);class Dl{reward;requiredSolutions;totalSolutions;executionTimeout;constructor(e,t,n,r){this.reward=e,this.requiredSolutions=t,this.totalSolutions=n,this.executionTimeout=r}}Sl([Zu(),bl(),kl("design:type",String)],Dl.prototype,"reward",void 0),Sl([Xu(1),Zu(),hl(),kl("design:type",Number)],Dl.prototype,"requiredSolutions",void 0),Sl([Xu(1),Zu(),hl(),kl("design:type",Number)],Dl.prototype,"totalSolutions",void 0),Sl([Xu(1),Zu(),hl(),kl("design:type",Number)],Dl.prototype,"executionTimeout",void 0);class $l{request;response;constructor(e,t){this.request=e,this.response=t}}Sl([Zu(),hl(),kl("design:type",Number)],$l.prototype,"request",void 0),Sl([Zu(),hl(),kl("design:type",Number)],$l.prototype,"response",void 0),function(e){e.BINDLE="bindle",e.S3="s3"}(El||(El={}));var Ul,Bl=function(e,t,n,r){var i,s=arguments.length,a=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(a=(s<3?i(a):s>3?i(t,n,a):i(t,n))||a);return s>3&&a&&Object.defineProperty(t,n,a),a},zl=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};class ql{msgType;messageId;payload;msgTimestamp=Date.now();traceCarrier;constructor(e,t,n){this.msgType=this.constructor.name,this.traceCarrier=n,this.messageId=t||k(),this.payload=e}}Bl([Zu(),bl(),zl("design:type",String)],ql.prototype,"msgType",void 0),Bl([Yu(),rl(),zl("design:type",String)],ql.prototype,"messageId",void 0),Bl([Ku(),zl("design:type",Object)],ql.prototype,"payload",void 0),Bl([vl(),zl("design:type",Number)],ql.prototype,"msgTimestamp",void 0),Bl([Yu(),zl("design:type",Object)],ql.prototype,"traceCarrier",void 0);Bl([Zu(),bl(),zl("design:type",String)],class extends ql{error;constructor(e,t,n,r){super(t,n,r),this.error=e}}.prototype,"error",void 0);Bl([Zu(),bl(),zl("design:type",String)],class extends ql{error;constructor(e,t,n,r){super(t,n,r),this.error=e}}.prototype,"error",void 0),function(e){e.EVM="evm",e.AVALANCHE="avalanche"}(Ul||(Ul={}));var Hl,Fl=function(e,t,n,r){var i,s=arguments.length,a=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(a=(s<3?i(a):s>3?i(t,n,a):i(t,n))||a);return s>3&&a&&Object.defineProperty(t,n,a),a},Yl=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};!function(e){e.TASK_CREATED="task_created",e.API_TASK_CREATED="api_task_created",e.NODE_OUTCOME="node_outcome",e.TASK_SOLVED="task_solved",e.API_OUTCOME="api_outcome",e.SOLUTIONS_REVEALED="solutions_revealed",e.EXECUTION_COMPLETED="execution_completed"}(Hl||(Hl={}));class Vl{type;executionId;message;msgHash;signature;sequencerAddress;timestamp;constructor(e,t,n,r,i,s,a){this.type=e,this.executionId=t,this.message=r,this.msgHash=n,this.signature=new Tl(i.v,i.r,i.s),this.timestamp=a,this.sequencerAddress=s}}Fl([Zu(),yl(Hl),Yl("design:type",String)],Vl.prototype,"type",void 0),Fl([rl(),Zu(),Yl("design:type",String)],Vl.prototype,"executionId",void 0),Fl([Ku(),Yl("design:type",Object)],Vl.prototype,"message",void 0),Fl([Zu(),cl("sha256"),Yl("design:type",String)],Vl.prototype,"msgHash",void 0),Fl([Ku(),Yl("design:type",Tl)],Vl.prototype,"signature",void 0),Fl([Zu(),fl(),Yl("design:type",String)],Vl.prototype,"sequencerAddress",void 0),Fl([vl(),Zu(),Yl("design:type",Number)],Vl.prototype,"timestamp",void 0);class Kl{type="dispatch_task";taskId;executionId;msgHash;signature;limits;econParams;workers;dispatcherTimestamp;taskRequesterTimestamp;ledgerName;blockHash;blockNumber;chainId;nodeRegistryContractAddress;taskRegistryContractAddress;taskAuthorizationContractAddress;taskRequesterAddress;taskPath;taskVersion;signedRequestBody;senderAddress;input;constructor(e,t,n,r,i,s,a,o,c,u,l,d,p,f,h,m,g,y,b,v,w,x){this.taskId=e,this.executionId=t,this.msgHash=n,this.signature=new Tl(r.v,r.r,r.s),this.limits=new Ll(i.gas,i.call,i.frame,i.memory),this.econParams=new Dl(s.reward,s.requiredSolutions,s.totalSolutions,s.executionTimeout),this.workers=new jl(a.blockNumber,a.selectionStrategy,a.setNodes),this.dispatcherTimestamp=o,this.taskRequesterTimestamp=c,this.ledgerName=u,this.blockHash=l,this.blockNumber=d,this.chainId=p,this.nodeRegistryContractAddress=f,this.taskRegistryContractAddress=h,this.taskAuthorizationContractAddress=m,this.taskRequesterAddress=g,this.taskPath=y,this.taskVersion=b,this.signedRequestBody=x,this.senderAddress=v,this.input=w}}Fl([Zu(),bl(),Yl("design:type",String)],Kl.prototype,"taskId",void 0),Fl([Zu(),rl(),Yl("design:type",String)],Kl.prototype,"executionId",void 0),Fl([Zu(),cl("sha256"),Yl("design:type",String)],Kl.prototype,"msgHash",void 0),Fl([Ku(),Yl("design:type",Tl)],Kl.prototype,"signature",void 0),Fl([Ku(),Yl("design:type",Ll)],Kl.prototype,"limits",void 0),Fl([Ku(),Yl("design:type",Dl)],Kl.prototype,"econParams",void 0),Fl([Ku(),Yl("design:type",jl)],Kl.prototype,"workers",void 0),Fl([Zu(),wl(),Yl("design:type",Number)],Kl.prototype,"dispatcherTimestamp",void 0),Fl([Zu(),wl(),Yl("design:type",Number)],Kl.prototype,"taskRequesterTimestamp",void 0),Fl([Zu(),yl(Ul),Yl("design:type",String)],Kl.prototype,"ledgerName",void 0),Fl([Zu(),Yl("design:type",String)],Kl.prototype,"blockHash",void 0),Fl([Zu(),Xu(0),Yl("design:type",Number)],Kl.prototype,"blockNumber",void 0),Fl([Zu(),bl(),Yl("design:type",String)],Kl.prototype,"chainId",void 0),Fl([Zu(),fl(),Yl("design:type",String)],Kl.prototype,"nodeRegistryContractAddress",void 0),Fl([Zu(),fl(),Yl("design:type",String)],Kl.prototype,"taskRegistryContractAddress",void 0),Fl([Zu(),fl(),Yl("design:type",String)],Kl.prototype,"taskAuthorizationContractAddress",void 0),Fl([Zu(),fl(),Yl("design:type",String)],Kl.prototype,"taskRequesterAddress",void 0),Fl([Yu(),Yl("design:type",String)],Kl.prototype,"taskPath",void 0),Fl([Yu(),Xu(0),Yl("design:type",Number)],Kl.prototype,"taskVersion",void 0),Fl([Yu(),Yl("design:type",Object)],Kl.prototype,"signedRequestBody",void 0),Fl([Zu(),fl(),Yl("design:type",String)],Kl.prototype,"senderAddress",void 0),Fl([Yu(),Bu(),Yl("design:type",String)],Kl.prototype,"input",void 0);class Wl{type="dispatch_task";taskId;executionId;msgHash;signature;ledgerName;blockHash;blockNumber;chainId;taskRegistryContractAddress;taskAuthorizationContractAddress;taskRequesterAddress;taskPath;taskVersion;senderAddress;executionTimeout;input;constructor(e,t,n,r,i,s,a,o,c,u,l,d,p,f,h,m){this.taskId=e,this.executionId=t,this.msgHash=n,this.signature=new Tl(r.v,r.r,r.s),this.executionTimeout=h,this.ledgerName=s,this.blockHash=a,this.blockNumber=o,this.chainId=c,this.taskRegistryContractAddress=u,this.taskAuthorizationContractAddress=l,this.taskRequesterAddress=d,this.taskPath=p,this.taskVersion=f,this.senderAddress=i,this.input=m}}Fl([Zu(),bl(),Yl("design:type",String)],Wl.prototype,"taskId",void 0),Fl([Zu(),rl(),Yl("design:type",String)],Wl.prototype,"executionId",void 0),Fl([Zu(),cl("sha256"),Yl("design:type",String)],Wl.prototype,"msgHash",void 0),Fl([Ku(),Yl("design:type",Tl)],Wl.prototype,"signature",void 0),Fl([Zu(),yl(Ul),Yl("design:type",String)],Wl.prototype,"ledgerName",void 0),Fl([Zu(),Yl("design:type",String)],Wl.prototype,"blockHash",void 0),Fl([Zu(),Xu(0),Yl("design:type",Number)],Wl.prototype,"blockNumber",void 0),Fl([Zu(),bl(),Yl("design:type",String)],Wl.prototype,"chainId",void 0),Fl([Zu(),fl(),Yl("design:type",String)],Wl.prototype,"taskRegistryContractAddress",void 0),Fl([Zu(),fl(),Yl("design:type",String)],Wl.prototype,"taskAuthorizationContractAddress",void 0),Fl([Zu(),fl(),Yl("design:type",String)],Wl.prototype,"taskRequesterAddress",void 0),Fl([Yu(),Yl("design:type",String)],Wl.prototype,"taskPath",void 0),Fl([Yu(),Xu(0),Yl("design:type",Number)],Wl.prototype,"taskVersion",void 0),Fl([Zu(),fl(),Yl("design:type",String)],Wl.prototype,"senderAddress",void 0),Fl([hl(),Yl("design:type",Number)],Wl.prototype,"executionTimeout",void 0),Fl([Yu(),Bu(),Yl("design:type",String)],Wl.prototype,"input",void 0);class Gl{executionId;senderAddress;encryptedSolution;msgHash;signature;constructor(e,t,n,r,i){this.executionId=e,this.signature=new Tl(i.v,i.r,i.s),this.encryptedSolution=new Al(n.iv,n.ephemPublicKey,n.ciphertext,n.mac),this.senderAddress=t,this.msgHash=r}}Fl([rl(),Zu(),Yl("design:type",String)],Gl.prototype,"executionId",void 0),Fl([Zu(),fl(),Yl("design:type",String)],Gl.prototype,"senderAddress",void 0),Fl([Ku(),Yl("design:type",Al)],Gl.prototype,"encryptedSolution",void 0),Fl([Zu(),cl("sha256"),Yl("design:type",String)],Gl.prototype,"msgHash",void 0),Fl([Ku(),Yl("design:type",Tl)],Gl.prototype,"signature",void 0);class Jl{executionId;senderAddress;bodyResponse;msgHash;signature;tlsHandshakeHash;status;totalTransferredBytes;constructor(e,t,n,r,i,s,a,o){this.executionId=e,this.signature=new Tl(i.v,i.r,i.s),this.bodyResponse=n,this.tlsHandshakeHash=s,this.senderAddress=t,this.msgHash=r,this.status=a,this.totalTransferredBytes=new $l(o.request,o.response)}}Fl([rl(),Zu(),Yl("design:type",String)],Jl.prototype,"executionId",void 0),Fl([Zu(),fl(),Yl("design:type",String)],Jl.prototype,"senderAddress",void 0),Fl([Zu(),cl("sha256"),Yl("design:type",String)],Jl.prototype,"msgHash",void 0),Fl([Ku(),Yl("design:type",Tl)],Jl.prototype,"signature",void 0),Fl([Zu(),bl(),Yl("design:type",String)],Jl.prototype,"tlsHandshakeHash",void 0),Fl([Zu(),bl(),Yl("design:type",String)],Jl.prototype,"status",void 0),Fl([Ku(),Yl("design:type",$l)],Jl.prototype,"totalTransferredBytes",void 0);var Zl=function(e,t,n,r){var i,s=arguments.length,a=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(a=(s<3?i(a):s>3?i(t,n,a):i(t,n))||a);return s>3&&a&&Object.defineProperty(t,n,a),a},Xl=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};class Ql{executionId;msgHash;signature;limits;econParams;workers;senderAddress;input;constructor(e,t,n,r,i,s,a,o){this.executionId=e,this.msgHash=t,this.signature=new Tl(n.v,n.r,n.s),this.limits=new Ll(r.gas,r.call,r.frame,r.memory),this.econParams=new Dl(i.reward,i.requiredSolutions,i.totalSolutions,i.executionTimeout),this.workers=new jl(s.blockNumber,s.selectionStrategy,s.setNodes),this.senderAddress=a,this.input=o}}Zl([rl(),Zu(),Xl("design:type",String)],Ql.prototype,"executionId",void 0),Zl([Zu(),cl("sha256"),Xl("design:type",String)],Ql.prototype,"msgHash",void 0),Zl([Ku(),Xl("design:type",Tl)],Ql.prototype,"signature",void 0),Zl([Ku(),Xl("design:type",Ll)],Ql.prototype,"limits",void 0),Zl([Ku(),Xl("design:type",Dl)],Ql.prototype,"econParams",void 0),Zl([Ku(),Xl("design:type",jl)],Ql.prototype,"workers",void 0),Zl([Zu(),bl(),Xl("design:type",String)],Ql.prototype,"senderAddress",void 0),Zl([Zu(),bl(),Xl("design:type",String)],Ql.prototype,"input",void 0);class ed{executionId;limits;econParams;workers;input;constructor(e,t,n,r,i){this.executionId=e,this.limits=new Ll(t.gas,t.call,t.frame,t.memory),this.econParams=new Dl(n.reward,n.requiredSolutions,n.totalSolutions,n.executionTimeout),this.workers=new jl(r.blockNumber,r.selectionStrategy,r.setNodes),this.input=i}}Zl([rl(),Zu(),Xl("design:type",String)],ed.prototype,"executionId",void 0),Zl([Ku(),Xl("design:type",Ll)],ed.prototype,"limits",void 0),Zl([Ku(),Xl("design:type",Dl)],ed.prototype,"econParams",void 0),Zl([Ku(),Xl("design:type",jl)],ed.prototype,"workers",void 0);Zl([Ku(),Xl("design:type",Gl)],class extends Vl{message;constructor(e,t,n,r,i,s){super(Hl.NODE_OUTCOME,e,t,n,r,i,s),this.message=n,this.executionId=e,this.msgHash=t,this.signature=new Tl(r.v,r.r,r.s),this.timestamp=s,this.sequencerAddress=i,this.message=n}}.prototype,"message",void 0);Zl([Ku(),Xl("design:type",Jl)],class extends Vl{message;constructor(e,t,n,r,i,s){super(Hl.API_OUTCOME,e,t,n,r,i,s),this.message=n,this.executionId=e,this.msgHash=t,this.signature=new Tl(r.v,r.r,r.s),this.timestamp=s,this.sequencerAddress=i}}.prototype,"message",void 0);class td{type;executionId;transcriptHash;status;signature;signerAddress;timestamp;constructor(e,t,n,r,i,s){this.type=Hl.EXECUTION_COMPLETED,this.executionId=e,this.transcriptHash=t,this.status=n,this.signature=new Tl(r.v,r.r,r.s),this.signerAddress=i,this.timestamp=s}}Zl([Zu(),bl(),Xl("design:type",String)],td.prototype,"type",void 0),Zl([rl(),Zu(),Xl("design:type",String)],td.prototype,"executionId",void 0),Zl([Zu(),cl("sha256"),Xl("design:type",String)],td.prototype,"transcriptHash",void 0),Zl([Zu(),yl(Au),Xl("design:type",String)],td.prototype,"status",void 0),Zl([Ku(),Xl("design:type",Tl)],td.prototype,"signature",void 0),Zl([Zu(),bl(),Xl("design:type",String)],td.prototype,"signerAddress",void 0),Zl([vl(),Zu(),Xl("design:type",Number)],td.prototype,"timestamp",void 0);class nd{type;executionId;signature;clearTextSolutions;sequencerAddress;msgHash;timestamp;constructor(e,t,n,r,i,s){this.type=Hl.SOLUTIONS_REVEALED,this.executionId=e,this.signature=new Tl(t.v,t.r,t.s),this.clearTextSolutions=n,this.sequencerAddress=r,this.msgHash=i,this.timestamp=s}}Zl([rl(),Zu(),Xl("design:type",String)],nd.prototype,"executionId",void 0),Zl([Ku(),Xl("design:type",Tl)],nd.prototype,"signature",void 0),Zl([Ku(),Xl("design:type",Array)],nd.prototype,"clearTextSolutions",void 0),Zl([Zu(),fl(),Xl("design:type",String)],nd.prototype,"sequencerAddress",void 0),Zl([Zu(),cl("sha256"),Xl("design:type",String)],nd.prototype,"msgHash",void 0),Zl([vl(),Zu(),Xl("design:type",Number)],nd.prototype,"timestamp",void 0);class rd extends Vl{executionId;msgHash;message;signature;publicKey;sequencerAddress;timestamp;constructor(e,t,n,r,i,s,a){super(Hl.TASK_CREATED,e,t,n,r,s,a),this.message=n,this.executionId=e,this.msgHash=t,this.signature=new Tl(r.v,r.r,r.s),this.timestamp=a,this.sequencerAddress=s,this.publicKey=i,this.message=n}}Zl([Zu(),rl(),Xl("design:type",String)],rd.prototype,"executionId",void 0),Zl([Zu(),cl("sha256"),Xl("design:type",String)],rd.prototype,"msgHash",void 0),Zl([Ku(),Xl("design:type",Kl)],rd.prototype,"message",void 0),Zl([Ku(),Xl("design:type",Tl)],rd.prototype,"signature",void 0),Zl([Zu(),bl(),Xl("design:type",String)],rd.prototype,"publicKey",void 0),Zl([Zu(),fl(),Xl("design:type",String)],rd.prototype,"sequencerAddress",void 0),Zl([vl(),Zu(),Xl("design:type",Number)],rd.prototype,"timestamp",void 0);class id extends Vl{executionId;msgHash;message;signature;publicKey;sequencerAddress;timestamp;constructor(e,t,n,r,i,s,a){super(Hl.API_TASK_CREATED,e,t,n,r,s,a),this.message=n,this.executionId=e,this.msgHash=t,this.signature=new Tl(r.v,r.r,r.s),this.timestamp=a,this.sequencerAddress=s,this.publicKey=i,this.message=n}}Zl([Zu(),rl(),Xl("design:type",String)],id.prototype,"executionId",void 0),Zl([Zu(),cl("sha256"),Xl("design:type",String)],id.prototype,"msgHash",void 0),Zl([Ku(),Xl("design:type",Wl)],id.prototype,"message",void 0),Zl([Ku(),Xl("design:type",Tl)],id.prototype,"signature",void 0),Zl([Zu(),bl(),Xl("design:type",String)],id.prototype,"publicKey",void 0),Zl([Zu(),fl(),Xl("design:type",String)],id.prototype,"sequencerAddress",void 0),Zl([vl(),Zu(),Xl("design:type",Number)],id.prototype,"timestamp",void 0);var sd=function(e,t,n,r){var i,s=arguments.length,a=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(a=(s<3?i(a):s>3?i(t,n,a):i(t,n))||a);return s>3&&a&&Object.defineProperty(t,n,a),a},ad=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};class od{executionId;msgHash;signature;senderAddress;encryptedSolution;constructor(e,t,n,r,i){this.executionId=e,this.msgHash=t,this.signature=new Tl(n.v,n.r,n.s),this.senderAddress=r,this.encryptedSolution=new Al(i.iv,i.ephemPublicKey,i.ciphertext,i.mac)}}sd([rl(),Zu(),ad("design:type",String)],od.prototype,"executionId",void 0),sd([Zu(),cl("sha256"),ad("design:type",String)],od.prototype,"msgHash",void 0),sd([Ku(),ad("design:type",Tl)],od.prototype,"signature",void 0),sd([Zu(),fl(),ad("design:type",String)],od.prototype,"senderAddress",void 0),sd([Ku(),ad("design:type",Al)],od.prototype,"encryptedSolution",void 0);var cd=function(e,t,n,r){var i,s=arguments.length,a=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(a=(s<3?i(a):s>3?i(t,n,a):i(t,n))||a);return s>3&&a&&Object.defineProperty(t,n,a),a},ud=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};cd([Zu(),bl(),ud("design:type",String)],class{taskId;constructor(e){this.taskId=e}}.prototype,"taskId",void 0);cd([Zu(),bl(),ud("design:type",String)],class{taskId;constructor(e){this.taskId=e}}.prototype,"taskId",void 0);class ld{input;checkpoint;taskId;constructor(e,t,n){this.taskId=e,this.checkpoint=t,this.input=n}}cd([Zu(),bl(),ud("design:type",String)],ld.prototype,"input",void 0),cd([Zu(),ud("design:type",Object)],ld.prototype,"checkpoint",void 0),cd([Zu(),bl(),ud("design:type",String)],ld.prototype,"taskId",void 0);class dd{input;taskId;constructor(e,t){this.taskId=e,this.input=t}}cd([Zu(),bl(),ud("design:type",String)],dd.prototype,"input",void 0),cd([Zu(),bl(),ud("design:type",String)],dd.prototype,"taskId",void 0);class pd{executionId;input;taskId;constructor(e,t,n){this.taskId=e,this.executionId=t,this.input=n}}cd([Zu(),rl(),ud("design:type",String)],pd.prototype,"executionId",void 0),cd([Zu(),bl(),ud("design:type",String)],pd.prototype,"input",void 0),cd([Zu(),bl(),ud("design:type",String)],pd.prototype,"taskId",void 0);class fd{instrumentationId;taskId;constructor(e,t){this.taskId=e,this.instrumentationId=t}}cd([Zu(),rl(),ud("design:type",String)],fd.prototype,"instrumentationId",void 0),cd([Zu(),bl(),ud("design:type",String)],fd.prototype,"taskId",void 0);cd([Zu(),bl(),ud("design:type",String)],class{taskId;constructor(e){this.taskId=e}}.prototype,"taskId",void 0);cd([Zu(),bl(),ud("design:type",String)],class{taskId;constructor(e){this.taskId=e}}.prototype,"taskId",void 0);cd([Zu(),bl(),ud("design:type",String)],class{taskId;constructor(e){this.taskId=e}}.prototype,"taskId",void 0);class hd{checkpointHash;taskId;constructor(e,t){this.taskId=e,this.checkpointHash=t}}cd([Zu(),bl(),ud("design:type",String)],hd.prototype,"checkpointHash",void 0),cd([Zu(),bl(),ud("design:type",String)],hd.prototype,"taskId",void 0);cd([Zu(),bl(),ud("design:type",String)],class{taskId;constructor(e){this.taskId=e}}.prototype,"taskId",void 0);class md{checkpointCount;taskId;constructor(e,t){this.taskId=e,this.checkpointCount=t}}cd([Zu(),hl(),ud("design:type",Number)],md.prototype,"checkpointCount",void 0),cd([Zu(),bl(),ud("design:type",String)],md.prototype,"taskId",void 0);cd([Zu(),bl(),ud("design:type",String)],class{taskId;constructor(e,t){this.taskId=t}}.prototype,"taskId",void 0);class gd{executionId;output;taskId;constructor(e,t,n){this.taskId=e,this.executionId=t,this.output=n}}cd([Zu(),rl(),ud("design:type",String)],gd.prototype,"executionId",void 0),cd([Yu(),bl(),ud("design:type",String)],gd.prototype,"output",void 0),cd([Zu(),bl(),ud("design:type",String)],gd.prototype,"taskId",void 0);class yd{executionId;taskId;constructor(e,t,n){this.taskId=t,this.executionId=n}}cd([Zu(),rl(),ud("design:type",String)],yd.prototype,"executionId",void 0),cd([Zu(),bl(),ud("design:type",String)],yd.prototype,"taskId",void 0);class bd{instrumentationId;output;taskId;instrumentedTaskId;constructor(e,t,n,r){this.taskId=e,this.instrumentationId=t,this.output=r,this.instrumentedTaskId=n}}cd([Zu(),rl(),ud("design:type",String)],bd.prototype,"instrumentationId",void 0),cd([Zu(),bl(),ud("design:type",String)],bd.prototype,"output",void 0),cd([Zu(),bl(),ud("design:type",String)],bd.prototype,"taskId",void 0),cd([Zu(),bl(),ud("design:type",String)],bd.prototype,"instrumentedTaskId",void 0);class vd{instrumentationId;taskId;constructor(e,t,n){this.taskId=t,this.instrumentationId=n}}cd([Zu(),rl(),ud("design:type",String)],vd.prototype,"instrumentationId",void 0),cd([Zu(),bl(),ud("design:type",String)],vd.prototype,"taskId",void 0);var wd,xd,_d,Ed={},Sd="6.6.1",kd={},Ad={exports:{}},Td=Ad.exports;function Md(){return wd||(wd=1,function(e,t){function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function r(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function i(e,t,n){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var s;"object"==typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:require("buffer").Buffer}catch(e){}function a(e,t){var n=e.charCodeAt(t);return n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function o(e,t,n){var r=a(e,n);return n-1>=t&&(r|=a(e,n-1)<<4),r}function c(e,t,n,r){for(var i=0,s=Math.min(e.length,n),a=t;a<s;a++){var o=e.charCodeAt(a)-48;i*=r,i+=o>=49?o-49+10:o>=17?o-17+10:o}return i}i.isBN=function(e){return e instanceof i||null!==e&&"object"==typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,r):(this._parseBase(e,t,i),"le"===r&&this._initArray(this.toArray(),t,r)))},i.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},i.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var s,a,o=0;if("be"===r)for(i=e.length-1,s=0;i>=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[s]|=a<<o&67108863,this.words[s+1]=a>>>26-o&67108863,(o+=24)>=26&&(o-=26,s++);else if("le"===r)for(i=0,s=0;i<e.length;i+=3)a=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[s]|=a<<o&67108863,this.words[s+1]=a>>>26-o&67108863,(o+=24)>=26&&(o-=26,s++);return this.strip()},i.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i,s=0,a=0;if("be"===n)for(r=e.length-1;r>=t;r-=2)i=o(e,t,r)<<s,this.words[a]|=67108863&i,s>=18?(s-=18,a+=1,this.words[a]|=i>>>26):s+=8;else for(r=(e.length-t)%2==0?t+1:t;r<e.length;r+=2)i=o(e,t,r)<<s,this.words[a]|=67108863&i,s>=18?(s-=18,a+=1,this.words[a]|=i>>>26):s+=8;this.strip()},i.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var s=e.length-n,a=s%r,o=Math.min(s,s-a)+n,u=0,l=n;l<o;l+=r)u=c(e,l,l+r,t),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==a){var d=1;for(u=c(e,l,e.length,t),l=0;l<a;l++)d*=t;this.imuln(d),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},i.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},i.prototype.clone=function(){var e=new i(null);return this.copy(e),e},i.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},i.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],l=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function p(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=0|e.words[0],s=0|t.words[0],a=i*s,o=67108863&a,c=a/67108864|0;n.words[0]=o;for(var u=1;u<r;u++){for(var l=c>>>26,d=67108863&c,p=Math.min(u,t.length-1),f=Math.max(0,u-e.length+1);f<=p;f++){var h=u-f|0;l+=(a=(i=0|e.words[h])*(s=0|t.words[f])+d)/67108864|0,d=67108863&a}n.words[u]=0|d,c=0|l}return 0!==c?n.words[u]=0|c:n.length--,n.strip()}i.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,s=0,a=0;a<this.length;a++){var o=this.words[a],c=(16777215&(o<<i|s)).toString(16);s=o>>>24-i&16777215,(i+=2)>=26&&(i-=26,a--),r=0!==s||a!==this.length-1?u[6-c.length]+c+r:c+r}for(0!==s&&(r=s.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var p=l[e],f=d[e];r="";var h=this.clone();for(h.negative=0;!h.isZero();){var m=h.modn(f).toString(e);r=(h=h.idivn(f)).isZero()?m+r:u[p-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(e,t){return n(void 0!==s),this.toArrayLike(s,e,t)},i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),s=r||Math.max(1,i);n(i<=s,"byte array longer than desired length"),n(s>0,"Requested array length <= 0"),this.strip();var a,o,c="le"===t,u=new e(s),l=this.clone();if(c){for(o=0;!l.isZero();o++)a=l.andln(255),l.iushrn(8),u[o]=a;for(;o<s;o++)u[o]=0}else{for(o=0;o<s-i;o++)u[o]=0;for(o=0;!l.isZero();o++)a=l.andln(255),l.iushrn(8),u[s-o-1]=a}return u},Math.clz32?i.prototype._countBits=function(e){return 32-Math.clz32(e)}:i.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 8191&t||(n+=13,t>>>=13),127&t||(n+=7,t>>>=7),15&t||(n+=4,t>>>=4),3&t||(n+=2,t>>>=2),1&t||n++,n},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,26!==n)break}return e},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},i.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},i.prototype.isNeg=function(){return 0!==this.negative},i.prototype.neg=function(){return this.clone().ineg()},i.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},i.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},i.prototype.ior=function(e){return n(!(this.negative|e.negative)),this.iuor(e)},i.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this.strip()},i.prototype.iand=function(e){return n(!(this.negative|e.negative)),this.iuand(e)},i.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;r<n.length;r++)this.words[r]=t.words[r]^n.words[r];if(this!==t)for(;r<t.length;r++)this.words[r]=t.words[r];return this.length=t.length,this.strip()},i.prototype.ixor=function(e){return n(!(this.negative|e.negative)),this.iuxor(e)},i.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this.strip()},i.prototype.iadd=function(e){var t,n,r;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(n=this,r=e):(n=e,r=this);for(var i=0,s=0;s<r.length;s++)t=(0|n.words[s])+(0|r.words[s])+i,this.words[s]=67108863&t,i=t>>>26;for(;0!==i&&s<n.length;s++)t=(0|n.words[s])+i,this.words[s]=67108863&t,i=t>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;s<n.length;s++)this.words[s]=n.words[s];return this},i.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=e):(n=e,r=this);for(var s=0,a=0;a<r.length;a++)s=(t=(0|n.words[a])-(0|r.words[a])+s)>>26,this.words[a]=67108863&t;for(;0!==s&&a<n.length;a++)s=(t=(0|n.words[a])+s)>>26,this.words[a]=67108863&t;if(0===s&&a<n.length&&n!==this)for(;a<n.length;a++)this.words[a]=n.words[a];return this.length=Math.max(this.length,a),n!==this&&(this.negative=1),this.strip()},i.prototype.sub=function(e){return this.clone().isub(e)};var f=function(e,t,n){var r,i,s,a=e.words,o=t.words,c=n.words,u=0,l=0|a[0],d=8191&l,p=l>>>13,f=0|a[1],h=8191&f,m=f>>>13,g=0|a[2],y=8191&g,b=g>>>13,v=0|a[3],w=8191&v,x=v>>>13,_=0|a[4],E=8191&_,S=_>>>13,k=0|a[5],A=8191&k,T=k>>>13,M=0|a[6],R=8191&M,O=M>>>13,I=0|a[7],N=8191&I,P=I>>>13,C=0|a[8],j=8191&C,L=C>>>13,D=0|a[9],$=8191&D,U=D>>>13,B=0|o[0],z=8191&B,q=B>>>13,H=0|o[1],F=8191&H,Y=H>>>13,V=0|o[2],K=8191&V,W=V>>>13,G=0|o[3],J=8191&G,Z=G>>>13,X=0|o[4],Q=8191&X,ee=X>>>13,te=0|o[5],ne=8191&te,re=te>>>13,ie=0|o[6],se=8191&ie,ae=ie>>>13,oe=0|o[7],ce=8191&oe,ue=oe>>>13,le=0|o[8],de=8191&le,pe=le>>>13,fe=0|o[9],he=8191&fe,me=fe>>>13;n.negative=e.negative^t.negative,n.length=19;var ge=(u+(r=Math.imul(d,z))|0)+((8191&(i=(i=Math.imul(d,q))+Math.imul(p,z)|0))<<13)|0;u=((s=Math.imul(p,q))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(h,z),i=(i=Math.imul(h,q))+Math.imul(m,z)|0,s=Math.imul(m,q);var ye=(u+(r=r+Math.imul(d,F)|0)|0)+((8191&(i=(i=i+Math.imul(d,Y)|0)+Math.imul(p,F)|0))<<13)|0;u=((s=s+Math.imul(p,Y)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(y,z),i=(i=Math.imul(y,q))+Math.imul(b,z)|0,s=Math.imul(b,q),r=r+Math.imul(h,F)|0,i=(i=i+Math.imul(h,Y)|0)+Math.imul(m,F)|0,s=s+Math.imul(m,Y)|0;var be=(u+(r=r+Math.imul(d,K)|0)|0)+((8191&(i=(i=i+Math.imul(d,W)|0)+Math.imul(p,K)|0))<<13)|0;u=((s=s+Math.imul(p,W)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(w,z),i=(i=Math.imul(w,q))+Math.imul(x,z)|0,s=Math.imul(x,q),r=r+Math.imul(y,F)|0,i=(i=i+Math.imul(y,Y)|0)+Math.imul(b,F)|0,s=s+Math.imul(b,Y)|0,r=r+Math.imul(h,K)|0,i=(i=i+Math.imul(h,W)|0)+Math.imul(m,K)|0,s=s+Math.imul(m,W)|0;var ve=(u+(r=r+Math.imul(d,J)|0)|0)+((8191&(i=(i=i+Math.imul(d,Z)|0)+Math.imul(p,J)|0))<<13)|0;u=((s=s+Math.imul(p,Z)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(E,z),i=(i=Math.imul(E,q))+Math.imul(S,z)|0,s=Math.imul(S,q),r=r+Math.imul(w,F)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(x,F)|0,s=s+Math.imul(x,Y)|0,r=r+Math.imul(y,K)|0,i=(i=i+Math.imul(y,W)|0)+Math.imul(b,K)|0,s=s+Math.imul(b,W)|0,r=r+Math.imul(h,J)|0,i=(i=i+Math.imul(h,Z)|0)+Math.imul(m,J)|0,s=s+Math.imul(m,Z)|0;var we=(u+(r=r+Math.imul(d,Q)|0)|0)+((8191&(i=(i=i+Math.imul(d,ee)|0)+Math.imul(p,Q)|0))<<13)|0;u=((s=s+Math.imul(p,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(A,z),i=(i=Math.imul(A,q))+Math.imul(T,z)|0,s=Math.imul(T,q),r=r+Math.imul(E,F)|0,i=(i=i+Math.imul(E,Y)|0)+Math.imul(S,F)|0,s=s+Math.imul(S,Y)|0,r=r+Math.imul(w,K)|0,i=(i=i+Math.imul(w,W)|0)+Math.imul(x,K)|0,s=s+Math.imul(x,W)|0,r=r+Math.imul(y,J)|0,i=(i=i+Math.imul(y,Z)|0)+Math.imul(b,J)|0,s=s+Math.imul(b,Z)|0,r=r+Math.imul(h,Q)|0,i=(i=i+Math.imul(h,ee)|0)+Math.imul(m,Q)|0,s=s+Math.imul(m,ee)|0;var xe=(u+(r=r+Math.imul(d,ne)|0)|0)+((8191&(i=(i=i+Math.imul(d,re)|0)+Math.imul(p,ne)|0))<<13)|0;u=((s=s+Math.imul(p,re)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(R,z),i=(i=Math.imul(R,q))+Math.imul(O,z)|0,s=Math.imul(O,q),r=r+Math.imul(A,F)|0,i=(i=i+Math.imul(A,Y)|0)+Math.imul(T,F)|0,s=s+Math.imul(T,Y)|0,r=r+Math.imul(E,K)|0,i=(i=i+Math.imul(E,W)|0)+Math.imul(S,K)|0,s=s+Math.imul(S,W)|0,r=r+Math.imul(w,J)|0,i=(i=i+Math.imul(w,Z)|0)+Math.imul(x,J)|0,s=s+Math.imul(x,Z)|0,r=r+Math.imul(y,Q)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(b,Q)|0,s=s+Math.imul(b,ee)|0,r=r+Math.imul(h,ne)|0,i=(i=i+Math.imul(h,re)|0)+Math.imul(m,ne)|0,s=s+Math.imul(m,re)|0;var _e=(u+(r=r+Math.imul(d,se)|0)|0)+((8191&(i=(i=i+Math.imul(d,ae)|0)+Math.imul(p,se)|0))<<13)|0;u=((s=s+Math.imul(p,ae)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(N,z),i=(i=Math.imul(N,q))+Math.imul(P,z)|0,s=Math.imul(P,q),r=r+Math.imul(R,F)|0,i=(i=i+Math.imul(R,Y)|0)+Math.imul(O,F)|0,s=s+Math.imul(O,Y)|0,r=r+Math.imul(A,K)|0,i=(i=i+Math.imul(A,W)|0)+Math.imul(T,K)|0,s=s+Math.imul(T,W)|0,r=r+Math.imul(E,J)|0,i=(i=i+Math.imul(E,Z)|0)+Math.imul(S,J)|0,s=s+Math.imul(S,Z)|0,r=r+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(x,Q)|0,s=s+Math.imul(x,ee)|0,r=r+Math.imul(y,ne)|0,i=(i=i+Math.imul(y,re)|0)+Math.imul(b,ne)|0,s=s+Math.imul(b,re)|0,r=r+Math.imul(h,se)|0,i=(i=i+Math.imul(h,ae)|0)+Math.imul(m,se)|0,s=s+Math.imul(m,ae)|0;var Ee=(u+(r=r+Math.imul(d,ce)|0)|0)+((8191&(i=(i=i+Math.imul(d,ue)|0)+Math.imul(p,ce)|0))<<13)|0;u=((s=s+Math.imul(p,ue)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(j,z),i=(i=Math.imul(j,q))+Math.imul(L,z)|0,s=Math.imul(L,q),r=r+Math.imul(N,F)|0,i=(i=i+Math.imul(N,Y)|0)+Math.imul(P,F)|0,s=s+Math.imul(P,Y)|0,r=r+Math.imul(R,K)|0,i=(i=i+Math.imul(R,W)|0)+Math.imul(O,K)|0,s=s+Math.imul(O,W)|0,r=r+Math.imul(A,J)|0,i=(i=i+Math.imul(A,Z)|0)+Math.imul(T,J)|0,s=s+Math.imul(T,Z)|0,r=r+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(S,Q)|0,s=s+Math.imul(S,ee)|0,r=r+Math.imul(w,ne)|0,i=(i=i+Math.imul(w,re)|0)+Math.imul(x,ne)|0,s=s+Math.imul(x,re)|0,r=r+Math.imul(y,se)|0,i=(i=i+Math.imul(y,ae)|0)+Math.imul(b,se)|0,s=s+Math.imul(b,ae)|0,r=r+Math.imul(h,ce)|0,i=(i=i+Math.imul(h,ue)|0)+Math.imul(m,ce)|0,s=s+Math.imul(m,ue)|0;var Se=(u+(r=r+Math.imul(d,de)|0)|0)+((8191&(i=(i=i+Math.imul(d,pe)|0)+Math.imul(p,de)|0))<<13)|0;u=((s=s+Math.imul(p,pe)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul($,z),i=(i=Math.imul($,q))+Math.imul(U,z)|0,s=Math.imul(U,q),r=r+Math.imul(j,F)|0,i=(i=i+Math.imul(j,Y)|0)+Math.imul(L,F)|0,s=s+Math.imul(L,Y)|0,r=r+Math.imul(N,K)|0,i=(i=i+Math.imul(N,W)|0)+Math.imul(P,K)|0,s=s+Math.imul(P,W)|0,r=r+Math.imul(R,J)|0,i=(i=i+Math.imul(R,Z)|0)+Math.imul(O,J)|0,s=s+Math.imul(O,Z)|0,r=r+Math.imul(A,Q)|0,i=(i=i+Math.imul(A,ee)|0)+Math.imul(T,Q)|0,s=s+Math.imul(T,ee)|0,r=r+Math.imul(E,ne)|0,i=(i=i+Math.imul(E,re)|0)+Math.imul(S,ne)|0,s=s+Math.imul(S,re)|0,r=r+Math.imul(w,se)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(x,se)|0,s=s+Math.imul(x,ae)|0,r=r+Math.imul(y,ce)|0,i=(i=i+Math.imul(y,ue)|0)+Math.imul(b,ce)|0,s=s+Math.imul(b,ue)|0,r=r+Math.imul(h,de)|0,i=(i=i+Math.imul(h,pe)|0)+Math.imul(m,de)|0,s=s+Math.imul(m,pe)|0;var ke=(u+(r=r+Math.imul(d,he)|0)|0)+((8191&(i=(i=i+Math.imul(d,me)|0)+Math.imul(p,he)|0))<<13)|0;u=((s=s+Math.imul(p,me)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul($,F),i=(i=Math.imul($,Y))+Math.imul(U,F)|0,s=Math.imul(U,Y),r=r+Math.imul(j,K)|0,i=(i=i+Math.imul(j,W)|0)+Math.imul(L,K)|0,s=s+Math.imul(L,W)|0,r=r+Math.imul(N,J)|0,i=(i=i+Math.imul(N,Z)|0)+Math.imul(P,J)|0,s=s+Math.imul(P,Z)|0,r=r+Math.imul(R,Q)|0,i=(i=i+Math.imul(R,ee)|0)+Math.imul(O,Q)|0,s=s+Math.imul(O,ee)|0,r=r+Math.imul(A,ne)|0,i=(i=i+Math.imul(A,re)|0)+Math.imul(T,ne)|0,s=s+Math.imul(T,re)|0,r=r+Math.imul(E,se)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(S,se)|0,s=s+Math.imul(S,ae)|0,r=r+Math.imul(w,ce)|0,i=(i=i+Math.imul(w,ue)|0)+Math.imul(x,ce)|0,s=s+Math.imul(x,ue)|0,r=r+Math.imul(y,de)|0,i=(i=i+Math.imul(y,pe)|0)+Math.imul(b,de)|0,s=s+Math.imul(b,pe)|0;var Ae=(u+(r=r+Math.imul(h,he)|0)|0)+((8191&(i=(i=i+Math.imul(h,me)|0)+Math.imul(m,he)|0))<<13)|0;u=((s=s+Math.imul(m,me)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul($,K),i=(i=Math.imul($,W))+Math.imul(U,K)|0,s=Math.imul(U,W),r=r+Math.imul(j,J)|0,i=(i=i+Math.imul(j,Z)|0)+Math.imul(L,J)|0,s=s+Math.imul(L,Z)|0,r=r+Math.imul(N,Q)|0,i=(i=i+Math.imul(N,ee)|0)+Math.imul(P,Q)|0,s=s+Math.imul(P,ee)|0,r=r+Math.imul(R,ne)|0,i=(i=i+Math.imul(R,re)|0)+Math.imul(O,ne)|0,s=s+Math.imul(O,re)|0,r=r+Math.imul(A,se)|0,i=(i=i+Math.imul(A,ae)|0)+Math.imul(T,se)|0,s=s+Math.imul(T,ae)|0,r=r+Math.imul(E,ce)|0,i=(i=i+Math.imul(E,ue)|0)+Math.imul(S,ce)|0,s=s+Math.imul(S,ue)|0,r=r+Math.imul(w,de)|0,i=(i=i+Math.imul(w,pe)|0)+Math.imul(x,de)|0,s=s+Math.imul(x,pe)|0;var Te=(u+(r=r+Math.imul(y,he)|0)|0)+((8191&(i=(i=i+Math.imul(y,me)|0)+Math.imul(b,he)|0))<<13)|0;u=((s=s+Math.imul(b,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul($,J),i=(i=Math.imul($,Z))+Math.imul(U,J)|0,s=Math.imul(U,Z),r=r+Math.imul(j,Q)|0,i=(i=i+Math.imul(j,ee)|0)+Math.imul(L,Q)|0,s=s+Math.imul(L,ee)|0,r=r+Math.imul(N,ne)|0,i=(i=i+Math.imul(N,re)|0)+Math.imul(P,ne)|0,s=s+Math.imul(P,re)|0,r=r+Math.imul(R,se)|0,i=(i=i+Math.imul(R,ae)|0)+Math.imul(O,se)|0,s=s+Math.imul(O,ae)|0,r=r+Math.imul(A,ce)|0,i=(i=i+Math.imul(A,ue)|0)+Math.imul(T,ce)|0,s=s+Math.imul(T,ue)|0,r=r+Math.imul(E,de)|0,i=(i=i+Math.imul(E,pe)|0)+Math.imul(S,de)|0,s=s+Math.imul(S,pe)|0;var Me=(u+(r=r+Math.imul(w,he)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(x,he)|0))<<13)|0;u=((s=s+Math.imul(x,me)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul($,Q),i=(i=Math.imul($,ee))+Math.imul(U,Q)|0,s=Math.imul(U,ee),r=r+Math.imul(j,ne)|0,i=(i=i+Math.imul(j,re)|0)+Math.imul(L,ne)|0,s=s+Math.imul(L,re)|0,r=r+Math.imul(N,se)|0,i=(i=i+Math.imul(N,ae)|0)+Math.imul(P,se)|0,s=s+Math.imul(P,ae)|0,r=r+Math.imul(R,ce)|0,i=(i=i+Math.imul(R,ue)|0)+Math.imul(O,ce)|0,s=s+Math.imul(O,ue)|0,r=r+Math.imul(A,de)|0,i=(i=i+Math.imul(A,pe)|0)+Math.imul(T,de)|0,s=s+Math.imul(T,pe)|0;var Re=(u+(r=r+Math.imul(E,he)|0)|0)+((8191&(i=(i=i+Math.imul(E,me)|0)+Math.imul(S,he)|0))<<13)|0;u=((s=s+Math.imul(S,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,r=Math.imul($,ne),i=(i=Math.imul($,re))+Math.imul(U,ne)|0,s=Math.imul(U,re),r=r+Math.imul(j,se)|0,i=(i=i+Math.imul(j,ae)|0)+Math.imul(L,se)|0,s=s+Math.imul(L,ae)|0,r=r+Math.imul(N,ce)|0,i=(i=i+Math.imul(N,ue)|0)+Math.imul(P,ce)|0,s=s+Math.imul(P,ue)|0,r=r+Math.imul(R,de)|0,i=(i=i+Math.imul(R,pe)|0)+Math.imul(O,de)|0,s=s+Math.imul(O,pe)|0;var Oe=(u+(r=r+Math.imul(A,he)|0)|0)+((8191&(i=(i=i+Math.imul(A,me)|0)+Math.imul(T,he)|0))<<13)|0;u=((s=s+Math.imul(T,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul($,se),i=(i=Math.imul($,ae))+Math.imul(U,se)|0,s=Math.imul(U,ae),r=r+Math.imul(j,ce)|0,i=(i=i+Math.imul(j,ue)|0)+Math.imul(L,ce)|0,s=s+Math.imul(L,ue)|0,r=r+Math.imul(N,de)|0,i=(i=i+Math.imul(N,pe)|0)+Math.imul(P,de)|0,s=s+Math.imul(P,pe)|0;var Ie=(u+(r=r+Math.imul(R,he)|0)|0)+((8191&(i=(i=i+Math.imul(R,me)|0)+Math.imul(O,he)|0))<<13)|0;u=((s=s+Math.imul(O,me)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul($,ce),i=(i=Math.imul($,ue))+Math.imul(U,ce)|0,s=Math.imul(U,ue),r=r+Math.imul(j,de)|0,i=(i=i+Math.imul(j,pe)|0)+Math.imul(L,de)|0,s=s+Math.imul(L,pe)|0;var Ne=(u+(r=r+Math.imul(N,he)|0)|0)+((8191&(i=(i=i+Math.imul(N,me)|0)+Math.imul(P,he)|0))<<13)|0;u=((s=s+Math.imul(P,me)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,r=Math.imul($,de),i=(i=Math.imul($,pe))+Math.imul(U,de)|0,s=Math.imul(U,pe);var Pe=(u+(r=r+Math.imul(j,he)|0)|0)+((8191&(i=(i=i+Math.imul(j,me)|0)+Math.imul(L,he)|0))<<13)|0;u=((s=s+Math.imul(L,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863;var Ce=(u+(r=Math.imul($,he))|0)+((8191&(i=(i=Math.imul($,me))+Math.imul(U,he)|0))<<13)|0;return u=((s=Math.imul(U,me))+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,c[0]=ge,c[1]=ye,c[2]=be,c[3]=ve,c[4]=we,c[5]=xe,c[6]=_e,c[7]=Ee,c[8]=Se,c[9]=ke,c[10]=Ae,c[11]=Te,c[12]=Me,c[13]=Re,c[14]=Oe,c[15]=Ie,c[16]=Ne,c[17]=Pe,c[18]=Ce,0!==u&&(c[19]=u,n.length++),n};function h(e,t,n){return(new m).mulp(e,t,n)}function m(e,t){this.x=e,this.y=t}Math.imul||(f=p),i.prototype.mulTo=function(e,t){var n,r=this.length+e.length;return n=10===this.length&&10===e.length?f(this,e,t):r<63?p(this,e,t):r<1024?function(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,s=0;s<n.length-1;s++){var a=i;i=0;for(var o=67108863&r,c=Math.min(s,t.length-1),u=Math.max(0,s-e.length+1);u<=c;u++){var l=s-u,d=(0|e.words[l])*(0|t.words[u]),p=67108863&d;o=67108863&(p=p+o|0),i+=(a=(a=a+(d/67108864|0)|0)+(p>>>26)|0)>>>26,a&=67108863}n.words[s]=o,r=a,a=i}return 0!==r?n.words[s]=r:n.length--,n.strip()}(this,e,t):h(this,e,t),n},m.prototype.makeRBT=function(e){for(var t=new Array(e),n=i.prototype._countBits(e)-1,r=0;r<e;r++)t[r]=this.revBin(r,n,e);return t},m.prototype.revBin=function(e,t,n){if(0===e||e===n-1)return e;for(var r=0,i=0;i<t;i++)r|=(1&e)<<t-i-1,e>>=1;return r},m.prototype.permute=function(e,t,n,r,i,s){for(var a=0;a<s;a++)r[a]=t[e[a]],i[a]=n[e[a]]},m.prototype.transform=function(e,t,n,r,i,s){this.permute(s,e,t,n,r,i);for(var a=1;a<i;a<<=1)for(var o=a<<1,c=Math.cos(2*Math.PI/o),u=Math.sin(2*Math.PI/o),l=0;l<i;l+=o)for(var d=c,p=u,f=0;f<a;f++){var h=n[l+f],m=r[l+f],g=n[l+f+a],y=r[l+f+a],b=d*g-p*y;y=d*y+p*g,g=b,n[l+f]=h+g,r[l+f]=m+y,n[l+f+a]=h-g,r[l+f+a]=m-y,f!==o&&(b=c*d-u*p,p=c*p+u*d,d=b)}},m.prototype.guessLen13b=function(e,t){var n=1|Math.max(t,e),r=1&n,i=0;for(n=n/2|0;n;n>>>=1)i++;return 1<<i+1+r},m.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var r=0;r<n/2;r++){var i=e[r];e[r]=e[n-r-1],e[n-r-1]=i,i=t[r],t[r]=-t[n-r-1],t[n-r-1]=-i}},m.prototype.normalize13b=function(e,t){for(var n=0,r=0;r<t/2;r++){var i=8192*Math.round(e[2*r+1]/t)+Math.round(e[2*r]/t)+n;e[r]=67108863&i,n=i<67108864?0:i/67108864|0}return e},m.prototype.convert13b=function(e,t,r,i){for(var s=0,a=0;a<t;a++)s+=0|e[a],r[2*a]=8191&s,s>>>=13,r[2*a+1]=8191&s,s>>>=13;for(a=2*t;a<i;++a)r[a]=0;n(0===s),n(!(-8192&s))},m.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},m.prototype.mulp=function(e,t,n){var r=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(r),s=this.stub(r),a=new Array(r),o=new Array(r),c=new Array(r),u=new Array(r),l=new Array(r),d=new Array(r),p=n.words;p.length=r,this.convert13b(e.words,e.length,a,r),this.convert13b(t.words,t.length,u,r),this.transform(a,s,o,c,r,i),this.transform(u,s,l,d,r,i);for(var f=0;f<r;f++){var h=o[f]*l[f]-c[f]*d[f];c[f]=o[f]*d[f]+c[f]*l[f],o[f]=h}return this.conjugate(o,c,r),this.transform(o,c,p,s,r,i),this.conjugate(p,s,r),this.normalize13b(p,r),n.negative=e.negative^t.negative,n.length=e.length+t.length,n.strip()},i.prototype.mul=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},i.prototype.mulf=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),h(this,e,t)},i.prototype.imul=function(e){return this.clone().mulTo(e,this)},i.prototype.imuln=function(e){n("number"==typeof e),n(e<67108864);for(var t=0,r=0;r<this.length;r++){var i=(0|this.words[r])*e,s=(67108863&i)+(67108863&t);t>>=26,t+=i/67108864|0,t+=s>>>26,this.words[r]=67108863&s}return 0!==t&&(this.words[r]=t,this.length++),this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n<t.length;n++){var r=n/26|0,i=n%26;t[n]=(e.words[r]&1<<i)>>>i}return t}(e);if(0===t.length)return new i(1);for(var n=this,r=0;r<t.length&&0===t[r];r++,n=n.sqr());if(++r<t.length)for(var s=n.sqr();r<t.length;r++,s=s.sqr())0!==t[r]&&(n=n.mul(s));return n},i.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,s=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t<this.length;t++){var o=this.words[t]&s,c=(0|this.words[t])-o<<r;this.words[t]=c|a,a=o>>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this.strip()},i.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},i.prototype.iushrn=function(e,t,r){var i;n("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var s=e%26,a=Math.min((e-s)/26,this.length),o=67108863^67108863>>>s<<s,c=r;if(i-=a,i=Math.max(0,i),c){for(var u=0;u<a;u++)c.words[u]=this.words[u];c.length=a}if(0===a);else if(this.length>a)for(this.length-=a,u=0;u<this.length;u++)this.words[u]=this.words[u+a];else this.words[0]=0,this.length=1;var l=0;for(u=this.length-1;u>=0&&(0!==l||u>=i);u--){var d=0|this.words[u];this.words[u]=l<<26-s|d>>>s,l=d&o}return c&&0!==l&&(c.words[c.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;return!(this.length<=r||!(this.words[r]&i))},i.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this.strip()},i.prototype.maskn=function(e){return this.clone().imaskn(e)},i.prototype.iaddn=function(e){return n("number"==typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},i.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},i.prototype.addn=function(e){return this.clone().iaddn(e)},i.prototype.subn=function(e){return this.clone().isubn(e)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(e,t,r){var i,s,a=e.length+r;this._expand(a);var o=0;for(i=0;i<e.length;i++){s=(0|this.words[i+r])+o;var c=(0|e.words[i])*t;o=((s-=67108863&c)>>26)-(c/67108864|0),this.words[i+r]=67108863&s}for(;i<this.length-r;i++)o=(s=(0|this.words[i+r])+o)>>26,this.words[i+r]=67108863&s;if(0===o)return this.strip();for(n(-1===o),o=0,i=0;i<this.length;i++)o=(s=-(0|this.words[i])+o)>>26,this.words[i]=67108863&s;return this.negative=1,this.strip()},i.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),s=e,a=0|s.words[s.length-1];0!=(n=26-this._countBits(a))&&(s=s.ushln(n),r.iushln(n),a=0|s.words[s.length-1]);var o,c=r.length-s.length;if("mod"!==t){(o=new i(null)).length=c+1,o.words=new Array(o.length);for(var u=0;u<o.length;u++)o.words[u]=0}var l=r.clone()._ishlnsubmul(s,1,c);0===l.negative&&(r=l,o&&(o.words[c]=1));for(var d=c-1;d>=0;d--){var p=67108864*(0|r.words[s.length+d])+(0|r.words[s.length+d-1]);for(p=Math.min(p/a|0,67108863),r._ishlnsubmul(s,p,d);0!==r.negative;)p--,r.negative=0,r._ishlnsubmul(s,1,d),r.isZero()||(r.negative^=1);o&&(o.words[d]=p)}return o&&o.strip(),r.strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:o||null,mod:r}},i.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,t),"mod"!==t&&(s=o.div.neg()),"div"!==t&&(a=o.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:s,mod:a}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),t),"mod"!==t&&(s=o.div.neg()),{div:s,mod:o.mod}):this.negative&e.negative?(o=this.neg().divmod(e.neg(),t),"div"!==t&&(a=o.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:o.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modn(e.words[0]))}:this._wordDiv(e,t);var s,a,o},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),s=n.cmp(r);return s<0||1===i&&0===s?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},i.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var s=new i(1),a=new i(0),o=new i(0),c=new i(1),u=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++u;for(var l=r.clone(),d=t.clone();!t.isZero();){for(var p=0,f=1;!(t.words[0]&f)&&p<26;++p,f<<=1);if(p>0)for(t.iushrn(p);p-- >0;)(s.isOdd()||a.isOdd())&&(s.iadd(l),a.isub(d)),s.iushrn(1),a.iushrn(1);for(var h=0,m=1;!(r.words[0]&m)&&h<26;++h,m<<=1);if(h>0)for(r.iushrn(h);h-- >0;)(o.isOdd()||c.isOdd())&&(o.iadd(l),c.isub(d)),o.iushrn(1),c.iushrn(1);t.cmp(r)>=0?(t.isub(r),s.isub(o),a.isub(c)):(r.isub(t),o.isub(s),c.isub(a))}return{a:o,b:c,gcd:r.iushln(u)}},i.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var s,a=new i(1),o=new i(0),c=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,l=1;!(t.words[0]&l)&&u<26;++u,l<<=1);if(u>0)for(t.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(c),a.iushrn(1);for(var d=0,p=1;!(r.words[0]&p)&&d<26;++d,p<<=1);if(d>0)for(r.iushrn(d);d-- >0;)o.isOdd()&&o.iadd(c),o.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(o)):(r.isub(t),o.isub(a))}return(s=0===t.cmpn(1)?a:o).cmpn(0)<0&&s.iadd(e),s},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var s=t;t=n,n=s}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return!(1&this.words[0])},i.prototype.isOdd=function(){return!(1&~this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var s=i,a=r;0!==s&&a<this.length;a++){var o=0|this.words[a];s=(o+=s)>>>26,o&=67108863,this.words[a]=o}return 0!==s&&(this.words[a]=s,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},i.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},i.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|e.words[n];if(r!==i){r<i?t=-1:r>i&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new _(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var g={k256:null,p224:null,p192:null,p25519:null};function y(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function v(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function x(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(e){if("string"==typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function E(e){_.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},y.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)},r(b,y),b.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),i=0;i<r;i++)t.words[i]=e.words[i];if(t.length=r,e.length<=9)return e.words[0]=0,void(e.length=1);var s=e.words[9];for(t.words[t.length++]=s&n,i=10;i<e.length;i++){var a=0|e.words[i];e.words[i-10]=(a&n)<<4|s>>>22,s=a}s>>>=22,e.words[i-10]=s,0===s&&e.length>10?e.length-=10:e.length-=9},b.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var r=0|e.words[n];t+=977*r,e.words[n]=67108863&t,t=64*r+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},r(v,y),r(w,y),r(x,y),x.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var r=19*(0|e.words[n])+t,i=67108863&r;r>>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(g[e])return g[e];var t;if("k256"===e)t=new b;else if("p224"===e)t=new v;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new x}return g[e]=t,t},_.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},_.prototype._verify2=function(e,t){n(!(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},_.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},_.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},_.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},_.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},_.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},_.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},_.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},_.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},_.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},_.prototype.isqr=function(e){return this.imul(e,e.clone())},_.prototype.sqr=function(e){return this.mul(e,e)},_.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new i(1)).iushrn(2);return this.pow(e,r)}for(var s=this.m.subn(1),a=0;!s.isZero()&&0===s.andln(1);)a++,s.iushrn(1);n(!s.isZero());var o=new i(1).toRed(this),c=o.redNeg(),u=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new i(2*l*l).toRed(this);0!==this.pow(l,u).cmp(c);)l.redIAdd(c);for(var d=this.pow(l,s),p=this.pow(e,s.addn(1).iushrn(1)),f=this.pow(e,s),h=a;0!==f.cmp(o);){for(var m=f,g=0;0!==m.cmp(o);g++)m=m.redSqr();n(g<h);var y=this.pow(d,new i(1).iushln(h-g-1));p=p.redMul(y),d=y.redSqr(),f=f.redMul(d),h=g}return p},_.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},_.prototype.pow=function(e,t){if(t.isZero())return new i(1).toRed(this);if(0===t.cmpn(1))return e.clone();var n=new Array(16);n[0]=new i(1).toRed(this),n[1]=e;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],e);var s=n[0],a=0,o=0,c=t.bitLength()%26;for(0===c&&(c=26),r=t.length-1;r>=0;r--){for(var u=t.words[r],l=c-1;l>=0;l--){var d=u>>l&1;s!==n[0]&&(s=this.sqr(s)),0!==d||0!==a?(a<<=1,a|=d,(4==++o||0===r&&0===l)&&(s=this.mul(s,n[a]),o=0,a=0)):o=0}c=26}return s},_.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},_.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new E(e)},r(E,_),E.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},E.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},E.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},E.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=n.isub(r).iushrn(this.shift),a=s;return s.cmp(this.m)>=0?a=s.isub(this.m):s.cmpn(0)<0&&(a=s.iadd(this.m)),a._forceRed(this)},E.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(Ad,Td)),Ad.exports}function Rd(){if(_d)return xd;function e(e,t){if(!e)throw new Error(t||"Assertion failed")}return _d=1,xd=e,e.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)},xd}var Od,Id,Nd={};function Pd(){return Od||(Od=1,function(){var e=Nd;function t(e){return 1===e.length?"0"+e:e}function n(e){for(var n="",r=0;r<e.length;r++)n+=t(e[r].toString(16));return n}e.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"!=typeof e){for(var r=0;r<e.length;r++)n[r]=0|e[r];return n}if("hex"===t){(e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e);for(r=0;r<e.length;r+=2)n.push(parseInt(e[r]+e[r+1],16))}else for(r=0;r<e.length;r++){var i=e.charCodeAt(r),s=i>>8,a=255&i;s?n.push(s,a):n.push(a)}return n},e.zero2=t,e.toHex=n,e.encode=function(e,t){return"hex"===t?n(e):e}}()),Nd}function Cd(){return Id||(Id=1,function(){var e=kd,t=Md(),n=Rd(),r=Pd();e.assert=n,e.toArray=r.toArray,e.zero2=r.zero2,e.toHex=r.toHex,e.encode=r.encode,e.getNAF=function(e,t,n){var r,i=new Array(Math.max(e.bitLength(),n)+1);for(r=0;r<i.length;r+=1)i[r]=0;var s=1<<t+1,a=e.clone();for(r=0;r<i.length;r++){var o,c=a.andln(s-1);a.isOdd()?(o=c>(s>>1)-1?(s>>1)-c:c,a.isubn(o)):o=0,i[r]=o,a.iushrn(1)}return i},e.getJSF=function(e,t){var n=[[],[]];e=e.clone(),t=t.clone();for(var r,i=0,s=0;e.cmpn(-i)>0||t.cmpn(-s)>0;){var a,o,c=e.andln(3)+i&3,u=t.andln(3)+s&3;3===c&&(c=-1),3===u&&(u=-1),a=1&c?3!==(r=e.andln(7)+i&7)&&5!==r||2!==u?c:-c:0,n[0].push(a),o=1&u?3!==(r=t.andln(7)+s&7)&&5!==r||2!==c?u:-u:0,n[1].push(o),2*i===a+1&&(i=1-i),2*s===o+1&&(s=1-s),e.iushrn(1),t.iushrn(1)}return n},e.cachedProperty=function(e,t,n){var r="_"+t;e.prototype[t]=function(){return void 0!==this[r]?this[r]:this[r]=n.call(this)}},e.parseBytes=function(t){return"string"==typeof t?e.toArray(t,"hex"):t},e.intFromLE=function(e){return new t(e,"hex","le")}}()),kd}var jd,Ld={exports:{}};function Dd(){if(jd)return Ld.exports;var e;function t(e){this.rand=e}if(jd=1,Ld.exports=function(n){return e||(e=new t(null)),e.generate(n)},Ld.exports.Rand=t,t.prototype.generate=function(e){return this._rand(e)},t.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),n=0;n<t.length;n++)t[n]=this.rand.getByte();return t},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?t.prototype._rand=function(e){var t=new Uint8Array(e);return self.crypto.getRandomValues(t),t}:self.msCrypto&&self.msCrypto.getRandomValues?t.prototype._rand=function(e){var t=new Uint8Array(e);return self.msCrypto.getRandomValues(t),t}:"object"==typeof window&&(t.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var n=require("crypto");if("function"!=typeof n.randomBytes)throw new Error("Not supported");t.prototype._rand=function(e){return n.randomBytes(e)}}catch(e){}return Ld.exports}var $d,Ud,Bd,zd,qd,Hd,Fd,Yd,Vd,Kd={};function Wd(){if(Ud)return $d;Ud=1;var e=Md(),t=Cd(),n=t.getNAF,r=t.getJSF,i=t.assert;function s(t,n){this.type=t,this.p=new e(n.p,16),this.red=n.prime?e.red(n.prime):e.mont(this.p),this.zero=new e(0).toRed(this.red),this.one=new e(1).toRed(this.red),this.two=new e(2).toRed(this.red),this.n=n.n&&new e(n.n,16),this.g=n.g&&this.pointFromJSON(n.g,n.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function a(e,t){this.curve=e,this.type=t,this.precomputed=null}return $d=s,s.prototype.point=function(){throw new Error("Not implemented")},s.prototype.validate=function(){throw new Error("Not implemented")},s.prototype._fixedNafMul=function(e,t){i(e.precomputed);var r=e._getDoubles(),s=n(t,1,this._bitLength),a=(1<<r.step+1)-(r.step%2==0?2:1);a/=3;var o,c,u=[];for(o=0;o<s.length;o+=r.step){c=0;for(var l=o+r.step-1;l>=o;l--)c=(c<<1)+s[l];u.push(c)}for(var d=this.jpoint(null,null,null),p=this.jpoint(null,null,null),f=a;f>0;f--){for(o=0;o<u.length;o++)(c=u[o])===f?p=p.mixedAdd(r.points[o]):c===-f&&(p=p.mixedAdd(r.points[o].neg()));d=d.add(p)}return d.toP()},s.prototype._wnafMul=function(e,t){var r=4,s=e._getNAFPoints(r);r=s.wnd;for(var a=s.points,o=n(t,r,this._bitLength),c=this.jpoint(null,null,null),u=o.length-1;u>=0;u--){for(var l=0;u>=0&&0===o[u];u--)l++;if(u>=0&&l++,c=c.dblp(l),u<0)break;var d=o[u];i(0!==d),c="affine"===e.type?d>0?c.mixedAdd(a[d-1>>1]):c.mixedAdd(a[-d-1>>1].neg()):d>0?c.add(a[d-1>>1]):c.add(a[-d-1>>1].neg())}return"affine"===e.type?c.toP():c},s.prototype._wnafMulAdd=function(e,t,i,s,a){var o,c,u,l=this._wnafT1,d=this._wnafT2,p=this._wnafT3,f=0;for(o=0;o<s;o++){var h=(u=t[o])._getNAFPoints(e);l[o]=h.wnd,d[o]=h.points}for(o=s-1;o>=1;o-=2){var m=o-1,g=o;if(1===l[m]&&1===l[g]){var y=[t[m],null,null,t[g]];0===t[m].y.cmp(t[g].y)?(y[1]=t[m].add(t[g]),y[2]=t[m].toJ().mixedAdd(t[g].neg())):0===t[m].y.cmp(t[g].y.redNeg())?(y[1]=t[m].toJ().mixedAdd(t[g]),y[2]=t[m].add(t[g].neg())):(y[1]=t[m].toJ().mixedAdd(t[g]),y[2]=t[m].toJ().mixedAdd(t[g].neg()));var b=[-3,-1,-5,-7,0,7,5,1,3],v=r(i[m],i[g]);for(f=Math.max(v[0].length,f),p[m]=new Array(f),p[g]=new Array(f),c=0;c<f;c++){var w=0|v[0][c],x=0|v[1][c];p[m][c]=b[3*(w+1)+(x+1)],p[g][c]=0,d[m]=y}}else p[m]=n(i[m],l[m],this._bitLength),p[g]=n(i[g],l[g],this._bitLength),f=Math.max(p[m].length,f),f=Math.max(p[g].length,f)}var _=this.jpoint(null,null,null),E=this._wnafT4;for(o=f;o>=0;o--){for(var S=0;o>=0;){var k=!0;for(c=0;c<s;c++)E[c]=0|p[c][o],0!==E[c]&&(k=!1);if(!k)break;S++,o--}if(o>=0&&S++,_=_.dblp(S),o<0)break;for(c=0;c<s;c++){var A=E[c];0!==A&&(A>0?u=d[c][A-1>>1]:A<0&&(u=d[c][-A-1>>1].neg()),_="affine"===u.type?_.mixedAdd(u):_.add(u))}}for(o=0;o<s;o++)d[o]=null;return a?_:_.toP()},s.BasePoint=a,a.prototype.eq=function(){throw new Error("Not implemented")},a.prototype.validate=function(){return this.curve.validate(this)},s.prototype.decodePoint=function(e,n){e=t.toArray(e,n);var r=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1==2*r)return 6===e[0]?i(e[e.length-1]%2==0):7===e[0]&&i(e[e.length-1]%2==1),this.point(e.slice(1,1+r),e.slice(1+r,1+2*r));if((2===e[0]||3===e[0])&&e.length-1===r)return this.pointFromX(e.slice(1,1+r),3===e[0]);throw new Error("Unknown point format")},a.prototype.encodeCompressed=function(e){return this.encode(e,!0)},a.prototype._encode=function(e){var t=this.curve.p.byteLength(),n=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(n):[4].concat(n,this.getY().toArray("be",t))},a.prototype.encode=function(e,n){return t.encode(this._encode(n),e)},a.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},a.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},a.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],r=this,i=0;i<t;i+=e){for(var s=0;s<e;s++)r=r.dbl();n.push(r)}return{step:e,points:n}},a.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],n=(1<<e)-1,r=1===n?null:this.dbl(),i=1;i<n;i++)t[i]=t[i-1].add(r);return{wnd:e,points:t}},a.prototype._getBeta=function(){return null},a.prototype.dblp=function(e){for(var t=this,n=0;n<e;n++)t=t.dbl();return t},$d}function Gd(){return Vd||(Vd=1,function(e){var t=e;t.base=Wd(),t.short=function(){if(zd)return Bd;zd=1;var e=Cd(),t=Md(),n=ur(),r=Wd(),i=e.assert;function s(e){r.call(this,"short",e),this.a=new t(e.a,16).toRed(this.red),this.b=new t(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function a(e,n,i,s){r.BasePoint.call(this,e,"affine"),null===n&&null===i?(this.x=null,this.y=null,this.inf=!0):(this.x=new t(n,16),this.y=new t(i,16),s&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function o(e,n,i,s){r.BasePoint.call(this,e,"jacobian"),null===n&&null===i&&null===s?(this.x=this.curve.one,this.y=this.curve.one,this.z=new t(0)):(this.x=new t(n,16),this.y=new t(i,16),this.z=new t(s,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}return n(s,r),Bd=s,s.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var n,r;if(e.beta)n=new t(e.beta,16).toRed(this.red);else{var s=this._getEndoRoots(this.p);n=(n=s[0].cmp(s[1])<0?s[0]:s[1]).toRed(this.red)}if(e.lambda)r=new t(e.lambda,16);else{var a=this._getEndoRoots(this.n);0===this.g.mul(a[0]).x.cmp(this.g.x.redMul(n))?r=a[0]:(r=a[1],i(0===this.g.mul(r).x.cmp(this.g.x.redMul(n))))}return{beta:n,lambda:r,basis:e.basis?e.basis.map((function(e){return{a:new t(e.a,16),b:new t(e.b,16)}})):this._getEndoBasis(r)}}},s.prototype._getEndoRoots=function(e){var n=e===this.p?this.red:t.mont(e),r=new t(2).toRed(n).redInvm(),i=r.redNeg(),s=new t(3).toRed(n).redNeg().redSqrt().redMul(r);return[i.redAdd(s).fromRed(),i.redSub(s).fromRed()]},s.prototype._getEndoBasis=function(e){for(var n,r,i,s,a,o,c,u,l,d=this.n.ushrn(Math.floor(this.n.bitLength()/2)),p=e,f=this.n.clone(),h=new t(1),m=new t(0),g=new t(0),y=new t(1),b=0;0!==p.cmpn(0);){var v=f.div(p);u=f.sub(v.mul(p)),l=g.sub(v.mul(h));var w=y.sub(v.mul(m));if(!i&&u.cmp(d)<0)n=c.neg(),r=h,i=u.neg(),s=l;else if(i&&2==++b)break;c=u,f=p,p=u,g=h,h=l,y=m,m=w}a=u.neg(),o=l;var x=i.sqr().add(s.sqr());return a.sqr().add(o.sqr()).cmp(x)>=0&&(a=n,o=r),i.negative&&(i=i.neg(),s=s.neg()),a.negative&&(a=a.neg(),o=o.neg()),[{a:i,b:s},{a:a,b:o}]},s.prototype._endoSplit=function(e){var t=this.endo.basis,n=t[0],r=t[1],i=r.b.mul(e).divRound(this.n),s=n.b.neg().mul(e).divRound(this.n),a=i.mul(n.a),o=s.mul(r.a),c=i.mul(n.b),u=s.mul(r.b);return{k1:e.sub(a).sub(o),k2:c.add(u).neg()}},s.prototype.pointFromX=function(e,n){(e=new t(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),i=r.redSqrt();if(0!==i.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var s=i.fromRed().isOdd();return(n&&!s||!n&&s)&&(i=i.redNeg()),this.point(e,i)},s.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,n=e.y,r=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(r).redIAdd(this.b);return 0===n.redSqr().redISub(i).cmpn(0)},s.prototype._endoWnafMulAdd=function(e,t,n){for(var r=this._endoWnafT1,i=this._endoWnafT2,s=0;s<e.length;s++){var a=this._endoSplit(t[s]),o=e[s],c=o._getBeta();a.k1.negative&&(a.k1.ineg(),o=o.neg(!0)),a.k2.negative&&(a.k2.ineg(),c=c.neg(!0)),r[2*s]=o,r[2*s+1]=c,i[2*s]=a.k1,i[2*s+1]=a.k2}for(var u=this._wnafMulAdd(1,r,i,2*s,n),l=0;l<2*s;l++)r[l]=null,i[l]=null;return u},n(a,r.BasePoint),s.prototype.point=function(e,t,n){return new a(this,e,t,n)},s.prototype.pointFromJSON=function(e,t){return a.fromJSON(this,e,t)},a.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var n=this.curve,r=function(e){return n.point(e.x.redMul(n.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(r)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(r)}}}return t}},a.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},a.fromJSON=function(e,t,n){"string"==typeof t&&(t=JSON.parse(t));var r=e.point(t[0],t[1],n);if(!t[2])return r;function i(t){return e.point(t[0],t[1],n)}var s=t[2];return r.precomputed={beta:null,doubles:s.doubles&&{step:s.doubles.step,points:[r].concat(s.doubles.points.map(i))},naf:s.naf&&{wnd:s.naf.wnd,points:[r].concat(s.naf.points.map(i))}},r},a.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},a.prototype.isInfinity=function(){return this.inf},a.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var n=t.redSqr().redISub(this.x).redISub(e.x),r=t.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,r)},a.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,n=this.x.redSqr(),r=e.redInvm(),i=n.redAdd(n).redIAdd(n).redIAdd(t).redMul(r),s=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(s)).redISub(this.y);return this.curve.point(s,a)},a.prototype.getX=function(){return this.x.fromRed()},a.prototype.getY=function(){return this.y.fromRed()},a.prototype.mul=function(e){return e=new t(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},a.prototype.mulAdd=function(e,t,n){var r=[this,t],i=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,i):this.curve._wnafMulAdd(1,r,i,2)},a.prototype.jmulAdd=function(e,t,n){var r=[this,t],i=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,i,!0):this.curve._wnafMulAdd(1,r,i,2,!0)},a.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},a.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,r=function(e){return e.neg()};t.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(r)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(r)}}}return t},a.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},n(o,r.BasePoint),s.prototype.jpoint=function(e,t,n){return new o(this,e,t,n)},o.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),n=this.x.redMul(t),r=this.y.redMul(t).redMul(e);return this.curve.point(n,r)},o.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},o.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),n=this.z.redSqr(),r=this.x.redMul(t),i=e.x.redMul(n),s=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(n.redMul(this.z)),o=r.redSub(i),c=s.redSub(a);if(0===o.cmpn(0))return 0!==c.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=o.redSqr(),l=u.redMul(o),d=r.redMul(u),p=c.redSqr().redIAdd(l).redISub(d).redISub(d),f=c.redMul(d.redISub(p)).redISub(s.redMul(l)),h=this.z.redMul(e.z).redMul(o);return this.curve.jpoint(p,f,h)},o.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),n=this.x,r=e.x.redMul(t),i=this.y,s=e.y.redMul(t).redMul(this.z),a=n.redSub(r),o=i.redSub(s);if(0===a.cmpn(0))return 0!==o.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=a.redSqr(),u=c.redMul(a),l=n.redMul(c),d=o.redSqr().redIAdd(u).redISub(l).redISub(l),p=o.redMul(l.redISub(d)).redISub(i.redMul(u)),f=this.z.redMul(a);return this.curve.jpoint(d,p,f)},o.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var n=this;for(t=0;t<e;t++)n=n.dbl();return n}var r=this.curve.a,i=this.curve.tinv,s=this.x,a=this.y,o=this.z,c=o.redSqr().redSqr(),u=a.redAdd(a);for(t=0;t<e;t++){var l=s.redSqr(),d=u.redSqr(),p=d.redSqr(),f=l.redAdd(l).redIAdd(l).redIAdd(r.redMul(c)),h=s.redMul(d),m=f.redSqr().redISub(h.redAdd(h)),g=h.redISub(m),y=f.redMul(g);y=y.redIAdd(y).redISub(p);var b=u.redMul(o);t+1<e&&(c=c.redMul(p)),s=m,o=b,u=y}return this.curve.jpoint(s,u.redMul(i),o)},o.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},o.prototype._zeroDbl=function(){var e,t,n;if(this.zOne){var r=this.x.redSqr(),i=this.y.redSqr(),s=i.redSqr(),a=this.x.redAdd(i).redSqr().redISub(r).redISub(s);a=a.redIAdd(a);var o=r.redAdd(r).redIAdd(r),c=o.redSqr().redISub(a).redISub(a),u=s.redIAdd(s);u=(u=u.redIAdd(u)).redIAdd(u),e=c,t=o.redMul(a.redISub(c)).redISub(u),n=this.y.redAdd(this.y)}else{var l=this.x.redSqr(),d=this.y.redSqr(),p=d.redSqr(),f=this.x.redAdd(d).redSqr().redISub(l).redISub(p);f=f.redIAdd(f);var h=l.redAdd(l).redIAdd(l),m=h.redSqr(),g=p.redIAdd(p);g=(g=g.redIAdd(g)).redIAdd(g),e=m.redISub(f).redISub(f),t=h.redMul(f.redISub(e)).redISub(g),n=(n=this.y.redMul(this.z)).redIAdd(n)}return this.curve.jpoint(e,t,n)},o.prototype._threeDbl=function(){var e,t,n;if(this.zOne){var r=this.x.redSqr(),i=this.y.redSqr(),s=i.redSqr(),a=this.x.redAdd(i).redSqr().redISub(r).redISub(s);a=a.redIAdd(a);var o=r.redAdd(r).redIAdd(r).redIAdd(this.curve.a),c=o.redSqr().redISub(a).redISub(a);e=c;var u=s.redIAdd(s);u=(u=u.redIAdd(u)).redIAdd(u),t=o.redMul(a.redISub(c)).redISub(u),n=this.y.redAdd(this.y)}else{var l=this.z.redSqr(),d=this.y.redSqr(),p=this.x.redMul(d),f=this.x.redSub(l).redMul(this.x.redAdd(l));f=f.redAdd(f).redIAdd(f);var h=p.redIAdd(p),m=(h=h.redIAdd(h)).redAdd(h);e=f.redSqr().redISub(m),n=this.y.redAdd(this.z).redSqr().redISub(d).redISub(l);var g=d.redSqr();g=(g=(g=g.redIAdd(g)).redIAdd(g)).redIAdd(g),t=f.redMul(h.redISub(e)).redISub(g)}return this.curve.jpoint(e,t,n)},o.prototype._dbl=function(){var e=this.curve.a,t=this.x,n=this.y,r=this.z,i=r.redSqr().redSqr(),s=t.redSqr(),a=n.redSqr(),o=s.redAdd(s).redIAdd(s).redIAdd(e.redMul(i)),c=t.redAdd(t),u=(c=c.redIAdd(c)).redMul(a),l=o.redSqr().redISub(u.redAdd(u)),d=u.redISub(l),p=a.redSqr();p=(p=(p=p.redIAdd(p)).redIAdd(p)).redIAdd(p);var f=o.redMul(d).redISub(p),h=n.redAdd(n).redMul(r);return this.curve.jpoint(l,f,h)},o.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),n=this.z.redSqr(),r=t.redSqr(),i=e.redAdd(e).redIAdd(e),s=i.redSqr(),a=this.x.redAdd(t).redSqr().redISub(e).redISub(r),o=(a=(a=(a=a.redIAdd(a)).redAdd(a).redIAdd(a)).redISub(s)).redSqr(),c=r.redIAdd(r);c=(c=(c=c.redIAdd(c)).redIAdd(c)).redIAdd(c);var u=i.redIAdd(a).redSqr().redISub(s).redISub(o).redISub(c),l=t.redMul(u);l=(l=l.redIAdd(l)).redIAdd(l);var d=this.x.redMul(o).redISub(l);d=(d=d.redIAdd(d)).redIAdd(d);var p=this.y.redMul(u.redMul(c.redISub(u)).redISub(a.redMul(o)));p=(p=(p=p.redIAdd(p)).redIAdd(p)).redIAdd(p);var f=this.z.redAdd(a).redSqr().redISub(n).redISub(o);return this.curve.jpoint(d,p,f)},o.prototype.mul=function(e,n){return e=new t(e,n),this.curve._wnafMul(this,e)},o.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),n=e.z.redSqr();if(0!==this.x.redMul(n).redISub(e.x.redMul(t)).cmpn(0))return!1;var r=t.redMul(this.z),i=n.redMul(e.z);return 0===this.y.redMul(i).redISub(e.y.redMul(r)).cmpn(0)},o.prototype.eqXToP=function(e){var t=this.z.redSqr(),n=e.toRed(this.curve.red).redMul(t);if(0===this.x.cmp(n))return!0;for(var r=e.clone(),i=this.curve.redN.redMul(t);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(n.redIAdd(i),0===this.x.cmp(n))return!0}},o.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},o.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},Bd}(),t.mont=function(){if(Hd)return qd;Hd=1;var e=Md(),t=ur(),n=Wd(),r=Cd();function i(t){n.call(this,"mont",t),this.a=new e(t.a,16).toRed(this.red),this.b=new e(t.b,16).toRed(this.red),this.i4=new e(4).toRed(this.red).redInvm(),this.two=new e(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function s(t,r,i){n.BasePoint.call(this,t,"projective"),null===r&&null===i?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new e(r,16),this.z=new e(i,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}return t(i,n),qd=i,i.prototype.validate=function(e){var t=e.normalize().x,n=t.redSqr(),r=n.redMul(t).redAdd(n.redMul(this.a)).redAdd(t);return 0===r.redSqrt().redSqr().cmp(r)},t(s,n.BasePoint),i.prototype.decodePoint=function(e,t){return this.point(r.toArray(e,t),1)},i.prototype.point=function(e,t){return new s(this,e,t)},i.prototype.pointFromJSON=function(e){return s.fromJSON(this,e)},s.prototype.precompute=function(){},s.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},s.fromJSON=function(e,t){return new s(e,t[0],t[1]||e.one)},s.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},s.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},s.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),n=e.redSub(t),r=e.redMul(t),i=n.redMul(t.redAdd(this.curve.a24.redMul(n)));return this.curve.point(r,i)},s.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},s.prototype.diffAdd=function(e,t){var n=this.x.redAdd(this.z),r=this.x.redSub(this.z),i=e.x.redAdd(e.z),s=e.x.redSub(e.z).redMul(n),a=i.redMul(r),o=t.z.redMul(s.redAdd(a).redSqr()),c=t.x.redMul(s.redISub(a).redSqr());return this.curve.point(o,c)},s.prototype.mul=function(e){for(var t=e.clone(),n=this,r=this.curve.point(null,null),i=[];0!==t.cmpn(0);t.iushrn(1))i.push(t.andln(1));for(var s=i.length-1;s>=0;s--)0===i[s]?(n=n.diffAdd(r,this),r=r.dbl()):(r=n.diffAdd(r,this),n=n.dbl());return r},s.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},s.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},s.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},s.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},s.prototype.getX=function(){return this.normalize(),this.x.fromRed()},qd}(),t.edwards=function(){if(Yd)return Fd;Yd=1;var e=Cd(),t=Md(),n=ur(),r=Wd(),i=e.assert;function s(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,r.call(this,"edwards",e),this.a=new t(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new t(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new t(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),i(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}function a(e,n,i,s,a){r.BasePoint.call(this,e,"projective"),null===n&&null===i&&null===s?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new t(n,16),this.y=new t(i,16),this.z=s?new t(s,16):this.curve.one,this.t=a&&new t(a,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}return n(s,r),Fd=s,s.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},s.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},s.prototype.jpoint=function(e,t,n,r){return this.point(e,t,n,r)},s.prototype.pointFromX=function(e,n){(e=new t(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),i=this.c2.redSub(this.a.redMul(r)),s=this.one.redSub(this.c2.redMul(this.d).redMul(r)),a=i.redMul(s.redInvm()),o=a.redSqrt();if(0!==o.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");var c=o.fromRed().isOdd();return(n&&!c||!n&&c)&&(o=o.redNeg()),this.point(e,o)},s.prototype.pointFromY=function(e,n){(e=new t(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),i=r.redSub(this.c2),s=r.redMul(this.d).redMul(this.c2).redSub(this.a),a=i.redMul(s.redInvm());if(0===a.cmp(this.zero)){if(n)throw new Error("invalid point");return this.point(this.zero,e)}var o=a.redSqrt();if(0!==o.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");return o.fromRed().isOdd()!==n&&(o=o.redNeg()),this.point(o,e)},s.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),n=e.y.redSqr(),r=t.redMul(this.a).redAdd(n),i=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(n)));return 0===r.cmp(i)},n(a,r.BasePoint),s.prototype.pointFromJSON=function(e){return a.fromJSON(this,e)},s.prototype.point=function(e,t,n,r){return new a(this,e,t,n,r)},a.fromJSON=function(e,t){return new a(e,t[0],t[1],t[2])},a.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},a.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},a.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),n=this.z.redSqr();n=n.redIAdd(n);var r=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),s=r.redAdd(t),a=s.redSub(n),o=r.redSub(t),c=i.redMul(a),u=s.redMul(o),l=i.redMul(o),d=a.redMul(s);return this.curve.point(c,u,d,l)},a.prototype._projDbl=function(){var e,t,n,r,i,s,a=this.x.redAdd(this.y).redSqr(),o=this.x.redSqr(),c=this.y.redSqr();if(this.curve.twisted){var u=(r=this.curve._mulA(o)).redAdd(c);this.zOne?(e=a.redSub(o).redSub(c).redMul(u.redSub(this.curve.two)),t=u.redMul(r.redSub(c)),n=u.redSqr().redSub(u).redSub(u)):(i=this.z.redSqr(),s=u.redSub(i).redISub(i),e=a.redSub(o).redISub(c).redMul(s),t=u.redMul(r.redSub(c)),n=u.redMul(s))}else r=o.redAdd(c),i=this.curve._mulC(this.z).redSqr(),s=r.redSub(i).redSub(i),e=this.curve._mulC(a.redISub(r)).redMul(s),t=this.curve._mulC(r).redMul(o.redISub(c)),n=r.redMul(s);return this.curve.point(e,t,n)},a.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},a.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),n=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),r=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),s=n.redSub(t),a=i.redSub(r),o=i.redAdd(r),c=n.redAdd(t),u=s.redMul(a),l=o.redMul(c),d=s.redMul(c),p=a.redMul(o);return this.curve.point(u,l,p,d)},a.prototype._projAdd=function(e){var t,n,r=this.z.redMul(e.z),i=r.redSqr(),s=this.x.redMul(e.x),a=this.y.redMul(e.y),o=this.curve.d.redMul(s).redMul(a),c=i.redSub(o),u=i.redAdd(o),l=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(s).redISub(a),d=r.redMul(c).redMul(l);return this.curve.twisted?(t=r.redMul(u).redMul(a.redSub(this.curve._mulA(s))),n=c.redMul(u)):(t=r.redMul(u).redMul(a.redSub(s)),n=this.curve._mulC(c).redMul(u)),this.curve.point(d,t,n)},a.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},a.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},a.prototype.mulAdd=function(e,t,n){return this.curve._wnafMulAdd(1,[this,t],[e,n],2,!1)},a.prototype.jmulAdd=function(e,t,n){return this.curve._wnafMulAdd(1,[this,t],[e,n],2,!0)},a.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},a.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},a.prototype.getX=function(){return this.normalize(),this.x.fromRed()},a.prototype.getY=function(){return this.normalize(),this.y.fromRed()},a.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},a.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var n=e.clone(),r=this.curve.redN.redMul(this.z);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(r),0===this.x.cmp(t))return!0}},a.prototype.toP=a.prototype.normalize,a.prototype.mixedAdd=a.prototype.add,Fd}()}(Kd)),Kd}var Jd,Zd={},Xd={},Qd={};function ep(){if(Jd)return Qd;Jd=1;var e=Rd(),t=ur();function n(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function r(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function i(e){return 1===e.length?"0"+e:e}function s(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}return Qd.inherits=t,Qd.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),s=0;s<e.length;s+=2)r.push(parseInt(e[s]+e[s+1],16))}else for(var i=0,s=0;s<e.length;s++){var a=e.charCodeAt(s);a<128?r[i++]=a:a<2048?(r[i++]=a>>6|192,r[i++]=63&a|128):n(e,s)?(a=65536+((1023&a)<<10)+(1023&e.charCodeAt(++s)),r[i++]=a>>18|240,r[i++]=a>>12&63|128,r[i++]=a>>6&63|128,r[i++]=63&a|128):(r[i++]=a>>12|224,r[i++]=a>>6&63|128,r[i++]=63&a|128)}else for(s=0;s<e.length;s++)r[s]=0|e[s];return r},Qd.toHex=function(e){for(var t="",n=0;n<e.length;n++)t+=i(e[n].toString(16));return t},Qd.htonl=r,Qd.toHex32=function(e,t){for(var n="",i=0;i<e.length;i++){var a=e[i];"little"===t&&(a=r(a)),n+=s(a.toString(16))}return n},Qd.zero2=i,Qd.zero8=s,Qd.join32=function(t,n,r,i){var s=r-n;e(s%4==0);for(var a=new Array(s/4),o=0,c=n;o<a.length;o++,c+=4){var u;u="big"===i?t[c]<<24|t[c+1]<<16|t[c+2]<<8|t[c+3]:t[c+3]<<24|t[c+2]<<16|t[c+1]<<8|t[c],a[o]=u>>>0}return a},Qd.split32=function(e,t){for(var n=new Array(4*e.length),r=0,i=0;r<e.length;r++,i+=4){var s=e[r];"big"===t?(n[i]=s>>>24,n[i+1]=s>>>16&255,n[i+2]=s>>>8&255,n[i+3]=255&s):(n[i+3]=s>>>24,n[i+2]=s>>>16&255,n[i+1]=s>>>8&255,n[i]=255&s)}return n},Qd.rotr32=function(e,t){return e>>>t|e<<32-t},Qd.rotl32=function(e,t){return e<<t|e>>>32-t},Qd.sum32=function(e,t){return e+t>>>0},Qd.sum32_3=function(e,t,n){return e+t+n>>>0},Qd.sum32_4=function(e,t,n,r){return e+t+n+r>>>0},Qd.sum32_5=function(e,t,n,r,i){return e+t+n+r+i>>>0},Qd.sum64=function(e,t,n,r){var i=e[t],s=r+e[t+1]>>>0,a=(s<r?1:0)+n+i;e[t]=a>>>0,e[t+1]=s},Qd.sum64_hi=function(e,t,n,r){return(t+r>>>0<t?1:0)+e+n>>>0},Qd.sum64_lo=function(e,t,n,r){return t+r>>>0},Qd.sum64_4_hi=function(e,t,n,r,i,s,a,o){var c=0,u=t;return c+=(u=u+r>>>0)<t?1:0,c+=(u=u+s>>>0)<s?1:0,e+n+i+a+(c+=(u=u+o>>>0)<o?1:0)>>>0},Qd.sum64_4_lo=function(e,t,n,r,i,s,a,o){return t+r+s+o>>>0},Qd.sum64_5_hi=function(e,t,n,r,i,s,a,o,c,u){var l=0,d=t;return l+=(d=d+r>>>0)<t?1:0,l+=(d=d+s>>>0)<s?1:0,l+=(d=d+o>>>0)<o?1:0,e+n+i+a+c+(l+=(d=d+u>>>0)<u?1:0)>>>0},Qd.sum64_5_lo=function(e,t,n,r,i,s,a,o,c,u){return t+r+s+o+u>>>0},Qd.rotr64_hi=function(e,t,n){return(t<<32-n|e>>>n)>>>0},Qd.rotr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0},Qd.shr64_hi=function(e,t,n){return e>>>n},Qd.shr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0},Qd}var tp,np={};function rp(){if(tp)return np;tp=1;var e=ep(),t=Rd();function n(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}return np.BlockHash=n,n.prototype.update=function(t,n){if(t=e.toArray(t,n),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var r=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-r,t.length),0===this.pending.length&&(this.pending=null),t=e.join32(t,0,t.length-r,this.endian);for(var i=0;i<t.length;i+=this._delta32)this._update(t,i,i+this._delta32)}return this},n.prototype.digest=function(e){return this.update(this._pad()),t(null===this.pending),this._digest(e)},n.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,n=t-(e+this.padLength)%t,r=new Array(n+this.padLength);r[0]=128;for(var i=1;i<n;i++)r[i]=0;if(e<<=3,"big"===this.endian){for(var s=8;s<this.padLength;s++)r[i++]=0;r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=e>>>24&255,r[i++]=e>>>16&255,r[i++]=e>>>8&255,r[i++]=255&e}else for(r[i++]=255&e,r[i++]=e>>>8&255,r[i++]=e>>>16&255,r[i++]=e>>>24&255,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,s=8;s<this.padLength;s++)r[i++]=0;return r},np}var ip,sp,ap,op,cp,up,lp,dp,pp,fp,hp,mp,gp={},yp={};function bp(){if(ip)return yp;ip=1;var e=ep().rotr32;function t(e,t,n){return e&t^~e&n}function n(e,t,n){return e&t^e&n^t&n}function r(e,t,n){return e^t^n}return yp.ft_1=function(e,i,s,a){return 0===e?t(i,s,a):1===e||3===e?r(i,s,a):2===e?n(i,s,a):void 0},yp.ch32=t,yp.maj32=n,yp.p32=r,yp.s0_256=function(t){return e(t,2)^e(t,13)^e(t,22)},yp.s1_256=function(t){return e(t,6)^e(t,11)^e(t,25)},yp.g0_256=function(t){return e(t,7)^e(t,18)^t>>>3},yp.g1_256=function(t){return e(t,17)^e(t,19)^t>>>10},yp}function vp(){if(cp)return op;cp=1;var e=ep(),t=rp(),n=bp(),r=Rd(),i=e.sum32,s=e.sum32_4,a=e.sum32_5,o=n.ch32,c=n.maj32,u=n.s0_256,l=n.s1_256,d=n.g0_256,p=n.g1_256,f=t.BlockHash,h=[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];function m(){if(!(this instanceof m))return new m;f.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=h,this.W=new Array(64)}return e.inherits(m,f),op=m,m.blockSize=512,m.outSize=256,m.hmacStrength=192,m.padLength=64,m.prototype._update=function(e,t){for(var n=this.W,f=0;f<16;f++)n[f]=e[t+f];for(;f<n.length;f++)n[f]=s(p(n[f-2]),n[f-7],d(n[f-15]),n[f-16]);var h=this.h[0],m=this.h[1],g=this.h[2],y=this.h[3],b=this.h[4],v=this.h[5],w=this.h[6],x=this.h[7];for(r(this.k.length===n.length),f=0;f<n.length;f++){var _=a(x,l(b),o(b,v,w),this.k[f],n[f]),E=i(u(h),c(h,m,g));x=w,w=v,v=b,b=i(y,_),y=g,g=m,m=h,h=i(_,E)}this.h[0]=i(this.h[0],h),this.h[1]=i(this.h[1],m),this.h[2]=i(this.h[2],g),this.h[3]=i(this.h[3],y),this.h[4]=i(this.h[4],b),this.h[5]=i(this.h[5],v),this.h[6]=i(this.h[6],w),this.h[7]=i(this.h[7],x)},m.prototype._digest=function(t){return"hex"===t?e.toHex32(this.h,"big"):e.split32(this.h,"big")},op}function wp(){if(pp)return dp;pp=1;var e=ep(),t=rp(),n=Rd(),r=e.rotr64_hi,i=e.rotr64_lo,s=e.shr64_hi,a=e.shr64_lo,o=e.sum64,c=e.sum64_hi,u=e.sum64_lo,l=e.sum64_4_hi,d=e.sum64_4_lo,p=e.sum64_5_hi,f=e.sum64_5_lo,h=t.BlockHash,m=[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];function g(){if(!(this instanceof g))return new g;h.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=m,this.W=new Array(160)}function y(e,t,n,r,i){var s=e&n^~e&i;return s<0&&(s+=4294967296),s}function b(e,t,n,r,i,s){var a=t&r^~t&s;return a<0&&(a+=4294967296),a}function v(e,t,n,r,i){var s=e&n^e&i^n&i;return s<0&&(s+=4294967296),s}function w(e,t,n,r,i,s){var a=t&r^t&s^r&s;return a<0&&(a+=4294967296),a}function x(e,t){var n=r(e,t,28)^r(t,e,2)^r(t,e,7);return n<0&&(n+=4294967296),n}function _(e,t){var n=i(e,t,28)^i(t,e,2)^i(t,e,7);return n<0&&(n+=4294967296),n}function E(e,t){var n=r(e,t,14)^r(e,t,18)^r(t,e,9);return n<0&&(n+=4294967296),n}function S(e,t){var n=i(e,t,14)^i(e,t,18)^i(t,e,9);return n<0&&(n+=4294967296),n}function k(e,t){var n=r(e,t,1)^r(e,t,8)^s(e,t,7);return n<0&&(n+=4294967296),n}function A(e,t){var n=i(e,t,1)^i(e,t,8)^a(e,t,7);return n<0&&(n+=4294967296),n}function T(e,t){var n=r(e,t,19)^r(t,e,29)^s(e,t,6);return n<0&&(n+=4294967296),n}function M(e,t){var n=i(e,t,19)^i(t,e,29)^a(e,t,6);return n<0&&(n+=4294967296),n}return e.inherits(g,h),dp=g,g.blockSize=1024,g.outSize=512,g.hmacStrength=192,g.padLength=128,g.prototype._prepareBlock=function(e,t){for(var n=this.W,r=0;r<32;r++)n[r]=e[t+r];for(;r<n.length;r+=2){var i=T(n[r-4],n[r-3]),s=M(n[r-4],n[r-3]),a=n[r-14],o=n[r-13],c=k(n[r-30],n[r-29]),u=A(n[r-30],n[r-29]),p=n[r-32],f=n[r-31];n[r]=l(i,s,a,o,c,u,p,f),n[r+1]=d(i,s,a,o,c,u,p,f)}},g.prototype._update=function(e,t){this._prepareBlock(e,t);var r=this.W,i=this.h[0],s=this.h[1],a=this.h[2],l=this.h[3],d=this.h[4],h=this.h[5],m=this.h[6],g=this.h[7],k=this.h[8],A=this.h[9],T=this.h[10],M=this.h[11],R=this.h[12],O=this.h[13],I=this.h[14],N=this.h[15];n(this.k.length===r.length);for(var P=0;P<r.length;P+=2){var C=I,j=N,L=E(k,A),D=S(k,A),$=y(k,A,T,M,R),U=b(k,A,T,M,R,O),B=this.k[P],z=this.k[P+1],q=r[P],H=r[P+1],F=p(C,j,L,D,$,U,B,z,q,H),Y=f(C,j,L,D,$,U,B,z,q,H);C=x(i,s),j=_(i,s),L=v(i,s,a,l,d),D=w(i,s,a,l,d,h);var V=c(C,j,L,D),K=u(C,j,L,D);I=R,N=O,R=T,O=M,T=k,M=A,k=c(m,g,F,Y),A=u(g,g,F,Y),m=d,g=h,d=a,h=l,a=i,l=s,i=c(F,Y,V,K),s=u(F,Y,V,K)}o(this.h,0,i,s),o(this.h,2,a,l),o(this.h,4,d,h),o(this.h,6,m,g),o(this.h,8,k,A),o(this.h,10,T,M),o(this.h,12,R,O),o(this.h,14,I,N)},g.prototype._digest=function(t){return"hex"===t?e.toHex32(this.h,"big"):e.split32(this.h,"big")},dp}function xp(){return mp||(mp=1,gp.sha1=function(){if(ap)return sp;ap=1;var e=ep(),t=rp(),n=bp(),r=e.rotl32,i=e.sum32,s=e.sum32_5,a=n.ft_1,o=t.BlockHash,c=[1518500249,1859775393,2400959708,3395469782];function u(){if(!(this instanceof u))return new u;o.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}return e.inherits(u,o),sp=u,u.blockSize=512,u.outSize=160,u.hmacStrength=80,u.padLength=64,u.prototype._update=function(e,t){for(var n=this.W,o=0;o<16;o++)n[o]=e[t+o];for(;o<n.length;o++)n[o]=r(n[o-3]^n[o-8]^n[o-14]^n[o-16],1);var u=this.h[0],l=this.h[1],d=this.h[2],p=this.h[3],f=this.h[4];for(o=0;o<n.length;o++){var h=~~(o/20),m=s(r(u,5),a(h,l,d,p),f,n[o],c[h]);f=p,p=d,d=r(l,30),l=u,u=m}this.h[0]=i(this.h[0],u),this.h[1]=i(this.h[1],l),this.h[2]=i(this.h[2],d),this.h[3]=i(this.h[3],p),this.h[4]=i(this.h[4],f)},u.prototype._digest=function(t){return"hex"===t?e.toHex32(this.h,"big"):e.split32(this.h,"big")},sp}(),gp.sha224=function(){if(lp)return up;lp=1;var e=ep(),t=vp();function n(){if(!(this instanceof n))return new n;t.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}return e.inherits(n,t),up=n,n.blockSize=512,n.outSize=224,n.hmacStrength=192,n.padLength=64,n.prototype._digest=function(t){return"hex"===t?e.toHex32(this.h.slice(0,7),"big"):e.split32(this.h.slice(0,7),"big")},up}(),gp.sha256=vp(),gp.sha384=function(){if(hp)return fp;hp=1;var e=ep(),t=wp();function n(){if(!(this instanceof n))return new n;t.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}return e.inherits(n,t),fp=n,n.blockSize=1024,n.outSize=384,n.hmacStrength=192,n.padLength=128,n.prototype._digest=function(t){return"hex"===t?e.toHex32(this.h.slice(0,12),"big"):e.split32(this.h.slice(0,12),"big")},fp}(),gp.sha512=wp()),gp}var _p,Ep,Sp,kp,Ap,Tp,Mp,Rp,Op,Ip,Np,Pp,Cp,jp,Lp,Dp,$p,Up,Bp,zp,qp,Hp,Fp={};function Yp(){return kp||(kp=1,function(){var e=Xd;e.utils=ep(),e.common=rp(),e.sha=xp(),e.ripemd=function(){if(_p)return Fp;_p=1;var e=ep(),t=rp(),n=e.rotl32,r=e.sum32,i=e.sum32_3,s=e.sum32_4,a=t.BlockHash;function o(){if(!(this instanceof o))return new o;a.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function c(e,t,n,r){return e<=15?t^n^r:e<=31?t&n|~t&r:e<=47?(t|~n)^r:e<=63?t&r|n&~r:t^(n|~r)}function u(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function l(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}e.inherits(o,a),Fp.ripemd160=o,o.blockSize=512,o.outSize=160,o.hmacStrength=192,o.padLength=64,o.prototype._update=function(e,t){for(var a=this.h[0],o=this.h[1],m=this.h[2],g=this.h[3],y=this.h[4],b=a,v=o,w=m,x=g,_=y,E=0;E<80;E++){var S=r(n(s(a,c(E,o,m,g),e[d[E]+t],u(E)),f[E]),y);a=y,y=g,g=n(m,10),m=o,o=S,S=r(n(s(b,c(79-E,v,w,x),e[p[E]+t],l(E)),h[E]),_),b=_,_=x,x=n(w,10),w=v,v=S}S=i(this.h[1],m,x),this.h[1]=i(this.h[2],g,_),this.h[2]=i(this.h[3],y,b),this.h[3]=i(this.h[4],a,v),this.h[4]=i(this.h[0],o,w),this.h[0]=S},o.prototype._digest=function(t){return"hex"===t?e.toHex32(this.h,"little"):e.split32(this.h,"little")};var d=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],p=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],f=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],h=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11];return Fp}(),e.hmac=function(){if(Sp)return Ep;Sp=1;var e=ep(),t=Rd();function n(t,r,i){if(!(this instanceof n))return new n(t,r,i);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(e.toArray(r,i))}return Ep=n,n.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),t(e.length<=this.blockSize);for(var n=e.length;n<this.blockSize;n++)e.push(0);for(n=0;n<e.length;n++)e[n]^=54;for(this.inner=(new this.Hash).update(e),n=0;n<e.length;n++)e[n]^=106;this.outer=(new this.Hash).update(e)},n.prototype.update=function(e,t){return this.inner.update(e,t),this},n.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)},Ep}(),e.sha1=e.sha.sha1,e.sha256=e.sha.sha256,e.sha224=e.sha.sha224,e.sha384=e.sha.sha384,e.sha512=e.sha.sha512,e.ripemd160=e.ripemd.ripemd160}()),Xd}function Vp(){return Mp||(Mp=1,function(e){var t,n=e,r=Yp(),i=Gd(),s=Cd().assert;function a(e){"short"===e.type?this.curve=new i.short(e):"edwards"===e.type?this.curve=new i.edwards(e):this.curve=new i.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function o(e,t){Object.defineProperty(n,e,{configurable:!0,enumerable:!0,get:function(){var r=new a(t);return Object.defineProperty(n,e,{configurable:!0,enumerable:!0,value:r}),r}})}n.PresetCurve=a,o("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:r.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),o("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:r.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),o("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:r.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),o("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:r.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),o("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:r.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),o("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:r.sha256,gRed:!1,g:["9"]}),o("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:r.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{t=Tp?Ap:(Tp=1,Ap={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}})}catch(e){t=void 0}o("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:r.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",t]})}(Zd)),Zd}function Kp(){if(Lp)return jp;Lp=1;var e=Md(),t=function(){if(Op)return Rp;Op=1;var e=Yp(),t=Pd(),n=Rd();function r(e){if(!(this instanceof r))return new r(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var i=t.toArray(e.entropy,e.entropyEnc||"hex"),s=t.toArray(e.nonce,e.nonceEnc||"hex"),a=t.toArray(e.pers,e.persEnc||"hex");n(i.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(i,s,a)}return Rp=r,r.prototype._init=function(e,t,n){var r=e.concat(t).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(r),this._reseed=1,this.reseedInterval=281474976710656},r.prototype._hmac=function(){return new e.hmac(this.hash,this.K)},r.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},r.prototype.reseed=function(e,r,i,s){"string"!=typeof r&&(s=i,i=r,r=null),e=t.toArray(e,r),i=t.toArray(i,s),n(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(i||[])),this._reseed=1},r.prototype.generate=function(e,n,r,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof n&&(i=r,r=n,n=null),r&&(r=t.toArray(r,i||"hex"),this._update(r));for(var s=[];s.length<e;)this.V=this._hmac().update(this.V).digest(),s=s.concat(this.V);var a=s.slice(0,e);return this._update(r),this._reseed++,t.encode(a,n)},Rp}(),n=Cd(),r=Vp(),i=Dd(),s=n.assert,a=function(){if(Np)return Ip;Np=1;var e=Md(),t=Cd().assert;function n(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}return Ip=n,n.fromPublic=function(e,t,r){return t instanceof n?t:new n(e,{pub:t,pubEnc:r})},n.fromPrivate=function(e,t,r){return t instanceof n?t:new n(e,{priv:t,privEnc:r})},n.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},n.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},n.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},n.prototype._importPrivate=function(t,n){this.priv=new e(t,n||16),this.priv=this.priv.umod(this.ec.curve.n)},n.prototype._importPublic=function(e,n){if(e.x||e.y)return"mont"===this.ec.curve.type?t(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||t(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,n)},n.prototype.derive=function(e){return e.validate()||t(e.validate(),"public point not validated"),e.mul(this.priv).getX()},n.prototype.sign=function(e,t,n){return this.ec.sign(e,this,t,n)},n.prototype.verify=function(e,t,n){return this.ec.verify(e,t,this,void 0,n)},n.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"},Ip}(),o=function(){if(Cp)return Pp;Cp=1;var e=Md(),t=Cd(),n=t.assert;function r(t,i){if(t instanceof r)return t;this._importDER(t,i)||(n(t.r&&t.s,"Signature without r or s"),this.r=new e(t.r,16),this.s=new e(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}function i(){this.place=0}function s(e,t){var n=e[t.place++];if(!(128&n))return n;var r=15&n;if(0===r||r>4)return!1;if(0===e[t.place])return!1;for(var i=0,s=0,a=t.place;s<r;s++,a++)i<<=8,i|=e[a],i>>>=0;return!(i<=127)&&(t.place=a,i)}function a(e){for(var t=0,n=e.length-1;!e[t]&&!(128&e[t+1])&&t<n;)t++;return 0===t?e:e.slice(t)}function o(e,t){if(t<128)e.push(t);else{var n=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|n);--n;)e.push(t>>>(n<<3)&255);e.push(t)}}return Pp=r,r.prototype._importDER=function(n,r){n=t.toArray(n,r);var a=new i;if(48!==n[a.place++])return!1;var o=s(n,a);if(!1===o)return!1;if(o+a.place!==n.length)return!1;if(2!==n[a.place++])return!1;var c=s(n,a);if(!1===c)return!1;if(128&n[a.place])return!1;var u=n.slice(a.place,c+a.place);if(a.place+=c,2!==n[a.place++])return!1;var l=s(n,a);if(!1===l)return!1;if(n.length!==l+a.place)return!1;if(128&n[a.place])return!1;var d=n.slice(a.place,l+a.place);if(0===u[0]){if(!(128&u[1]))return!1;u=u.slice(1)}if(0===d[0]){if(!(128&d[1]))return!1;d=d.slice(1)}return this.r=new e(u),this.s=new e(d),this.recoveryParam=null,!0},r.prototype.toDER=function(e){var n=this.r.toArray(),r=this.s.toArray();for(128&n[0]&&(n=[0].concat(n)),128&r[0]&&(r=[0].concat(r)),n=a(n),r=a(r);!(r[0]||128&r[1]);)r=r.slice(1);var i=[2];o(i,n.length),(i=i.concat(n)).push(2),o(i,r.length);var s=i.concat(r),c=[48];return o(c,s.length),c=c.concat(s),t.encode(c,e)},Pp}();function c(e){if(!(this instanceof c))return new c(e);"string"==typeof e&&(s(Object.prototype.hasOwnProperty.call(r,e),"Unknown curve "+e),e=r[e]),e instanceof r.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}return jp=c,c.prototype.keyPair=function(e){return new a(this,e)},c.prototype.keyFromPrivate=function(e,t){return a.fromPrivate(this,e,t)},c.prototype.keyFromPublic=function(e,t){return a.fromPublic(this,e,t)},c.prototype.genKeyPair=function(n){n||(n={});for(var r=new t({hash:this.hash,pers:n.pers,persEnc:n.persEnc||"utf8",entropy:n.entropy||i(this.hash.hmacStrength),entropyEnc:n.entropy&&n.entropyEnc||"utf8",nonce:this.n.toArray()}),s=this.n.byteLength(),a=this.n.sub(new e(2));;){var o=new e(r.generate(s));if(!(o.cmp(a)>0))return o.iaddn(1),this.keyFromPrivate(o)}},c.prototype._truncateToN=function(t,n,r){var i;if(e.isBN(t)||"number"==typeof t)i=(t=new e(t,16)).byteLength();else if("object"==typeof t)i=t.length,t=new e(t,16);else{var s=t.toString();i=s.length+1>>>1,t=new e(s,16)}"number"!=typeof r&&(r=8*i);var a=r-this.n.bitLength();return a>0&&(t=t.ushrn(a)),!n&&t.cmp(this.n)>=0?t.sub(this.n):t},c.prototype.sign=function(n,r,i,a){if("object"==typeof i&&(a=i,i=null),a||(a={}),"string"!=typeof n&&"number"!=typeof n&&!e.isBN(n)){s("object"==typeof n&&n&&"number"==typeof n.length,"Expected message to be an array-like, a hex string, or a BN instance"),s(n.length>>>0===n.length);for(var c=0;c<n.length;c++)s((255&n[c])===n[c])}r=this.keyFromPrivate(r,i),n=this._truncateToN(n,!1,a.msgBitLength),s(!n.isNeg(),"Can not sign a negative message");var u=this.n.byteLength(),l=r.getPrivate().toArray("be",u),d=n.toArray("be",u);s(new e(d).eq(n),"Can not sign message");for(var p=new t({hash:this.hash,entropy:l,nonce:d,pers:a.pers,persEnc:a.persEnc||"utf8"}),f=this.n.sub(new e(1)),h=0;;h++){var m=a.k?a.k(h):new e(p.generate(this.n.byteLength()));if(!((m=this._truncateToN(m,!0)).cmpn(1)<=0||m.cmp(f)>=0)){var g=this.g.mul(m);if(!g.isInfinity()){var y=g.getX(),b=y.umod(this.n);if(0!==b.cmpn(0)){var v=m.invm(this.n).mul(b.mul(r.getPrivate()).iadd(n));if(0!==(v=v.umod(this.n)).cmpn(0)){var w=(g.getY().isOdd()?1:0)|(0!==y.cmp(b)?2:0);return a.canonical&&v.cmp(this.nh)>0&&(v=this.n.sub(v),w^=1),new o({r:b,s:v,recoveryParam:w})}}}}}},c.prototype.verify=function(e,t,n,r,i){i||(i={}),e=this._truncateToN(e,!1,i.msgBitLength),n=this.keyFromPublic(n,r);var s=(t=new o(t,"hex")).r,a=t.s;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var c,u=a.invm(this.n),l=u.mul(e).umod(this.n),d=u.mul(s).umod(this.n);return this.curve._maxwellTrick?!(c=this.g.jmulAdd(l,n.getPublic(),d)).isInfinity()&&c.eqXToP(s):!(c=this.g.mulAdd(l,n.getPublic(),d)).isInfinity()&&0===c.getX().umod(this.n).cmp(s)},c.prototype.recoverPubKey=function(t,n,r,i){s((3&r)===r,"The recovery param is more than two bits"),n=new o(n,i);var a=this.n,c=new e(t),u=n.r,l=n.s,d=1&r,p=r>>1;if(u.cmp(this.curve.p.umod(this.curve.n))>=0&&p)throw new Error("Unable to find sencond key candinate");u=p?this.curve.pointFromX(u.add(this.curve.n),d):this.curve.pointFromX(u,d);var f=n.r.invm(a),h=a.sub(c).mul(f).umod(a),m=l.mul(f).umod(a);return this.g.mulAdd(h,u,m)},c.prototype.getKeyRecoveryParam=function(e,t,n,r){if(null!==(t=new o(t,r)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var s;try{s=this.recoverPubKey(e,t,i)}catch(e){continue}if(s.eq(n))return i}throw new Error("Unable to find valid recovery factor")},jp}function Wp(){if(qp)return zp;qp=1;var e=Yp(),t=Vp(),n=Cd(),r=n.assert,i=n.parseBytes,s=function(){if($p)return Dp;$p=1;var e=Cd(),t=e.assert,n=e.parseBytes,r=e.cachedProperty;function i(e,t){this.eddsa=e,this._secret=n(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=n(t.pub)}return i.fromPublic=function(e,t){return t instanceof i?t:new i(e,{pub:t})},i.fromSecret=function(e,t){return t instanceof i?t:new i(e,{secret:t})},i.prototype.secret=function(){return this._secret},r(i,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),r(i,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),r(i,"privBytes",(function(){var e=this.eddsa,t=this.hash(),n=e.encodingLength-1,r=t.slice(0,e.encodingLength);return r[0]&=248,r[n]&=127,r[n]|=64,r})),r(i,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),r(i,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),r(i,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),i.prototype.sign=function(e){return t(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},i.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},i.prototype.getSecret=function(n){return t(this._secret,"KeyPair is public only"),e.encode(this.secret(),n)},i.prototype.getPublic=function(t){return e.encode(this.pubBytes(),t)},Dp=i}(),a=function(){if(Bp)return Up;Bp=1;var e=Md(),t=Cd(),n=t.assert,r=t.cachedProperty,i=t.parseBytes;function s(t,r){this.eddsa=t,"object"!=typeof r&&(r=i(r)),Array.isArray(r)&&(n(r.length===2*t.encodingLength,"Signature has invalid size"),r={R:r.slice(0,t.encodingLength),S:r.slice(t.encodingLength)}),n(r.R&&r.S,"Signature without R or S"),t.isPoint(r.R)&&(this._R=r.R),r.S instanceof e&&(this._S=r.S),this._Rencoded=Array.isArray(r.R)?r.R:r.Rencoded,this._Sencoded=Array.isArray(r.S)?r.S:r.Sencoded}return r(s,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),r(s,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),r(s,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),r(s,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),s.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},s.prototype.toHex=function(){return t.encode(this.toBytes(),"hex").toUpperCase()},Up=s}();function o(n){if(r("ed25519"===n,"only tested with ed25519 so far"),!(this instanceof o))return new o(n);n=t[n].curve,this.curve=n,this.g=n.g,this.g.precompute(n.n.bitLength()+1),this.pointClass=n.point().constructor,this.encodingLength=Math.ceil(n.n.bitLength()/8),this.hash=e.sha512}return zp=o,o.prototype.sign=function(e,t){e=i(e);var n=this.keyFromSecret(t),r=this.hashInt(n.messagePrefix(),e),s=this.g.mul(r),a=this.encodePoint(s),o=this.hashInt(a,n.pubBytes(),e).mul(n.priv()),c=r.add(o).umod(this.curve.n);return this.makeSignature({R:s,S:c,Rencoded:a})},o.prototype.verify=function(e,t,n){if(e=i(e),(t=this.makeSignature(t)).S().gte(t.eddsa.curve.n)||t.S().isNeg())return!1;var r=this.keyFromPublic(n),s=this.hashInt(t.Rencoded(),r.pubBytes(),e),a=this.g.mul(t.S());return t.R().add(r.pub().mul(s)).eq(a)},o.prototype.hashInt=function(){for(var e=this.hash(),t=0;t<arguments.length;t++)e.update(arguments[t]);return n.intFromLE(e.digest()).umod(this.curve.n)},o.prototype.keyFromPublic=function(e){return s.fromPublic(this,e)},o.prototype.keyFromSecret=function(e){return s.fromSecret(this,e)},o.prototype.makeSignature=function(e){return e instanceof a?e:new a(this,e)},o.prototype.encodePoint=function(e){var t=e.getY().toArray("le",this.encodingLength);return t[this.encodingLength-1]|=e.getX().isOdd()?128:0,t},o.prototype.decodePoint=function(e){var t=(e=n.parseBytes(e)).length-1,r=e.slice(0,t).concat(-129&e[t]),i=!!(128&e[t]),s=n.intFromLE(r);return this.curve.pointFromY(s,i)},o.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)},o.prototype.decodeInt=function(e){return n.intFromLE(e)},o.prototype.isPoint=function(e){return e instanceof this.pointClass},zp}function Gp(){return Hp||(Hp=1,function(){var e=Ed;e.version=Sd,e.utils=Cd(),e.rand=Dd(),e.curve=Gd(),e.curves=Vp(),e.ec=Kp(),e.eddsa=Wp()}()),Ed}const Jp=new(Gp().ec)("secp256k1"),Zp=globalThis.crypto||globalThis.msCrypto||{};Zp.subtle||Zp.webkitSubtle;const Xp=Buffer.from("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141","hex"),Qp=Buffer.alloc(32,0);function ef(e,t){if(!e)throw new Error(t)}function tf(e){return t=e,!(!Buffer.isBuffer(t)||32!==t.length)&&(e.compare(Qp)>0&&e.compare(Xp)<0);var t}function nf(e){if(void 0===Zp.getRandomValues)return Buffer.from(Zp.randomBytes(e));const t=new Uint8Array(e);return Zp.getRandomValues(t),Buffer.from(t)}var rf,sf={},af={},of={},cf={exports:{}},uf=cf.exports;function lf(){return rf||(rf=1,function(e,t){function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function r(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function i(e,t,n){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var s;"object"==typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:require("buffer").Buffer}catch(e){}function a(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+e)}function o(e,t,n){var r=a(e,n);return n-1>=t&&(r|=a(e,n-1)<<4),r}function c(e,t,r,i){for(var s=0,a=0,o=Math.min(e.length,r),c=t;c<o;c++){var u=e.charCodeAt(c)-48;s*=i,a=u>=49?u-49+10:u>=17?u-17+10:u,n(u>=0&&a<i,"Invalid character"),s+=a}return s}function u(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(i.isBN=function(e){return e instanceof i||null!==e&&"object"==typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,r):(this._parseBase(e,t,i),"le"===r&&this._initArray(this.toArray(),t,r)))},i.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},i.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var s,a,o=0;if("be"===r)for(i=e.length-1,s=0;i>=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[s]|=a<<o&67108863,this.words[s+1]=a>>>26-o&67108863,(o+=24)>=26&&(o-=26,s++);else if("le"===r)for(i=0,s=0;i<e.length;i+=3)a=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[s]|=a<<o&67108863,this.words[s+1]=a>>>26-o&67108863,(o+=24)>=26&&(o-=26,s++);return this._strip()},i.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i,s=0,a=0;if("be"===n)for(r=e.length-1;r>=t;r-=2)i=o(e,t,r)<<s,this.words[a]|=67108863&i,s>=18?(s-=18,a+=1,this.words[a]|=i>>>26):s+=8;else for(r=(e.length-t)%2==0?t+1:t;r<e.length;r+=2)i=o(e,t,r)<<s,this.words[a]|=67108863&i,s>=18?(s-=18,a+=1,this.words[a]|=i>>>26):s+=8;this._strip()},i.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var s=e.length-n,a=s%r,o=Math.min(s,s-a)+n,u=0,l=n;l<o;l+=r)u=c(e,l,l+r,t),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==a){var d=1;for(u=c(e,l,e.length,t),l=0;l<a;l++)d*=t;this.imuln(d),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this._strip()},i.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},i.prototype._move=function(e){u(e,this)},i.prototype.clone=function(){var e=new i(null);return this.copy(e),e},i.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},i.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=l}catch(e){i.prototype.inspect=l}else i.prototype.inspect=l;function l(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],p=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=0|e.words[0],s=0|t.words[0],a=i*s,o=67108863&a,c=a/67108864|0;n.words[0]=o;for(var u=1;u<r;u++){for(var l=c>>>26,d=67108863&c,p=Math.min(u,t.length-1),f=Math.max(0,u-e.length+1);f<=p;f++){var h=u-f|0;l+=(a=(i=0|e.words[h])*(s=0|t.words[f])+d)/67108864|0,d=67108863&a}n.words[u]=0|d,c=0|l}return 0!==c?n.words[u]=0|c:n.length--,n._strip()}i.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,s=0,a=0;a<this.length;a++){var o=this.words[a],c=(16777215&(o<<i|s)).toString(16);s=o>>>24-i&16777215,(i+=2)>=26&&(i-=26,a--),r=0!==s||a!==this.length-1?d[6-c.length]+c+r:c+r}for(0!==s&&(r=s.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var u=p[e],l=f[e];r="";var h=this.clone();for(h.negative=0;!h.isZero();){var m=h.modrn(l).toString(e);r=(h=h.idivn(l)).isZero()?m+r:d[u-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16,2)},s&&(i.prototype.toBuffer=function(e,t){return this.toArrayLike(s,e,t)}),i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,r){this._strip();var i=this.byteLength(),s=r||Math.max(1,i);n(i<=s,"byte array longer than desired length"),n(s>0,"Requested array length <= 0");var a=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,s);return this["_toArrayLike"+("le"===t?"LE":"BE")](a,i),a},i.prototype._toArrayLikeLE=function(e,t){for(var n=0,r=0,i=0,s=0;i<this.length;i++){var a=this.words[i]<<s|r;e[n++]=255&a,n<e.length&&(e[n++]=a>>8&255),n<e.length&&(e[n++]=a>>16&255),6===s?(n<e.length&&(e[n++]=a>>24&255),r=0,s=0):(r=a>>>24,s+=2)}if(n<e.length)for(e[n++]=r;n<e.length;)e[n++]=0},i.prototype._toArrayLikeBE=function(e,t){for(var n=e.length-1,r=0,i=0,s=0;i<this.length;i++){var a=this.words[i]<<s|r;e[n--]=255&a,n>=0&&(e[n--]=a>>8&255),n>=0&&(e[n--]=a>>16&255),6===s?(n>=0&&(e[n--]=a>>24&255),r=0,s=0):(r=a>>>24,s+=2)}if(n>=0)for(e[n--]=r;n>=0;)e[n--]=0},Math.clz32?i.prototype._countBits=function(e){return 32-Math.clz32(e)}:i.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 8191&t||(n+=13,t>>>=13),127&t||(n+=7,t>>>=7),15&t||(n+=4,t>>>=4),3&t||(n+=2,t>>>=2),1&t||n++,n},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,26!==n)break}return e},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},i.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},i.prototype.isNeg=function(){return 0!==this.negative},i.prototype.neg=function(){return this.clone().ineg()},i.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},i.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this._strip()},i.prototype.ior=function(e){return n(!(this.negative|e.negative)),this.iuor(e)},i.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this._strip()},i.prototype.iand=function(e){return n(!(this.negative|e.negative)),this.iuand(e)},i.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;r<n.length;r++)this.words[r]=t.words[r]^n.words[r];if(this!==t)for(;r<t.length;r++)this.words[r]=t.words[r];return this.length=t.length,this._strip()},i.prototype.ixor=function(e){return n(!(this.negative|e.negative)),this.iuxor(e)},i.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this._strip()},i.prototype.iadd=function(e){var t,n,r;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(n=this,r=e):(n=e,r=this);for(var i=0,s=0;s<r.length;s++)t=(0|n.words[s])+(0|r.words[s])+i,this.words[s]=67108863&t,i=t>>>26;for(;0!==i&&s<n.length;s++)t=(0|n.words[s])+i,this.words[s]=67108863&t,i=t>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;s<n.length;s++)this.words[s]=n.words[s];return this},i.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=e):(n=e,r=this);for(var s=0,a=0;a<r.length;a++)s=(t=(0|n.words[a])-(0|r.words[a])+s)>>26,this.words[a]=67108863&t;for(;0!==s&&a<n.length;a++)s=(t=(0|n.words[a])+s)>>26,this.words[a]=67108863&t;if(0===s&&a<n.length&&n!==this)for(;a<n.length;a++)this.words[a]=n.words[a];return this.length=Math.max(this.length,a),n!==this&&(this.negative=1),this._strip()},i.prototype.sub=function(e){return this.clone().isub(e)};var m=function(e,t,n){var r,i,s,a=e.words,o=t.words,c=n.words,u=0,l=0|a[0],d=8191&l,p=l>>>13,f=0|a[1],h=8191&f,m=f>>>13,g=0|a[2],y=8191&g,b=g>>>13,v=0|a[3],w=8191&v,x=v>>>13,_=0|a[4],E=8191&_,S=_>>>13,k=0|a[5],A=8191&k,T=k>>>13,M=0|a[6],R=8191&M,O=M>>>13,I=0|a[7],N=8191&I,P=I>>>13,C=0|a[8],j=8191&C,L=C>>>13,D=0|a[9],$=8191&D,U=D>>>13,B=0|o[0],z=8191&B,q=B>>>13,H=0|o[1],F=8191&H,Y=H>>>13,V=0|o[2],K=8191&V,W=V>>>13,G=0|o[3],J=8191&G,Z=G>>>13,X=0|o[4],Q=8191&X,ee=X>>>13,te=0|o[5],ne=8191&te,re=te>>>13,ie=0|o[6],se=8191&ie,ae=ie>>>13,oe=0|o[7],ce=8191&oe,ue=oe>>>13,le=0|o[8],de=8191&le,pe=le>>>13,fe=0|o[9],he=8191&fe,me=fe>>>13;n.negative=e.negative^t.negative,n.length=19;var ge=(u+(r=Math.imul(d,z))|0)+((8191&(i=(i=Math.imul(d,q))+Math.imul(p,z)|0))<<13)|0;u=((s=Math.imul(p,q))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(h,z),i=(i=Math.imul(h,q))+Math.imul(m,z)|0,s=Math.imul(m,q);var ye=(u+(r=r+Math.imul(d,F)|0)|0)+((8191&(i=(i=i+Math.imul(d,Y)|0)+Math.imul(p,F)|0))<<13)|0;u=((s=s+Math.imul(p,Y)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(y,z),i=(i=Math.imul(y,q))+Math.imul(b,z)|0,s=Math.imul(b,q),r=r+Math.imul(h,F)|0,i=(i=i+Math.imul(h,Y)|0)+Math.imul(m,F)|0,s=s+Math.imul(m,Y)|0;var be=(u+(r=r+Math.imul(d,K)|0)|0)+((8191&(i=(i=i+Math.imul(d,W)|0)+Math.imul(p,K)|0))<<13)|0;u=((s=s+Math.imul(p,W)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(w,z),i=(i=Math.imul(w,q))+Math.imul(x,z)|0,s=Math.imul(x,q),r=r+Math.imul(y,F)|0,i=(i=i+Math.imul(y,Y)|0)+Math.imul(b,F)|0,s=s+Math.imul(b,Y)|0,r=r+Math.imul(h,K)|0,i=(i=i+Math.imul(h,W)|0)+Math.imul(m,K)|0,s=s+Math.imul(m,W)|0;var ve=(u+(r=r+Math.imul(d,J)|0)|0)+((8191&(i=(i=i+Math.imul(d,Z)|0)+Math.imul(p,J)|0))<<13)|0;u=((s=s+Math.imul(p,Z)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(E,z),i=(i=Math.imul(E,q))+Math.imul(S,z)|0,s=Math.imul(S,q),r=r+Math.imul(w,F)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(x,F)|0,s=s+Math.imul(x,Y)|0,r=r+Math.imul(y,K)|0,i=(i=i+Math.imul(y,W)|0)+Math.imul(b,K)|0,s=s+Math.imul(b,W)|0,r=r+Math.imul(h,J)|0,i=(i=i+Math.imul(h,Z)|0)+Math.imul(m,J)|0,s=s+Math.imul(m,Z)|0;var we=(u+(r=r+Math.imul(d,Q)|0)|0)+((8191&(i=(i=i+Math.imul(d,ee)|0)+Math.imul(p,Q)|0))<<13)|0;u=((s=s+Math.imul(p,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(A,z),i=(i=Math.imul(A,q))+Math.imul(T,z)|0,s=Math.imul(T,q),r=r+Math.imul(E,F)|0,i=(i=i+Math.imul(E,Y)|0)+Math.imul(S,F)|0,s=s+Math.imul(S,Y)|0,r=r+Math.imul(w,K)|0,i=(i=i+Math.imul(w,W)|0)+Math.imul(x,K)|0,s=s+Math.imul(x,W)|0,r=r+Math.imul(y,J)|0,i=(i=i+Math.imul(y,Z)|0)+Math.imul(b,J)|0,s=s+Math.imul(b,Z)|0,r=r+Math.imul(h,Q)|0,i=(i=i+Math.imul(h,ee)|0)+Math.imul(m,Q)|0,s=s+Math.imul(m,ee)|0;var xe=(u+(r=r+Math.imul(d,ne)|0)|0)+((8191&(i=(i=i+Math.imul(d,re)|0)+Math.imul(p,ne)|0))<<13)|0;u=((s=s+Math.imul(p,re)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(R,z),i=(i=Math.imul(R,q))+Math.imul(O,z)|0,s=Math.imul(O,q),r=r+Math.imul(A,F)|0,i=(i=i+Math.imul(A,Y)|0)+Math.imul(T,F)|0,s=s+Math.imul(T,Y)|0,r=r+Math.imul(E,K)|0,i=(i=i+Math.imul(E,W)|0)+Math.imul(S,K)|0,s=s+Math.imul(S,W)|0,r=r+Math.imul(w,J)|0,i=(i=i+Math.imul(w,Z)|0)+Math.imul(x,J)|0,s=s+Math.imul(x,Z)|0,r=r+Math.imul(y,Q)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(b,Q)|0,s=s+Math.imul(b,ee)|0,r=r+Math.imul(h,ne)|0,i=(i=i+Math.imul(h,re)|0)+Math.imul(m,ne)|0,s=s+Math.imul(m,re)|0;var _e=(u+(r=r+Math.imul(d,se)|0)|0)+((8191&(i=(i=i+Math.imul(d,ae)|0)+Math.imul(p,se)|0))<<13)|0;u=((s=s+Math.imul(p,ae)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(N,z),i=(i=Math.imul(N,q))+Math.imul(P,z)|0,s=Math.imul(P,q),r=r+Math.imul(R,F)|0,i=(i=i+Math.imul(R,Y)|0)+Math.imul(O,F)|0,s=s+Math.imul(O,Y)|0,r=r+Math.imul(A,K)|0,i=(i=i+Math.imul(A,W)|0)+Math.imul(T,K)|0,s=s+Math.imul(T,W)|0,r=r+Math.imul(E,J)|0,i=(i=i+Math.imul(E,Z)|0)+Math.imul(S,J)|0,s=s+Math.imul(S,Z)|0,r=r+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(x,Q)|0,s=s+Math.imul(x,ee)|0,r=r+Math.imul(y,ne)|0,i=(i=i+Math.imul(y,re)|0)+Math.imul(b,ne)|0,s=s+Math.imul(b,re)|0,r=r+Math.imul(h,se)|0,i=(i=i+Math.imul(h,ae)|0)+Math.imul(m,se)|0,s=s+Math.imul(m,ae)|0;var Ee=(u+(r=r+Math.imul(d,ce)|0)|0)+((8191&(i=(i=i+Math.imul(d,ue)|0)+Math.imul(p,ce)|0))<<13)|0;u=((s=s+Math.imul(p,ue)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(j,z),i=(i=Math.imul(j,q))+Math.imul(L,z)|0,s=Math.imul(L,q),r=r+Math.imul(N,F)|0,i=(i=i+Math.imul(N,Y)|0)+Math.imul(P,F)|0,s=s+Math.imul(P,Y)|0,r=r+Math.imul(R,K)|0,i=(i=i+Math.imul(R,W)|0)+Math.imul(O,K)|0,s=s+Math.imul(O,W)|0,r=r+Math.imul(A,J)|0,i=(i=i+Math.imul(A,Z)|0)+Math.imul(T,J)|0,s=s+Math.imul(T,Z)|0,r=r+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(S,Q)|0,s=s+Math.imul(S,ee)|0,r=r+Math.imul(w,ne)|0,i=(i=i+Math.imul(w,re)|0)+Math.imul(x,ne)|0,s=s+Math.imul(x,re)|0,r=r+Math.imul(y,se)|0,i=(i=i+Math.imul(y,ae)|0)+Math.imul(b,se)|0,s=s+Math.imul(b,ae)|0,r=r+Math.imul(h,ce)|0,i=(i=i+Math.imul(h,ue)|0)+Math.imul(m,ce)|0,s=s+Math.imul(m,ue)|0;var Se=(u+(r=r+Math.imul(d,de)|0)|0)+((8191&(i=(i=i+Math.imul(d,pe)|0)+Math.imul(p,de)|0))<<13)|0;u=((s=s+Math.imul(p,pe)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul($,z),i=(i=Math.imul($,q))+Math.imul(U,z)|0,s=Math.imul(U,q),r=r+Math.imul(j,F)|0,i=(i=i+Math.imul(j,Y)|0)+Math.imul(L,F)|0,s=s+Math.imul(L,Y)|0,r=r+Math.imul(N,K)|0,i=(i=i+Math.imul(N,W)|0)+Math.imul(P,K)|0,s=s+Math.imul(P,W)|0,r=r+Math.imul(R,J)|0,i=(i=i+Math.imul(R,Z)|0)+Math.imul(O,J)|0,s=s+Math.imul(O,Z)|0,r=r+Math.imul(A,Q)|0,i=(i=i+Math.imul(A,ee)|0)+Math.imul(T,Q)|0,s=s+Math.imul(T,ee)|0,r=r+Math.imul(E,ne)|0,i=(i=i+Math.imul(E,re)|0)+Math.imul(S,ne)|0,s=s+Math.imul(S,re)|0,r=r+Math.imul(w,se)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(x,se)|0,s=s+Math.imul(x,ae)|0,r=r+Math.imul(y,ce)|0,i=(i=i+Math.imul(y,ue)|0)+Math.imul(b,ce)|0,s=s+Math.imul(b,ue)|0,r=r+Math.imul(h,de)|0,i=(i=i+Math.imul(h,pe)|0)+Math.imul(m,de)|0,s=s+Math.imul(m,pe)|0;var ke=(u+(r=r+Math.imul(d,he)|0)|0)+((8191&(i=(i=i+Math.imul(d,me)|0)+Math.imul(p,he)|0))<<13)|0;u=((s=s+Math.imul(p,me)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul($,F),i=(i=Math.imul($,Y))+Math.imul(U,F)|0,s=Math.imul(U,Y),r=r+Math.imul(j,K)|0,i=(i=i+Math.imul(j,W)|0)+Math.imul(L,K)|0,s=s+Math.imul(L,W)|0,r=r+Math.imul(N,J)|0,i=(i=i+Math.imul(N,Z)|0)+Math.imul(P,J)|0,s=s+Math.imul(P,Z)|0,r=r+Math.imul(R,Q)|0,i=(i=i+Math.imul(R,ee)|0)+Math.imul(O,Q)|0,s=s+Math.imul(O,ee)|0,r=r+Math.imul(A,ne)|0,i=(i=i+Math.imul(A,re)|0)+Math.imul(T,ne)|0,s=s+Math.imul(T,re)|0,r=r+Math.imul(E,se)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(S,se)|0,s=s+Math.imul(S,ae)|0,r=r+Math.imul(w,ce)|0,i=(i=i+Math.imul(w,ue)|0)+Math.imul(x,ce)|0,s=s+Math.imul(x,ue)|0,r=r+Math.imul(y,de)|0,i=(i=i+Math.imul(y,pe)|0)+Math.imul(b,de)|0,s=s+Math.imul(b,pe)|0;var Ae=(u+(r=r+Math.imul(h,he)|0)|0)+((8191&(i=(i=i+Math.imul(h,me)|0)+Math.imul(m,he)|0))<<13)|0;u=((s=s+Math.imul(m,me)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul($,K),i=(i=Math.imul($,W))+Math.imul(U,K)|0,s=Math.imul(U,W),r=r+Math.imul(j,J)|0,i=(i=i+Math.imul(j,Z)|0)+Math.imul(L,J)|0,s=s+Math.imul(L,Z)|0,r=r+Math.imul(N,Q)|0,i=(i=i+Math.imul(N,ee)|0)+Math.imul(P,Q)|0,s=s+Math.imul(P,ee)|0,r=r+Math.imul(R,ne)|0,i=(i=i+Math.imul(R,re)|0)+Math.imul(O,ne)|0,s=s+Math.imul(O,re)|0,r=r+Math.imul(A,se)|0,i=(i=i+Math.imul(A,ae)|0)+Math.imul(T,se)|0,s=s+Math.imul(T,ae)|0,r=r+Math.imul(E,ce)|0,i=(i=i+Math.imul(E,ue)|0)+Math.imul(S,ce)|0,s=s+Math.imul(S,ue)|0,r=r+Math.imul(w,de)|0,i=(i=i+Math.imul(w,pe)|0)+Math.imul(x,de)|0,s=s+Math.imul(x,pe)|0;var Te=(u+(r=r+Math.imul(y,he)|0)|0)+((8191&(i=(i=i+Math.imul(y,me)|0)+Math.imul(b,he)|0))<<13)|0;u=((s=s+Math.imul(b,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul($,J),i=(i=Math.imul($,Z))+Math.imul(U,J)|0,s=Math.imul(U,Z),r=r+Math.imul(j,Q)|0,i=(i=i+Math.imul(j,ee)|0)+Math.imul(L,Q)|0,s=s+Math.imul(L,ee)|0,r=r+Math.imul(N,ne)|0,i=(i=i+Math.imul(N,re)|0)+Math.imul(P,ne)|0,s=s+Math.imul(P,re)|0,r=r+Math.imul(R,se)|0,i=(i=i+Math.imul(R,ae)|0)+Math.imul(O,se)|0,s=s+Math.imul(O,ae)|0,r=r+Math.imul(A,ce)|0,i=(i=i+Math.imul(A,ue)|0)+Math.imul(T,ce)|0,s=s+Math.imul(T,ue)|0,r=r+Math.imul(E,de)|0,i=(i=i+Math.imul(E,pe)|0)+Math.imul(S,de)|0,s=s+Math.imul(S,pe)|0;var Me=(u+(r=r+Math.imul(w,he)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(x,he)|0))<<13)|0;u=((s=s+Math.imul(x,me)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul($,Q),i=(i=Math.imul($,ee))+Math.imul(U,Q)|0,s=Math.imul(U,ee),r=r+Math.imul(j,ne)|0,i=(i=i+Math.imul(j,re)|0)+Math.imul(L,ne)|0,s=s+Math.imul(L,re)|0,r=r+Math.imul(N,se)|0,i=(i=i+Math.imul(N,ae)|0)+Math.imul(P,se)|0,s=s+Math.imul(P,ae)|0,r=r+Math.imul(R,ce)|0,i=(i=i+Math.imul(R,ue)|0)+Math.imul(O,ce)|0,s=s+Math.imul(O,ue)|0,r=r+Math.imul(A,de)|0,i=(i=i+Math.imul(A,pe)|0)+Math.imul(T,de)|0,s=s+Math.imul(T,pe)|0;var Re=(u+(r=r+Math.imul(E,he)|0)|0)+((8191&(i=(i=i+Math.imul(E,me)|0)+Math.imul(S,he)|0))<<13)|0;u=((s=s+Math.imul(S,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,r=Math.imul($,ne),i=(i=Math.imul($,re))+Math.imul(U,ne)|0,s=Math.imul(U,re),r=r+Math.imul(j,se)|0,i=(i=i+Math.imul(j,ae)|0)+Math.imul(L,se)|0,s=s+Math.imul(L,ae)|0,r=r+Math.imul(N,ce)|0,i=(i=i+Math.imul(N,ue)|0)+Math.imul(P,ce)|0,s=s+Math.imul(P,ue)|0,r=r+Math.imul(R,de)|0,i=(i=i+Math.imul(R,pe)|0)+Math.imul(O,de)|0,s=s+Math.imul(O,pe)|0;var Oe=(u+(r=r+Math.imul(A,he)|0)|0)+((8191&(i=(i=i+Math.imul(A,me)|0)+Math.imul(T,he)|0))<<13)|0;u=((s=s+Math.imul(T,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul($,se),i=(i=Math.imul($,ae))+Math.imul(U,se)|0,s=Math.imul(U,ae),r=r+Math.imul(j,ce)|0,i=(i=i+Math.imul(j,ue)|0)+Math.imul(L,ce)|0,s=s+Math.imul(L,ue)|0,r=r+Math.imul(N,de)|0,i=(i=i+Math.imul(N,pe)|0)+Math.imul(P,de)|0,s=s+Math.imul(P,pe)|0;var Ie=(u+(r=r+Math.imul(R,he)|0)|0)+((8191&(i=(i=i+Math.imul(R,me)|0)+Math.imul(O,he)|0))<<13)|0;u=((s=s+Math.imul(O,me)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul($,ce),i=(i=Math.imul($,ue))+Math.imul(U,ce)|0,s=Math.imul(U,ue),r=r+Math.imul(j,de)|0,i=(i=i+Math.imul(j,pe)|0)+Math.imul(L,de)|0,s=s+Math.imul(L,pe)|0;var Ne=(u+(r=r+Math.imul(N,he)|0)|0)+((8191&(i=(i=i+Math.imul(N,me)|0)+Math.imul(P,he)|0))<<13)|0;u=((s=s+Math.imul(P,me)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,r=Math.imul($,de),i=(i=Math.imul($,pe))+Math.imul(U,de)|0,s=Math.imul(U,pe);var Pe=(u+(r=r+Math.imul(j,he)|0)|0)+((8191&(i=(i=i+Math.imul(j,me)|0)+Math.imul(L,he)|0))<<13)|0;u=((s=s+Math.imul(L,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863;var Ce=(u+(r=Math.imul($,he))|0)+((8191&(i=(i=Math.imul($,me))+Math.imul(U,he)|0))<<13)|0;return u=((s=Math.imul(U,me))+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,c[0]=ge,c[1]=ye,c[2]=be,c[3]=ve,c[4]=we,c[5]=xe,c[6]=_e,c[7]=Ee,c[8]=Se,c[9]=ke,c[10]=Ae,c[11]=Te,c[12]=Me,c[13]=Re,c[14]=Oe,c[15]=Ie,c[16]=Ne,c[17]=Pe,c[18]=Ce,0!==u&&(c[19]=u,n.length++),n};function g(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,s=0;s<n.length-1;s++){var a=i;i=0;for(var o=67108863&r,c=Math.min(s,t.length-1),u=Math.max(0,s-e.length+1);u<=c;u++){var l=s-u,d=(0|e.words[l])*(0|t.words[u]),p=67108863&d;o=67108863&(p=p+o|0),i+=(a=(a=a+(d/67108864|0)|0)+(p>>>26)|0)>>>26,a&=67108863}n.words[s]=o,r=a,a=i}return 0!==r?n.words[s]=r:n.length--,n._strip()}function y(e,t,n){return g(e,t,n)}Math.imul||(m=h),i.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?m(this,e,t):n<63?h(this,e,t):n<1024?g(this,e,t):y(this,e,t)},i.prototype.mul=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},i.prototype.mulf=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),y(this,e,t)},i.prototype.imul=function(e){return this.clone().mulTo(e,this)},i.prototype.imuln=function(e){var t=e<0;t&&(e=-e),n("number"==typeof e),n(e<67108864);for(var r=0,i=0;i<this.length;i++){var s=(0|this.words[i])*e,a=(67108863&s)+(67108863&r);r>>=26,r+=s/67108864|0,r+=a>>>26,this.words[i]=67108863&a}return 0!==r&&(this.words[i]=r,this.length++),t?this.ineg():this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n<t.length;n++){var r=n/26|0,i=n%26;t[n]=e.words[r]>>>i&1}return t}(e);if(0===t.length)return new i(1);for(var n=this,r=0;r<t.length&&0===t[r];r++,n=n.sqr());if(++r<t.length)for(var s=n.sqr();r<t.length;r++,s=s.sqr())0!==t[r]&&(n=n.mul(s));return n},i.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,s=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t<this.length;t++){var o=this.words[t]&s,c=(0|this.words[t])-o<<r;this.words[t]=c|a,a=o>>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this._strip()},i.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},i.prototype.iushrn=function(e,t,r){var i;n("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var s=e%26,a=Math.min((e-s)/26,this.length),o=67108863^67108863>>>s<<s,c=r;if(i-=a,i=Math.max(0,i),c){for(var u=0;u<a;u++)c.words[u]=this.words[u];c.length=a}if(0===a);else if(this.length>a)for(this.length-=a,u=0;u<this.length;u++)this.words[u]=this.words[u+a];else this.words[0]=0,this.length=1;var l=0;for(u=this.length-1;u>=0&&(0!==l||u>=i);u--){var d=0|this.words[u];this.words[u]=l<<26-s|d>>>s,l=d&o}return c&&0!==l&&(c.words[c.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;return!(this.length<=r||!(this.words[r]&i))},i.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this._strip()},i.prototype.maskn=function(e){return this.clone().imaskn(e)},i.prototype.iaddn=function(e){return n("number"==typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<=e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},i.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this._strip()},i.prototype.addn=function(e){return this.clone().iaddn(e)},i.prototype.subn=function(e){return this.clone().isubn(e)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(e,t,r){var i,s,a=e.length+r;this._expand(a);var o=0;for(i=0;i<e.length;i++){s=(0|this.words[i+r])+o;var c=(0|e.words[i])*t;o=((s-=67108863&c)>>26)-(c/67108864|0),this.words[i+r]=67108863&s}for(;i<this.length-r;i++)o=(s=(0|this.words[i+r])+o)>>26,this.words[i+r]=67108863&s;if(0===o)return this._strip();for(n(-1===o),o=0,i=0;i<this.length;i++)o=(s=-(0|this.words[i])+o)>>26,this.words[i]=67108863&s;return this.negative=1,this._strip()},i.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),s=e,a=0|s.words[s.length-1];0!=(n=26-this._countBits(a))&&(s=s.ushln(n),r.iushln(n),a=0|s.words[s.length-1]);var o,c=r.length-s.length;if("mod"!==t){(o=new i(null)).length=c+1,o.words=new Array(o.length);for(var u=0;u<o.length;u++)o.words[u]=0}var l=r.clone()._ishlnsubmul(s,1,c);0===l.negative&&(r=l,o&&(o.words[c]=1));for(var d=c-1;d>=0;d--){var p=67108864*(0|r.words[s.length+d])+(0|r.words[s.length+d-1]);for(p=Math.min(p/a|0,67108863),r._ishlnsubmul(s,p,d);0!==r.negative;)p--,r.negative=0,r._ishlnsubmul(s,1,d),r.isZero()||(r.negative^=1);o&&(o.words[d]=p)}return o&&o._strip(),r._strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:o||null,mod:r}},i.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,t),"mod"!==t&&(s=o.div.neg()),"div"!==t&&(a=o.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:s,mod:a}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),t),"mod"!==t&&(s=o.div.neg()),{div:s,mod:o.mod}):this.negative&e.negative?(o=this.neg().divmod(e.neg(),t),"div"!==t&&(a=o.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:o.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modrn(e.words[0]))}:this._wordDiv(e,t);var s,a,o},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),s=n.cmp(r);return s<0||1===i&&0===s?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=(1<<26)%e,i=0,s=this.length-1;s>=0;s--)i=(r*i+(0|this.words[s]))%e;return t?-i:i},i.prototype.modn=function(e){return this.modrn(e)},i.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var s=(0|this.words[i])+67108864*r;this.words[i]=s/e|0,r=s%e}return this._strip(),t?this.ineg():this},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var s=new i(1),a=new i(0),o=new i(0),c=new i(1),u=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++u;for(var l=r.clone(),d=t.clone();!t.isZero();){for(var p=0,f=1;!(t.words[0]&f)&&p<26;++p,f<<=1);if(p>0)for(t.iushrn(p);p-- >0;)(s.isOdd()||a.isOdd())&&(s.iadd(l),a.isub(d)),s.iushrn(1),a.iushrn(1);for(var h=0,m=1;!(r.words[0]&m)&&h<26;++h,m<<=1);if(h>0)for(r.iushrn(h);h-- >0;)(o.isOdd()||c.isOdd())&&(o.iadd(l),c.isub(d)),o.iushrn(1),c.iushrn(1);t.cmp(r)>=0?(t.isub(r),s.isub(o),a.isub(c)):(r.isub(t),o.isub(s),c.isub(a))}return{a:o,b:c,gcd:r.iushln(u)}},i.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var s,a=new i(1),o=new i(0),c=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,l=1;!(t.words[0]&l)&&u<26;++u,l<<=1);if(u>0)for(t.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(c),a.iushrn(1);for(var d=0,p=1;!(r.words[0]&p)&&d<26;++d,p<<=1);if(d>0)for(r.iushrn(d);d-- >0;)o.isOdd()&&o.iadd(c),o.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(o)):(r.isub(t),o.isub(a))}return(s=0===t.cmpn(1)?a:o).cmpn(0)<0&&s.iadd(e),s},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var s=t;t=n,n=s}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return!(1&this.words[0])},i.prototype.isOdd=function(){return!(1&~this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var s=i,a=r;0!==s&&a<this.length;a++){var o=0|this.words[a];s=(o+=s)>>>26,o&=67108863,this.words[a]=o}return 0!==s&&(this.words[a]=s,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},i.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},i.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|e.words[n];if(r!==i){r<i?t=-1:r>i&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new S(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var b={k256:null,p224:null,p192:null,p25519:null};function v(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function w(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function x(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function E(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(e){if("string"==typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function k(e){S.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},v.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},v.prototype.split=function(e,t){e.iushrn(this.n,0,t)},v.prototype.imulK=function(e){return e.imul(this.k)},r(w,v),w.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),i=0;i<r;i++)t.words[i]=e.words[i];if(t.length=r,e.length<=9)return e.words[0]=0,void(e.length=1);var s=e.words[9];for(t.words[t.length++]=s&n,i=10;i<e.length;i++){var a=0|e.words[i];e.words[i-10]=(a&n)<<4|s>>>22,s=a}s>>>=22,e.words[i-10]=s,0===s&&e.length>10?e.length-=10:e.length-=9},w.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var r=0|e.words[n];t+=977*r,e.words[n]=67108863&t,t=64*r+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},r(x,v),r(_,v),r(E,v),E.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var r=19*(0|e.words[n])+t,i=67108863&r;r>>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(b[e])return b[e];var t;if("k256"===e)t=new w;else if("p224"===e)t=new x;else if("p192"===e)t=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new E}return b[e]=t,t},S.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},S.prototype._verify2=function(e,t){n(!(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},S.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(u(e,e.umod(this.m)._forceRed(this)),e)},S.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},S.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},S.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},S.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},S.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},S.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},S.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},S.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},S.prototype.isqr=function(e){return this.imul(e,e.clone())},S.prototype.sqr=function(e){return this.mul(e,e)},S.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new i(1)).iushrn(2);return this.pow(e,r)}for(var s=this.m.subn(1),a=0;!s.isZero()&&0===s.andln(1);)a++,s.iushrn(1);n(!s.isZero());var o=new i(1).toRed(this),c=o.redNeg(),u=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new i(2*l*l).toRed(this);0!==this.pow(l,u).cmp(c);)l.redIAdd(c);for(var d=this.pow(l,s),p=this.pow(e,s.addn(1).iushrn(1)),f=this.pow(e,s),h=a;0!==f.cmp(o);){for(var m=f,g=0;0!==m.cmp(o);g++)m=m.redSqr();n(g<h);var y=this.pow(d,new i(1).iushln(h-g-1));p=p.redMul(y),d=y.redSqr(),f=f.redMul(d),h=g}return p},S.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},S.prototype.pow=function(e,t){if(t.isZero())return new i(1).toRed(this);if(0===t.cmpn(1))return e.clone();var n=new Array(16);n[0]=new i(1).toRed(this),n[1]=e;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],e);var s=n[0],a=0,o=0,c=t.bitLength()%26;for(0===c&&(c=26),r=t.length-1;r>=0;r--){for(var u=t.words[r],l=c-1;l>=0;l--){var d=u>>l&1;s!==n[0]&&(s=this.sqr(s)),0!==d||0!==a?(a<<=1,a|=d,(4==++o||0===r&&0===l)&&(s=this.mul(s,n[a]),o=0,a=0)):o=0}c=26}return s},S.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},S.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new k(e)},r(k,S),k.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},k.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},k.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},k.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=n.isub(r).iushrn(this.shift),a=s;return s.cmp(this.m)>=0?a=s.isub(this.m):s.cmpn(0)<0&&(a=s.iadd(this.m)),a._forceRed(this)},k.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(cf,uf)),cf.exports}var df,pf,ff,hf={};function mf(){if(df)return hf;df=1;var e=hf&&hf.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(hf,"__esModule",{value:!0}),hf.getLength=hf.decode=hf.encode=void 0;const t=e(lf());function n(e,t){if("0"===e[0]&&"0"===e[1])throw new Error("invalid RLP: extra zeros");return parseInt(e,t)}function r(e,t){if(e<56)return Buffer.from([e+t]);{const n=a(e),r=a(t+55+n.length/2);return Buffer.from(r+n,"hex")}}function i(e){let t,r,s,a,o;const c=[],u=e[0];if(u<=127)return{data:e.slice(0,1),remainder:e.slice(1)};if(u<=183){if(t=u-127,s=128===u?Buffer.from([]):e.slice(1,t),2===t&&s[0]<128)throw new Error("invalid rlp encoding: byte must be less 0x80");return{data:s,remainder:e.slice(t)}}if(u<=191){if(r=u-182,e.length-1<r)throw new Error("invalid RLP: not enough bytes for string length");if(t=n(e.slice(1,r).toString("hex"),16),t<=55)throw new Error("invalid RLP: expected string length to be greater than 55");if(s=e.slice(r,t+r),s.length<t)throw new Error("invalid RLP: not enough bytes for string");return{data:s,remainder:e.slice(t+r)}}if(u<=247){for(t=u-191,a=e.slice(1,t);a.length;)o=i(a),c.push(o.data),a=o.remainder;return{data:c,remainder:e.slice(t)}}{r=u-246,t=n(e.slice(1,r).toString("hex"),16);const s=r+t;if(s>e.length)throw new Error("invalid rlp: total length is larger than the data");if(a=e.slice(r,s),0===a.length)throw new Error("invalid rlp, List has a invalid length");for(;a.length;)o=i(a),c.push(o.data),a=o.remainder;return{data:c,remainder:e.slice(s)}}}function s(e){return"0x"===e.slice(0,2)}function a(e){if(e<0)throw new Error("Invalid integer as argument, must be unsigned!");const t=e.toString(16);return t.length%2?`0${t}`:t}function o(e){if(!Buffer.isBuffer(e)){if("string"==typeof e)return s(e)?Buffer.from((n="string"!=typeof(r=e)?r:s(r)?r.slice(2):r).length%2?`0${n}`:n,"hex"):Buffer.from(e);if("number"==typeof e||"bigint"==typeof e)return e?function(e){const t=a(e);return Buffer.from(t,"hex")}(e):Buffer.from([]);if(null==e)return Buffer.from([]);if(e instanceof Uint8Array)return Buffer.from(e);if(t.default.isBN(e))return Buffer.from(e.toArray());throw new Error("invalid type")}var n,r;return e}return hf.encode=function e(t){if(Array.isArray(t)){const n=[];for(let r=0;r<t.length;r++)n.push(e(t[r]));const i=Buffer.concat(n);return Buffer.concat([r(i.length,192),i])}{const e=o(t);return 1===e.length&&e[0]<128?e:Buffer.concat([r(e.length,128),e])}},hf.decode=function(e,t=!1){if(!e||0===e.length)return Buffer.from([]);const n=i(o(e));if(t)return n;if(0!==n.remainder.length)throw new Error("invalid remainder");return n.data},hf.getLength=function(e){if(!e||0===e.length)return Buffer.from([]);const t=o(e),r=t[0];if(r<=127)return t.length;if(r<=183)return r-127;if(r<=191)return r-182;if(r<=247)return r-191;{const e=r-246;return e+n(t.slice(1,e).toString("hex"),16)}},hf}function gf(){if(pf)return of;pf=1;var e=of&&of.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),t=of&&of.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=of&&of.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var i in n)"default"!==i&&Object.prototype.hasOwnProperty.call(n,i)&&e(r,n,i);return t(r,n),r},r=of&&of.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(of,"__esModule",{value:!0}),of.rlp=of.BN=void 0;const i=r(lf());of.BN=i.default;const s=n(mf());return of.rlp=s,of}function yf(){return ff||(ff=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.KECCAK256_RLP=e.KECCAK256_RLP_S=e.KECCAK256_RLP_ARRAY=e.KECCAK256_RLP_ARRAY_S=e.KECCAK256_NULL=e.KECCAK256_NULL_S=e.TWO_POW256=e.MAX_INTEGER=e.MAX_UINT64=void 0;const t=p,n=gf();e.MAX_UINT64=new n.BN("ffffffffffffffff",16),e.MAX_INTEGER=new n.BN("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16),e.TWO_POW256=new n.BN("10000000000000000000000000000000000000000000000000000000000000000",16),e.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",e.KECCAK256_NULL=t.Buffer.from(e.KECCAK256_NULL_S,"hex"),e.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",e.KECCAK256_RLP_ARRAY=t.Buffer.from(e.KECCAK256_RLP_ARRAY_S,"hex"),e.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",e.KECCAK256_RLP=t.Buffer.from(e.KECCAK256_RLP_S,"hex")}(af)),af}var bf,vf,wf,xf,_f,Ef,Sf,kf,Af,Tf,Mf,Rf,Of={},If={},Nf={exports:{}},Pf={exports:{}};function Cf(){if(wf)return Pf.exports;wf=1;const e="function"==typeof __webpack_require__?__non_webpack_require__:Xa;return"function"==typeof e.addon?Pf.exports=e.addon.bind(e):Pf.exports=function(){if(vf)return bf;vf=1;var e=n,t=s,r=l,i="function"==typeof __webpack_require__?__non_webpack_require__:Xa,a=process.config&&process.config.variables||{},o=!!process.env.PREBUILDS_ONLY,c=process.versions.modules,u=process.versions&&process.versions.electron||process.env.ELECTRON_RUN_AS_NODE||"undefined"!=typeof window&&window.process&&"renderer"===window.process.type?"electron":process.versions&&process.versions.nw?"node-webkit":"node",d=process.env.npm_config_arch||r.arch(),p=process.env.npm_config_platform||r.platform(),f=process.env.LIBC||(function(t){return"linux"===t&&e.existsSync("/etc/alpine-release")}(p)?"musl":"glibc"),h=process.env.ARM_VERSION||("arm64"===d?"8":a.arm_version)||"",m=(process.versions.uv||"").split(".")[0];function g(e){return i(g.resolve(e))}function y(t){try{return e.readdirSync(t)}catch(e){return[]}}function b(e,n){var r=y(e).filter(n);return r[0]&&t.join(e,r[0])}function v(e){return/\.node$/.test(e)}function w(e){var t=e.split("-");if(2===t.length){var n=t[0],r=t[1].split("+");if(n&&r.length&&r.every(Boolean))return{name:e,platform:n,architectures:r}}}function x(e,t){return function(n){return null!=n&&n.platform===e&&n.architectures.includes(t)}}function _(e,t){return e.architectures.length-t.architectures.length}function E(e){var t=e.split("."),n={file:e,specificity:0};if("node"===t.pop()){for(var r=0;r<t.length;r++){var i=t[r];if("node"===i||"electron"===i||"node-webkit"===i)n.runtime=i;else if("napi"===i)n.napi=!0;else if("abi"===i.slice(0,3))n.abi=i.slice(3);else if("uv"===i.slice(0,2))n.uv=i.slice(2);else if("armv"===i.slice(0,4))n.armv=i.slice(4);else{if("glibc"!==i&&"musl"!==i)continue;n.libc=i}n.specificity++}return n}}function S(e,t){return function(n){return!(null==n||n.runtime&&n.runtime!==e&&!function(e){return"node"===e.runtime&&e.napi}(n)||n.abi&&n.abi!==t&&!n.napi||n.uv&&n.uv!==m||n.armv&&n.armv!==h||n.libc&&n.libc!==f)}}function k(e){return function(t,n){return t.runtime!==n.runtime?t.runtime===e?-1:1:t.abi!==n.abi?t.abi?-1:1:t.specificity!==n.specificity?t.specificity>n.specificity?-1:1:0}}return bf=g,g.resolve=g.path=function(e){e=t.resolve(e||".");try{var n=i(t.join(e,"package.json")).name.toUpperCase().replace(/-/g,"_");process.env[n+"_PREBUILD"]&&(e=process.env[n+"_PREBUILD"])}catch(e){}if(!o){var r=b(t.join(e,"build/Release"),v);if(r)return r;var s=b(t.join(e,"build/Debug"),v);if(s)return s}var a=A(e);if(a)return a;var l=A(t.dirname(process.execPath));if(l)return l;var g=["platform="+p,"arch="+d,"runtime="+u,"abi="+c,"uv="+m,h?"armv="+h:"","libc="+f,"node="+process.versions.node,process.versions.electron?"electron="+process.versions.electron:"","function"==typeof __webpack_require__?"webpack=true":""].filter(Boolean).join(" ");throw new Error("No native build was found for "+g+"\n loaded from: "+e+"\n");function A(e){var n=y(t.join(e,"prebuilds")).map(w).filter(x(p,d)).sort(_)[0];if(n){var r=t.join(e,"prebuilds",n.name),i=y(r).map(E).filter(S(u,c)).sort(k(u))[0];return i?t.join(r,i.file):void 0}}},g.parseTags=E,g.matchTags=S,g.compareTags=k,g.parseTuple=w,g.matchTuple=x,g.compareTuples=_,bf}(),Pf.exports}function jf(){if(_f)return xf;_f=1;const e="Impossible case. Please create issue.",t="The tweak was out of range or the resulted private key is invalid",n="The tweak was out of range or equal to zero",r="Unknow error on context randomization",i="Private Key is invalid",s="Public Key could not be parsed",a="Public Key serialization error",o="The sum of the public keys is not valid",c="Signature could not be parsed",u="The nonce generation function failed, or the private key was invalid",l="Public key could not be recover",d="Scalar was invalid (zero or overflow)";function p(e,t){if(!e)throw new Error(t)}function f(e,t,n){if(p(t instanceof Uint8Array,`Expected ${e} to be an Uint8Array`),void 0!==n)if(Array.isArray(n)){const r=`Expected ${e} to be an Uint8Array with length [${n.join(", ")}]`;p(n.includes(t.length),r)}else{const r=`Expected ${e} to be an Uint8Array with length ${n}`;p(t.length===n,r)}}function h(e){p("Boolean"===g(e),"Expected compressed to be a Boolean")}function m(e=e=>new Uint8Array(e),t){return"function"==typeof e&&(e=e(t)),f("output",e,t),e}function g(e){return Object.prototype.toString.call(e).slice(8,-1)}return xf=y=>({contextRandomize(e){if(p(null===e||e instanceof Uint8Array,"Expected seed to be an Uint8Array or null"),null!==e&&f("seed",e,32),1===y.contextRandomize(e))throw new Error(r)},privateKeyVerify:e=>(f("private key",e,32),0===y.privateKeyVerify(e)),privateKeyNegate(t){switch(f("private key",t,32),y.privateKeyNegate(t)){case 0:return t;case 1:throw new Error(e)}},privateKeyTweakAdd(e,n){switch(f("private key",e,32),f("tweak",n,32),y.privateKeyTweakAdd(e,n)){case 0:return e;case 1:throw new Error(t)}},privateKeyTweakMul(e,t){switch(f("private key",e,32),f("tweak",t,32),y.privateKeyTweakMul(e,t)){case 0:return e;case 1:throw new Error(n)}},publicKeyVerify:e=>(f("public key",e,[33,65]),0===y.publicKeyVerify(e)),publicKeyCreate(e,t=!0,n){switch(f("private key",e,32),h(t),n=m(n,t?33:65),y.publicKeyCreate(n,e)){case 0:return n;case 1:throw new Error(i);case 2:throw new Error(a)}},publicKeyConvert(e,t=!0,n){switch(f("public key",e,[33,65]),h(t),n=m(n,t?33:65),y.publicKeyConvert(n,e)){case 0:return n;case 1:throw new Error(s);case 2:throw new Error(a)}},publicKeyNegate(t,n=!0,r){switch(f("public key",t,[33,65]),h(n),r=m(r,n?33:65),y.publicKeyNegate(r,t)){case 0:return r;case 1:throw new Error(s);case 2:throw new Error(e);case 3:throw new Error(a)}},publicKeyCombine(e,t=!0,n){p(Array.isArray(e),"Expected public keys to be an Array"),p(e.length>0,"Expected public keys array will have more than zero items");for(const t of e)f("public key",t,[33,65]);switch(h(t),n=m(n,t?33:65),y.publicKeyCombine(n,e)){case 0:return n;case 1:throw new Error(s);case 2:throw new Error(o);case 3:throw new Error(a)}},publicKeyTweakAdd(e,n,r=!0,i){switch(f("public key",e,[33,65]),f("tweak",n,32),h(r),i=m(i,r?33:65),y.publicKeyTweakAdd(i,e,n)){case 0:return i;case 1:throw new Error(s);case 2:throw new Error(t)}},publicKeyTweakMul(e,t,r=!0,i){switch(f("public key",e,[33,65]),f("tweak",t,32),h(r),i=m(i,r?33:65),y.publicKeyTweakMul(i,e,t)){case 0:return i;case 1:throw new Error(s);case 2:throw new Error(n)}},signatureNormalize(e){switch(f("signature",e,64),y.signatureNormalize(e)){case 0:return e;case 1:throw new Error(c)}},signatureExport(t,n){f("signature",t,64);const r={output:n=m(n,72),outputlen:72};switch(y.signatureExport(r,t)){case 0:return n.slice(0,r.outputlen);case 1:throw new Error(c);case 2:throw new Error(e)}},signatureImport(t,n){switch(f("signature",t),n=m(n,64),y.signatureImport(n,t)){case 0:return n;case 1:throw new Error(c);case 2:throw new Error(e)}},ecdsaSign(t,n,r={},i){f("message",t,32),f("private key",n,32),p("Object"===g(r),"Expected options to be an Object"),void 0!==r.data&&f("options.data",r.data),void 0!==r.noncefn&&p("Function"===g(r.noncefn),"Expected options.noncefn to be a Function");const s={signature:i=m(i,64),recid:null};switch(y.ecdsaSign(s,t,n,r.data,r.noncefn)){case 0:return s;case 1:throw new Error(u);case 2:throw new Error(e)}},ecdsaVerify(e,t,n){switch(f("signature",e,64),f("message",t,32),f("public key",n,[33,65]),y.ecdsaVerify(e,t,n)){case 0:return!0;case 3:return!1;case 1:throw new Error(c);case 2:throw new Error(s)}},ecdsaRecover(t,n,r,i=!0,s){switch(f("signature",t,64),p("Number"===g(n)&&n>=0&&n<=3,"Expected recovery id to be a Number within interval [0, 3]"),f("message",r,32),h(i),s=m(s,i?33:65),y.ecdsaRecover(s,t,n,r)){case 0:return s;case 1:throw new Error(c);case 2:throw new Error(l);case 3:throw new Error(e)}},ecdh(e,t,n={},r){switch(f("public key",e,[33,65]),f("private key",t,32),p("Object"===g(n),"Expected options to be an Object"),void 0!==n.data&&f("options.data",n.data),void 0!==n.hashfn?(p("Function"===g(n.hashfn),"Expected options.hashfn to be a Function"),void 0!==n.xbuf&&f("options.xbuf",n.xbuf,32),void 0!==n.ybuf&&f("options.ybuf",n.ybuf,32),f("output",r)):r=m(r,32),y.ecdh(r,e,t,n.data,n.hashfn,n.xbuf,n.ybuf)){case 0:return r;case 1:throw new Error(s);case 2:throw new Error(d)}}}),xf}function Lf(){if(Af)return kf;Af=1;const e=new(0,Gp().ec)("secp256k1"),t=e.curve,n=t.n.constructor;function r(r){const i=r[0];switch(i){case 2:case 3:return 33!==r.length?null:function(r,i){let s=new n(i);if(s.cmp(t.p)>=0)return null;s=s.toRed(t.red);let a=s.redSqr().redIMul(s).redIAdd(t.b).redSqrt();3===r!==a.isOdd()&&(a=a.redNeg());const o=s.redSqr().redIMul(s);return a.redSqr().redISub(o.redIAdd(t.b)).isZero()?e.keyPair({pub:{x:s,y:a}}):null}(i,r.subarray(1,33));case 4:case 6:case 7:return 65!==r.length?null:function(r,i,s){let a=new n(i),o=new n(s);if(a.cmp(t.p)>=0||o.cmp(t.p)>=0)return null;if(a=a.toRed(t.red),o=o.toRed(t.red),(6===r||7===r)&&o.isOdd()!==(7===r))return null;const c=a.redSqr().redIMul(a);return o.redSqr().redISub(c.redIAdd(t.b)).isZero()?e.keyPair({pub:{x:a,y:o}}):null}(i,r.subarray(1,33),r.subarray(33,65));default:return null}}function i(e,t){const n=t.encode(null,33===e.length);for(let t=0;t<e.length;++t)e[t]=n[t]}return kf={contextRandomize:()=>0,privateKeyVerify(e){const r=new n(e);return r.cmp(t.n)<0&&!r.isZero()?0:1},privateKeyNegate(e){const r=new n(e),i=t.n.sub(r).umod(t.n).toArrayLike(Uint8Array,"be",32);return e.set(i),0},privateKeyTweakAdd(e,r){const i=new n(r);if(i.cmp(t.n)>=0)return 1;if(i.iadd(new n(e)),i.cmp(t.n)>=0&&i.isub(t.n),i.isZero())return 1;const s=i.toArrayLike(Uint8Array,"be",32);return e.set(s),0},privateKeyTweakMul(e,r){let i=new n(r);if(i.cmp(t.n)>=0||i.isZero())return 1;i.imul(new n(e)),i.cmp(t.n)>=0&&(i=i.umod(t.n));const s=i.toArrayLike(Uint8Array,"be",32);return e.set(s),0},publicKeyVerify:e=>null===r(e)?1:0,publicKeyCreate(r,s){const a=new n(s);if(a.cmp(t.n)>=0||a.isZero())return 1;return i(r,e.keyFromPrivate(s).getPublic()),0},publicKeyConvert(e,t){const n=r(t);if(null===n)return 1;return i(e,n.getPublic()),0},publicKeyNegate(e,t){const n=r(t);if(null===n)return 1;const s=n.getPublic();return s.y=s.y.redNeg(),i(e,s),0},publicKeyCombine(e,t){const n=new Array(t.length);for(let e=0;e<t.length;++e)if(n[e]=r(t[e]),null===n[e])return 1;let s=n[0].getPublic();for(let e=1;e<n.length;++e)s=s.add(n[e].pub);return s.isInfinity()?2:(i(e,s),0)},publicKeyTweakAdd(e,s,a){const o=r(s);if(null===o)return 1;if((a=new n(a)).cmp(t.n)>=0)return 2;const c=o.getPublic().add(t.g.mul(a));return c.isInfinity()?2:(i(e,c),0)},publicKeyTweakMul(e,s,a){const o=r(s);if(null===o)return 1;if((a=new n(a)).cmp(t.n)>=0||a.isZero())return 2;return i(e,o.getPublic().mul(a)),0},signatureNormalize(r){const i=new n(r.subarray(0,32)),s=new n(r.subarray(32,64));return i.cmp(t.n)>=0||s.cmp(t.n)>=0?1:(1===s.cmp(e.nh)&&r.set(t.n.sub(s).toArrayLike(Uint8Array,"be",32),32),0)},signatureExport(e,r){const i=r.subarray(0,32),s=r.subarray(32,64);if(new n(i).cmp(t.n)>=0)return 1;if(new n(s).cmp(t.n)>=0)return 1;const{output:a}=e;let o=a.subarray(4,37);o[0]=0,o.set(i,1);let c=33,u=0;for(;c>1&&0===o[u]&&!(128&o[u+1]);--c,++u);if(o=o.subarray(u),128&o[0])return 1;if(c>1&&0===o[0]&&!(128&o[1]))return 1;let l=a.subarray(39,72);l[0]=0,l.set(s,1);let d=33,p=0;for(;d>1&&0===l[p]&&!(128&l[p+1]);--d,++p);return l=l.subarray(p),128&l[0]||d>1&&0===l[0]&&!(128&l[1])?1:(e.outputlen=6+c+d,a[0]=48,a[1]=e.outputlen-2,a[2]=2,a[3]=o.length,a.set(o,4),a[4+c]=2,a[5+c]=l.length,a.set(l,6+c),0)},signatureImport(e,r){if(r.length<8)return 1;if(r.length>72)return 1;if(48!==r[0])return 1;if(r[1]!==r.length-2)return 1;if(2!==r[2])return 1;const i=r[3];if(0===i)return 1;if(5+i>=r.length)return 1;if(2!==r[4+i])return 1;const s=r[5+i];if(0===s)return 1;if(6+i+s!==r.length)return 1;if(128&r[4])return 1;if(i>1&&0===r[4]&&!(128&r[5]))return 1;if(128&r[i+6])return 1;if(s>1&&0===r[i+6]&&!(128&r[i+7]))return 1;let a=r.subarray(4,4+i);if(33===a.length&&0===a[0]&&(a=a.subarray(1)),a.length>32)return 1;let o=r.subarray(6+i);if(33===o.length&&0===o[0]&&(o=o.slice(1)),o.length>32)throw new Error("S length is too long");let c=new n(a);c.cmp(t.n)>=0&&(c=new n(0));let u=new n(r.subarray(6+i));return u.cmp(t.n)>=0&&(u=new n(0)),e.set(c.toArrayLike(Uint8Array,"be",32),0),e.set(u.toArrayLike(Uint8Array,"be",32),32),0},ecdsaSign(r,i,s,a,o){if(o){const e=o;o=t=>{const r=e(i,s,null,a,t);if(!(r instanceof Uint8Array&&32===r.length))throw new Error("This is the way");return new n(r)}}const c=new n(s);if(c.cmp(t.n)>=0||c.isZero())return 1;let u;try{u=e.sign(i,s,{canonical:!0,k:o,pers:a})}catch(e){return 1}return r.signature.set(u.r.toArrayLike(Uint8Array,"be",32),0),r.signature.set(u.s.toArrayLike(Uint8Array,"be",32),32),r.recid=u.recoveryParam,0},ecdsaVerify(i,s,a){const o={r:i.subarray(0,32),s:i.subarray(32,64)},c=new n(o.r),u=new n(o.s);if(c.cmp(t.n)>=0||u.cmp(t.n)>=0)return 1;if(1===u.cmp(e.nh)||c.isZero()||u.isZero())return 3;const l=r(a);if(null===l)return 2;const d=l.getPublic();return e.verify(s,o,d)?0:3},ecdsaRecover(r,s,a,o){const c={r:s.slice(0,32),s:s.slice(32,64)},u=new n(c.r),l=new n(c.s);if(u.cmp(t.n)>=0||l.cmp(t.n)>=0)return 1;if(u.isZero()||l.isZero())return 2;let d;try{d=e.recoverPubKey(o,c,a)}catch(e){return 2}return i(r,d),0},ecdh(i,s,a,o,c,u,l){const d=r(s);if(null===d)return 1;const p=new n(a);if(p.cmp(t.n)>=0||p.isZero())return 2;const f=d.getPublic().mul(p);if(void 0===c){const t=f.encode(null,!0),n=e.hash().update(t).digest();for(let e=0;e<32;++e)i[e]=n[e]}else{u||(u=new Uint8Array(32));const e=f.getX().toArray("be",32);for(let t=0;t<32;++t)u[t]=e[t];l||(l=new Uint8Array(32));const t=f.getY().toArray("be",32);for(let e=0;e<32;++e)l[e]=t[e];const n=c(u,l,o);if(!(n instanceof Uint8Array&&n.length===i.length))return 2;i.set(n)}return 0}},kf}function Df(){if(Rf)return Nf.exports;Rf=1;try{Nf.exports=function(){if(Sf)return Ef;Sf=1;const e=Cf()(__dirname);return Ef=jf()(new e.Secp256k1)}()}catch(e){Nf.exports=Mf?Tf:(Mf=1,Tf=jf()(Lf()))}return Nf.exports}var $f,Uf,Bf,zf,qf={};function Hf(){return Uf?$f:(Uf=1,$f=E.randomBytes)}function Ff(){if(Bf)return qf;Bf=1,Object.defineProperty(qf,"__esModule",{value:!0});var e=Hf();return qf.getRandomBytes=function(t){return new Promise((function(n,r){e(t,(function(e,t){e?r(e):n(t)}))}))},qf.getRandomBytesSync=function(t){return e(t)},qf}function Yf(){return zf||(zf=1,function(e){var t=If&&If.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{c(r.next(e))}catch(e){s(e)}}function o(e){try{c(r.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}c((r=r.apply(e,t||[])).next())}))},n=If&&If.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var r=Df(),i=Ff();e.createPrivateKey=function(){return t(this,void 0,void 0,(function(){var e;return n(this,(function(t){switch(t.label){case 0:return[4,i.getRandomBytes(32)];case 1:return e=t.sent(),r.privateKeyVerify(e)?[2,e]:[3,0];case 2:return[2]}}))}))},e.createPrivateKeySync=function(){for(;;){var e=i.getRandomBytesSync(32);if(r.privateKeyVerify(e))return e}},function(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}(Df())}(If)),If}var Vf,Kf={};function Wf(){if(Vf)return Kf;function e(e){if("string"!=typeof e)throw new Error("[isHexPrefixed] input must be type 'string', received type "+typeof e);return"0"===e[0]&&"x"===e[1]}Vf=1,Object.defineProperty(Kf,"__esModule",{value:!0}),Kf.isHexString=Kf.getKeys=Kf.fromAscii=Kf.fromUtf8=Kf.toAscii=Kf.arrayContainsArray=Kf.getBinarySize=Kf.padToEven=Kf.stripHexPrefix=Kf.isHexPrefixed=void 0,Kf.isHexPrefixed=e;function t(e){let t=e;if("string"!=typeof t)throw new Error("[padToEven] value must be type 'string', received "+typeof t);return t.length%2&&(t=`0${t}`),t}return Kf.stripHexPrefix=t=>{if("string"!=typeof t)throw new Error("[stripHexPrefix] input must be type 'string', received "+typeof t);return e(t)?t.slice(2):t},Kf.padToEven=t,Kf.getBinarySize=function(e){if("string"!=typeof e)throw new Error("[getBinarySize] method requires input type 'string', recieved "+typeof e);return Buffer.byteLength(e,"utf8")},Kf.arrayContainsArray=function(e,t,n){if(!0!==Array.isArray(e))throw new Error(`[arrayContainsArray] method requires input 'superset' to be an array, got type '${typeof e}'`);if(!0!==Array.isArray(t))throw new Error(`[arrayContainsArray] method requires input 'subset' to be an array, got type '${typeof t}'`);return t[n?"some":"every"]((t=>e.indexOf(t)>=0))},Kf.toAscii=function(e){let t="",n=0;const r=e.length;for("0x"===e.substring(0,2)&&(n=2);n<r;n+=2){const r=parseInt(e.substr(n,2),16);t+=String.fromCharCode(r)}return t},Kf.fromUtf8=function(e){return`0x${t(Buffer.from(e,"utf8").toString("hex")).replace(/^0+|0+$/g,"")}`},Kf.fromAscii=function(e){let t="";for(let n=0;n<e.length;n++){const r=e.charCodeAt(n).toString(16);t+=r.length<2?`0${r}`:r}return`0x${t}`},Kf.getKeys=function(e,t,n){if(!Array.isArray(e))throw new Error("[getKeys] method expects input 'params' to be an array, got "+typeof e);if("string"!=typeof t)throw new Error("[getKeys] method expects input 'key' to be type 'string', got "+typeof e);const r=[];for(let i=0;i<e.length;i++){let s=e[i][t];if(n&&!s)s="";else if("string"!=typeof s)throw new Error("invalid abi - expected type 'string', received "+typeof s);r.push(s)}return r},Kf.isHexString=function(e,t){return!("string"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/))&&(!t||e.length===2+2*t)},Kf}var Gf,Jf,Zf={},Xf={};function Qf(){if(Gf)return Xf;Gf=1,Object.defineProperty(Xf,"__esModule",{value:!0}),Xf.assertIsString=Xf.assertIsArray=Xf.assertIsBuffer=Xf.assertIsHexString=void 0;const e=Wf();Xf.assertIsHexString=function(t){if(!(0,e.isHexString)(t)){throw new Error(`This method only supports 0x-prefixed hex strings but input was: ${t}`)}};Xf.assertIsBuffer=function(e){if(!Buffer.isBuffer(e)){throw new Error(`This method only supports Buffer but input was: ${e}`)}};Xf.assertIsArray=function(e){if(!Array.isArray(e)){throw new Error(`This method only supports number arrays but input was: ${e}`)}};return Xf.assertIsString=function(e){if("string"!=typeof e){throw new Error(`This method only supports strings but input was: ${e}`)}},Xf}function eh(){return Jf||(Jf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.bufArrToArr=e.arrToBufArr=e.validateNoLeadingZeroes=e.baToJSON=e.toUtf8=e.addHexPrefix=e.toUnsigned=e.fromSigned=e.bufferToHex=e.bufferToInt=e.toBuffer=e.unpadHexString=e.unpadArray=e.unpadBuffer=e.setLengthRight=e.setLengthLeft=e.zeros=e.intToBuffer=e.intToHex=void 0;const t=gf(),n=Wf(),r=Qf();e.intToHex=function(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Received an invalid integer type: ${e}`);return`0x${e.toString(16)}`};e.intToBuffer=function(t){const r=(0,e.intToHex)(t);return Buffer.from((0,n.padToEven)(r.slice(2)),"hex")};e.zeros=function(e){return Buffer.allocUnsafe(e).fill(0)};const i=function(t,n,r){const i=(0,e.zeros)(n);return r?t.length<n?(t.copy(i),i):t.slice(0,n):t.length<n?(t.copy(i,n-t.length),i):t.slice(-n)};e.setLengthLeft=function(e,t){return(0,r.assertIsBuffer)(e),i(e,t,!1)};e.setLengthRight=function(e,t){return(0,r.assertIsBuffer)(e),i(e,t,!0)};const s=function(e){let t=e[0];for(;e.length>0&&"0"===t.toString();)t=(e=e.slice(1))[0];return e};e.unpadBuffer=function(e){return(0,r.assertIsBuffer)(e),s(e)};e.unpadArray=function(e){return(0,r.assertIsArray)(e),s(e)};e.unpadHexString=function(e){return(0,r.assertIsHexString)(e),e=(0,n.stripHexPrefix)(e),s(e)};e.toBuffer=function(r){if(null==r)return Buffer.allocUnsafe(0);if(Buffer.isBuffer(r))return Buffer.from(r);if(Array.isArray(r)||r instanceof Uint8Array)return Buffer.from(r);if("string"==typeof r){if(!(0,n.isHexString)(r))throw new Error(`Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: ${r}`);return Buffer.from((0,n.padToEven)((0,n.stripHexPrefix)(r)),"hex")}if("number"==typeof r)return(0,e.intToBuffer)(r);if(t.BN.isBN(r)){if(r.isNeg())throw new Error(`Cannot convert negative BN to buffer. Given: ${r}`);return r.toArrayLike(Buffer)}if(r.toArray)return Buffer.from(r.toArray());if(r.toBuffer)return Buffer.from(r.toBuffer());throw new Error("invalid type")};e.bufferToInt=function(n){return new t.BN((0,e.toBuffer)(n)).toNumber()};e.bufferToHex=function(t){return"0x"+(t=(0,e.toBuffer)(t)).toString("hex")};e.fromSigned=function(e){return new t.BN(e).fromTwos(256)};e.toUnsigned=function(e){return Buffer.from(e.toTwos(256).toArray())};e.addHexPrefix=function(e){return"string"!=typeof e||(0,n.isHexPrefixed)(e)?e:"0x"+e};e.toUtf8=function(e){if((e=(0,n.stripHexPrefix)(e)).length%2!=0)throw new Error("Invalid non-even hex string input for toUtf8() provided");return Buffer.from(e.replace(/^(00)+|(00)+$/g,""),"hex").toString("utf8")};e.baToJSON=function(t){if(Buffer.isBuffer(t))return`0x${t.toString("hex")}`;if(t instanceof Array){const n=[];for(let r=0;r<t.length;r++)n.push((0,e.baToJSON)(t[r]));return n}};e.validateNoLeadingZeroes=function(e){for(const[t,n]of Object.entries(e))if(void 0!==n&&n.length>0&&0===n[0])throw new Error(`${t} cannot have leading zeroes, received: ${n.toString("hex")}`)},e.arrToBufArr=function e(t){return Array.isArray(t)?t.map((t=>e(t))):Buffer.from(t)},e.bufArrToArr=function e(t){return Array.isArray(t)?t.map((t=>e(t))):Uint8Array.from(null!=t?t:[])}}(Zf)),Zf}var th,nh={},rh={},ih={};function sh(){if(th)return ih;return th=1,Object.defineProperty(ih,"__esModule",{value:!0}),ih.createHashFunction=function(e){return function(t){var n=e();return n.update(t),Buffer.from(n.digest())}},ih}var ah,oh,ch,uh,lh,dh,ph,fh,hh={exports:{}};function mh(){if(dh)return lh;dh=1;const e=function(){if(oh)return ah;oh=1;const{Transform:e}=Fi();return ah=t=>class n extends e{constructor(e,n,r,i,s){super(s),this._rate=e,this._capacity=n,this._delimitedSuffix=r,this._hashBitLength=i,this._options=s,this._state=new t,this._state.initialize(e,n),this._finalized=!1}_transform(e,t,n){let r=null;try{this.update(e,t)}catch(e){r=e}n(r)}_flush(e){let t=null;try{this.push(this.digest())}catch(e){t=e}e(t)}update(e,t){if(!Buffer.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return Buffer.isBuffer(e)||(e=Buffer.from(e,t)),this._state.absorb(e),this}digest(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);let t=this._state.squeeze(this._hashBitLength/8);return void 0!==e&&(t=t.toString(e)),this._resetState(),t}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const e=new n(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(e._state),e._finalized=this._finalized,e}},ah}(),t=function(){if(uh)return ch;uh=1;const{Transform:e}=Fi();return ch=t=>class n extends e{constructor(e,n,r,i){super(i),this._rate=e,this._capacity=n,this._delimitedSuffix=r,this._options=i,this._state=new t,this._state.initialize(e,n),this._finalized=!1}_transform(e,t,n){let r=null;try{this.update(e,t)}catch(e){r=e}n(r)}_flush(){}_read(e){this.push(this.squeeze(e))}update(e,t){if(!Buffer.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return Buffer.isBuffer(e)||(e=Buffer.from(e,t)),this._state.absorb(e),this}squeeze(e,t){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));let n=this._state.squeeze(e);return void 0!==t&&(n=n.toString(t)),n}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const e=new n(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(e._state),e._finalized=this._finalized,e}},ch}();return lh=function(n){const r=e(n),i=t(n);return function(e,t){switch("string"==typeof e?e.toLowerCase():e){case"keccak224":return new r(1152,448,null,224,t);case"keccak256":return new r(1088,512,null,256,t);case"keccak384":return new r(832,768,null,384,t);case"keccak512":return new r(576,1024,null,512,t);case"sha3-224":return new r(1152,448,6,224,t);case"sha3-256":return new r(1088,512,6,256,t);case"sha3-384":return new r(832,768,6,384,t);case"sha3-512":return new r(576,1024,6,512,t);case"shake128":return new i(1344,256,31,t);case"shake256":return new i(1088,512,31,t);default:throw new Error("Invald algorithm: "+e)}}},lh}var gh,yh,bh,vh,wh,xh,_h,Eh,Sh,kh,Ah={};function Th(){if(bh)return yh;bh=1;const e=function(){if(gh)return Ah;gh=1;const e=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648];return Ah.p1600=function(t){for(let n=0;n<24;++n){const r=t[0]^t[10]^t[20]^t[30]^t[40],i=t[1]^t[11]^t[21]^t[31]^t[41],s=t[2]^t[12]^t[22]^t[32]^t[42],a=t[3]^t[13]^t[23]^t[33]^t[43],o=t[4]^t[14]^t[24]^t[34]^t[44],c=t[5]^t[15]^t[25]^t[35]^t[45],u=t[6]^t[16]^t[26]^t[36]^t[46],l=t[7]^t[17]^t[27]^t[37]^t[47],d=t[8]^t[18]^t[28]^t[38]^t[48],p=t[9]^t[19]^t[29]^t[39]^t[49];let f=d^(s<<1|a>>>31),h=p^(a<<1|s>>>31);const m=t[0]^f,g=t[1]^h,y=t[10]^f,b=t[11]^h,v=t[20]^f,w=t[21]^h,x=t[30]^f,_=t[31]^h,E=t[40]^f,S=t[41]^h;f=r^(o<<1|c>>>31),h=i^(c<<1|o>>>31);const k=t[2]^f,A=t[3]^h,T=t[12]^f,M=t[13]^h,R=t[22]^f,O=t[23]^h,I=t[32]^f,N=t[33]^h,P=t[42]^f,C=t[43]^h;f=s^(u<<1|l>>>31),h=a^(l<<1|u>>>31);const j=t[4]^f,L=t[5]^h,D=t[14]^f,$=t[15]^h,U=t[24]^f,B=t[25]^h,z=t[34]^f,q=t[35]^h,H=t[44]^f,F=t[45]^h;f=o^(d<<1|p>>>31),h=c^(p<<1|d>>>31);const Y=t[6]^f,V=t[7]^h,K=t[16]^f,W=t[17]^h,G=t[26]^f,J=t[27]^h,Z=t[36]^f,X=t[37]^h,Q=t[46]^f,ee=t[47]^h;f=u^(r<<1|i>>>31),h=l^(i<<1|r>>>31);const te=t[8]^f,ne=t[9]^h,re=t[18]^f,ie=t[19]^h,se=t[28]^f,ae=t[29]^h,oe=t[38]^f,ce=t[39]^h,ue=t[48]^f,le=t[49]^h,de=m,pe=g,fe=b<<4|y>>>28,he=y<<4|b>>>28,me=v<<3|w>>>29,ge=w<<3|v>>>29,ye=_<<9|x>>>23,be=x<<9|_>>>23,ve=E<<18|S>>>14,we=S<<18|E>>>14,xe=k<<1|A>>>31,_e=A<<1|k>>>31,Ee=M<<12|T>>>20,Se=T<<12|M>>>20,ke=R<<10|O>>>22,Ae=O<<10|R>>>22,Te=N<<13|I>>>19,Me=I<<13|N>>>19,Re=P<<2|C>>>30,Oe=C<<2|P>>>30,Ie=L<<30|j>>>2,Ne=j<<30|L>>>2,Pe=D<<6|$>>>26,Ce=$<<6|D>>>26,je=B<<11|U>>>21,Le=U<<11|B>>>21,De=z<<15|q>>>17,$e=q<<15|z>>>17,Ue=F<<29|H>>>3,Be=H<<29|F>>>3,ze=Y<<28|V>>>4,qe=V<<28|Y>>>4,He=W<<23|K>>>9,Fe=K<<23|W>>>9,Ye=G<<25|J>>>7,Ve=J<<25|G>>>7,Ke=Z<<21|X>>>11,We=X<<21|Z>>>11,Ge=ee<<24|Q>>>8,Je=Q<<24|ee>>>8,Ze=te<<27|ne>>>5,Xe=ne<<27|te>>>5,Qe=re<<20|ie>>>12,et=ie<<20|re>>>12,tt=ae<<7|se>>>25,nt=se<<7|ae>>>25,rt=oe<<8|ce>>>24,it=ce<<8|oe>>>24,st=ue<<14|le>>>18,at=le<<14|ue>>>18;t[0]=de^~Ee&je,t[1]=pe^~Se&Le,t[10]=ze^~Qe&me,t[11]=qe^~et&ge,t[20]=xe^~Pe&Ye,t[21]=_e^~Ce&Ve,t[30]=Ze^~fe&ke,t[31]=Xe^~he&Ae,t[40]=Ie^~He&tt,t[41]=Ne^~Fe&nt,t[2]=Ee^~je&Ke,t[3]=Se^~Le&We,t[12]=Qe^~me&Te,t[13]=et^~ge&Me,t[22]=Pe^~Ye&rt,t[23]=Ce^~Ve&it,t[32]=fe^~ke&De,t[33]=he^~Ae&$e,t[42]=He^~tt&ye,t[43]=Fe^~nt&be,t[4]=je^~Ke&st,t[5]=Le^~We&at,t[14]=me^~Te&Ue,t[15]=ge^~Me&Be,t[24]=Ye^~rt&ve,t[25]=Ve^~it&we,t[34]=ke^~De&Ge,t[35]=Ae^~$e&Je,t[44]=tt^~ye&Re,t[45]=nt^~be&Oe,t[6]=Ke^~st&de,t[7]=We^~at&pe,t[16]=Te^~Ue&ze,t[17]=Me^~Be&qe,t[26]=rt^~ve&xe,t[27]=it^~we&_e,t[36]=De^~Ge&Ze,t[37]=$e^~Je&Xe,t[46]=ye^~Re&Ie,t[47]=be^~Oe&Ne,t[8]=st^~de&Ee,t[9]=at^~pe&Se,t[18]=Ue^~ze&Qe,t[19]=Be^~qe&et,t[28]=ve^~xe&Pe,t[29]=we^~_e&Ce,t[38]=Ge^~Ze&fe,t[39]=Je^~Xe&he,t[48]=Re^~Ie&He,t[49]=Oe^~Ne&Fe,t[0]^=e[2*n],t[1]^=e[2*n+1]}},Ah}();function t(){this.state=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.blockSize=null,this.count=0,this.squeezing=!1}return t.prototype.initialize=function(e,t){for(let e=0;e<50;++e)this.state[e]=0;this.blockSize=e/8,this.count=0,this.squeezing=!1},t.prototype.absorb=function(t){for(let n=0;n<t.length;++n)this.state[~~(this.count/4)]^=t[n]<<this.count%4*8,this.count+=1,this.count===this.blockSize&&(e.p1600(this.state),this.count=0)},t.prototype.absorbLastFewBits=function(t){this.state[~~(this.count/4)]^=t<<this.count%4*8,128&t&&this.count===this.blockSize-1&&e.p1600(this.state),this.state[~~((this.blockSize-1)/4)]^=128<<(this.blockSize-1)%4*8,e.p1600(this.state),this.count=0,this.squeezing=!0},t.prototype.squeeze=function(t){this.squeezing||this.absorbLastFewBits(1);const n=Buffer.alloc(t);for(let r=0;r<t;++r)n[r]=this.state[~~(this.count/4)]>>>this.count%4*8&255,this.count+=1,this.count===this.blockSize&&(e.p1600(this.state),this.count=0);return n},t.prototype.copy=function(e){for(let t=0;t<50;++t)e.state[t]=this.state[t];e.blockSize=this.blockSize,e.count=this.count,e.squeezing=this.squeezing},yh=t}function Mh(){if(xh)return hh.exports;xh=1;try{hh.exports=function(){if(fh)return ph;fh=1;const e=Cf()(__dirname);if("function"!=typeof e)throw new Error("Native add-on failed to load");return ph=mh()(e)}()}catch(e){hh.exports=wh?vh:(wh=1,vh=mh()(Th()))}return hh.exports}function Rh(){if(_h)return rh;_h=1,Object.defineProperty(rh,"__esModule",{value:!0});var e=sh(),t=Mh();return rh.keccak224=e.createHashFunction((function(){return t("keccak224")})),rh.keccak256=e.createHashFunction((function(){return t("keccak256")})),rh.keccak384=e.createHashFunction((function(){return t("keccak384")})),rh.keccak512=e.createHashFunction((function(){return t("keccak512")})),rh}function Oh(){return Sh?Eh:(Sh=1,Eh=E.createHash)}function Ih(){return kh||(kh=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.rlphash=e.ripemd160FromArray=e.ripemd160FromString=e.ripemd160=e.sha256FromArray=e.sha256FromString=e.sha256=e.keccakFromArray=e.keccakFromHexString=e.keccakFromString=e.keccak256=e.keccak=void 0;const t=Rh(),n=Oh(),r=gf(),i=eh(),s=Qf();e.keccak=function(e,n=256){switch((0,s.assertIsBuffer)(e),n){case 224:return(0,t.keccak224)(e);case 256:return(0,t.keccak256)(e);case 384:return(0,t.keccak384)(e);case 512:return(0,t.keccak512)(e);default:throw new Error(`Invald algorithm: keccak${n}`)}};e.keccak256=function(t){return(0,e.keccak)(t)};e.keccakFromString=function(t,n=256){(0,s.assertIsString)(t);const r=Buffer.from(t,"utf8");return(0,e.keccak)(r,n)};e.keccakFromHexString=function(t,n=256){return(0,s.assertIsHexString)(t),(0,e.keccak)((0,i.toBuffer)(t),n)};e.keccakFromArray=function(t,n=256){return(0,s.assertIsArray)(t),(0,e.keccak)((0,i.toBuffer)(t),n)};const a=function(e){return e=(0,i.toBuffer)(e),n("sha256").update(e).digest()};e.sha256=function(e){return(0,s.assertIsBuffer)(e),a(e)};e.sha256FromString=function(e){return(0,s.assertIsString)(e),a(e)};e.sha256FromArray=function(e){return(0,s.assertIsArray)(e),a(e)};const o=function(e,t){e=(0,i.toBuffer)(e);const r=n("rmd160").update(e).digest();return!0===t?(0,i.setLengthLeft)(r,32):r};e.ripemd160=function(e,t){return(0,s.assertIsBuffer)(e),o(e,t)};e.ripemd160FromString=function(e,t){return(0,s.assertIsString)(e),o(e,t)};e.ripemd160FromArray=function(e,t){return(0,s.assertIsArray)(e),o(e,t)};e.rlphash=function(t){return(0,e.keccak)(r.rlp.encode(t))}}(nh)),nh}var Nh,Ph,Ch={};function jh(){return Nh||(Nh=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.toType=e.TypeOutput=e.bnToRlp=e.bnToUnpaddedBuffer=e.bnToHex=void 0;const t=gf(),n=Wf(),r=eh();function i(e){return(0,r.unpadBuffer)(e.toArrayLike(Buffer))}var s;e.bnToHex=function(e){return`0x${e.toString(16)}`},e.bnToUnpaddedBuffer=i,e.bnToRlp=function(e){return i(e)},function(e){e[e.Number=0]="Number",e[e.BN=1]="BN",e[e.Buffer=2]="Buffer",e[e.PrefixedHexString=3]="PrefixedHexString"}(s=e.TypeOutput||(e.TypeOutput={})),e.toType=function(e,i){if(null===e)return null;if(void 0===e)return;if("string"==typeof e&&!(0,n.isHexString)(e))throw new Error(`A string must be provided with a 0x-prefix, given: ${e}`);if("number"==typeof e&&!Number.isSafeInteger(e))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)");const a=(0,r.toBuffer)(e);if(i===s.Buffer)return a;if(i===s.BN)return new t.BN(a);if(i===s.Number){const e=new t.BN(a),n=new t.BN(Number.MAX_SAFE_INTEGER.toString());if(e.gt(n))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative output type)");return e.toNumber()}return`0x${a.toString("hex")}`}}(Ch)),Ch}function Lh(){return Ph||(Ph=1,function(e){var t=Of&&Of.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.isZeroAddress=e.zeroAddress=e.importPublic=e.privateToAddress=e.privateToPublic=e.publicToAddress=e.pubToAddress=e.isValidPublic=e.isValidPrivate=e.generateAddress2=e.generateAddress=e.isValidChecksumAddress=e.toChecksumAddress=e.isValidAddress=e.Account=void 0;const n=t(T),r=gf(),i=Yf(),s=Wf(),a=yf(),o=eh(),c=Ih(),u=Qf(),l=jh();class d{constructor(e=new r.BN(0),t=new r.BN(0),n=a.KECCAK256_RLP,i=a.KECCAK256_NULL){this.nonce=e,this.balance=t,this.stateRoot=n,this.codeHash=i,this._validate()}static fromAccountData(e){const{nonce:t,balance:n,stateRoot:i,codeHash:s}=e;return new d(t?new r.BN((0,o.toBuffer)(t)):void 0,n?new r.BN((0,o.toBuffer)(n)):void 0,i?(0,o.toBuffer)(i):void 0,s?(0,o.toBuffer)(s):void 0)}static fromRlpSerializedAccount(e){const t=r.rlp.decode(e);if(!Array.isArray(t))throw new Error("Invalid serialized account input. Must be array");return this.fromValuesArray(t)}static fromValuesArray(e){const[t,n,i,s]=e;return new d(new r.BN(t),new r.BN(n),i,s)}_validate(){if(this.nonce.lt(new r.BN(0)))throw new Error("nonce must be greater than zero");if(this.balance.lt(new r.BN(0)))throw new Error("balance must be greater than zero");if(32!==this.stateRoot.length)throw new Error("stateRoot must have a length of 32");if(32!==this.codeHash.length)throw new Error("codeHash must have a length of 32")}raw(){return[(0,l.bnToUnpaddedBuffer)(this.nonce),(0,l.bnToUnpaddedBuffer)(this.balance),this.stateRoot,this.codeHash]}serialize(){return r.rlp.encode(this.raw())}isContract(){return!this.codeHash.equals(a.KECCAK256_NULL)}isEmpty(){return this.balance.isZero()&&this.nonce.isZero()&&this.codeHash.equals(a.KECCAK256_NULL)}}e.Account=d;e.isValidAddress=function(e){try{(0,u.assertIsString)(e)}catch(e){return!1}return/^0x[0-9a-fA-F]{40}$/.test(e)};e.toChecksumAddress=function(e,t){(0,u.assertIsHexString)(e);const n=(0,s.stripHexPrefix)(e).toLowerCase();let r="";if(t){r=(0,l.toType)(t,l.TypeOutput.BN).toString()+"0x"}const i=(0,c.keccakFromString)(r+n).toString("hex");let a="0x";for(let e=0;e<n.length;e++)parseInt(i[e],16)>=8?a+=n[e].toUpperCase():a+=n[e];return a};e.isValidChecksumAddress=function(t,n){return(0,e.isValidAddress)(t)&&(0,e.toChecksumAddress)(t,n)===t};e.generateAddress=function(e,t){(0,u.assertIsBuffer)(e),(0,u.assertIsBuffer)(t);const n=new r.BN(t);return n.isZero()?(0,c.rlphash)([e,null]).slice(-20):(0,c.rlphash)([e,Buffer.from(n.toArray())]).slice(-20)};e.generateAddress2=function(e,t,r){(0,u.assertIsBuffer)(e),(0,u.assertIsBuffer)(t),(0,u.assertIsBuffer)(r),(0,n.default)(20===e.length),(0,n.default)(32===t.length);return(0,c.keccak256)(Buffer.concat([Buffer.from("ff","hex"),e,t,(0,c.keccak256)(r)])).slice(-20)};e.isValidPrivate=function(e){return(0,i.privateKeyVerify)(e)};e.isValidPublic=function(e,t=!1){return(0,u.assertIsBuffer)(e),64===e.length?(0,i.publicKeyVerify)(Buffer.concat([Buffer.from([4]),e])):!!t&&(0,i.publicKeyVerify)(e)};e.pubToAddress=function(e,t=!1){return(0,u.assertIsBuffer)(e),t&&64!==e.length&&(e=Buffer.from((0,i.publicKeyConvert)(e,!1).slice(1))),(0,n.default)(64===e.length),(0,c.keccak)(e).slice(-20)},e.publicToAddress=e.pubToAddress;e.privateToPublic=function(e){return(0,u.assertIsBuffer)(e),Buffer.from((0,i.publicKeyCreate)(e,!1)).slice(1)};e.privateToAddress=function(t){return(0,e.publicToAddress)((0,e.privateToPublic)(t))};e.importPublic=function(e){return(0,u.assertIsBuffer)(e),64!==e.length&&(e=Buffer.from((0,i.publicKeyConvert)(e,!1).slice(1))),e};e.zeroAddress=function(){const e=(0,o.zeros)(20);return(0,o.bufferToHex)(e)};e.isZeroAddress=function(t){try{(0,u.assertIsString)(t)}catch(e){return!1}return(0,e.zeroAddress)()===t}}(Of)),Of}var Dh,$h={};var Uh,Bh={};var zh,qh,Hh={};var Fh,Yh,Vh,Kh,Wh,Gh=(qh||(qh=1,function(e){var t=sf&&sf.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=sf&&sf.__exportStar||function(e,n){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.isHexString=e.getKeys=e.fromAscii=e.fromUtf8=e.toAscii=e.arrayContainsArray=e.getBinarySize=e.padToEven=e.stripHexPrefix=e.isHexPrefixed=void 0,n(yf(),e),n(Lh(),e),n(function(){if(Dh)return $h;Dh=1;var e=$h&&$h.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty($h,"__esModule",{value:!0}),$h.Address=void 0;const t=e(T),n=gf(),r=eh(),i=Lh();class s{constructor(e){(0,t.default)(20===e.length,"Invalid address length"),this.buf=e}static zero(){return new s((0,r.zeros)(20))}static fromString(e){return(0,t.default)((0,i.isValidAddress)(e),"Invalid address"),new s((0,r.toBuffer)(e))}static fromPublicKey(e){(0,t.default)(Buffer.isBuffer(e),"Public key should be Buffer");const n=(0,i.pubToAddress)(e);return new s(n)}static fromPrivateKey(e){(0,t.default)(Buffer.isBuffer(e),"Private key should be Buffer");const n=(0,i.privateToAddress)(e);return new s(n)}static generate(e,r){return(0,t.default)(n.BN.isBN(r)),new s((0,i.generateAddress)(e.buf,r.toArrayLike(Buffer)))}static generate2(e,n,r){return(0,t.default)(Buffer.isBuffer(n)),(0,t.default)(Buffer.isBuffer(r)),new s((0,i.generateAddress2)(e.buf,n,r))}equals(e){return this.buf.equals(e.buf)}isZero(){return this.equals(s.zero())}isPrecompileOrSystemAddress(){const e=new n.BN(this.buf),t=new n.BN(0),r=new n.BN("ffff","hex");return e.gte(t)&&e.lte(r)}toString(){return"0x"+this.buf.toString("hex")}toBuffer(){return Buffer.from(this.buf)}}return $h.Address=s,$h}(),e),n(Ih(),e),n(function(){if(Uh)return Bh;Uh=1,Object.defineProperty(Bh,"__esModule",{value:!0}),Bh.hashPersonalMessage=Bh.isValidSignature=Bh.fromRpcSig=Bh.toCompactSig=Bh.toRpcSig=Bh.ecrecover=Bh.ecsign=void 0;const e=Yf(),t=gf(),n=eh(),r=Ih(),i=Qf(),s=jh();function a(e,t){const n=(0,s.toType)(e,s.TypeOutput.BN);if(n.eqn(0)||n.eqn(1))return(0,s.toType)(e,s.TypeOutput.BN);if(!t)return n.subn(27);const r=(0,s.toType)(t,s.TypeOutput.BN);return n.sub(r.muln(2).addn(35))}function o(e){const n=new t.BN(e);return n.eqn(0)||n.eqn(1)}return Bh.ecsign=function(t,n,r){const{signature:i,recid:a}=(0,e.ecdsaSign)(t,n),o=Buffer.from(i.slice(0,32)),c=Buffer.from(i.slice(32,64));if(!r||"number"==typeof r){if(r&&!Number.isSafeInteger(r))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)");return{r:o,s:c,v:r?a+(2*r+35):a+27}}return{r:o,s:c,v:(0,s.toType)(r,s.TypeOutput.BN).muln(2).addn(35).addn(a).toArrayLike(Buffer)}},Bh.ecrecover=function(t,r,i,s,c){const u=Buffer.concat([(0,n.setLengthLeft)(i,32),(0,n.setLengthLeft)(s,32)],64),l=a(r,c);if(!o(l))throw new Error("Invalid signature v value");const d=(0,e.ecdsaRecover)(u,l.toNumber(),t);return Buffer.from((0,e.publicKeyConvert)(d,!1).slice(1))},Bh.toRpcSig=function(e,t,r,i){if(!o(a(e,i)))throw new Error("Invalid signature v value");return(0,n.bufferToHex)(Buffer.concat([(0,n.setLengthLeft)(t,32),(0,n.setLengthLeft)(r,32),(0,n.toBuffer)(e)]))},Bh.toCompactSig=function(e,t,r,i){if(!o(a(e,i)))throw new Error("Invalid signature v value");const c=(0,s.toType)(e,s.TypeOutput.Number);let u=r;return(c>28&&c%2==1||1===c||28===c)&&(u=Buffer.from(r),u[0]|=128),(0,n.bufferToHex)(Buffer.concat([(0,n.setLengthLeft)(t,32),(0,n.setLengthLeft)(u,32)]))},Bh.fromRpcSig=function(e){const t=(0,n.toBuffer)(e);let r,i,s;if(t.length>=65)r=t.slice(0,32),i=t.slice(32,64),s=(0,n.bufferToInt)(t.slice(64));else{if(64!==t.length)throw new Error("Invalid signature length");r=t.slice(0,32),i=t.slice(32,64),s=(0,n.bufferToInt)(t.slice(32,33))>>7,i[0]&=127}return s<27&&(s+=27),{v:s,r:r,s:i}},Bh.isValidSignature=function(e,n,r,i=!0,s){const c=new t.BN("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),u=new t.BN("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);if(32!==n.length||32!==r.length)return!1;if(!o(a(e,s)))return!1;const l=new t.BN(n),d=new t.BN(r);return!(l.isZero()||l.gt(u)||d.isZero()||d.gt(u)||i&&1===d.cmp(c))},Bh.hashPersonalMessage=function(e){(0,i.assertIsBuffer)(e);const t=Buffer.from(`Ethereum Signed Message:\n${e.length}`,"utf-8");return(0,r.keccak)(Buffer.concat([t,e]))},Bh}(),e),n(eh(),e),n(function(){if(zh)return Hh;zh=1;var e=Hh&&Hh.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Hh,"__esModule",{value:!0}),Hh.defineProperties=void 0;const t=e(T),n=Wf(),r=gf(),i=eh();return Hh.defineProperties=function(e,s,a){if(e.raw=[],e._fields=[],e.toJSON=function(t=!1){if(t){const t={};return e._fields.forEach((n=>{t[n]=`0x${e[n].toString("hex")}`})),t}return(0,i.baToJSON)(e.raw)},e.serialize=function(){return r.rlp.encode(e.raw)},s.forEach(((n,r)=>{function s(){return e.raw[r]}function a(s){"00"!==(s=(0,i.toBuffer)(s)).toString("hex")||n.allowZero||(s=Buffer.allocUnsafe(0)),n.allowLess&&n.length?(s=(0,i.unpadBuffer)(s),(0,t.default)(n.length>=s.length,`The field ${n.name} must not have more ${n.length} bytes`)):n.allowZero&&0===s.length||!n.length||(0,t.default)(n.length===s.length,`The field ${n.name} must have byte length of ${n.length}`),e.raw[r]=s}e._fields.push(n.name),Object.defineProperty(e,n.name,{enumerable:!0,configurable:!0,get:s,set:a}),n.default&&(e[n.name]=n.default),n.alias&&Object.defineProperty(e,n.alias,{enumerable:!1,configurable:!0,set:a,get:s})})),a)if("string"==typeof a&&(a=Buffer.from((0,n.stripHexPrefix)(a),"hex")),Buffer.isBuffer(a)&&(a=r.rlp.decode(a)),Array.isArray(a)){if(a.length>e._fields.length)throw new Error("wrong number of fields in data");a.forEach(((t,n)=>{e[e._fields[n]]=(0,i.toBuffer)(t)}))}else{if("object"!=typeof a)throw new Error("invalid data");{const t=Object.keys(a);s.forEach((n=>{-1!==t.indexOf(n.name)&&(e[n.name]=a[n.name]),-1!==t.indexOf(n.alias)&&(e[n.alias]=a[n.alias])}))}}},Hh}(),e),n(gf(),e),n(jh(),e);var r=Wf();Object.defineProperty(e,"isHexPrefixed",{enumerable:!0,get:function(){return r.isHexPrefixed}}),Object.defineProperty(e,"stripHexPrefix",{enumerable:!0,get:function(){return r.stripHexPrefix}}),Object.defineProperty(e,"padToEven",{enumerable:!0,get:function(){return r.padToEven}}),Object.defineProperty(e,"getBinarySize",{enumerable:!0,get:function(){return r.getBinarySize}}),Object.defineProperty(e,"arrayContainsArray",{enumerable:!0,get:function(){return r.arrayContainsArray}}),Object.defineProperty(e,"toAscii",{enumerable:!0,get:function(){return r.toAscii}}),Object.defineProperty(e,"fromUtf8",{enumerable:!0,get:function(){return r.fromUtf8}}),Object.defineProperty(e,"fromAscii",{enumerable:!0,get:function(){return r.fromAscii}}),Object.defineProperty(e,"getKeys",{enumerable:!0,get:function(){return r.getKeys}}),Object.defineProperty(e,"isHexString",{enumerable:!0,get:function(){return r.isHexString}})}(sf)),sf);class Jh{static hash(e){const t=Buffer.from(e,"utf8");return Gh.keccak256(t)}static hashRandomBits(e){if(!this.isValidSHA256(e.blockHash.replace("0x",""))||e.taskRequesterTimestamp<=0||e.dispatcherTimestamp<=0)throw`Invalid inputs for hashRandomBits:\n blockHash: ${e.blockHash},\n taskRequesterTimestamp: ${e.taskRequesterTimestamp},\n dispatcherTimestamp: ${e.dispatcherTimestamp}\n `;const t=e.taskRequesterTimestamp.toString()+e.dispatcherTimestamp.toString()+e.blockHash,n=Buffer.from(t,"utf8");return Gh.keccak256(n)}static hashMessage(e={}){let t=JSON.parse(JSON.stringify(e));t.payload&&(t=t.payload),delete t.type,delete t.msgHash,delete t.signature;const n=Object.keys(t).sort().reduce(((e,n)=>(e[n]=t[n],e)),{}),r=Buffer.from(JSON.stringify(n),"utf-8");return Gh.keccak256(r)}static computeFileSHA256(e){const t=_.createHash("sha256");return t.update(e),t.digest("hex")}static computeStringSHA256(e){const t=_.createHash("sha256");return t.update(e),t.digest("hex")}static isValidSHA256(e){return/^[a-f0-9]{64}$/gi.test(e)}}class Zh{static sign(e,t){const n=Gh.toBuffer("0x"+t);if(!Gh.isValidPrivate(n))throw"Invalid private key when trying to sign msg";return Gh.ecsign(e,n)}static getAddressFromPrivateKey(e){const t=Gh.toBuffer("0x"+e);if(!Gh.isValidPrivate(t))throw"Invalid private key when trying to get the address";const n=Gh.privateToPublic(t);return"0x"+Gh.pubToAddress(n).toString("hex")}static verifySignature(e,t,n){const r=Gh.ecrecover(e,t.v,t.r,t.s);return"0x"+Gh.pubToAddress(r).toString("hex").toLowerCase()===n.toLowerCase()}static serializeSignature(e){return JSON.stringify({v:e.v,r:e.r.toString("hex"),s:e.s.toString("hex")})}static deserializeSignature(e){const t=JSON.parse(e);return{v:t.v,r:Buffer.from(t.r,"hex"),s:Buffer.from(t.s,"hex")}}static ECDSASignatureToHex(e){return{v:e.v,r:e.r.toString("hex"),s:e.s.toString("hex")}}static SignatureHexToECDSA(e){return{v:e.v,r:Buffer.from(e.r,"hex"),s:Buffer.from(e.s,"hex")}}static isValidSignature(e){const t=Zh.SignatureHexToECDSA(e);return Gh.isValidSignature(t.v,t.r,t.s)}static generateAddress(){const e=function(){let e=nf(32);for(;!tf(e);)e=nf(32);return e}(),t=Gh.privateToPublic(e),n=function(e){return ef(32===e.length,"Bad private key"),ef(tf(e),"Bad private key"),Buffer.from(Jp.keyFromPrivate(e).getPublic("array"))}(e),r=Gh.pubToAddress(t),i=Gh.bufferToHex(e).replace("0x",""),s=Gh.bufferToHex(n).replace("0x","");return{addressHex:Gh.bufferToHex(r),privateKeyHex:i,publicKeyHex:s}}static createSignedBody(e,t,n){!e.walletAddress&&n&&(e.walletAddress=n);const r=Jh.hashMessage(e);let i;i="0"===t[0]&&"x"===t[1]?t.slice(2):t;const s=Zh.sign(r,i);return e.signature=Zh.ECDSASignatureToHex(s),e}}!function(e){e.ACTIVE="active",e.INACTIVE="inactive"}(Fh||(Fh={}));class Xh{constructor(){}}class Qh extends Xh{async build(e,n){const r=i.join(process.cwd(),e,"main.js");if(!t.existsSync(r))throw`File doesn't exist: ${r} `;t.copyFileSync(r,i.join(process.cwd(),`${n}/main.js`))}}class em extends Xh{async build(e,n){const r=i.join(process.cwd(),e,"task.py");if(!t.existsSync(r))throw`File doesn't exist: ${r} `;t.copyFileSync(r,i.join(process.cwd(),`${n}/task.py`))}}class tm extends Xh{async build(e,n){const r=i.join(process.cwd(),e),s=i.join(r,"task.wasm");if(t.existsSync(s)&&t.rmSync(s),await new Promise(((e,t)=>{I(`cd ${r} && sh compile.sh`,((n,r,i)=>{n&&t(i),e(r)}))})),!t.existsSync(s))throw`File doesn't exist: ${s}`;t.copyFileSync(s,i.join(process.cwd(),`${n}/task.wasm`))}}class nm extends Xh{async build(e,n){await new Promise(((t,n)=>{I("rustc --version",((r,s,a)=>{r&&n(`Rust ${a.split("error: ")[1]}`);const o=s.split(" ")[1];"1.78.0"!==o?n(`Rust version detected is: ${o}. Version must be 1.78`):I(`cargo build --manifest-path ${i.join(process.cwd(),e,"Cargo.toml")} --target wasm32-wasip1`,((e,r,i)=>{e&&n(`Cargo ${i.split("error: ")[1]}`),t(r)}))}))}));const r=e.split("/"),s=r[r.length-1]||r[r.length-2];if(!t.existsSync(i.join(process.cwd(),e,`/target/wasm32-wasip1/debug/${s}.wasm`)))throw`File doesn't exist: ${i.join(process.cwd(),e,`/target/wasm32-wasip1/debug/${s}.wasm`)}. Please check that your Cargo.toml file has the same name of the directory of the task. `;t.copyFileSync(i.join(process.cwd(),e,`/target/wasm32-wasip1/debug/${s}.wasm`),i.join(process.cwd(),`${n}/task.wasm`))}}class rm extends Xh{async build(e,n){const r=i.join(process.cwd(),e);if(!t.existsSync(r))throw`File doesn't exist: ${r}`;try{const e=t.readFileSync(r,"utf-8"),[n,i,s]=await N(JSON.parse(e),{fullResult:!0});if(void 0!==i)throw console.error(i),new Error(i);void 0!==s&&console.warn(s),void 0!==n&&console.log("OpenAPI manifest is valid!")}catch{throw"Error validating OpenAPI manifest"}t.copyFileSync(r,i.join(process.cwd(),`${n}/manifest.json`))}}class im{static createBuild(e){switch(e){case ao.RUST:return new nm;case ao.C:return new tm;case ao.JS:return new Qh;case oo.API:return new rm;case ao.PYTHON:return new em;default:throw"Invalid language"}}}function sm(){if(Wh)return Kh;Wh=1;var e=a,t=d.Stream,n=function(){if(Vh)return Yh;Vh=1;var e=d.Stream;function t(){this.source=null,this.dataSize=0,this.maxDataSize=1048576,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}return Yh=t,a.inherits(t,e),t.create=function(e,t){var n=new this;for(var r in t=t||{})n[r]=t[r];n.source=e;var i=e.emit;return e.emit=function(){return n._handleEmit(arguments),i.apply(e,arguments)},e.on("error",(function(){})),n.pauseStream&&e.pause(),n},Object.defineProperty(t.prototype,"readable",{configurable:!0,enumerable:!0,get:function(){return this.source.readable}}),t.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)},t.prototype.resume=function(){this._released||this.release(),this.source.resume()},t.prototype.pause=function(){this.source.pause()},t.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]},t.prototype.pipe=function(){var t=e.prototype.pipe.apply(this,arguments);return this.resume(),t},t.prototype._handleEmit=function(e){this._released?this.emit.apply(this,e):("data"===e[0]&&(this.dataSize+=e[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(e))},t.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))}},Yh}();function r(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2097152,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}return Kh=r,e.inherits(r,t),r.create=function(e){var t=new this;for(var n in e=e||{})t[n]=e[n];return t},r.isStreamLike=function(e){return"function"!=typeof e&&"string"!=typeof e&&"boolean"!=typeof e&&"number"!=typeof e&&!Buffer.isBuffer(e)},r.prototype.append=function(e){if(r.isStreamLike(e)){if(!(e instanceof n)){var t=n.create(e,{maxDataSize:1/0,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this)),e=t}this._handleErrors(e),this.pauseStreams&&e.pause()}return this._streams.push(e),this},r.prototype.pipe=function(e,n){return t.prototype.pipe.call(this,e,n),this.resume(),e},r.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop)this._pendingNext=!0;else{this._insideLoop=!0;try{do{this._pendingNext=!1,this._realGetNext()}while(this._pendingNext)}finally{this._insideLoop=!1}}},r.prototype._realGetNext=function(){var e=this._streams.shift();void 0!==e?"function"==typeof e?e(function(e){r.isStreamLike(e)&&(e.on("data",this._checkDataSize.bind(this)),this._handleErrors(e)),this._pipeNext(e)}.bind(this)):this._pipeNext(e):this.end()},r.prototype._pipeNext=function(e){if(this._currentStream=e,r.isStreamLike(e))return e.on("end",this._getNext.bind(this)),void e.pipe(this,{end:!1});var t=e;this.write(t),this._getNext()},r.prototype._handleErrors=function(e){var t=this;e.on("error",(function(e){t._emitError(e)}))},r.prototype.write=function(e){this.emit("data",e)},r.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&"function"==typeof this._currentStream.pause&&this._currentStream.pause(),this.emit("pause"))},r.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&"function"==typeof this._currentStream.resume&&this._currentStream.resume(),this.emit("resume")},r.prototype.end=function(){this._reset(),this.emit("end")},r.prototype.destroy=function(){this._reset(),this.emit("close")},r.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null},r.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}},r.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)},r.prototype._emitError=function(e){this._reset(),this.emit("error",e)},Kh}var am,om,cm,um,lm,dm,pm,fm,hm,mm,gm,ym,bm,vm,wm,xm,_m,Em={},Sm={"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}};function km(){return cm||(cm=1,function(e){var t=om?am:(om=1,am=Sm),n=s.extname,r=/^\s*([^;\s]*)(?:;|\s|$)/,i=/^text\//i;function a(e){if(!e||"string"!=typeof e)return!1;var n=r.exec(e),s=n&&t[n[1].toLowerCase()];return s&&s.charset?s.charset:!(!n||!i.test(n[1]))&&"UTF-8"}e.charset=a,e.charsets={lookup:a},e.contentType=function(t){if(!t||"string"!=typeof t)return!1;var n=-1===t.indexOf("/")?e.lookup(t):t;if(!n)return!1;if(-1===n.indexOf("charset")){var r=e.charset(n);r&&(n+="; charset="+r.toLowerCase())}return n},e.extension=function(t){if(!t||"string"!=typeof t)return!1;var n=r.exec(t),i=n&&e.extensions[n[1].toLowerCase()];if(!i||!i.length)return!1;return i[0]},e.extensions=Object.create(null),e.lookup=function(t){if(!t||"string"!=typeof t)return!1;var r=n("x."+t).toLowerCase().substr(1);if(!r)return!1;return e.types[r]||!1},e.types=Object.create(null),function(e,n){var r=["nginx","apache",void 0,"iana"];Object.keys(t).forEach((function(i){var s=t[i],a=s.extensions;if(a&&a.length){e[i]=a;for(var o=0;o<a.length;o++){var c=a[o];if(n[c]){var u=r.indexOf(t[n[c]].source),l=r.indexOf(s.source);if("application/octet-stream"!==n[c]&&(u>l||u===l&&"application/"===n[c].substr(0,12)))continue}n[c]=i}}}))}(e.extensions,e.types)}(Em)),Em}function Am(){if(pm)return dm;pm=1;var e=lm?um:(lm=1,um=function(e){var t="function"==typeof setImmediate?setImmediate:"object"==typeof process&&"function"==typeof process.nextTick?process.nextTick:null;t?t(e):setTimeout(e,0)});return dm=function(t){var n=!1;return e((function(){n=!0})),function(r,i){n?t(r,i):e((function(){t(r,i)}))}}}function Tm(){if(hm)return fm;function e(e){"function"==typeof this.jobs[e]&&this.jobs[e]()}return hm=1,fm=function(t){Object.keys(t.jobs).forEach(e.bind(t)),t.jobs={}},fm}function Mm(){if(gm)return mm;gm=1;var e=Am(),t=Tm();return mm=function(n,r,i,s){var a=i.keyedList?i.keyedList[i.index]:i.index;i.jobs[a]=function(t,n,r,i){var s;s=2==t.length?t(r,e(i)):t(r,n,e(i));return s}(r,a,n[a],(function(e,n){a in i.jobs&&(delete i.jobs[a],e?t(i):i.results[a]=n,s(e,i.results))}))},mm}function Rm(){if(bm)return ym;return bm=1,ym=function(e,t){var n=!Array.isArray(e),r={index:0,keyedList:n||t?Object.keys(e):null,jobs:{},results:n?{}:[],size:n?Object.keys(e).length:e.length};t&&r.keyedList.sort(n?t:function(n,r){return t(e[n],e[r])});return r}}function Om(){if(wm)return vm;wm=1;var e=Tm(),t=Am();return vm=function(n){if(!Object.keys(this.jobs).length)return;this.index=this.size,e(this),t(n)(null,this.results)}}function Im(){if(_m)return xm;_m=1;var e=Mm(),t=Rm(),n=Om();return xm=function(r,i,s){var a=t(r);for(;a.index<(a.keyedList||r).length;)e(r,i,a,(function(e,t){e?s(e,t):0!==Object.keys(a.jobs).length||s(null,a.results)})),a.index++;return n.bind(a,s)},xm}var Nm,Pm,Cm,jm,Lm,Dm,$m,Um,Bm,zm,qm,Hm,Fm,Ym,Vm,Km,Wm,Gm,Jm,Zm,Xm,Qm,eg,tg,ng,rg,ig,sg,ag,og,cg,ug,lg,dg,pg,fg,hg,mg,gg,yg,bg,vg,wg,xg,_g,Eg,Sg,kg,Ag,Tg,Mg,Rg,Og,Ig,Ng,Pg,Cg,jg,Lg,Dg,$g,Ug,Bg,zg,qg,Hg,Fg,Yg,Vg,Kg,Wg,Gg,Jg,Zg,Xg,Qg,ey,ty,ny,ry,iy,sy={exports:{}};function ay(){if(Nm)return sy.exports;Nm=1;var e=Mm(),t=Rm(),n=Om();function r(e,t){return e<t?-1:e>t?1:0}return sy.exports=function(r,i,s,a){var o=t(r,s);return e(r,i,o,(function t(n,s){n?a(n,s):(o.index++,o.index<(o.keyedList||r).length?e(r,i,o,t):a(null,o.results))})),n.bind(o,a)},sy.exports.ascending=r,sy.exports.descending=function(e,t){return-1*r(e,t)},sy.exports}function oy(){if(Cm)return Pm;Cm=1;var e=ay();return Pm=function(t,n,r){return e(t,n,null,r)},Pm}function cy(){return Lm?jm:(Lm=1,jm={parallel:Im(),serial:oy(),serialOrdered:ay()})}function uy(){return $m?Dm:($m=1,Dm=Object)}function ly(){return Bm?Um:(Bm=1,Um=Error)}function dy(){return qm?zm:(qm=1,zm=EvalError)}function py(){return Fm?Hm:(Fm=1,Hm=RangeError)}function fy(){return Vm?Ym:(Vm=1,Ym=ReferenceError)}function hy(){return Wm?Km:(Wm=1,Km=SyntaxError)}function my(){return Jm?Gm:(Jm=1,Gm=TypeError)}function gy(){return Xm?Zm:(Xm=1,Zm=URIError)}function yy(){return eg?Qm:(eg=1,Qm=Math.abs)}function by(){return ng?tg:(ng=1,tg=Math.floor)}function vy(){return ig?rg:(ig=1,rg=Math.max)}function wy(){return ag?sg:(ag=1,sg=Math.min)}function xy(){return cg?og:(cg=1,og=Math.pow)}function _y(){return lg?ug:(lg=1,ug=Math.round)}function Ey(){return pg?dg:(pg=1,dg=Number.isNaN||function(e){return e!=e})}function Sy(){if(hg)return fg;hg=1;var e=Ey();return fg=function(t){return e(t)||0===t?t:t<0?-1:1}}function ky(){return gg?mg:(gg=1,mg=Object.getOwnPropertyDescriptor)}function Ay(){if(bg)return yg;bg=1;var e=ky();if(e)try{e([],"length")}catch(t){e=null}return yg=e}function Ty(){if(wg)return vg;wg=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch(t){e=!1}return vg=e}function My(){return _g?xg:(_g=1,xg=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(var r in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var i=Object.getOwnPropertySymbols(e);if(1!==i.length||i[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var s=Object.getOwnPropertyDescriptor(e,t);if(42!==s.value||!0!==s.enumerable)return!1}return!0})}function Ry(){if(Sg)return Eg;Sg=1;var e="undefined"!=typeof Symbol&&Symbol,t=My();return Eg=function(){return"function"==typeof e&&("function"==typeof Symbol&&("symbol"==typeof e("foo")&&("symbol"==typeof Symbol("bar")&&t())))}}function Oy(){return Ag?kg:(Ag=1,kg="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null)}function Iy(){return Mg?Tg:(Mg=1,Tg=uy().getPrototypeOf||null)}function Ny(){if(Og)return Rg;Og=1;var e=Object.prototype.toString,t=Math.max,n=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var i=0;i<t.length;i+=1)n[i+e.length]=t[i];return n};return Rg=function(r){var i=this;if("function"!=typeof i||"[object Function]"!==e.apply(i))throw new TypeError("Function.prototype.bind called on incompatible "+i);for(var s,a=function(e,t){for(var n=[],r=t,i=0;r<e.length;r+=1,i+=1)n[i]=e[r];return n}(arguments,1),o=t(0,i.length-a.length),c=[],u=0;u<o;u++)c[u]="$"+u;if(s=Function("binder","return function ("+function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n}(c,",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof s){var e=i.apply(this,n(a,arguments));return Object(e)===e?e:this}return i.apply(r,n(a,arguments))})),i.prototype){var l=function(){};l.prototype=i.prototype,s.prototype=new l,l.prototype=null}return s},Rg}function Py(){if(Ng)return Ig;Ng=1;var e=Ny();return Ig=Function.prototype.bind||e}function Cy(){return Cg?Pg:(Cg=1,Pg=Function.prototype.call)}function jy(){return Lg?jg:(Lg=1,jg=Function.prototype.apply)}function Ly(){if(Bg)return Ug;Bg=1;var e=Py(),t=jy(),n=Cy(),r=$g?Dg:($g=1,Dg="undefined"!=typeof Reflect&&Reflect&&Reflect.apply);return Ug=r||e.call(n,t)}function Dy(){if(Fg)return Hg;Fg=1;var e,t=function(){if(qg)return zg;qg=1;var e=Py(),t=my(),n=Cy(),r=Ly();return zg=function(i){if(i.length<1||"function"!=typeof i[0])throw new t("a function is required");return r(e,n,i)}}(),n=Ay();try{e=[].__proto__===Array.prototype}catch(e){if(!e||"object"!=typeof e||!("code"in e)||"ERR_PROTO_ACCESS"!==e.code)throw e}var r=!!e&&n&&n(Object.prototype,"__proto__"),i=Object,s=i.getPrototypeOf;return Hg=r&&"function"==typeof r.get?t([r.get]):"function"==typeof s&&function(e){return s(null==e?e:i(e))}}function $y(){if(Vg)return Yg;Vg=1;var e=Oy(),t=Iy(),n=Dy();return Yg=e?function(t){return e(t)}:t?function(e){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("getProto: not an object");return t(e)}:n?function(e){return n(e)}:null}function Uy(){if(Wg)return Kg;Wg=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=Py();return Kg=n.call(e,t)}function By(){if(Jg)return Gg;var e;Jg=1;var t=uy(),n=ly(),r=dy(),i=py(),s=fy(),a=hy(),o=my(),c=gy(),u=yy(),l=by(),d=vy(),p=wy(),f=xy(),h=_y(),m=Sy(),g=Function,y=function(e){try{return g('"use strict"; return ('+e+").constructor;")()}catch(e){}},b=Ay(),v=Ty(),w=function(){throw new o},x=b?function(){try{return w}catch(e){try{return b(arguments,"callee").get}catch(e){return w}}}():w,_=Ry()(),E=$y(),S=Iy(),k=Oy(),A=jy(),T=Cy(),M={},R="undefined"!=typeof Uint8Array&&E?E(Uint8Array):e,O={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?e:ArrayBuffer,"%ArrayIteratorPrototype%":_&&E?E([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":M,"%AsyncGenerator%":M,"%AsyncGeneratorFunction%":M,"%AsyncIteratorPrototype%":M,"%Atomics%":"undefined"==typeof Atomics?e:Atomics,"%BigInt%":"undefined"==typeof BigInt?e:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?e:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":n,"%eval%":eval,"%EvalError%":r,"%Float16Array%":"undefined"==typeof Float16Array?e:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?e:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?e:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?e:FinalizationRegistry,"%Function%":g,"%GeneratorFunction%":M,"%Int8Array%":"undefined"==typeof Int8Array?e:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?e:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":_&&E?E(E([][Symbol.iterator]())):e,"%JSON%":"object"==typeof JSON?JSON:e,"%Map%":"undefined"==typeof Map?e:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&_&&E?E((new Map)[Symbol.iterator]()):e,"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":b,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?e:Promise,"%Proxy%":"undefined"==typeof Proxy?e:Proxy,"%RangeError%":i,"%ReferenceError%":s,"%Reflect%":"undefined"==typeof Reflect?e:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?e:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&_&&E?E((new Set)[Symbol.iterator]()):e,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":_&&E?E(""[Symbol.iterator]()):e,"%Symbol%":_?Symbol:e,"%SyntaxError%":a,"%ThrowTypeError%":x,"%TypedArray%":R,"%TypeError%":o,"%Uint8Array%":"undefined"==typeof Uint8Array?e:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?e:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?e:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?e:Uint32Array,"%URIError%":c,"%WeakMap%":"undefined"==typeof WeakMap?e:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?e:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?e:WeakSet,"%Function.prototype.call%":T,"%Function.prototype.apply%":A,"%Object.defineProperty%":v,"%Object.getPrototypeOf%":S,"%Math.abs%":u,"%Math.floor%":l,"%Math.max%":d,"%Math.min%":p,"%Math.pow%":f,"%Math.round%":h,"%Math.sign%":m,"%Reflect.getPrototypeOf%":k};if(E)try{null.error}catch(e){var I=E(E(e));O["%Error.prototype%"]=I}var N=function e(t){var n;if("%AsyncFunction%"===t)n=y("async function () {}");else if("%GeneratorFunction%"===t)n=y("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=y("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&E&&(n=E(i.prototype))}return O[t]=n,n},P={__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"]},C=Py(),j=Uy(),L=C.call(T,Array.prototype.concat),D=C.call(A,Array.prototype.splice),$=C.call(T,String.prototype.replace),U=C.call(T,String.prototype.slice),B=C.call(T,RegExp.prototype.exec),z=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,q=/\\(\\)?/g,H=function(e,t){var n,r=e;if(j(P,r)&&(r="%"+(n=P[r])[0]+"%"),j(O,r)){var i=O[r];if(i===M&&(i=N(r)),void 0===i&&!t)throw new o("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:i}}throw new a("intrinsic "+e+" does not exist!")};return Gg=function(e,t){if("string"!=typeof e||0===e.length)throw new o("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new o('"allowMissing" argument must be a boolean');if(null===B(/^%?[^%]*%?$/,e))throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=function(e){var t=U(e,0,1),n=U(e,-1);if("%"===t&&"%"!==n)throw new a("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new a("invalid intrinsic syntax, expected opening `%`");var r=[];return $(e,z,(function(e,t,n,i){r[r.length]=n?$(i,q,"$1"):t||e})),r}(e),r=n.length>0?n[0]:"",i=H("%"+r+"%",t),s=i.name,c=i.value,u=!1,l=i.alias;l&&(r=l[0],D(n,L([0,1],l)));for(var d=1,p=!0;d<n.length;d+=1){var f=n[d],h=U(f,0,1),m=U(f,-1);if(('"'===h||"'"===h||"`"===h||'"'===m||"'"===m||"`"===m)&&h!==m)throw new a("property names with quotes must have matching quotes");if("constructor"!==f&&p||(u=!0),j(O,s="%"+(r+="."+f)+"%"))c=O[s];else if(null!=c){if(!(f in c)){if(!t)throw new o("base intrinsic for "+e+" exists, but the property is not available.");return}if(b&&d+1>=n.length){var g=b(c,f);c=(p=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:c[f]}else p=j(c,f),c=c[f];p&&!u&&(O[s]=c)}}return c},Gg}function zy(){if(ey)return Qg;ey=1;var e=By()("%Object.defineProperty%",!0),t=function(){if(Xg)return Zg;Xg=1;var e=My();return Zg=function(){return e()&&!!Symbol.toStringTag}}()(),n=Uy(),r=my(),i=t?Symbol.toStringTag:null;return Qg=function(t,s){var a=arguments.length>2&&!!arguments[2]&&arguments[2].force,o=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(void 0!==a&&"boolean"!=typeof a||void 0!==o&&"boolean"!=typeof o)throw new r("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");!i||!a&&n(t,i)||(e?e(t,i,{configurable:!o,enumerable:!1,value:s,writable:!1}):t[i]=s)},Qg}function qy(){return ny||(ny=1,ty=function(e,t){return Object.keys(t).forEach((function(n){e[n]=e[n]||t[n]})),e}),ty}var Hy=function(){if(iy)return ry;iy=1;var e=sm(),t=a,r=s,i=b,o=w,c=P.parse,u=n,l=d.Stream,p=km(),f=cy(),h=zy(),m=qy();function g(t){if(!(this instanceof g))return new g(t);for(var n in this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],e.call(this),t=t||{})this[n]=t[n]}return ry=g,t.inherits(g,e),g.LINE_BREAK="\r\n",g.DEFAULT_CONTENT_TYPE="application/octet-stream",g.prototype.append=function(t,n,r){"string"==typeof(r=r||{})&&(r={filename:r});var i=e.prototype.append.bind(this);if("number"==typeof n&&(n=""+n),Array.isArray(n))this._error(new Error("Arrays are not supported."));else{var s=this._multiPartHeader(t,n,r),a=this._multiPartFooter();i(s),i(n),i(a),this._trackLength(s,n,r)}},g.prototype._trackLength=function(e,t,n){var r=0;null!=n.knownLength?r+=+n.knownLength:Buffer.isBuffer(t)?r=t.length:"string"==typeof t&&(r=Buffer.byteLength(t)),this._valueLength+=r,this._overheadLength+=Buffer.byteLength(e)+g.LINE_BREAK.length,t&&(t.path||t.readable&&Object.prototype.hasOwnProperty.call(t,"httpVersion")||t instanceof l)&&(n.knownLength||this._valuesToMeasure.push(t))},g.prototype._lengthRetriever=function(e,t){Object.prototype.hasOwnProperty.call(e,"fd")?null!=e.end&&e.end!=1/0&&null!=e.start?t(null,e.end+1-(e.start?e.start:0)):u.stat(e.path,(function(n,r){var i;n?t(n):(i=r.size-(e.start?e.start:0),t(null,i))})):Object.prototype.hasOwnProperty.call(e,"httpVersion")?t(null,+e.headers["content-length"]):Object.prototype.hasOwnProperty.call(e,"httpModule")?(e.on("response",(function(n){e.pause(),t(null,+n.headers["content-length"])})),e.resume()):t("Unknown stream")},g.prototype._multiPartHeader=function(e,t,n){if("string"==typeof n.header)return n.header;var r,i=this._getContentDisposition(t,n),s=this._getContentType(t,n),a="",o={"Content-Disposition":["form-data",'name="'+e+'"'].concat(i||[]),"Content-Type":[].concat(s||[])};for(var c in"object"==typeof n.header&&m(o,n.header),o)if(Object.prototype.hasOwnProperty.call(o,c)){if(null==(r=o[c]))continue;Array.isArray(r)||(r=[r]),r.length&&(a+=c+": "+r.join("; ")+g.LINE_BREAK)}return"--"+this.getBoundary()+g.LINE_BREAK+a+g.LINE_BREAK},g.prototype._getContentDisposition=function(e,t){var n,i;return"string"==typeof t.filepath?n=r.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e.name||e.path?n=r.basename(t.filename||e.name||e.path):e.readable&&Object.prototype.hasOwnProperty.call(e,"httpVersion")&&(n=r.basename(e.client._httpMessage.path||"")),n&&(i='filename="'+n+'"'),i},g.prototype._getContentType=function(e,t){var n=t.contentType;return!n&&e.name&&(n=p.lookup(e.name)),!n&&e.path&&(n=p.lookup(e.path)),!n&&e.readable&&Object.prototype.hasOwnProperty.call(e,"httpVersion")&&(n=e.headers["content-type"]),n||!t.filepath&&!t.filename||(n=p.lookup(t.filepath||t.filename)),n||"object"!=typeof e||(n=g.DEFAULT_CONTENT_TYPE),n},g.prototype._multiPartFooter=function(){return function(e){var t=g.LINE_BREAK;0===this._streams.length&&(t+=this._lastBoundary()),e(t)}.bind(this)},g.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+g.LINE_BREAK},g.prototype.getHeaders=function(e){var t,n={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t.toLowerCase()]=e[t]);return n},g.prototype.setBoundary=function(e){this._boundary=e},g.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary},g.prototype.getBuffer=function(){for(var e=new Buffer.alloc(0),t=this.getBoundary(),n=0,r=this._streams.length;n<r;n++)"function"!=typeof this._streams[n]&&(e=Buffer.isBuffer(this._streams[n])?Buffer.concat([e,this._streams[n]]):Buffer.concat([e,Buffer.from(this._streams[n])]),"string"==typeof this._streams[n]&&this._streams[n].substring(2,t.length+2)===t||(e=Buffer.concat([e,Buffer.from(g.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])},g.prototype._generateBoundary=function(){for(var e="--------------------------",t=0;t<24;t++)e+=Math.floor(10*Math.random()).toString(16);this._boundary=e},g.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},g.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e},g.prototype.getLength=function(e){var t=this._overheadLength+this._valueLength;this._streams.length&&(t+=this._lastBoundary().length),this._valuesToMeasure.length?f.parallel(this._valuesToMeasure,this._lengthRetriever,(function(n,r){n?e(n):(r.forEach((function(e){t+=e})),e(null,t))})):process.nextTick(e.bind(this,null,t))},g.prototype.submit=function(e,t){var n,r,s={method:"post"};return"string"==typeof e?(e=c(e),r=m({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},s)):(r=m(e,s)).port||(r.port="https:"==r.protocol?443:80),r.headers=this.getHeaders(e.headers),n="https:"==r.protocol?o.request(r):i.request(r),this.getLength(function(e,r){if(e&&"Unknown stream"!==e)this._error(e);else if(r&&n.setHeader("Content-Length",r),this.pipe(n),t){var i,s=function(e,r){return n.removeListener("error",s),n.removeListener("response",i),t.call(this,e,r)};i=s.bind(this,null),n.on("error",s),n.on("response",i)}}.bind(this)),n},g.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))},g.prototype.toString=function(){return"[object FormData]"},h(g,"FormData"),ry}(),Fy=we(Hy);const Yy={httpAdapterURL:"https://worker01-prod.truebit.network/http-adapter/",hubURL:"https://run.truebit.network/",defaultLanguage:"rs",privateKey:"",address:"",blockchainEnv:"production",eula:"",RPC_URL:""},Vy={httpAdapterURL:"http://localhost:3000/",hubURL:"http://localhost:5000/",defaultLanguage:"rs",privateKey:"",address:"",blockchainEnv:"local",eula:"",RPC_URL:""},Ky={httpAdapterURL:"http://localhost:3000/",hubURL:"http://localhost:5000/",defaultLanguage:"rs",privateKey:"",address:"",blockchainEnv:"testnet",eula:"",RPC_URL:""},Wy={httpAdapterURL:"https://worker01-staging.truebit.network/http-adapter/",hubURL:"https://staging.truebit.network/",defaultLanguage:"rs",privateKey:"",address:"",blockchainEnv:"staging",eula:"",RPC_URL:""},Gy={httpAdapterURL:"https://worker-02.go.truebit.network/http-adapter/",hubURL:"https://go.truebit.network/",defaultLanguage:"rs",privateKey:"",address:"",blockchainEnv:"early-access",eula:"",RPC_URL:""};function Jy(){let e=Yy;return"local"===process.env.TRUEBIT_ENV?e=Vy:"staging"===process.env.TRUEBIT_ENV?e=Wy:"testnet"===process.env.TRUEBIT_ENV?e=Ky:"early-access"===process.env.TRUEBIT_ENV&&(e=Gy),e}function Zy(){const e=Qy(),n=i.join(e,".truebit","secret.json");if(!t.existsSync(n))return null;const r=t.readFileSync(n,{encoding:"utf8"});try{return JSON.parse(r)}catch(e){return console.error("Error parsing secret config file:",e),null}}function Xy(e){const n=Qy(),r=i.join(n,".truebit","secret.json");if(!t.existsSync(r))return;const s=t.readFileSync(r,{encoding:"utf8"});try{const n={...JSON.parse(s),...e};t.writeFileSync(r,JSON.stringify(n,null,2),{encoding:"utf8"})}catch(e){console.error("Error updating secret config file:",e)}}function Qy(){return process.env.TRUEBIT_PATH||(process.env.TRUEBIT_PATH=u.homedir()),process.env.TRUEBIT_PATH}function eb(e){const t=Zy();return t&&e in t?t[e]:void 0}function tb(){const e=Zy();if(!e)return void console.error("Secret config file does not exist.");let t=!1;const n=["privateKey","address"];for(const r of n)r in e||(e[r]="",t=!0);const r=["httpAdapterURL","hubURL","defaultLanguage","blockchainEnv"];for(const n of r)n in e&&""!==e[n]||(e[n]=Jy()[n],t=!0);t&&(Xy(e),console.log("Configuration has been updated with default values for missing properties."))}class nb{static EULA_TERMS_LINK="https://truebit.io/terms/";static SETUP_INTRODUCTION=`\nYour all-in-one solution to develop, build, test, and deploy tasks seamlessly.\nLet's get started by setting up your account and configuring your wallet.\nWe'll guide you through each step to ensure a smooth experience.\n\n${C.bold("**Important: Private Key Information")}\n\nTruebit Verify employs a private key system to secure your account:\n\n - A unique private key will be automatically generated for you.\n - This key serves as your secure identifier within Truebit Verify.\n - It's used internally to authenticate your actions.\n - You won't need to manage this key directly.\n\nWe are committed to ensuring the security of your private key and safeguarding your account.\nReady to begin?`;static SETUP_INTRODUCTION_NO_ACCEPTANCE=`\n${C.bold("Account Setup Required")}\n\nYou need an account to access platform features.\n\n${C.bold("To get started:")}\n\n 1. Run the setup command: $ truebit setup\n 2. Follow the prompts to create your account.\n 3. Once setup is complete, you'll have full access to all Truebit Verify features.\n\n${C.bold("Need assistance?")}\nUse the 'truebit -h' command for more information.`;static SETUP_STEP1=`\n${C.bold("Step 1: Create an Account")}\n\nIt appears you're a new user without a wallet configured locally.\n\nWould you like to create a new wallet now?`;static SETUP_STEP1_SCENARIO1_P1=`\nYour configuration file has been detected and will not be overwritten.\nTo make any modifications, edit the file located at: ${Qy()}/.truebit/secret.json\n\nEnsure this file is kept secure, as it contains your credentials for using Truebit Verify.`;static SETUP_STEP1_SCENARIO1_P2(e){return`\nYour account setup appears to be complete.\n\nAccount Details:\n\n - Name: ${e.name}\n - Email: ${e.email}\n - Company: ${e.company}\n - Job Description: ${e.jobDescription}\n - Wallet Address: ${e.walletAddress}\n - Namespace: ${e.defaultNamespace} // API Key: ${e.defaultApiKey}\n\nRun 'truebit -h' to explore available commands and start your journey.`}static SETUP_STEP1_SCENARIO2(e){return`\nYour new wallet address is: ${e}\n\nYour wallet information has been securely stored in ${Qy()}/.truebit/secret.json\nPlease keep this file safe, as it contains your credentials for using Truebit Verify.`}static SETUP_STEP1_SCENARIO3=`\n${C.bold("(!) Important Notice (!)")}\n\nYou’ve chosen not to create a new wallet at this time.\n\n - A wallet is required for full access to Truebit Verify features.\n - Without a wallet, your functionality on the platform will be limited.\n - You can create a wallet at any time by running the truebit setup command again.\n\nRun 'truebit setup' to get started.`;static SETUP_STEP2_SCENARIO3_P1=`\n${C.bold("Step 2: Create an Account")}\n\nYour wallet is now set up. Let's proceed with creating your Truebit Verify account.\n\nPlease provide the following information:`;static SETUP_STEP2_SCENARIO3_P2(e,t,n,r){return`\n${C.bold("Account Registration Complete")}\n\nThanks for registering with Truebit Verify!\n\nCongratulations! Your Truebit Verify account has been successfully created.\n\nAccount Summary:\n\n ${C.bold("- Name: ")+e.fullNameAnswer}\n ${C.bold("- Email: ")+e.emailAddressAnswer}\n ${C.bold("- Company: ")+e.companyNameAnswer}\n ${C.bold("- Job Description: ")+e.jobPositionAnswer}\n ${C.bold("- Wallet Address: ")+t}\n ${C.bold("- Namespace: ")+n} // ${C.bold("API Key: ")+r}\n\nRun 'truebit -h' to begin your journey.`}static SETUP_STEP2_UNHANDLED_ERROR=C.bold("\nSomething went wrong with the user registration:\n \nAccount registration interrupted.\n\nPlease run 'truebit setup' again.");static EULA_INSTALLATION=`\nWelcome to Truebit Verify!\n\nBefore completing your Truebit Verify installation, you must review the Terms of Use at: ${nb.EULA_TERMS_LINK}`;static EULA_INSTALLATION_NO_ACCEPTED="Installation cancelled because you have not accepted the Terms of Use.";static EULA_REGISTRATION_NO_ACCEPTED=`\n${C.bold("(!) Important Notice (!)")}\n\nYou’ve chosen not to accept the End User License Agreement (EULA) at this time.\n\n - Accepting the EULA is required for full access to Truebit Verify features.\n\nRun 'truebit setup' to get started`;static USER_NO_REGISTERED="You need to set up your Truebit Verify account to access platform features.\n\nTo get started:\n\n 1. Run the setup command: $ truebit setup\n 2. Follow the prompts to create your account.\n 3. Once setup is complete, you'll have full access to all Truebit Verify features.\n\nNeed assistance?\nUse the 'truebit -h' command for additional information."}async function rb(){const e=eb("hubURL");if(e)return A.create({headers:{Connection:"keep-alive"},httpAgent:new v({keepAlive:!0}),httpsAgent:new x({keepAlive:!0}),baseURL:e,timeout:12e4,maxContentLength:1/0,maxBodyLength:1/0});throw nb.USER_NO_REGISTERED}async function ib(){const e=eb("httpAdapterURL");if(e)return A.create({headers:{Connection:"keep-alive"},httpAgent:new v({keepAlive:!0}),httpsAgent:new x({keepAlive:!0}),baseURL:e,timeout:12e4,maxContentLength:1/0,maxBodyLength:1/0});throw nb.USER_NO_REGISTERED}var sb,ab={},ob={};function cb(){return sb||(sb=1,ob.toString=function(e){switch(e){case 1:return"A";case 10:return"NULL";case 28:return"AAAA";case 18:return"AFSDB";case 42:return"APL";case 257:return"CAA";case 60:return"CDNSKEY";case 59:return"CDS";case 37:return"CERT";case 5:return"CNAME";case 49:return"DHCID";case 32769:return"DLV";case 39:return"DNAME";case 48:return"DNSKEY";case 43:return"DS";case 55:return"HIP";case 13:return"HINFO";case 45:return"IPSECKEY";case 25:return"KEY";case 36:return"KX";case 29:return"LOC";case 15:return"MX";case 35:return"NAPTR";case 2:return"NS";case 47:return"NSEC";case 50:return"NSEC3";case 51:return"NSEC3PARAM";case 12:return"PTR";case 46:return"RRSIG";case 17:return"RP";case 24:return"SIG";case 6:return"SOA";case 99:return"SPF";case 33:return"SRV";case 44:return"SSHFP";case 32768:return"TA";case 249:return"TKEY";case 52:return"TLSA";case 250:return"TSIG";case 16:return"TXT";case 252:return"AXFR";case 251:return"IXFR";case 41:return"OPT";case 255:return"ANY"}return"UNKNOWN_"+e},ob.toType=function(e){switch(e.toUpperCase()){case"A":return 1;case"NULL":return 10;case"AAAA":return 28;case"AFSDB":return 18;case"APL":return 42;case"CAA":return 257;case"CDNSKEY":return 60;case"CDS":return 59;case"CERT":return 37;case"CNAME":return 5;case"DHCID":return 49;case"DLV":return 32769;case"DNAME":return 39;case"DNSKEY":return 48;case"DS":return 43;case"HIP":return 55;case"HINFO":return 13;case"IPSECKEY":return 45;case"KEY":return 25;case"KX":return 36;case"LOC":return 29;case"MX":return 15;case"NAPTR":return 35;case"NS":return 2;case"NSEC":return 47;case"NSEC3":return 50;case"NSEC3PARAM":return 51;case"PTR":return 12;case"RRSIG":return 46;case"RP":return 17;case"SIG":return 24;case"SOA":return 6;case"SPF":return 99;case"SRV":return 33;case"SSHFP":return 44;case"TA":return 32768;case"TKEY":return 249;case"TLSA":return 52;case"TSIG":return 250;case"TXT":return 16;case"AXFR":return 252;case"IXFR":return 251;case"OPT":return 41;case"ANY":case"*":return 255}return e.toUpperCase().startsWith("UNKNOWN_")?parseInt(e.slice(8)):0}),ob}var ub,lb={};function db(){return ub||(ub=1,lb.toString=function(e){switch(e){case 0:return"NOERROR";case 1:return"FORMERR";case 2:return"SERVFAIL";case 3:return"NXDOMAIN";case 4:return"NOTIMP";case 5:return"REFUSED";case 6:return"YXDOMAIN";case 7:return"YXRRSET";case 8:return"NXRRSET";case 9:return"NOTAUTH";case 10:return"NOTZONE";case 11:return"RCODE_11";case 12:return"RCODE_12";case 13:return"RCODE_13";case 14:return"RCODE_14";case 15:return"RCODE_15"}return"RCODE_"+e},lb.toRcode=function(e){switch(e.toUpperCase()){case"NOERROR":return 0;case"FORMERR":return 1;case"SERVFAIL":return 2;case"NXDOMAIN":return 3;case"NOTIMP":return 4;case"REFUSED":return 5;case"YXDOMAIN":return 6;case"YXRRSET":return 7;case"NXRRSET":return 8;case"NOTAUTH":return 9;case"NOTZONE":return 10;case"RCODE_11":return 11;case"RCODE_12":return 12;case"RCODE_13":return 13;case"RCODE_14":return 14;case"RCODE_15":return 15}return 0}),lb}var pb,fb={};function hb(){return pb||(pb=1,fb.toString=function(e){switch(e){case 0:return"QUERY";case 1:return"IQUERY";case 2:return"STATUS";case 3:return"OPCODE_3";case 4:return"NOTIFY";case 5:return"UPDATE";case 6:return"OPCODE_6";case 7:return"OPCODE_7";case 8:return"OPCODE_8";case 9:return"OPCODE_9";case 10:return"OPCODE_10";case 11:return"OPCODE_11";case 12:return"OPCODE_12";case 13:return"OPCODE_13";case 14:return"OPCODE_14";case 15:return"OPCODE_15"}return"OPCODE_"+e},fb.toOpcode=function(e){switch(e.toUpperCase()){case"QUERY":return 0;case"IQUERY":return 1;case"STATUS":return 2;case"OPCODE_3":return 3;case"NOTIFY":return 4;case"UPDATE":return 5;case"OPCODE_6":return 6;case"OPCODE_7":return 7;case"OPCODE_8":return 8;case"OPCODE_9":return 9;case"OPCODE_10":return 10;case"OPCODE_11":return 11;case"OPCODE_12":return 12;case"OPCODE_13":return 13;case"OPCODE_14":return 14;case"OPCODE_15":return 15}return 0}),fb}var mb,gb={};function yb(){return mb||(mb=1,gb.toString=function(e){switch(e){case 1:return"IN";case 2:return"CS";case 3:return"CH";case 4:return"HS";case 255:return"ANY"}return"UNKNOWN_"+e},gb.toClass=function(e){switch(e.toUpperCase()){case"IN":return 1;case"CS":return 2;case"CH":return 3;case"HS":return 4;case"ANY":return 255}return 0}),gb}var bb,vb={};function wb(){return bb||(bb=1,vb.toString=function(e){switch(e){case 1:return"LLQ";case 2:return"UL";case 3:return"NSID";case 5:return"DAU";case 6:return"DHU";case 7:return"N3U";case 8:return"CLIENT_SUBNET";case 9:return"EXPIRE";case 10:return"COOKIE";case 11:return"TCP_KEEPALIVE";case 12:return"PADDING";case 13:return"CHAIN";case 14:return"KEY_TAG";case 26946:return"DEVICEID"}return e<0?null:`OPTION_${e}`},vb.toCode=function(e){if("number"==typeof e)return e;if(!e)return-1;switch(e.toUpperCase()){case"OPTION_0":return 0;case"LLQ":return 1;case"UL":return 2;case"NSID":return 3;case"OPTION_4":return 4;case"DAU":return 5;case"DHU":return 6;case"N3U":return 7;case"CLIENT_SUBNET":return 8;case"EXPIRE":return 9;case"COOKIE":return 10;case"TCP_KEEPALIVE":return 11;case"PADDING":return 12;case"CHAIN":return 13;case"KEY_TAG":return 14;case"DEVICEID":return 26946;case"OPTION_65535":return 65535}const t=e.match(/_(\d+)$/);return t?parseInt(t[1],10):-1}),vb}var xb,_b,Eb,Sb,kb={exports:{}};function Ab(){return _b||(_b=1,function(e){const t=p.Buffer,n=cb(),r=db(),i=hb(),s=yb(),a=wb(),o=(xb||(xb=1,function(e){var t=function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.decode=function(e,t,n){if(t=~~t,(n=n||e.length-t)===r.size)return r.decode(e,t,n);if(n===i.size)return i.decode(e,t,n);throw Error(`Invalid buffer size needs to be ${r.size} for v4 or ${i.size} for v6.`)},e.encode=function(e,t,n){n=~~n;const a=s(e);return"function"==typeof t&&(t=t(n+a)),a===r.size?r.encode(e,t,n):i.encode(e,t,n)},e.familyOf=function(e){return s(e)===r.size?1:2},e.name=void 0,e.sizeOf=s,e.v6=e.v4=void 0;const t=/^(\d{1,3}\.){3,3}\d{1,3}$/,n=/^(::)?(((\d{1,3}\.){3}(\d{1,3}){1})?([0-9a-f]){0,4}:{0,2}){1,8}(::)?$/i,r={name:"v4",size:4,isFormat:e=>t.test(e),encode(e,t,n){n=~~n,t=t||new Uint8Array(n+4);const r=e.length;let i=0;for(let s=0;s<r;){const r=e.charCodeAt(s++);46===r?(t[n++]=i,i=0):i=10*i+(r-48)}return t[n]=i,t},decode:(e,t)=>(t=~~t,`${e[t++]}.${e[t++]}.${e[t++]}.${e[t]}`)};e.v4=r;const i={name:"v6",size:16,isFormat:e=>e.length>0&&n.test(e),encode(e,t,n){let r=16+(n=~~n),i=-1,s=0,a=0,o=!0,c=!1;t=t||new Uint8Array(n+16);for(let u=0;u<e.length;u++){let l=e.charCodeAt(u);58===l?(o?-1!==i?(n<r&&(t[n]=0),n<r-1&&(t[n+1]=0),n+=2):n<r&&(i=n):(!0===c?(n<r&&(t[n]=a),n++):(n<r&&(t[n]=s>>8),n<r-1&&(t[n+1]=255&s),n+=2),s=0,a=0),o=!0,c=!1):46===l?(n<r&&(t[n]=a),n++,a=0,s=0,o=!1,c=!0):(o=!1,l>=97?l-=87:l>=65?l-=55:(l-=48,a=10*a+l),s=(s<<4)+l)}if(!1===o)!0===c?(n<r&&(t[n]=a),n++):(n<r&&(t[n]=s>>8),n<r-1&&(t[n+1]=255&s),n+=2);else if(0===i)n<r&&(t[n]=0),n<r-1&&(t[n+1]=0),n+=2;else if(-1!==i){n+=2;for(let e=Math.min(n-1,r-1);e>=i+2;e--)t[e]=t[e-2];t[i]=0,t[i+1]=0,i=n}if(i!==n&&-1!==i)for(n>r-2&&(n=r-2);r>i;)t[--r]=n<r&&n>i?t[--n]:0;else for(;n<r;)t[n++]=0;return t},decode(e,t){t=~~t;let n="";for(let r=0;r<16;r+=2)0!==r&&(n+=":"),n+=(e[t+r]<<8|e[t+r+1]).toString(16);return n.replace(/(^|:)0(:0)*:0(:|$)/,"$1::$3").replace(/:{3,4}/,"::")}};function s(e){if(r.isFormat(e))return r.size;if(i.isFormat(e))return i.size;throw Error(`Invalid ip address: ${e}`)}return e.v6=i,e.name="ip","default"in e?e.default:e}({});e.exports=t}(kb)),kb.exports),c=e.name={};c.encode=function(e,n,r,{mail:i=!1}={}){n||(n=t.alloc(c.encodingLength(e))),r||(r=0);const s=r,a=e.replace(/^\.|\.$/gm,"");if(a.length){let e=[];if(i){let t="";a.split(".").forEach((n=>{n.endsWith("\\")?t+=(t.length?".":"")+n.slice(0,-1):0===e.length&&t.length?e.push(t+"."+n):e.push(n)}))}else e=a.split(".");for(let t=0;t<e.length;t++){const i=n.write(e[t],r+1);n[r]=i,r+=i+1}}return n[r++]=0,c.encode.bytes=r-s,n},c.encode.bytes=0,c.decode=function(e,t,{mail:n=!1}={}){t||(t=0);const r=[];let i=t,s=0,a=0,o=!1;for(;;){if(t>=e.length)throw new Error("Cannot decode name (buffer overflow)");const c=e[t++];if(a+=o?0:1,0===c)break;if(192&c){if(192&~c)throw new Error("Cannot decode name (bad label)");{if(t+1>e.length)throw new Error("Cannot decode name (buffer overflow)");const n=e.readUInt16BE(t-1)-49152;if(n>=i)throw new Error("Cannot decode name (bad pointer)");t=n,i=n,a+=o?0:1,o=!0}}else{if(t+c>e.length)throw new Error("Cannot decode name (buffer overflow)");if(s+=c+1,s>254)throw new Error("Cannot decode name (name too long)");let i=e.toString("utf-8",t,t+c);n&&(i=i.replace(/\./g,"\\.")),r.push(i),t+=c,a+=o?0:c}}return c.decode.bytes=a,0===r.length?".":r.join(".")},c.decode.bytes=0,c.encodingLength=function(e){return"."===e||".."===e?1:t.byteLength(e.replace(/^\.|\.$/gm,""))+2};const u={encode:function(e,n,r){n||(n=t.alloc(u.encodingLength(e))),r||(r=0);const i=n.write(e,r+1);return n[r]=i,u.encode.bytes=i+1,n}};u.encode.bytes=0,u.decode=function(e,t){t||(t=0);const n=e[t],r=e.toString("utf-8",t+1,t+1+n);return u.decode.bytes=n+1,r},u.decode.bytes=0,u.encodingLength=function(e){return t.byteLength(e)+1};const l={encode:function(e,t,n){t||(t=l.encodingLength(e)),n||(n=0);const r=32767&(e.flags||0),i="response"===e.type?32768:0;return t.writeUInt16BE(e.id||0,n),t.writeUInt16BE(r|i,n+2),t.writeUInt16BE(e.questions.length,n+4),t.writeUInt16BE(e.answers.length,n+6),t.writeUInt16BE(e.authorities.length,n+8),t.writeUInt16BE(e.additionals.length,n+10),t}};l.encode.bytes=12,l.decode=function(e,t){if(t||(t=0),e.length<12)throw new Error("Header must be 12 bytes");const n=e.readUInt16BE(t+2);return{id:e.readUInt16BE(t),type:32768&n?"response":"query",flags:32767&n,flag_qr:1==(n>>15&1),opcode:i.toString(n>>11&15),flag_aa:1==(n>>10&1),flag_tc:1==(n>>9&1),flag_rd:1==(n>>8&1),flag_ra:1==(n>>7&1),flag_z:1==(n>>6&1),flag_ad:1==(n>>5&1),flag_cd:1==(n>>4&1),rcode:r.toString(15&n),questions:new Array(e.readUInt16BE(t+4)),answers:new Array(e.readUInt16BE(t+6)),authorities:new Array(e.readUInt16BE(t+8)),additionals:new Array(e.readUInt16BE(t+10))}},l.decode.bytes=12,l.encodingLength=function(){return 12};const d=e.unknown={};d.encode=function(e,n,r){return n||(n=t.alloc(d.encodingLength(e))),r||(r=0),n.writeUInt16BE(e.length,r),e.copy(n,r+2),d.encode.bytes=e.length+2,n},d.encode.bytes=0,d.decode=function(e,t){t||(t=0);const n=e.readUInt16BE(t),r=e.slice(t+2,t+2+n);return d.decode.bytes=n+2,r},d.decode.bytes=0,d.encodingLength=function(e){return e.length+2};const f=e.ns={};f.encode=function(e,n,r){return n||(n=t.alloc(f.encodingLength(e))),r||(r=0),c.encode(e,n,r+2),n.writeUInt16BE(c.encode.bytes,r),f.encode.bytes=c.encode.bytes+2,n},f.encode.bytes=0,f.decode=function(e,t){t||(t=0);const n=e.readUInt16BE(t),r=c.decode(e,t+2);return f.decode.bytes=n+2,r},f.decode.bytes=0,f.encodingLength=function(e){return c.encodingLength(e)+2};const h=e.soa={};h.encode=function(e,n,r){n||(n=t.alloc(h.encodingLength(e))),r||(r=0);const i=r;return r+=2,c.encode(e.mname,n,r),r+=c.encode.bytes,c.encode(e.rname,n,r,{mail:!0}),r+=c.encode.bytes,n.writeUInt32BE(e.serial||0,r),r+=4,n.writeUInt32BE(e.refresh||0,r),r+=4,n.writeUInt32BE(e.retry||0,r),r+=4,n.writeUInt32BE(e.expire||0,r),r+=4,n.writeUInt32BE(e.minimum||0,r),r+=4,n.writeUInt16BE(r-i-2,i),h.encode.bytes=r-i,n},h.encode.bytes=0,h.decode=function(e,t){t||(t=0);const n=t,r={};return t+=2,r.mname=c.decode(e,t),t+=c.decode.bytes,r.rname=c.decode(e,t,{mail:!0}),t+=c.decode.bytes,r.serial=e.readUInt32BE(t),t+=4,r.refresh=e.readUInt32BE(t),t+=4,r.retry=e.readUInt32BE(t),t+=4,r.expire=e.readUInt32BE(t),t+=4,r.minimum=e.readUInt32BE(t),t+=4,h.decode.bytes=t-n,r},h.decode.bytes=0,h.encodingLength=function(e){return 22+c.encodingLength(e.mname)+c.encodingLength(e.rname)};const m=e.txt={};m.encode=function(e,n,r){Array.isArray(e)||(e=[e]);for(let n=0;n<e.length;n++)if("string"==typeof e[n]&&(e[n]=t.from(e[n])),!t.isBuffer(e[n]))throw new Error("Must be a Buffer");n||(n=t.alloc(m.encodingLength(e))),r||(r=0);const i=r;return r+=2,e.forEach((function(e){n[r++]=e.length,e.copy(n,r,0,e.length),r+=e.length})),n.writeUInt16BE(r-i-2,i),m.encode.bytes=r-i,n},m.encode.bytes=0,m.decode=function(e,t){t||(t=0);const n=t;let r=e.readUInt16BE(t);t+=2;let i=[];for(;r>0;){const n=e[t++];if(--r,r<n)throw new Error("Buffer overflow");i.push(e.slice(t,t+n)),t+=n,r-=n}return m.decode.bytes=t-n,i},m.decode.bytes=0,m.encodingLength=function(e){Array.isArray(e)||(e=[e]);let n=2;return e.forEach((function(e){n+="string"==typeof e?t.byteLength(e)+1:e.length+1})),n};const g=e.null={};g.encode=function(e,n,r){n||(n=t.alloc(g.encodingLength(e))),r||(r=0),"string"==typeof e&&(e=t.from(e)),e||(e=t.alloc(0));const i=r;r+=2;const s=e.length;return e.copy(n,r,0,s),r+=s,n.writeUInt16BE(r-i-2,i),g.encode.bytes=r-i,n},g.encode.bytes=0,g.decode=function(e,t){t||(t=0);const n=t,r=e.readUInt16BE(t);t+=2;const i=e.slice(t,t+r);return t+=r,g.decode.bytes=t-n,i},g.decode.bytes=0,g.encodingLength=function(e){return e?(t.isBuffer(e)?e.length:t.byteLength(e))+2:2};const y=e.hinfo={};y.encode=function(e,n,r){n||(n=t.alloc(y.encodingLength(e))),r||(r=0);const i=r;return r+=2,u.encode(e.cpu,n,r),r+=u.encode.bytes,u.encode(e.os,n,r),r+=u.encode.bytes,n.writeUInt16BE(r-i-2,i),y.encode.bytes=r-i,n},y.encode.bytes=0,y.decode=function(e,t){t||(t=0);const n=t,r={};return t+=2,r.cpu=u.decode(e,t),t+=u.decode.bytes,r.os=u.decode(e,t),t+=u.decode.bytes,y.decode.bytes=t-n,r},y.decode.bytes=0,y.encodingLength=function(e){return u.encodingLength(e.cpu)+u.encodingLength(e.os)+2};const b=e.ptr={},v=e.cname=b,w=e.dname=b;b.encode=function(e,n,r){return n||(n=t.alloc(b.encodingLength(e))),r||(r=0),c.encode(e,n,r+2),n.writeUInt16BE(c.encode.bytes,r),b.encode.bytes=c.encode.bytes+2,n},b.encode.bytes=0,b.decode=function(e,t){t||(t=0);const n=c.decode(e,t+2);return b.decode.bytes=c.decode.bytes+2,n},b.decode.bytes=0,b.encodingLength=function(e){return c.encodingLength(e)+2};const x=e.srv={};x.encode=function(e,n,r){n||(n=t.alloc(x.encodingLength(e))),r||(r=0),n.writeUInt16BE(e.priority||0,r+2),n.writeUInt16BE(e.weight||0,r+4),n.writeUInt16BE(e.port||0,r+6),c.encode(e.target,n,r+8);const i=c.encode.bytes+6;return n.writeUInt16BE(i,r),x.encode.bytes=i+2,n},x.encode.bytes=0,x.decode=function(e,t){t||(t=0);const n=e.readUInt16BE(t),r={};return r.priority=e.readUInt16BE(t+2),r.weight=e.readUInt16BE(t+4),r.port=e.readUInt16BE(t+6),r.target=c.decode(e,t+8),x.decode.bytes=n+2,r},x.decode.bytes=0,x.encodingLength=function(e){return 8+c.encodingLength(e.target)};const _=e.caa={};_.ISSUER_CRITICAL=128,_.encode=function(e,n,r){const i=_.encodingLength(e);return n||(n=t.alloc(_.encodingLength(e))),r||(r=0),e.issuerCritical&&(e.flags=_.ISSUER_CRITICAL),n.writeUInt16BE(i-2,r),r+=2,n.writeUInt8(e.flags||0,r),r+=1,u.encode(e.tag,n,r),r+=u.encode.bytes,n.write(e.value,r),r+=t.byteLength(e.value),_.encode.bytes=i,n},_.encode.bytes=0,_.decode=function(e,t){t||(t=0);const n=e.readUInt16BE(t),r=t+=2,i={};return i.flags=e.readUInt8(t),t+=1,i.tag=u.decode(e,t),t+=u.decode.bytes,i.value=e.toString("utf-8",t,r+n),i.issuerCritical=!!(i.flags&_.ISSUER_CRITICAL),_.decode.bytes=n+2,i},_.decode.bytes=0,_.encodingLength=function(e){return u.encodingLength(e.tag)+u.encodingLength(e.value)+2};const E=e.mx={};E.encode=function(e,n,r){n||(n=t.alloc(E.encodingLength(e))),r||(r=0);const i=r;return r+=2,n.writeUInt16BE(e.preference||0,r),r+=2,c.encode(e.exchange,n,r),r+=c.encode.bytes,n.writeUInt16BE(r-i-2,i),E.encode.bytes=r-i,n},E.encode.bytes=0,E.decode=function(e,t){t||(t=0);const n=t,r={};return t+=2,r.preference=e.readUInt16BE(t),t+=2,r.exchange=c.decode(e,t),t+=c.decode.bytes,E.decode.bytes=t-n,r},E.encodingLength=function(e){return 4+c.encodingLength(e.exchange)};const S=e.a={};S.encode=function(e,n,r){return n||(n=t.alloc(S.encodingLength(e))),r||(r=0),n.writeUInt16BE(4,r),r+=2,o.v4.encode(e,n,r),S.encode.bytes=6,n},S.encode.bytes=0,S.decode=function(e,t){t||(t=0),t+=2;const n=o.v4.decode(e,t);return S.decode.bytes=6,n},S.decode.bytes=0,S.encodingLength=function(){return 6};const k=e.aaaa={};k.encode=function(e,n,r){return n||(n=t.alloc(k.encodingLength(e))),r||(r=0),n.writeUInt16BE(16,r),r+=2,o.v6.encode(e,n,r),k.encode.bytes=18,n},k.encode.bytes=0,k.decode=function(e,t){t||(t=0),t+=2;const n=o.v6.decode(e,t);return k.decode.bytes=18,n},k.decode.bytes=0,k.encodingLength=function(){return 18};const A=e.option={};A.encode=function(e,n,r){n||(n=t.alloc(A.encodingLength(e))),r||(r=0);const i=r,s=a.toCode(e.code);if(n.writeUInt16BE(s,r),r+=2,e.data)n.writeUInt16BE(e.data.length,r),r+=2,e.data.copy(n,r),r+=e.data.length;else switch(s){case 8:const i=e.sourcePrefixLength||0,s=e.family||o.familyOf(e.ip),a=o.encode(e.ip,t.alloc),c=Math.ceil(i/8);n.writeUInt16BE(c+4,r),r+=2,n.writeUInt16BE(s,r),r+=2,n.writeUInt8(i,r++),n.writeUInt8(e.scopePrefixLength||0,r++),a.copy(n,r,0,c),r+=c;break;case 11:e.timeout?(n.writeUInt16BE(2,r),r+=2,n.writeUInt16BE(e.timeout,r),r+=2):(n.writeUInt16BE(0,r),r+=2);break;case 12:const u=e.length||0;n.writeUInt16BE(u,r),r+=2,n.fill(0,r,r+u),r+=u;break;case 14:const l=2*e.tags.length;n.writeUInt16BE(l,r),r+=2;for(const t of e.tags)n.writeUInt16BE(t,r),r+=2;break;default:throw new Error(`Unknown roption code: ${e.code}`)}return A.encode.bytes=r-i,n},A.encode.bytes=0,A.decode=function(e,n){n||(n=0);const r={};r.code=e.readUInt16BE(n),r.type=a.toString(r.code),n+=2;const i=e.readUInt16BE(n);switch(n+=2,r.data=e.slice(n,n+i),r.code){case 8:r.family=e.readUInt16BE(n),n+=2,r.sourcePrefixLength=e.readUInt8(n++),r.scopePrefixLength=e.readUInt8(n++);const s=t.alloc(1===r.family?4:16);e.copy(s,0,n,n+i-4),r.ip=o.decode(s);break;case 11:i>0&&(r.timeout=e.readUInt16BE(n),n+=2);break;case 14:r.tags=[];for(let t=0;t<i;t+=2)r.tags.push(e.readUInt16BE(n)),n+=2}return A.decode.bytes=i+4,r},A.decode.bytes=0,A.encodingLength=function(e){if(e.data)return e.data.length+4;switch(a.toCode(e.code)){case 8:const t=e.sourcePrefixLength||0;return Math.ceil(t/8)+8;case 11:return"number"==typeof e.timeout?6:4;case 12:return e.length+4;case 14:return 4+2*e.tags.length}throw new Error(`Unknown roption code: ${e.code}`)};const T=e.opt={};T.encode=function(e,n,r){n||(n=t.alloc(T.encodingLength(e))),r||(r=0);const i=r,s=z(e,A);return n.writeUInt16BE(s,r),r=q(e,A,n,r+2),T.encode.bytes=r-i,n},T.encode.bytes=0,T.decode=function(e,t){t||(t=0);const n=t,r=[];let i=e.readUInt16BE(t);t+=2;let s=0;for(;i>0;)r[s++]=A.decode(e,t),t+=A.decode.bytes,i-=A.decode.bytes;return T.decode.bytes=t-n,r},T.decode.bytes=0,T.encodingLength=function(e){return 2+z(e||[],A)};const M=e.dnskey={};M.PROTOCOL_DNSSEC=3,M.ZONE_KEY=128,M.SECURE_ENTRYPOINT=32768,M.encode=function(e,n,r){n||(n=t.alloc(M.encodingLength(e))),r||(r=0);const i=r,s=e.key;if(!t.isBuffer(s))throw new Error("Key must be a Buffer");return r+=2,n.writeUInt16BE(e.flags,r),r+=2,n.writeUInt8(M.PROTOCOL_DNSSEC,r),r+=1,n.writeUInt8(e.algorithm,r),r+=1,s.copy(n,r,0,s.length),r+=s.length,M.encode.bytes=r-i,n.writeUInt16BE(M.encode.bytes-2,i),n},M.encode.bytes=0,M.decode=function(e,t){t||(t=0);const n=t;var r={},i=e.readUInt16BE(t);if(t+=2,r.flags=e.readUInt16BE(t),t+=2,e.readUInt8(t)!==M.PROTOCOL_DNSSEC)throw new Error("Protocol must be 3");return t+=1,r.algorithm=e.readUInt8(t),t+=1,r.key=e.slice(t,n+i+2),t+=r.key.length,M.decode.bytes=t-n,r},M.decode.bytes=0,M.encodingLength=function(e){return 6+t.byteLength(e.key)};const R=e.rrsig={};R.encode=function(e,r,i){r||(r=t.alloc(R.encodingLength(e))),i||(i=0);const s=i,a=e.signature;if(!t.isBuffer(a))throw new Error("Signature must be a Buffer");return i+=2,r.writeUInt16BE(n.toType(e.typeCovered),i),i+=2,r.writeUInt8(e.algorithm,i),i+=1,r.writeUInt8(e.labels,i),i+=1,r.writeUInt32BE(e.originalTTL,i),i+=4,r.writeUInt32BE(e.expiration,i),i+=4,r.writeUInt32BE(e.inception,i),i+=4,r.writeUInt16BE(e.keyTag,i),i+=2,c.encode(e.signersName,r,i),i+=c.encode.bytes,a.copy(r,i,0,a.length),i+=a.length,R.encode.bytes=i-s,r.writeUInt16BE(R.encode.bytes-2,s),r},R.encode.bytes=0,R.decode=function(e,t){t||(t=0);const r=t;var i={},s=e.readUInt16BE(t);return t+=2,i.typeCovered=n.toString(e.readUInt16BE(t)),t+=2,i.algorithm=e.readUInt8(t),t+=1,i.labels=e.readUInt8(t),t+=1,i.originalTTL=e.readUInt32BE(t),t+=4,i.expiration=e.readUInt32BE(t),t+=4,i.inception=e.readUInt32BE(t),t+=4,i.keyTag=e.readUInt16BE(t),t+=2,i.signersName=c.decode(e,t),t+=c.decode.bytes,i.signature=e.slice(t,r+s+2),t+=i.signature.length,R.decode.bytes=t-r,i},R.decode.bytes=0,R.encodingLength=function(e){return 20+c.encodingLength(e.signersName)+t.byteLength(e.signature)};const O=e.rp={};O.encode=function(e,n,r){n||(n=t.alloc(O.encodingLength(e))),r||(r=0);const i=r;return r+=2,c.encode(e.mbox||".",n,r,{mail:!0}),r+=c.encode.bytes,c.encode(e.txt||".",n,r),r+=c.encode.bytes,O.encode.bytes=r-i,n.writeUInt16BE(O.encode.bytes-2,i),n},O.encode.bytes=0,O.decode=function(e,t){t||(t=0);const n=t,r={};return t+=2,r.mbox=c.decode(e,t,{mail:!0})||".",t+=c.decode.bytes,r.txt=c.decode(e,t)||".",t+=c.decode.bytes,O.decode.bytes=t-n,r},O.decode.bytes=0,O.encodingLength=function(e){return 2+c.encodingLength(e.mbox||".")+c.encodingLength(e.txt||".")};const I={encode:function(e,r,i){r||(r=t.alloc(I.encodingLength(e))),i||(i=0);const s=i;for(var a=[],o=0;o<e.length;o++){var c=n.toType(e[o]);void 0===a[c>>8]&&(a[c>>8]=[]),a[c>>8][c>>3&31]|=1<<7-(7&c)}for(o=0;o<a.length;o++)if(void 0!==a[o]){var u=t.from(a[o]);r.writeUInt8(o,i),i+=1,r.writeUInt8(u.length,i),i+=1,u.copy(r,i),i+=u.length}return I.encode.bytes=i-s,r}};I.encode.bytes=0,I.decode=function(e,t,r){t||(t=0);const i=t;for(var s=[];t-i<r;){var a=e.readUInt8(t);t+=1;var o=e.readUInt8(t);t+=1;for(var c=0;c<o;c++)for(var u=e.readUInt8(t+c),l=0;l<8;l++)if(u&1<<7-l){var d=n.toString(a<<8|c<<3|l);s.push(d)}t+=o}return I.decode.bytes=t-i,s},I.decode.bytes=0,I.encodingLength=function(e){for(var t=[],r=0;r<e.length;r++){var i=n.toType(e[r]);t[i>>8]=Math.max(t[i>>8]||0,255&i)}var s=0;for(r=0;r<t.length;r++)void 0!==t[r]&&(s+=2+Math.ceil((t[r]+1)/8));return s};const N=e.nsec={};N.encode=function(e,n,r){n||(n=t.alloc(N.encodingLength(e))),r||(r=0);const i=r;return r+=2,c.encode(e.nextDomain,n,r),r+=c.encode.bytes,I.encode(e.rrtypes,n,r),r+=I.encode.bytes,N.encode.bytes=r-i,n.writeUInt16BE(N.encode.bytes-2,i),n},N.encode.bytes=0,N.decode=function(e,t){t||(t=0);const n=t;var r={},i=e.readUInt16BE(t);return t+=2,r.nextDomain=c.decode(e,t),t+=c.decode.bytes,r.rrtypes=I.decode(e,t,i-(t-n)),t+=I.decode.bytes,N.decode.bytes=t-n,r},N.decode.bytes=0,N.encodingLength=function(e){return 2+c.encodingLength(e.nextDomain)+I.encodingLength(e.rrtypes)};const P=e.nsec3={};P.encode=function(e,n,r){n||(n=t.alloc(P.encodingLength(e))),r||(r=0);const i=r,s=e.salt;if(!t.isBuffer(s))throw new Error("salt must be a Buffer");const a=e.nextDomain;if(!t.isBuffer(a))throw new Error("nextDomain must be a Buffer");return r+=2,n.writeUInt8(e.algorithm,r),r+=1,n.writeUInt8(e.flags,r),r+=1,n.writeUInt16BE(e.iterations,r),r+=2,n.writeUInt8(s.length,r),r+=1,s.copy(n,r,0,s.length),r+=s.length,n.writeUInt8(a.length,r),r+=1,a.copy(n,r,0,a.length),r+=a.length,I.encode(e.rrtypes,n,r),r+=I.encode.bytes,P.encode.bytes=r-i,n.writeUInt16BE(P.encode.bytes-2,i),n},P.encode.bytes=0,P.decode=function(e,t){t||(t=0);const n=t;var r={},i=e.readUInt16BE(t);t+=2,r.algorithm=e.readUInt8(t),t+=1,r.flags=e.readUInt8(t),t+=1,r.iterations=e.readUInt16BE(t),t+=2;const s=e.readUInt8(t);t+=1,r.salt=e.slice(t,t+s),t+=s;const a=e.readUInt8(t);return t+=1,r.nextDomain=e.slice(t,t+a),t+=a,r.rrtypes=I.decode(e,t,i-(t-n)),t+=I.decode.bytes,P.decode.bytes=t-n,r},P.decode.bytes=0,P.encodingLength=function(e){return 8+e.salt.length+e.nextDomain.length+I.encodingLength(e.rrtypes)};const C=e.ds={};C.encode=function(e,n,r){n||(n=t.alloc(C.encodingLength(e))),r||(r=0);const i=r,s=e.digest;if(!t.isBuffer(s))throw new Error("Digest must be a Buffer");return r+=2,n.writeUInt16BE(e.keyTag,r),r+=2,n.writeUInt8(e.algorithm,r),r+=1,n.writeUInt8(e.digestType,r),r+=1,s.copy(n,r,0,s.length),r+=s.length,C.encode.bytes=r-i,n.writeUInt16BE(C.encode.bytes-2,i),n},C.encode.bytes=0,C.decode=function(e,t){t||(t=0);const n=t;var r={},i=e.readUInt16BE(t);return t+=2,r.keyTag=e.readUInt16BE(t),t+=2,r.algorithm=e.readUInt8(t),t+=1,r.digestType=e.readUInt8(t),t+=1,r.digest=e.slice(t,n+i+2),t+=r.digest.length,C.decode.bytes=t-n,r},C.decode.bytes=0,C.encodingLength=function(e){return 6+t.byteLength(e.digest)};const j=e.sshfp={};j.getFingerprintLengthForHashType=function(e){switch(e){case 1:return 20;case 2:return 32}},j.encode=function(e,n,r){n||(n=t.alloc(j.encodingLength(e))),r||(r=0);const i=r;n[r+=2]=e.algorithm,n[r+=1]=e.hash,r+=1;const s=t.from(e.fingerprint.toUpperCase(),"hex");if(s.length!==j.getFingerprintLengthForHashType(e.hash))throw new Error("Invalid fingerprint length");return s.copy(n,r),r+=s.byteLength,j.encode.bytes=r-i,n.writeUInt16BE(j.encode.bytes-2,i),n},j.encode.bytes=0,j.decode=function(e,t){t||(t=0);const n=t,r={};t+=2,r.algorithm=e[t],t+=1,r.hash=e[t],t+=1;const i=j.getFingerprintLengthForHashType(r.hash);return r.fingerprint=e.slice(t,t+i).toString("hex").toUpperCase(),t+=i,j.decode.bytes=t-n,r},j.decode.bytes=0,j.encodingLength=function(e){return 4+t.from(e.fingerprint,"hex").byteLength};const L=e.naptr={};L.encode=function(e,n,r){n||(n=t.alloc(L.encodingLength(e))),r||(r=0);const i=r;return r+=2,n.writeUInt16BE(e.order||0,r),r+=2,n.writeUInt16BE(e.preference||0,r),r+=2,u.encode(e.flags,n,r),r+=u.encode.bytes,u.encode(e.services,n,r),r+=u.encode.bytes,u.encode(e.regexp,n,r),r+=u.encode.bytes,c.encode(e.replacement,n,r),r+=c.encode.bytes,L.encode.bytes=r-i,n.writeUInt16BE(L.encode.bytes-2,i),n},L.encode.bytes=0,L.decode=function(e,t){t||(t=0);const n=t,r={};return t+=2,r.order=e.readUInt16BE(t),t+=2,r.preference=e.readUInt16BE(t),t+=2,r.flags=u.decode(e,t),t+=u.decode.bytes,r.services=u.decode(e,t),t+=u.decode.bytes,r.regexp=u.decode(e,t),t+=u.decode.bytes,r.replacement=c.decode(e,t),t+=c.decode.bytes,L.decode.bytes=t-n,r},L.decode.bytes=0,L.encodingLength=function(e){return u.encodingLength(e.flags)+u.encodingLength(e.services)+u.encodingLength(e.regexp)+c.encodingLength(e.replacement)+6};const D=e.tlsa={};D.encode=function(e,n,r){n||(n=t.alloc(D.encodingLength(e))),r||(r=0);const i=r,s=e.certificate;if(!t.isBuffer(s))throw new Error("Certificate must be a Buffer");return r+=2,n.writeUInt8(e.usage,r),r+=1,n.writeUInt8(e.selector,r),r+=1,n.writeUInt8(e.matchingType,r),r+=1,s.copy(n,r,0,s.length),r+=s.length,D.encode.bytes=r-i,n.writeUInt16BE(D.encode.bytes-2,i),n},D.encode.bytes=0,D.decode=function(e,t){t||(t=0);const n=t,r={},i=e.readUInt16BE(t);return t+=2,r.usage=e.readUInt8(t),t+=1,r.selector=e.readUInt8(t),t+=1,r.matchingType=e.readUInt8(t),t+=1,r.certificate=e.slice(t,n+i+2),t+=r.certificate.length,D.decode.bytes=t-n,r},D.decode.bytes=0,D.encodingLength=function(e){return 5+t.byteLength(e.certificate)};const $=e.record=function(e){switch(e.toUpperCase()){case"A":return S;case"PTR":return b;case"CNAME":return v;case"DNAME":return w;case"TXT":return m;case"NULL":return g;case"AAAA":return k;case"SRV":return x;case"HINFO":return y;case"CAA":return _;case"NS":return f;case"SOA":return h;case"MX":return E;case"OPT":return T;case"DNSKEY":return M;case"RRSIG":return R;case"RP":return O;case"NSEC":return N;case"NSEC3":return P;case"SSHFP":return j;case"DS":return C;case"NAPTR":return L;case"TLSA":return D}return d},U=e.answer={};U.encode=function(e,r,i){r||(r=t.alloc(U.encodingLength(e))),i||(i=0);const a=i;if(c.encode(e.name,r,i),i+=c.encode.bytes,r.writeUInt16BE(n.toType(e.type),i),"OPT"===e.type.toUpperCase()){if("."!==e.name)throw new Error("OPT name must be root.");r.writeUInt16BE(e.udpPayloadSize||4096,i+2),r.writeUInt8(e.extendedRcode||0,i+4),r.writeUInt8(e.ednsVersion||0,i+5),r.writeUInt16BE(e.flags||0,i+6),i+=8,T.encode(e.options||[],r,i),i+=T.encode.bytes}else{let t=s.toClass(void 0===e.class?"IN":e.class);e.flush&&(t|=32768),r.writeUInt16BE(t,i+2),r.writeUInt32BE(e.ttl||0,i+4),i+=8;const n=$(e.type);n.encode(e.data,r,i),i+=n.encode.bytes}return U.encode.bytes=i-a,r},U.encode.bytes=0,U.decode=function(e,t){t||(t=0);const r={},i=t;if(r.name=c.decode(e,t),t+=c.decode.bytes,r.type=n.toString(e.readUInt16BE(t)),"OPT"===r.type)r.udpPayloadSize=e.readUInt16BE(t+2),r.extendedRcode=e.readUInt8(t+4),r.ednsVersion=e.readUInt8(t+5),r.flags=e.readUInt16BE(t+6),r.flag_do=1==(r.flags>>15&1),r.options=T.decode(e,t+8),t+=8+T.decode.bytes;else{const n=e.readUInt16BE(t+2);r.ttl=e.readUInt32BE(t+4),r.class=s.toString(-32769&n),r.flush=!!(32768&n);const i=$(r.type);r.data=i.decode(e,t+8),t+=8+i.decode.bytes}return U.decode.bytes=t-i,r},U.decode.bytes=0,U.encodingLength=function(e){const t=null!==e.data&&void 0!==e.data?e.data:e.options;return c.encodingLength(e.name)+8+$(e.type).encodingLength(t)};const B=e.question={};function z(e,t){let n=0;for(let r=0;r<e.length;r++)n+=t.encodingLength(e[r]);return n}function q(e,t,n,r){for(let i=0;i<e.length;i++)t.encode(e[i],n,r),r+=t.encode.bytes;return r}function H(e,t,n,r){for(let i=0;i<e.length;i++)e[i]=t.decode(n,r),r+=t.decode.bytes;return r}B.encode=function(e,r,i){r||(r=t.alloc(B.encodingLength(e))),i||(i=0);const a=i;return c.encode(e.name,r,i),i+=c.encode.bytes,r.writeUInt16BE(n.toType(e.type),i),i+=2,r.writeUInt16BE(s.toClass(void 0===e.class?"IN":e.class),i),i+=2,B.encode.bytes=i-a,e},B.encode.bytes=0,B.decode=function(e,t){t||(t=0);const r=t,i={};i.name=c.decode(e,t),t+=c.decode.bytes,i.type=n.toString(e.readUInt16BE(t)),t+=2,i.class=s.toString(e.readUInt16BE(t)),t+=2;return!!(32768&i.class)&&(i.class&=-32769),B.decode.bytes=t-r,i},B.decode.bytes=0,B.encodingLength=function(e){return c.encodingLength(e.name)+4},e.AUTHORITATIVE_ANSWER=1024,e.TRUNCATED_RESPONSE=512,e.RECURSION_DESIRED=256,e.RECURSION_AVAILABLE=128,e.AUTHENTIC_DATA=32,e.CHECKING_DISABLED=16,e.DNSSEC_OK=32768,e.encode=function(n,r,i){const s=!r;s&&(r=t.alloc(e.encodingLength(n))),i||(i=0);const a=i;return n.questions||(n.questions=[]),n.answers||(n.answers=[]),n.authorities||(n.authorities=[]),n.additionals||(n.additionals=[]),l.encode(n,r,i),i+=l.encode.bytes,i=q(n.questions,B,r,i),i=q(n.answers,U,r,i),i=q(n.authorities,U,r,i),i=q(n.additionals,U,r,i),e.encode.bytes=i-a,s&&e.encode.bytes!==r.length?r.slice(0,e.encode.bytes):r},e.encode.bytes=0,e.decode=function(t,n){n||(n=0);const r=n,i=l.decode(t,n);return n+=l.decode.bytes,n=H(i.questions,B,t,n),n=H(i.answers,U,t,n),n=H(i.authorities,U,t,n),n=H(i.additionals,U,t,n),e.decode.bytes=n-r,i},e.decode.bytes=0,e.encodingLength=function(e){return l.encodingLength(e)+z(e.questions||[],B)+z(e.answers||[],U)+z(e.authorities||[],U)+z(e.additionals||[],U)},e.streamEncode=function(n){const r=e.encode(n),i=t.alloc(2);i.writeUInt16BE(r.byteLength);const s=t.concat([i,r]);return e.streamEncode.bytes=s.byteLength,s},e.streamEncode.bytes=0,e.streamDecode=function(t){const n=t.readUInt16BE(0);if(t.byteLength<n+2)return null;const r=e.decode(t.slice(2));return e.streamDecode.bytes=e.decode.bytes,r},e.streamDecode.bytes=0}(ab)),ab}var Tb=function(){if(Sb)return Eb;Sb=1;const e=$,t=a,n=Ab(),r=f;function i(t){if(!(this instanceof i))return new i(t);t||(t={}),r.EventEmitter.call(this);const n=this;function s(){n._ontimeoutCheck()}function a(){n._interval=setInterval(s,n.timeoutChecks),n.emit("listening")}this.retries=void 0!==t.retries?t.retries:5,this.timeout=t.timeout||7500,this.timeoutChecks=t.timeoutChecks||this.timeout/10,this.destroyed=!1,this.inflight=0,this.maxQueries=t.maxQueries||1e4,this.maxRedirects=t.maxRedirects||0,this.socket=t.socket||e.createSocket("udp4"),this._id=Math.ceil(Math.random()*this.maxQueries),this._queries=new Array(this.maxQueries).fill(null),this._interval=null,this.socket.on("error",(function(e){"EACCES"===e.code||"EADDRINUSE"===e.code?n.emit("error",e):n.emit("warning",e)})),this.socket.on("message",(function(e,t){n._onmessage(e,t)})),!function(e){try{return 0!==e.address().port}catch(e){return!1}}(this.socket)?this.socket.on("listening",a):a(),this.socket.on("close",(function(){n.emit("close")}))}function s(){}return Eb=i,t.inherits(i,r.EventEmitter),i.RECURSION_DESIRED=i.prototype.RECURSION_DESIRED=n.RECURSION_DESIRED,i.RECURSION_AVAILABLE=i.prototype.RECURSION_AVAILABLE=n.RECURSION_AVAILABLE,i.TRUNCATED_RESPONSE=i.prototype.TRUNCATED_RESPONSE=n.TRUNCATED_RESPONSE,i.AUTHORITATIVE_ANSWER=i.prototype.AUTHORITATIVE_ANSWER=n.AUTHORITATIVE_ANSWER,i.AUTHENTIC_DATA=i.prototype.AUTHENTIC_DATA=n.AUTHENTIC_DATA,i.CHECKING_DISABLED=i.prototype.CHECKING_DISABLED=n.CHECKING_DISABLED,i.prototype.address=function(){return this.socket.address()},i.prototype.bind=function(...e){const t=e.length>0&&e[e.length-1];"function"==typeof t?(this.once("listening",t),this.socket.bind(...e.slice(0,-1))):this.socket.bind(...e)},i.prototype.destroy=function(e){if(e&&this.once("close",e),!this.destroyed){this.destroyed=!0,clearInterval(this._interval),this.socket.close();for(let e=0;e<this.maxQueries;e++){const t=this._queries[e];t&&(t.callback(new Error("Socket destroyed")),this._queries[e]=null)}this.inflight=0}},i.prototype._ontimeoutCheck=function(){const e=Date.now();for(let t=0;t<this.maxQueries;t++){const n=this._queries[t];!n||e-n.firstTry<(n.tries+1)*this.timeout||(n.tries>this.retries?(this._queries[t]=null,this.inflight--,this.emit("timeout",n.query,n.port,n.host),n.callback(new Error("Query timed out"))):(n.tries++,this.socket.send(n.buffer,0,n.buffer.length,n.port,Array.isArray(n.host)?n.host[Math.floor(n.host.length*Math.random())]:n.host||"127.0.0.1")))}},i.prototype._shouldRedirect=function(e,t){if(this.maxRedirects<=0||!e||1!==e.query.questions.length||t.answers.filter((e=>"A"===e.type)).length>0)return!1;if(e.redirects>this.maxRedirects)return!1;const r=t.answers.filter((e=>"CNAME"===e.type));if(0===r.length)return!1;const i=this._getNextEmptyId();return-1===i?(e.callback(new Error("Query array is full!")),!0):(e.query={id:i+1,flags:n.RECURSION_DESIRED,questions:[{type:"A",name:r[0].data}]},e.redirects++,e.firstTry=Date.now(),e.tries=0,e.buffer=n.encode(e.query),this._queries[i]=e,this.socket.send(e.buffer,0,e.buffer.length,e.port,Array.isArray(e.host)?e.host[Math.floor(e.host.length*Math.random())]:e.host||"127.0.0.1"),!0)},i.prototype._onmessage=function(e,t){let r;try{r=n.decode(e)}catch(e){return void this.emit("warning",e)}if("response"===r.type&&r.id){const e=this._queries[r.id-1];e&&(this._queries[r.id-1]=null,this.inflight--,this._shouldRedirect(e,r)||e.callback(null,r))}this.emit(r.type,r,t.port,t.address)},i.prototype.unref=function(){this.socket.unref()},i.prototype.ref=function(){this.socket.ref()},i.prototype.response=function(e,t,r,i){if(this.destroyed)return;t.type="response",t.id=e.id;const s=n.encode(t);this.socket.send(s,0,s.length,r,i)},i.prototype.cancel=function(e){const t=this._queries[e];t&&(this._queries[e]=null,this.inflight--,t.callback(new Error("Query cancelled")))},i.prototype.setRetries=function(e,t){const n=this._queries[e];n&&(n.firstTry=n.firstTry-this.timeout*(t-n.retries),n.retries=this.retries-t)},i.prototype._getNextEmptyId=function(){let e=-1;for(let t=this.maxQueries;t>0;t--){const n=(this._id+t)%this.maxQueries;if(null===this._queries[n]){e=n,this._id=(n+1)%this.maxQueries;break}}return e},i.prototype.query=function(e,t,r,a){if(this.destroyed)return a(new Error("Socket destroyed")),0;this.inflight++,e.type="query",e.flags="number"==typeof e.flags?e.flags:i.RECURSION_DESIRED;const o=this._getNextEmptyId();if(-1===o)return a(new Error("Query array is full!")),0;e.id=o+1;const c=n.encode(e);return this._queries[o]={callback:a||s,redirects:0,firstTry:Date.now(),query:e,tries:0,buffer:c,port:t,host:r},this.socket.send(c,0,c.length,t,Array.isArray(r)?r[Math.floor(r.length*Math.random())]:r||"127.0.0.1"),o},Eb}(),Mb=we(Tb);const Rb=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];const Ob=["Function","Generator","AsyncGenerator","GeneratorFunction","AsyncGeneratorFunction","AsyncFunction","Observable","Array","Buffer","Blob","Object","RegExp","Date","Error","Map","Set","WeakMap","WeakSet","WeakRef","ArrayBuffer","SharedArrayBuffer","DataView","Promise","URL","FormData","URLSearchParams","HTMLElement","NaN",...Rb];const Ib=["null","undefined","string","number","bigint","boolean","symbol"];function Nb(e){return t=>typeof t===e}const{toString:Pb}=Object.prototype,Cb=e=>{const t=Pb.call(e).slice(8,-1);return/HTML\w+Element/.test(t)&&Lb.domElement(e)?"HTMLElement":(n=t,Ob.includes(n)?t:void 0);var n},jb=e=>t=>Cb(t)===e;function Lb(e){if(null===e)return"null";switch(typeof e){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"NaN":"number";case"boolean":return"boolean";case"function":return"Function";case"bigint":return"bigint";case"symbol":return"symbol"}if(Lb.observable(e))return"Observable";if(Lb.array(e))return"Array";if(Lb.buffer(e))return"Buffer";const t=Cb(e);if(t)return t;if(e instanceof String||e instanceof Boolean||e instanceof Number)throw new TypeError("Please don't use object wrappers for primitive types");return"Object"}Lb.undefined=Nb("undefined"),Lb.string=Nb("string");const Db=Nb("number");Lb.number=e=>Db(e)&&!Lb.nan(e),Lb.positiveNumber=e=>Lb.number(e)&&e>0,Lb.negativeNumber=e=>Lb.number(e)&&e<0,Lb.bigint=Nb("bigint"),Lb.function_=Nb("function"),Lb.null_=e=>null===e,Lb.class_=e=>Lb.function_(e)&&e.toString().startsWith("class "),Lb.boolean=e=>!0===e||!1===e,Lb.symbol=Nb("symbol"),Lb.numericString=e=>Lb.string(e)&&!Lb.emptyStringOrWhitespace(e)&&!Number.isNaN(Number(e)),Lb.array=(e,t)=>!!Array.isArray(e)&&(!Lb.function_(t)||e.every((e=>t(e)))),Lb.buffer=e=>e?.constructor?.isBuffer?.(e)??!1,Lb.blob=e=>jb("Blob")(e),Lb.nullOrUndefined=e=>Lb.null_(e)||Lb.undefined(e),Lb.object=e=>!Lb.null_(e)&&("object"==typeof e||Lb.function_(e)),Lb.iterable=e=>Lb.function_(e?.[Symbol.iterator]),Lb.asyncIterable=e=>Lb.function_(e?.[Symbol.asyncIterator]),Lb.generator=e=>Lb.iterable(e)&&Lb.function_(e?.next)&&Lb.function_(e?.throw),Lb.asyncGenerator=e=>Lb.asyncIterable(e)&&Lb.function_(e.next)&&Lb.function_(e.throw),Lb.nativePromise=e=>jb("Promise")(e);Lb.promise=e=>Lb.nativePromise(e)||(e=>Lb.function_(e?.then)&&Lb.function_(e?.catch))(e),Lb.generatorFunction=jb("GeneratorFunction"),Lb.asyncGeneratorFunction=e=>"AsyncGeneratorFunction"===Cb(e),Lb.asyncFunction=e=>"AsyncFunction"===Cb(e),Lb.boundFunction=e=>Lb.function_(e)&&!e.hasOwnProperty("prototype"),Lb.regExp=jb("RegExp"),Lb.date=jb("Date"),Lb.error=jb("Error"),Lb.map=e=>jb("Map")(e),Lb.set=e=>jb("Set")(e),Lb.weakMap=e=>jb("WeakMap")(e),Lb.weakSet=e=>jb("WeakSet")(e),Lb.weakRef=e=>jb("WeakRef")(e),Lb.int8Array=jb("Int8Array"),Lb.uint8Array=jb("Uint8Array"),Lb.uint8ClampedArray=jb("Uint8ClampedArray"),Lb.int16Array=jb("Int16Array"),Lb.uint16Array=jb("Uint16Array"),Lb.int32Array=jb("Int32Array"),Lb.uint32Array=jb("Uint32Array"),Lb.float32Array=jb("Float32Array"),Lb.float64Array=jb("Float64Array"),Lb.bigInt64Array=jb("BigInt64Array"),Lb.bigUint64Array=jb("BigUint64Array"),Lb.arrayBuffer=jb("ArrayBuffer"),Lb.sharedArrayBuffer=jb("SharedArrayBuffer"),Lb.dataView=jb("DataView"),Lb.enumCase=(e,t)=>Object.values(t).includes(e),Lb.directInstanceOf=(e,t)=>Object.getPrototypeOf(e)===t.prototype,Lb.urlInstance=e=>jb("URL")(e),Lb.urlString=e=>{if(!Lb.string(e))return!1;try{return new URL(e),!0}catch{return!1}},Lb.truthy=e=>Boolean(e),Lb.falsy=e=>!e,Lb.nan=e=>Number.isNaN(e),Lb.primitive=e=>{return Lb.null_(e)||(t=typeof e,Ib.includes(t));var t},Lb.integer=e=>Number.isInteger(e),Lb.safeInteger=e=>Number.isSafeInteger(e),Lb.plainObject=e=>{if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},Lb.typedArray=e=>{return t=Cb(e),Rb.includes(t);var t};Lb.arrayLike=e=>!Lb.nullOrUndefined(e)&&!Lb.function_(e)&&(e=>Lb.safeInteger(e)&&e>=0)(e.length),Lb.tupleLike=(e,t)=>!(!Lb.array(t)||!Lb.array(e)||t.length!==e.length)&&t.every(((t,n)=>t(e[n]))),Lb.inRange=(e,t)=>{if(Lb.number(t))return e>=Math.min(0,t)&&e<=Math.max(t,0);if(Lb.array(t)&&2===t.length)return e>=Math.min(...t)&&e<=Math.max(...t);throw new TypeError(`Invalid range: ${JSON.stringify(t)}`)};const $b=["innerHTML","ownerDocument","style","attributes","nodeValue"];Lb.domElement=e=>Lb.object(e)&&1===e.nodeType&&Lb.string(e.nodeName)&&!Lb.plainObject(e)&&$b.every((t=>t in e)),Lb.observable=e=>!!e&&(e===e[Symbol.observable]?.()||e===e["@@observable"]?.()),Lb.nodeStream=e=>Lb.object(e)&&Lb.function_(e.pipe)&&!Lb.observable(e),Lb.infinite=e=>e===Number.POSITIVE_INFINITY||e===Number.NEGATIVE_INFINITY;const Ub=e=>t=>Lb.integer(t)&&Math.abs(t%2)===e;Lb.evenInteger=Ub(0),Lb.oddInteger=Ub(1),Lb.emptyArray=e=>Lb.array(e)&&0===e.length,Lb.nonEmptyArray=e=>Lb.array(e)&&e.length>0,Lb.emptyString=e=>Lb.string(e)&&0===e.length;Lb.emptyStringOrWhitespace=e=>Lb.emptyString(e)||(e=>Lb.string(e)&&!/\S/.test(e))(e),Lb.nonEmptyString=e=>Lb.string(e)&&e.length>0,Lb.nonEmptyStringAndNotWhitespace=e=>Lb.string(e)&&!Lb.emptyStringOrWhitespace(e),Lb.emptyObject=e=>Lb.object(e)&&!Lb.map(e)&&!Lb.set(e)&&0===Object.keys(e).length,Lb.nonEmptyObject=e=>Lb.object(e)&&!Lb.map(e)&&!Lb.set(e)&&Object.keys(e).length>0,Lb.emptySet=e=>Lb.set(e)&&0===e.size,Lb.nonEmptySet=e=>Lb.set(e)&&e.size>0,Lb.emptyMap=e=>Lb.map(e)&&0===e.size,Lb.nonEmptyMap=e=>Lb.map(e)&&e.size>0,Lb.propertyKey=e=>Lb.any([Lb.string,Lb.number,Lb.symbol],e),Lb.formData=e=>jb("FormData")(e),Lb.urlSearchParams=e=>jb("URLSearchParams")(e);const Bb=(e,t,n)=>{if(!Lb.function_(t))throw new TypeError(`Invalid predicate: ${JSON.stringify(t)}`);if(0===n.length)throw new TypeError("Invalid number of values");return e.call(n,t)};Lb.any=(e,...t)=>(Lb.array(e)?e:[e]).some((e=>Bb(Array.prototype.some,e,t))),Lb.all=(e,...t)=>Bb(Array.prototype.every,e,t);const zb=(e,t,n,r={})=>{if(!e){const{multipleValues:e}=r,i=e?`received values of types ${[...new Set(n.map((e=>`\`${Lb(e)}\``)))].join(", ")}`:`received value of type \`${Lb(n)}\``;throw new TypeError(`Expected value which is \`${t}\`, ${i}.`)}},qb={undefined:e=>zb(Lb.undefined(e),"undefined",e),string:e=>zb(Lb.string(e),"string",e),number:e=>zb(Lb.number(e),"number",e),positiveNumber:e=>zb(Lb.positiveNumber(e),"positive number",e),negativeNumber:e=>zb(Lb.negativeNumber(e),"negative number",e),bigint:e=>zb(Lb.bigint(e),"bigint",e),function_:e=>zb(Lb.function_(e),"Function",e),null_:e=>zb(Lb.null_(e),"null",e),class_:e=>zb(Lb.class_(e),"Class",e),boolean:e=>zb(Lb.boolean(e),"boolean",e),symbol:e=>zb(Lb.symbol(e),"symbol",e),numericString:e=>zb(Lb.numericString(e),"string with a number",e),array:(e,t)=>{zb(Lb.array(e),"Array",e),t&&e.forEach(t)},buffer:e=>zb(Lb.buffer(e),"Buffer",e),blob:e=>zb(Lb.blob(e),"Blob",e),nullOrUndefined:e=>zb(Lb.nullOrUndefined(e),"null or undefined",e),object:e=>zb(Lb.object(e),"Object",e),iterable:e=>zb(Lb.iterable(e),"Iterable",e),asyncIterable:e=>zb(Lb.asyncIterable(e),"AsyncIterable",e),generator:e=>zb(Lb.generator(e),"Generator",e),asyncGenerator:e=>zb(Lb.asyncGenerator(e),"AsyncGenerator",e),nativePromise:e=>zb(Lb.nativePromise(e),"native Promise",e),promise:e=>zb(Lb.promise(e),"Promise",e),generatorFunction:e=>zb(Lb.generatorFunction(e),"GeneratorFunction",e),asyncGeneratorFunction:e=>zb(Lb.asyncGeneratorFunction(e),"AsyncGeneratorFunction",e),asyncFunction:e=>zb(Lb.asyncFunction(e),"AsyncFunction",e),boundFunction:e=>zb(Lb.boundFunction(e),"Function",e),regExp:e=>zb(Lb.regExp(e),"RegExp",e),date:e=>zb(Lb.date(e),"Date",e),error:e=>zb(Lb.error(e),"Error",e),map:e=>zb(Lb.map(e),"Map",e),set:e=>zb(Lb.set(e),"Set",e),weakMap:e=>zb(Lb.weakMap(e),"WeakMap",e),weakSet:e=>zb(Lb.weakSet(e),"WeakSet",e),weakRef:e=>zb(Lb.weakRef(e),"WeakRef",e),int8Array:e=>zb(Lb.int8Array(e),"Int8Array",e),uint8Array:e=>zb(Lb.uint8Array(e),"Uint8Array",e),uint8ClampedArray:e=>zb(Lb.uint8ClampedArray(e),"Uint8ClampedArray",e),int16Array:e=>zb(Lb.int16Array(e),"Int16Array",e),uint16Array:e=>zb(Lb.uint16Array(e),"Uint16Array",e),int32Array:e=>zb(Lb.int32Array(e),"Int32Array",e),uint32Array:e=>zb(Lb.uint32Array(e),"Uint32Array",e),float32Array:e=>zb(Lb.float32Array(e),"Float32Array",e),float64Array:e=>zb(Lb.float64Array(e),"Float64Array",e),bigInt64Array:e=>zb(Lb.bigInt64Array(e),"BigInt64Array",e),bigUint64Array:e=>zb(Lb.bigUint64Array(e),"BigUint64Array",e),arrayBuffer:e=>zb(Lb.arrayBuffer(e),"ArrayBuffer",e),sharedArrayBuffer:e=>zb(Lb.sharedArrayBuffer(e),"SharedArrayBuffer",e),dataView:e=>zb(Lb.dataView(e),"DataView",e),enumCase:(e,t)=>zb(Lb.enumCase(e,t),"EnumCase",e),urlInstance:e=>zb(Lb.urlInstance(e),"URL",e),urlString:e=>zb(Lb.urlString(e),"string with a URL",e),truthy:e=>zb(Lb.truthy(e),"truthy",e),falsy:e=>zb(Lb.falsy(e),"falsy",e),nan:e=>zb(Lb.nan(e),"NaN",e),primitive:e=>zb(Lb.primitive(e),"primitive",e),integer:e=>zb(Lb.integer(e),"integer",e),safeInteger:e=>zb(Lb.safeInteger(e),"integer",e),plainObject:e=>zb(Lb.plainObject(e),"plain object",e),typedArray:e=>zb(Lb.typedArray(e),"TypedArray",e),arrayLike:e=>zb(Lb.arrayLike(e),"array-like",e),tupleLike:(e,t)=>zb(Lb.tupleLike(e,t),"tuple-like",e),domElement:e=>zb(Lb.domElement(e),"HTMLElement",e),observable:e=>zb(Lb.observable(e),"Observable",e),nodeStream:e=>zb(Lb.nodeStream(e),"Node.js Stream",e),infinite:e=>zb(Lb.infinite(e),"infinite number",e),emptyArray:e=>zb(Lb.emptyArray(e),"empty array",e),nonEmptyArray:e=>zb(Lb.nonEmptyArray(e),"non-empty array",e),emptyString:e=>zb(Lb.emptyString(e),"empty string",e),emptyStringOrWhitespace:e=>zb(Lb.emptyStringOrWhitespace(e),"empty string or whitespace",e),nonEmptyString:e=>zb(Lb.nonEmptyString(e),"non-empty string",e),nonEmptyStringAndNotWhitespace:e=>zb(Lb.nonEmptyStringAndNotWhitespace(e),"non-empty string and not whitespace",e),emptyObject:e=>zb(Lb.emptyObject(e),"empty object",e),nonEmptyObject:e=>zb(Lb.nonEmptyObject(e),"non-empty object",e),emptySet:e=>zb(Lb.emptySet(e),"empty set",e),nonEmptySet:e=>zb(Lb.nonEmptySet(e),"non-empty set",e),emptyMap:e=>zb(Lb.emptyMap(e),"empty map",e),nonEmptyMap:e=>zb(Lb.nonEmptyMap(e),"non-empty map",e),propertyKey:e=>zb(Lb.propertyKey(e),"PropertyKey",e),formData:e=>zb(Lb.formData(e),"FormData",e),urlSearchParams:e=>zb(Lb.urlSearchParams(e),"URLSearchParams",e),evenInteger:e=>zb(Lb.evenInteger(e),"even integer",e),oddInteger:e=>zb(Lb.oddInteger(e),"odd integer",e),directInstanceOf:(e,t)=>zb(Lb.directInstanceOf(e,t),"T",e),inRange:(e,t)=>zb(Lb.inRange(e,t),"in range",e),any:(e,...t)=>zb(Lb.any(e,...t),"predicate returns truthy for any value",t,{multipleValues:!0}),all:(e,...t)=>zb(Lb.all(e,...t),"predicate returns truthy for all values",t,{multipleValues:!0})};Object.defineProperties(Lb,{class:{value:Lb.class_},function:{value:Lb.function_},null:{value:Lb.null_}}),Object.defineProperties(qb,{class:{value:qb.class_},function:{value:qb.function_},null:{value:qb.null_}});let Hb=class extends Error{constructor(e){super(e||"Promise was canceled"),this.name="CancelError"}get isCanceled(){return!0}};class Fb{static fn(e){return(...t)=>new Fb(((n,r,i)=>{t.push(i),e(...t).then(n,r)}))}constructor(e){this._cancelHandlers=[],this._isPending=!0,this._isCanceled=!1,this._rejectOnCancel=!0,this._promise=new Promise(((t,n)=>{this._reject=n;const r=e=>{if(!this._isPending)throw new Error("The `onCancel` handler was attached after the promise settled.");this._cancelHandlers.push(e)};Object.defineProperties(r,{shouldReject:{get:()=>this._rejectOnCancel,set:e=>{this._rejectOnCancel=e}}}),e((e=>{this._isCanceled&&r.shouldReject||(this._isPending=!1,t(e))}),(e=>{this._isPending=!1,n(e)}),r)}))}then(e,t){return this._promise.then(e,t)}catch(e){return this._promise.catch(e)}finally(e){return this._promise.finally(e)}cancel(e){if(this._isPending&&!this._isCanceled){if(this._isCanceled=!0,this._cancelHandlers.length>0)try{for(const e of this._cancelHandlers)e()}catch(e){return void this._reject(e)}this._rejectOnCancel&&this._reject(new Hb(e))}}get isCanceled(){return this._isCanceled}}Object.setPrototypeOf(Fb.prototype,Promise.prototype);let Yb=class extends Error{constructor(e,t,n){var r;if(super(e),Object.defineProperty(this,"input",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"stack",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"response",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"request",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"timings",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Error.captureStackTrace(this,this.constructor),this.name="RequestError",this.code=t.code??"ERR_GOT_REQUEST_ERROR",this.input=t.input,r=n,Lb.object(r)&&"_onResponse"in r?(Object.defineProperty(this,"request",{enumerable:!1,value:n}),Object.defineProperty(this,"response",{enumerable:!1,value:n.response}),this.options=n.options):this.options=n,this.timings=this.request?.timings,Lb.string(t.stack)&&Lb.string(this.stack)){const e=this.stack.indexOf(this.message)+this.message.length,n=this.stack.slice(e).split("\n").reverse(),r=t.stack.slice(t.stack.indexOf(t.message)+t.message.length).split("\n").reverse();for(;r.length>0&&r[0]===n[0];)n.shift();this.stack=`${this.stack.slice(0,e)}${n.reverse().join("\n")}${r.reverse().join("\n")}`}}};class Vb extends Yb{constructor(e){super(`Redirected ${e.options.maxRedirects} times. Aborting.`,{},e),this.name="MaxRedirectsError",this.code="ERR_TOO_MANY_REDIRECTS"}}class Kb extends Yb{constructor(e){super(`Response code ${e.statusCode} (${e.statusMessage})`,{},e.request),this.name="HTTPError",this.code="ERR_NON_2XX_3XX_RESPONSE"}}let Wb=class extends Yb{constructor(e,t){super(e.message,e,t),this.name="CacheError",this.code="ERR_GOT_REQUEST_ERROR"===this.code?"ERR_CACHE_ACCESS":this.code}};class Gb extends Yb{constructor(e,t){super(e.message,e,t),this.name="UploadError",this.code="ERR_GOT_REQUEST_ERROR"===this.code?"ERR_UPLOAD":this.code}}let Jb=class extends Yb{constructor(e,t,n){super(e.message,e,n),Object.defineProperty(this,"timings",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"event",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name="TimeoutError",this.event=e.event,this.timings=t}};class Zb extends Yb{constructor(e,t){super(e.message,e,t),this.name="ReadError",this.code="ERR_GOT_REQUEST_ERROR"===this.code?"ERR_READING_RESPONSE_STREAM":this.code}}class Xb extends Yb{constructor(e){super("Retrying",{},e),this.name="RetryError",this.code="ERR_RETRYING"}}class Qb extends Yb{constructor(e){super("This operation was aborted.",{},e),this.code="ERR_ABORTED",this.name="AbortError"}}var ev,tv={exports:{}};var nv=(ev||(ev=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const n=(e,t)=>{let n;n="function"==typeof t?{connect:t}:t;const r="function"==typeof n.connect,i="function"==typeof n.secureConnect,s="function"==typeof n.close,a=()=>{r&&n.connect(),function(e){return e.encrypted}(e)&&i&&(e.authorized?n.secureConnect():e.authorizationError||e.once("secureConnect",n.secureConnect)),s&&e.once("close",n.close)};e.writable&&!e.connecting?a():e.connecting?e.once("connect",a):e.destroyed&&s&&n.close(e._hadError)};t.default=n,e.exports=n,e.exports.default=n}(tv,tv.exports)),tv.exports),rv=we(nv);const iv=(e,t)=>t.some((t=>t instanceof RegExp?t.test(e):t===e)),sv=new Set(["https:","http:","file:"]);function av(e,t){if("string"!=typeof(t={defaultProtocol:"http",normalizeProtocol:!0,forceHttp:!1,forceHttps:!1,stripAuthentication:!0,stripHash:!1,stripTextFragment:!0,stripWWW:!0,removeQueryParameters:[/^utm_\w+/i],removeTrailingSlash:!0,removeSingleSlash:!0,removeDirectoryIndex:!1,removeExplicitPort:!1,sortQueryParameters:!0,...t}).defaultProtocol||t.defaultProtocol.endsWith(":")||(t.defaultProtocol=`${t.defaultProtocol}:`),e=e.trim(),/^data:/i.test(e))return((e,{stripHash:t})=>{const n=/^data:(?<type>[^,]*?),(?<data>[^#]*?)(?:#(?<hash>.*))?$/.exec(e);if(!n)throw new Error(`Invalid URL: ${e}`);let{type:r,data:i,hash:s}=n.groups;const a=r.split(";");s=t?"":s;let o=!1;"base64"===a[a.length-1]&&(a.pop(),o=!0);const c=a.shift()?.toLowerCase()??"",u=a.map((e=>{let[t,n=""]=e.split("=").map((e=>e.trim()));return"charset"===t&&(n=n.toLowerCase(),"us-ascii"===n)?"":`${t}${n?`=${n}`:""}`})).filter(Boolean),l=[...u];return o&&l.push("base64"),(l.length>0||c&&"text/plain"!==c)&&l.unshift(c),`data:${l.join(";")},${o?i.trim():i}${s?`#${s}`:""}`})(e,t);if((e=>{try{const{protocol:t}=new URL(e);return t.endsWith(":")&&!t.includes(".")&&!sv.has(t)}catch{return!1}})(e))return e;const n=e.startsWith("//");!n&&/^\.*\//.test(e)||(e=e.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,t.defaultProtocol));const r=new URL(e);if(t.forceHttp&&t.forceHttps)throw new Error("The `forceHttp` and `forceHttps` options cannot be used together");if(t.forceHttp&&"https:"===r.protocol&&(r.protocol="http:"),t.forceHttps&&"http:"===r.protocol&&(r.protocol="https:"),t.stripAuthentication&&(r.username="",r.password=""),t.stripHash?r.hash="":t.stripTextFragment&&(r.hash=r.hash.replace(/#?:~:text.*?$/i,"")),r.pathname){const e=/\b[a-z][a-z\d+\-.]{1,50}:\/\//g;let t=0,n="";for(;;){const i=e.exec(r.pathname);if(!i)break;const s=i[0],a=i.index;n+=r.pathname.slice(t,a).replace(/\/{2,}/g,"/"),n+=s,t=a+s.length}n+=r.pathname.slice(t,r.pathname.length).replace(/\/{2,}/g,"/"),r.pathname=n}if(r.pathname)try{r.pathname=decodeURI(r.pathname)}catch{}if(!0===t.removeDirectoryIndex&&(t.removeDirectoryIndex=[/^index\.[a-z]+$/]),Array.isArray(t.removeDirectoryIndex)&&t.removeDirectoryIndex.length>0){let e=r.pathname.split("/");const n=e[e.length-1];iv(n,t.removeDirectoryIndex)&&(e=e.slice(0,-1),r.pathname=e.slice(1).join("/")+"/")}if(r.hostname&&(r.hostname=r.hostname.replace(/\.$/,""),t.stripWWW&&/^www\.(?!www\.)[a-z\-\d]{1,63}\.[a-z.\-\d]{2,63}$/.test(r.hostname)&&(r.hostname=r.hostname.replace(/^www\./,""))),Array.isArray(t.removeQueryParameters))for(const e of[...r.searchParams.keys()])iv(e,t.removeQueryParameters)&&r.searchParams.delete(e);if(Array.isArray(t.keepQueryParameters)||!0!==t.removeQueryParameters||(r.search=""),Array.isArray(t.keepQueryParameters)&&t.keepQueryParameters.length>0)for(const e of[...r.searchParams.keys()])iv(e,t.keepQueryParameters)||r.searchParams.delete(e);if(t.sortQueryParameters){r.searchParams.sort();try{r.search=decodeURIComponent(r.search)}catch{}}t.removeTrailingSlash&&(r.pathname=r.pathname.replace(/\/$/,"")),t.removeExplicitPort&&r.port&&(r.port="");const i=e;return e=r.toString(),t.removeSingleSlash||"/"!==r.pathname||i.endsWith("/")||""!==r.hash||(e=e.replace(/\/$/,"")),(t.removeTrailingSlash||"/"===r.pathname)&&""===r.hash&&t.removeSingleSlash&&(e=e.replace(/\/$/,"")),n&&!t.normalizeProtocol&&(e=e.replace(/^http:\/\//,"//")),t.stripProtocol&&(e=e.replace(/^(?:https?:)?\/\//,"")),e}var ov,cv,uv,lv={exports:{}};function dv(){if(cv)return ov;cv=1;const{PassThrough:e}=d;return ov=t=>{t={...t};const{array:n}=t;let{encoding:r}=t;const i="buffer"===r;let s=!1;n?s=!(r||i):r=r||"utf8",i&&(r=null);const a=new e({objectMode:s});r&&a.setEncoding(r);let o=0;const c=[];return a.on("data",(e=>{c.push(e),s?o=c.length:o+=e.length})),a.getBufferedValue=()=>n?c:i?Buffer.concat(c,o):c.join(""),a.getBufferedLength=()=>o,a},ov}var pv,fv,hv=function(){if(uv)return lv.exports;uv=1;const{constants:e}=p,t=d,{promisify:n}=a,r=dv(),i=n(t.pipeline);class s extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}async function o(t,n){if(!t)throw new Error("Expected a stream");n={maxBuffer:1/0,...n};const{maxBuffer:a}=n,o=r(n);return await new Promise(((n,r)=>{const c=t=>{t&&o.getBufferedLength()<=e.MAX_LENGTH&&(t.bufferedData=o.getBufferedValue()),r(t)};(async()=>{try{await i(t,o),n()}catch(e){c(e)}})(),o.on("data",(()=>{o.getBufferedLength()>a&&c(new s)}))})),o.getBufferedValue()}return lv.exports=o,lv.exports.buffer=(e,t)=>o(e,{...t,encoding:"buffer"}),lv.exports.array=(e,t)=>o(e,{...t,array:!0}),lv.exports.MaxBufferError=s,lv.exports}(),mv=we(hv);var gv=we(function(){if(fv)return pv;fv=1;const e=new Set([200,203,204,206,300,301,308,404,405,410,414,501]),t=new Set([200,203,204,300,301,302,303,307,308,404,405,410,414,501]),n=new Set([500,502,503,504]),r={date:!0,connection:!0,"keep-alive":!0,"proxy-authenticate":!0,"proxy-authorization":!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0},i={"content-length":!0,"content-encoding":!0,"transfer-encoding":!0,"content-range":!0};function s(e){const t=parseInt(e,10);return isFinite(t)?t:0}function a(e){const t={};if(!e)return t;const n=e.trim().split(/,/);for(const e of n){const[n,r]=e.split(/=/,2);t[n.trim()]=void 0===r||r.trim().replace(/^"|"$/g,"")}return t}function o(e){let t=[];for(const n in e){const r=e[n];t.push(!0===r?n:n+"="+r)}if(t.length)return t.join(", ")}return pv=class{constructor(e,t,{shared:n,cacheHeuristic:r,immutableMinTimeToLive:i,ignoreCargoCult:s,_fromObject:c}={}){if(c)this._fromObject(c);else{if(!t||!t.headers)throw Error("Response headers missing");this._assertRequestHasHeaders(e),this._responseTime=this.now(),this._isShared=!1!==n,this._cacheHeuristic=void 0!==r?r:.1,this._immutableMinTtl=void 0!==i?i:864e5,this._status="status"in t?t.status:200,this._resHeaders=t.headers,this._rescc=a(t.headers["cache-control"]),this._method="method"in e?e.method:"GET",this._url=e.url,this._host=e.headers.host,this._noAuthorization=!e.headers.authorization,this._reqHeaders=t.headers.vary?e.headers:null,this._reqcc=a(e.headers["cache-control"]),s&&"pre-check"in this._rescc&&"post-check"in this._rescc&&(delete this._rescc["pre-check"],delete this._rescc["post-check"],delete this._rescc["no-cache"],delete this._rescc["no-store"],delete this._rescc["must-revalidate"],this._resHeaders=Object.assign({},this._resHeaders,{"cache-control":o(this._rescc)}),delete this._resHeaders.expires,delete this._resHeaders.pragma),null==t.headers["cache-control"]&&/no-cache/.test(t.headers.pragma)&&(this._rescc["no-cache"]=!0)}}now(){return Date.now()}storable(){return!(this._reqcc["no-store"]||!("GET"===this._method||"HEAD"===this._method||"POST"===this._method&&this._hasExplicitExpiration())||!t.has(this._status)||this._rescc["no-store"]||this._isShared&&this._rescc.private||this._isShared&&!this._noAuthorization&&!this._allowsStoringAuthenticated()||!(this._resHeaders.expires||this._rescc["max-age"]||this._isShared&&this._rescc["s-maxage"]||this._rescc.public||e.has(this._status)))}_hasExplicitExpiration(){return this._isShared&&this._rescc["s-maxage"]||this._rescc["max-age"]||this._resHeaders.expires}_assertRequestHasHeaders(e){if(!e||!e.headers)throw Error("Request headers missing")}satisfiesWithoutRevalidation(e){this._assertRequestHasHeaders(e);const t=a(e.headers["cache-control"]);if(t["no-cache"]||/no-cache/.test(e.headers.pragma))return!1;if(t["max-age"]&&this.age()>t["max-age"])return!1;if(t["min-fresh"]&&this.timeToLive()<1e3*t["min-fresh"])return!1;if(this.stale()){if(!(t["max-stale"]&&!this._rescc["must-revalidate"]&&(!0===t["max-stale"]||t["max-stale"]>this.age()-this.maxAge())))return!1}return this._requestMatches(e,!1)}_requestMatches(e,t){return(!this._url||this._url===e.url)&&this._host===e.headers.host&&(!e.method||this._method===e.method||t&&"HEAD"===e.method)&&this._varyMatches(e)}_allowsStoringAuthenticated(){return this._rescc["must-revalidate"]||this._rescc.public||this._rescc["s-maxage"]}_varyMatches(e){if(!this._resHeaders.vary)return!0;if("*"===this._resHeaders.vary)return!1;const t=this._resHeaders.vary.trim().toLowerCase().split(/\s*,\s*/);for(const n of t)if(e.headers[n]!==this._reqHeaders[n])return!1;return!0}_copyWithoutHopByHopHeaders(e){const t={};for(const n in e)r[n]||(t[n]=e[n]);if(e.connection){const n=e.connection.trim().split(/\s*,\s*/);for(const e of n)delete t[e]}if(t.warning){const e=t.warning.split(/,/).filter((e=>!/^\s*1[0-9][0-9]/.test(e)));e.length?t.warning=e.join(",").trim():delete t.warning}return t}responseHeaders(){const e=this._copyWithoutHopByHopHeaders(this._resHeaders),t=this.age();return t>86400&&!this._hasExplicitExpiration()&&this.maxAge()>86400&&(e.warning=(e.warning?`${e.warning}, `:"")+'113 - "rfc7234 5.5.4"'),e.age=`${Math.round(t)}`,e.date=new Date(this.now()).toUTCString(),e}date(){const e=Date.parse(this._resHeaders.date);return isFinite(e)?e:this._responseTime}age(){return this._ageValue()+(this.now()-this._responseTime)/1e3}_ageValue(){return s(this._resHeaders.age)}maxAge(){if(!this.storable()||this._rescc["no-cache"])return 0;if(this._isShared&&this._resHeaders["set-cookie"]&&!this._rescc.public&&!this._rescc.immutable)return 0;if("*"===this._resHeaders.vary)return 0;if(this._isShared){if(this._rescc["proxy-revalidate"])return 0;if(this._rescc["s-maxage"])return s(this._rescc["s-maxage"])}if(this._rescc["max-age"])return s(this._rescc["max-age"]);const e=this._rescc.immutable?this._immutableMinTtl:0,t=this.date();if(this._resHeaders.expires){const n=Date.parse(this._resHeaders.expires);return Number.isNaN(n)||n<t?0:Math.max(e,(n-t)/1e3)}if(this._resHeaders["last-modified"]){const n=Date.parse(this._resHeaders["last-modified"]);if(isFinite(n)&&t>n)return Math.max(e,(t-n)/1e3*this._cacheHeuristic)}return e}timeToLive(){const e=this.maxAge()-this.age(),t=e+s(this._rescc["stale-if-error"]),n=e+s(this._rescc["stale-while-revalidate"]);return 1e3*Math.max(0,e,t,n)}stale(){return this.maxAge()<=this.age()}_useStaleIfError(){return this.maxAge()+s(this._rescc["stale-if-error"])>this.age()}useStaleWhileRevalidate(){return this.maxAge()+s(this._rescc["stale-while-revalidate"])>this.age()}static fromObject(e){return new this(void 0,void 0,{_fromObject:e})}_fromObject(e){if(this._responseTime)throw Error("Reinitialized");if(!e||1!==e.v)throw Error("Invalid serialization");this._responseTime=e.t,this._isShared=e.sh,this._cacheHeuristic=e.ch,this._immutableMinTtl=void 0!==e.imm?e.imm:864e5,this._status=e.st,this._resHeaders=e.resh,this._rescc=e.rescc,this._method=e.m,this._url=e.u,this._host=e.h,this._noAuthorization=e.a,this._reqHeaders=e.reqh,this._reqcc=e.reqcc}toObject(){return{v:1,t:this._responseTime,sh:this._isShared,ch:this._cacheHeuristic,imm:this._immutableMinTtl,st:this._status,resh:this._resHeaders,rescc:this._rescc,m:this._method,u:this._url,h:this._host,a:this._noAuthorization,reqh:this._reqHeaders,reqcc:this._reqcc}}revalidationHeaders(e){this._assertRequestHasHeaders(e);const t=this._copyWithoutHopByHopHeaders(e.headers);if(delete t["if-range"],!this._requestMatches(e,!0)||!this.storable())return delete t["if-none-match"],delete t["if-modified-since"],t;this._resHeaders.etag&&(t["if-none-match"]=t["if-none-match"]?`${t["if-none-match"]}, ${this._resHeaders.etag}`:this._resHeaders.etag);if(t["accept-ranges"]||t["if-match"]||t["if-unmodified-since"]||this._method&&"GET"!=this._method){if(delete t["if-modified-since"],t["if-none-match"]){const e=t["if-none-match"].split(/,/).filter((e=>!/^\s*W\//.test(e)));e.length?t["if-none-match"]=e.join(",").trim():delete t["if-none-match"]}}else this._resHeaders["last-modified"]&&!t["if-modified-since"]&&(t["if-modified-since"]=this._resHeaders["last-modified"]);return t}revalidatedPolicy(e,t){if(this._assertRequestHasHeaders(e),this._useStaleIfError()&&function(e){return!e||n.has(e.status)}(t))return{modified:!1,matches:!1,policy:this};if(!t||!t.headers)throw Error("Response headers missing");let r=!1;if(void 0!==t.status&&304!=t.status?r=!1:t.headers.etag&&!/^\s*W\//.test(t.headers.etag)?r=this._resHeaders.etag&&this._resHeaders.etag.replace(/^\s*W\//,"")===t.headers.etag:this._resHeaders.etag&&t.headers.etag?r=this._resHeaders.etag.replace(/^\s*W\//,"")===t.headers.etag.replace(/^\s*W\//,""):this._resHeaders["last-modified"]?r=this._resHeaders["last-modified"]===t.headers["last-modified"]:this._resHeaders.etag||this._resHeaders["last-modified"]||t.headers.etag||t.headers["last-modified"]||(r=!0),!r)return{policy:new this.constructor(e,t),modified:304!=t.status,matches:!1};const s={};for(const e in this._resHeaders)s[e]=e in t.headers&&!i[e]?t.headers[e]:this._resHeaders[e];const a=Object.assign({},t,{status:this._status,method:this._method,headers:s});return{policy:new this.constructor(e,a,{shared:this._isShared,cacheHeuristic:this._cacheHeuristic,immutableMinTimeToLive:this._immutableMinTtl}),modified:!1,matches:!0}}}}());function yv(e){return Object.fromEntries(Object.entries(e).map((([e,t])=>[e.toLowerCase(),t])))}class bv extends F{statusCode;headers;body;url;constructor({statusCode:e,headers:t,body:n,url:r}){if("number"!=typeof e)throw new TypeError("Argument `statusCode` should be a number");if("object"!=typeof t)throw new TypeError("Argument `headers` should be an object");if(!(n instanceof Uint8Array))throw new TypeError("Argument `body` should be a buffer");if("string"!=typeof r)throw new TypeError("Argument `url` should be a string");super({read(){this.push(n),this.push(null)}}),this.statusCode=e,this.headers=yv(t),this.body=n,this.url=r}}var vv,wv,xv,_v={};var Ev=function(){if(xv)return wv;xv=1;const e=f,t=(vv||(vv=1,_v.stringify=function e(t){if(void 0===t)return t;if(t&&Buffer.isBuffer(t))return JSON.stringify(":base64:"+t.toString("base64"));if(t&&t.toJSON&&(t=t.toJSON()),t&&"object"==typeof t){var n="",r=Array.isArray(t);n=r?"[":"{";var i=!0;for(var s in t){var a="function"==typeof t[s]||!r&&void 0===t[s];Object.hasOwnProperty.call(t,s)&&!a&&(i||(n+=","),i=!1,r?null==t[s]?n+="null":n+=e(t[s]):void 0!==t[s]&&(n+=e(s)+":"+e(t[s])))}return n+(r?"]":"}")}return"string"==typeof t?JSON.stringify(/^:/.test(t)?":"+t:t):void 0===t?"null":JSON.stringify(t)},_v.parse=function(e){return JSON.parse(e,(function(e,t){return"string"==typeof t?/^:base64:/.test(t)?Buffer.from(t.substring(8),"base64"):/^:/.test(t)?t.substring(1):t:t}))}),_v),n=["sqlite","postgres","mysql","mongo","redis","tiered"];return wv=class extends e{constructor(e,{emitErrors:n=!0,...r}={}){if(super(),this.opts={namespace:"keyv",serialize:t.stringify,deserialize:t.parse,..."string"==typeof e?{uri:e}:e,...r},!this.opts.store){const e={...this.opts};this.opts.store=(e=>{const t={redis:"@keyv/redis",rediss:"@keyv/redis",mongodb:"@keyv/mongo",mongo:"@keyv/mongo",sqlite:"@keyv/sqlite",postgresql:"@keyv/postgres",postgres:"@keyv/postgres",mysql:"@keyv/mysql",etcd:"@keyv/etcd",offline:"@keyv/offline",tiered:"@keyv/tiered"};if(e.adapter||e.uri)return new(Xa(t[e.adapter||/^[^:+]*/.exec(e.uri)[0]]))(e);return new Map})(e)}if(this.opts.compression){const e=this.opts.compression;this.opts.serialize=e.serialize.bind(e),this.opts.deserialize=e.deserialize.bind(e)}"function"==typeof this.opts.store.on&&n&&this.opts.store.on("error",(e=>this.emit("error",e))),this.opts.store.namespace=this.opts.namespace;const i=e=>async function*(){for await(const[t,n]of"function"==typeof e?e(this.opts.store.namespace):e){const e=await this.opts.deserialize(n);this.opts.store.namespace&&!t.includes(this.opts.store.namespace)||("number"==typeof e.expires&&Date.now()>e.expires?this.delete(t):yield[this._getKeyUnprefix(t),e.value])}};"function"==typeof this.opts.store[Symbol.iterator]&&this.opts.store instanceof Map?this.iterator=i(this.opts.store):"function"==typeof this.opts.store.iterator&&this.opts.store.opts&&this._checkIterableAdaptar()&&(this.iterator=i(this.opts.store.iterator.bind(this.opts.store)))}_checkIterableAdaptar(){return n.includes(this.opts.store.opts.dialect)||n.findIndex((e=>this.opts.store.opts.url.includes(e)))>=0}_getKeyPrefix(e){return`${this.opts.namespace}:${e}`}_getKeyPrefixArray(e){return e.map((e=>`${this.opts.namespace}:${e}`))}_getKeyUnprefix(e){return e.split(":").splice(1).join(":")}get(e,t){const{store:n}=this.opts,r=Array.isArray(e),i=r?this._getKeyPrefixArray(e):this._getKeyPrefix(e);if(r&&void 0===n.getMany){const e=[];for(const r of i)e.push(Promise.resolve().then((()=>n.get(r))).then((e=>"string"==typeof e||this.opts.compression?this.opts.deserialize(e):e)).then((e=>{if(null!=e)return"number"==typeof e.expires&&Date.now()>e.expires?this.delete(r).then((()=>{})):t&&t.raw?e:e.value})));return Promise.allSettled(e).then((e=>{const t=[];for(const n of e)t.push(n.value);return t}))}return Promise.resolve().then((()=>r?n.getMany(i):n.get(i))).then((e=>"string"==typeof e||this.opts.compression?this.opts.deserialize(e):e)).then((n=>{if(null!=n)return r?n.map(((n,r)=>{if("string"==typeof n&&(n=this.opts.deserialize(n)),null!=n){if(!("number"==typeof n.expires&&Date.now()>n.expires))return t&&t.raw?n:n.value;this.delete(e[r]).then((()=>{}))}})):"number"==typeof n.expires&&Date.now()>n.expires?this.delete(e).then((()=>{})):t&&t.raw?n:n.value}))}set(e,t,n){const r=this._getKeyPrefix(e);void 0===n&&(n=this.opts.ttl),0===n&&(n=void 0);const{store:i}=this.opts;return Promise.resolve().then((()=>{const e="number"==typeof n?Date.now()+n:null;return"symbol"==typeof t&&this.emit("error","symbol cannot be serialized"),t={value:t,expires:e},this.opts.serialize(t)})).then((e=>i.set(r,e,n))).then((()=>!0))}delete(e){const{store:t}=this.opts;if(Array.isArray(e)){const n=this._getKeyPrefixArray(e);if(void 0===t.deleteMany){const e=[];for(const r of n)e.push(t.delete(r));return Promise.allSettled(e).then((e=>e.every((e=>!0===e.value))))}return Promise.resolve().then((()=>t.deleteMany(n)))}const n=this._getKeyPrefix(e);return Promise.resolve().then((()=>t.delete(n)))}clear(){const{store:e}=this.opts;return Promise.resolve().then((()=>e.clear()))}has(e){const t=this._getKeyPrefix(e),{store:n}=this.opts;return Promise.resolve().then((async()=>{if("function"==typeof n.has)return n.has(t);return void 0!==await n.get(t)}))}disconnect(){const{store:e}=this.opts;if("function"==typeof e.disconnect)return e.disconnect()}},wv}(),Sv=we(Ev);const kv=["aborted","complete","headers","httpVersion","httpVersionMinor","httpVersionMajor","method","rawHeaders","rawTrailers","setTimeout","socket","statusCode","statusMessage","trailers","url"];class Av extends Error{constructor(e){super(e.message),Object.assign(this,e)}}class Tv extends Error{constructor(e){super(e.message),Object.assign(this,e)}}class Mv{constructor(e,t){this.hooks=new Map,this.request=()=>(e,t)=>{let n;if("string"==typeof e)n=Nv(G.parse(e)),e={};else if(e instanceof G.URL)n=Nv(G.parse(e.toString())),e={};else{const[t,...r]=(e.path??"").split("?"),i=r.length>0?`?${r.join("?")}`:"";n=Nv({...e,pathname:t,search:i})}(e={headers:{},method:"GET",cache:!0,strictTtl:!1,automaticFailover:!1,...e,...Iv(n)}).headers=Object.fromEntries(Rv(e.headers).map((([e,t])=>[e.toLowerCase(),t])));const r=new U,i=av(G.format(n),{stripWWW:!1,removeTrailingSlash:!1,stripAuthentication:!1});let s=`${e.method}:${i}`;e.body&&void 0!==e.method&&["POST","PATCH","PUT"].includes(e.method)&&(e.body instanceof H.Readable?e.cache=!1:s+=`:${J.createHash("md5").update(e.body).digest("hex")}`);let a=!1,o=!1;const c=e=>{o=!0;let n=!1,i=()=>{};const c=new Promise((e=>{i=()=>{n||(n=!0,e())}})),u=async n=>{if(a){n.status=n.statusCode;const t=gv.fromObject(a.cachePolicy).revalidatedPolicy(e,n);if(!t.modified){n.resume(),await new Promise((e=>{n.once("end",e)}));const e=Pv(t.policy.responseHeaders());(n=new bv({statusCode:a.statusCode,headers:e,body:a.body,url:a.url})).cachePolicy=t.policy,n.fromCache=!0}}let i;n.fromCache||(n.cachePolicy=new gv(e,n,e),n.fromCache=!1),e.cache&&n.cachePolicy.storable()?(i=Ov(n),(async()=>{try{const t=mv.buffer(n);await Promise.race([c,new Promise((e=>n.once("end",e))),new Promise((e=>n.once("close",e)))]);const r=await t;let i={url:n.url,statusCode:n.fromCache?a.statusCode:n.statusCode,body:r,cachePolicy:n.cachePolicy.toObject()},o=e.strictTtl?n.cachePolicy.timeToLive():void 0;if(e.maxTtl&&(o=o?Math.min(o,e.maxTtl):e.maxTtl),this.hooks.size>0)for(const e of this.hooks.keys())i=await this.runHook(e,i,n);await this.cache.set(s,i,o)}catch(e){r.emit("error",new Tv(e))}})()):e.cache&&a&&(async()=>{try{await this.cache.delete(s)}catch(e){r.emit("error",new Tv(e))}})(),r.emit("response",i??n),"function"==typeof t&&t(i??n)};try{const t=this.cacheRequest(e,u);t.once("error",i),t.once("abort",i),t.once("destroy",i),r.emit("request",t)}catch(e){r.emit("error",new Av(e))}};return(async()=>{const n=async e=>{await Promise.resolve();const n=e.cache?await this.cache.get(s):void 0;if(void 0===n&&!e.forceRefresh)return void c(e);const i=gv.fromObject(n.cachePolicy);if(i.satisfiesWithoutRevalidation(e)&&!e.forceRefresh){const e=Pv(i.responseHeaders()),s=new bv({statusCode:n.statusCode,headers:e,body:n.body,url:n.url});s.cachePolicy=i,s.fromCache=!0,r.emit("response",s),"function"==typeof t&&t(s)}else i.satisfiesWithoutRevalidation(e)&&Date.now()>=i.timeToLive()&&e.forceRefresh?(await this.cache.delete(s),e.headers=i.revalidationHeaders(e),c(e)):(a=n,e.headers=i.revalidationHeaders(e),c(e))},i=e=>r.emit("error",new Tv(e));if(this.cache instanceof Sv){const e=this.cache;e.once("error",i),r.on("error",(()=>e.removeListener("error",i))),r.on("response",(()=>e.removeListener("error",i)))}try{await n(e)}catch(t){e.automaticFailover&&!o&&c(e),r.emit("error",new Tv(t))}})(),r},this.addHook=(e,t)=>{this.hooks.has(e)||this.hooks.set(e,t)},this.removeHook=e=>this.hooks.delete(e),this.getHook=e=>this.hooks.get(e),this.runHook=async(e,...t)=>this.hooks.get(e)?.(...t),this.cache=t instanceof Sv?t:new Sv("string"==typeof t?{uri:t,namespace:"cacheable-request"}:{store:t,namespace:"cacheable-request"}),this.request=this.request.bind(this),this.cacheRequest=e}}const Rv=Object.entries,Ov=e=>{const t=new Y({autoDestroy:!1});return function(e,t){if(t._readableState.autoDestroy)throw new Error("The second stream must have the `autoDestroy` option set to `false`");const n=new Set([...Object.keys(e),...kv]),r={};for(const i of n)i in t||(r[i]={get(){const t=e[i];return"function"==typeof t?t.bind(e):t},set(t){e[i]=t},enumerable:!0,configurable:!1});Object.defineProperties(t,r),e.once("aborted",(()=>{t.destroy(),t.emit("aborted")})),e.once("close",(()=>{e.complete&&t.readable?t.once("end",(()=>{t.emit("close")})):t.emit("close")}))}(e,t),e.pipe(t)},Iv=e=>{const t={...e};return t.path=`${e.pathname||"/"}${e.search||""}`,delete t.pathname,delete t.search,t},Nv=e=>({protocol:e.protocol,auth:e.auth,hostname:e.hostname||e.host||"localhost",port:e.port,pathname:e.pathname,search:e.search}),Pv=e=>{const t=[];for(const n of Object.keys(e))t[n.toLowerCase()]=e[n];return t};var Cv,jv,Lv,Dv;function $v(){if(jv)return Cv;jv=1;const e=["aborted","complete","headers","httpVersion","httpVersionMinor","httpVersionMajor","method","rawHeaders","rawTrailers","setTimeout","socket","statusCode","statusMessage","trailers","url"];return Cv=(t,n)=>{if(n._readableState.autoDestroy)throw new Error("The second stream must have the `autoDestroy` option set to `false`");const r=new Set(Object.keys(t).concat(e)),i={};for(const e of r)e in n||(i[e]={get(){const n=t[e];return"function"==typeof n?n.bind(t):n},set(n){t[e]=n},enumerable:!0,configurable:!1});return Object.defineProperties(n,i),t.once("aborted",(()=>{n.destroy(),n.emit("aborted")})),t.once("close",(()=>{t.complete&&n.readable?n.once("end",(()=>{n.emit("close")})):n.emit("close")})),n}}var Uv=function(){if(Dv)return Lv;Dv=1;const{Transform:e,PassThrough:t}=d,n=m,r=$v();return Lv=i=>{const s=(i.headers["content-encoding"]||"").toLowerCase();if(!["gzip","deflate","br"].includes(s))return i;const a="br"===s;if(a&&"function"!=typeof n.createBrotliDecompress)return i.destroy(new Error("Brotli is not supported on Node.js < 12")),i;let o=!0;const c=new e({transform(e,t,n){o=!1,n(null,e)},flush(e){e()}}),u=new t({autoDestroy:!1,destroy(e,t){i.destroy(),t(e)}}),l=a?n.createBrotliDecompress():n.createUnzip();return l.once("error",(e=>{!o||i.readable?u.destroy(e):u.end()})),r(i,u),i.pipe(c).pipe(l).pipe(u),u}}(),Bv=we(Uv);const zv=e=>"function"==typeof e;const qv=e=>{if(zv(e[Symbol.asyncIterator]))return e;if(zv(e.getReader))return async function*(e){const t=e.getReader();for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}(e);throw new TypeError("Unsupported data source: Expected either ReadableStream or async iterable.")},Hv="abcdefghijklmnopqrstuvwxyz0123456789";const Fv=e=>String(e).replace(/\r|\n/g,((e,t,n)=>"\r"===e&&"\n"!==n[t+1]||"\n"===e&&"\r"!==n[t-1]?"\r\n":e));function Yv(e){if("object"!==(e=>Object.prototype.toString.call(e).slice(8,-1).toLowerCase())(e))return!1;const t=Object.getPrototypeOf(e);if(null==t)return!0;return(t.constructor&&t.constructor.toString())===Object.toString()}function Vv(e,t){if("string"==typeof t)for(const[n,r]of Object.entries(e))if(t.toLowerCase()===n.toLowerCase())return r}const Kv=e=>Boolean(e&&zv(e.constructor)&&"FormData"===e[Symbol.toStringTag]&&zv(e.append)&&zv(e.getAll)&&zv(e.entries)&&zv(e[Symbol.iterator])),Wv=e=>String(e).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22"),Gv=e=>Boolean(e&&"object"==typeof e&&zv(e.constructor)&&"File"===e[Symbol.toStringTag]&&zv(e.stream)&&null!=e.name);var Jv,Zv,Xv,Qv,ew,tw,nw,rw,iw,sw,aw,ow=function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n},cw=function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};const uw={enableAdditionalHeaders:!1},lw={writable:!1,configurable:!1};class dw{constructor(e,t,n){if(Jv.add(this),Zv.set(this,"\r\n"),Xv.set(this,void 0),Qv.set(this,void 0),ew.set(this,"-".repeat(2)),tw.set(this,new TextEncoder),nw.set(this,void 0),rw.set(this,void 0),iw.set(this,void 0),!Kv(e))throw new TypeError("Expected first argument to be a FormData instance.");let r;if(Yv(t)?n=t:r=t,r||(r=function(){let e=16,t="";for(;e--;)t+=Hv[36*Math.random()|0];return t}()),"string"!=typeof r)throw new TypeError("Expected boundary argument to be a string.");if(n&&!Yv(n))throw new TypeError("Expected options argument to be an object.");ow(this,rw,Array.from(e.entries()),"f"),ow(this,iw,{...uw,...n},"f"),ow(this,Xv,cw(this,tw,"f").encode(cw(this,Zv,"f")),"f"),ow(this,Qv,cw(this,Xv,"f").byteLength,"f"),this.boundary=`form-data-boundary-${r}`,this.contentType=`multipart/form-data; boundary=${this.boundary}`,ow(this,nw,cw(this,tw,"f").encode(`${cw(this,ew,"f")}${this.boundary}${cw(this,ew,"f")}${cw(this,Zv,"f").repeat(2)}`),"f");const i={"Content-Type":this.contentType},s=cw(this,Jv,"m",aw).call(this);s&&(this.contentLength=s,i["Content-Length"]=s),this.headers=(e=>new Proxy(e,{get:(e,t)=>Vv(e,t),has:(e,t)=>void 0!==Vv(e,t)}))(Object.freeze(i)),Object.defineProperties(this,{boundary:lw,contentType:lw,contentLength:lw,headers:lw})}getContentLength(){return null==this.contentLength?void 0:Number(this.contentLength)}*values(){for(const[e,t]of cw(this,rw,"f")){const n=Gv(t)?t:cw(this,tw,"f").encode(Fv(t));yield cw(this,Jv,"m",sw).call(this,e,n),yield n,yield cw(this,Xv,"f")}yield cw(this,nw,"f")}async*encode(){for(const e of this.values())Gv(e)?yield*qv(e.stream()):yield e}[(Zv=new WeakMap,Xv=new WeakMap,Qv=new WeakMap,ew=new WeakMap,tw=new WeakMap,nw=new WeakMap,rw=new WeakMap,iw=new WeakMap,Jv=new WeakSet,sw=function(e,t){let n="";n+=`${cw(this,ew,"f")}${this.boundary}${cw(this,Zv,"f")}`,n+=`Content-Disposition: form-data; name="${Wv(e)}"`,Gv(t)&&(n+=`; filename="${Wv(t.name)}"${cw(this,Zv,"f")}`,n+=`Content-Type: ${t.type||"application/octet-stream"}`);const r=Gv(t)?t.size:t.byteLength;return!0!==cw(this,iw,"f").enableAdditionalHeaders||null==r||isNaN(r)||(n+=`${cw(this,Zv,"f")}Content-Length: ${Gv(t)?t.size:t.byteLength}`),cw(this,tw,"f").encode(`${n}${cw(this,Zv,"f").repeat(2)}`)},aw=function(){let e=0;for(const[t,n]of cw(this,rw,"f")){const r=Gv(n)?n:cw(this,tw,"f").encode(Fv(n)),i=Gv(r)?r.size:r.byteLength;if(null==i||isNaN(i))return;e+=cw(this,Jv,"m",sw).call(this,t,r).byteLength,e+=i,e+=cw(this,Qv,"f")}return String(e+cw(this,nw,"f").byteLength)},Symbol.iterator)](){return this.values()}[Symbol.asyncIterator](){return this.encode()}}function pw(e){return Lb.nodeStream(e)&&Lb.function_(e.getBoundary)}function fw(e,t,n){const r={};for(const i of n){const n=(...e)=>{t.emit(i,...e)};r[i]=n,e.on(i,n)}return()=>{for(const[t,n]of Object.entries(r))e.off(t,n)}}const hw=Symbol("reentry"),mw=()=>{};class gw extends Error{constructor(e,t){super(`Timeout awaiting '${t}' for ${e}ms`),Object.defineProperty(this,"event",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name="TimeoutError",this.code="ETIMEDOUT"}}const yw=({attemptCount:e,retryOptions:t,error:n,retryAfter:r,computedValue:i})=>{if("RetryError"===n.name)return 1;if(e>t.limit)return 0;const s=t.methods.includes(n.options.method),a=t.errorCodes.includes(n.code),o=n.response&&t.statusCodes.includes(n.response.statusCode);if(!s||!a&&!o)return 0;if(n.response){if(r)return r>i?0:r;if(413===n.response.statusCode)return 0}const c=Math.random()*t.noise;return Math.min(2**(e-1)*1e3,t.backoffLimit)+c},{Resolver:bw}=te,vw=Symbol("cacheableLookupCreateConnection"),ww=Symbol("cacheableLookupInstance"),xw=Symbol("expires"),_w="number"==typeof ie,Ew=e=>{if(!e||"function"!=typeof e.createConnection)throw new Error("Expected an Agent instance as the first argument")},Sw=()=>{let e=!1,t=!1;for(const n of Object.values(ae.networkInterfaces()))for(const r of n)if(!r.internal&&("IPv6"===r.family?t=!0:e=!0,e&&t))return{has4:e,has6:t};return{has4:e,has6:t}},kw=e=>e.catch((e=>{if("ENODATA"===e.code||"ENOTFOUND"===e.code||"ENOENT"===e.code)return[];throw e})),Aw={ttl:!0},Tw={all:!0},Mw={all:!0,family:4},Rw={all:!0,family:6};class Ow{constructor({cache:e=new Map,maxTtl:t=1/0,fallbackDuration:n=3600,errorTtl:r=.15,resolver:i=new bw,lookup:s=ne}={}){if(this.maxTtl=t,this.errorTtl=r,this._cache=e,this._resolver=i,this._dnsLookup=s&&j(s),this.stats={cache:0,query:0},this._resolver instanceof bw?(this._resolve4=this._resolver.resolve4.bind(this._resolver),this._resolve6=this._resolver.resolve6.bind(this._resolver)):(this._resolve4=j(this._resolver.resolve4.bind(this._resolver)),this._resolve6=j(this._resolver.resolve6.bind(this._resolver))),this._iface=Sw(),this._pending={},this._nextRemovalTime=!1,this._hostnamesToFallback=new Set,this.fallbackDuration=n,n>0){const e=setInterval((()=>{this._hostnamesToFallback.clear()}),1e3*n);e.unref&&e.unref(),this._fallbackInterval=e}this.lookup=this.lookup.bind(this),this.lookupAsync=this.lookupAsync.bind(this)}set servers(e){this.clear(),this._resolver.setServers(e)}get servers(){return this._resolver.getServers()}lookup(e,t,n){if("function"==typeof t?(n=t,t={}):"number"==typeof t&&(t={family:t}),!n)throw new Error("Callback must be a function.");this.lookupAsync(e,t).then((e=>{t.all?n(null,e):n(null,e.address,e.family,e.expires,e.ttl,e.source)}),n)}async lookupAsync(e,t={}){"number"==typeof t&&(t={family:t});let n=await this.query(e);if(6===t.family){const e=n.filter((e=>6===e.family));t.hints&re&&(_w&&t.hints&ie||0===e.length)?(e=>{for(const t of e)6!==t.family&&(t.address=`::ffff:${t.address}`,t.family=6)})(n):n=e}else 4===t.family&&(n=n.filter((e=>4===e.family)));if(t.hints&se){const{_iface:e}=this;n=n.filter((t=>6===t.family?e.has6:e.has4))}if(0===n.length){const t=new Error(`cacheableLookup ENOTFOUND ${e}`);throw t.code="ENOTFOUND",t.hostname=e,t}return t.all?n:n[0]}async query(e){let t="cache",n=await this._cache.get(e);if(n&&this.stats.cache++,!n){const r=this._pending[e];if(r)this.stats.cache++,n=await r;else{t="query";const r=this.queryAndCache(e);this._pending[e]=r,this.stats.query++;try{n=await r}finally{delete this._pending[e]}}}return n=n.map((e=>({...e,source:t}))),n}async _resolve(e){const[t,n]=await Promise.all([kw(this._resolve4(e,Aw)),kw(this._resolve6(e,Aw))]);let r=0,i=0,s=0;const a=Date.now();for(const e of t)e.family=4,e.expires=a+1e3*e.ttl,r=Math.max(r,e.ttl);for(const e of n)e.family=6,e.expires=a+1e3*e.ttl,i=Math.max(i,e.ttl);return s=t.length>0?n.length>0?Math.min(r,i):r:i,{entries:[...t,...n],cacheTtl:s}}async _lookup(e){try{const[t,n]=await Promise.all([kw(this._dnsLookup(e,Mw)),kw(this._dnsLookup(e,Rw))]);return{entries:[...t,...n],cacheTtl:0}}catch{return{entries:[],cacheTtl:0}}}async _set(e,t,n){if(this.maxTtl>0&&n>0){n=1e3*Math.min(n,this.maxTtl),t[xw]=Date.now()+n;try{await this._cache.set(e,t,n)}catch(e){this.lookupAsync=async()=>{const t=new Error("Cache Error. Please recreate the CacheableLookup instance.");throw t.cause=e,t}}r=this._cache,Symbol.iterator in r&&this._tick(n)}var r}async queryAndCache(e){if(this._hostnamesToFallback.has(e))return this._dnsLookup(e,Tw);let t=await this._resolve(e);0===t.entries.length&&this._dnsLookup&&(t=await this._lookup(e),0!==t.entries.length&&this.fallbackDuration>0&&this._hostnamesToFallback.add(e));const n=0===t.entries.length?this.errorTtl:t.cacheTtl;return await this._set(e,t.entries,n),t.entries}_tick(e){const t=this._nextRemovalTime;(!t||e<t)&&(clearTimeout(this._removalTimeout),this._nextRemovalTime=e,this._removalTimeout=setTimeout((()=>{this._nextRemovalTime=!1;let e=1/0;const t=Date.now();for(const[n,r]of this._cache){const i=r[xw];t>=i?this._cache.delete(n):i<e&&(e=i)}e!==1/0&&this._tick(e-t)}),e),this._removalTimeout.unref&&this._removalTimeout.unref())}install(e){if(Ew(e),vw in e)throw new Error("CacheableLookup has been already installed");e[vw]=e.createConnection,e[ww]=this,e.createConnection=(t,n)=>("lookup"in t||(t.lookup=this.lookup),e[vw](t,n))}uninstall(e){if(Ew(e),e[vw]){if(e[ww]!==this)throw new Error("The agent is not owned by this CacheableLookup instance");e.createConnection=e[vw],delete e[vw],delete e[ww]}}updateInterfaceInfo(){const{_iface:e}=this;this._iface=Sw(),(e.has4&&!this._iface.has4||e.has6&&!this._iface.has6)&&this._cache.clear()}clear(e){e?this._cache.delete(e):this._cache.clear()}}var Iw,Nw,Pw,Cw,jw,Lw,Dw,$w,Uw,Bw;function zw(){if(Nw)return Iw;Nw=1;class e{constructor(e={}){if(!(e.maxSize&&e.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");this.maxSize=e.maxSize,this.onEviction=e.onEviction,this.cache=new Map,this.oldCache=new Map,this._size=0}_set(e,t){if(this.cache.set(e,t),this._size++,this._size>=this.maxSize){if(this._size=0,"function"==typeof this.onEviction)for(const[e,t]of this.oldCache.entries())this.onEviction(e,t);this.oldCache=this.cache,this.cache=new Map}}get(e){if(this.cache.has(e))return this.cache.get(e);if(this.oldCache.has(e)){const t=this.oldCache.get(e);return this.oldCache.delete(e),this._set(e,t),t}}set(e,t){return this.cache.has(e)?this.cache.set(e,t):this._set(e,t),this}has(e){return this.cache.has(e)||this.oldCache.has(e)}peek(e){return this.cache.has(e)?this.cache.get(e):this.oldCache.has(e)?this.oldCache.get(e):void 0}delete(e){const t=this.cache.delete(e);return t&&this._size--,this.oldCache.delete(e)||t}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}*keys(){for(const[e]of this)yield e}*values(){for(const[,e]of this)yield e}*[Symbol.iterator](){for(const e of this.cache)yield e;for(const e of this.oldCache){const[t]=e;this.cache.has(t)||(yield e)}}get size(){let e=0;for(const t of this.oldCache.keys())this.cache.has(t)||e++;return Math.min(this._size+e,this.maxSize)}}return Iw=e}function qw(){return Cw||(Cw=1,Pw=e=>{if(0!==e.listenerCount("error"))return e;e.__destroy=e._destroy,e._destroy=(...t)=>{const n=t.pop();e.__destroy(...t,(async e=>{await Promise.resolve(),n(e)}))};const t=t=>{Promise.resolve().then((()=>{e.emit("error",t)}))};return e.once("error",t),Promise.resolve().then((()=>{e.off("error",t)})),e}),Pw}function Hw(){if(Lw)return jw;Lw=1;const{URL:e}=P,t=f,n=ce,r=oe,i=zw(),s=qw(),a=Symbol("currentStreamCount"),o=Symbol("request"),c=Symbol("cachedOriginSet"),u=Symbol("gracefullyClosing"),l=Symbol("length"),d=["createConnection","maxDeflateDynamicTableSize","maxSettings","maxSessionMemory","maxHeaderListPairs","maxOutstandingPings","maxReservedRemoteStreams","maxSendHeaderBlockLength","paddingStrategy","peerMaxConcurrentStreams","settings","family","localAddress","rejectUnauthorized","pskCallback","minDHSize","path","socket","ca","cert","sigalgs","ciphers","clientCertEngine","crl","dhparam","ecdhCurve","honorCipherOrder","key","privateKeyEngine","privateKeyIdentifier","maxVersion","minVersion","pfx","secureOptions","secureProtocol","sessionIdContext","ticketKeys"],p=(e,t)=>e.remoteSettings.maxConcurrentStreams>t.remoteSettings.maxConcurrentStreams,h=(e,t)=>{for(let n=0;n<e.length;n++){const r=e[n];r[c].length>0&&r[c].length<t[c].length&&r[c].every((e=>t[c].includes(e)))&&r[a]+t[a]<=t.remoteSettings.maxConcurrentStreams&&g(r)}},m=(e,t)=>{for(let n=0;n<e.length;n++){const r=e[n];if(t[c].length>0&&t[c].length<r[c].length&&t[c].every((e=>r[c].includes(e)))&&t[a]+r[a]<=r.remoteSettings.maxConcurrentStreams)return g(t),!0}return!1},g=e=>{e[u]=!0,0===e[a]&&e.close()};class y extends t{constructor({timeout:e=0,maxSessions:t=Number.POSITIVE_INFINITY,maxEmptySessions:n=10,maxCachedTlsSessions:r=100}={}){super(),this.sessions={},this.queue={},this.timeout=e,this.maxSessions=t,this.maxEmptySessions=n,this._emptySessionCount=0,this._sessionCount=0,this.settings={enablePush:!1,initialWindowSize:33554432},this.tlsSessionCache=new i({maxSize:r})}get protocol(){return"https:"}normalizeOptions(e){let t="";for(let n=0;n<d.length;n++){const r=d[n];t+=":",e&&void 0!==e[r]&&(t+=e[r])}return t}_processQueue(){if(this._sessionCount>=this.maxSessions)this.closeEmptySessions(this.maxSessions-this._sessionCount+1);else for(const e in this.queue)for(const t in this.queue[e]){const n=this.queue[e][t];n.completed||(n.completed=!0,n())}}_isBetterSession(e,t){return e>t}_accept(e,t,n,r){let i=0;for(;i<t.length&&e[a]<e.remoteSettings.maxConcurrentStreams;)t[i].resolve(e),i++;t.splice(0,i),t.length>0&&(this.getSession(n,r,t),t.length=0)}getSession(t,n,i){return new Promise(((s,d)=>{Array.isArray(i)&&i.length>0?(i=[...i],s()):i=[{resolve:s,reject:d}];try{if("string"==typeof t)t=new e(t);else if(!(t instanceof e))throw new TypeError("The `origin` argument needs to be a string or an URL object");if(n){const{servername:e}=n,{hostname:r}=t;if(e&&r!==e)throw new Error(`Origin ${r} differs from servername ${e}`)}}catch(e){for(let t=0;t<i.length;t++)i[t].reject(e);return}const f=this.normalizeOptions(n),g=t.origin;if(f in this.sessions){const e=this.sessions[f];let t,r=-1,s=-1;for(let n=0;n<e.length;n++){const i=e[n],o=i.remoteSettings.maxConcurrentStreams;if(o<r)break;if(!i[c].includes(g))continue;const l=i[a];l>=o||i[u]||i.destroyed||(t||(r=o),this._isBetterSession(l,s)&&(t=i,s=l))}if(t)return void this._accept(t,i,g,n)}if(f in this.queue){if(g in this.queue[f])return void this.queue[f][g].listeners.push(...i)}else this.queue[f]={[l]:0};const y=()=>{f in this.queue&&this.queue[f][g]===b&&(delete this.queue[f][g],0==--this.queue[f][l]&&delete this.queue[f])},b=async()=>{this._sessionCount++;const e=`${g}:${f}`;let s,d=!1;try{const v={...n};void 0===v.settings&&(v.settings=this.settings),void 0===v.session&&(v.session=this.tlsSessionCache.get(e));const w=v.createConnection||this.createConnection;s=await w.call(this,t,v),v.createConnection=()=>s;const x=r.connect(t,v);x[a]=0,x[u]=!1;const _=()=>{const{socket:e}=x;let t;return!1===e.servername?(e.servername=e.remoteAddress,t=x.originSet,e.servername=!1):t=x.originSet,t},E=()=>x[a]<x.remoteSettings.maxConcurrentStreams;x.socket.once("session",(t=>{this.tlsSessionCache.set(e,t)})),x.once("error",(t=>{for(let e=0;e<i.length;e++)i[e].reject(t);this.tlsSessionCache.delete(e)})),x.setTimeout(this.timeout,(()=>{x.destroy()})),x.once("close",(()=>{if(this._sessionCount--,d){this._emptySessionCount--;const e=this.sessions[f];1===e.length?delete this.sessions[f]:e.splice(e.indexOf(x),1)}else{y();const e=new Error("Session closed without receiving a SETTINGS frame");e.code="HTTP2WRAPPER_NOSETTINGS";for(let t=0;t<i.length;t++)i[t].reject(e)}this._processQueue()}));const S=()=>{const e=this.queue[f];if(!e)return;const t=x[c];for(let n=0;n<t.length;n++){const r=t[n];if(r in e){const{listeners:t,completed:n}=e[r];let i=0;for(;i<t.length&&E();)t[i].resolve(x),i++;if(e[r].listeners.splice(0,i),0===e[r].listeners.length&&!n&&(delete e[r],0==--e[l])){delete this.queue[f];break}if(!E())break}}};x.on("origin",(()=>{x[c]=_()||[],x[u]=!1,m(this.sessions[f],x),!x[u]&&E()&&(S(),E()&&h(this.sessions[f],x))})),x.once("remoteSettings",(()=>{if(b.destroyed){const e=new Error("Agent has been destroyed");for(let t=0;t<i.length;t++)i[t].reject(e);x.destroy()}else{if(x.setLocalWindowSize&&x.setLocalWindowSize(4194304),x[c]=_()||[],x.socket.encrypted){const e=x[c][0];if(e!==g){const t=new Error(`Requested origin ${g} does not match server ${e}`);for(let e=0;e<i.length;e++)i[e].reject(t);return void x.destroy()}}y();{const e=this.sessions;if(f in e){const t=e[f];t.splice(((e,t,n)=>{let r=0,i=e.length;for(;r<i;){const s=r+i>>>1;n(e[s],t)?r=s+1:i=s}return r})(t,x,p),0,x)}else e[f]=[x]}d=!0,this._emptySessionCount++,this.emit("session",x),this._accept(x,i,g,n),0===x[a]&&this._emptySessionCount>this.maxEmptySessions&&this.closeEmptySessions(this._emptySessionCount-this.maxEmptySessions),x.on("remoteSettings",(()=>{E()&&(S(),E()&&h(this.sessions[f],x))}))}})),x[o]=x.request,x.request=(e,t)=>{if(x[u])throw new Error("The session is gracefully closing. No new streams are allowed.");const n=x[o](e,t);return x.ref(),0==x[a]++&&this._emptySessionCount--,n.once("close",(()=>{0==--x[a]&&(this._emptySessionCount++,x.unref(),this._emptySessionCount>this.maxEmptySessions||x[u])?x.close():x.destroyed||x.closed||E()&&!m(this.sessions[f],x)&&(h(this.sessions[f],x),S(),0===x[a]&&this._processQueue())})),n}}catch(e){y(),this._sessionCount--;for(let t=0;t<i.length;t++)i[t].reject(e)}};b.listeners=i,b.completed=!1,b.destroyed=!1,this.queue[f][g]=b,this.queue[f][l]++,this._processQueue()}))}request(e,t,n,r){return new Promise(((i,a)=>{this.getSession(e,t,[{reject:a,resolve:e=>{try{const t=e.request(n,r);s(t),i(t)}catch(e){a(e)}}}])}))}async createConnection(e,t){return y.connect(e,t)}static connect(e,t){t.ALPNProtocols=["h2"];const r=e.port||443,i=e.hostname;void 0===t.servername&&(t.servername=i);const s=n.connect(r,i,t);return t.socket&&(s._peername={family:void 0,address:void 0,port:r}),s}closeEmptySessions(e=Number.POSITIVE_INFINITY){let t=0;const{sessions:n}=this;for(const r in n){const i=n[r];for(let n=0;n<i.length;n++){const r=i[n];if(0===r[a]&&(t++,r.close(),t>=e))return t}}return t}destroy(e){const{sessions:t,queue:n}=this;for(const n in t){const r=t[n];for(let t=0;t<r.length;t++)r[t].destroy(e)}for(const e in n){const t=n[e];for(const e in t)t[e].destroyed=!0}this.queue={},this.tlsSessionCache.clear()}get emptySessionCount(){return this._emptySessionCount}get pendingSessionCount(){return this._sessionCount-this._emptySessionCount}get sessionCount(){return this._sessionCount}}return y.kCurrentStreamCount=a,y.kGracefullyClosing=u,jw={Agent:y,globalAgent:new y}}function Fw(){if($w)return Dw;$w=1;const{Readable:e}=d;return Dw=class extends e{constructor(e,t){super({emitClose:!1,autoDestroy:!0,highWaterMark:t}),this.statusCode=null,this.statusMessage="",this.httpVersion="2.0",this.httpVersionMajor=2,this.httpVersionMinor=0,this.headers={},this.trailers={},this.req=null,this.aborted=!1,this.complete=!1,this.upgrade=null,this.rawHeaders=[],this.rawTrailers=[],this.socket=e,this._dumped=!1}get connection(){return this.socket}set connection(e){this.socket=e}_destroy(e,t){this.readableEnded||(this.aborted=!0),t(),this.req._request.destroy(e)}setTimeout(e,t){return this.req.setTimeout(e,t),this}_dump(){this._dumped||(this._dumped=!0,this.removeAllListeners("data"),this.resume())}_read(){this.req&&this.req._request.resume()}},Dw}function Yw(){return Bw?Uw:(Bw=1,Uw=(e,t,n)=>{for(const r of n)e.on(r,((...e)=>t.emit(r,...e)))})}var Vw,Kw,Ww,Gw,Jw,Zw,Xw,Qw,ex,tx,nx,rx={exports:{}};function ix(){return Vw||(Vw=1,function(e){const t=(t,n,r)=>{e.exports[n]=class extends t{constructor(...e){super("string"==typeof r?r:r(e)),this.name=`${super.name} [${n}]`,this.code=n}}};t(TypeError,"ERR_INVALID_ARG_TYPE",(e=>{const t=e[0].includes(".")?"property":"argument";let n=e[1];const r=Array.isArray(n);return r&&(n=`${n.slice(0,-1).join(", ")} or ${n.slice(-1)}`),`The "${e[0]}" ${t} must be ${r?"one of":"of"} type ${n}. Received ${typeof e[2]}`})),t(TypeError,"ERR_INVALID_PROTOCOL",(e=>`Protocol "${e[0]}" not supported. Expected "${e[1]}"`)),t(Error,"ERR_HTTP_HEADERS_SENT",(e=>`Cannot ${e[0]} headers after they are sent to the client`)),t(TypeError,"ERR_INVALID_HTTP_TOKEN",(e=>`${e[0]} must be a valid HTTP token [${e[1]}]`)),t(TypeError,"ERR_HTTP_INVALID_HEADER_VALUE",(e=>`Invalid value "${e[0]} for header "${e[1]}"`)),t(TypeError,"ERR_INVALID_CHAR",(e=>`Invalid character in ${e[0]} [${e[1]}]`)),t(Error,"ERR_HTTP2_NO_SOCKET_MANIPULATION","HTTP/2 sockets should not be directly manipulated (e.g. read and written)")}(rx)),rx.exports}function sx(){return Ww?Kw:(Ww=1,Kw=e=>{switch(e){case":method":case":scheme":case":authority":case":path":return!0;default:return!1}})}function ax(){if(Jw)return Gw;Jw=1;const{ERR_INVALID_HTTP_TOKEN:e}=ix(),t=sx(),n=/^[\^`\-\w!#$%&*+.|~]+$/;return Gw=r=>{if("string"!=typeof r||!n.test(r)&&!t(r))throw new e("Header name",r)}}function ox(){if(Xw)return Zw;Xw=1;const{ERR_HTTP_INVALID_HEADER_VALUE:e,ERR_INVALID_CHAR:t}=ix(),n=/[^\t\u0020-\u007E\u0080-\u00FF]/;return Zw=(r,i)=>{if(void 0===i)throw new e(i,r);if(n.test(i))throw new t("header content",r)}}function cx(){if(nx)return tx;nx=1;const{URL:e,urlToHttpOptions:t}=P,n=oe,{Writable:r}=d,{Agent:i,globalAgent:s}=Hw(),a=Fw(),o=Yw(),{ERR_INVALID_ARG_TYPE:c,ERR_INVALID_PROTOCOL:u,ERR_HTTP_HEADERS_SENT:l}=ix(),p=ax(),f=ox(),h=function(){if(ex)return Qw;ex=1;const{ERR_HTTP2_NO_SOCKET_MANIPULATION:e}=ix(),t={has(e,t){const n=void 0===e.session?e:e.session.socket;return t in e||t in n},get(t,n){switch(n){case"on":case"once":case"end":case"emit":case"destroy":return t[n].bind(t);case"writable":case"destroyed":return t[n];case"readable":return!t.destroyed&&t.readable;case"setTimeout":{const{session:e}=t;return void 0!==e?e.setTimeout.bind(e):t.setTimeout.bind(t)}case"write":case"read":case"pause":case"resume":throw new e;default:{const e=void 0===t.session?t:t.session.socket,r=e[n];return"function"==typeof r?r.bind(e):r}}},getPrototypeOf:e=>void 0!==e.session?Reflect.getPrototypeOf(e.session.socket):Reflect.getPrototypeOf(e),set(t,n,r){switch(n){case"writable":case"readable":case"destroyed":case"on":case"once":case"end":case"emit":case"destroy":return t[n]=r,!0;case"setTimeout":{const{session:e}=t;return void 0===e?t.setTimeout=r:e.setTimeout=r,!0}case"write":case"read":case"pause":case"resume":throw new e;default:return(void 0===t.session?t:t.session.socket)[n]=r,!0}}};return Qw=t}(),{HTTP2_HEADER_STATUS:m,HTTP2_HEADER_METHOD:g,HTTP2_HEADER_PATH:y,HTTP2_HEADER_AUTHORITY:b,HTTP2_METHOD_CONNECT:v}=n.constants,w=Symbol("headers"),x=Symbol("origin"),_=Symbol("session"),E=Symbol("options"),S=Symbol("flushedHeaders"),k=Symbol("jobs"),A=Symbol("pendingAgentPromise");return tx=class extends r{constructor(n,r,a){if(super({autoDestroy:!1,emitClose:!1}),n="string"==typeof n?t(new e(n)):n instanceof e?t(n):{...n},"function"==typeof r||void 0===r?(a=r,r=n):r=Object.assign(n,r),r.h2session){if(this[_]=r.h2session,this[_].destroyed)throw new Error("The session has been closed already");this.protocol=this[_].socket.encrypted?"https:":"http:"}else if(!1===r.agent)this.agent=new i({maxEmptySessions:0});else if(void 0===r.agent||null===r.agent)this.agent=s;else{if("function"!=typeof r.agent.request)throw new c("options.agent",["http2wrapper.Agent-like Object","undefined","false"],r.agent);this.agent=r.agent}if(this.agent&&(this.protocol=this.agent.protocol),r.protocol&&r.protocol!==this.protocol)throw new u(r.protocol,this.protocol);r.port||(r.port=r.defaultPort||this.agent&&this.agent.defaultPort||443),r.host=r.hostname||r.host||"localhost",delete r.hostname;const{timeout:o}=r;r.timeout=void 0,this[w]=Object.create(null),this[k]=[],this[A]=void 0,this.socket=null,this.connection=null,this.method=r.method||"GET",("CONNECT"!==this.method||"/"!==r.path&&void 0!==r.path)&&(this.path=r.path),this.res=null,this.aborted=!1,this.reusedSocket=!1;const{headers:l}=r;if(l)for(const e in l)this.setHeader(e,l[e]);r.auth&&!("authorization"in this[w])&&(this[w].authorization="Basic "+Buffer.from(r.auth).toString("base64")),r.session=r.tlsSession,r.path=r.socketPath,this[E]=r,this[x]=new e(`${this.protocol}//${r.servername||r.host}:${r.port}`);const d=r._reuseSocket;d&&(r.createConnection=(...e)=>d.destroyed?this.agent.createConnection(...e):d,this.agent.getSession(this[x],this[E]).catch((()=>{}))),o&&this.setTimeout(o),a&&this.once("response",a),this[S]=!1}get method(){return this[w][g]}set method(e){e&&(this[w][g]=e.toUpperCase())}get path(){const e="CONNECT"===this.method?b:y;return this[w][e]}set path(e){if(e){const t="CONNECT"===this.method?b:y;this[w][t]=e}}get host(){return this[x].hostname}set host(e){}get _mustNotHaveABody(){return"GET"===this.method||"HEAD"===this.method||"DELETE"===this.method}_write(e,t,n){if(this._mustNotHaveABody)return void n(new Error("The GET, HEAD and DELETE methods must NOT have a body"));this.flushHeaders();const r=()=>this._request.write(e,t,n);this._request?r():this[k].push(r)}_final(e){this.flushHeaders();const t=()=>{this._mustNotHaveABody||"CONNECT"===this.method?e():this._request.end(e)};this._request?t():this[k].push(t)}abort(){this.res&&this.res.complete||(this.aborted||process.nextTick((()=>this.emit("abort"))),this.aborted=!0,this.destroy())}async _destroy(e,t){this.res&&this.res._dump(),this._request?this._request.destroy():process.nextTick((()=>{this.emit("close")}));try{await this[A]}catch(t){this.aborted&&(e=t)}t(e)}async flushHeaders(){if(this[S]||this.destroyed)return;this[S]=!0;const e=this.method===v,t=t=>{if(this._request=t,this.destroyed)return void t.destroy();e||o(t,this,["timeout","continue"]),t.once("error",(e=>{this.destroy(e)})),t.once("aborted",(()=>{const{res:e}=this;e?(e.aborted=!0,e.emit("aborted"),e.destroy()):this.destroy(new Error("The server aborted the HTTP/2 stream"))}));const n=(n,r,i)=>{const s=new a(this.socket,t.readableHighWaterMark);this.res=s,s.url=`${this[x].origin}${this.path}`,s.req=this,s.statusCode=n[m],s.headers=n,s.rawHeaders=i,s.once("end",(()=>{s.complete=!0,s.socket=null,s.connection=null})),e?(s.upgrade=!0,this.emit("connect",s,t,Buffer.alloc(0))?this.emit("close"):t.destroy()):(t.on("data",(e=>{s._dumped||s.push(e)||t.pause()})),t.once("end",(()=>{this.aborted||s.push(null)})),this.emit("response",s)||s._dump())};t.once("response",n),t.once("headers",(e=>this.emit("information",{statusCode:e[m]}))),t.once("trailers",((e,t,r)=>{const{res:i}=this;null!==i?(i.trailers=e,i.rawTrailers=r):n(e,0,r)})),t.once("close",(()=>{const{aborted:e,res:t}=this;if(t){e&&(t.aborted=!0,t.emit("aborted"),t.destroy());const n=()=>{t.emit("close"),this.destroy(),this.emit("close")};t.readable?t.once("end",n):n()}else{if(!this.destroyed)return this.destroy(new Error("The HTTP/2 stream has been early terminated")),void this.emit("close");this.destroy(),this.emit("close")}})),this.socket=new Proxy(t,h);for(const e of this[k])e();this[k].length=0,this.emit("socket",this.socket)};if(b in this[w]||e||(this[w][b]=this[x].host),this[_])try{t(this[_].request(this[w]))}catch(e){this.destroy(e)}else{this.reusedSocket=!0;try{const e=this.agent.request(this[x],this[E],this[w]);this[A]=e,t(await e),this[A]=!1}catch(e){this[A]=!1,this.destroy(e)}}}get connection(){return this.socket}set connection(e){this.socket=e}getHeaderNames(){return Object.keys(this[w])}hasHeader(e){if("string"!=typeof e)throw new c("name","string",e);return Boolean(this[w][e.toLowerCase()])}getHeader(e){if("string"!=typeof e)throw new c("name","string",e);return this[w][e.toLowerCase()]}get headersSent(){return this[S]}removeHeader(e){if("string"!=typeof e)throw new c("name","string",e);if(this.headersSent)throw new l("remove");delete this[w][e.toLowerCase()]}setHeader(e,t){if(this.headersSent)throw new l("set");p(e),f(e,t);const n=e.toLowerCase();if("connection"===n){if("keep-alive"===t.toLowerCase())return;throw new Error(`Invalid 'connection' header: ${t}`)}"host"===n&&"CONNECT"===this.method?this[w][b]=t:this[w][n]=t}setNoDelay(){}setSocketKeepAlive(){}setTimeout(e,t){const n=()=>this._request.setTimeout(e,t);return this._request?n():this[k].push(n),this}get maxHeadersCount(){if(!this.destroyed&&this._request)return this._request.session.localSettings.maxHeaderListSize}set maxHeadersCount(e){}},tx}var ux,lx,dx,px,fx,hx,mx,gx,yx,bx,vx,wx,xx,_x,Ex,Sx,kx,Ax,Tx,Mx,Rx,Ox,Ix,Nx,Px,Cx={exports:{}};function jx(){if(px)return dx;px=1;const{isIP:e}=ue,t=T;return dx=n=>{const r=(e=>{if("["===e[0]){const n=e.indexOf("]");return t(-1!==n),e.slice(1,n)}const n=e.indexOf(":");return-1===n?e:e.slice(0,n)})(n);return e(r)?"":r}}function Lx(){if(fx)return Cx.exports;fx=1;const{URL:e,urlToHttpOptions:t}=P,n=b,r=w,i=function(){if(lx)return ux;lx=1;const e=ce;return ux=(t={},n=e.connect)=>new Promise(((e,r)=>{let i,s=!1;const a=async()=>{await c,i.off("timeout",o),i.off("error",r),t.resolveSocket?(e({alpnProtocol:i.alpnProtocol,socket:i,timeout:s}),s&&(await Promise.resolve(),i.emit("timeout"))):(i.destroy(),e({alpnProtocol:i.alpnProtocol,timeout:s}))},o=async()=>{s=!0,a()},c=(async()=>{try{i=await n(t,a),i.on("error",r),i.once("timeout",o)}catch(e){r(e)}})()})),ux}(),s=zw(),{Agent:a,globalAgent:o}=Hw(),c=cx(),u=jx(),l=qw(),d=new s({maxSize:100}),p=new Map,f=(e,t=new Map,n=void 0)=>async r=>{const s=`${r.host}:${r.port}:${r.ALPNProtocols.sort()}`;if(!e.has(s)){if(t.has(s)){return{alpnProtocol:(await t.get(s)).alpnProtocol}}const{path:a}=r;r.path=r.socketPath;const o=i(r,n);t.set(s,o);try{const n=await o;return e.set(s,n.alpnProtocol),t.delete(s),r.path=a,n}catch(e){throw t.delete(s),r.path=a,e}}return{alpnProtocol:e.get(s)}},h=f(d,p);return Cx.exports=async(i,s,d)=>{if(i="string"==typeof i?t(new e(i)):i instanceof e?t(i):{...i},"function"==typeof s||void 0===s?(d=s,s=i):s=Object.assign(i,s),s.ALPNProtocols=s.ALPNProtocols||["h2","http/1.1"],!Array.isArray(s.ALPNProtocols)||0===s.ALPNProtocols.length)throw new Error("The `ALPNProtocols` option must be an Array with at least one entry");s.protocol=s.protocol||"https:";const p="https:"===s.protocol;s.host=s.hostname||s.host||"localhost",s.session=s.tlsSession,s.servername=s.servername||u(s.headers&&s.headers.host||s.host),s.port=s.port||(p?443:80),s._defaultAgent=p?r.globalAgent:n.globalAgent;const f=s.resolveProtocol||h;let{agent:m}=s;if(void 0!==m&&!1!==m&&"Object"!==m.constructor.name)throw new Error("The `options.agent` can be only an object `http`, `https` or `http2` properties");if(p){s.resolveSocket=!0;let{socket:e,alpnProtocol:t,timeout:n}=await f(s);if(n){e&&e.destroy();const t=new Error(`Timed out resolving ALPN: ${s.timeout} ms`);throw t.code="ETIMEDOUT",t.ms=s.timeout,t}e&&s.createConnection&&(e.destroy(),e=void 0),delete s.resolveSocket;const i="h2"===t;if(m&&(m=i?m.http2:m.https,s.agent=m),void 0===m&&(m=i?o:r.globalAgent),e)if(!1===m)e.destroy();else{const t=(i?a:r.Agent).prototype.createConnection;m.createConnection===t?i?s._reuseSocket=e:((e,t,n)=>{t._httpMessage={shouldKeepAlive:!0};const r=()=>{e.emit("free",t,n)};t.on("free",r);const i=()=>{e.removeSocket(t,n)};t.on("close",i);const s=()=>{const{freeSockets:n}=e;for(const e of Object.values(n))if(e.includes(t))return void t.destroy()};t.on("timeout",s);const a=()=>{e.removeSocket(t,n),t.off("close",i),t.off("free",r),t.off("timeout",s),t.off("agentRemove",a)};t.on("agentRemove",a),e.emit("free",t,n)})(m,e,s):e.destroy()}if(i)return l(new c(s,d))}else m&&(s.agent=m.http);return s.headers&&(s.headers={...s.headers},s.headers[":authority"]&&(s.headers.host||(s.headers.host=s.headers[":authority"]),delete s.headers[":authority"]),delete s.headers[":method"],delete s.headers[":scheme"],delete s.headers[":path"]),l(n.request(s,d))},Cx.exports.protocolCache=d,Cx.exports.resolveProtocol=h,Cx.exports.createResolveProtocol=f,Cx.exports}function Dx(){if(mx)return hx;mx=1;const e=d,t=new ce.TLSSocket(new e.PassThrough)._handle._parentWrap.constructor;return hx=t}function $x(){if(yx)return gx;yx=1;class e extends Error{constructor(e,t=""){super(`The proxy server rejected the request with status code ${e} (${t||"empty status message"})`),this.statusCode=e,this.statusMessage=t}}return gx=e}function Ux(){if(xx)return wx;xx=1;const{URL:e}=P,t=(vx||(vx=1,bx=(e,t,n)=>{const r=n.some((e=>"string"==typeof e?typeof t===e:t instanceof e));if(!r){const r=n.map((e=>"string"==typeof e?e:e.name));throw new TypeError(`Expected '${e}' to be a type of ${r.join(" or ")}, got ${typeof t}`)}}),bx);return wx=(n,r)=>{t("proxyOptions",r,["object"]),t("proxyOptions.headers",r.headers,["object","undefined"]),t("proxyOptions.raw",r.raw,["boolean","undefined"]),t("proxyOptions.url",r.url,[e,"string"]);const i=new e(r.url);n.proxyOptions={raw:!0,...r,headers:{...r.headers},url:i}}}function Bx(){return Ex?_x:(Ex=1,_x=e=>{const{username:t,password:n}=e.proxyOptions.url;if(t||n){const e=`${t}:${n}`,r=`Basic ${Buffer.from(e).toString("base64")}`;return{"proxy-authorization":r,authorization:r}}return{}})}function zx(){if(Tx)return Ax;Tx=1;const{Agent:e}=Hw(),t=Dx(),n=$x(),r=Ux();return Ax=class extends e{constructor(e){super(e),r(this,e.proxyOptions)}async createConnection(e,r){const i=`${e.hostname}:${e.port||443}`,[s,a,o]=await this._getProxyStream(i);if(200!==a)throw new n(a,o);if(!this.proxyOptions.raw){const e=new t(s);return e.encrypted=!1,e._handle.getpeername=e=>{e.family=void 0,e.address=void 0,e.port=void 0},e}return r.socket=s,super.createConnection(e,r)}},Ax}function qx(){if(Rx)return Mx;Rx=1;const{globalAgent:e}=Hw(),t=zx(),n=Bx();return Mx=class extends t{async _getProxyStream(t){const{proxyOptions:r}=this,i={...n(this),...r.headers,":method":"CONNECT",":authority":t},s=await e.request(r.url,r,i),a=await(e=>new Promise(((t,n)=>{e.once("error",n),e.once("response",(r=>{e.off("error",n),t(r[":status"])}))})))(s);return[s,a,""]}},Mx}function Hx(){if(Ix)return Ox;Ix=1;const e=b,t=w,n=zx(),r=Bx();class i extends n{async _getProxyStream(n){const{proxyOptions:i}=this,{url:s,headers:a}=this.proxyOptions;return(e=>new Promise(((t,n)=>{e.once("error",n),e.once("connect",((r,i,s)=>{i.unshift(s),e.off("error",n),t([i,r.statusCode,r.statusMessage])}))})))(("https:"===s.protocol?t:e).request({...i,hostname:s.hostname,port:s.port,path:n,headers:{...r(this),...a,host:n},method:"CONNECT"}).end())}}return Ox={Http2OverHttp:i,Http2OverHttps:i}}var Fx=function(){if(Px)return Nx;Px=1;const e=oe,{Agent:t,globalAgent:n}=Hw(),r=cx(),i=Fw(),s=Lx(),{HttpOverHttp2:a,HttpsOverHttp2:o}=function(){if(kx)return Sx;kx=1;const e=ce,t=b,n=w,r=Dx(),{globalAgent:i}=Hw(),s=$x(),a=Ux(),o=Bx(),c=(t,a,c)=>{(async()=>{try{const{proxyOptions:u}=t,{url:l,headers:d,raw:p}=u,f=await i.request(l,u,{...o(t),...d,":method":"CONNECT",":authority":`${a.host}:${a.port}`});f.once("error",c),f.once("response",(i=>{const o=i[":status"];if(200!==o)return void c(new s(o,""));const u=t instanceof n.Agent;if(p&&u){a.socket=f;const t=e.connect(a);return t.once("close",(()=>{f.destroy()})),void c(null,t)}const l=new r(f);l.encrypted=!1,l._handle.getpeername=e=>{e.family=void 0,e.address=void 0,e.port=void 0},c(null,l)}))}catch(e){c(e)}})()};class u extends t.Agent{constructor(e){super(e),a(this,e.proxyOptions)}createConnection(e,t){c(this,e,t)}}class l extends n.Agent{constructor(e){super(e),a(this,e.proxyOptions)}createConnection(e,t){c(this,e,t)}}return Sx={HttpOverHttp2:u,HttpsOverHttp2:l}}(),c=qx(),{Http2OverHttp:u,Http2OverHttps:l}=Hx(),d=ax(),p=ox();return Nx={...e,ClientRequest:r,IncomingMessage:i,Agent:t,globalAgent:n,request:(e,t,n)=>new r(e,t,n),get:(e,t,n)=>{const i=new r(e,t,n);return i.end(),i},auto:s,proxies:{HttpOverHttp2:a,HttpsOverHttp2:o,Http2OverHttp2:c,Http2OverHttp:u,Http2OverHttps:l},validateHeaderName:d,validateHeaderValue:p},Nx}(),Yx=we(Fx);const[Vx,Kx]=z.versions.node.split(".").map(Number);const Wx=new Map;let Gx;const Jx={request:void 0,agent:{http:void 0,https:void 0,http2:void 0},h2session:void 0,decompress:!0,timeout:{connect:void 0,lookup:void 0,read:void 0,request:void 0,response:void 0,secureConnect:void 0,send:void 0,socket:void 0},prefixUrl:"",body:void 0,form:void 0,json:void 0,cookieJar:void 0,ignoreInvalidCookies:!1,searchParams:void 0,dnsLookup:void 0,dnsCache:void 0,context:{},hooks:{init:[],beforeRequest:[],beforeError:[],beforeRedirect:[],beforeRetry:[],afterResponse:[]},followRedirect:!0,maxRedirects:10,cache:void 0,throwHttpErrors:!0,username:"",password:"",http2:!1,allowGetBody:!1,headers:{"user-agent":"got (https://github.com/sindresorhus/got)"},methodRewriting:!1,dnsLookupIpVersion:void 0,parseJson:JSON.parse,stringifyJson:JSON.stringify,retry:{limit:2,methods:["GET","PUT","HEAD","DELETE","OPTIONS","TRACE"],statusCodes:[408,413,429,500,502,503,504,521,522,524],errorCodes:["ETIMEDOUT","ECONNRESET","EADDRINUSE","ECONNREFUSED","EPIPE","ENOTFOUND","ENETUNREACH","EAI_AGAIN"],maxRetryAfter:void 0,calculateDelay:({computedValue:e})=>e,backoffLimit:Number.POSITIVE_INFINITY,noise:100},localAddress:void 0,method:"GET",createConnection:void 0,cacheOptions:{shared:void 0,cacheHeuristic:void 0,immutableMinTimeToLive:void 0,ignoreCargoCult:void 0},https:{alpnProtocols:void 0,rejectUnauthorized:void 0,checkServerIdentity:void 0,certificateAuthority:void 0,key:void 0,certificate:void 0,passphrase:void 0,pfx:void 0,ciphers:void 0,honorCipherOrder:void 0,minVersion:void 0,maxVersion:void 0,signatureAlgorithms:void 0,tlsSessionLifetime:void 0,dhparam:void 0,ecdhCurve:void 0,certificateRevocationLists:void 0},encoding:void 0,resolveBodyOnly:!1,isStream:!1,responseType:"text",url:void 0,pagination:{transform:e=>"json"===e.request.options.responseType?e.body:JSON.parse(e.body),paginate({response:e}){const t=e.headers.link;if("string"!=typeof t||""===t.trim())return!1;const n=function(e){const t=[],n=e.split(",");for(const r of n){const[n,...i]=r.split(";"),s=n.trim();if("<"!==s[0]||">"!==s[s.length-1])throw new Error(`Invalid format of the Link header reference: ${s}`);const a=s.slice(1,-1),o={};if(0===i.length)throw new Error(`Unexpected end of Link header parameters: ${i.join(";")}`);for(const t of i){const n=t.trim(),r=n.indexOf("=");if(-1===r)throw new Error(`Failed to parse Link header: ${e}`);const i=n.slice(0,r).trim(),s=n.slice(r+1).trim();o[i]=s}t.push({reference:a,parameters:o})}return t}(t).find((e=>"next"===e.parameters.rel||'"next"'===e.parameters.rel));return!!n&&{url:new URL(n.reference,e.url)}},filter:()=>!0,shouldContinue:()=>!0,countLimit:Number.POSITIVE_INFINITY,backoff:0,requestLimit:1e4,stackAllItems:!1},setHost:!0,maxHeaderSize:void 0,signal:void 0,enableUnixSockets:!1},Zx=e=>{const t=[e.timeout.socket,e.timeout.connect,e.timeout.lookup,e.timeout.request,e.timeout.secureConnect].filter((e=>"number"==typeof e));if(t.length>0)return Math.min(...t)},Xx=(e,t,n)=>{const r=e.hooks?.init;if(r)for(const e of r)e(t,n)};class Qx{constructor(e,t,n){if(Object.defineProperty(this,"_unixOptions",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_internals",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_merging",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_init",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),qb.any([Lb.string,Lb.urlInstance,Lb.object,Lb.undefined],e),qb.any([Lb.object,Lb.undefined],t),qb.any([Lb.object,Lb.undefined],n),e instanceof Qx||t instanceof Qx)throw new TypeError("The defaults must be passed as the third argument");this._internals=(e=>{const{hooks:t,retry:n}=e,r={...e,context:{...e.context},cacheOptions:{...e.cacheOptions},https:{...e.https},agent:{...e.agent},headers:{...e.headers},retry:{...n,errorCodes:[...n.errorCodes],methods:[...n.methods],statusCodes:[...n.statusCodes]},timeout:{...e.timeout},hooks:{init:[...t.init],beforeRequest:[...t.beforeRequest],beforeError:[...t.beforeError],beforeRedirect:[...t.beforeRedirect],beforeRetry:[...t.beforeRetry],afterResponse:[...t.afterResponse]},searchParams:e.searchParams?new URLSearchParams(e.searchParams):void 0,pagination:{...e.pagination}};return void 0!==r.url&&(r.prefixUrl=""),r})(n?._internals??n??Jx),this._init=[...n?._init??[]],this._merging=!1,this._unixOptions=void 0;try{if(Lb.plainObject(e))try{this.merge(e),this.merge(t)}finally{this.url=e.url}else try{this.merge(t)}finally{if(void 0!==t?.url){if(void 0!==e)throw new TypeError("The `url` option is mutually exclusive with the `input` argument");this.url=t.url}else void 0!==e&&(this.url=e)}}catch(e){throw e.options=this,e}}merge(e){if(e)if(e instanceof Qx)for(const t of e._init)this.merge(t);else{e=(e=>{const{hooks:t,retry:n}=e,r={...e};return Lb.object(e.context)&&(r.context={...e.context}),Lb.object(e.cacheOptions)&&(r.cacheOptions={...e.cacheOptions}),Lb.object(e.https)&&(r.https={...e.https}),Lb.object(e.cacheOptions)&&(r.cacheOptions={...r.cacheOptions}),Lb.object(e.agent)&&(r.agent={...e.agent}),Lb.object(e.headers)&&(r.headers={...e.headers}),Lb.object(n)&&(r.retry={...n},Lb.array(n.errorCodes)&&(r.retry.errorCodes=[...n.errorCodes]),Lb.array(n.methods)&&(r.retry.methods=[...n.methods]),Lb.array(n.statusCodes)&&(r.retry.statusCodes=[...n.statusCodes])),Lb.object(e.timeout)&&(r.timeout={...e.timeout}),Lb.object(t)&&(r.hooks={...t},Lb.array(t.init)&&(r.hooks.init=[...t.init]),Lb.array(t.beforeRequest)&&(r.hooks.beforeRequest=[...t.beforeRequest]),Lb.array(t.beforeError)&&(r.hooks.beforeError=[...t.beforeError]),Lb.array(t.beforeRedirect)&&(r.hooks.beforeRedirect=[...t.beforeRedirect]),Lb.array(t.beforeRetry)&&(r.hooks.beforeRetry=[...t.beforeRetry]),Lb.array(t.afterResponse)&&(r.hooks.afterResponse=[...t.afterResponse])),Lb.object(e.pagination)&&(r.pagination={...e.pagination}),r})(e),Xx(this,e,this),Xx(e,e,this),this._merging=!0,"isStream"in e&&(this.isStream=e.isStream);try{let t=!1;for(const n in e){if("mutableDefaults"===n||"handlers"===n)continue;if("url"===n)continue;if(!(n in this))throw new Error(`Unexpected option: ${n}`);const r=e[n];void 0!==r&&(this[n]=r,t=!0)}t&&this._init.push(e)}finally{this._merging=!1}}}get request(){return this._internals.request}set request(e){qb.any([Lb.function_,Lb.undefined],e),this._internals.request=e}get agent(){return this._internals.agent}set agent(e){qb.plainObject(e);for(const t in e){if(!(t in this._internals.agent))throw new TypeError(`Unexpected agent option: ${t}`);qb.any([Lb.object,Lb.undefined],e[t])}this._merging?Object.assign(this._internals.agent,e):this._internals.agent={...e}}get h2session(){return this._internals.h2session}set h2session(e){this._internals.h2session=e}get decompress(){return this._internals.decompress}set decompress(e){qb.boolean(e),this._internals.decompress=e}get timeout(){return this._internals.timeout}set timeout(e){qb.plainObject(e);for(const t in e){if(!(t in this._internals.timeout))throw new Error(`Unexpected timeout option: ${t}`);qb.any([Lb.number,Lb.undefined],e[t])}this._merging?Object.assign(this._internals.timeout,e):this._internals.timeout={...e}}get prefixUrl(){return this._internals.prefixUrl}set prefixUrl(e){if(qb.any([Lb.string,Lb.urlInstance],e),""!==e){if((e=e.toString()).endsWith("/")||(e+="/"),this._internals.prefixUrl&&this._internals.url){const{href:t}=this._internals.url;this._internals.url.href=e+t.slice(this._internals.prefixUrl.length)}this._internals.prefixUrl=e}else this._internals.prefixUrl=""}get body(){return this._internals.body}set body(e){qb.any([Lb.string,Lb.buffer,Lb.nodeStream,Lb.generator,Lb.asyncGenerator,Kv,Lb.undefined],e),Lb.nodeStream(e)&&qb.truthy(e.readable),void 0!==e&&(qb.undefined(this._internals.form),qb.undefined(this._internals.json)),this._internals.body=e}get form(){return this._internals.form}set form(e){qb.any([Lb.plainObject,Lb.undefined],e),void 0!==e&&(qb.undefined(this._internals.body),qb.undefined(this._internals.json)),this._internals.form=e}get json(){return this._internals.json}set json(e){void 0!==e&&(qb.undefined(this._internals.body),qb.undefined(this._internals.form)),this._internals.json=e}get url(){return this._internals.url}set url(e){if(qb.any([Lb.string,Lb.urlInstance,Lb.undefined],e),void 0===e)return void(this._internals.url=void 0);if(Lb.string(e)&&e.startsWith("/"))throw new Error("`url` must not start with a slash");const t=`${this.prefixUrl}${e.toString()}`,n=new URL(t);if(this._internals.url=n,"unix:"===n.protocol&&(n.href=`http://unix${n.pathname}${n.search}`),"http:"!==n.protocol&&"https:"!==n.protocol){const e=new Error(`Unsupported protocol: ${n.protocol}`);throw e.code="ERR_UNSUPPORTED_PROTOCOL",e}if(this._internals.username&&(n.username=this._internals.username,this._internals.username=""),this._internals.password&&(n.password=this._internals.password,this._internals.password=""),this._internals.searchParams&&(n.search=this._internals.searchParams.toString(),this._internals.searchParams=void 0),"unix"!==n.hostname)this._unixOptions=void 0;else{if(!this._internals.enableUnixSockets)throw new Error("Using UNIX domain sockets but option `enableUnixSockets` is not enabled");const e=/(?<socketPath>.+?):(?<path>.+)/.exec(`${n.pathname}${n.search}`);if(e?.groups){const{socketPath:t,path:n}=e.groups;this._unixOptions={socketPath:t,path:n,host:""}}else this._unixOptions=void 0}}get cookieJar(){return this._internals.cookieJar}set cookieJar(e){if(qb.any([Lb.object,Lb.undefined],e),void 0===e)return void(this._internals.cookieJar=void 0);let{setCookie:t,getCookieString:n}=e;qb.function_(t),qb.function_(n),4===t.length&&0===n.length?(t=j(t.bind(e)),n=j(n.bind(e)),this._internals.cookieJar={setCookie:t,getCookieString:n}):this._internals.cookieJar=e}get signal(){return this._internals.signal}set signal(e){qb.object(e),this._internals.signal=e}get ignoreInvalidCookies(){return this._internals.ignoreInvalidCookies}set ignoreInvalidCookies(e){qb.boolean(e),this._internals.ignoreInvalidCookies=e}get searchParams(){return this._internals.url?this._internals.url.searchParams:(void 0===this._internals.searchParams&&(this._internals.searchParams=new URLSearchParams),this._internals.searchParams)}set searchParams(e){qb.any([Lb.string,Lb.object,Lb.undefined],e);const t=this._internals.url;if(void 0===e)return this._internals.searchParams=void 0,void(t&&(t.search=""));const n=this.searchParams;let r;if(Lb.string(e))r=new URLSearchParams(e);else if(e instanceof URLSearchParams)r=e;else{!function(e){for(const t in e){const n=e[t];qb.any([Lb.string,Lb.number,Lb.boolean,Lb.null_,Lb.undefined],n)}}(e),r=new URLSearchParams;for(const t in e){const i=e[t];null===i?r.append(t,""):void 0===i?n.delete(t):r.append(t,i)}}if(this._merging){for(const e of r.keys())n.delete(e);for(const[e,t]of r)n.append(e,t)}else t?t.search=n.toString():this._internals.searchParams=n}get searchParameters(){throw new Error("The `searchParameters` option does not exist. Use `searchParams` instead.")}set searchParameters(e){throw new Error("The `searchParameters` option does not exist. Use `searchParams` instead.")}get dnsLookup(){return this._internals.dnsLookup}set dnsLookup(e){qb.any([Lb.function_,Lb.undefined],e),this._internals.dnsLookup=e}get dnsCache(){return this._internals.dnsCache}set dnsCache(e){qb.any([Lb.object,Lb.boolean,Lb.undefined],e),this._internals.dnsCache=!0===e?Gx||(Gx=new Ow,Gx):!1===e?void 0:e}get context(){return this._internals.context}set context(e){qb.object(e),this._merging?Object.assign(this._internals.context,e):this._internals.context={...e}}get hooks(){return this._internals.hooks}set hooks(e){qb.object(e);for(const t in e){if(!(t in this._internals.hooks))throw new Error(`Unexpected hook event: ${t}`);const n=t,r=e[n];if(qb.any([Lb.array,Lb.undefined],r),r)for(const e of r)qb.function_(e);if(this._merging)r&&this._internals.hooks[n].push(...r);else{if(!r)throw new Error(`Missing hook event: ${t}`);this._internals.hooks[t]=[...r]}}}get followRedirect(){return this._internals.followRedirect}set followRedirect(e){qb.boolean(e),this._internals.followRedirect=e}get followRedirects(){throw new TypeError("The `followRedirects` option does not exist. Use `followRedirect` instead.")}set followRedirects(e){throw new TypeError("The `followRedirects` option does not exist. Use `followRedirect` instead.")}get maxRedirects(){return this._internals.maxRedirects}set maxRedirects(e){qb.number(e),this._internals.maxRedirects=e}get cache(){return this._internals.cache}set cache(e){qb.any([Lb.object,Lb.string,Lb.boolean,Lb.undefined],e),this._internals.cache=!0===e?Wx:!1===e?void 0:e}get throwHttpErrors(){return this._internals.throwHttpErrors}set throwHttpErrors(e){qb.boolean(e),this._internals.throwHttpErrors=e}get username(){const e=this._internals.url,t=e?e.username:this._internals.username;return decodeURIComponent(t)}set username(e){qb.string(e);const t=this._internals.url,n=encodeURIComponent(e);t?t.username=n:this._internals.username=n}get password(){const e=this._internals.url,t=e?e.password:this._internals.password;return decodeURIComponent(t)}set password(e){qb.string(e);const t=this._internals.url,n=encodeURIComponent(e);t?t.password=n:this._internals.password=n}get http2(){return this._internals.http2}set http2(e){qb.boolean(e),this._internals.http2=e}get allowGetBody(){return this._internals.allowGetBody}set allowGetBody(e){qb.boolean(e),this._internals.allowGetBody=e}get headers(){return this._internals.headers}set headers(e){qb.plainObject(e),this._merging?Object.assign(this._internals.headers,yv(e)):this._internals.headers=yv(e)}get methodRewriting(){return this._internals.methodRewriting}set methodRewriting(e){qb.boolean(e),this._internals.methodRewriting=e}get dnsLookupIpVersion(){return this._internals.dnsLookupIpVersion}set dnsLookupIpVersion(e){if(void 0!==e&&4!==e&&6!==e)throw new TypeError(`Invalid DNS lookup IP version: ${e}`);this._internals.dnsLookupIpVersion=e}get parseJson(){return this._internals.parseJson}set parseJson(e){qb.function_(e),this._internals.parseJson=e}get stringifyJson(){return this._internals.stringifyJson}set stringifyJson(e){qb.function_(e),this._internals.stringifyJson=e}get retry(){return this._internals.retry}set retry(e){if(qb.plainObject(e),qb.any([Lb.function_,Lb.undefined],e.calculateDelay),qb.any([Lb.number,Lb.undefined],e.maxRetryAfter),qb.any([Lb.number,Lb.undefined],e.limit),qb.any([Lb.array,Lb.undefined],e.methods),qb.any([Lb.array,Lb.undefined],e.statusCodes),qb.any([Lb.array,Lb.undefined],e.errorCodes),qb.any([Lb.number,Lb.undefined],e.noise),e.noise&&Math.abs(e.noise)>100)throw new Error(`The maximum acceptable retry noise is +/- 100ms, got ${e.noise}`);for(const t in e)if(!(t in this._internals.retry))throw new Error(`Unexpected retry option: ${t}`);this._merging?Object.assign(this._internals.retry,e):this._internals.retry={...e};const{retry:t}=this._internals;t.methods=[...new Set(t.methods.map((e=>e.toUpperCase())))],t.statusCodes=[...new Set(t.statusCodes)],t.errorCodes=[...new Set(t.errorCodes)]}get localAddress(){return this._internals.localAddress}set localAddress(e){qb.any([Lb.string,Lb.undefined],e),this._internals.localAddress=e}get method(){return this._internals.method}set method(e){qb.string(e),this._internals.method=e.toUpperCase()}get createConnection(){return this._internals.createConnection}set createConnection(e){qb.any([Lb.function_,Lb.undefined],e),this._internals.createConnection=e}get cacheOptions(){return this._internals.cacheOptions}set cacheOptions(e){qb.plainObject(e),qb.any([Lb.boolean,Lb.undefined],e.shared),qb.any([Lb.number,Lb.undefined],e.cacheHeuristic),qb.any([Lb.number,Lb.undefined],e.immutableMinTimeToLive),qb.any([Lb.boolean,Lb.undefined],e.ignoreCargoCult);for(const t in e)if(!(t in this._internals.cacheOptions))throw new Error(`Cache option \`${t}\` does not exist`);this._merging?Object.assign(this._internals.cacheOptions,e):this._internals.cacheOptions={...e}}get https(){return this._internals.https}set https(e){qb.plainObject(e),qb.any([Lb.boolean,Lb.undefined],e.rejectUnauthorized),qb.any([Lb.function_,Lb.undefined],e.checkServerIdentity),qb.any([Lb.string,Lb.object,Lb.array,Lb.undefined],e.certificateAuthority),qb.any([Lb.string,Lb.object,Lb.array,Lb.undefined],e.key),qb.any([Lb.string,Lb.object,Lb.array,Lb.undefined],e.certificate),qb.any([Lb.string,Lb.undefined],e.passphrase),qb.any([Lb.string,Lb.buffer,Lb.array,Lb.undefined],e.pfx),qb.any([Lb.array,Lb.undefined],e.alpnProtocols),qb.any([Lb.string,Lb.undefined],e.ciphers),qb.any([Lb.string,Lb.buffer,Lb.undefined],e.dhparam),qb.any([Lb.string,Lb.undefined],e.signatureAlgorithms),qb.any([Lb.string,Lb.undefined],e.minVersion),qb.any([Lb.string,Lb.undefined],e.maxVersion),qb.any([Lb.boolean,Lb.undefined],e.honorCipherOrder),qb.any([Lb.number,Lb.undefined],e.tlsSessionLifetime),qb.any([Lb.string,Lb.undefined],e.ecdhCurve),qb.any([Lb.string,Lb.buffer,Lb.array,Lb.undefined],e.certificateRevocationLists);for(const t in e)if(!(t in this._internals.https))throw new Error(`HTTPS option \`${t}\` does not exist`);this._merging?Object.assign(this._internals.https,e):this._internals.https={...e}}get encoding(){return this._internals.encoding}set encoding(e){if(null===e)throw new TypeError("To get a Buffer, set `options.responseType` to `buffer` instead");qb.any([Lb.string,Lb.undefined],e),this._internals.encoding=e}get resolveBodyOnly(){return this._internals.resolveBodyOnly}set resolveBodyOnly(e){qb.boolean(e),this._internals.resolveBodyOnly=e}get isStream(){return this._internals.isStream}set isStream(e){qb.boolean(e),this._internals.isStream=e}get responseType(){return this._internals.responseType}set responseType(e){if(void 0!==e){if("text"!==e&&"buffer"!==e&&"json"!==e)throw new Error(`Invalid \`responseType\` option: ${e}`);this._internals.responseType=e}else this._internals.responseType="text"}get pagination(){return this._internals.pagination}set pagination(e){qb.object(e),this._merging?Object.assign(this._internals.pagination,e):this._internals.pagination=e}get auth(){throw new Error("Parameter `auth` is deprecated. Use `username` / `password` instead.")}set auth(e){throw new Error("Parameter `auth` is deprecated. Use `username` / `password` instead.")}get setHost(){return this._internals.setHost}set setHost(e){qb.boolean(e),this._internals.setHost=e}get maxHeaderSize(){return this._internals.maxHeaderSize}set maxHeaderSize(e){qb.any([Lb.number,Lb.undefined],e),this._internals.maxHeaderSize=e}get enableUnixSockets(){return this._internals.enableUnixSockets}set enableUnixSockets(e){qb.boolean(e),this._internals.enableUnixSockets=e}toJSON(){return{...this._internals}}[Symbol.for("nodejs.util.inspect.custom")](e,t){return L(this._internals,t)}createNativeRequestOptions(){const e=this._internals;let t;t="https:"===e.url.protocol?e.http2?e.agent:e.agent.https:e.agent.http;const{https:n}=e;let{pfx:r}=n;return Lb.array(r)&&Lb.plainObject(r[0])&&(r=r.map((e=>({buf:e.buffer,passphrase:e.passphrase})))),{...e.cacheOptions,...this._unixOptions,ALPNProtocols:n.alpnProtocols,ca:n.certificateAuthority,cert:n.certificate,key:n.key,passphrase:n.passphrase,pfx:n.pfx,rejectUnauthorized:n.rejectUnauthorized,checkServerIdentity:n.checkServerIdentity??Q,ciphers:n.ciphers,honorCipherOrder:n.honorCipherOrder,minVersion:n.minVersion,maxVersion:n.maxVersion,sigalgs:n.signatureAlgorithms,sessionTimeout:n.tlsSessionLifetime,dhparam:n.dhparam,ecdhCurve:n.ecdhCurve,crl:n.certificateRevocationLists,lookup:e.dnsLookup??e.dnsCache?.lookup,family:e.dnsLookupIpVersion,agent:t,setHost:e.setHost,method:e.method,maxHeaderSize:e.maxHeaderSize,localAddress:e.localAddress,headers:e.headers,createConnection:e.createConnection,timeout:e.http2?Zx(e):void 0,h2session:e.h2session}}getRequestFunction(){const e=this._internals.url,{request:t}=this._internals;return!t&&e?this.getFallbackRequestFunction():t}getFallbackRequestFunction(){const e=this._internals.url;if(e){if("https:"===e.protocol){if(this._internals.http2){if(Vx<15||15===Vx&&Kx<10){const e=new Error("To use the `http2` option, install Node.js 15.10.0 or above");throw e.code="EUNSUPPORTED",e}return Yx.auto}return ee.request}return K.request}}freeze(){const e=this._internals;Object.freeze(e),Object.freeze(e.hooks),Object.freeze(e.hooks.afterResponse),Object.freeze(e.hooks.beforeError),Object.freeze(e.hooks.beforeRedirect),Object.freeze(e.hooks.beforeRequest),Object.freeze(e.hooks.beforeRetry),Object.freeze(e.hooks.init),Object.freeze(e.https),Object.freeze(e.cacheOptions),Object.freeze(e.agent),Object.freeze(e.headers),Object.freeze(e.timeout),Object.freeze(e.retry),Object.freeze(e.retry.errorCodes),Object.freeze(e.retry.methods),Object.freeze(e.retry.statusCodes)}}const e_=e=>{const{statusCode:t}=e,n=e.request.options.followRedirect?299:399;return t>=200&&t<=n||304===t};class t_ extends Yb{constructor(e,t){const{options:n}=t.request;super(`${e.message} in "${n.url.toString()}"`,e,t.request),this.name="ParseError",this.code="ERR_BODY_PARSE_FAILURE"}}const n_=(e,t,n,r)=>{const{rawBody:i}=e;try{if("text"===t)return i.toString(r);if("json"===t)return 0===i.length?"":n(i.toString(r));if("buffer"===t)return i}catch(t){throw new t_(t,e)}throw new t_({message:`Unknown body type '${t}'`,name:"Error"},e)};function r_(e){return"unix:"===e.protocol||"unix"===e.hostname}const{buffer:i_}=mv,s_=Lb.string(z.versions.brotli),a_=new Set(["GET","HEAD"]),o_=new class{constructor(){Object.defineProperty(this,"weakMap",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"map",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.weakMap=new WeakMap,this.map=new Map}set(e,t){"object"==typeof e?this.weakMap.set(e,t):this.map.set(e,t)}get(e){return"object"==typeof e?this.weakMap.get(e):this.map.get(e)}has(e){return"object"==typeof e?this.weakMap.has(e):this.map.has(e)}},c_=new Set([300,301,302,303,304,307,308]),u_=["socket","connect","continue","information","upgrade"],l_=()=>{};class d_ extends V{constructor(e,t,n){super({autoDestroy:!1,highWaterMark:0}),Object.defineProperty(this,"constructor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_noPipe",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"response",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"requestUrl",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"redirectUrls",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"retryCount",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_stopRetry",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_downloadedSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_uploadedSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_stopReading",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_pipedServerResponses",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_request",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_responseSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_bodySize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_unproxyEvents",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_isFromCache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_cannotHaveBody",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_triggerRead",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_cancelTimeouts",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_removeListeners",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_nativeResponse",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_flushed",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_aborted",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_requestInitialized",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._downloadedSize=0,this._uploadedSize=0,this._stopReading=!1,this._pipedServerResponses=new Set,this._cannotHaveBody=!1,this._unproxyEvents=l_,this._triggerRead=!1,this._cancelTimeouts=l_,this._removeListeners=l_,this._jobs=[],this._flushed=!1,this._requestInitialized=!1,this._aborted=!1,this.redirectUrls=[],this.retryCount=0,this._stopRetry=l_,this.on("pipe",(e=>{e?.headers&&Object.assign(this.options.headers,e.headers)})),this.on("newListener",(e=>{if("retry"===e&&this.listenerCount("retry")>0)throw new Error("A retry listener has been attached already.")}));try{if(this.options=new Qx(e,t,n),!this.options.url){if(""===this.options.prefixUrl)throw new TypeError("Missing `url` property");this.options.url=""}this.requestUrl=this.options.url}catch(e){const{options:t}=e;return t&&(this.options=t),void(this.flush=async()=>{this.flush=async()=>{},this.destroy(e)})}const{body:r}=this.options;if(Lb.nodeStream(r)&&r.once("error",(e=>{this._flushed?this._beforeError(new Gb(e,this)):this.flush=async()=>{this.flush=async()=>{},this._beforeError(new Gb(e,this))}})),this.options.signal){const e=()=>{this.destroy(new Qb(this))};this.options.signal.aborted?e():(this.options.signal.addEventListener("abort",e),this._removeListeners=()=>{this.options.signal?.removeEventListener("abort",e)})}}async flush(){if(!this._flushed){this._flushed=!0;try{if(await this._finalizeBody(),this.destroyed)return;if(await this._makeRequest(),this.destroyed)return void this._request?.destroy();for(const e of this._jobs)e();this._jobs.length=0,this._requestInitialized=!0}catch(e){this._beforeError(e)}}}_beforeError(e){if(this._stopReading)return;const{response:t,options:n}=this,r=this.retryCount+("RetryError"===e.name?0:1);this._stopReading=!0,e instanceof Yb||(e=new Yb(e.message,e,this));const i=e;(async()=>{if(t?.readable&&!t.rawBody&&!this._request?.socket?.destroyed){t.setEncoding(this.readableEncoding);await this._setRawBody(t)&&(t.body=t.rawBody.toString())}if(0!==this.listenerCount("retry")){let s;try{let e;t&&"retry-after"in t.headers&&(e=Number(t.headers["retry-after"]),Number.isNaN(e)?(e=Date.parse(t.headers["retry-after"])-Date.now(),e<=0&&(e=1)):e*=1e3);const a=n.retry;s=await a.calculateDelay({attemptCount:r,retryOptions:a,error:i,retryAfter:e,computedValue:yw({attemptCount:r,retryOptions:a,error:i,retryAfter:e,computedValue:a.maxRetryAfter??n.timeout.request??Number.POSITIVE_INFINITY})})}catch(e){return void this._error(new Yb(e.message,e,this))}if(s){if(await new Promise((e=>{const t=setTimeout(e,s);this._stopRetry=()=>{clearTimeout(t),e()}})),this.destroyed)return;try{for(const e of this.options.hooks.beforeRetry)await e(i,this.retryCount+1)}catch(t){return void this._error(new Yb(t.message,e,this))}if(this.destroyed)return;return this.destroy(),void this.emit("retry",this.retryCount+1,e,(e=>{const t=new d_(n.url,e,n);return t.retryCount=this.retryCount+1,z.nextTick((()=>{t.flush()})),t}))}}this._error(i)})()}_read(){this._triggerRead=!0;const{response:e}=this;if(e&&!this._stopReading){let t;for(e.readableLength&&(this._triggerRead=!1);null!==(t=e.read());){this._downloadedSize+=t.length;const e=this.downloadProgress;e.percent<1&&this.emit("downloadProgress",e),this.push(t)}}}_write(e,t,n){const r=()=>{this._writeRequest(e,t,n)};this._requestInitialized?r():this._jobs.push(r)}_final(e){const t=()=>{this._request&&!this._request.destroyed?this._request.end((t=>{this._request._writableState?.errored||(t||(this._bodySize=this._uploadedSize,this.emit("uploadProgress",this.uploadProgress),this._request.emit("upload-complete")),e(t))})):e()};this._requestInitialized?t():this._jobs.push(t)}_destroy(e,t){if(this._stopReading=!0,this.flush=async()=>{},this._stopRetry(),this._cancelTimeouts(),this._removeListeners(),this.options){const{body:e}=this.options;Lb.nodeStream(e)&&e.destroy()}this._request&&this._request.destroy(),null===e||Lb.undefined(e)||e instanceof Yb||(e=new Yb(e.message,e,this)),t(e)}pipe(e,t){return e instanceof W&&this._pipedServerResponses.add(e),super.pipe(e,t)}unpipe(e){return e instanceof W&&this._pipedServerResponses.delete(e),super.unpipe(e),this}async _finalizeBody(){const{options:e}=this,{headers:t}=e,n=!Lb.undefined(e.form),r=!Lb.undefined(e.json),i=!Lb.undefined(e.body),s=a_.has(e.method)&&!("GET"===e.method&&e.allowGetBody);if(this._cannotHaveBody=s,n||r||i){if(s)throw new TypeError(`The \`${e.method}\` method cannot be used with a body`);const r=!Lb.string(t["content-type"]);if(i){if(Kv(e.body)){const n=new dw(e.body);r&&(t["content-type"]=n.headers["Content-Type"]),"Content-Length"in n.headers&&(t["content-length"]=n.headers["Content-Length"]),e.body=n.encode()}pw(e.body)&&r&&(t["content-type"]=`multipart/form-data; boundary=${e.body.getBoundary()}`)}else if(n){r&&(t["content-type"]="application/x-www-form-urlencoded");const{form:n}=e;e.form=void 0,e.body=new URLSearchParams(n).toString()}else{r&&(t["content-type"]="application/json");const{json:n}=e;e.json=void 0,e.body=e.stringifyJson(n)}const a=await async function(e,t){return t&&"content-length"in t?Number(t["content-length"]):e?Lb.string(e)?q.byteLength(e):Lb.buffer(e)?e.length:pw(e)?j(e.getLength.bind(e))():void 0:0}(e.body,e.headers);Lb.undefined(t["content-length"])&&Lb.undefined(t["transfer-encoding"])&&!s&&!Lb.undefined(a)&&(t["content-length"]=String(a))}"json"!==e.responseType||"accept"in e.headers||(e.headers.accept="application/json"),this._bodySize=Number(t["content-length"])||void 0}async _onResponseBase(e){if(this.isAborted)return;const{options:t}=this,{url:n}=t;this._nativeResponse=e,t.decompress&&(e=Bv(e));const r=e.statusCode,i=e;i.statusMessage=i.statusMessage??K.STATUS_CODES[r],i.url=t.url.toString(),i.requestUrl=this.requestUrl,i.redirectUrls=this.redirectUrls,i.request=this,i.isFromCache=this._nativeResponse.fromCache??!1,i.ip=this.ip,i.retryCount=this.retryCount,i.ok=e_(i),this._isFromCache=i.isFromCache,this._responseSize=Number(e.headers["content-length"])||void 0,this.response=i,e.once("end",(()=>{this._responseSize=this._downloadedSize,this.emit("downloadProgress",this.downloadProgress)})),e.once("error",(t=>{this._aborted=!0,e.destroy(),this._beforeError(new Zb(t,this))})),e.once("aborted",(()=>{this._aborted=!0,this._beforeError(new Zb({name:"Error",message:"The server aborted pending request",code:"ECONNRESET"},this))})),this.emit("downloadProgress",this.downloadProgress);const s=e.headers["set-cookie"];if(Lb.object(t.cookieJar)&&s){let e=s.map((async e=>t.cookieJar.setCookie(e,n.toString())));t.ignoreInvalidCookies&&(e=e.map((async e=>{try{await e}catch{}})));try{await Promise.all(e)}catch(e){return void this._beforeError(e)}}if(!this.isAborted)if(t.followRedirect&&e.headers.location&&c_.has(r)){if(e.resume(),this._cancelTimeouts(),this._unproxyEvents(),this.redirectUrls.length>=t.maxRedirects)return void this._beforeError(new Vb(this));this._request=void 0;const s=new Qx(void 0,void 0,this.options),a=303===r&&"GET"!==s.method&&"HEAD"!==s.method,o=307!==r&&308!==r,c=s.methodRewriting&&o;(a||c)&&(s.method="GET",s.body=void 0,s.json=void 0,s.form=void 0,delete s.headers["content-length"]);try{const t=q.from(e.headers.location,"binary").toString(),r=new URL(t,n);if(!r_(n)&&r_(r))return void this._beforeError(new Yb("Cannot redirect to UNIX socket",{},this));r.hostname!==n.hostname||r.port!==n.port?("host"in s.headers&&delete s.headers.host,"cookie"in s.headers&&delete s.headers.cookie,"authorization"in s.headers&&delete s.headers.authorization,(s.username||s.password)&&(s.username="",s.password="")):(r.username=s.username,r.password=s.password),this.redirectUrls.push(r),s.prefixUrl="",s.url=r;for(const e of s.hooks.beforeRedirect)await e(s,i);this.emit("redirect",s,i),this.options=s,await this._makeRequest()}catch(e){return void this._beforeError(e)}}else if(t.isStream&&t.throwHttpErrors&&!e_(i))this._beforeError(new Kb(i));else if(e.on("readable",(()=>{this._triggerRead&&this._read()})),this.on("resume",(()=>{e.resume()})),this.on("pause",(()=>{e.pause()})),e.once("end",(()=>{this.push(null)})),this._noPipe){await this._setRawBody()&&this.emit("response",e)}else{this.emit("response",e);for(const n of this._pipedServerResponses)if(!n.headersSent){for(const r in e.headers){const i=!t.decompress||"content-encoding"!==r,s=e.headers[r];i&&n.setHeader(r,s)}n.statusCode=r}}}async _setRawBody(e=this){if(e.readableEnded)return!1;try{const t=await i_(e);if(!this.isAborted)return this.response.rawBody=t,!0}catch{}return!1}async _onResponse(e){try{await this._onResponseBase(e)}catch(e){this._beforeError(e)}}_onRequest(e){const{options:t}=this,{timeout:n,url:r}=t;(e=>{if(e.timings)return e.timings;const t={start:Date.now(),socket:void 0,lookup:void 0,connect:void 0,secureConnect:void 0,upload:void 0,response:void 0,end:void 0,error:void 0,abort:void 0,phases:{wait:void 0,dns:void 0,tcp:void 0,tls:void 0,request:void 0,firstByte:void 0,download:void 0,total:void 0}};e.timings=t;const n=e=>{e.once(h,(()=>{t.error=Date.now(),t.phases.total=t.error-t.start}))};n(e);const r=()=>{t.abort=Date.now(),t.phases.total=t.abort-t.start};e.prependOnceListener("abort",r);const i=e=>{if(t.socket=Date.now(),t.phases.wait=t.socket-t.start,o.isProxy(e))return;const n=()=>{t.lookup=Date.now(),t.phases.dns=t.lookup-t.socket};e.prependOnceListener("lookup",n),rv(e,{connect:()=>{t.connect=Date.now(),void 0===t.lookup&&(e.removeListener("lookup",n),t.lookup=t.connect,t.phases.dns=t.lookup-t.socket),t.phases.tcp=t.connect-t.lookup},secureConnect:()=>{t.secureConnect=Date.now(),t.phases.tls=t.secureConnect-t.connect}})};e.socket?i(e.socket):e.prependOnceListener("socket",i);const s=()=>{t.upload=Date.now(),t.phases.request=t.upload-(t.secureConnect??t.connect)};e.writableFinished?s():e.prependOnceListener("finish",s),e.prependOnceListener("response",(i=>{t.response=Date.now(),t.phases.firstByte=t.response-t.upload,i.timings=t,n(i),i.prependOnceListener("end",(()=>{e.off("abort",r),i.off("aborted",r),t.phases.total||(t.end=Date.now(),t.phases.download=t.end-t.response,t.phases.total=t.end-t.start)})),i.prependOnceListener("aborted",r)}))})(e),this.options.http2&&e.setTimeout(0),this._cancelTimeouts=function(e,t,n){if(hw in e)return mw;e[hw]=!0;const r=[],{once:i,unhandleAll:s}=function(){const e=[];return{once(t,n,r){t.once(n,r),e.push({origin:t,event:n,fn:r})},unhandleAll(){for(const t of e){const{origin:e,event:n,fn:r}=t;e.removeListener(n,r)}e.length=0}}}(),a=(e,t,n)=>{const i=setTimeout(t,e,e,n);i.unref?.();const s=()=>{clearTimeout(i)};return r.push(s),s},{host:o,hostname:c}=n,u=(t,n)=>{e.destroy(new gw(t,n))},l=()=>{for(const e of r)e();s()};if(e.once("error",(t=>{if(l(),0===e.listenerCount("error"))throw t})),void 0!==t.request){const n=a(t.request,u,"request");i(e,"response",(e=>{i(e,"end",n)}))}if(void 0!==t.socket){const{socket:n}=t,i=()=>{u(n,"socket")};e.setTimeout(n,i),r.push((()=>{e.removeListener("timeout",i)}))}const d=void 0!==t.lookup,p=void 0!==t.connect,f=void 0!==t.secureConnect,h=void 0!==t.send;return(d||p||f||h)&&i(e,"socket",(r=>{const{socketPath:s}=e;if(r.connecting){const e=Boolean(s??0!==Z.isIP(c??o??""));if(d&&!e&&void 0===r.address().address){const e=a(t.lookup,u,"lookup");i(r,"lookup",e)}if(p){const n=()=>a(t.connect,u,"connect");e?i(r,"connect",n()):i(r,"lookup",(e=>{null===e&&i(r,"connect",n())}))}f&&"https:"===n.protocol&&i(r,"connect",(()=>{const e=a(t.secureConnect,u,"secureConnect");i(r,"secureConnect",e)}))}if(h){const n=()=>a(t.send,u,"send");r.connecting?i(r,"connect",(()=>{i(e,"upload-complete",n())})):i(e,"upload-complete",n())}})),void 0!==t.response&&i(e,"upload-complete",(()=>{const n=a(t.response,u,"response");i(e,"response",n)})),void 0!==t.read&&i(e,"response",(e=>{const n=a(t.read,u,"read");i(e,"end",n)})),l}(e,n,r);const i=t.cache?"cacheableResponse":"response";e.once(i,(e=>{this._onResponse(e)})),e.once("error",(t=>{this._aborted=!0,e.destroy(),t=t instanceof gw?new Jb(t,this.timings,this):new Yb(t.message,t,this),this._beforeError(t)})),this._unproxyEvents=fw(e,this,u_),this._request=e,this.emit("uploadProgress",this.uploadProgress),this._sendBody(),this.emit("request",e)}async _asyncWrite(e){return new Promise(((t,n)=>{super.write(e,(e=>{e?n(e):t()}))}))}_sendBody(){const{body:e}=this.options,t=0===this.redirectUrls.length?this:this._request??this;Lb.nodeStream(e)?e.pipe(t):Lb.generator(e)||Lb.asyncGenerator(e)?(async()=>{try{for await(const t of e)await this._asyncWrite(t);super.end()}catch(e){this._beforeError(e)}})():Lb.undefined(e)?(this._cannotHaveBody||this._noPipe)&&t.end():(this._writeRequest(e,void 0,(()=>{})),t.end())}_prepareCache(e){if(!o_.has(e)){const t=new Mv(((e,t)=>{const n=e._request(e,t);return Lb.promise(n)&&(n.once=(e,t)=>{if("error"===e)(async()=>{try{await n}catch(e){t(e)}})();else{if("abort"!==e)throw new Error(`Unknown HTTP2 promise event: ${e}`);(async()=>{try{(await n).once("abort",t)}catch{}})()}return n}),n}),e);o_.set(e,t.request())}}async _createCacheableRequest(e,t){return new Promise(((n,r)=>{let i;Object.assign(t,function(e){const t={protocol:e.protocol,hostname:Lb.string(e.hostname)&&e.hostname.startsWith("[")?e.hostname.slice(1,-1):e.hostname,host:e.host,hash:e.hash,search:e.search,pathname:e.pathname,href:e.href,path:`${e.pathname||""}${e.search||""}`};return Lb.string(e.port)&&e.port.length>0&&(t.port=Number(e.port)),(e.username||e.password)&&(t.auth=`${e.username||""}:${e.password||""}`),t}(e));const s=o_.get(t.cache)(t,(async e=>{if(e._readableState.autoDestroy=!1,i){const t=()=>{e.req&&(e.complete=e.req.res.complete)};e.prependOnceListener("end",t),t(),(await i).emit("cacheableResponse",e)}n(e)}));s.once("error",r),s.once("request",(async e=>{i=e,n(i)}))}))}async _makeRequest(){const{options:e}=this,{headers:t,username:n,password:r}=e,i=e.cookieJar;for(const e in t)if(Lb.undefined(t[e]))delete t[e];else if(Lb.null_(t[e]))throw new TypeError(`Use \`undefined\` instead of \`null\` to delete the \`${e}\` header`);if(e.decompress&&Lb.undefined(t["accept-encoding"])&&(t["accept-encoding"]=s_?"gzip, deflate, br":"gzip, deflate"),n||r){const e=q.from(`${n}:${r}`).toString("base64");t.authorization=`Basic ${e}`}if(i){const n=await i.getCookieString(e.url.toString());Lb.nonEmptyString(n)&&(t.cookie=n)}let s;e.prefixUrl="";for(const t of e.hooks.beforeRequest){const n=await t(e);if(!Lb.undefined(n)){s=()=>n;break}}s||(s=e.getRequestFunction());const a=e.url;this._requestOptions=e.createNativeRequestOptions(),e.cache&&(this._requestOptions._request=s,this._requestOptions.cache=e.cache,this._requestOptions.body=e.body,this._prepareCache(e.cache));const o=e.cache?this._createCacheableRequest:s;try{let t=o(a,this._requestOptions);Lb.promise(t)&&(t=await t),Lb.undefined(t)&&(t=e.getFallbackRequestFunction()(a,this._requestOptions),Lb.promise(t)&&(t=await t)),!function(e){return e.writable&&!e.writableEnded}(t)?this.writable?(this.once("finish",(()=>{this._onResponse(t)})),this._sendBody()):this._onResponse(t):this._onRequest(t)}catch(e){if(e instanceof Tv)throw new Wb(e,this);throw e}}async _error(e){try{if(e instanceof Kb&&!this.options.throwHttpErrors);else for(const t of this.options.hooks.beforeError)e=await t(e)}catch(t){e=new Yb(t.message,t,this)}this.destroy(e)}_writeRequest(e,t,n){this._request&&!this._request.destroyed&&this._request.write(e,t,(r=>{if(!r&&!this._request.destroyed){this._uploadedSize+=q.byteLength(e,t);const n=this.uploadProgress;n.percent<1&&this.emit("uploadProgress",n)}n(r)}))}get ip(){return this.socket?.remoteAddress}get isAborted(){return this._aborted}get socket(){return this._request?.socket??void 0}get downloadProgress(){let e;return e=this._responseSize?this._downloadedSize/this._responseSize:this._responseSize===this._downloadedSize?1:0,{percent:e,transferred:this._downloadedSize,total:this._responseSize}}get uploadProgress(){let e;return e=this._bodySize?this._uploadedSize/this._bodySize:this._bodySize===this._uploadedSize?1:0,{percent:e,transferred:this._uploadedSize,total:this._bodySize}}get timings(){return this._request?.timings}get isFromCache(){return this._isFromCache}get reusedSocket(){return this._request?.reusedSocket}}class p_ extends Yb{constructor(e){super("Promise was canceled",{},e),this.name="CancelError",this.code="ERR_CANCELED"}get isCanceled(){return!0}}const f_=["request","response","redirect","uploadProgress","downloadProgress"];function h_(e){let t,n,r;const i=new B,s=new Fb(((a,o,c)=>{c((()=>{t.destroy()})),c.shouldReject=!1,c((()=>{o(new p_(t))}));const u=l=>{c((()=>{}));const d=e??new d_(void 0,void 0,r);d.retryCount=l,d._noPipe=!0,t=d,d.once("response",(async e=>{const t=(e.headers["content-encoding"]??"").toLowerCase(),r="gzip"===t||"deflate"===t||"br"===t,{options:i}=d;if(r&&!i.decompress)e.body=e.rawBody;else try{e.body=n_(e,i.responseType,i.parseJson,i.encoding)}catch(t){if(e.body=e.rawBody.toString(),e_(e))return void d._beforeError(t)}try{const t=i.hooks.afterResponse;for(const[n,r]of t.entries())if(e=await r(e,(async e=>{throw i.merge(e),i.prefixUrl="",e.url&&(i.url=e.url),i.hooks.afterResponse=i.hooks.afterResponse.slice(0,n),new Xb(d)})),!Lb.object(e)||!Lb.number(e.statusCode)||Lb.nullOrUndefined(e.body))throw new TypeError("The `afterResponse` hook returned an invalid value")}catch(e){return void d._beforeError(e)}n=e,e_(e)?(d.destroy(),a(d.options.resolveBodyOnly?e.body:e)):d._beforeError(new Kb(e))}));const p=e=>{if(s.isCanceled)return;const{options:t}=d;if(e instanceof Kb&&!t.throwHttpErrors){const{response:t}=e;return d.destroy(),void a(d.options.resolveBodyOnly?t.body:t)}o(e)};d.once("error",p);const f=d.options?.body;d.once("retry",((t,n)=>{e=void 0;const i=d.options.body;if(f===i&&Lb.nodeStream(i))return n.message="Cannot retry with consumed body stream",void p(n);r=d.options,u(t)})),fw(d,i,f_),Lb.undefined(e)&&d.flush()};u(0)}));s.on=(e,t)=>(i.on(e,t),s),s.off=(e,t)=>(i.off(e,t),s);const a=e=>{const t=(async()=>{await s;const{options:t}=n.request;return n_(n,e,t.parseJson,t.encoding)})();return Object.defineProperties(t,Object.getOwnPropertyDescriptors(s)),t};return s.json=()=>{if(t.options){const{headers:e}=t.options;t.writableFinished||"accept"in e||(e.accept="application/json")}return a("json")},s.buffer=()=>a("buffer"),s.text=()=>a("text"),s}const m_=async e=>new Promise((t=>{setTimeout(t,e)})),g_=e=>Lb.function_(e),y_=["get","post","put","patch","head","delete"],b_=e=>{e={options:new Qx(void 0,void 0,e.options),handlers:[...e.handlers],mutableDefaults:e.mutableDefaults},Object.defineProperty(e,"mutableDefaults",{enumerable:!0,configurable:!1,writable:!1});const t=(t,n,r=e.options)=>{const i=new d_(t,n,r);let s;const a=e=>(i.options=e,i._noPipe=!e.isStream,i.flush(),e.isStream?i:(s||(s=h_(i)),s));let o=0;const c=t=>{const n=(e.handlers[o++]??a)(t,c);if(Lb.promise(n)&&!i.options.isStream&&(s||(s=h_(i)),n!==s)){const e=Object.getOwnPropertyDescriptors(s);for(const t in e)t in n&&delete e[t];Object.defineProperties(n,e),n.cancel=s.cancel}return n};return c(i.options)};t.extend=(...t)=>{const n=new Qx(void 0,void 0,e.options),r=[...e.handlers];let i;for(const e of t)g_(e)?(n.merge(e.defaults.options),r.push(...e.defaults.handlers),i=e.defaults.mutableDefaults):(n.merge(e),e.handlers&&r.push(...e.handlers),i=e.mutableDefaults);return b_({options:n,handlers:r,mutableDefaults:Boolean(i)})};const n=async function*(n,r){let i=new Qx(n,r,e.options);i.resolveBodyOnly=!1;const{pagination:s}=i;qb.function_(s.transform),qb.function_(s.shouldContinue),qb.function_(s.filter),qb.function_(s.paginate),qb.number(s.countLimit),qb.number(s.requestLimit),qb.number(s.backoff);const a=[];let{countLimit:o}=s,c=0;for(;c<s.requestLimit;){0!==c&&await m_(s.backoff);const e=await t(void 0,void 0,i),n=await s.transform(e),r=[];qb.array(n);for(const e of n)if(s.filter({item:e,currentItems:r,allItems:a})){if(!s.shouldContinue({item:e,currentItems:r,allItems:a}))return;if(yield e,s.stackAllItems&&a.push(e),r.push(e),--o<=0)return}const u=s.paginate({response:e,currentItems:r,allItems:a});if(!1===u)return;u===e.request.options?i=e.request.options:(i.merge(u),qb.any([Lb.urlInstance,Lb.undefined],u.url),void 0!==u.url&&(i.prefixUrl="",i.url=u.url)),c++}};(t.paginate=n).all=async(e,t)=>{const r=[];for await(const i of n(e,t))r.push(i);return r},t.paginate.each=n,t.stream=(e,n)=>t(e,{...n,isStream:!0});for(const e of y_)t[e]=(n,r)=>t(n,{...r,method:e}),t.stream[e]=(n,r)=>t(n,{...r,method:e,isStream:!0});return e.mutableDefaults||(Object.freeze(e.handlers),e.options.freeze()),Object.defineProperty(t,"defaults",{value:e,writable:!1,configurable:!1,enumerable:!0}),t},v_={options:new Qx,handlers:[],mutableDefaults:!1},w_=b_(v_),x_="[a-fA-F\\d:]",__=e=>e&&e.includeBoundaries?`(?:(?<=\\s|^)(?=${x_})|(?<=${x_})(?=\\s|$))`:"",E_="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",S_="[a-fA-F\\d]{1,4}",k_=`\n(?:\n(?:${S_}:){7}(?:${S_}|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8\n(?:${S_}:){6}(?:${E_}|:${S_}|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4\n(?:${S_}:){5}(?::${E_}|(?::${S_}){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4\n(?:${S_}:){4}(?:(?::${S_}){0,1}:${E_}|(?::${S_}){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4\n(?:${S_}:){3}(?:(?::${S_}){0,2}:${E_}|(?::${S_}){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4\n(?:${S_}:){2}(?:(?::${S_}){0,3}:${E_}|(?::${S_}){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4\n(?:${S_}:){1}(?:(?::${S_}){0,4}:${E_}|(?::${S_}){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4\n(?::(?:(?::${S_}){0,5}:${E_}|(?::${S_}){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4\n)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1\n`.replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),A_=new RegExp(`(?:^${E_}$)|(?:^${k_}$)`),T_=new RegExp(`^${E_}$`),M_=new RegExp(`^${k_}$`),R_=e=>e&&e.exact?A_:new RegExp(`(?:${__(e)}${E_}${__(e)})|(?:${__(e)}${k_}${__(e)})`,"g");R_.v4=e=>e&&e.exact?T_:new RegExp(`${__(e)}${E_}${__(e)}`,"g"),R_.v6=e=>e&&e.exact?M_:new RegExp(`${__(e)}${k_}${__(e)}`,"g");const{toString:O_}=Object.prototype;const I_={global:"g",ignoreCase:"i",multiline:"m",dotAll:"s",sticky:"y",unicode:"u"};function N_(e,t={}){if(n=e,"[object RegExp]"!==O_.call(n))throw new TypeError("Expected a RegExp instance");var n;const r=Object.keys(I_).map((n=>("boolean"==typeof t[n]?t[n]:e[n])?I_[n]:"")).join(""),i=new RegExp(t.source||e.source,r);return i.lastIndex="number"==typeof t.lastIndex?t.lastIndex:e.lastIndex,i}function P_(e,t,{timeout:n}={}){try{return function(e,{timeout:t}={}){const n=new le.Script("returnValue = function_()"),r=(...r)=>{const i={function_:()=>e(...r)};return n.runInNewContext(i,{timeout:t}),i.returnValue};return Object.defineProperty(r,"name",{value:`functionTimeout(${e.name||"<anonymous>"})`,configurable:!0}),r}((()=>N_(e).test(t)),{timeout:n})()}catch(e){if(function(e){return"ERR_SCRIPT_EXECUTION_TIMEOUT"===e?.code}(e))return!1;throw e}}const C_={timeout:400};function j_(e){return!(e.length>45)&&P_(R_.v6({exact:!0}),e,C_)}function L_(e){return!(e.length>15)&&P_(R_.v4({exact:!0}),e,C_)}class D_ extends Error{constructor(e){super("Could not get the public IP address",e),this.name="IpNotFoundError"}}const $_={timeout:5e3,onlyHttps:!1},U_=[{v4:{servers:["208.67.222.222","208.67.220.220","208.67.222.220","208.67.220.222"],name:"myip.opendns.com",type:"A"},v6:{servers:["2620:0:ccc::2","2620:0:ccd::2"],name:"myip.opendns.com",type:"AAAA"}},{v4:{servers:["216.239.32.10","216.239.34.10","216.239.36.10","216.239.38.10"],name:"o-o.myaddr.l.google.com",type:"TXT",transform:e=>e.replaceAll('"',"")},v6:{servers:["2001:4860:4802:32::a","2001:4860:4802:34::a","2001:4860:4802:36::a","2001:4860:4802:38::a"],name:"o-o.myaddr.l.google.com",type:"TXT",transform:e=>e.replaceAll('"',"")}}],B_={v4:{dnsServers:U_.map((({v4:{servers:e,...t}})=>({servers:e,question:t}))),httpsUrls:["https://icanhazip.com/","https://api.ipify.org/"]},v6:{dnsServers:U_.map((({v6:{servers:e,...t}})=>({servers:e,question:t}))),httpsUrls:["https://icanhazip.com/","https://api6.ipify.org/"]}},z_=(e,t)=>{const n=B_[e],r=Mb({retries:0,maxQueries:1,socket:D.createSocket("v6"===e?"udp6":"udp4"),timeout:t.timeout}),i=j(r.query.bind(r)),s=(async()=>{let t;for(const s of n.dnsServers){const{servers:n,question:a}=s;for(const s of n){if(r.destroyed)return;try{const{name:t,type:n,transform:o}=a,c=await i({questions:[{name:t,type:n}]},53,s),{answers:{0:{data:u}}}=c,l=("string"==typeof u?u:u.toString()).trim(),d=o?o(l):l;if(d&&("v6"===e?j_:L_)(d))return r.destroy(),d}catch(e){t=e}}}throw r.destroy(),new D_({cause:t})})();return s.cancel=()=>{r.destroy()},s},q_=(e,t)=>{let n;const r=(async()=>{try{const r={dnsLookupIpVersion:"v6"===e?6:4,retry:{limit:0},timeout:{request:t.timeout}},i=[...B_[e].httpsUrls,...t.fallbackUrls??[]];let s;for(const t of i)try{const i=w_.get(t,r);n=i.cancel;const s=await i,a=s.body?.trim();if(a&&("v6"===e?j_:L_)(a))return a}catch(e){if(s=e,e instanceof p_)throw e}throw new D_({cause:s})}catch(e){if(!(e instanceof p_))throw e}})();return r.cancel=function(){return n.apply(this)},r},H_=(e,t)=>{let n;const r=(async()=>{let r;const i=z_(e,t);n=i.cancel;try{r=await i}catch{const i=q_(e,t);n=i.cancel,r=await i}return r})();return r.cancel=n,r},F_=function(e,t){return function(n){const r=e(n),i=t(n),s=(async()=>{try{const e=await i;return r.catch((()=>{})),r.cancel(),e}catch(e){if(!(e instanceof D_))throw e;try{return await r}catch(t){throw new AggregateError([t,e])}}})();return s.cancel=()=>{r.cancel(),i.cancel()},s}}((function(e){if(e={...$_,...e},!e.onlyHttps)return H_("v4",e);if(e.onlyHttps)return q_("v4",e);return z_("v4",e)}),(function(e){if(e={...$_,...e},!e.onlyHttps)return H_("v6",e);if(e.onlyHttps)return q_("v6",e);return z_("v6",e)}));class Y_{static create(e,t,n,r){if(t===Ul.EVM)return new lE(e,n,r);throw new Error(`Unsupported blockchain: ${t}`)}}class V_{serviceLogger;env;pk;constructor(e,t,n){this.serviceLogger=e,this.env=t,this.pk=n}}var K_;function W_(e){switch(e){case K_.LOCAL:return{url:"http://127.0.0.1:8545",chainId:"31337",contractAddress:"0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0",taskRegistryAddress:"0xDc64a140Aa3E981100a9becA4E685f962f0cF6C9",authorizationAddress:"0x0165878A594ca255338adfa4d48449f69242Eb8F"};case K_.LOCAL_DOCKER:return{url:"http://hardhat-node:8545",chainId:"31337",contractAddress:"0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0",taskRegistryAddress:"0xDc64a140Aa3E981100a9becA4E685f962f0cF6C9",authorizationAddress:"0x0165878A594ca255338adfa4d48449f69242Eb8F"};case K_.TESTNET:return{url:process.env.RPC_URL||"https://api.avax-test.network/ext/bc/C/rpc",chainId:"43113",contractAddress:"0xB0Cd8d3430C14ecc08c4ccff713d5b21b472f88C",taskRegistryAddress:"0x26F9aD5E14518C4D4FD86EDA9753c28db5a85bEA",authorizationAddress:"0xdA5a5a58ee6fd52B3D0a60758695F7f0f2354F7a"};case K_.STAGING:return{url:process.env.RPC_URL||"https://api.avax-test.network/ext/bc/C/rpc",chainId:"43113",contractAddress:"0x84B5e1c533F3A4b24336a4cFFE546E09D56666Ce",taskRegistryAddress:"0x712c0E7122CBa5b0087DED2D7F1beAE9d24e5f5A",authorizationAddress:"0xc84f349C46e046ca6dbd7e653700DF728FA496E4"};case K_.EARLY_ACCESS:return{url:process.env.RPC_URL||"https://api.avax-test.network/ext/bc/C/rpc",chainId:"43113",contractAddress:"0x5F13b58a9737F0507c841F63417d27eEd066eaB1",taskRegistryAddress:"0x2DC64DC9AFa010fd702e5Ad721cd8864B77080df",authorizationAddress:"0xB2DE18FC7A3776f137dD590EaDD133793354882f"};case K_.PRODUCTION:return{url:process.env.RPC_URL||"https://api.avax.network/ext/bc/C/rpc",chainId:"43114",contractAddress:"0x91313C352BdB8f6527Eda20110a0EB5C77459c4A",taskRegistryAddress:"0xa23aB89E9b5F37a7dCCcCD5Ea7B9C0E5679d8E1e",authorizationAddress:"0x747E55Fc9531aFbEA7D5d1856ACF1B8136eEBCb1"};default:throw new Error(`Unsupported environment: ${e}`)}}!function(e){e.LOCAL="local",e.LOCAL_DOCKER="local-docker",e.TESTNET="testnet",e.STAGING="staging",e.EARLY_ACCESS="early-access",e.PRODUCTION="production"}(K_||(K_={}));var G_=[{inputs:[],name:"InvalidInitialization",type:"error"},{inputs:[],name:"NotInitializing",type:"error"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"OwnableInvalidOwner",type:"error"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"OwnableUnauthorizedAccount",type:"error"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"id",type:"address"}],name:"DeRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint64",name:"version",type:"uint64"}],name:"Initialized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"id",type:"address"},{indexed:!1,internalType:"uint256",name:"index",type:"uint256"}],name:"Registered",type:"event"},{inputs:[],name:"deRegister",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"id",type:"address"}],name:"deRegisterAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"deRegisterAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"index",type:"uint256"}],name:"getNodeAtIndex",outputs:[{components:[{internalType:"address",name:"nodeAddress",type:"address"},{internalType:"uint256",name:"blockNumber",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct NodeRegistry.Registration",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getNodeCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"node",type:"address"}],name:"getNodeIndexByAddress",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getNodes",outputs:[{components:[{internalType:"address",name:"nodeAddress",type:"address"},{internalType:"uint256",name:"blockNumber",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct NodeRegistry.Registration[]",name:"",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"nodeIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"registerNode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"registeredNodes",outputs:[{internalType:"address",name:"nodeAddress",type:"address"},{internalType:"uint256",name:"blockNumber",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"}];let J_={delay:250,maxTry:240,until:null};function Z_(e,t){const n=Object.assign(Object.assign({},Object.assign({},J_)),t);return Object.assign(Object.assign({},n),{currentTry:e,maxTry:n.maxTry||240,delay:X_(n.delay),until:n.until?n.until:()=>!0})}function X_(e){return void 0===e?()=>250:"function"==typeof e?e:()=>e}class Q_ extends Error{constructor(e=void 0){super("function did not complete within allowed number of attempts"),this.lastResult=e,this.tooManyTries=!0}getLastResult(){return this.lastResult}}function eE(e){return!0===e.tooManyTries}var tE=function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{c(r.next(e))}catch(e){s(e)}}function o(e){try{c(r.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}c((r=r.apply(e,t||[])).next())}))};function nE(e,t){return tE(this,void 0,void 0,(function*(){const n=Z_(1,t);return yield rE(e,n)}))}function rE(e,t){return tE(this,void 0,void 0,(function*(){const n=t.currentTry<t.maxTry;try{const r=yield e();if(t.until(r))return t.onSuccessFunc&&t.onSuccessFunc(r,t.currentTry),r;throw n?new Error("function result failed to meet until() requirements"):new Q_(r)}catch(r){if(!eE(r)&&n)return t.onError&&t.onError(r,t.currentTry),yield function(e,t,n){return tE(this,void 0,void 0,(function*(){const r=t.delay({currentTry:t.currentTry,maxTry:t.maxTry,lastDelay:t.lastDelay,lastResult:n});yield function(e=6e4){return new Promise((t=>setTimeout(t,e)))}(r);const i=Object.assign(Object.assign({},t),{currentTry:t.currentTry+1});return yield rE(e,i)}))}(e,t);throw t.onMaxRetryFunc&&t.onMaxRetryFunc(r,t.currentTry),r}}))}class iE{serviceLogger;provider;signer;contractAddress;nodeRegistryContract;constructor(e,t,n){this.serviceLogger=e;const r=W_(t);this.provider=n.provider,this.signer=n,this.contractAddress=r.contractAddress,this.nodeRegistryContract=new de.Contract(this.contractAddress,G_,this.signer)}async getChainId(){const{chainId:e}=await this.provider.getNetwork();return e.toString()}getRegistrationContractAddress(){return this.contractAddress}async registerNode(){await this.nodeRegistryContract.registerNode()}async getNodes(){return(await this.nodeRegistryContract.getNodes()).map((e=>({nodeAddress:e.nodeAddress,blockNumber:e.blockNumber,timestamp:e.timestamp})))}async getNodeCount(){return await this.nodeRegistryContract.getNodeCount()}async deRegister(){return await this.nodeRegistryContract.deRegister()}async deRegisterAddress(e){await this.nodeRegistryContract.deRegisterAddress(e)}async getNodeAtIndex(e){const t=await this.nodeRegistryContract.getNodeAtIndex(e);return{nodeAddress:t.nodeAddress,blockNumber:t.blockNumber,timestamp:t.timestamp}}async getNodeIndexByAddress(e){return await this.nodeRegistryContract.getNodeIndexByAddress(e)}async deRegisterAll(){await this.nodeRegistryContract.deRegisterAll()}async getBlockInfo(){const e=await this.provider.getBlock("latest");if(!e)throw"Couldn't get latest block information";if(!e.hash)throw"Couldn't get block hash";return{hash:e.hash,number:e.number,timestamp:e.timestamp}}async getBlockHash(){const e=await this.provider.getBlock("latest");return e?e.hash:null}async waitForBlocks(e){const t=(await nE((async()=>await this.provider.getBlock("latest")),{delay:2e3,maxTry:Number.MAX_SAFE_INTEGER,until:e=>null!=e})).number+e;await nE((async()=>await this.provider.getBlock("latest")),{delay:2e3,maxTry:Number.MAX_SAFE_INTEGER,until:e=>null!=e&&e.number>=t})}async sendSignedTransaction(e){if(!this.signer)throw"Private key wasn't provided";const t=await this.signer.sendTransaction({data:e}),n=await t.wait();if(n)return n.blockHash;throw new Error("Transaction receipt is null")}async signTransaction(e){if(!this.signer)throw"Private key wasn't provided";return await this.signer.signTransaction(e)}async estimateGas(e){try{return await this.provider.estimateGas(e)}catch(e){throw console.error("Error estimating gas:",e),e}}}var sE=[{inputs:[],name:"ECDSAInvalidSignature",type:"error"},{inputs:[{internalType:"uint256",name:"length",type:"uint256"}],name:"ECDSAInvalidSignatureLength",type:"error"},{inputs:[{internalType:"bytes32",name:"s",type:"bytes32"}],name:"ECDSAInvalidSignatureS",type:"error"},{inputs:[],name:"InvalidInitialization",type:"error"},{inputs:[],name:"NotInitializing",type:"error"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"OwnableInvalidOwner",type:"error"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"OwnableUnauthorizedAccount",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!1,internalType:"address",name:"grantee",type:"address"}],name:"AccessGranted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!1,internalType:"address",name:"grantee",type:"address"}],name:"AccessRevoked",type:"event"},{anonymous:!1,inputs:[],name:"EIP712DomainChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint64",name:"version",type:"uint64"}],name:"Initialized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"string",name:"namespace",type:"string"},{indexed:!1,internalType:"uint256",name:"nonce",type:"uint256"}],name:"MetaNamespaceRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"string",name:"namespace",type:"string"},{indexed:!1,internalType:"string",name:"taskName",type:"string"},{indexed:!1,internalType:"uint256",name:"nonce",type:"uint256"}],name:"MetaTaskRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!1,internalType:"address",name:"oldOwner",type:"address"},{indexed:!1,internalType:"address",name:"newOwner",type:"address"}],name:"NamespaceOwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!1,internalType:"address",name:"owner",type:"address"}],name:"NamespaceRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!0,internalType:"string",name:"taskName",type:"string"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"TaskDisabled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!0,internalType:"string",name:"taskName",type:"string"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"TaskEnabled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"string",name:"cid",type:"string"},{indexed:!1,internalType:"address",name:"sender",type:"address"}],name:"TaskIdRevoked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!0,internalType:"string",name:"taskName",type:"string"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"TaskRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!0,internalType:"string",name:"taskName",type:"string"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"},{indexed:!1,internalType:"string",name:"label",type:"string"}],name:"VersionLabelSet",type:"event"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{internalType:"uint256",name:"version",type:"uint256"}],name:"disableTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{internalType:"string",name:"label",type:"string"}],name:"disableTaskByLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"eip712Domain",outputs:[{internalType:"bytes1",name:"fields",type:"bytes1"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"version",type:"string"},{internalType:"uint256",name:"chainId",type:"uint256"},{internalType:"address",name:"verifyingContract",type:"address"},{internalType:"bytes32",name:"salt",type:"bytes32"},{internalType:"uint256[]",name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{internalType:"uint256",name:"version",type:"uint256"}],name:"enableTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"}],name:"getLatestActiveVersion",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"}],name:"getLatestVersion",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"}],name:"getTask",outputs:[{components:[{internalType:"string",name:"taskId",type:"string"},{internalType:"string",name:"meta",type:"string"},{internalType:"bool",name:"active",type:"bool"}],internalType:"struct TaskRegistry.Task",name:"",type:"tuple"},{internalType:"address",name:"",type:"address"},{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{internalType:"string",name:"label",type:"string"}],name:"getTaskByLabel",outputs:[{components:[{internalType:"string",name:"taskId",type:"string"},{internalType:"string",name:"meta",type:"string"},{internalType:"bool",name:"active",type:"bool"}],internalType:"struct TaskRegistry.Task",name:"",type:"tuple"},{internalType:"address",name:"",type:"address"},{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{internalType:"uint256",name:"version",type:"uint256"}],name:"getTaskByVersion",outputs:[{components:[{internalType:"string",name:"taskId",type:"string"},{internalType:"string",name:"meta",type:"string"},{internalType:"bool",name:"active",type:"bool"}],internalType:"struct TaskRegistry.Task",name:"",type:"tuple"},{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"address",name:"grantee",type:"address"}],name:"grantNamespaceAccess",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"input",type:"string"}],name:"isAsciiString",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"string",name:"taskId",type:"string"}],name:"isTaskRevoked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"str",type:"string"}],name:"isValidName",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"},{internalType:"string",name:"",type:"string"},{internalType:"string",name:"",type:"string"}],name:"labeledVersions",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"},{internalType:"string",name:"",type:"string"}],name:"latestVersion",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"},{internalType:"address",name:"",type:"address"}],name:"namespaceGrantees",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"}],name:"namespaceOwners",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{components:[{internalType:"string",name:"taskId",type:"string"},{internalType:"string",name:"meta",type:"string"},{internalType:"bool",name:"active",type:"bool"}],internalType:"struct TaskRegistry.Task",name:"task",type:"tuple"}],name:"registerTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"}],name:"registerTaskNamespace",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"string",name:"namespace",type:"string"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"registerTaskNamespaceWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{components:[{internalType:"string",name:"taskId",type:"string"},{internalType:"string",name:"meta",type:"string"},{internalType:"bool",name:"active",type:"bool"}],internalType:"struct TaskRegistry.Task",name:"task",type:"tuple"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"registerTaskWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"address",name:"grantee",type:"address"}],name:"revokeNamespaceAccess",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"taskId",type:"string"}],name:"revokeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"}],name:"revokedTaskId",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{internalType:"uint256",name:"version",type:"uint256"},{internalType:"string",name:"label",type:"string"}],name:"setTaskLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"},{internalType:"string",name:"",type:"string"},{internalType:"uint256",name:"",type:"uint256"}],name:"tasks",outputs:[{internalType:"string",name:"taskId",type:"string"},{internalType:"string",name:"meta",type:"string"},{internalType:"bool",name:"active",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"address",name:"newOwner",type:"address"}],name:"transferTaskNamespace",outputs:[],stateMutability:"nonpayable",type:"function"}];class aE{serviceLogger;provider;signer;taskRegistryAddress;taskRegistryContract;transactionSuccess=1;constructor(e,t,n){this.serviceLogger=e;const r=W_(t);this.provider=n.provider,this.signer=n,this.taskRegistryAddress=r.taskRegistryAddress,this.taskRegistryContract=new de.Contract(this.taskRegistryAddress,sE,this.signer)}getTaskRegistryContractAddress(){return this.taskRegistryAddress}async getEIP712Domain(){return{name:"TaskRegistry",version:"1",chainId:Number(await this.provider.getNetwork().then((e=>e.chainId))),verifyingContract:this.taskRegistryAddress}}async registerTaskNamespace(e){if((await(await this.taskRegistryContract.registerTaskNamespace(e)).wait()).status==this.transactionSuccess)return!0;throw new Error("Error registering task namespace")}async nonces(e){return await this.taskRegistryContract.nonces(e)}async getNamespaceOwner(e){return await this.taskRegistryContract.namespaceOwners(e)}async registerTaskNamespaceWithSignature(e){const t=await this.provider.getFeeData();let n=null;t.gasPrice&&(n=2n*t.gasPrice);const r=2n*await this.taskRegistryContract.registerTaskNamespaceWithSignature.estimateGas(e.user,e.namespace,e.deadline,e.signatureMeta,{gasPrice:n}),i=await nE((async()=>{const t=await this.taskRegistryContract.registerTaskNamespaceWithSignature(e.user,e.namespace,e.deadline,e.signatureMeta,{gasPrice:n,gasLimit:r});return await t.wait()}),{delay:1e3,maxTry:10,until:e=>!e.messages||!e.messages.includes("nonce too")&&!e.messages.includes("replacement transaction underpriced")||(this.serviceLogger&&this.serviceLogger.error(`${e.messages}`),this.signer instanceof de.NonceManager&&this.signer.reset(),!1)});if(i.status==this.transactionSuccess)return i;throw new Error("Error registering task namespace")}async transferTaskNamespace(e,t){if((await(await this.taskRegistryContract.transferTaskNamespace(e,t)).wait()).status==this.transactionSuccess)return!0;throw new Error("Error transferring task namespace")}async grantNamespaceAccess(e,t){if((await(await this.taskRegistryContract.grantNamespaceAccess(e,t)).wait()).status==this.transactionSuccess)return!0;throw new Error("Error granting task namespace")}async revokeNamespaceAccess(e,t){if((await(await this.taskRegistryContract.revokeNamespaceAccess(e,t)).wait()).status==this.transactionSuccess)return!0;throw new Error("Error revoking task namespace")}async setTaskLabel(e,t,n,r){if(r.length>128)throw new Error("Label exceeds maximum length of 128 chars");if((await(await this.taskRegistryContract.setTaskLabel(e,t,n,r)).wait()).status==this.transactionSuccess)return!0;throw new Error("Error setting task label")}async registerTask(e,t,n){if((await(await this.taskRegistryContract.registerTask(e,t,n)).wait()).status==this.transactionSuccess)return!0;throw new Error("Error registering task")}async registerTaskWithSignature(e){const t=await this.provider.getFeeData();let n=null;t.gasPrice&&(n=2n*t.gasPrice);const r=2n*await this.taskRegistryContract.registerTaskWithSignature.estimateGas(e.user,e.namespace,e.taskName,e.task,e.deadline,e.signatureMeta,{gasPrice:n}),i=await nE((async()=>{const t=await this.taskRegistryContract.registerTaskWithSignature(e.user,e.namespace,e.taskName,e.task,e.deadline,e.signatureMeta,{gasPrice:n,gasLimit:r});return await t.wait()}),{delay:1e3,maxTry:10,until:e=>!e.messages||!e.messages.includes("nonce too")&&!e.messages.includes("replacement transaction underpriced")||(this.serviceLogger&&this.serviceLogger.error(`${e.messages}`),this.signer instanceof de.NonceManager&&this.signer.reset(),!1)});if(i.status==this.transactionSuccess)return i;throw new Error("Error registering task")}async getTask(e,t){const n=await this.taskRegistryContract.getTask(e,t);return{namespace:e,taskId:n[0][0],version:Number(n[2]),meta:n[0][1],nameSpaceOwner:n[1]}}async getTaskByLabel(e,t,n){const r=await this.taskRegistryContract.getTaskByLabel(e,t,n);return{namespace:e,taskId:r[0][0],version:Number(r[2]),label:n,meta:r[0][1],nameSpaceOwner:r[1]}}async getTaskByVersion(e,t,n){const r=await this.taskRegistryContract.getTaskByVersion(e,t,n);return{namespace:e,taskId:r[0][0],version:Number(n),meta:r[0][1],nameSpaceOwner:r[1]}}async disableTask(e,t,n){if((await(await this.taskRegistryContract.disableTask(e,t,n)).wait()).status==this.transactionSuccess)return!0;throw new Error("Error disabling task")}async enableTask(e,t,n){if((await(await this.taskRegistryContract.enableTask(e,t,n)).wait()).status==this.transactionSuccess)return!0;throw new Error("Error enabling task")}async isTaskRevoked(e){return await this.taskRegistryContract.isTaskRevoked(e)}async getLatestVersion(e,t){const n=Number(await this.taskRegistryContract.getLatestVersion(e,t));if(0==n)throw`Task (${t}) not found in namespace (${e})`;return n}async getLatestActiveVersion(e,t){return Number(await this.taskRegistryContract.getLatestActiveVersion(e,t))}}var oE=[{inputs:[],name:"ECDSAInvalidSignature",type:"error"},{inputs:[{internalType:"uint256",name:"length",type:"uint256"}],name:"ECDSAInvalidSignatureLength",type:"error"},{inputs:[{internalType:"bytes32",name:"s",type:"bytes32"}],name:"ECDSAInvalidSignatureS",type:"error"},{inputs:[],name:"InvalidInitialization",type:"error"},{inputs:[],name:"NotInitializing",type:"error"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"OwnableInvalidOwner",type:"error"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"OwnableUnauthorizedAccount",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"Deregistered",type:"event"},{anonymous:!1,inputs:[],name:"EIP712DomainChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!0,internalType:"address",name:"grantee",type:"address"}],name:"Granted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint64",name:"version",type:"uint64"}],name:"Initialized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"Registered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!0,internalType:"address",name:"grantee",type:"address"}],name:"Revoked",type:"event"},{inputs:[{internalType:"string",name:"apiKeyHash",type:"string"}],name:"deregister",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"string",name:"apiKeyHash",type:"string"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"deregisterWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"eip712Domain",outputs:[{internalType:"bytes1",name:"fields",type:"bytes1"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"version",type:"string"},{internalType:"uint256",name:"chainId",type:"uint256"},{internalType:"address",name:"verifyingContract",type:"address"},{internalType:"bytes32",name:"salt",type:"bytes32"},{internalType:"uint256[]",name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"apiKeyHash",type:"string"}],name:"getPayer",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"address",name:"grantee",type:"address"}],name:"grant",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"string",name:"namespace",type:"string"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"grantWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_taskRegistry",type:"address"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"address",name:"grantee",type:"address"}],name:"isAuthorized",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"apiKeyHash",type:"string"}],name:"register",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"string",name:"apiKeyHash",type:"string"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"registerWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"address",name:"grantee",type:"address"}],name:"revoke",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"string",name:"namespace",type:"string"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"revokeWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_taskRegistry",type:"address"}],name:"setTaskRegistry",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"taskRegistry",outputs:[{internalType:"contract ITaskRegistry",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"}];class cE{serviceLogger;provider;signer;authorizationAddress;authorizationContract;transactionSuccess=1;constructor(e,t,n){this.serviceLogger=e;const r=W_(t);this.provider=n.provider,this.signer=n,this.authorizationAddress=r.authorizationAddress,this.authorizationContract=new de.Contract(this.authorizationAddress,oE,this.signer)}getAuthorizationContractAddress(){return this.authorizationAddress}async getEIP712Domain(){return{name:"Authorization",version:"1",chainId:Number(await this.provider.getNetwork().then((e=>e.chainId))),verifyingContract:this.authorizationAddress}}async nonces(e){return await this.authorizationContract.nonces(e)}async grantAuthorization(e,t){if((await(await this.authorizationContract.grant(e,t)).wait()).status==this.transactionSuccess)return!0;throw new Error("Error granting authorization")}async grantAuthorizationWithSignature(e){const t=await this.provider.getFeeData();let n=null;t.gasPrice&&(n=2n*t.gasPrice);if((await nE((async()=>{const t=await this.authorizationContract.grantWithSignature(e.user,e.namespace,e.deadline,e.signatureMeta,{gasPrice:n});return await t.wait()}),{delay:1e3,maxTry:10,until:e=>!e.messages||!e.messages.includes("Nonce too")&&!e.messages.includes("replacement transaction underpriced")||(this.serviceLogger&&this.serviceLogger.error(`${e.messages}`),this.signer instanceof de.NonceManager&&this.signer.reset(),!1)})).status==this.transactionSuccess)return!0;throw new Error("Error granting authorization with signature")}async revokeAuthorization(e,t){if((await(await this.authorizationContract.revoke(e,t)).wait()).status==this.transactionSuccess)return!0;throw new Error("Error revoking authorization")}async revokeAuthorizationWithSignature(e){if((await nE((async()=>{const t=await this.authorizationContract.revokeWithSignature(e.user,e.namespace,e.deadline,e.signatureMeta);return await t.wait()}),{delay:1e3,maxTry:10,until:e=>!e.messages||!e.messages.includes("Nonce too")&&!e.messages.includes("replacement transaction underpriced")||(this.serviceLogger&&this.serviceLogger.error(`${e.messages}`),this.signer instanceof de.NonceManager&&this.signer.reset(),!1)})).status==this.transactionSuccess)return!0;throw new Error("Error revoking authorization with signature")}async registerAuthorization(e){if((await(await this.authorizationContract.register(e)).wait()).status==this.transactionSuccess)return!0;throw new Error("Error registering authorization")}async registerAuthorizationWithSignature(e){const t=await this.provider.getFeeData();let n=null;t.gasPrice&&(n=2n*t.gasPrice);const r=2n*await this.authorizationContract.registerWithSignature.estimateGas(e.user,e.apiKeyHash,e.deadline,e.signatureMeta,{gasPrice:n}),i=await nE((async()=>{const t=await this.authorizationContract.registerWithSignature(e.user,e.apiKeyHash,e.deadline,e.signatureMeta,{gasPrice:n,gasLimit:r});return await t.wait()}),{delay:1e3,maxTry:10,until:e=>!e.messages||!e.messages.includes("Nonce too")&&!e.messages.includes("replacement transaction underpriced")||(this.serviceLogger&&this.serviceLogger.error(`${e.messages}`),this.signer instanceof de.NonceManager&&this.signer.reset(),!1)});if(i.status==this.transactionSuccess)return i;throw new Error("Error registering authorization with signature")}async deRegisterAuthorization(e){if((await(await this.authorizationContract.deregister(e)).wait()).status==this.transactionSuccess)return!0;throw new Error("Error deregistering authorization")}async deRegisterAuthorizationWithSignature(e){if((await nE((async()=>{const t=await this.authorizationContract.deregisterWithSignature(e.user,e.apiKeyHash,e.deadline,e.signatureMeta);return await t.wait()}),{delay:1e3,maxTry:10,until:e=>!e.messages||!e.messages.includes("Nonce too")&&!e.messages.includes("replacement transaction underpriced")||(this.serviceLogger&&this.serviceLogger.error(`${e.messages}`),this.signer instanceof de.NonceManager&&this.signer.reset(),!1)})).status==this.transactionSuccess)return!0;throw new Error("Error deregistering authorization with signature")}async isAuthorized(e,t){return await this.authorizationContract.isAuthorized(e,t)}async getPayerAddress(e){return await this.authorizationContract.getPayer(e)}}class uE{provider;signer;constructor(e,t){this.provider=t.provider,this.signer=t}async signMeta(e,t,n){if(!function(e){return e&&"string"==typeof e.name&&"string"==typeof e.version&&"number"==typeof e.chainId&&"string"==typeof e.verifyingContract}(e))throw new Error("Invalid EIP712Domain");return await this.signer.signTypedData(e,t,n)}async getCurrentNonce(){return await this.signer.getNonce()}async reSyncNonceManager(){this.signer instanceof de.NonceManager&&this.signer.reset()}}class lE extends V_{nodeRegistry;taskRegistry;authorization;utils;signer;constructor(e,t,n){if(super(e,t,n),void 0===n)throw new Error("Private key wasn't provided");const r=W_(t),i=new de.Network(t,r.chainId),s=new de.JsonRpcProvider(`${r.url}`,i,{staticNetwork:i}),a=new de.Wallet(n,s);this.signer=new de.NonceManager(a),this.nodeRegistry=new iE(this.serviceLogger,t,this.signer),this.taskRegistry=new aE(this.serviceLogger,t,this.signer),this.authorization=new cE(this.serviceLogger,t,this.signer),this.utils=new uE(t,this.signer)}}const dE=e=>{throw A.isAxiosError(e)?e.response?e.response.data.message.includes("Entitlement Validation Error")?nb.USER_NO_REGISTERED:`${e.response.data.message||e.response.data}`:e.request?`Server is not responding: ${e.message}\n${e.config?.method} - ${e.config?.url}`:e.message:e.message};function pE(e,t){if(e!==e.toLowerCase())throw new Error(`${t} must be lowercase.`)}function fE(e){return Y_.create(null,Ul.EVM,e,eb("privateKey"))}function hE(e){if(!de.isAddress(e)||42!==e.length||!e.startsWith("0x"))throw new Error("Must be a valid ethereum address. (ENS not supported yet)")}async function mE(){try{return await F_({onlyHttps:!0})}catch{return"unknown"}}function gE(e){const t=Zy(),n=null!==t;let r=0;switch(r=n&&(!n||t.privateKey&&t.address)?2:1,r){case 1:console.error(nb.USER_NO_REGISTERED),process.exit(1);break;case 2:e=Zh.createSignedBody(e,t.privateKey,t.address)}return e}const yE=async(e,n)=>{const r=`./tmp.${k()}`;try{t.mkdirSync(r);const a=i.join(process.cwd(),n);if(!t.existsSync(a))throw"Task path doesn't exist";if(e===ao.C||e===ao.RUST||e===ao.JS||e===ao.PYTHON){const e="config.json",n=i.join(a,e);if(!t.existsSync(n)){const e={run:{limits:{call:"65536",frame:"524288",gas:"1099511627776",memory:"2048"}}};t.writeFileSync(n,JSON.stringify(e))}t.copyFileSync(n,i.join(r,e));const s="fs.tar",o=i.join(a,s);t.existsSync(o)&&t.copyFileSync(o,i.join(r,s))}const o=im.createBuild(e);await o.build(n,r);const c=await async function(e,n){if(!t.existsSync(e))throw"Invalid source code path";const r=t.readdirSync(e);if(0===r.length)throw"No files found in directory";const i=new Fy;for(const n of r){const r=e+`/${n}`,a=t.readFileSync(r),o=s.basename(r);i.append("files",a,o)}i.append("lang",n);const a={files:r,lang:n},o=gE(a),c=await ib();return i.append("walletAddress",o.walletAddress),i.append("signature",JSON.stringify(o.signature)),i.append("fmpayload",JSON.stringify(a)),(await c.post("api/filesystem/pushLocal",i,{headers:{...i.getHeaders()}}).catch((e=>{dE(e)}))).data}(r,e);return t.rmSync(r,{recursive:!0}),c}catch(e){throw t.rmSync(r,{recursive:!0}),e}},{parse:bE,stringify:vE}=JSON,wE=String,xE=(e,t)=>t,_E=(e,t,n)=>{const r=wE(t.push(n)-1);return e.set(n,r),r},EE=(e,t,n)=>{const r=xE,i=new Map,s=[],a=[];let o=+_E(i,s,r.call({"":e},"",e)),c=!o;for(;o<s.length;)c=!0,a[o]=vE(s[o++],u,n);return"["+a.join(",")+"]";function u(e,t){if(c)return c=!c,t;const n=r.call(this,e,t);switch(typeof n){case"object":if(null===n)return n;case"string":return i.get(n)||_E(i,s,n)}return n}},SE=e=>bE(EE(e));async function kE(e,t,n,r,i){const s=n.body,a=n.method.toLowerCase();let o,c={},u=0,l=0;o=["post","put","patch"].includes(a)?e+t.path:`${e}${function(e,t){if(t)for(const n in t){const r=t[n];e=e.replace(new RegExp(`{${n}}`,"g"),r)}return e}(t.path,t.params||{})}`;const d=A.create({headers:{Connection:"keep-alive"},httpsAgent:new w.Agent({keepAlive:!0}).on("keylog",((e,t)=>{const n=t.getSession(),r=Buffer.from(n).toString("hex").toUpperCase();c={tlsCert:SE(t.getPeerCertificate(!0)),localCertificate:SE(t.getCertificate()),ephemeral:t.getEphemeralKeyInfo(),cipher:t.getCipher(),session:r,ticket:t.getTLSTicket(),localAddress:t.localAddress,sharedSigAlgs:t.getSharedSigalgs(),remoteAddress:t.remoteAddress,protocol:t.getProtocol()}})),maxContentLength:1/0,maxBodyLength:1/0});d.interceptors.request.use((e=>{const t=e.data?JSON.stringify(e.data):"";return u=(e.url?.length||0)+(t.length||0)+JSON.stringify(e.headers).length,e})),d.interceptors.response.use((e=>(l=JSON.stringify(e.data).length+JSON.stringify(e.headers).length,e)));try{let e;switch(a){case"get":e=await d.get(o,{headers:r,timeout:i});break;case"patch":e=await d.patch(o,s,{headers:r,timeout:i});break;case"post":e=await d.post(o,s,{headers:r,timeout:i});break;case"put":e=await d.put(o,s,{headers:r,timeout:i});break;case"delete":e=await d.delete(o,{headers:r,timeout:i});break;default:throw new Error("Unsupported HTTP method")}return[e.data,JSON.stringify(c),bu.SUCCEED,u,l]}catch(e){let t,n;return n=e.response&&e.response.data?JSON.stringify(e.response.data):e.message,t=A.isAxiosError(e)&&e.response||{data:n,status:500,statusText:"",headers:{},config:{headers:{}}},[t.data,JSON.stringify(c),bu.FAILED,u,l]}}function AE(e,t){const n=t.method;if(["POST","PUT","PATCH"].includes(n)){return{host:e,path:t.path,method:n,body:t.body,headers:{}}}if("GET"===n||"DELETE"===n){const r=t.path,i=t.params;return{host:e,path:r.replace(/{(\w+)}/g,((e,t)=>i?.[t]??"")),method:n,headers:{}}}throw console.error("Unsupported method:",n),new Error("Api_Adapter create request error format")}async function TE(e,t){try{const n=await N(e),r=function(e){const t=e.servers;if(t&&t.length>0){const e=t[0];let n=e.url;return e.variables&&Object.keys(e.variables).forEach((t=>{const r=e.variables[t],i=r.default||r.enum&&r.enum[0];if(void 0===i)throw new Error(`No default value found for variable ${t}`);n=n.replace(`{${t}}`,i)})),n}throw new Error("No servers defined in OpenAPI document")}(n),i=AE(r,t),[s,a]=n.request(i);return a?["",a,bu.FAILED]:[r,"",bu.SUCCEED]}catch(e){return console.log(e),["",e,bu.FAILED]}}class ME{tokens=[];authInputs;parse(e,t){const n=this.parseKeyValuePairs(t);if(0==e.length)return void(this.authInputs=n);const r=Object.keys(n);if(!e.every((e=>r.includes(e))))throw new Error(`Invalid authString: ${e} are required`);{const t={};for(const r of e)t[r]=n[r];this.authInputs=t}}parseKeyValuePairs(e){try{const t=e.split(","),n={};for(const e of t){const[t,r]=e.split(":");n[t.trim()]=r.trim()}return n}catch{throw new Error("Invalid auth string")}}}class RE extends ME{tokens=["accessKey","secretKey"];constructor(e){super(),this.parse(this.tokens,e)}authHeaders(e){return fe.sign(e,{accessKeyId:this.authInputs.accessKey,secretAccessKey:this.authInputs.secretKey}).headers||{}}}class OE extends ME{tokens=["username","password"];constructor(e){super(),this.parse(this.tokens,e)}authHeaders(e){return{Authorization:`Basic ${btoa(`${this.authInputs.username}:${this.authInputs.password}`)}`}}}class IE extends ME{tokens=[];constructor(e){super(),this.parse([],e)}authHeaders(e){return{...this.authInputs}}}var NE;!function(e){e.AWS_SIGNATURE="aws-signature",e.BASIC_AUTH="basic-auth",e.CUSTOM_HEADER="custom-header"}(NE||(NE={}));const PE=(e,t)=>{switch(e){case NE.AWS_SIGNATURE:return new RE(t);case NE.BASIC_AUTH:return new OE(t);case NE.CUSTOM_HEADER:return new IE(t);default:throw new Error(`Invalid authentication method specified. Should be one of <${Object.values(NE)}>`)}},CE=async(e,n,r,i)=>{let s="";const a=t.readFileSync(n,"utf8"),o=JSON.parse(a).input,c=JSON.parse(a).executionTimeout,[u,l,d]=await async function(e){try{const t=JSON.parse(e);return[{path:t.path.toString(),method:t.method.toString(),body:t.body,params:t.params,headers:{}},"",bu.SUCCEED]}catch(e){return console.error("Invalid JSON format:",e),[null,"Api_Adapter create request input format",bu.FAILED]}}(JSON.stringify(o));if(s+=`${C.cyanBright("\nInput request :\n")}`,s+=JSON.stringify(u,null,2)+"\n",null===u)throw s+=`Invalid message input - ${C.red("FAIL")} \n`,new Error(`Invalid message input ${l}`);const[p,f,h]=await TE(e,u);let m,g,y;s+=`${C.cyanBright("\nBase URL = ")}${p} \n`;let b={};if(h!=bu.SUCCEED)throw console.info(`Axios call - ${C.red("ERROR")} `),console.log(s),new Error(`Invalid message input ${f}`);{s+=`${C.cyanBright("OpenAPI manifest check -")} ${C.green("OK")} \n`;const e=AE(p,u),t=new URL(p),n={host:t.host,path:t.pathname+u.path,method:u.method.toUpperCase(),headers:{"Content-Type":"application/json; charset=utf-8"},body:JSON.stringify(u.body)||""};if(r&&(b=((e,t,n)=>PE(e,t).authHeaders(n))(r,i,n)),[m,g,y]=await kE(p,u,e,b,c),null===y)throw s+=`${C.cyanBright("OpenAPI manifest check -")} ${C.red("FAIL")} \n`,new Error(` Error in Axios ${m}`);s+=`${C.cyanBright("\nAPI Task response")}\n`,s+=C.green(JSON.stringify(m,null,2)),console.log(`API Task executed with status - ${C.green("OK")} `),console.log(s)}};he.config({path:process.cwd()+"/truebit.verify.env"});const jE=e=>{const t=e.split("/");if(2!=t.length)return!1;const n=t[0].split("_");return r=n[n.length-1],!(!/^[a-f0-9]{64}$/gi.test(r)||!(e=>/^\d+\.\d+\.\d+$/.test(e))(t[1]));var r};function LE(e){if(!/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/.test(e))throw new Error("Invalid API key format")}async function DE(e,t,n=null,r=eb("blockchainEnv")){let i;pE(e,"Namespace");const s=fE(r),a=eb("address");if(!a)throw`Please provide an address property in '${Qy()}/.truebit/secret.json'`;return i=n?await s.taskRegistry.registerTaskNamespace(e):await async function(e,t,n,r){const i=await n.taskRegistry.getEIP712Domain(),s={RegisterTaskNamespaceMeta:[{name:"user",type:"address"},{name:"namespace",type:"string"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"}]},a=BigInt(await n.taskRegistry.nonces(e)),o={user:de.getAddress(e),namespace:t,nonce:a,deadline:Math.floor(Date.now()/1e3)+3600};let c=await n.utils.signMeta(i,s,o);Date.now()/1e3>=o.deadline&&(o.deadline=Math.floor(Date.now()/1e3)+7200,c=await n.utils.signMeta(i,s,o));const u=await async function(e,t,n,r,i,s){const a={user:e,namespace:t,nonce:BigInt(n),deadline:r,signatureMeta:i};try{const e=await rb(),t={...a};return t.nonce=String(a.nonce),await e.post("user/relayer/namespace",t,{params:{fromSetup:s}})}catch(e){throw A.isAxiosError(e)?e.response?new Error(`The server responding with an error - ${e.response.status+" - "+e.response.statusText+" - "+e.response.data.message}.`):e.request?new Error(`The server is not responding - ${e.message}.`):new Error(`There was an error in the communication with the server - ${e.message}.`):"string"==typeof e?new Error(`There was an error in the communication with the server -> ${e}`):new Error("There was an error in the communication with the server.")}}(e,t,o.nonce,o.deadline,c,r);return 201==u.status}(a,e,s,t),i}async function $E(e,t,n,r,i){const s=await i.taskRegistry.getEIP712Domain(),a={Task:[{name:"taskId",type:"string"},{name:"meta",type:"string"},{name:"active",type:"bool"}],RegisterTaskMeta:[{name:"user",type:"address"},{name:"namespace",type:"string"},{name:"taskName",type:"string"},{name:"task",type:"Task"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"}]},o={user:e,namespace:t,taskName:n,task:{taskId:r.taskId,meta:r.meta,active:r.active},nonce:BigInt(await i.taskRegistry.nonces(e)),deadline:Math.floor(Date.now()/1e3)+3600};let c=await i.utils.signMeta(s,a,o);Date.now()/1e3>=o.deadline&&(o.deadline=Math.floor(Date.now()/1e3)+7200,c=await i.utils.signMeta(s,a,o));const u=await async function(e,t,n,r,i,s,a){const o={user:e,namespace:t,taskName:n,task:r,nonce:BigInt(i),deadline:s,signatureMeta:a};try{const e=await rb(),t={...o};return t.nonce=String(o.nonce),await e.post("user/relayer/task",t)}catch(e){throw A.isAxiosError(e)?e.response?new Error(`The server responding with an error - ${e.response.status+" - "+e.response.statusText+" - "+e.response.data.message}.`):e.request?new Error(`The server is not responding - ${e.message}.`):new Error(`There was an error in the communication with the server - ${e.message}.`):"string"==typeof e?new Error(`There was an error in the communication with the server -> ${e}`):new Error("There was an error in the communication with the server.")}}(e,t,n,r,o.nonce,o.deadline,c);return 201==u.status}async function UE(e,t,n,r,i){if(!jE(n))throw new Error("Invalid taskId");if(r)try{r=JSON.stringify(r)}catch{throw new Error("Meta information cannot be serialized as JSON")}let s=null;try{await async function(e){const t=await ib();return await t.post("api/filesystem/push",gE({taskId:e})).catch(dE)}(n);const a={taskId:n,meta:r||"",active:!0};await async function(e,t,n,r=null){const i=fE(eb("blockchainEnv"));let s=!1;try{if(r)s=await i.taskRegistry.registerTask(t,n,e);else{const r=eb("address");if(!r)throw Error(`Please provide an address property in '${Qy()}/.truebit/secret.json'`);s=await $E(r,t,n,e,i)}}catch(e){const t=e.message,n=t.match(/execution reverted: "(.*?)" /)?.[1];throw n?new Error(`Trying to register a task -> ${n}`):new Error(`Trying to register a task -> ${t}`)}return s}(a,e,t,i),s=await async function(e,t){const n=fE(eb("blockchainEnv"));return await n.taskRegistry.getLatestVersion(e,t)}(e,t)}catch(e){if(e instanceof Error)throw e;if("string"==typeof e)throw new Error(e)}return s}function BE(e,n){if(console.log(`Task executed with status: ${n.status}`),n.output)if(console.log(`Task executed with result: ${n.output.result}`),n.output.metering){console.log("Task resource usage:");const r=n.output.metering,s=(e,t)=>{if(0==t)return"N/A";const n=e/t;return n<1?"Short":Number(n.toFixed(0))},a={Gas:{Unit:"Steps",Limits:r.limits.gas,Peak:"N/A","Last status":r.last.steps,Capacity:s(r.limits.gas,r.last.steps)},"Nested calls":{Unit:"Calls",Limits:r.limits.call,Peak:r.peak.call,"Last status":r.last.call,Capacity:s(r.limits.call,r.peak.call)},"Frame memory":{Unit:"Bytes",Limits:r.limits.frame,Peak:r.peak.frame,"Last status":r.last.frame,Capacity:s(r.limits.frame,r.peak.frame)},"System memory":{Unit:"64 Kb pages",Limits:r.limits.memory,Peak:r.peak.memory,"Last status":"𝚫 "+r.last.memoryGrowDelta,Capacity:s(r.limits.memory,r.peak.memory)}};if(console.table(a),e.updateConfig){const e=i.join(process.cwd(),"config.json");try{const n=t.readFileSync(e),i=JSON.parse(n.toString());i.run.limits.gas=String(r.last.steps),i.run.limits.call=String(r.peak.call),i.run.limits.frame=String(r.peak.frame),i.run.limits.memory=String(r.limits.memory),t.writeFileSync(e,JSON.stringify(i)),console.log("Task limits updated with last/peak values (--update-config)")}catch(t){console.log(`Error updating config file at '${e}': '${t}', (--update-config)`)}}}else console.log("No task resource usage reported.")}async function zE(){const e=Zy(),t=null!==e,n=me.createInterface({input:process.stdin,output:process.stdout});let r=0;if(t&&e.privateKey&&e.address)r=1;else if(t){console.log(nb.SETUP_STEP1);switch((await(i="Press [Y] to proceed or [N] to skip: ",new Promise((e=>n.question(i,e))))).trim().toUpperCase()){case"Y":r=2;break;case"N":r=3;break;default:return console.log("Invalid input. Please enter Y or N."),void n.close()}}var i;switch(r){case 1:tb(),console.log(nb.SETUP_STEP1_SCENARIO1_P1);break;case 2:{tb();const e=de.Wallet.createRandom(),t=e.privateKey,n=e.address;Xy({privateKey:t,address:n}),console.log("\nSetting up your new wallet..."),console.log(nb.SETUP_STEP1_SCENARIO2(n));break}case 3:tb(),console.log(nb.SETUP_STEP1_SCENARIO3),process.exit(1);break;default:console.log("An unexpected error occurred.")}n.close()}async function qE(e,t,n,r,i,s,a){console.log("Deploying the API Authentication Credentials");try{if(!function(e){try{new pe(e)}catch{return!1}return!0}(s))throw"Invalid private key provided";if(!de.isAddress(a))throw"Invalid address provided";if(PE(r,i),!jE(e))throw"Invalid taskId";const o=await ib();await o.post("api/api-credentials",gE({taskId:e,namespace:t,taskName:n,authString:i,method:r})).catch(dE),console.log("The credentials were deployed "+C.green("Successfully"))}catch(e){throw`There was an Error deploying credentials:\nCouldn't push api credentials to remote server: ${e}`}}async function HE(e,t,n=eb("blockchainEnv"),r=eb("address")){LE(e);const i=fE(n),s=await i.authorization.getEIP712Domain(),a=await i.authorization.nonces(r),o=Math.floor(Date.now()/1e3)+3600,c=de.keccak256(de.toUtf8Bytes(e)),u={user:r,apiKeyHash:c,nonce:Number(a),deadline:o},l=await i.utils.signMeta(s,{RegisterMeta:[{name:"user",type:"address"},{name:"apiKeyHash",type:"string"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"}]},u),d=await async function(e,t,n,r,i){const s={user:e,apiKeyHash:t,deadline:n,signatureMeta:r};try{const e=await rb();return await e.post("user/relayer/auth",s,{params:{fromSetup:i}})}catch(e){throw A.isAxiosError(e)?e.response?new Error(`The server responding with an error - ${e.response.status+" - "+e.response.statusText+" - "+e.response.data.message}.`):e.request?new Error(`The server is not responding - ${e.message}.`):new Error(`There was an error in the communication with the server - ${e.message}.`):"string"==typeof e?new Error(`There was an error in the communication with the server -> ${e}`):new Error("There was an error in the communication with the server.")}}(r,c,o,l,t);return 201==d.status?c:null}const FE="0x0000000000000000000000000000000000000000";async function YE(e){let t=!0;if(""===e)t=!1,console.log("An email address is required. Please provide your email address to proceed.");else{new RegExp(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/).test(e)?await async function(e){const t=await rb();try{return!0===(await t.get(`userexistence/${e}`)).data}catch(e){if(A.isAxiosError(e)&&404===e.response?.status&&"string"==typeof e.response?.data?.message&&e.response.data.message.includes("User not found"))return!1;throw e}}(e)&&(t=!1,console.log("The provided email address is already in use. Please enter a different email address.")):(t=!1,console.log("The email address provided is not valid. Please try again."))}return t}function VE(e){return"Y"===e||"N"===e}async function KE(){const e=await async function(){const e=fE(eb("blockchainEnv"));let t="";try{await nE((async()=>{t=k();const n=de.keccak256(de.toUtf8Bytes(t));return await e.authorization.getPayerAddress(n)===FE}),{delay:500,maxTry:5,until:e=>!0===e})}catch(e){throw eE(e)?Error("Attempts to generate unique Api Key for the user exhausted."):e}return t}();try{if(!await HE(e,!0))throw Error("The API key could not been registered.")}catch(e){const t=e.message;if(t)throw Error(`There was an error registering the API key -> ${t}`)}return e}async function WE(){const e=await async function(){const e=fE(eb("blockchainEnv"));let t="";try{await nE((async()=>{t=S(4).toString("hex");return await e.taskRegistry.getNamespaceOwner(t)===FE}),{delay:500,maxTry:5,until:e=>!0===e})}catch(e){throw eE(e)?Error("Attempts to generate unique namespace for the user exhausted."):e}return t}();try{if(!await DE(e,!0))throw Error("The namespace could not been registered.")}catch(e){const t=e.message,n=t?t.match(/execution reverted: "(.*?)" /)?.[1]:null;if(n)throw Error(`There was an error registering the namespace -> ${n}`);if(t)throw Error(`There was an error registering the namespace -> ${t}`)}return e}async function GE(e,t){try{const n={message:"I am a Truebit User"};if(!t)throw Error("Secret.json does not exists");const r=t.privateKey,i=t.address,s=Zh.createSignedBody(n,r,i),a=await rb();return(await a.get(`user/${e}`,{headers:{"truebit-auth":JSON.stringify(s)}})).data}catch(e){if(A.isAxiosError(e)&&401===e.response?.status&&e.response?.data.message.includes("Entitlement Validation Error"))return null;if(A.isAxiosError(e)&&404==e.response?.status&&e.response?.data.message&&e.response?.data.message.includes("User not found"))return null;throw A.isAxiosError(e)?e.response?Error(`The server responding with an error -> ${e.response.data.message||e.response.status+" - "+e.response.statusText}`):e.request?Error(`The server is not responding -> ${e.message}`):Error(`There was an error in the communication with the server -> ${e.message}`):"string"==typeof e?Error(`There was an error in the communication with the server -> ${e}`):Error("There was an error in the communication with the server.")}}async function JE(){const e=Zy(),t=null!==e;let n,r=0;const i=be({input:process.stdin,output:process.stdout,terminal:!0});switch(t&&(!function(e){return!de.isAddress(e)||42!==e.length||!e.startsWith("0x")}(e.address)?(n=await GE(e.address,e),r=n?2:3):r=1),r){case 1:console.log("The wallet set in the configuration must be a valid ethereum address. (ENS not supported yet)");break;case 2:console.log(nb.SETUP_STEP1_SCENARIO1_P2(n));break;case 3:{console.log(nb.SETUP_STEP2_SCENARIO3_P1),console.log();const t={confirmRegistration:"",fullNameAnswer:"",emailAddressAnswer:"",companyNameAnswer:"",jobPositionAnswer:"",eulaAnswer:""};for(;"Y"!=t.confirmRegistration;){for(t.fullNameAnswer=(await i.question(C.bold(" 1. Full Name: "))).trim();""===t.fullNameAnswer;)console.log("Your full name is required. Please provide your first and last name to proceed."),t.fullNameAnswer=(await i.question(C.bold(" 1. Full Name: "))).trim();for(t.emailAddressAnswer=(await i.question(C.bold(" 2. Email Address: "))).trim();!await YE(t.emailAddressAnswer);)t.emailAddressAnswer=(await i.question(C.bold(" 2. Email Address: "))).trim();for(t.companyNameAnswer=(await i.question(C.bold(" 3. Company Name: "))).trim(),t.jobPositionAnswer=(await i.question(C.bold(" 4. Job Position: "))).trim();!VE(t.eulaAnswer);)t.eulaAnswer=(await i.question(C.bold(` 5. Accept EULA? [Y|N] (${nb.EULA_TERMS_LINK}): `))).toUpperCase();if("N"==t.eulaAnswer){console.log(nb.EULA_REGISTRATION_NO_ACCEPTED);break}for(;!VE(t.confirmRegistration);)console.log("\nIs the information provided above correct?"),t.confirmRegistration=(await i.question(C.bold("Press [Y] to confirm or [N] to edit: "))).toUpperCase();"N"==t.confirmRegistration&&(console.log("\nPlease provide the following information:"),(s=t).fullNameAnswer="",s.emailAddressAnswer="",s.companyNameAnswer="",s.jobPositionAnswer="",s.eulaAnswer="",s.confirmRegistration="")}if("N"==t.eulaAnswer)break;console.log(),console.log("By completing registration, you'll be automatically subscribed to our newsletter."),console.log("To opt-out, please follow the steps described in our documentation portal."),console.log();const n=ge({text:C.bold("... registering your account."),stream:process.stdout}).start();try{const r=await WE(),i=await KE(),s={name:t.fullNameAnswer,email:t.emailAddressAnswer,walletAddress:e?.address,company:t.companyNameAnswer,jobDescription:t.jobPositionAnswer,EULA:Zh.createSignedBody({ip:await mE(),date:(new Date).toISOString()},e.privateKey),defaultNamespace:r,defaultApiKey:i};await async function(e){try{const t=await rb();return await t.post("user/register",e)}catch(e){throw A.isAxiosError(e)?e.response?Error(`The server responding with an error -> ${e.response.data.message||e.response.status+" - "+e.response.statusText}`):e.request?Error(`The server is not responding -> ${e.message}`):Error(`There was an error in the communication with the server -> ${e.message}`):"string"==typeof e?Error(`There was an error in the communication with the server -> ${e}`):Error("There was an error in the communication with the server.")}}(s),n.stop(),console.log(nb.SETUP_STEP2_SCENARIO3_P2(t,e.address,r,i))}catch(e){n.stop();const t=e.message,r=t?t.match(/CreateUserValidation - (.*?.*)/)?.[1]:null;if(r)throw Error(r);if(t.includes("Sender doesn't have enough funds to send tx"))throw Error("We are currently experiencing technical difficulties. Please try again later.");console.error(nb.SETUP_STEP2_UNHANDLED_ERROR),process.exit(1)}finally{n.clear()}break}default:throw Error("An unexpected error occurred.")}var s;i.close()}async function ZE(){const e=Zy(),n=null!==e;let r=0;switch(r=n?n&&!e.eula?2:3:1,r){case 1:case 2:{const e=be({input:process.stdin,output:process.stdout,terminal:!0});let n="";for(console.log(nb.EULA_INSTALLATION);!VE(n);)n=(await e.question(C.bold("\nHave you read, and do you accept the Terms of Use? [Y|N]: "))).toUpperCase();if("N"==n)throw nb.EULA_INSTALLATION_NO_ACCEPTED;const s=Math.round((new Date).getTime()).toString();if(1===r){!function(e=Jy()){const n=Qy(),r=i.join(n,".truebit"),s=i.join(r,"secret.json");t.existsSync(r)||t.mkdirSync(r,{recursive:!0}),t.writeFileSync(s,JSON.stringify(e,null,2),{encoding:"utf8"})}({...Jy(),eula:s})}else 2===r&&Xy({eula:s});e.close()}}}async function XE(e=!1){const t=Zy(),n=null!==t;let r=null,i=0;switch(n?!n||t.privateKey&&t.address?(r=await GE(t.address,t),i=r?4:3):i=2:i=1,i){case 1:case 2:case 3:console.log(nb.USER_NO_REGISTERED),process.exit(1);break;case 4:e&&console.log(`You are logged in as: ${r?.name} - ${r?.email}`)}}he.config({path:process.cwd()+"/truebit.verify.env"}),X(!1);const QE=ye(import.meta.url),eS=JSON.parse(r(s.dirname(QE.resolve("@truebit/cli"))+"/../package.json","utf8"));process.on("unhandledRejection",((e,t)=>{console.error(`Unhandled Rejection at: \n${c(t,void 0,100)}, \nreason: ${e}`)})),async function(){try{await ZE()}catch(e){console.error(`${e}`),process.exit(1)}let t;await async function(e){if(!wu.satisfies(process.version,e)){const t=`Nodejs required version ${e} not satisfied with current version ${process.version}.`;console.log(t),process.exit(1)}}(eS.engines.node),eb("blockchainEnv")&&(t=eb("blockchainEnv"));const n=eb("RPC_URL");n&&(process.env.RPC_URL=n);const r=new M;r.showSuggestionAfterError(!0),r.description(e.green(O.textSync("Truebit Verify\nCLI"))+"\nA CLI to interact with Truebit Verify node\nBy accessing and using the Protocol, you hereby agree to our Terms of Use and our Privacy Policy. Patents pending.\nTerms of Use: https://www.truebit.io/terms\nPrivacy Policy: https://www.truebit.io/privacy-policy").name("truebit").version(eS.version).helpOption("-h, --help","Display help for command"),r.command("setup").description("Setup generate a secret.json in your home directory with your information").summary("Initialize user profile configuration").action((async()=>{try{await async function(){console.log(C.bold("\nWelcome to Truebit Verify!"));const e=Zy(),t=null!==e;if(!t||t&&(!e.privateKey||!e.address)){const e=be({input:process.stdin,output:process.stdout,terminal:!0});console.log(nb.SETUP_INTRODUCTION);let t="";for(;!VE(t);)t=(await e.question("Press [Y] to proceed or [N] to exit: ")).toUpperCase();e.close(),"N"==t&&(console.log(nb.SETUP_INTRODUCTION_NO_ACCEPTANCE),process.exit(1))}}(),await zE(),await JE()}catch(e){console.error(`${e}`),process.exit(1)}})),r.command("start").description("Executes a task within the context of Truebit Verify node. The task should be already uploaded to local-storage.").summary("Run a Truebit Task").argument("<taskId>","Id of the task").argument("<input>","Input for task execution").option("--update-config","Automatically update resource limits in config.json according to peak usage report").hook("preAction",(async()=>{try{await XE()}catch(e){console.error(`${e}`),process.exit(1)}})).action((async(e,t,n)=>{try{await(async(e,t,n)=>{if(console.log("Executing the function Task"),!jE(t))throw"Invalid task id";const r=await ib(),i=await r.post("api/execution/",gE({taskId:t,input:n})).catch(dE),s=i.data.executionId;if(console.log(`Execution Id: ${s}`),i.data.payload)BE(e,i.data.payload);else{const t=setInterval((async()=>{const n=await r.get(`api/execution/${s}`);n.data&&"running"!=n.data.status&&(BE(e,n.data),clearInterval(t))}),1e3)}})(n,e,t)}catch(e){console.error(`Error: ${e}`)}})),r.command("deploy").description("Deploys and registers a new Truebit task specified by the --taskId parameter. Using the deploy command makes the Truebit task available for execution.").summary("Deploy and register a new Truebit Task").argument("<namespace>","Namespace to register the task in (lowercase)").argument("<taskName>","Name of the task (lowercase)").option("--taskId <taskId>","Id of the task <Required>").option("--meta <meta>","Meta information for the task (string between single quotes)").addOption(new R("--label <label>","Label for the task").hideHelp()).option("--norelay","Do not relay the transaction").hook("preAction",(async()=>{try{await XE()}catch(e){console.error(`${e}`),process.exit(1)}})).action((async(t,n,r)=>{const i=ge({text:"Deploying and registering the function task \n",stream:process.stdout}).start();try{if(pE(t,"Namespace"),pE(n,"TaskName"),r.label&&r.label.length>128)throw new Error("Label exceeds maximum length of 128 chars");if(!r.taskId)throw new Error("Task ID is required to register a task");const s=await UE(t,n,r.taskId,r.meta,r.norelay);let a=!1;r.label&&(a=await async function(e,t,n){const r=fE(eb("blockchainEnv")),i=await r.taskRegistry.getLatestVersion(e,t);return await r.taskRegistry.setTaskLabel(e,t,i,n)}(t,n,r.label)),i.stop(),s&&(console.log(e.green(`The function task has been deployed successfully.\nThe Task ${n} version '${s}' was registered successfully in namespace ${t}.`)),r.meta&&console.log(e.green(`Metadata associated to the task: ${r.meta}.`)),a&&console.log(e.green(`Label ${r.label} set successfully for task ${n} in namespace ${t}.`)))}catch(e){i.stop(),console.error(`${e}`)}i.clear()})),r.command("build").description("Compiles source code to obtain compiled and instrumented Truebit task and pushes it to the Truebit node.").summary("Create a Function Task").option("-l, --lang [programming-language]","Specify the programming language in which the task was developed").argument("<sourceCodePath>","Path of the task source code.").hook("preAction",(async()=>{try{await XE()}catch(e){console.error(`${e}`),process.exit(1)}})).action((async(e,t)=>{try{t.lang=t.lang?t.lang:eb("defaultLanguage");if(!Object.values(ao).includes(t.lang))throw`Invalid language provided, the current options are: ${Object.values(ao)}`;console.log("Building the function task");const n=await yE(t.lang,e||"./");t.lang!=ao.JS&&t.lang!=ao.PYTHON?await async function(e){try{const t=await ib(),n=await t.post("api/instrumentation",gE({taskId:`${e}`})).catch(dE);if(!0===n.data.error?.status){if(!n.data.error.message)throw"Malformed instrumentation service error message";console.log(`Instrumentation failed: ${n.data.error?.message}`)}else{if(!n.data.payload||!n.data.payload.instrumentedTaskId)throw"Malformed instrumentation service success message";console.log("Your function task is ready."),console.log(`Use the following TaskId for execution or deployment:\n${n.data.payload.instrumentedTaskId}`)}}catch(e){throw console.error(e),e}}(n):(console.log("Your function task is ready."),console.log(`Use the following TaskId for execution or deployment:\n${n}`))}catch(e){console.error(`Error: ${e}`)}})),r.command("create-api").description("Create the Truebit API Task and upload the Manifest to the local storage. As a result, it returns the taskId").summary("Create an API Task").argument("<manifestPath>","Path of the manifest.").hook("preAction",(async()=>{try{await XE()}catch(e){console.error(`${e}`),process.exit(1)}})).action((async e=>{try{console.log("Creating API task...");const t=await yE(oo.API,e||"./");console.log("Your API task is ready!"),console.log(`Use the following TaskId for execution or deployment: \n${t}`)}catch(e){console.error(`Error: ${e}`)}})),r.command("start-api").description("Start the Truebit API Task, verify with enforcer and request the api. As a result, it returns the API response").summary("Run an API Task").argument("<manifestPath>","Path of the manifest.").argument("<input>","Input request JSON file path").argument("[authType]",`Type of authentication needed for API task usage. One of: <${Object.values(NE)}>`).argument("[authString]",'Auth string is a comma separated value that represents auth method.\n\n\tExamples:\r\n\t\tAWS_SIGNATURE = "accessKey:<accesskey>,secretKey:<secretkey>"\r\n\t\tBASIC_AUTH = "username:<username>,password:<password>"\r\n\t\tCUSTOM_HEADER = "<customheader>"').hook("preAction",(async()=>{try{await XE()}catch(e){console.error(`${e}`),process.exit(1)}})).action((async(e,t,n,r)=>{try{console.log("Executing the API Task"),n&&r?await CE(e,t,n,r):await CE(e,t,null,"")}catch(e){console.error(`${e}`)}})),r.command("status").description("Retrieves the status of a given execution id.").summary("Get execution status").argument("<executionId>","Execution Id").hook("preAction",(async()=>{try{await XE()}catch(e){console.error(`${e}`),process.exit(1)}})).action((async e=>{try{await async function(e){try{console.log("Fetching execution status...");const t=await ib(),n=await t.get(`api/execution/${e}`).catch(dE);if(n.data.message)throw n.data.message;console.log("Task execution status: ",n.data.status),n.data.output&&console.log("Task execution output: ",n.data.output)}catch(t){console.error(`Couldn't fetch execution status for executionId ${e}: ${t}`)}}(e)}catch(e){console.error(`Error: ${e}`)}})),r.command("api-auth").description("Specify authentication for a truebit api task").summary("Set API Task authentication").argument("<namespace>","Namespace to register").argument("<taskname>","Taskname to register").argument("<taskId>","Id of the task").argument("<authType>",`Type of authentication need for api task usage. One of: <${Object.values(NE)}>`).argument("<authString>",'Auth string is a comma separated value that represent auth method.\n\n\tExamples:\r\n\t\tAWS_SIGNATURE = "accessKey:<accesskey>,secretKey:<secretkey>"\r\n\t\tBASIC_AUTH = "username:<username>,password:<password>"\r\n\t\tCUSTOM_HEADER = "<customheader>"').hook("preAction",(async()=>{try{await XE()}catch(e){console.error(`${e}`),process.exit(1)}})).action((async(e,t,n,r,i)=>{try{const s=eb("privateKey"),a=eb("address");await qE(n,e,t,r,i,s,a)}catch(e){console.error(`Error: ${e}`)}}));const i=r.command("namespace").description("The namespace command helps you group and manage different tasks under a single name, like an umbrella.\nThis name, called a namespace, can be anything that represents your tasks, such as the name of your company. Each task you create will be associated with a namespace.").summary("Manage Namespace operations").hook("preAction",(async()=>{try{await XE()}catch(e){console.error(`${e}`),process.exit(1)}}));i.command("register").argument("<namespace>","Namespace to register").description("Register a new namespace. The user who calls this command will become the owner of the registered namespace. Each namespace can have only one owner. The owner can grant access to other users using the grant command.").summary("Register a new namespace").option("--norelay","Do not relay the transaction").action((async(n,r)=>{const i=ge({text:`Registering namespace: ${e.cyan(n)} \n`,stream:process.stdout}).start();try{const s=await DE(n,!1,r.norelay,t);i.stop(),s&&console.log(e.green(`Namespace ${n} registered successfully`))}catch(t){i.stop();const r=t.message,s=r.match(/execution reverted: "(.*?)" /)?.[1];s?console.error(`${e.red("ERROR:")} registering namespace -> ${e.yellow(n)}: ${s}`):console.error(`${e.red("ERROR:")} registering namespace -> ${e.yellow(n)}: ${r}`)}i.clear()})),i.command("transfer").argument("<namespace>","Namespace to transfer").argument("<address>","Address to transfer namespace to").description("Change the owner of a namespace. \nOnly the current owner can use this command to grant access.").summary("Transfer a namespace").action((async(n,r)=>{const i=ge({text:`Transferring namespace: ${e.cyan(n)} to address: ${e.cyan(r)}`,stream:process.stdout}).start();try{pE(n,"Namespace"),hE(r);const s=fE(t),a=await s.taskRegistry.transferTaskNamespace(n,r);i.stop(),a&&console.log(e.green(`Namespace ${n} transferred successfully to ${r}`))}catch(t){i.stop();const s=t.message,a=s.match(/execution reverted: "(.*?)" /)?.[1];a?console.error(`${e.red("ERROR:")} transferring namespace -> ${e.yellow(n)} to ${e.yellow(r)}: ${a}`):console.error(`${e.red("ERROR:")} transferring namespace -> ${e.yellow(n)} to ${e.yellow(r)}: ${s}`)}i.clear()})),i.command("grant").argument("<namespace>","Namespace to grant access to").argument("<address>","Address to grant access to").description("Give a user access to the namespace. \nOnly the current owner can use this command to grant access.").summary("Grant access to a namespace").action((async(n,r)=>{const i=ge({text:`Granting access to namespace: ${e.cyan(n)} for address: ${e.cyan(r)}`,stream:process.stdout}).start();try{pE(n,"Namespace"),hE(r);const s=fE(t),a=await s.taskRegistry.grantNamespaceAccess(n,r);i.stop(),a&&console.log(e.green(`Access to namespace ${n} granted successfully to ${r}`))}catch(t){i.stop();const s=t.message,a=s.match(/execution reverted: "(.*?)" /)?.[1];a?console.error(`${e.red("ERROR:")} granting access to namespace -> ${e.yellow(n)} for ${e.yellow(r)}: ${a}`):console.error(`${e.red("ERROR:")} granting access to namespace -> ${e.yellow(n)} for ${e.yellow(r)}: ${s}`)}i.clear()})),i.command("revoke").argument("<namespace>","Namespace to revoke access from").argument("<address>","Address to revoke access from").description("Take away a user's access to the namespace. \nOnly the current owner can use this command to revoke access.").summary("Revoke access to a namespace").action((async(n,r)=>{const i=ge({text:`Revoking access to namespace: ${e.cyan(n)} from address: ${e.cyan(r)}`,stream:process.stdout}).start();try{pE(n,"Namespace"),hE(r);const s=fE(t),a=await s.taskRegistry.revokeNamespaceAccess(n,r);i.stop(),a&&console.log(e.green(`Access to namespace ${n} revoked successfully from ${r}`))}catch(t){i.stop();const s=t.message,a=s.match(/execution reverted: "(.*?)" /)?.[1];a?console.error(`${e.red("ERROR:")} revoking access to namespace -> ${e.yellow(n)} from ${e.yellow(r)}: ${a}`):console.error(`${e.red("ERROR:")} revoking access to namespace -> ${e.yellow(n)} from ${e.yellow(r)}: ${s}`)}i.clear()}));const s=r.command("task").description("Manages tasks within a specified namespace, facilitating the organization, tracking, and management of tasks across different projects or domains. This command serves as a gateway to various task-related operations such as registration, modification, and querying, thereby enhancing project management and operational efficiency.").summary("Manage Task operations").hook("preAction",(async()=>{try{await XE()}catch(e){console.error(`${e}`),process.exit(1)}}));s.command("label").description("Set label for a task in a namespace").summary("Assign a label to a registered task.").argument("<namespace>","Namespace of the task").argument("<taskName>","Name of the task").option("--label <label>","Label for the task <Required>").option("--ver <version>","Version of the task <Required>").action((async(n,r,i)=>{const s=ge({text:`Setting label: ${e.cyan(i.label)} for task: ${e.cyan(r)} in namespace: ${e.cyan(n)}`,stream:process.stdout}).start();try{pE(n,"Namespace");const a=fE(t);if(!i.label)throw new Error(`${e.red("ERROR:")} Label is required to set a label for a task. Check -h for help`);if(!i.ver)throw new Error(`${e.red("ERROR:")} Version is required to set a label for a task. Check -h for help`);const o=await a.taskRegistry.setTaskLabel(n,r,i.ver,i.label);s.stop(),s.clear(),o&&console.log(e.green(`Label ${i.label} set successfully for task ${r} in namespace ${n}`))}catch(t){s.stop(),s.clear();const n=t.message;console.error(n);const r=n.match(/execution reverted: "(.*?)" /)?.[1];r?console.error(`${e.red("ERROR:")} Setting label for task -> : ${r}`):console.error(`${e.red("ERROR:")} Setting label for task -> : ${n}`)}})),s.command("disable").description("Disable task in a namespace --ver <version> or --label <label> can be used to disable specific task ").summary("Disable a registered task.").argument("<namespace>","Namespace of the task").argument("<taskName>","Name of the task").option("--ver <version>","Version of the task to disable <Required>").option("--label <label>","Label for the task to disable <Required>").action((async(n,r,i)=>{const s=ge({text:`Disabling task: ${e.cyan(r)} in namespace: ${e.cyan(n)}`,stream:process.stdout}).start();try{pE(n,"Namespace");const a=fE(t);let o;if(!i.ver&&!i.label)throw new Error(`${e.red("ERROR:")} Version or label is required to enable a task`);if(i.ver&&i.label)throw new Error(`${e.red("ERROR:")} Cannot provide both version and label`);if(i.label){const e=await a.taskRegistry.getTaskByLabel(n,r,i.label);return o=await a.taskRegistry.disableTask(n,r,e.version),s.stop(),void s.clear()}o=await a.taskRegistry.disableTask(n,r,i.ver),s.stop(),o&&console.log(e.green(`Task ${r} disabled successfully in namespace ${n}`))}catch(t){s.stop(),s.clear();const n=t.message,r=n.match(/execution reverted: "(.*?)" /)?.[1];r?console.error(`${e.red("ERROR:")} Disabling task -> : ${r}`):console.error(`${e.red("ERROR:")} Disabling task -> : ${n}`)}})),s.command("enable").description("Enable a task in a namespace --ver <version> or --label <label> can be used to enable specific task").summary("Enable a registered task.").argument("<namespace>","Namespace of the task").argument("<taskName>","Name of the task").option("--ver <version>","Version of the task to enable <Required>").option("--label <label>","Label for the task to enable <Required>").action((async(n,r,i)=>{const s=ge({text:`Enabling task: ${e.cyan(r)} in namespace: ${e.cyan(n)}`,stream:process.stdout}).start();try{pE(n,"Namespace");const a=fE(t);let o;if(!i.ver&&!i.label)throw new Error(`${e.red("ERROR:")} Version or label is required to enable a task`);if(i.ver&&i.label)throw new Error(`${e.red("ERROR:")} Cannot provide both version and label`);if(i.label){const e=await a.taskRegistry.getTaskByLabel(n,r,i.label);return o=await a.taskRegistry.enableTask(n,r,e.version),s.stop(),void s.clear()}o=await a.taskRegistry.enableTask(n,r,i.ver),s.stop(),s.clear(),o&&console.log(e.green(`Task ${r} enabled successfully in namespace ${n}`))}catch(t){s.stop();const n=t.message,r=n.match(/execution reverted: "(.*?)" /)?.[1];r?console.error(`${e.red("ERROR:")} Enabling task -> : ${r}`):console.error(`${e.red("ERROR:")} Enabling task -> : ${n}`)}})),s.command("get-task").description("Get task information from a namespace and a taskName --ver or --label can be used to get specific task").summary("Retrieve information from a namespace and a taskName").argument("<namespace>","Namespace of the task").argument("<taskName>","Name of the task").option("--ver <version>","Version of the task <Optional>").option("--label <label>","Label for the task <Optional>").action((async(n,r,i)=>{const s=ge({text:`Getting latest task: ${e.cyan(r)} in namespace: ${e.cyan(n)}`,stream:process.stdout}).start();try{pE(n,"Namespace");const a=fE(t);let o={meta:""};if(i.label&&i.ver)throw new Error(`${e.red("ERROR:")} Cannot have both version and label at the same time`);if(i.ver||i.label||(o=await a.taskRegistry.getTask(n,r)),!i.label&&i.ver&&(o=await a.taskRegistry.getTaskByVersion(n,r,i.ver)),i.label&&!i.ver&&(o=await a.taskRegistry.getTaskByLabel(n,r,i.label)),""!==o.meta){const e=JSON.parse(o.meta);o.meta=e}s.stop(),console.log(o)}catch(t){s.stop();const n=t.message,r=n.match(/execution reverted: "(.*?)" /)?.[1];r?console.error(`${e.red("ERROR:")} Getting task -> : ${r}`):console.error(`${e.red("ERROR:")} Getting task -> : ${n}`)}s.clear()}));const a=r.command("auth").description("The auth command is responsible for managing the authorization for task execution. It allows the namespace owner to grant or deny access to addresses, ensuring that only authorized individuals can execute specific tasks.").summary("Manage authorization operations").hook("preAction",(async()=>{try{await XE()}catch(e){console.error(`${e}`),process.exit(1)}}));a.command("grant").description("The auth grant command is responsible for granting access to a specific address within a namespace. The grantee will have the ability to execute the tasks stored within that namespace.").summary("Grant authorization to a grantee").argument("<namespace>","Namespace of the task").argument("<grantee>","Grantee to be authorized").action((async(n,r)=>{const i=ge({text:`Granting authorization to ${e.cyan(r)} in namespace ${e.cyan(n)}`,stream:process.stdout}).start();try{pE(n,"Namespace"),hE(r);const s=fE(t),a=await s.authorization.grantAuthorization(n,r);i.stop(),a&&console.log(e.green(`Authorization granted to ${r} in namespace ${n}`))}catch(t){i.stop(),i.clear();const n=t.message,r=n.match(/execution reverted: "(.*?)" /)?.[1];r?console.error(`${e.red("ERROR:")} Granting authorization -> : ${r}`):console.error(`${e.red("ERROR:")} Granting authorization -> : ${n}`)}})),a.command("revoke").description("The auth revoke command is responsible for revoking access from a specific address within a namespace. This command ensures that the specified address can no longer execute the tasks stored within that namespace.").summary("Revoke authorization from a grantee").argument("<namespace>","Namespace of the task").argument("<grantee>","Grantee to be unauthorized").action((async(n,r)=>{const i=ge({text:`Revoking authorization from ${e.cyan(r)} in namespace ${e.cyan(n)}`,stream:process.stdout}).start();try{pE(n,"Namespace");const s=fE(t),a=await s.authorization.revokeAuthorization(n,r);i.stop(),a&&console.log(e.green(`Authorization revoked from ${r} in namespace ${n}`))}catch(t){i.stop(),i.clear();const n=t.message,r=n.match(/execution reverted: "(.*?)" /)?.[1];r?console.error(`${e.red("ERROR:")} Revoking authorization -> : ${r}`):console.error(`${e.red("ERROR:")} Revoking authorization -> : ${n}`)}i.clear()})),a.command("register").description("The auth register command is responsible for registering a specific API_KEY. Every execution made with this API_KEY will be charged to the user who registered it. This way, you can ensure that the user who registered the API_KEY is responsible for paying for all executions made with it.").summary("Register authorization with an API key hash").argument("<apiKey>","API key for authorization").option("--norelay","Do not relay the transaction").action((async(t,n)=>{const r=ge({text:`Registering authorization with API key hash ${e.cyan(t)}`,stream:process.stdout}).start();try{let i;if(i=n.norelay?await async function(e,t=eb("blockchainEnv")){LE(e);const n=fE(t),r=de.keccak256(de.toUtf8Bytes(e));return await n.authorization.registerAuthorization(r),r}(t):await HE(t,!1),r.stop(),!i)throw Error("The API key could not been registered.");console.log(e.green(`Authorization registered with API key ${t} with hash -> ${i}`))}catch(t){r.stop(),r.clear();const n=t.message,i=n.match(/execution reverted: "(.*?)" /)?.[1];i?console.error(`${e.red("ERROR:")} Registering authorization -> : ${i}`):console.error(`${e.red("ERROR:")} Registering authorization -> : ${n}`)}r.clear()})),a.command("deregister").description('The auth deregister command will revoke access to a specific API_KEY. After deregistration, any execution attempt using this API_KEY will result in a "not authorized" message.').summary("Deregister authorization with an API key hash").argument("<apiKey>","API key hash for deregistration").action((async n=>{const r=ge({text:`Deregistering authorization with API key ${e.cyan(n)}`,stream:process.stdout}).start();try{LE(n);const i=de.keccak256(de.toUtf8Bytes(n)),s=fE(t),a=await s.authorization.deRegisterAuthorization(i);r.stop(),a&&console.log(e.green(`Authorization deregistered with API key hash ${n} with hash -> ${i}`))}catch(t){r.stop(),r.clear();const n=t.message,i=n.match(/execution reverted: "(.*?)" /)?.[1];i?console.error(`${e.red("ERROR:")} Deregistering authorization -> : ${i}`):console.error(`${e.red("ERROR:")} Deregistering authorization -> : ${n}`)}r.clear()})),a.command("check-authorization").description("The auth check-authorization command verifies if a specific address has permission to execute tasks in a particular namespace.").summary("Check if a grantee is authorized").argument("<namespace>","Namespace of the task").argument("<grantee>","Grantee to check authorization for").action((async(n,r)=>{const i=ge({text:`Checking authorization for ${e.cyan(r)} in namespace ${e.cyan(n)}`,stream:process.stdout}).start();try{pE(n,"Namespace");const s=fE(t),a=await s.authorization.isAuthorized(n,r);i.stop(),console.log(e.green(`Grantee ${r} is ${a?"authorized":"not authorized"} in namespace ${n}`))}catch(t){i.stop(),i.clear();const n=t.message,r=n.match(/execution reverted: "(.*?)" /)?.[1];r?console.error(`${e.red("ERROR:")} Checking authorization -> : ${r}`):console.error(`${e.red("ERROR:")} Checking authorization -> : ${n}`)}i.clear()})),a.command("get-payer").description("The auth get-payer command retrieves the payer address associated with a specific API_KEY.").summary("Get payer address from an API key hash").argument("<apiKey>","API key for payer address").action((async n=>{const r=ge({text:`Getting payer address for API key hash ${e.cyan(n)}`,stream:process.stdout}).start();try{const i=fE(t),s=de.keccak256(de.toUtf8Bytes(n)),a=await i.authorization.getPayerAddress(s);r.stop(),console.log(e.green(`Payer address for API key ${n} is ${a}`))}catch(t){r.stop(),r.clear();const n=t.message,i=n.match(/execution reverted: "(.*?)" /)?.[1];i?console.error(`${e.red("ERROR:")} Getting payer address -> : ${i}`):console.error(`${e.red("ERROR:")} Getting payer address -> : ${n}`)}r.clear()})),a.command("new-apikey").description("Generate a new Api Key to be used for execution payment. The Api Key is a unique identifier for the payer.").summary("Generate a new Api Key").action((()=>{const e=k();console.log(`Api Key: ${e}`)})),await r.parseAsync(process.argv)}().catch((e=>{console.error(e)}));
11
+ var e=n,t=s,r=po(),i=E,o=f,c={};eo=c;var u=["daily","test","m","h","custom"],l="YYYYMMDDHHmm";function d(t,n){if(t.hash===i.createHash(t.hashType).update(t.name+"LOG_FILE"+t.date).digest("hex"))try{e.existsSync(t.name)&&e.unlinkSync(t.name)}catch(e){n&&console.error(new Date,"[FileStreamRotator] Could not remove old log file: ",t.name)}}c.getFrequency=function(e){var t=e.toLowerCase().match(/^(\d+)([mh])$/);if(t)return function(e,t){if("number"==typeof t){switch(e){case"m":if(t<0||t>60)return!1;break;case"h":if(t<0||t>24)return!1}return{type:e,digit:t}}}(t[2],parseInt(t[1]));var n=function(e){switch(e){case"custom":case"daily":return{type:e,digit:void 0};case"test":return{type:e,digit:0}}return!1}(e);return n||!1},c.parseFileSize=function(e){if(e&&"string"==typeof e){var t=e.toLowerCase().match(/^((?:0\.)?\d+)([kmg])$/);if(t)switch(t[2]){case"k":return 1024*t[1];case"m":return 1024*t[1]*1024;case"g":return 1024*t[1]*1024*1024}}return null},c.getDate=function(e,t,n){t=t||l;let i=n?r.utc():r().local();if(e&&-1!==u.indexOf(e.type))switch(e.type){case"m":var s=Math.floor(i.minutes()/e.digit)*e.digit;return i.minutes(s).format(t);case"h":var a=Math.floor(i.hour()/e.digit)*e.digit;return i.hour(a).format(t);case"daily":case"custom":case"test":return i.format(t)}return i.format(t)},c.setAuditLog=function(n,r,i){var s=null;if(n){var a=n.toString().substr(-1),o=n.toString().match(/^(\d+)/);if(Number(o[1])>0){var c=t.dirname(i.replace(/%DATE%.+/,"_filename"));try{if(r){var u=t.resolve(r);s=JSON.parse(e.readFileSync(u,{encoding:"utf-8"}))}else{u=t.resolve(c+"/.audit.json");s=JSON.parse(e.readFileSync(u,{encoding:"utf-8"}))}}catch(e){if("ENOENT"!==e.code)return null;s={keep:{days:!1,amount:Number(o[1])},auditLog:r||c+"/.audit.json",files:[]}}s.keep={days:"d"===a,amount:Number(o[1])}}}return s},c.writeAuditLog=function(t,n){try{p(t.auditLog),e.writeFileSync(t.auditLog,JSON.stringify(t,null,4))}catch(e){n&&console.error(new Date,"[FileStreamRotator] Failed to store log audit at:",t.auditLog,"Error:",e)}},c.addLogToAudit=function(e,t,n,s){if(t&&t.files){var a=t.files.findIndex((function(t){return t.name===e}));if(-1!==a)return t;var o=Date.now();if(t.files.push({date:o,name:e,hash:i.createHash(t.hashType).update(e+"LOG_FILE"+o).digest("hex")}),t.keep.days){var u=r().subtract(t.keep.amount,"days").valueOf(),l=t.files.filter((function(e){return e.date>u||(e.hashType=t.hashType,d(e,s),n.emit("logRemoved",e),!1)}));t.files=l}else{var p=t.files.splice(-t.keep.amount);t.files.length>0&&t.files.filter((function(e){return e.hashType=t.hashType,d(e,s),n.emit("logRemoved",e),!1})),t.files=p}c.writeAuditLog(t,s)}return t},c.getStream=function(n){var i=null,s=null,d=this;if(!n.filename)return console.error(new Date,"[FileStreamRotator] No filename supplied. Defaulting to STDOUT"),process.stdout;n.frequency&&(i=d.getFrequency(n.frequency));let f=d.setAuditLog(n.max_logs,n.audit_file,n.filename);null!=f&&(f.hashType=void 0!==n.audit_hash_type?n.audit_hash_type:"md5"),d.verbose=void 0===n.verbose||n.verbose;var m=null,g=0,y=0;n.size&&(m=c.parseFileSize(n.size));var b=n.date_format||l;i&&"daily"==i.type&&(n.date_format||(b="YYYY-MM-DD"),r().format(b)==r().endOf("day").format(b)&&r().format(b)!=r().add(1,"day").format(b)||(d.verbose&&console.log(new Date,"[FileStreamRotator] Changing type to custom as date format changes more often than once a day or not every day"),i.type="custom")),i&&(s=n.frequency?d.getDate(i,b,n.utc):""),n.create_symlink=n.create_symlink||!1,n.extension=n.extension||"";var v=n.filename,w=null,x=v+(s?"."+s:"");if(v.match(/%DATE%/)&&(x=v.replace(/%DATE%/g,s||d.getDate(null,b,n.utc))),m){var _=null,E=x;if(f&&f.files&&f.files instanceof Array&&f.files.length>0){var S=f.files[f.files.length-1].name;if(S.match(E)){var k=S.match(E+"\\.(\\d+)");k&&(E=S,g=k[1])}}for(0==g&&E==x&&(E+=n.extension);e.existsSync(E);)_=E,g++,E=x+"."+g+n.extension;if(_){var A=e.statSync(_);A.size<m&&(E=_,g--,y=A.size)}x=E}else x+=n.extension;d.verbose&&console.log(new Date,"[FileStreamRotator] Logging to: ",x),p(x);var T=n.file_options||{flags:"a"},M=e.createWriteStream(x,T);if(s&&i&&u.indexOf(i.type)>-1||m>0){d.verbose&&console.log(new Date,"[FileStreamRotator] Rotating file: ",i?i.type:"",m?"size: "+m:"");var R,O=new o;return O.auditLog=f,O.end=function(){M.end.apply(M,arguments)},h(M,O),O.on("close",(function(){R&&R.close()})),O.on("new",(function(r){O.auditLog=d.addLogToAudit(r,O.auditLog,O,d.verbose),n.create_symlink&&function(n,r,i){let s=r||"current.log",a=t.dirname(n),o=t.basename(n),c=a+"/"+s;try{e.lstatSync(c).isSymbolicLink()&&(e.unlinkSync(c),e.symlinkSync(o,c))}catch(t){if(t&&"ENOENT"==t.code)try{e.symlinkSync(o,c)}catch(e){i&&console.error(new Date,"[FileStreamRotator] Could not create symlink file: ",c," -> ",o)}}}(r,n.symlink_name,d.verbose),n.watch_log&&O.emit("addWatcher",r)})),O.on("addWatcher",(function(t){R&&R.close(),n.watch_log&&(R=function(t,n,r){if(!t)return null;try{return e.lstatSync(t),e.watch(t,(function(n,i){if("rename"==n)try{e.lstatSync(t)}catch(e){r(e,t)}}))}catch(e){n&&console.log(new Date,"[FileStreamRotator] Could not add watcher for "+t)}}(t,d.verbose,(function(e,t){O.emit("createLog",t)})))})),O.on("createLog",(function(t){try{e.lstatSync(t)}catch(n){M&&"function"==M.end&&M.end(),M=e.createWriteStream(t,T),O.emit("new",t),h(M,O)}})),O.write=function(t,r){var o=i?this.getDate(i,b,n.utc):s;if(o!=s||m&&y>m){var c=v+(s&&i?"."+o:"");v.match(/%DATE%/)&&s&&(c=v.replace(/%DATE%/g,o)),m&&y>m?c+="."+ ++g+n.extension:(g=0,c+=n.extension),y=0,d.verbose&&console.log(new Date,a.format("[FileStreamRotator] Changing logs from %s to %s",x,c)),s=o,w=x,x=c,!0===n.end_stream?M.end():M.destroy(),p(x),M=e.createWriteStream(c,T),O.emit("new",c),O.emit("rotate",w,c),h(M,O)}M.write(t,r),y+=Buffer.byteLength(t,r)}.bind(this),process.nextTick((function(){O.emit("new",x)})),O.emit("new",x),O}return d.verbose&&console.log(new Date,"[FileStreamRotator] File won't be rotated: ",n.frequency,n.size),process.nextTick((function(){M.emit("new",x)})),M};var p=function(n){t.dirname(n).split(t.sep).reduce((function(n,r){if(n+=r+t.sep,!e.existsSync(n))try{e.mkdirSync(n)}catch(e){if("EEXIST"!==e.code)throw e}return n}),"")},h=function(e,t){e.on("close",(function(){t.emit("close")})),e.on("finish",(function(){t.emit("finish")})),e.on("error",(function(e){t.emit("error",e)})),e.on("open",(function(e){t.emit("open",e)}))};return eo}!function(){if(so)return io;so=1;const e=Wa(),t=function(){if(ro)return no;ro=1;const e=n,t=l,r=s,i=a,o=m,c=Za(),u=vt().MESSAGE,p=d.PassThrough,f=qr(),h={json:!1,colorize:!1,eol:t.EOL,logstash:null,prettyPrint:!1,label:null,stringify:!1,depth:null,showLevel:!0,timestamp:()=>(new Date).toISOString()},g=function(t){if(t=t||{},f.call(this,t),this.options=Object.assign({},h,t),t.stream)!function(e){Array.prototype.slice.call(arguments,1).forEach((n=>{if(t[n])throw new Error("Cannot set "+n+" and "+e+" together")}))}("stream","filename","maxsize"),this.logStream=new p,this.logStream.pipe(t.stream);else{if(this.filename=t.filename?r.basename(t.filename):"winston.log",this.dirname=t.dirname||r.dirname(t.filename),i=this.filename,/["<>|:*?\\/\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f]/g.test(i)||(n=this.dirname,/["<>|\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f]/g.test(n)))throw new Error("Your path or filename contain an invalid character.");this.logStream=fo().getStream({filename:r.join(this.dirname,this.filename),frequency:t.frequency?t.frequency:"custom",date_format:t.datePattern?t.datePattern:"YYYY-MM-DD",verbose:!1,size:function(e){if(e&&"string"==typeof e){if(e.toLowerCase().match(/^((?:0\.)?\d+)([kmg])$/))return e}else if(e&&Number.isInteger(e)){const t=Math.round(e/1024);return 0===t?"1k":t+"k"}return null}(t.maxSize),max_logs:t.maxFiles,end_stream:!0,audit_file:t.auditFile?t.auditFile:r.join(this.dirname,"."+c(t)+"-audit.json"),file_options:t.options?t.options:{flags:"a"},utc:!!t.utc&&t.utc,extension:t.extension?t.extension:"",create_symlink:!!t.createSymlink&&t.createSymlink,symlink_name:t.symlinkName?t.symlinkName:"current.log",watch_log:!!t.watchLog&&t.watchLog,audit_hash_type:t.auditHashType?t.auditHashType:"sha256"}),this.logStream.on("new",(e=>{this.emit("new",e)})),this.logStream.on("rotate",((e,t)=>{this.emit("rotate",e,t)})),this.logStream.on("logRemoved",(n=>{if(t.zippedArchive){const t=n.name+".gz";try{e.unlinkSync(t)}catch(e){if("ENOENT"!==e.code)return e.message=`Error occurred while removing ${t}: ${e.message}`,void this.emit("error",e)}this.emit("logRemoved",t)}else this.emit("logRemoved",n.name)})),t.zippedArchive&&this.logStream.on("rotate",(t=>{try{if(!e.existsSync(t))return}catch(e){return e.message=`Error occurred while checking existence of ${t}: ${e.message}`,void this.emit("error",e)}try{if(e.existsSync(`${t}.gz`))return}catch(e){return e.message=`Error occurred while checking existence of ${t}.gz: ${e.message}`,void this.emit("error",e)}const n=o.createGzip(),r=e.createReadStream(t);r.on("error",(e=>{e.message=`Error occurred while reading ${t}: ${e.message}`,this.emit("error",e)}));const i=e.createWriteStream(t+".gz");i.on("error",(e=>{e.message=`Error occurred while writing ${t}.gz: ${e.message}`,this.emit("error",e)})),r.pipe(n).pipe(i).on("finish",(()=>{try{e.unlinkSync(t)}catch(e){if("ENOENT"!==e.code)return e.message=`Error occurred while removing ${t}: ${e.message}`,void this.emit("error",e)}this.emit("archive",t+".gz")}))})),t.watchLog&&this.logStream.on("addWatcher",(e=>{this.emit("addWatcher",e)}))}var n,i};no=g,i.inherits(g,f),g.prototype.name="dailyRotateFile";const y=function(){};return g.prototype.log=function(e,t){t=t||y,this.logStream.write(e[u]+this.options.eol),this.emit("logged",e),t(null,!0)},g.prototype.close=function(){this.logStream&&this.logStream.end((()=>{this.emit("finish")}))},g.prototype.query=function(t,n){if("function"==typeof t&&(n=t,t={}),!this.options.json)throw new Error("query() may not be used without the json option being set to true");if(!this.filename)throw new Error("query() may not be used when initializing with a stream");let i=[];(t=t||{}).rows=t.rows||t.limit||10,t.start=t.start||0,t.until=t.until||new Date,"object"!=typeof t.until&&(t.until=new Date(t.until)),t.from=t.from||t.until-864e5,"object"!=typeof t.from&&(t.from=new Date(t.from)),t.order=t.order||"desc";const s=(()=>{const t=new RegExp(this.filename.replace("%DATE%",".*"),"i");return e.readdirSync(this.dirname).filter((e=>r.basename(e).match(t)))})();0===s.length&&n&&n(null,i);const a=c=>{if(!c)return;const u=r.join(this.dirname,c);let l,d="";if(c.endsWith(".gz")){l=new p;const t=e.createReadStream(u);t.on("error",(e=>{e.message=`Error occurred while reading ${u}: ${e.message}`,l.emit("error",e)})),t.pipe(o.createGunzip()).pipe(l)}else l=e.createReadStream(u,{encoding:"utf8"});function f(e,n){try{const n=JSON.parse(e);if(!n||"object"!=typeof n)return;const r=new Date(n.timestamp);if(t.from&&r<t.from||t.until&&r>t.until||t.level&&t.level!==n.level)return;i.push(n)}catch(e){n||l.emit("error",e)}}l.on("error",(e=>{if(l.readable&&l.destroy(),n)return"ENOENT"===e.code?n(null,i):n(e)})),l.on("data",(e=>{const t=(e=(d+e).split(/\n+/)).length-1;for(let n=0;n<t;n++)f(e[n]);d=e[t]})),l.on("end",(()=>{if(d&&f(d,!0),s.length)a(s.shift());else if(n){i.sort(((e,t)=>{const n=new Date(e.timestamp).getTime(),r=new Date(t.timestamp).getTime();return n>r?1:n<r?-1:0})),"desc"===t.order&&(i=i.reverse());const e=t.start||0,r=t.limit||i.length;i=i.slice(e,e+r),t.fields&&(i=i.map((e=>{const n={};return t.fields.forEach((t=>{n[t]=e[t]})),n}))),n(null,i)}}))};a(s.shift())},no}();e.transports.DailyRotateFile=t,io=t}(),function(e){e.RUST="rs",e.C="c",e.JS="js",e.API="api",e.PYTHON="py"}(ao||(ao={})),function(e){e.API="api"}(oo||(oo={})),Object.values(ao),function(e){e.JSON="application/json",e.WASM="application/wasm",e.PLAIN_TXT="text/plain",e.JS="application/x-javascript",e.TAR="application/x-tar"}(co||(co={})),function(e){e.JSON="json",e.WASM="wasm",e.PLAIN_TXT="txt",e.JS="js",e.DTA="dta",e.PY="py",e.TAR="tar"}(uo||(uo={}));var ho,mo,go,yo,bo,vo,wo,xo,_o,Eo,So,ko,Ao,To,Mo,Ro,Oo,Io,No,Po,Co,jo,Lo,Do,$o,Uo,Bo,zo,qo,Ho,Fo,Yo,Vo,Ko,Wo,Go,Jo,Zo,Xo,Qo,ec,tc,nc,rc,ic,sc,ac,oc,cc,uc,lc,dc,pc,fc,hc,mc,gc,yc,bc,vc,wc,xc,_c,Ec,Sc,kc,Ac,Tc,Mc,Rc,Oc,Ic,Nc,Pc,Cc,jc,Lc,Dc,$c,Uc,Bc,zc,qc,Hc,Fc,Yc,Vc,Kc,Wc,Gc={exports:{}};function Jc(){if(mo)return ho;mo=1;const e=Number.MAX_SAFE_INTEGER||9007199254740991;return ho={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:e,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}}function Zc(){if(yo)return go;yo=1;const e="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};return go=e}function Xc(){return bo||(bo=1,function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:i}=Jc(),s=Zc(),a=(t=e.exports={}).re=[],o=t.safeRe=[],c=t.src=[],u=t.safeSrc=[],l=t.t={};let d=0;const p="[a-zA-Z0-9-]",f=[["\\s",1],["\\d",i],[p,r]],h=(e,t,n)=>{const r=(e=>{for(const[t,n]of f)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e})(t),i=d++;s(e,i,t),l[e]=i,c[i]=t,u[i]=r,a[i]=new RegExp(t,n?"g":void 0),o[i]=new RegExp(r,n?"g":void 0)};h("NUMERICIDENTIFIER","0|[1-9]\\d*"),h("NUMERICIDENTIFIERLOOSE","\\d+"),h("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${p}*`),h("MAINVERSION",`(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})`),h("MAINVERSIONLOOSE",`(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})`),h("PRERELEASEIDENTIFIER",`(?:${c[l.NUMERICIDENTIFIER]}|${c[l.NONNUMERICIDENTIFIER]})`),h("PRERELEASEIDENTIFIERLOOSE",`(?:${c[l.NUMERICIDENTIFIERLOOSE]}|${c[l.NONNUMERICIDENTIFIER]})`),h("PRERELEASE",`(?:-(${c[l.PRERELEASEIDENTIFIER]}(?:\\.${c[l.PRERELEASEIDENTIFIER]})*))`),h("PRERELEASELOOSE",`(?:-?(${c[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[l.PRERELEASEIDENTIFIERLOOSE]})*))`),h("BUILDIDENTIFIER",`${p}+`),h("BUILD",`(?:\\+(${c[l.BUILDIDENTIFIER]}(?:\\.${c[l.BUILDIDENTIFIER]})*))`),h("FULLPLAIN",`v?${c[l.MAINVERSION]}${c[l.PRERELEASE]}?${c[l.BUILD]}?`),h("FULL",`^${c[l.FULLPLAIN]}$`),h("LOOSEPLAIN",`[v=\\s]*${c[l.MAINVERSIONLOOSE]}${c[l.PRERELEASELOOSE]}?${c[l.BUILD]}?`),h("LOOSE",`^${c[l.LOOSEPLAIN]}$`),h("GTLT","((?:<|>)?=?)"),h("XRANGEIDENTIFIERLOOSE",`${c[l.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),h("XRANGEIDENTIFIER",`${c[l.NUMERICIDENTIFIER]}|x|X|\\*`),h("XRANGEPLAIN",`[v=\\s]*(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:${c[l.PRERELEASE]})?${c[l.BUILD]}?)?)?`),h("XRANGEPLAINLOOSE",`[v=\\s]*(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:${c[l.PRERELEASELOOSE]})?${c[l.BUILD]}?)?)?`),h("XRANGE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAIN]}$`),h("XRANGELOOSE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAINLOOSE]}$`),h("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),h("COERCE",`${c[l.COERCEPLAIN]}(?:$|[^\\d])`),h("COERCEFULL",c[l.COERCEPLAIN]+`(?:${c[l.PRERELEASE]})?`+`(?:${c[l.BUILD]})?(?:$|[^\\d])`),h("COERCERTL",c[l.COERCE],!0),h("COERCERTLFULL",c[l.COERCEFULL],!0),h("LONETILDE","(?:~>?)"),h("TILDETRIM",`(\\s*)${c[l.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",h("TILDE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAIN]}$`),h("TILDELOOSE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAINLOOSE]}$`),h("LONECARET","(?:\\^)"),h("CARETTRIM",`(\\s*)${c[l.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",h("CARET",`^${c[l.LONECARET]}${c[l.XRANGEPLAIN]}$`),h("CARETLOOSE",`^${c[l.LONECARET]}${c[l.XRANGEPLAINLOOSE]}$`),h("COMPARATORLOOSE",`^${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]})$|^$`),h("COMPARATOR",`^${c[l.GTLT]}\\s*(${c[l.FULLPLAIN]})$|^$`),h("COMPARATORTRIM",`(\\s*)${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]}|${c[l.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",h("HYPHENRANGE",`^\\s*(${c[l.XRANGEPLAIN]})\\s+-\\s+(${c[l.XRANGEPLAIN]})\\s*$`),h("HYPHENRANGELOOSE",`^\\s*(${c[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[l.XRANGEPLAINLOOSE]})\\s*$`),h("STAR","(<|>)?=?\\s*\\*"),h("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),h("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(Gc,Gc.exports)),Gc.exports}function Qc(){if(wo)return vo;wo=1;const e=Object.freeze({loose:!0}),t=Object.freeze({});return vo=n=>n?"object"!=typeof n?e:n:t,vo}function eu(){if(_o)return xo;_o=1;const e=/^[0-9]+$/,t=(t,n)=>{const r=e.test(t),i=e.test(n);return r&&i&&(t=+t,n=+n),t===n?0:r&&!i?-1:i&&!r?1:t<n?-1:1};return xo={compareIdentifiers:t,rcompareIdentifiers:(e,n)=>t(n,e)}}function tu(){if(So)return Eo;So=1;const e=Zc(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:n}=Jc(),{safeRe:r,safeSrc:i,t:s}=Xc(),a=Qc(),{compareIdentifiers:o}=eu();class c{constructor(i,o){if(o=a(o),i instanceof c){if(i.loose===!!o.loose&&i.includePrerelease===!!o.includePrerelease)return i;i=i.version}else if("string"!=typeof i)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof i}".`);if(i.length>t)throw new TypeError(`version is longer than ${t} characters`);e("SemVer",i,o),this.options=o,this.loose=!!o.loose,this.includePrerelease=!!o.includePrerelease;const u=i.trim().match(o.loose?r[s.LOOSE]:r[s.FULL]);if(!u)throw new TypeError(`Invalid Version: ${i}`);if(this.raw=i,this.major=+u[1],this.minor=+u[2],this.patch=+u[3],this.major>n||this.major<0)throw new TypeError("Invalid major version");if(this.minor>n||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>n||this.patch<0)throw new TypeError("Invalid patch version");u[4]?this.prerelease=u[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<n)return t}return e})):this.prerelease=[],this.build=u[5]?u[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(t){if(e("SemVer.compare",this.version,this.options,t),!(t instanceof c)){if("string"==typeof t&&t===this.version)return 0;t=new c(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(e){return e instanceof c||(e=new c(e,this.options)),o(this.major,e.major)||o(this.minor,e.minor)||o(this.patch,e.patch)}comparePre(t){if(t instanceof c||(t=new c(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let n=0;do{const r=this.prerelease[n],i=t.prerelease[n];if(e("prerelease compare",n,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return o(r,i)}while(++n)}compareBuild(t){t instanceof c||(t=new c(t,this.options));let n=0;do{const r=this.build[n],i=t.build[n];if(e("build compare",n,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return o(r,i)}while(++n)}inc(e,t,n){if(e.startsWith("pre")){if(!t&&!1===n)throw new Error("invalid increment argument: identifier is empty");if(t){const e=new RegExp(`^${this.options.loose?i[s.PRERELEASELOOSE]:i[s.PRERELEASE]}$`),n=`-${t}`.match(e);if(!n||n[1]!==t)throw new Error(`invalid identifier: ${t}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,n),this.inc("pre",t,n);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,n),this.inc("pre",t,n);break;case"release":if(0===this.prerelease.length)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const e=Number(n)?1:0;if(0===this.prerelease.length)this.prerelease=[e];else{let r=this.prerelease.length;for(;--r>=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);if(-1===r){if(t===this.prerelease.join(".")&&!1===n)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let r=[t,e];!1===n&&(r=[t]),0===o(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=r):this.prerelease=r}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return Eo=c}function nu(){if(Ao)return ko;Ao=1;const e=tu();return ko=(t,n,r=!1)=>{if(t instanceof e)return t;try{return new e(t,n)}catch(e){if(!r)return null;throw e}},ko}function ru(){if(Fo)return Ho;Fo=1;const e=tu();return Ho=(t,n,r)=>new e(t,r).compare(new e(n,r))}function iu(){if(Jo)return Go;Jo=1;const e=tu();return Go=(t,n,r)=>{const i=new e(t,r),s=new e(n,r);return i.compare(s)||i.compareBuild(s)}}function su(){if(nc)return tc;nc=1;const e=ru();return tc=(t,n,r)=>e(t,n,r)>0}function au(){if(ic)return rc;ic=1;const e=ru();return rc=(t,n,r)=>e(t,n,r)<0}function ou(){if(ac)return sc;ac=1;const e=ru();return sc=(t,n,r)=>0===e(t,n,r)}function cu(){if(cc)return oc;cc=1;const e=ru();return oc=(t,n,r)=>0!==e(t,n,r)}function uu(){if(lc)return uc;lc=1;const e=ru();return uc=(t,n,r)=>e(t,n,r)>=0}function lu(){if(pc)return dc;pc=1;const e=ru();return dc=(t,n,r)=>e(t,n,r)<=0}function du(){if(hc)return fc;hc=1;const e=ou(),t=cu(),n=su(),r=uu(),i=au(),s=lu();return fc=(a,o,c,u)=>{switch(o){case"===":return"object"==typeof a&&(a=a.version),"object"==typeof c&&(c=c.version),a===c;case"!==":return"object"==typeof a&&(a=a.version),"object"==typeof c&&(c=c.version),a!==c;case"":case"=":case"==":return e(a,c,u);case"!=":return t(a,c,u);case">":return n(a,c,u);case">=":return r(a,c,u);case"<":return i(a,c,u);case"<=":return s(a,c,u);default:throw new TypeError(`Invalid operator: ${o}`)}}}function pu(){if(wc)return vc;wc=1;const e=/\s+/g;class t{constructor(n,r){if(r=i(r),n instanceof t)return n.loose===!!r.loose&&n.includePrerelease===!!r.includePrerelease?n:new t(n.raw,r);if(n instanceof s)return this.raw=n.value,this.set=[[n]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=n.trim().replace(e," "),this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!m(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&g(e[0])){this.set=[e];break}}this.formatted=void 0}get range(){if(void 0===this.formatted){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");const t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=" "),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&f)|(this.options.loose&&h))+":"+e,n=r.get(t);if(n)return n;const i=this.options.loose,o=i?c[u.HYPHENRANGELOOSE]:c[u.HYPHENRANGE];e=e.replace(o,M(this.options.includePrerelease)),a("hyphen replace",e),e=e.replace(c[u.COMPARATORTRIM],l),a("comparator trim",e),e=e.replace(c[u.TILDETRIM],d),a("tilde trim",e),e=e.replace(c[u.CARETTRIM],p),a("caret trim",e);let g=e.split(" ").map((e=>b(e,this.options))).join(" ").split(/\s+/).map((e=>T(e,this.options)));i&&(g=g.filter((e=>(a("loose invalid filter",e,this.options),!!e.match(c[u.COMPARATORLOOSE]))))),a("range list",g);const y=new Map,v=g.map((e=>new s(e,this.options)));for(const e of v){if(m(e))return[e];y.set(e.value,e)}y.size>1&&y.has("")&&y.delete("");const w=[...y.values()];return r.set(t,w),w}intersects(e,n){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some((t=>y(t,n)&&e.set.some((e=>y(e,n)&&t.every((t=>e.every((e=>t.intersects(e,n)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new o(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(R(this.set[t],e,this.options))return!0;return!1}}vc=t;const n=(bc||(bc=1,yc=class{constructor(){this.max=1e3,this.map=new Map}get(e){const t=this.map.get(e);return void 0===t?void 0:(this.map.delete(e),this.map.set(e,t),t)}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&void 0!==t){if(this.map.size>=this.max){const e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}),yc),r=new n,i=Qc(),s=fu(),a=Zc(),o=tu(),{safeRe:c,t:u,comparatorTrimReplace:l,tildeTrimReplace:d,caretTrimReplace:p}=Xc(),{FLAG_INCLUDE_PRERELEASE:f,FLAG_LOOSE:h}=Jc(),m=e=>"<0.0.0-0"===e.value,g=e=>""===e.value,y=(e,t)=>{let n=!0;const r=e.slice();let i=r.pop();for(;n&&r.length;)n=r.every((e=>i.intersects(e,t))),i=r.pop();return n},b=(e,t)=>(a("comp",e,t),e=_(e,t),a("caret",e),e=w(e,t),a("tildes",e),e=S(e,t),a("xrange",e),e=A(e,t),a("stars",e),e),v=e=>!e||"x"===e.toLowerCase()||"*"===e,w=(e,t)=>e.trim().split(/\s+/).map((e=>x(e,t))).join(" "),x=(e,t)=>{const n=t.loose?c[u.TILDELOOSE]:c[u.TILDE];return e.replace(n,((t,n,r,i,s)=>{let o;return a("tilde",e,t,n,r,i,s),v(n)?o="":v(r)?o=`>=${n}.0.0 <${+n+1}.0.0-0`:v(i)?o=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:s?(a("replaceTilde pr",s),o=`>=${n}.${r}.${i}-${s} <${n}.${+r+1}.0-0`):o=`>=${n}.${r}.${i} <${n}.${+r+1}.0-0`,a("tilde return",o),o}))},_=(e,t)=>e.trim().split(/\s+/).map((e=>E(e,t))).join(" "),E=(e,t)=>{a("caret",e,t);const n=t.loose?c[u.CARETLOOSE]:c[u.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,((t,n,i,s,o)=>{let c;return a("caret",e,t,n,i,s,o),v(n)?c="":v(i)?c=`>=${n}.0.0${r} <${+n+1}.0.0-0`:v(s)?c="0"===n?`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.0${r} <${+n+1}.0.0-0`:o?(a("replaceCaret pr",o),c="0"===n?"0"===i?`>=${n}.${i}.${s}-${o} <${n}.${i}.${+s+1}-0`:`>=${n}.${i}.${s}-${o} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${s}-${o} <${+n+1}.0.0-0`):(a("no pr"),c="0"===n?"0"===i?`>=${n}.${i}.${s}${r} <${n}.${i}.${+s+1}-0`:`>=${n}.${i}.${s}${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${s} <${+n+1}.0.0-0`),a("caret return",c),c}))},S=(e,t)=>(a("replaceXRanges",e,t),e.split(/\s+/).map((e=>k(e,t))).join(" ")),k=(e,t)=>{e=e.trim();const n=t.loose?c[u.XRANGELOOSE]:c[u.XRANGE];return e.replace(n,((n,r,i,s,o,c)=>{a("xRange",e,n,r,i,s,o,c);const u=v(i),l=u||v(s),d=l||v(o),p=d;return"="===r&&p&&(r=""),c=t.includePrerelease?"-0":"",u?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&p?(l&&(s=0),o=0,">"===r?(r=">=",l?(i=+i+1,s=0,o=0):(s=+s+1,o=0)):"<="===r&&(r="<",l?i=+i+1:s=+s+1),"<"===r&&(c="-0"),n=`${r+i}.${s}.${o}${c}`):l?n=`>=${i}.0.0${c} <${+i+1}.0.0-0`:d&&(n=`>=${i}.${s}.0${c} <${i}.${+s+1}.0-0`),a("xRange return",n),n}))},A=(e,t)=>(a("replaceStars",e,t),e.trim().replace(c[u.STAR],"")),T=(e,t)=>(a("replaceGTE0",e,t),e.trim().replace(c[t.includePrerelease?u.GTE0PRE:u.GTE0],"")),M=e=>(t,n,r,i,s,a,o,c,u,l,d,p)=>`${n=v(r)?"":v(i)?`>=${r}.0.0${e?"-0":""}`:v(s)?`>=${r}.${i}.0${e?"-0":""}`:a?`>=${n}`:`>=${n}${e?"-0":""}`} ${c=v(u)?"":v(l)?`<${+u+1}.0.0-0`:v(d)?`<${u}.${+l+1}.0-0`:p?`<=${u}.${l}.${d}-${p}`:e?`<${u}.${l}.${+d+1}-0`:`<=${c}`}`.trim(),R=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(a(e[n].semver),e[n].semver!==s.ANY&&e[n].semver.prerelease.length>0){const r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0};return vc}function fu(){if(_c)return xc;_c=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(r,i){if(i=n(i),r instanceof t){if(r.loose===!!i.loose)return r;r=r.value}r=r.trim().split(/\s+/).join(" "),a("comparator",r,i),this.options=i,this.loose=!!i.loose,this.parse(r),this.semver===e?this.value="":this.value=this.operator+this.semver.version,a("comp",this)}parse(t){const n=this.options.loose?r[i.COMPARATORLOOSE]:r[i.COMPARATOR],s=t.match(n);if(!s)throw new TypeError(`Invalid comparator: ${t}`);this.operator=void 0!==s[1]?s[1]:"","="===this.operator&&(this.operator=""),s[2]?this.semver=new o(s[2],this.options.loose):this.semver=e}toString(){return this.value}test(t){if(a("Comparator.test",t,this.options.loose),this.semver===e||t===e)return!0;if("string"==typeof t)try{t=new o(t,this.options)}catch(e){return!1}return s(t,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new c(e.value,r).test(this.value):""===e.operator?""===e.value||new c(this.value,r).test(e.semver):(!(r=n(r)).includePrerelease||"<0.0.0-0"!==this.value&&"<0.0.0-0"!==e.value)&&(!(!r.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0")))&&(!(!this.operator.startsWith(">")||!e.operator.startsWith(">"))||(!(!this.operator.startsWith("<")||!e.operator.startsWith("<"))||(!(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))||(!!(s(this.semver,"<",e.semver,r)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))||!!(s(this.semver,">",e.semver,r)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))))))}}xc=t;const n=Qc(),{safeRe:r,t:i}=Xc(),s=du(),a=Zc(),o=tu(),c=pu();return xc}function hu(){if(Sc)return Ec;Sc=1;const e=pu();return Ec=(t,n,r)=>{try{n=new e(n,r)}catch(e){return!1}return n.test(t)},Ec}function mu(){if(Cc)return Pc;Cc=1;const e=pu();return Pc=(t,n)=>{try{return new e(t,n).range||"*"}catch(e){return null}},Pc}function gu(){if(Lc)return jc;Lc=1;const e=tu(),t=fu(),{ANY:n}=t,r=pu(),i=hu(),s=su(),a=au(),o=lu(),c=uu();return jc=(u,l,d,p)=>{let f,h,m,g,y;switch(u=new e(u,p),l=new r(l,p),d){case">":f=s,h=o,m=a,g=">",y=">=";break;case"<":f=a,h=c,m=s,g="<",y="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(i(u,l,p))return!1;for(let e=0;e<l.set.length;++e){const r=l.set[e];let i=null,s=null;if(r.forEach((e=>{e.semver===n&&(e=new t(">=0.0.0")),i=i||e,s=s||e,f(e.semver,i.semver,p)?i=e:m(e.semver,s.semver,p)&&(s=e)})),i.operator===g||i.operator===y)return!1;if((!s.operator||s.operator===g)&&h(u,s.semver))return!1;if(s.operator===y&&m(u,s.semver))return!1}return!0},jc}var yu,bu,vu,wu=function(){if(Wc)return Kc;Wc=1;const e=Xc(),t=Jc(),n=tu(),r=eu(),i=nu(),s=function(){if(Mo)return To;Mo=1;const e=nu();return To=(t,n)=>{const r=e(t,n);return r?r.version:null},To}(),a=function(){if(Oo)return Ro;Oo=1;const e=nu();return Ro=(t,n)=>{const r=e(t.trim().replace(/^[=v]+/,""),n);return r?r.version:null},Ro}(),o=function(){if(No)return Io;No=1;const e=tu();return Io=(t,n,r,i,s)=>{"string"==typeof r&&(s=i,i=r,r=void 0);try{return new e(t instanceof e?t.version:t,r).inc(n,i,s).version}catch(e){return null}},Io}(),c=function(){if(Co)return Po;Co=1;const e=nu();return Po=(t,n)=>{const r=e(t,null,!0),i=e(n,null,!0),s=r.compare(i);if(0===s)return null;const a=s>0,o=a?r:i,c=a?i:r,u=!!o.prerelease.length;if(c.prerelease.length&&!u){if(!c.patch&&!c.minor)return"major";if(0===c.compareMain(o))return c.minor&&!c.patch?"minor":"patch"}const l=u?"pre":"";return r.major!==i.major?l+"major":r.minor!==i.minor?l+"minor":r.patch!==i.patch?l+"patch":"prerelease"}}(),u=function(){if(Lo)return jo;Lo=1;const e=tu();return jo=(t,n)=>new e(t,n).major}(),l=function(){if($o)return Do;$o=1;const e=tu();return Do=(t,n)=>new e(t,n).minor}(),d=function(){if(Bo)return Uo;Bo=1;const e=tu();return Uo=(t,n)=>new e(t,n).patch}(),p=function(){if(qo)return zo;qo=1;const e=nu();return zo=(t,n)=>{const r=e(t,n);return r&&r.prerelease.length?r.prerelease:null},zo}(),f=ru(),h=function(){if(Vo)return Yo;Vo=1;const e=ru();return Yo=(t,n,r)=>e(n,t,r)}(),m=function(){if(Wo)return Ko;Wo=1;const e=ru();return Ko=(t,n)=>e(t,n,!0)}(),g=iu(),y=function(){if(Xo)return Zo;Xo=1;const e=iu();return Zo=(t,n)=>t.sort(((t,r)=>e(t,r,n)))}(),b=function(){if(ec)return Qo;ec=1;const e=iu();return Qo=(t,n)=>t.sort(((t,r)=>e(r,t,n)))}(),v=su(),w=au(),x=ou(),_=cu(),E=uu(),S=lu(),k=du(),A=function(){if(gc)return mc;gc=1;const e=tu(),t=nu(),{safeRe:n,t:r}=Xc();return mc=(i,s)=>{if(i instanceof e)return i;if("number"==typeof i&&(i=String(i)),"string"!=typeof i)return null;let a=null;if((s=s||{}).rtl){const e=s.includePrerelease?n[r.COERCERTLFULL]:n[r.COERCERTL];let t;for(;(t=e.exec(i))&&(!a||a.index+a[0].length!==i.length);)a&&t.index+t[0].length===a.index+a[0].length||(a=t),e.lastIndex=t.index+t[1].length+t[2].length;e.lastIndex=-1}else a=i.match(s.includePrerelease?n[r.COERCEFULL]:n[r.COERCE]);if(null===a)return null;const o=a[2],c=a[3]||"0",u=a[4]||"0",l=s.includePrerelease&&a[5]?`-${a[5]}`:"",d=s.includePrerelease&&a[6]?`+${a[6]}`:"";return t(`${o}.${c}.${u}${l}${d}`,s)},mc}(),T=fu(),M=pu(),R=hu(),O=function(){if(Ac)return kc;Ac=1;const e=pu();return kc=(t,n)=>new e(t,n).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" "))),kc}(),I=function(){if(Mc)return Tc;Mc=1;const e=tu(),t=pu();return Tc=(n,r,i)=>{let s=null,a=null,o=null;try{o=new t(r,i)}catch(e){return null}return n.forEach((t=>{o.test(t)&&(s&&-1!==a.compare(t)||(s=t,a=new e(s,i)))})),s},Tc}(),N=function(){if(Oc)return Rc;Oc=1;const e=tu(),t=pu();return Rc=(n,r,i)=>{let s=null,a=null,o=null;try{o=new t(r,i)}catch(e){return null}return n.forEach((t=>{o.test(t)&&(s&&1!==a.compare(t)||(s=t,a=new e(s,i)))})),s},Rc}(),P=function(){if(Nc)return Ic;Nc=1;const e=tu(),t=pu(),n=su();return Ic=(r,i)=>{r=new t(r,i);let s=new e("0.0.0");if(r.test(s))return s;if(s=new e("0.0.0-0"),r.test(s))return s;s=null;for(let t=0;t<r.set.length;++t){const i=r.set[t];let a=null;i.forEach((t=>{const r=new e(t.semver.version);switch(t.operator){case">":0===r.prerelease.length?r.patch++:r.prerelease.push(0),r.raw=r.format();case"":case">=":a&&!n(r,a)||(a=r);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${t.operator}`)}})),!a||s&&!n(s,a)||(s=a)}return s&&r.test(s)?s:null},Ic}(),C=mu(),j=gu(),L=function(){if($c)return Dc;$c=1;const e=gu();return Dc=(t,n,r)=>e(t,n,">",r),Dc}(),D=function(){if(Bc)return Uc;Bc=1;const e=gu();return Uc=(t,n,r)=>e(t,n,"<",r),Uc}(),$=function(){if(qc)return zc;qc=1;const e=pu();return zc=(t,n,r)=>(t=new e(t,r),n=new e(n,r),t.intersects(n,r)),zc}(),U=function(){if(Fc)return Hc;Fc=1;const e=hu(),t=ru();return Hc=(n,r,i)=>{const s=[];let a=null,o=null;const c=n.sort(((e,n)=>t(e,n,i)));for(const t of c)e(t,r,i)?(o=t,a||(a=t)):(o&&s.push([a,o]),o=null,a=null);a&&s.push([a,null]);const u=[];for(const[e,t]of s)e===t?u.push(e):t||e!==c[0]?t?e===c[0]?u.push(`<=${t}`):u.push(`${e} - ${t}`):u.push(`>=${e}`):u.push("*");const l=u.join(" || "),d="string"==typeof r.raw?r.raw:String(r);return l.length<d.length?l:r},Hc}(),B=function(){if(Vc)return Yc;Vc=1;const e=pu(),t=fu(),{ANY:n}=t,r=hu(),i=ru(),s=[new t(">=0.0.0-0")],a=[new t(">=0.0.0")],o=(e,t,o)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===n){if(1===t.length&&t[0].semver===n)return!0;e=o.includePrerelease?s:a}if(1===t.length&&t[0].semver===n){if(o.includePrerelease)return!0;t=a}const l=new Set;let d,p,f,h,m,g,y;for(const t of e)">"===t.operator||">="===t.operator?d=c(d,t,o):"<"===t.operator||"<="===t.operator?p=u(p,t,o):l.add(t.semver);if(l.size>1)return null;if(d&&p){if(f=i(d.semver,p.semver,o),f>0)return null;if(0===f&&(">="!==d.operator||"<="!==p.operator))return null}for(const e of l){if(d&&!r(e,String(d),o))return null;if(p&&!r(e,String(p),o))return null;for(const n of t)if(!r(e,String(n),o))return!1;return!0}let b=!(!p||o.includePrerelease||!p.semver.prerelease.length)&&p.semver,v=!(!d||o.includePrerelease||!d.semver.prerelease.length)&&d.semver;b&&1===b.prerelease.length&&"<"===p.operator&&0===b.prerelease[0]&&(b=!1);for(const e of t){if(y=y||">"===e.operator||">="===e.operator,g=g||"<"===e.operator||"<="===e.operator,d)if(v&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===v.major&&e.semver.minor===v.minor&&e.semver.patch===v.patch&&(v=!1),">"===e.operator||">="===e.operator){if(h=c(d,e,o),h===e&&h!==d)return!1}else if(">="===d.operator&&!r(d.semver,String(e),o))return!1;if(p)if(b&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===b.major&&e.semver.minor===b.minor&&e.semver.patch===b.patch&&(b=!1),"<"===e.operator||"<="===e.operator){if(m=u(p,e,o),m===e&&m!==p)return!1}else if("<="===p.operator&&!r(p.semver,String(e),o))return!1;if(!e.operator&&(p||d)&&0!==f)return!1}return!(d&&g&&!p&&0!==f||p&&y&&!d&&0!==f||v||b)},c=(e,t,n)=>{if(!e)return t;const r=i(e.semver,t.semver,n);return r>0?e:r<0||">"===t.operator&&">="===e.operator?t:e},u=(e,t,n)=>{if(!e)return t;const r=i(e.semver,t.semver,n);return r<0?e:r>0||"<"===t.operator&&"<="===e.operator?t:e};return Yc=(t,n,r={})=>{if(t===n)return!0;t=new e(t,r),n=new e(n,r);let i=!1;e:for(const e of t.set){for(const t of n.set){const n=o(e,t,r);if(i=i||null!==n,n)continue e}if(i)return!1}return!0},Yc}();return Kc={parse:i,valid:s,clean:a,inc:o,diff:c,major:u,minor:l,patch:d,prerelease:p,compare:f,rcompare:h,compareLoose:m,compareBuild:g,sort:y,rsort:b,gt:v,lt:w,eq:x,neq:_,gte:E,lte:S,cmp:k,coerce:A,Comparator:T,Range:M,satisfies:R,toComparators:O,maxSatisfying:I,minSatisfying:N,minVersion:P,validRange:C,outside:j,gtr:L,ltr:D,intersects:$,simplifyRange:U,subset:B,SemVer:n,re:e.re,src:e.src,tokens:e.t,SEMVER_SPEC_VERSION:t.SEMVER_SPEC_VERSION,RELEASE_TYPES:t.RELEASE_TYPES,compareIdentifiers:r.compareIdentifiers,rcompareIdentifiers:r.rcompareIdentifiers}}();!function(e){e.LEDGER="ledger",e.HTTP_ADAPTER="http-adapter",e.EVENTS_ADAPTER="events-adapter",e.FILESYSTEM_ADAPTER="filesystem-adapter",e.WASM_CHECKPOINTER="wasm-checkpointer",e.WASM_INSTRUMENTER="wasm-instrumenter",e.WASM_RUNNER="wasm-runner"}(yu||(yu={})),function(e){e.FAILED="failed",e.SUCCEED="succeed",e.RUNNING="running"}(bu||(bu={})),function(e){e.BINDLE="bindle",e.S3="s3"}(vu||(vu={}));var xu,_u,Eu,Su,ku,Au,Tu,Mu;!function(e){e.TASK_CREATED="task_created",e.TASK_SOLVED="task_solved",e.FILE_SYSTEM="file_system",e.DISPATCH_TASK="dispatch_task",e.DISPATCH_API_TASK="dispatch_api_task",e.MESSAGE_SAVED="message_saved",e.COMPUTED_OUTCOME="computed_outcome",e.API_FETCH="api_fetch",e.API_OUTCOME="api_outcome",e.API_SOLVED="api_solved",e.READY_TO_SHUTDOWN="ready_to_shutdown",e.INVOICE="invoice",e.ENTITLEMENT="entitlement",e.HEALTH_CHECK="health_check",e.RUNNER_TASK_EXECUTED="runner_task_executed",e.DEPLOYER_EXECUTE_TASK="deployer_execute_task",e.DEPLOYER_TASK_EXECUTED="deployer_task_executed",e.HTTP_ADAPTER_TASK_EXECUTED="http_adapter_task_executed",e.HTTP_ADAPTER_TASK_INSTRUMENTED="http_adapter_task_instrumented",e.HTTP_ADAPTER_TASK_PUSHED="http_adapter_task_pushed",e.HTTP_ADAPTER_TASK_PULLED="http_adapter_task_pulled",e.HTTP_ADAPTER_TASK_CHECKPOINTED="http_adapter_task_checkpointed",e.HTTP_ADAPTER_TASK_CHECKPOINTS_LISTED="http_adapter_task_checkpoints_listed",e.HTTP_ADAPTER_READY_TO_SHUTDOWN="http_adapter_ready_to_shutdown",e.EVENTS_ADAPTER_TASK_EXECUTED="events_adapter_task_executed",e.EVENTS_ADAPTER_TASK_INSTRUMENTED="events_adapter_task_instrumented",e.EVENTS_ADAPTER_TASK_PUSHED="events_adapter_task_pushed",e.EVENTS_ADAPTER_TASK_PULLED="events_adapter_task_pulled",e.EVENTS_ADAPTER_TASK_CHECKPOINTED="events_adapter_task_checkpointed",e.EVENTS_ADAPTER_TASK_CHECKPOINTS_LISTED="events_adapter_task_checkpoints_listed",e.EVENTS_ADAPTER_COMPUTED_OUTCOME="events_adapter_compute_outcome",e.EVENTS_ADAPTER_TASK_CREATED="events_adapter_task_created",e.EVENTS_ADAPTER_NODE_DEREGISTERED="events_adapter_node_deregistered",e.EVENTS_ADAPTER_SERVICE_STARTED_CHECK="events_adapter_service_started_check",e.DISPATCHER_TASK_SOLVED_CLEAR="dispatcher_task_solved_clear",e.DISPATCHER_TASK_CREATED="dispatcher_task_created",e.WASM_INSTRUMENTER_INSTRUMENT_TASK="wasm_instrumenter_instrument_task",e.WASM_INSTRUMENTER_TASK_INSTRUMENTED="wasm_instrumenter_task_instrumented",e.FILESYSTEM_ADAPTER_PUSH_TASK="filesystem_adapter_push_task",e.FILESYSTEM_ADAPTER_TASK_PUSHED="filesystem_adapter_task_pushed",e.FILESYSTEM_ADAPTER_PULL_TASK="filesystem_adapter_pull_task",e.FILESYSTEM_ADAPTER_TASK_PULLED="filesystem_adapter_task_pulled",e.FILESYSTEM_ADAPTER_SERVICE_STARTED_CHECK="filesystem_adapter_service_started_check",e.WASM_CHECKPOINTER_CHECKPOINT_TASK="wasm_checkpointer_checkpoint_task",e.WASM_CHECKPOINTER_LIST_TASK_CHECKPOINTS="wasm_checkpointer_list_task_checkpoints",e.TRANSCRIPT_WRITER_SAVE_MESSAGE="transcript_writer_save_message",e.TRANSCRIPT_WRITER_INVOICE="transcript_writer_save_invoice",e.SEQUENCER_MESSAGE_SAVED="sequencer_message_saved",e.VERIFICATION_MESSAGE_SAVED="verification_message_saved",e.VERIFICATION_VALIDATE_MESSAGE="verification_validate_message",e.VERIFICATION_REVEAL_SOLUTION="verification_reveal_solution",e.VERIFICATION_ERRORS="verification_errors",e.LEDGER_SHUTDOWN="ledger_shutdown",e.LEDGER_SERVICE_STARTED="ledger_service_started"}(xu||(xu={})),function(e){e.TASK_INSTRUMENTED="task_instrumented",e.TASK_CREATED="task_created",e.API_TASK_CREATED="api_task_created",e.TASK_EXECUTED="task_executed",e.TASK_PUSHED="task_pushed",e.TASK_PULLED="task_pulled",e.TASK_CHECKPOINTED="task_checkpointed",e.TASK_CHECKPOINTS_LISTED="task_checkpoints_listed",e.COMPUTED_OUTCOME="computed_outcome",e.MESSAGE_SAVED="message_saved",e.TASK_SOLVED="task_solved",e.TASK_SOLVED_CLEAR="task_solved_clear",e.NODE_OUTCOME="node_outcome",e.PLATFORM_ERRORS="errors",e.REVEAL_SOLUTIONS="reveal_solutions",e.SOLUTIONS_REVEALED="solutions_revealed",e.API_FETCHER_OUTCOME="api_fetcher_outcome",e.API_SOLVED="api_solved",e.API_OUTCOME="api_outcome",e.NODE_DEREGISTERED="node_deregistered",e.READY_TO_SHUTDOWN="ready_to_shutdown",e.EXECUTION_COMPLETED="execution_completed",e.SERVICE_STARTED="service_started",e.INVOICE="invoice",e.ENTITLEMENT_REQ="entitlement_req",e.ENTITLEMENT_RES="entitlement_res",e.HEALTH_CHECK="health_check",e.EXECUTION_METADATA="execution_metadata"}(_u||(_u={})),function(e){e.SHUTDOWN="shutdown",e.LIST_TASK_CHECKPOINTS="list_task_checkpoints",e.EXECUTE_TASK="execute_task",e.CHECKPOINT_TASK="checkpoint_task",e.INSTRUMENT_TASK="instrument_task",e.PUSH_TASK="push_task",e.PULL_TASK="pull_task",e.DISPATCH_TASK="dispatch_task",e.DISPATCH_API_TASK="dispatch_api_task",e.SAVE_MESSAGE="save_message",e.REVEAL_SOLUTION="reveal_solution",e.VALIDATE_MESSAGE="validate_message",e.API_FETCH="api_fetch",e.ENTITLEMENT="entitlement",e.HEALTH_CHECK="health_check"}(Eu||(Eu={})),function(e){e.ERRORS="errors",e.TASK_INSTRUMENTED="task_instrumented",e.TASK_CREATED="task_created",e.API_TASK_CREATED="api_task_created",e.TASK_EXECUTED="task_executed",e.TASK_PUSHED="task_pushed",e.TASK_SOLVED="task_solved",e.TASK_SOLVED_CLEAR="task_solved_clear",e.TASK_PULLED="task_pulled",e.TASK_CHECKPOINTED="task_checkpointed",e.TASK_CHECKPOINTS_LISTED="task_checkpoints_listed",e.COMPUTED_OUTCOME="computed_outcome",e.MESSAGE_SAVED="message_saved",e.API_FETCHER_OUTCOME="api_fetcher_outcome",e.API_SOLVED="api_solved",e.API_OUTCOME="api_outcome",e.NODE_DEREGISTERED="node_deregistered",e.READY_TO_SHUTDOWN="ready_to_shutdown",e.SERVICE_STARTED="service_started",e.INVOICES="invoice",e.ENTITLEMENTS_REQ="entitlement_req",e.ENTITLEMENTS_RES="entitlement_res",e.HEALTH_CHECK="health_check",e.SHUTDOWN="shutdown",e.LIST_TASK_CHECKPOINTS="list_task_checkpoints",e.EXECUTE_TASK="execute_task",e.CHECKPOINT_TASK="checkpoint_task",e.INSTRUMENT_TASK="instrument_task",e.PUSH_TASK="push_task",e.PULL_TASK="pull_task",e.DISPATCH_TASK="dispatch_task",e.DISPATCH_API_TASK="dispatch_api_task",e.SAVE_MESSAGE="save_message",e.REVEAL_SOLUTION="reveal_solution",e.VALIDATE_MESSAGE="validate_message",e.API_FETCH="api_fetch",e.DUMMY="DUMMY"}(Su||(Su={})),function(e){e.VALIDATION_ERROR="validation_error"}(ku||(ku={})),function(e){e.GAME_PENDING="GamePending",e.READY_FOR_INVOICE="ReadyForInvoice",e.ERROR="Error"}(Au||(Au={})),function(e){!function(e){e.Pay="pay",e.Charge="charge"}(e.Operation||(e.Operation={})),(e.EntitlementOperation||(e.EntitlementOperation={})).IS_USER_REGISTER="isUserRegister"}(Tu||(Tu={})),function(e){e.Pay="pay",e.Charge="charge"}(Mu||(Mu={})),_u.TASK_SOLVED,_u.TASK_CREATED,_u.API_TASK_CREATED,_u.NODE_OUTCOME,_u.SOLUTIONS_REVEALED,_u.REVEAL_SOLUTIONS,_u.API_OUTCOME,_u.EXECUTION_COMPLETED,_u.EXECUTION_METADATA;var Ru=function(e){this.groups=[],this.each=!1,this.context=void 0,this.type=e.type,this.name=e.name,this.target=e.target,this.propertyName=e.propertyName,this.constraints=null==e?void 0:e.constraints,this.constraintCls=e.constraintCls,this.validationTypeOptions=e.validationTypeOptions,e.validationOptions&&(this.message=e.validationOptions.message,this.groups=e.validationOptions.groups,this.always=e.validationOptions.always,this.each=e.validationOptions.each,this.context=e.validationOptions.context)},Ou=function(){function e(){}return e.prototype.transform=function(e){var t=[];return Object.keys(e.properties).forEach((function(n){e.properties[n].forEach((function(r){var i={message:r.message,groups:r.groups,always:r.always,each:r.each},s={type:r.type,name:r.name,target:e.name,propertyName:n,constraints:r.constraints,validationTypeOptions:r.options,validationOptions:i};t.push(new Ru(s))}))})),t},e}();function Iu(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:void 0}var Nu=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Pu=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,s=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=s.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=s.return)&&n.call(s)}finally{if(i)throw i.error}}return a},Cu=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,s=t.length;i<s;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},ju=function(){function e(){this.validationMetadatas=new Map,this.constraintMetadatas=new Map}return Object.defineProperty(e.prototype,"hasValidationMetaData",{get:function(){return!!this.validationMetadatas.size},enumerable:!1,configurable:!0}),e.prototype.addValidationSchema=function(e){var t=this;(new Ou).transform(e).forEach((function(e){return t.addValidationMetadata(e)}))},e.prototype.addValidationMetadata=function(e){var t=this.validationMetadatas.get(e.target);t?t.push(e):this.validationMetadatas.set(e.target,[e])},e.prototype.addConstraintMetadata=function(e){var t=this.constraintMetadatas.get(e.target);t?t.push(e):this.constraintMetadatas.set(e.target,[e])},e.prototype.groupByPropertyName=function(e){var t={};return e.forEach((function(e){t[e.propertyName]||(t[e.propertyName]=[]),t[e.propertyName].push(e)})),t},e.prototype.getTargetValidationMetadatas=function(e,t,n,r,i){var s,a,o=function(e){return void 0!==e.always?e.always:(!e.groups||!e.groups.length)&&n},c=function(e){return!(!r||i&&i.length||!e.groups||!e.groups.length)},u=(this.validationMetadatas.get(e)||[]).filter((function(n){return(n.target===e||n.target===t)&&(!!o(n)||!c(n)&&(!(i&&i.length>0)||n.groups&&!!n.groups.find((function(e){return-1!==i.indexOf(e)}))))})),l=[];try{for(var d=Nu(this.validationMetadatas.entries()),p=d.next();!p.done;p=d.next()){var f=Pu(p.value,2),h=f[0],m=f[1];e.prototype instanceof h&&l.push.apply(l,Cu([],Pu(m),!1))}}catch(e){s={error:e}}finally{try{p&&!p.done&&(a=d.return)&&a.call(d)}finally{if(s)throw s.error}}var g=l.filter((function(t){return"string"!=typeof t.target&&(t.target!==e&&((!(t.target instanceof Function)||e.prototype instanceof t.target)&&(!!o(t)||!c(t)&&(!(i&&i.length>0)||t.groups&&!!t.groups.find((function(e){return-1!==i.indexOf(e)}))))))})),y=g.filter((function(e){return!u.find((function(t){return t.propertyName===e.propertyName&&t.type===e.type}))}));return u.concat(y)},e.prototype.getTargetValidatorConstraints=function(e){return this.constraintMetadatas.get(e)||[]},e}();function Lu(){var e=Iu();return e.classValidatorMetadataStorage||(e.classValidatorMetadataStorage=new ju),e.classValidatorMetadataStorage}var Du=function(){function e(){}return e.isValid=function(e){var t=this;return"isValid"!==e&&"getMessage"!==e&&-1!==Object.keys(this).map((function(e){return t[e]})).indexOf(e)},e.CUSTOM_VALIDATION="customValidation",e.NESTED_VALIDATION="nestedValidation",e.PROMISE_VALIDATION="promiseValidation",e.CONDITIONAL_VALIDATION="conditionalValidation",e.WHITELIST="whitelistValidation",e.IS_DEFINED="isDefined",e}(),$u=new(function(){function e(){this.instances=[]}return e.prototype.get=function(e){var t=this.instances.find((function(t){return t.type===e}));return t||(t={type:e,object:new e},this.instances.push(t)),t.object},e}());function Uu(e){return $u.get(e)}function Bu(e){return function(t,n){var r={type:Du.WHITELIST,target:t.constructor,propertyName:n,validationOptions:e};Lu().addValidationMetadata(new Ru(r))}}var zu=function(){function e(e,t,n){void 0===n&&(n=!1),this.target=e,this.name=t,this.async=n}return Object.defineProperty(e.prototype,"instance",{get:function(){return Uu(this.target)},enumerable:!1,configurable:!0}),e}();function qu(e){var t;if(e.validator instanceof Function){if(t=e.validator,Uu(ju).getTargetValidatorConstraints(e.validator).length>1)throw"More than one implementation of ValidatorConstraintInterface found for validator on: ".concat(e.target.name,":").concat(e.propertyName)}else{var n=e.validator;t=function(){function e(){}return e.prototype.validate=function(e,t){return n.validate(e,t)},e.prototype.defaultMessage=function(e){return n.defaultMessage?n.defaultMessage(e):""},e}(),Lu().addConstraintMetadata(new zu(t,e.name,e.async))}var r={type:e.name&&Du.isValid(e.name)?e.name:Du.CUSTOM_VALIDATION,name:e.name,target:e.target,propertyName:e.propertyName,validationOptions:e.options,constraintCls:t,constraints:e.constraints};Lu().addValidationMetadata(new Ru(r))}function Hu(e,t){return function(n){var r=t&&t.each?"each value in ":"";return e(r,n)}}function Fu(e,t){return function(n,r){qu({name:e.name,target:n.constructor,propertyName:r,options:t,constraints:e.constraints,validator:e.validator})}}function Yu(e){return function(t,n){var r={type:Du.CONDITIONAL_VALIDATION,target:t.constructor,propertyName:n,constraints:[function(e,t){return null!==e[n]&&void 0!==e[n]}],validationOptions:e};Lu().addValidationMetadata(new Ru(r))}}var Vu=function(){return Vu=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Vu.apply(this,arguments)};function Ku(e){var t=Vu({},e),n=t.each?"each value in ":"";return t.message=t.message||n+"nested property $property must be either object or array",function(e,n){var r={type:Du.NESTED_VALIDATION,target:e.constructor,propertyName:n,validationOptions:t};Lu().addValidationMetadata(new Ru(r))}}var Wu,Gu={exports:{}};function Ju(){return Wu||(Wu=1,function(e,t){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t="string"==typeof e||e instanceof String;if(!t){var r=n(e);throw null===e?r="null":"object"===r&&(r=e.constructor.name),new TypeError("Expected a string but received a ".concat(r))}},e.exports=t.default,e.exports.default=t.default}(Gu,Gu.exports)),Gu.exports}function Zu(e){return Fu({name:"isNotEmpty",validator:{validate:function(e,t){return function(e){return""!==e&&null!=e}(e)},defaultMessage:Hu((function(e){return e+"$property should not be empty"}),e)}},e)}function Xu(e,t){return Fu({name:"min",constraints:[e],validator:{validate:function(e,t){return function(e,t){return"number"==typeof e&&"number"==typeof t&&e>=t}(e,null==t?void 0:t.constraints[0])},defaultMessage:Hu((function(e){return e+"$property must not be less than $constraint1"}),t)}},t)}var Qu,el={exports:{}};function tl(){return Qu||(Qu=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,r.default)(e),null==t&&(t="all");return t in i&&i[t].test(e)};var n,r=(n=Ju())&&n.__esModule?n:{default:n};var i={1:/^[0-9A-F]{8}-[0-9A-F]{4}-1[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,2:/^[0-9A-F]{8}-[0-9A-F]{4}-2[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,3:/^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,4:/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,5:/^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,6:/^[0-9A-F]{8}-[0-9A-F]{4}-6[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,7:/^[0-9A-F]{8}-[0-9A-F]{4}-7[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,8:/^[0-9A-F]{8}-[0-9A-F]{4}-8[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,nil:/^00000000-0000-0000-0000-000000000000$/i,max:/^ffffffff-ffff-ffff-ffff-ffffffffffff$/i,all:/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i};e.exports=t.default,e.exports.default=t.default}(el,el.exports)),el.exports}var nl=we(tl());function rl(e,t){return Fu({name:"isUuid",constraints:[e],validator:{validate:function(e,t){return function(e,t){return"string"==typeof e&&nl(e,t)}(e,null==t?void 0:t.constraints[0])},defaultMessage:Hu((function(e){return e+"$property must be a UUID"}),t)}},t)}var il,sl={exports:{}};function al(){return il||(il=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,r.default)(e);var n=new RegExp("^[a-fA-F0-9]{".concat(i[t],"}$"));return n.test(e)};var n,r=(n=Ju())&&n.__esModule?n:{default:n};var i={md5:32,md4:32,sha1:40,sha256:64,sha384:96,sha512:128,ripemd128:32,ripemd160:40,tiger128:32,tiger160:40,tiger192:48,crc32:8,crc32b:8};e.exports=t.default,e.exports.default=t.default}(sl,sl.exports)),sl.exports}var ol=we(al());function cl(e,t){return Fu({name:"isHash",constraints:[e],validator:{validate:function(e,t){return function(e,t){return"string"==typeof e&&ol(e,t)}(e,null==t?void 0:t.constraints[0])},defaultMessage:Hu((function(e){return e+"$property must be a hash of type $constraint1"}),t)}},t)}var ul,ll={exports:{}};function dl(){return ul||(ul=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,r.default)(e),i.test(e)};var n,r=(n=Ju())&&n.__esModule?n:{default:n};var i=/^(0x)[0-9a-f]{40}$/i;e.exports=t.default,e.exports.default=t.default}(ll,ll.exports)),ll.exports}var pl=we(dl());function fl(e){return Fu({name:"isEthereumAddress",validator:{validate:function(e,t){return function(e){return"string"==typeof e&&pl(e)}(e)},defaultMessage:Hu((function(e){return e+"$property must be an Ethereum address"}),e)}},e)}function hl(e,t){return void 0===e&&(e={}),Fu({name:"isNumber",constraints:[e],validator:{validate:function(e,t){return function(e,t){if(void 0===t&&(t={}),"number"!=typeof e)return!1;if(e===1/0||e===-1/0)return!!t.allowInfinity;if(Number.isNaN(e))return!!t.allowNaN;if(void 0!==t.maxDecimalPlaces){var n=0;if(e%1!=0&&(n=e.toString().split(".")[1].length),n>t.maxDecimalPlaces)return!1}return Number.isFinite(e)}(e,null==t?void 0:t.constraints[0])},defaultMessage:Hu((function(e){return e+"$property must be a number conforming to the specified constraints"}),t)}},t)}var ml=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,s=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=s.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=s.return)&&n.call(s)}finally{if(i)throw i.error}}return a};function gl(e){return Object.entries(e).filter((function(e){var t=ml(e,2),n=t[0];return t[1],isNaN(parseInt(n))})).map((function(e){var t=ml(e,2);return t[0],t[1]}))}function yl(e,t){return Fu({name:"isEnum",constraints:[e,gl(e)],validator:{validate:function(e,t){return function(e,t){return Object.keys(t).map((function(e){return t[e]})).includes(e)}(e,null==t?void 0:t.constraints[0])},defaultMessage:Hu((function(e){return e+"$property must be one of the following values: $constraint2"}),t)}},t)}function bl(e){return Fu({name:"isString",validator:{validate:function(e,t){return function(e){return e instanceof String||"string"==typeof e}(e)},defaultMessage:Hu((function(e){return e+"$property must be a string"}),e)}},e)}function vl(){return function(e,t){qu({name:"IsUnixTimestamp",target:e.constructor,propertyName:t,validator:{validate(e){const t=e,n=new Date(t);return!isNaN(n.getTime())&&t>16725312e5}}})}}function wl(){return function(e,t){qu({name:"IsUnixTimestamp",target:e.constructor,propertyName:t,validator:{validate(e){const t=e,n=new Date(t);return!isNaN(n.getTime())&&t>1672531200}}})}}var xl,_l,El,Sl=function(e,t,n,r){var i,s=arguments.length,a=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(a=(s<3?i(a):s>3?i(t,n,a):i(t,n))||a);return s>3&&a&&Object.defineProperty(t,n,a),a},kl=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};!function(e){e.FAILED="failed",e.SUCCEED="succeed",e.RUNNING="running"}(xl||(xl={}));class Al{iv;ephemPublicKey;ciphertext;mac;constructor(e,t,n,r){this.iv=e,this.ephemPublicKey=t,this.ciphertext=n,this.mac=r}}Sl([Zu(),bl(),kl("design:type",String)],Al.prototype,"iv",void 0),Sl([Zu(),bl(),kl("design:type",String)],Al.prototype,"ephemPublicKey",void 0),Sl([Zu(),bl(),kl("design:type",String)],Al.prototype,"ciphertext",void 0),Sl([Zu(),bl(),kl("design:type",String)],Al.prototype,"mac",void 0);class Tl{v;r;s;constructor(e,t,n){this.v=e,this.r=t,this.s=n}}Sl([Zu(),hl(),kl("design:type",Number)],Tl.prototype,"v",void 0),Sl([Zu(),bl(),kl("design:type",String)],Tl.prototype,"r",void 0),Sl([Zu(),bl(),kl("design:type",String)],Tl.prototype,"s",void 0);class Ml{memoryGrowDelta;call;frame;steps;constructor(e,t,n,r){this.call=e,this.frame=t,this.steps=n,this.memoryGrowDelta=r}}Sl([hl(),Yu(),kl("design:type",Number)],Ml.prototype,"memoryGrowDelta",void 0),Sl([hl(),Zu(),kl("design:type",Number)],Ml.prototype,"call",void 0),Sl([hl(),Zu(),kl("design:type",Number)],Ml.prototype,"frame",void 0),Sl([hl(),Zu(),kl("design:type",Number)],Ml.prototype,"steps",void 0);class Rl{call;frame;gas;memory;constructor(e,t,n,r){this.call=e,this.frame=t,this.gas=n,this.memory=r}}Sl([hl(),Zu(),kl("design:type",Number)],Rl.prototype,"call",void 0),Sl([hl(),Zu(),kl("design:type",Number)],Rl.prototype,"frame",void 0),Sl([hl(),Zu(),kl("design:type",Number)],Rl.prototype,"gas",void 0),Sl([hl(),Zu(),kl("design:type",Number)],Rl.prototype,"memory",void 0);class Ol{call;frame;memory;constructor(e,t,n){this.call=e,this.frame=t,this.memory=n}}Sl([hl(),Zu(),kl("design:type",Number)],Ol.prototype,"call",void 0),Sl([hl(),Zu(),kl("design:type",Number)],Ol.prototype,"frame",void 0),Sl([hl(),Zu(),kl("design:type",Number)],Ol.prototype,"memory",void 0);class Il{protocol;constructor(e){this.protocol=e}}Sl([bl(),Zu(),kl("design:type",String)],Il.prototype,"protocol",void 0);class Nl{last;limits;peak;versions;constructor(e,t,n,r){this.last=e,this.limits=t,this.peak=n,this.versions=r}}Sl([Ku(),kl("design:type",Ml)],Nl.prototype,"last",void 0),Sl([Ku(),kl("design:type",Rl)],Nl.prototype,"limits",void 0),Sl([Ku(),kl("design:type",Ol)],Nl.prototype,"peak",void 0),Sl([Yu(),Ku(),kl("design:type",Il)],Nl.prototype,"versions",void 0);class Pl{senderAddress;status;output;metering;constructor(e,t,n,r){this.senderAddress=e,this.status=t,this.output=n,this.metering=r}}Sl([Zu(),fl(),kl("design:type",String)],Pl.prototype,"senderAddress",void 0),Sl([Zu(),yl(xl),kl("design:type",String)],Pl.prototype,"status",void 0),Sl([Yu(),bl(),kl("design:type",String)],Pl.prototype,"output",void 0),Sl([Yu(),Ku(),kl("design:type",Nl)],Pl.prototype,"metering",void 0);class Cl{signature;clearTextSolution;constructor(e,t){this.signature=e,this.clearTextSolution=t}}Sl([Ku(),kl("design:type",Tl)],Cl.prototype,"signature",void 0),Sl([Ku(),kl("design:type",Pl)],Cl.prototype,"clearTextSolution",void 0);class jl{blockNumber;selectionStrategy;setNodes;constructor(e,t,n){this.blockNumber=e,this.selectionStrategy=t,this.setNodes=Array.from(n)}}Sl([Zu(),Xu(0),kl("design:type",Number)],jl.prototype,"blockNumber",void 0),Sl([Zu(),bl(),kl("design:type",String)],jl.prototype,"selectionStrategy",void 0),Sl([Fu({name:"arrayNotEmpty",validator:{validate:function(e,t){return n=e,Array.isArray(n)&&n.length>0;var n},defaultMessage:Hu((function(e){return e+"$property should not be empty"}),_l)}},_l),Zu({each:!0}),fl({each:!0}),kl("design:type",Array)],jl.prototype,"setNodes",void 0);class Ll{gas;call;frame;memory;constructor(e,t,n,r){this.gas=e,this.call=t,this.frame=n,this.memory=r}}Sl([Zu(),bl(),kl("design:type",String)],Ll.prototype,"gas",void 0),Sl([Zu(),bl(),kl("design:type",String)],Ll.prototype,"call",void 0),Sl([Zu(),bl(),kl("design:type",String)],Ll.prototype,"frame",void 0),Sl([Zu(),bl(),kl("design:type",String)],Ll.prototype,"memory",void 0);class Dl{reward;requiredSolutions;totalSolutions;executionTimeout;constructor(e,t,n,r){this.reward=e,this.requiredSolutions=t,this.totalSolutions=n,this.executionTimeout=r}}Sl([Zu(),bl(),kl("design:type",String)],Dl.prototype,"reward",void 0),Sl([Xu(1),Zu(),hl(),kl("design:type",Number)],Dl.prototype,"requiredSolutions",void 0),Sl([Xu(1),Zu(),hl(),kl("design:type",Number)],Dl.prototype,"totalSolutions",void 0),Sl([Xu(1),Zu(),hl(),kl("design:type",Number)],Dl.prototype,"executionTimeout",void 0);class $l{request;response;constructor(e,t){this.request=e,this.response=t}}Sl([Zu(),hl(),kl("design:type",Number)],$l.prototype,"request",void 0),Sl([Zu(),hl(),kl("design:type",Number)],$l.prototype,"response",void 0),function(e){e.BINDLE="bindle",e.S3="s3"}(El||(El={}));var Ul,Bl=function(e,t,n,r){var i,s=arguments.length,a=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(a=(s<3?i(a):s>3?i(t,n,a):i(t,n))||a);return s>3&&a&&Object.defineProperty(t,n,a),a},zl=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};class ql{msgType;messageId;payload;msgTimestamp=Date.now();traceCarrier;constructor(e,t,n){this.msgType=this.constructor.name,this.traceCarrier=n,this.messageId=t||k(),this.payload=e}}Bl([Zu(),bl(),zl("design:type",String)],ql.prototype,"msgType",void 0),Bl([Yu(),rl(),zl("design:type",String)],ql.prototype,"messageId",void 0),Bl([Ku(),zl("design:type",Object)],ql.prototype,"payload",void 0),Bl([vl(),zl("design:type",Number)],ql.prototype,"msgTimestamp",void 0),Bl([Yu(),zl("design:type",Object)],ql.prototype,"traceCarrier",void 0);Bl([Zu(),bl(),zl("design:type",String)],class extends ql{error;constructor(e,t,n,r){super(t,n,r),this.error=e}}.prototype,"error",void 0);Bl([Zu(),bl(),zl("design:type",String)],class extends ql{error;constructor(e,t,n,r){super(t,n,r),this.error=e}}.prototype,"error",void 0),function(e){e.EVM="evm",e.AVALANCHE="avalanche"}(Ul||(Ul={}));var Hl,Fl=function(e,t,n,r){var i,s=arguments.length,a=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(a=(s<3?i(a):s>3?i(t,n,a):i(t,n))||a);return s>3&&a&&Object.defineProperty(t,n,a),a},Yl=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};!function(e){e.TASK_CREATED="task_created",e.API_TASK_CREATED="api_task_created",e.NODE_OUTCOME="node_outcome",e.TASK_SOLVED="task_solved",e.API_OUTCOME="api_outcome",e.SOLUTIONS_REVEALED="solutions_revealed",e.EXECUTION_COMPLETED="execution_completed"}(Hl||(Hl={}));class Vl{type;executionId;message;msgHash;signature;sequencerAddress;timestamp;constructor(e,t,n,r,i,s,a){this.type=e,this.executionId=t,this.message=r,this.msgHash=n,this.signature=new Tl(i.v,i.r,i.s),this.timestamp=a,this.sequencerAddress=s}}Fl([Zu(),yl(Hl),Yl("design:type",String)],Vl.prototype,"type",void 0),Fl([rl(),Zu(),Yl("design:type",String)],Vl.prototype,"executionId",void 0),Fl([Ku(),Yl("design:type",Object)],Vl.prototype,"message",void 0),Fl([Zu(),cl("sha256"),Yl("design:type",String)],Vl.prototype,"msgHash",void 0),Fl([Ku(),Yl("design:type",Tl)],Vl.prototype,"signature",void 0),Fl([Zu(),fl(),Yl("design:type",String)],Vl.prototype,"sequencerAddress",void 0),Fl([vl(),Zu(),Yl("design:type",Number)],Vl.prototype,"timestamp",void 0);class Kl{type="dispatch_task";taskId;executionId;msgHash;signature;limits;econParams;workers;dispatcherTimestamp;taskRequesterTimestamp;ledgerName;blockHash;blockNumber;chainId;nodeRegistryContractAddress;taskRegistryContractAddress;taskAuthorizationContractAddress;taskRequesterAddress;taskPath;taskVersion;signedRequestBody;senderAddress;input;constructor(e,t,n,r,i,s,a,o,c,u,l,d,p,f,h,m,g,y,b,v,w,x){this.taskId=e,this.executionId=t,this.msgHash=n,this.signature=new Tl(r.v,r.r,r.s),this.limits=new Ll(i.gas,i.call,i.frame,i.memory),this.econParams=new Dl(s.reward,s.requiredSolutions,s.totalSolutions,s.executionTimeout),this.workers=new jl(a.blockNumber,a.selectionStrategy,a.setNodes),this.dispatcherTimestamp=o,this.taskRequesterTimestamp=c,this.ledgerName=u,this.blockHash=l,this.blockNumber=d,this.chainId=p,this.nodeRegistryContractAddress=f,this.taskRegistryContractAddress=h,this.taskAuthorizationContractAddress=m,this.taskRequesterAddress=g,this.taskPath=y,this.taskVersion=b,this.signedRequestBody=x,this.senderAddress=v,this.input=w}}Fl([Zu(),bl(),Yl("design:type",String)],Kl.prototype,"taskId",void 0),Fl([Zu(),rl(),Yl("design:type",String)],Kl.prototype,"executionId",void 0),Fl([Zu(),cl("sha256"),Yl("design:type",String)],Kl.prototype,"msgHash",void 0),Fl([Ku(),Yl("design:type",Tl)],Kl.prototype,"signature",void 0),Fl([Ku(),Yl("design:type",Ll)],Kl.prototype,"limits",void 0),Fl([Ku(),Yl("design:type",Dl)],Kl.prototype,"econParams",void 0),Fl([Ku(),Yl("design:type",jl)],Kl.prototype,"workers",void 0),Fl([Zu(),wl(),Yl("design:type",Number)],Kl.prototype,"dispatcherTimestamp",void 0),Fl([Zu(),wl(),Yl("design:type",Number)],Kl.prototype,"taskRequesterTimestamp",void 0),Fl([Zu(),yl(Ul),Yl("design:type",String)],Kl.prototype,"ledgerName",void 0),Fl([Zu(),Yl("design:type",String)],Kl.prototype,"blockHash",void 0),Fl([Zu(),Xu(0),Yl("design:type",Number)],Kl.prototype,"blockNumber",void 0),Fl([Zu(),bl(),Yl("design:type",String)],Kl.prototype,"chainId",void 0),Fl([Zu(),fl(),Yl("design:type",String)],Kl.prototype,"nodeRegistryContractAddress",void 0),Fl([Zu(),fl(),Yl("design:type",String)],Kl.prototype,"taskRegistryContractAddress",void 0),Fl([Zu(),fl(),Yl("design:type",String)],Kl.prototype,"taskAuthorizationContractAddress",void 0),Fl([Zu(),fl(),Yl("design:type",String)],Kl.prototype,"taskRequesterAddress",void 0),Fl([Yu(),Yl("design:type",String)],Kl.prototype,"taskPath",void 0),Fl([Yu(),Xu(0),Yl("design:type",Number)],Kl.prototype,"taskVersion",void 0),Fl([Yu(),Yl("design:type",Object)],Kl.prototype,"signedRequestBody",void 0),Fl([Zu(),fl(),Yl("design:type",String)],Kl.prototype,"senderAddress",void 0),Fl([Yu(),Bu(),Yl("design:type",String)],Kl.prototype,"input",void 0);class Wl{type="dispatch_task";taskId;executionId;msgHash;signature;ledgerName;blockHash;blockNumber;chainId;taskRegistryContractAddress;taskAuthorizationContractAddress;taskRequesterAddress;taskPath;taskVersion;senderAddress;executionTimeout;input;constructor(e,t,n,r,i,s,a,o,c,u,l,d,p,f,h,m){this.taskId=e,this.executionId=t,this.msgHash=n,this.signature=new Tl(r.v,r.r,r.s),this.executionTimeout=h,this.ledgerName=s,this.blockHash=a,this.blockNumber=o,this.chainId=c,this.taskRegistryContractAddress=u,this.taskAuthorizationContractAddress=l,this.taskRequesterAddress=d,this.taskPath=p,this.taskVersion=f,this.senderAddress=i,this.input=m}}Fl([Zu(),bl(),Yl("design:type",String)],Wl.prototype,"taskId",void 0),Fl([Zu(),rl(),Yl("design:type",String)],Wl.prototype,"executionId",void 0),Fl([Zu(),cl("sha256"),Yl("design:type",String)],Wl.prototype,"msgHash",void 0),Fl([Ku(),Yl("design:type",Tl)],Wl.prototype,"signature",void 0),Fl([Zu(),yl(Ul),Yl("design:type",String)],Wl.prototype,"ledgerName",void 0),Fl([Zu(),Yl("design:type",String)],Wl.prototype,"blockHash",void 0),Fl([Zu(),Xu(0),Yl("design:type",Number)],Wl.prototype,"blockNumber",void 0),Fl([Zu(),bl(),Yl("design:type",String)],Wl.prototype,"chainId",void 0),Fl([Zu(),fl(),Yl("design:type",String)],Wl.prototype,"taskRegistryContractAddress",void 0),Fl([Zu(),fl(),Yl("design:type",String)],Wl.prototype,"taskAuthorizationContractAddress",void 0),Fl([Zu(),fl(),Yl("design:type",String)],Wl.prototype,"taskRequesterAddress",void 0),Fl([Yu(),Yl("design:type",String)],Wl.prototype,"taskPath",void 0),Fl([Yu(),Xu(0),Yl("design:type",Number)],Wl.prototype,"taskVersion",void 0),Fl([Zu(),fl(),Yl("design:type",String)],Wl.prototype,"senderAddress",void 0),Fl([hl(),Yl("design:type",Number)],Wl.prototype,"executionTimeout",void 0),Fl([Yu(),Bu(),Yl("design:type",String)],Wl.prototype,"input",void 0);class Gl{executionId;senderAddress;encryptedSolution;msgHash;signature;constructor(e,t,n,r,i){this.executionId=e,this.signature=new Tl(i.v,i.r,i.s),this.encryptedSolution=new Al(n.iv,n.ephemPublicKey,n.ciphertext,n.mac),this.senderAddress=t,this.msgHash=r}}Fl([rl(),Zu(),Yl("design:type",String)],Gl.prototype,"executionId",void 0),Fl([Zu(),fl(),Yl("design:type",String)],Gl.prototype,"senderAddress",void 0),Fl([Ku(),Yl("design:type",Al)],Gl.prototype,"encryptedSolution",void 0),Fl([Zu(),cl("sha256"),Yl("design:type",String)],Gl.prototype,"msgHash",void 0),Fl([Ku(),Yl("design:type",Tl)],Gl.prototype,"signature",void 0);class Jl{executionId;senderAddress;bodyResponse;msgHash;signature;tlsHandshakeHash;status;totalTransferredBytes;constructor(e,t,n,r,i,s,a,o){this.executionId=e,this.signature=new Tl(i.v,i.r,i.s),this.bodyResponse=n,this.tlsHandshakeHash=s,this.senderAddress=t,this.msgHash=r,this.status=a,this.totalTransferredBytes=new $l(o.request,o.response)}}Fl([rl(),Zu(),Yl("design:type",String)],Jl.prototype,"executionId",void 0),Fl([Zu(),fl(),Yl("design:type",String)],Jl.prototype,"senderAddress",void 0),Fl([Zu(),cl("sha256"),Yl("design:type",String)],Jl.prototype,"msgHash",void 0),Fl([Ku(),Yl("design:type",Tl)],Jl.prototype,"signature",void 0),Fl([Zu(),bl(),Yl("design:type",String)],Jl.prototype,"tlsHandshakeHash",void 0),Fl([Zu(),bl(),Yl("design:type",String)],Jl.prototype,"status",void 0),Fl([Ku(),Yl("design:type",$l)],Jl.prototype,"totalTransferredBytes",void 0);var Zl=function(e,t,n,r){var i,s=arguments.length,a=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(a=(s<3?i(a):s>3?i(t,n,a):i(t,n))||a);return s>3&&a&&Object.defineProperty(t,n,a),a},Xl=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};class Ql{executionId;msgHash;signature;limits;econParams;workers;senderAddress;input;constructor(e,t,n,r,i,s,a,o){this.executionId=e,this.msgHash=t,this.signature=new Tl(n.v,n.r,n.s),this.limits=new Ll(r.gas,r.call,r.frame,r.memory),this.econParams=new Dl(i.reward,i.requiredSolutions,i.totalSolutions,i.executionTimeout),this.workers=new jl(s.blockNumber,s.selectionStrategy,s.setNodes),this.senderAddress=a,this.input=o}}Zl([rl(),Zu(),Xl("design:type",String)],Ql.prototype,"executionId",void 0),Zl([Zu(),cl("sha256"),Xl("design:type",String)],Ql.prototype,"msgHash",void 0),Zl([Ku(),Xl("design:type",Tl)],Ql.prototype,"signature",void 0),Zl([Ku(),Xl("design:type",Ll)],Ql.prototype,"limits",void 0),Zl([Ku(),Xl("design:type",Dl)],Ql.prototype,"econParams",void 0),Zl([Ku(),Xl("design:type",jl)],Ql.prototype,"workers",void 0),Zl([Zu(),bl(),Xl("design:type",String)],Ql.prototype,"senderAddress",void 0),Zl([Zu(),bl(),Xl("design:type",String)],Ql.prototype,"input",void 0);class ed{executionId;limits;econParams;workers;input;constructor(e,t,n,r,i){this.executionId=e,this.limits=new Ll(t.gas,t.call,t.frame,t.memory),this.econParams=new Dl(n.reward,n.requiredSolutions,n.totalSolutions,n.executionTimeout),this.workers=new jl(r.blockNumber,r.selectionStrategy,r.setNodes),this.input=i}}Zl([rl(),Zu(),Xl("design:type",String)],ed.prototype,"executionId",void 0),Zl([Ku(),Xl("design:type",Ll)],ed.prototype,"limits",void 0),Zl([Ku(),Xl("design:type",Dl)],ed.prototype,"econParams",void 0),Zl([Ku(),Xl("design:type",jl)],ed.prototype,"workers",void 0);Zl([Ku(),Xl("design:type",Gl)],class extends Vl{message;constructor(e,t,n,r,i,s){super(Hl.NODE_OUTCOME,e,t,n,r,i,s),this.message=n,this.executionId=e,this.msgHash=t,this.signature=new Tl(r.v,r.r,r.s),this.timestamp=s,this.sequencerAddress=i,this.message=n}}.prototype,"message",void 0);Zl([Ku(),Xl("design:type",Jl)],class extends Vl{message;constructor(e,t,n,r,i,s){super(Hl.API_OUTCOME,e,t,n,r,i,s),this.message=n,this.executionId=e,this.msgHash=t,this.signature=new Tl(r.v,r.r,r.s),this.timestamp=s,this.sequencerAddress=i}}.prototype,"message",void 0);class td{type;executionId;transcriptHash;status;signature;signerAddress;timestamp;constructor(e,t,n,r,i,s){this.type=Hl.EXECUTION_COMPLETED,this.executionId=e,this.transcriptHash=t,this.status=n,this.signature=new Tl(r.v,r.r,r.s),this.signerAddress=i,this.timestamp=s}}Zl([Zu(),bl(),Xl("design:type",String)],td.prototype,"type",void 0),Zl([rl(),Zu(),Xl("design:type",String)],td.prototype,"executionId",void 0),Zl([Zu(),cl("sha256"),Xl("design:type",String)],td.prototype,"transcriptHash",void 0),Zl([Zu(),yl(Au),Xl("design:type",String)],td.prototype,"status",void 0),Zl([Ku(),Xl("design:type",Tl)],td.prototype,"signature",void 0),Zl([Zu(),bl(),Xl("design:type",String)],td.prototype,"signerAddress",void 0),Zl([vl(),Zu(),Xl("design:type",Number)],td.prototype,"timestamp",void 0);class nd{type;executionId;signature;clearTextSolutions;sequencerAddress;msgHash;timestamp;constructor(e,t,n,r,i,s){this.type=Hl.SOLUTIONS_REVEALED,this.executionId=e,this.signature=new Tl(t.v,t.r,t.s),this.clearTextSolutions=n,this.sequencerAddress=r,this.msgHash=i,this.timestamp=s}}Zl([rl(),Zu(),Xl("design:type",String)],nd.prototype,"executionId",void 0),Zl([Ku(),Xl("design:type",Tl)],nd.prototype,"signature",void 0),Zl([Ku(),Xl("design:type",Array)],nd.prototype,"clearTextSolutions",void 0),Zl([Zu(),fl(),Xl("design:type",String)],nd.prototype,"sequencerAddress",void 0),Zl([Zu(),cl("sha256"),Xl("design:type",String)],nd.prototype,"msgHash",void 0),Zl([vl(),Zu(),Xl("design:type",Number)],nd.prototype,"timestamp",void 0);class rd extends Vl{executionId;msgHash;message;signature;publicKey;sequencerAddress;timestamp;constructor(e,t,n,r,i,s,a){super(Hl.TASK_CREATED,e,t,n,r,s,a),this.message=n,this.executionId=e,this.msgHash=t,this.signature=new Tl(r.v,r.r,r.s),this.timestamp=a,this.sequencerAddress=s,this.publicKey=i,this.message=n}}Zl([Zu(),rl(),Xl("design:type",String)],rd.prototype,"executionId",void 0),Zl([Zu(),cl("sha256"),Xl("design:type",String)],rd.prototype,"msgHash",void 0),Zl([Ku(),Xl("design:type",Kl)],rd.prototype,"message",void 0),Zl([Ku(),Xl("design:type",Tl)],rd.prototype,"signature",void 0),Zl([Zu(),bl(),Xl("design:type",String)],rd.prototype,"publicKey",void 0),Zl([Zu(),fl(),Xl("design:type",String)],rd.prototype,"sequencerAddress",void 0),Zl([vl(),Zu(),Xl("design:type",Number)],rd.prototype,"timestamp",void 0);class id extends Vl{executionId;msgHash;message;signature;publicKey;sequencerAddress;timestamp;constructor(e,t,n,r,i,s,a){super(Hl.API_TASK_CREATED,e,t,n,r,s,a),this.message=n,this.executionId=e,this.msgHash=t,this.signature=new Tl(r.v,r.r,r.s),this.timestamp=a,this.sequencerAddress=s,this.publicKey=i,this.message=n}}Zl([Zu(),rl(),Xl("design:type",String)],id.prototype,"executionId",void 0),Zl([Zu(),cl("sha256"),Xl("design:type",String)],id.prototype,"msgHash",void 0),Zl([Ku(),Xl("design:type",Wl)],id.prototype,"message",void 0),Zl([Ku(),Xl("design:type",Tl)],id.prototype,"signature",void 0),Zl([Zu(),bl(),Xl("design:type",String)],id.prototype,"publicKey",void 0),Zl([Zu(),fl(),Xl("design:type",String)],id.prototype,"sequencerAddress",void 0),Zl([vl(),Zu(),Xl("design:type",Number)],id.prototype,"timestamp",void 0);var sd=function(e,t,n,r){var i,s=arguments.length,a=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(a=(s<3?i(a):s>3?i(t,n,a):i(t,n))||a);return s>3&&a&&Object.defineProperty(t,n,a),a},ad=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};class od{executionId;msgHash;signature;senderAddress;encryptedSolution;constructor(e,t,n,r,i){this.executionId=e,this.msgHash=t,this.signature=new Tl(n.v,n.r,n.s),this.senderAddress=r,this.encryptedSolution=new Al(i.iv,i.ephemPublicKey,i.ciphertext,i.mac)}}sd([rl(),Zu(),ad("design:type",String)],od.prototype,"executionId",void 0),sd([Zu(),cl("sha256"),ad("design:type",String)],od.prototype,"msgHash",void 0),sd([Ku(),ad("design:type",Tl)],od.prototype,"signature",void 0),sd([Zu(),fl(),ad("design:type",String)],od.prototype,"senderAddress",void 0),sd([Ku(),ad("design:type",Al)],od.prototype,"encryptedSolution",void 0);var cd=function(e,t,n,r){var i,s=arguments.length,a=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(a=(s<3?i(a):s>3?i(t,n,a):i(t,n))||a);return s>3&&a&&Object.defineProperty(t,n,a),a},ud=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};cd([Zu(),bl(),ud("design:type",String)],class{taskId;constructor(e){this.taskId=e}}.prototype,"taskId",void 0);cd([Zu(),bl(),ud("design:type",String)],class{taskId;constructor(e){this.taskId=e}}.prototype,"taskId",void 0);class ld{input;checkpoint;taskId;constructor(e,t,n){this.taskId=e,this.checkpoint=t,this.input=n}}cd([Zu(),bl(),ud("design:type",String)],ld.prototype,"input",void 0),cd([Zu(),ud("design:type",Object)],ld.prototype,"checkpoint",void 0),cd([Zu(),bl(),ud("design:type",String)],ld.prototype,"taskId",void 0);class dd{input;taskId;constructor(e,t){this.taskId=e,this.input=t}}cd([Zu(),bl(),ud("design:type",String)],dd.prototype,"input",void 0),cd([Zu(),bl(),ud("design:type",String)],dd.prototype,"taskId",void 0);class pd{executionId;input;taskId;constructor(e,t,n){this.taskId=e,this.executionId=t,this.input=n}}cd([Zu(),rl(),ud("design:type",String)],pd.prototype,"executionId",void 0),cd([Zu(),bl(),ud("design:type",String)],pd.prototype,"input",void 0),cd([Zu(),bl(),ud("design:type",String)],pd.prototype,"taskId",void 0);class fd{instrumentationId;taskId;constructor(e,t){this.taskId=e,this.instrumentationId=t}}cd([Zu(),rl(),ud("design:type",String)],fd.prototype,"instrumentationId",void 0),cd([Zu(),bl(),ud("design:type",String)],fd.prototype,"taskId",void 0);cd([Zu(),bl(),ud("design:type",String)],class{taskId;constructor(e){this.taskId=e}}.prototype,"taskId",void 0);cd([Zu(),bl(),ud("design:type",String)],class{taskId;constructor(e){this.taskId=e}}.prototype,"taskId",void 0);cd([Zu(),bl(),ud("design:type",String)],class{taskId;constructor(e){this.taskId=e}}.prototype,"taskId",void 0);class hd{checkpointHash;taskId;constructor(e,t){this.taskId=e,this.checkpointHash=t}}cd([Zu(),bl(),ud("design:type",String)],hd.prototype,"checkpointHash",void 0),cd([Zu(),bl(),ud("design:type",String)],hd.prototype,"taskId",void 0);cd([Zu(),bl(),ud("design:type",String)],class{taskId;constructor(e){this.taskId=e}}.prototype,"taskId",void 0);class md{checkpointCount;taskId;constructor(e,t){this.taskId=e,this.checkpointCount=t}}cd([Zu(),hl(),ud("design:type",Number)],md.prototype,"checkpointCount",void 0),cd([Zu(),bl(),ud("design:type",String)],md.prototype,"taskId",void 0);cd([Zu(),bl(),ud("design:type",String)],class{taskId;constructor(e,t){this.taskId=t}}.prototype,"taskId",void 0);class gd{executionId;output;taskId;constructor(e,t,n){this.taskId=e,this.executionId=t,this.output=n}}cd([Zu(),rl(),ud("design:type",String)],gd.prototype,"executionId",void 0),cd([Yu(),bl(),ud("design:type",String)],gd.prototype,"output",void 0),cd([Zu(),bl(),ud("design:type",String)],gd.prototype,"taskId",void 0);class yd{executionId;taskId;constructor(e,t,n){this.taskId=t,this.executionId=n}}cd([Zu(),rl(),ud("design:type",String)],yd.prototype,"executionId",void 0),cd([Zu(),bl(),ud("design:type",String)],yd.prototype,"taskId",void 0);class bd{instrumentationId;output;taskId;instrumentedTaskId;constructor(e,t,n,r){this.taskId=e,this.instrumentationId=t,this.output=r,this.instrumentedTaskId=n}}cd([Zu(),rl(),ud("design:type",String)],bd.prototype,"instrumentationId",void 0),cd([Zu(),bl(),ud("design:type",String)],bd.prototype,"output",void 0),cd([Zu(),bl(),ud("design:type",String)],bd.prototype,"taskId",void 0),cd([Zu(),bl(),ud("design:type",String)],bd.prototype,"instrumentedTaskId",void 0);class vd{instrumentationId;taskId;constructor(e,t,n){this.taskId=t,this.instrumentationId=n}}cd([Zu(),rl(),ud("design:type",String)],vd.prototype,"instrumentationId",void 0),cd([Zu(),bl(),ud("design:type",String)],vd.prototype,"taskId",void 0);var wd,xd,_d,Ed={},Sd="6.6.1",kd={},Ad={exports:{}},Td=Ad.exports;function Md(){return wd||(wd=1,function(e,t){function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function r(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function i(e,t,n){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var s;"object"==typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:require("buffer").Buffer}catch(e){}function a(e,t){var n=e.charCodeAt(t);return n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function o(e,t,n){var r=a(e,n);return n-1>=t&&(r|=a(e,n-1)<<4),r}function c(e,t,n,r){for(var i=0,s=Math.min(e.length,n),a=t;a<s;a++){var o=e.charCodeAt(a)-48;i*=r,i+=o>=49?o-49+10:o>=17?o-17+10:o}return i}i.isBN=function(e){return e instanceof i||null!==e&&"object"==typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,r):(this._parseBase(e,t,i),"le"===r&&this._initArray(this.toArray(),t,r)))},i.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},i.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var s,a,o=0;if("be"===r)for(i=e.length-1,s=0;i>=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[s]|=a<<o&67108863,this.words[s+1]=a>>>26-o&67108863,(o+=24)>=26&&(o-=26,s++);else if("le"===r)for(i=0,s=0;i<e.length;i+=3)a=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[s]|=a<<o&67108863,this.words[s+1]=a>>>26-o&67108863,(o+=24)>=26&&(o-=26,s++);return this.strip()},i.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i,s=0,a=0;if("be"===n)for(r=e.length-1;r>=t;r-=2)i=o(e,t,r)<<s,this.words[a]|=67108863&i,s>=18?(s-=18,a+=1,this.words[a]|=i>>>26):s+=8;else for(r=(e.length-t)%2==0?t+1:t;r<e.length;r+=2)i=o(e,t,r)<<s,this.words[a]|=67108863&i,s>=18?(s-=18,a+=1,this.words[a]|=i>>>26):s+=8;this.strip()},i.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var s=e.length-n,a=s%r,o=Math.min(s,s-a)+n,u=0,l=n;l<o;l+=r)u=c(e,l,l+r,t),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==a){var d=1;for(u=c(e,l,e.length,t),l=0;l<a;l++)d*=t;this.imuln(d),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},i.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},i.prototype.clone=function(){var e=new i(null);return this.copy(e),e},i.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},i.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],l=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function p(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=0|e.words[0],s=0|t.words[0],a=i*s,o=67108863&a,c=a/67108864|0;n.words[0]=o;for(var u=1;u<r;u++){for(var l=c>>>26,d=67108863&c,p=Math.min(u,t.length-1),f=Math.max(0,u-e.length+1);f<=p;f++){var h=u-f|0;l+=(a=(i=0|e.words[h])*(s=0|t.words[f])+d)/67108864|0,d=67108863&a}n.words[u]=0|d,c=0|l}return 0!==c?n.words[u]=0|c:n.length--,n.strip()}i.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,s=0,a=0;a<this.length;a++){var o=this.words[a],c=(16777215&(o<<i|s)).toString(16);s=o>>>24-i&16777215,(i+=2)>=26&&(i-=26,a--),r=0!==s||a!==this.length-1?u[6-c.length]+c+r:c+r}for(0!==s&&(r=s.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var p=l[e],f=d[e];r="";var h=this.clone();for(h.negative=0;!h.isZero();){var m=h.modn(f).toString(e);r=(h=h.idivn(f)).isZero()?m+r:u[p-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(e,t){return n(void 0!==s),this.toArrayLike(s,e,t)},i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),s=r||Math.max(1,i);n(i<=s,"byte array longer than desired length"),n(s>0,"Requested array length <= 0"),this.strip();var a,o,c="le"===t,u=new e(s),l=this.clone();if(c){for(o=0;!l.isZero();o++)a=l.andln(255),l.iushrn(8),u[o]=a;for(;o<s;o++)u[o]=0}else{for(o=0;o<s-i;o++)u[o]=0;for(o=0;!l.isZero();o++)a=l.andln(255),l.iushrn(8),u[s-o-1]=a}return u},Math.clz32?i.prototype._countBits=function(e){return 32-Math.clz32(e)}:i.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 8191&t||(n+=13,t>>>=13),127&t||(n+=7,t>>>=7),15&t||(n+=4,t>>>=4),3&t||(n+=2,t>>>=2),1&t||n++,n},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,26!==n)break}return e},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},i.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},i.prototype.isNeg=function(){return 0!==this.negative},i.prototype.neg=function(){return this.clone().ineg()},i.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},i.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},i.prototype.ior=function(e){return n(!(this.negative|e.negative)),this.iuor(e)},i.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this.strip()},i.prototype.iand=function(e){return n(!(this.negative|e.negative)),this.iuand(e)},i.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;r<n.length;r++)this.words[r]=t.words[r]^n.words[r];if(this!==t)for(;r<t.length;r++)this.words[r]=t.words[r];return this.length=t.length,this.strip()},i.prototype.ixor=function(e){return n(!(this.negative|e.negative)),this.iuxor(e)},i.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this.strip()},i.prototype.iadd=function(e){var t,n,r;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(n=this,r=e):(n=e,r=this);for(var i=0,s=0;s<r.length;s++)t=(0|n.words[s])+(0|r.words[s])+i,this.words[s]=67108863&t,i=t>>>26;for(;0!==i&&s<n.length;s++)t=(0|n.words[s])+i,this.words[s]=67108863&t,i=t>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;s<n.length;s++)this.words[s]=n.words[s];return this},i.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=e):(n=e,r=this);for(var s=0,a=0;a<r.length;a++)s=(t=(0|n.words[a])-(0|r.words[a])+s)>>26,this.words[a]=67108863&t;for(;0!==s&&a<n.length;a++)s=(t=(0|n.words[a])+s)>>26,this.words[a]=67108863&t;if(0===s&&a<n.length&&n!==this)for(;a<n.length;a++)this.words[a]=n.words[a];return this.length=Math.max(this.length,a),n!==this&&(this.negative=1),this.strip()},i.prototype.sub=function(e){return this.clone().isub(e)};var f=function(e,t,n){var r,i,s,a=e.words,o=t.words,c=n.words,u=0,l=0|a[0],d=8191&l,p=l>>>13,f=0|a[1],h=8191&f,m=f>>>13,g=0|a[2],y=8191&g,b=g>>>13,v=0|a[3],w=8191&v,x=v>>>13,_=0|a[4],E=8191&_,S=_>>>13,k=0|a[5],A=8191&k,T=k>>>13,M=0|a[6],R=8191&M,O=M>>>13,I=0|a[7],N=8191&I,P=I>>>13,C=0|a[8],j=8191&C,L=C>>>13,D=0|a[9],$=8191&D,U=D>>>13,B=0|o[0],z=8191&B,q=B>>>13,H=0|o[1],F=8191&H,Y=H>>>13,V=0|o[2],K=8191&V,W=V>>>13,G=0|o[3],J=8191&G,Z=G>>>13,X=0|o[4],Q=8191&X,ee=X>>>13,te=0|o[5],ne=8191&te,re=te>>>13,ie=0|o[6],se=8191&ie,ae=ie>>>13,oe=0|o[7],ce=8191&oe,ue=oe>>>13,le=0|o[8],de=8191&le,pe=le>>>13,fe=0|o[9],he=8191&fe,me=fe>>>13;n.negative=e.negative^t.negative,n.length=19;var ge=(u+(r=Math.imul(d,z))|0)+((8191&(i=(i=Math.imul(d,q))+Math.imul(p,z)|0))<<13)|0;u=((s=Math.imul(p,q))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(h,z),i=(i=Math.imul(h,q))+Math.imul(m,z)|0,s=Math.imul(m,q);var ye=(u+(r=r+Math.imul(d,F)|0)|0)+((8191&(i=(i=i+Math.imul(d,Y)|0)+Math.imul(p,F)|0))<<13)|0;u=((s=s+Math.imul(p,Y)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(y,z),i=(i=Math.imul(y,q))+Math.imul(b,z)|0,s=Math.imul(b,q),r=r+Math.imul(h,F)|0,i=(i=i+Math.imul(h,Y)|0)+Math.imul(m,F)|0,s=s+Math.imul(m,Y)|0;var be=(u+(r=r+Math.imul(d,K)|0)|0)+((8191&(i=(i=i+Math.imul(d,W)|0)+Math.imul(p,K)|0))<<13)|0;u=((s=s+Math.imul(p,W)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(w,z),i=(i=Math.imul(w,q))+Math.imul(x,z)|0,s=Math.imul(x,q),r=r+Math.imul(y,F)|0,i=(i=i+Math.imul(y,Y)|0)+Math.imul(b,F)|0,s=s+Math.imul(b,Y)|0,r=r+Math.imul(h,K)|0,i=(i=i+Math.imul(h,W)|0)+Math.imul(m,K)|0,s=s+Math.imul(m,W)|0;var ve=(u+(r=r+Math.imul(d,J)|0)|0)+((8191&(i=(i=i+Math.imul(d,Z)|0)+Math.imul(p,J)|0))<<13)|0;u=((s=s+Math.imul(p,Z)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(E,z),i=(i=Math.imul(E,q))+Math.imul(S,z)|0,s=Math.imul(S,q),r=r+Math.imul(w,F)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(x,F)|0,s=s+Math.imul(x,Y)|0,r=r+Math.imul(y,K)|0,i=(i=i+Math.imul(y,W)|0)+Math.imul(b,K)|0,s=s+Math.imul(b,W)|0,r=r+Math.imul(h,J)|0,i=(i=i+Math.imul(h,Z)|0)+Math.imul(m,J)|0,s=s+Math.imul(m,Z)|0;var we=(u+(r=r+Math.imul(d,Q)|0)|0)+((8191&(i=(i=i+Math.imul(d,ee)|0)+Math.imul(p,Q)|0))<<13)|0;u=((s=s+Math.imul(p,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(A,z),i=(i=Math.imul(A,q))+Math.imul(T,z)|0,s=Math.imul(T,q),r=r+Math.imul(E,F)|0,i=(i=i+Math.imul(E,Y)|0)+Math.imul(S,F)|0,s=s+Math.imul(S,Y)|0,r=r+Math.imul(w,K)|0,i=(i=i+Math.imul(w,W)|0)+Math.imul(x,K)|0,s=s+Math.imul(x,W)|0,r=r+Math.imul(y,J)|0,i=(i=i+Math.imul(y,Z)|0)+Math.imul(b,J)|0,s=s+Math.imul(b,Z)|0,r=r+Math.imul(h,Q)|0,i=(i=i+Math.imul(h,ee)|0)+Math.imul(m,Q)|0,s=s+Math.imul(m,ee)|0;var xe=(u+(r=r+Math.imul(d,ne)|0)|0)+((8191&(i=(i=i+Math.imul(d,re)|0)+Math.imul(p,ne)|0))<<13)|0;u=((s=s+Math.imul(p,re)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(R,z),i=(i=Math.imul(R,q))+Math.imul(O,z)|0,s=Math.imul(O,q),r=r+Math.imul(A,F)|0,i=(i=i+Math.imul(A,Y)|0)+Math.imul(T,F)|0,s=s+Math.imul(T,Y)|0,r=r+Math.imul(E,K)|0,i=(i=i+Math.imul(E,W)|0)+Math.imul(S,K)|0,s=s+Math.imul(S,W)|0,r=r+Math.imul(w,J)|0,i=(i=i+Math.imul(w,Z)|0)+Math.imul(x,J)|0,s=s+Math.imul(x,Z)|0,r=r+Math.imul(y,Q)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(b,Q)|0,s=s+Math.imul(b,ee)|0,r=r+Math.imul(h,ne)|0,i=(i=i+Math.imul(h,re)|0)+Math.imul(m,ne)|0,s=s+Math.imul(m,re)|0;var _e=(u+(r=r+Math.imul(d,se)|0)|0)+((8191&(i=(i=i+Math.imul(d,ae)|0)+Math.imul(p,se)|0))<<13)|0;u=((s=s+Math.imul(p,ae)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(N,z),i=(i=Math.imul(N,q))+Math.imul(P,z)|0,s=Math.imul(P,q),r=r+Math.imul(R,F)|0,i=(i=i+Math.imul(R,Y)|0)+Math.imul(O,F)|0,s=s+Math.imul(O,Y)|0,r=r+Math.imul(A,K)|0,i=(i=i+Math.imul(A,W)|0)+Math.imul(T,K)|0,s=s+Math.imul(T,W)|0,r=r+Math.imul(E,J)|0,i=(i=i+Math.imul(E,Z)|0)+Math.imul(S,J)|0,s=s+Math.imul(S,Z)|0,r=r+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(x,Q)|0,s=s+Math.imul(x,ee)|0,r=r+Math.imul(y,ne)|0,i=(i=i+Math.imul(y,re)|0)+Math.imul(b,ne)|0,s=s+Math.imul(b,re)|0,r=r+Math.imul(h,se)|0,i=(i=i+Math.imul(h,ae)|0)+Math.imul(m,se)|0,s=s+Math.imul(m,ae)|0;var Ee=(u+(r=r+Math.imul(d,ce)|0)|0)+((8191&(i=(i=i+Math.imul(d,ue)|0)+Math.imul(p,ce)|0))<<13)|0;u=((s=s+Math.imul(p,ue)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(j,z),i=(i=Math.imul(j,q))+Math.imul(L,z)|0,s=Math.imul(L,q),r=r+Math.imul(N,F)|0,i=(i=i+Math.imul(N,Y)|0)+Math.imul(P,F)|0,s=s+Math.imul(P,Y)|0,r=r+Math.imul(R,K)|0,i=(i=i+Math.imul(R,W)|0)+Math.imul(O,K)|0,s=s+Math.imul(O,W)|0,r=r+Math.imul(A,J)|0,i=(i=i+Math.imul(A,Z)|0)+Math.imul(T,J)|0,s=s+Math.imul(T,Z)|0,r=r+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(S,Q)|0,s=s+Math.imul(S,ee)|0,r=r+Math.imul(w,ne)|0,i=(i=i+Math.imul(w,re)|0)+Math.imul(x,ne)|0,s=s+Math.imul(x,re)|0,r=r+Math.imul(y,se)|0,i=(i=i+Math.imul(y,ae)|0)+Math.imul(b,se)|0,s=s+Math.imul(b,ae)|0,r=r+Math.imul(h,ce)|0,i=(i=i+Math.imul(h,ue)|0)+Math.imul(m,ce)|0,s=s+Math.imul(m,ue)|0;var Se=(u+(r=r+Math.imul(d,de)|0)|0)+((8191&(i=(i=i+Math.imul(d,pe)|0)+Math.imul(p,de)|0))<<13)|0;u=((s=s+Math.imul(p,pe)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul($,z),i=(i=Math.imul($,q))+Math.imul(U,z)|0,s=Math.imul(U,q),r=r+Math.imul(j,F)|0,i=(i=i+Math.imul(j,Y)|0)+Math.imul(L,F)|0,s=s+Math.imul(L,Y)|0,r=r+Math.imul(N,K)|0,i=(i=i+Math.imul(N,W)|0)+Math.imul(P,K)|0,s=s+Math.imul(P,W)|0,r=r+Math.imul(R,J)|0,i=(i=i+Math.imul(R,Z)|0)+Math.imul(O,J)|0,s=s+Math.imul(O,Z)|0,r=r+Math.imul(A,Q)|0,i=(i=i+Math.imul(A,ee)|0)+Math.imul(T,Q)|0,s=s+Math.imul(T,ee)|0,r=r+Math.imul(E,ne)|0,i=(i=i+Math.imul(E,re)|0)+Math.imul(S,ne)|0,s=s+Math.imul(S,re)|0,r=r+Math.imul(w,se)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(x,se)|0,s=s+Math.imul(x,ae)|0,r=r+Math.imul(y,ce)|0,i=(i=i+Math.imul(y,ue)|0)+Math.imul(b,ce)|0,s=s+Math.imul(b,ue)|0,r=r+Math.imul(h,de)|0,i=(i=i+Math.imul(h,pe)|0)+Math.imul(m,de)|0,s=s+Math.imul(m,pe)|0;var ke=(u+(r=r+Math.imul(d,he)|0)|0)+((8191&(i=(i=i+Math.imul(d,me)|0)+Math.imul(p,he)|0))<<13)|0;u=((s=s+Math.imul(p,me)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul($,F),i=(i=Math.imul($,Y))+Math.imul(U,F)|0,s=Math.imul(U,Y),r=r+Math.imul(j,K)|0,i=(i=i+Math.imul(j,W)|0)+Math.imul(L,K)|0,s=s+Math.imul(L,W)|0,r=r+Math.imul(N,J)|0,i=(i=i+Math.imul(N,Z)|0)+Math.imul(P,J)|0,s=s+Math.imul(P,Z)|0,r=r+Math.imul(R,Q)|0,i=(i=i+Math.imul(R,ee)|0)+Math.imul(O,Q)|0,s=s+Math.imul(O,ee)|0,r=r+Math.imul(A,ne)|0,i=(i=i+Math.imul(A,re)|0)+Math.imul(T,ne)|0,s=s+Math.imul(T,re)|0,r=r+Math.imul(E,se)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(S,se)|0,s=s+Math.imul(S,ae)|0,r=r+Math.imul(w,ce)|0,i=(i=i+Math.imul(w,ue)|0)+Math.imul(x,ce)|0,s=s+Math.imul(x,ue)|0,r=r+Math.imul(y,de)|0,i=(i=i+Math.imul(y,pe)|0)+Math.imul(b,de)|0,s=s+Math.imul(b,pe)|0;var Ae=(u+(r=r+Math.imul(h,he)|0)|0)+((8191&(i=(i=i+Math.imul(h,me)|0)+Math.imul(m,he)|0))<<13)|0;u=((s=s+Math.imul(m,me)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul($,K),i=(i=Math.imul($,W))+Math.imul(U,K)|0,s=Math.imul(U,W),r=r+Math.imul(j,J)|0,i=(i=i+Math.imul(j,Z)|0)+Math.imul(L,J)|0,s=s+Math.imul(L,Z)|0,r=r+Math.imul(N,Q)|0,i=(i=i+Math.imul(N,ee)|0)+Math.imul(P,Q)|0,s=s+Math.imul(P,ee)|0,r=r+Math.imul(R,ne)|0,i=(i=i+Math.imul(R,re)|0)+Math.imul(O,ne)|0,s=s+Math.imul(O,re)|0,r=r+Math.imul(A,se)|0,i=(i=i+Math.imul(A,ae)|0)+Math.imul(T,se)|0,s=s+Math.imul(T,ae)|0,r=r+Math.imul(E,ce)|0,i=(i=i+Math.imul(E,ue)|0)+Math.imul(S,ce)|0,s=s+Math.imul(S,ue)|0,r=r+Math.imul(w,de)|0,i=(i=i+Math.imul(w,pe)|0)+Math.imul(x,de)|0,s=s+Math.imul(x,pe)|0;var Te=(u+(r=r+Math.imul(y,he)|0)|0)+((8191&(i=(i=i+Math.imul(y,me)|0)+Math.imul(b,he)|0))<<13)|0;u=((s=s+Math.imul(b,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul($,J),i=(i=Math.imul($,Z))+Math.imul(U,J)|0,s=Math.imul(U,Z),r=r+Math.imul(j,Q)|0,i=(i=i+Math.imul(j,ee)|0)+Math.imul(L,Q)|0,s=s+Math.imul(L,ee)|0,r=r+Math.imul(N,ne)|0,i=(i=i+Math.imul(N,re)|0)+Math.imul(P,ne)|0,s=s+Math.imul(P,re)|0,r=r+Math.imul(R,se)|0,i=(i=i+Math.imul(R,ae)|0)+Math.imul(O,se)|0,s=s+Math.imul(O,ae)|0,r=r+Math.imul(A,ce)|0,i=(i=i+Math.imul(A,ue)|0)+Math.imul(T,ce)|0,s=s+Math.imul(T,ue)|0,r=r+Math.imul(E,de)|0,i=(i=i+Math.imul(E,pe)|0)+Math.imul(S,de)|0,s=s+Math.imul(S,pe)|0;var Me=(u+(r=r+Math.imul(w,he)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(x,he)|0))<<13)|0;u=((s=s+Math.imul(x,me)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul($,Q),i=(i=Math.imul($,ee))+Math.imul(U,Q)|0,s=Math.imul(U,ee),r=r+Math.imul(j,ne)|0,i=(i=i+Math.imul(j,re)|0)+Math.imul(L,ne)|0,s=s+Math.imul(L,re)|0,r=r+Math.imul(N,se)|0,i=(i=i+Math.imul(N,ae)|0)+Math.imul(P,se)|0,s=s+Math.imul(P,ae)|0,r=r+Math.imul(R,ce)|0,i=(i=i+Math.imul(R,ue)|0)+Math.imul(O,ce)|0,s=s+Math.imul(O,ue)|0,r=r+Math.imul(A,de)|0,i=(i=i+Math.imul(A,pe)|0)+Math.imul(T,de)|0,s=s+Math.imul(T,pe)|0;var Re=(u+(r=r+Math.imul(E,he)|0)|0)+((8191&(i=(i=i+Math.imul(E,me)|0)+Math.imul(S,he)|0))<<13)|0;u=((s=s+Math.imul(S,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,r=Math.imul($,ne),i=(i=Math.imul($,re))+Math.imul(U,ne)|0,s=Math.imul(U,re),r=r+Math.imul(j,se)|0,i=(i=i+Math.imul(j,ae)|0)+Math.imul(L,se)|0,s=s+Math.imul(L,ae)|0,r=r+Math.imul(N,ce)|0,i=(i=i+Math.imul(N,ue)|0)+Math.imul(P,ce)|0,s=s+Math.imul(P,ue)|0,r=r+Math.imul(R,de)|0,i=(i=i+Math.imul(R,pe)|0)+Math.imul(O,de)|0,s=s+Math.imul(O,pe)|0;var Oe=(u+(r=r+Math.imul(A,he)|0)|0)+((8191&(i=(i=i+Math.imul(A,me)|0)+Math.imul(T,he)|0))<<13)|0;u=((s=s+Math.imul(T,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul($,se),i=(i=Math.imul($,ae))+Math.imul(U,se)|0,s=Math.imul(U,ae),r=r+Math.imul(j,ce)|0,i=(i=i+Math.imul(j,ue)|0)+Math.imul(L,ce)|0,s=s+Math.imul(L,ue)|0,r=r+Math.imul(N,de)|0,i=(i=i+Math.imul(N,pe)|0)+Math.imul(P,de)|0,s=s+Math.imul(P,pe)|0;var Ie=(u+(r=r+Math.imul(R,he)|0)|0)+((8191&(i=(i=i+Math.imul(R,me)|0)+Math.imul(O,he)|0))<<13)|0;u=((s=s+Math.imul(O,me)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul($,ce),i=(i=Math.imul($,ue))+Math.imul(U,ce)|0,s=Math.imul(U,ue),r=r+Math.imul(j,de)|0,i=(i=i+Math.imul(j,pe)|0)+Math.imul(L,de)|0,s=s+Math.imul(L,pe)|0;var Ne=(u+(r=r+Math.imul(N,he)|0)|0)+((8191&(i=(i=i+Math.imul(N,me)|0)+Math.imul(P,he)|0))<<13)|0;u=((s=s+Math.imul(P,me)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,r=Math.imul($,de),i=(i=Math.imul($,pe))+Math.imul(U,de)|0,s=Math.imul(U,pe);var Pe=(u+(r=r+Math.imul(j,he)|0)|0)+((8191&(i=(i=i+Math.imul(j,me)|0)+Math.imul(L,he)|0))<<13)|0;u=((s=s+Math.imul(L,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863;var Ce=(u+(r=Math.imul($,he))|0)+((8191&(i=(i=Math.imul($,me))+Math.imul(U,he)|0))<<13)|0;return u=((s=Math.imul(U,me))+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,c[0]=ge,c[1]=ye,c[2]=be,c[3]=ve,c[4]=we,c[5]=xe,c[6]=_e,c[7]=Ee,c[8]=Se,c[9]=ke,c[10]=Ae,c[11]=Te,c[12]=Me,c[13]=Re,c[14]=Oe,c[15]=Ie,c[16]=Ne,c[17]=Pe,c[18]=Ce,0!==u&&(c[19]=u,n.length++),n};function h(e,t,n){return(new m).mulp(e,t,n)}function m(e,t){this.x=e,this.y=t}Math.imul||(f=p),i.prototype.mulTo=function(e,t){var n,r=this.length+e.length;return n=10===this.length&&10===e.length?f(this,e,t):r<63?p(this,e,t):r<1024?function(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,s=0;s<n.length-1;s++){var a=i;i=0;for(var o=67108863&r,c=Math.min(s,t.length-1),u=Math.max(0,s-e.length+1);u<=c;u++){var l=s-u,d=(0|e.words[l])*(0|t.words[u]),p=67108863&d;o=67108863&(p=p+o|0),i+=(a=(a=a+(d/67108864|0)|0)+(p>>>26)|0)>>>26,a&=67108863}n.words[s]=o,r=a,a=i}return 0!==r?n.words[s]=r:n.length--,n.strip()}(this,e,t):h(this,e,t),n},m.prototype.makeRBT=function(e){for(var t=new Array(e),n=i.prototype._countBits(e)-1,r=0;r<e;r++)t[r]=this.revBin(r,n,e);return t},m.prototype.revBin=function(e,t,n){if(0===e||e===n-1)return e;for(var r=0,i=0;i<t;i++)r|=(1&e)<<t-i-1,e>>=1;return r},m.prototype.permute=function(e,t,n,r,i,s){for(var a=0;a<s;a++)r[a]=t[e[a]],i[a]=n[e[a]]},m.prototype.transform=function(e,t,n,r,i,s){this.permute(s,e,t,n,r,i);for(var a=1;a<i;a<<=1)for(var o=a<<1,c=Math.cos(2*Math.PI/o),u=Math.sin(2*Math.PI/o),l=0;l<i;l+=o)for(var d=c,p=u,f=0;f<a;f++){var h=n[l+f],m=r[l+f],g=n[l+f+a],y=r[l+f+a],b=d*g-p*y;y=d*y+p*g,g=b,n[l+f]=h+g,r[l+f]=m+y,n[l+f+a]=h-g,r[l+f+a]=m-y,f!==o&&(b=c*d-u*p,p=c*p+u*d,d=b)}},m.prototype.guessLen13b=function(e,t){var n=1|Math.max(t,e),r=1&n,i=0;for(n=n/2|0;n;n>>>=1)i++;return 1<<i+1+r},m.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var r=0;r<n/2;r++){var i=e[r];e[r]=e[n-r-1],e[n-r-1]=i,i=t[r],t[r]=-t[n-r-1],t[n-r-1]=-i}},m.prototype.normalize13b=function(e,t){for(var n=0,r=0;r<t/2;r++){var i=8192*Math.round(e[2*r+1]/t)+Math.round(e[2*r]/t)+n;e[r]=67108863&i,n=i<67108864?0:i/67108864|0}return e},m.prototype.convert13b=function(e,t,r,i){for(var s=0,a=0;a<t;a++)s+=0|e[a],r[2*a]=8191&s,s>>>=13,r[2*a+1]=8191&s,s>>>=13;for(a=2*t;a<i;++a)r[a]=0;n(0===s),n(!(-8192&s))},m.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},m.prototype.mulp=function(e,t,n){var r=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(r),s=this.stub(r),a=new Array(r),o=new Array(r),c=new Array(r),u=new Array(r),l=new Array(r),d=new Array(r),p=n.words;p.length=r,this.convert13b(e.words,e.length,a,r),this.convert13b(t.words,t.length,u,r),this.transform(a,s,o,c,r,i),this.transform(u,s,l,d,r,i);for(var f=0;f<r;f++){var h=o[f]*l[f]-c[f]*d[f];c[f]=o[f]*d[f]+c[f]*l[f],o[f]=h}return this.conjugate(o,c,r),this.transform(o,c,p,s,r,i),this.conjugate(p,s,r),this.normalize13b(p,r),n.negative=e.negative^t.negative,n.length=e.length+t.length,n.strip()},i.prototype.mul=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},i.prototype.mulf=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),h(this,e,t)},i.prototype.imul=function(e){return this.clone().mulTo(e,this)},i.prototype.imuln=function(e){n("number"==typeof e),n(e<67108864);for(var t=0,r=0;r<this.length;r++){var i=(0|this.words[r])*e,s=(67108863&i)+(67108863&t);t>>=26,t+=i/67108864|0,t+=s>>>26,this.words[r]=67108863&s}return 0!==t&&(this.words[r]=t,this.length++),this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n<t.length;n++){var r=n/26|0,i=n%26;t[n]=(e.words[r]&1<<i)>>>i}return t}(e);if(0===t.length)return new i(1);for(var n=this,r=0;r<t.length&&0===t[r];r++,n=n.sqr());if(++r<t.length)for(var s=n.sqr();r<t.length;r++,s=s.sqr())0!==t[r]&&(n=n.mul(s));return n},i.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,s=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t<this.length;t++){var o=this.words[t]&s,c=(0|this.words[t])-o<<r;this.words[t]=c|a,a=o>>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this.strip()},i.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},i.prototype.iushrn=function(e,t,r){var i;n("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var s=e%26,a=Math.min((e-s)/26,this.length),o=67108863^67108863>>>s<<s,c=r;if(i-=a,i=Math.max(0,i),c){for(var u=0;u<a;u++)c.words[u]=this.words[u];c.length=a}if(0===a);else if(this.length>a)for(this.length-=a,u=0;u<this.length;u++)this.words[u]=this.words[u+a];else this.words[0]=0,this.length=1;var l=0;for(u=this.length-1;u>=0&&(0!==l||u>=i);u--){var d=0|this.words[u];this.words[u]=l<<26-s|d>>>s,l=d&o}return c&&0!==l&&(c.words[c.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;return!(this.length<=r||!(this.words[r]&i))},i.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this.strip()},i.prototype.maskn=function(e){return this.clone().imaskn(e)},i.prototype.iaddn=function(e){return n("number"==typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},i.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},i.prototype.addn=function(e){return this.clone().iaddn(e)},i.prototype.subn=function(e){return this.clone().isubn(e)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(e,t,r){var i,s,a=e.length+r;this._expand(a);var o=0;for(i=0;i<e.length;i++){s=(0|this.words[i+r])+o;var c=(0|e.words[i])*t;o=((s-=67108863&c)>>26)-(c/67108864|0),this.words[i+r]=67108863&s}for(;i<this.length-r;i++)o=(s=(0|this.words[i+r])+o)>>26,this.words[i+r]=67108863&s;if(0===o)return this.strip();for(n(-1===o),o=0,i=0;i<this.length;i++)o=(s=-(0|this.words[i])+o)>>26,this.words[i]=67108863&s;return this.negative=1,this.strip()},i.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),s=e,a=0|s.words[s.length-1];0!=(n=26-this._countBits(a))&&(s=s.ushln(n),r.iushln(n),a=0|s.words[s.length-1]);var o,c=r.length-s.length;if("mod"!==t){(o=new i(null)).length=c+1,o.words=new Array(o.length);for(var u=0;u<o.length;u++)o.words[u]=0}var l=r.clone()._ishlnsubmul(s,1,c);0===l.negative&&(r=l,o&&(o.words[c]=1));for(var d=c-1;d>=0;d--){var p=67108864*(0|r.words[s.length+d])+(0|r.words[s.length+d-1]);for(p=Math.min(p/a|0,67108863),r._ishlnsubmul(s,p,d);0!==r.negative;)p--,r.negative=0,r._ishlnsubmul(s,1,d),r.isZero()||(r.negative^=1);o&&(o.words[d]=p)}return o&&o.strip(),r.strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:o||null,mod:r}},i.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,t),"mod"!==t&&(s=o.div.neg()),"div"!==t&&(a=o.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:s,mod:a}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),t),"mod"!==t&&(s=o.div.neg()),{div:s,mod:o.mod}):this.negative&e.negative?(o=this.neg().divmod(e.neg(),t),"div"!==t&&(a=o.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:o.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modn(e.words[0]))}:this._wordDiv(e,t);var s,a,o},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),s=n.cmp(r);return s<0||1===i&&0===s?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},i.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var s=new i(1),a=new i(0),o=new i(0),c=new i(1),u=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++u;for(var l=r.clone(),d=t.clone();!t.isZero();){for(var p=0,f=1;!(t.words[0]&f)&&p<26;++p,f<<=1);if(p>0)for(t.iushrn(p);p-- >0;)(s.isOdd()||a.isOdd())&&(s.iadd(l),a.isub(d)),s.iushrn(1),a.iushrn(1);for(var h=0,m=1;!(r.words[0]&m)&&h<26;++h,m<<=1);if(h>0)for(r.iushrn(h);h-- >0;)(o.isOdd()||c.isOdd())&&(o.iadd(l),c.isub(d)),o.iushrn(1),c.iushrn(1);t.cmp(r)>=0?(t.isub(r),s.isub(o),a.isub(c)):(r.isub(t),o.isub(s),c.isub(a))}return{a:o,b:c,gcd:r.iushln(u)}},i.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var s,a=new i(1),o=new i(0),c=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,l=1;!(t.words[0]&l)&&u<26;++u,l<<=1);if(u>0)for(t.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(c),a.iushrn(1);for(var d=0,p=1;!(r.words[0]&p)&&d<26;++d,p<<=1);if(d>0)for(r.iushrn(d);d-- >0;)o.isOdd()&&o.iadd(c),o.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(o)):(r.isub(t),o.isub(a))}return(s=0===t.cmpn(1)?a:o).cmpn(0)<0&&s.iadd(e),s},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var s=t;t=n,n=s}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return!(1&this.words[0])},i.prototype.isOdd=function(){return!(1&~this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var s=i,a=r;0!==s&&a<this.length;a++){var o=0|this.words[a];s=(o+=s)>>>26,o&=67108863,this.words[a]=o}return 0!==s&&(this.words[a]=s,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},i.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},i.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|e.words[n];if(r!==i){r<i?t=-1:r>i&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new _(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var g={k256:null,p224:null,p192:null,p25519:null};function y(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function v(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function x(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(e){if("string"==typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function E(e){_.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},y.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)},r(b,y),b.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),i=0;i<r;i++)t.words[i]=e.words[i];if(t.length=r,e.length<=9)return e.words[0]=0,void(e.length=1);var s=e.words[9];for(t.words[t.length++]=s&n,i=10;i<e.length;i++){var a=0|e.words[i];e.words[i-10]=(a&n)<<4|s>>>22,s=a}s>>>=22,e.words[i-10]=s,0===s&&e.length>10?e.length-=10:e.length-=9},b.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var r=0|e.words[n];t+=977*r,e.words[n]=67108863&t,t=64*r+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},r(v,y),r(w,y),r(x,y),x.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var r=19*(0|e.words[n])+t,i=67108863&r;r>>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(g[e])return g[e];var t;if("k256"===e)t=new b;else if("p224"===e)t=new v;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new x}return g[e]=t,t},_.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},_.prototype._verify2=function(e,t){n(!(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},_.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},_.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},_.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},_.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},_.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},_.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},_.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},_.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},_.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},_.prototype.isqr=function(e){return this.imul(e,e.clone())},_.prototype.sqr=function(e){return this.mul(e,e)},_.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new i(1)).iushrn(2);return this.pow(e,r)}for(var s=this.m.subn(1),a=0;!s.isZero()&&0===s.andln(1);)a++,s.iushrn(1);n(!s.isZero());var o=new i(1).toRed(this),c=o.redNeg(),u=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new i(2*l*l).toRed(this);0!==this.pow(l,u).cmp(c);)l.redIAdd(c);for(var d=this.pow(l,s),p=this.pow(e,s.addn(1).iushrn(1)),f=this.pow(e,s),h=a;0!==f.cmp(o);){for(var m=f,g=0;0!==m.cmp(o);g++)m=m.redSqr();n(g<h);var y=this.pow(d,new i(1).iushln(h-g-1));p=p.redMul(y),d=y.redSqr(),f=f.redMul(d),h=g}return p},_.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},_.prototype.pow=function(e,t){if(t.isZero())return new i(1).toRed(this);if(0===t.cmpn(1))return e.clone();var n=new Array(16);n[0]=new i(1).toRed(this),n[1]=e;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],e);var s=n[0],a=0,o=0,c=t.bitLength()%26;for(0===c&&(c=26),r=t.length-1;r>=0;r--){for(var u=t.words[r],l=c-1;l>=0;l--){var d=u>>l&1;s!==n[0]&&(s=this.sqr(s)),0!==d||0!==a?(a<<=1,a|=d,(4==++o||0===r&&0===l)&&(s=this.mul(s,n[a]),o=0,a=0)):o=0}c=26}return s},_.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},_.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new E(e)},r(E,_),E.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},E.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},E.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},E.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=n.isub(r).iushrn(this.shift),a=s;return s.cmp(this.m)>=0?a=s.isub(this.m):s.cmpn(0)<0&&(a=s.iadd(this.m)),a._forceRed(this)},E.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(Ad,Td)),Ad.exports}function Rd(){if(_d)return xd;function e(e,t){if(!e)throw new Error(t||"Assertion failed")}return _d=1,xd=e,e.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)},xd}var Od,Id,Nd={};function Pd(){return Od||(Od=1,function(){var e=Nd;function t(e){return 1===e.length?"0"+e:e}function n(e){for(var n="",r=0;r<e.length;r++)n+=t(e[r].toString(16));return n}e.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"!=typeof e){for(var r=0;r<e.length;r++)n[r]=0|e[r];return n}if("hex"===t){(e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e);for(r=0;r<e.length;r+=2)n.push(parseInt(e[r]+e[r+1],16))}else for(r=0;r<e.length;r++){var i=e.charCodeAt(r),s=i>>8,a=255&i;s?n.push(s,a):n.push(a)}return n},e.zero2=t,e.toHex=n,e.encode=function(e,t){return"hex"===t?n(e):e}}()),Nd}function Cd(){return Id||(Id=1,function(){var e=kd,t=Md(),n=Rd(),r=Pd();e.assert=n,e.toArray=r.toArray,e.zero2=r.zero2,e.toHex=r.toHex,e.encode=r.encode,e.getNAF=function(e,t,n){var r,i=new Array(Math.max(e.bitLength(),n)+1);for(r=0;r<i.length;r+=1)i[r]=0;var s=1<<t+1,a=e.clone();for(r=0;r<i.length;r++){var o,c=a.andln(s-1);a.isOdd()?(o=c>(s>>1)-1?(s>>1)-c:c,a.isubn(o)):o=0,i[r]=o,a.iushrn(1)}return i},e.getJSF=function(e,t){var n=[[],[]];e=e.clone(),t=t.clone();for(var r,i=0,s=0;e.cmpn(-i)>0||t.cmpn(-s)>0;){var a,o,c=e.andln(3)+i&3,u=t.andln(3)+s&3;3===c&&(c=-1),3===u&&(u=-1),a=1&c?3!==(r=e.andln(7)+i&7)&&5!==r||2!==u?c:-c:0,n[0].push(a),o=1&u?3!==(r=t.andln(7)+s&7)&&5!==r||2!==c?u:-u:0,n[1].push(o),2*i===a+1&&(i=1-i),2*s===o+1&&(s=1-s),e.iushrn(1),t.iushrn(1)}return n},e.cachedProperty=function(e,t,n){var r="_"+t;e.prototype[t]=function(){return void 0!==this[r]?this[r]:this[r]=n.call(this)}},e.parseBytes=function(t){return"string"==typeof t?e.toArray(t,"hex"):t},e.intFromLE=function(e){return new t(e,"hex","le")}}()),kd}var jd,Ld={exports:{}};function Dd(){if(jd)return Ld.exports;var e;function t(e){this.rand=e}if(jd=1,Ld.exports=function(n){return e||(e=new t(null)),e.generate(n)},Ld.exports.Rand=t,t.prototype.generate=function(e){return this._rand(e)},t.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),n=0;n<t.length;n++)t[n]=this.rand.getByte();return t},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?t.prototype._rand=function(e){var t=new Uint8Array(e);return self.crypto.getRandomValues(t),t}:self.msCrypto&&self.msCrypto.getRandomValues?t.prototype._rand=function(e){var t=new Uint8Array(e);return self.msCrypto.getRandomValues(t),t}:"object"==typeof window&&(t.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var n=require("crypto");if("function"!=typeof n.randomBytes)throw new Error("Not supported");t.prototype._rand=function(e){return n.randomBytes(e)}}catch(e){}return Ld.exports}var $d,Ud,Bd,zd,qd,Hd,Fd,Yd,Vd,Kd={};function Wd(){if(Ud)return $d;Ud=1;var e=Md(),t=Cd(),n=t.getNAF,r=t.getJSF,i=t.assert;function s(t,n){this.type=t,this.p=new e(n.p,16),this.red=n.prime?e.red(n.prime):e.mont(this.p),this.zero=new e(0).toRed(this.red),this.one=new e(1).toRed(this.red),this.two=new e(2).toRed(this.red),this.n=n.n&&new e(n.n,16),this.g=n.g&&this.pointFromJSON(n.g,n.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function a(e,t){this.curve=e,this.type=t,this.precomputed=null}return $d=s,s.prototype.point=function(){throw new Error("Not implemented")},s.prototype.validate=function(){throw new Error("Not implemented")},s.prototype._fixedNafMul=function(e,t){i(e.precomputed);var r=e._getDoubles(),s=n(t,1,this._bitLength),a=(1<<r.step+1)-(r.step%2==0?2:1);a/=3;var o,c,u=[];for(o=0;o<s.length;o+=r.step){c=0;for(var l=o+r.step-1;l>=o;l--)c=(c<<1)+s[l];u.push(c)}for(var d=this.jpoint(null,null,null),p=this.jpoint(null,null,null),f=a;f>0;f--){for(o=0;o<u.length;o++)(c=u[o])===f?p=p.mixedAdd(r.points[o]):c===-f&&(p=p.mixedAdd(r.points[o].neg()));d=d.add(p)}return d.toP()},s.prototype._wnafMul=function(e,t){var r=4,s=e._getNAFPoints(r);r=s.wnd;for(var a=s.points,o=n(t,r,this._bitLength),c=this.jpoint(null,null,null),u=o.length-1;u>=0;u--){for(var l=0;u>=0&&0===o[u];u--)l++;if(u>=0&&l++,c=c.dblp(l),u<0)break;var d=o[u];i(0!==d),c="affine"===e.type?d>0?c.mixedAdd(a[d-1>>1]):c.mixedAdd(a[-d-1>>1].neg()):d>0?c.add(a[d-1>>1]):c.add(a[-d-1>>1].neg())}return"affine"===e.type?c.toP():c},s.prototype._wnafMulAdd=function(e,t,i,s,a){var o,c,u,l=this._wnafT1,d=this._wnafT2,p=this._wnafT3,f=0;for(o=0;o<s;o++){var h=(u=t[o])._getNAFPoints(e);l[o]=h.wnd,d[o]=h.points}for(o=s-1;o>=1;o-=2){var m=o-1,g=o;if(1===l[m]&&1===l[g]){var y=[t[m],null,null,t[g]];0===t[m].y.cmp(t[g].y)?(y[1]=t[m].add(t[g]),y[2]=t[m].toJ().mixedAdd(t[g].neg())):0===t[m].y.cmp(t[g].y.redNeg())?(y[1]=t[m].toJ().mixedAdd(t[g]),y[2]=t[m].add(t[g].neg())):(y[1]=t[m].toJ().mixedAdd(t[g]),y[2]=t[m].toJ().mixedAdd(t[g].neg()));var b=[-3,-1,-5,-7,0,7,5,1,3],v=r(i[m],i[g]);for(f=Math.max(v[0].length,f),p[m]=new Array(f),p[g]=new Array(f),c=0;c<f;c++){var w=0|v[0][c],x=0|v[1][c];p[m][c]=b[3*(w+1)+(x+1)],p[g][c]=0,d[m]=y}}else p[m]=n(i[m],l[m],this._bitLength),p[g]=n(i[g],l[g],this._bitLength),f=Math.max(p[m].length,f),f=Math.max(p[g].length,f)}var _=this.jpoint(null,null,null),E=this._wnafT4;for(o=f;o>=0;o--){for(var S=0;o>=0;){var k=!0;for(c=0;c<s;c++)E[c]=0|p[c][o],0!==E[c]&&(k=!1);if(!k)break;S++,o--}if(o>=0&&S++,_=_.dblp(S),o<0)break;for(c=0;c<s;c++){var A=E[c];0!==A&&(A>0?u=d[c][A-1>>1]:A<0&&(u=d[c][-A-1>>1].neg()),_="affine"===u.type?_.mixedAdd(u):_.add(u))}}for(o=0;o<s;o++)d[o]=null;return a?_:_.toP()},s.BasePoint=a,a.prototype.eq=function(){throw new Error("Not implemented")},a.prototype.validate=function(){return this.curve.validate(this)},s.prototype.decodePoint=function(e,n){e=t.toArray(e,n);var r=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1==2*r)return 6===e[0]?i(e[e.length-1]%2==0):7===e[0]&&i(e[e.length-1]%2==1),this.point(e.slice(1,1+r),e.slice(1+r,1+2*r));if((2===e[0]||3===e[0])&&e.length-1===r)return this.pointFromX(e.slice(1,1+r),3===e[0]);throw new Error("Unknown point format")},a.prototype.encodeCompressed=function(e){return this.encode(e,!0)},a.prototype._encode=function(e){var t=this.curve.p.byteLength(),n=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(n):[4].concat(n,this.getY().toArray("be",t))},a.prototype.encode=function(e,n){return t.encode(this._encode(n),e)},a.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},a.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},a.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],r=this,i=0;i<t;i+=e){for(var s=0;s<e;s++)r=r.dbl();n.push(r)}return{step:e,points:n}},a.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],n=(1<<e)-1,r=1===n?null:this.dbl(),i=1;i<n;i++)t[i]=t[i-1].add(r);return{wnd:e,points:t}},a.prototype._getBeta=function(){return null},a.prototype.dblp=function(e){for(var t=this,n=0;n<e;n++)t=t.dbl();return t},$d}function Gd(){return Vd||(Vd=1,function(e){var t=e;t.base=Wd(),t.short=function(){if(zd)return Bd;zd=1;var e=Cd(),t=Md(),n=ur(),r=Wd(),i=e.assert;function s(e){r.call(this,"short",e),this.a=new t(e.a,16).toRed(this.red),this.b=new t(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function a(e,n,i,s){r.BasePoint.call(this,e,"affine"),null===n&&null===i?(this.x=null,this.y=null,this.inf=!0):(this.x=new t(n,16),this.y=new t(i,16),s&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function o(e,n,i,s){r.BasePoint.call(this,e,"jacobian"),null===n&&null===i&&null===s?(this.x=this.curve.one,this.y=this.curve.one,this.z=new t(0)):(this.x=new t(n,16),this.y=new t(i,16),this.z=new t(s,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}return n(s,r),Bd=s,s.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var n,r;if(e.beta)n=new t(e.beta,16).toRed(this.red);else{var s=this._getEndoRoots(this.p);n=(n=s[0].cmp(s[1])<0?s[0]:s[1]).toRed(this.red)}if(e.lambda)r=new t(e.lambda,16);else{var a=this._getEndoRoots(this.n);0===this.g.mul(a[0]).x.cmp(this.g.x.redMul(n))?r=a[0]:(r=a[1],i(0===this.g.mul(r).x.cmp(this.g.x.redMul(n))))}return{beta:n,lambda:r,basis:e.basis?e.basis.map((function(e){return{a:new t(e.a,16),b:new t(e.b,16)}})):this._getEndoBasis(r)}}},s.prototype._getEndoRoots=function(e){var n=e===this.p?this.red:t.mont(e),r=new t(2).toRed(n).redInvm(),i=r.redNeg(),s=new t(3).toRed(n).redNeg().redSqrt().redMul(r);return[i.redAdd(s).fromRed(),i.redSub(s).fromRed()]},s.prototype._getEndoBasis=function(e){for(var n,r,i,s,a,o,c,u,l,d=this.n.ushrn(Math.floor(this.n.bitLength()/2)),p=e,f=this.n.clone(),h=new t(1),m=new t(0),g=new t(0),y=new t(1),b=0;0!==p.cmpn(0);){var v=f.div(p);u=f.sub(v.mul(p)),l=g.sub(v.mul(h));var w=y.sub(v.mul(m));if(!i&&u.cmp(d)<0)n=c.neg(),r=h,i=u.neg(),s=l;else if(i&&2==++b)break;c=u,f=p,p=u,g=h,h=l,y=m,m=w}a=u.neg(),o=l;var x=i.sqr().add(s.sqr());return a.sqr().add(o.sqr()).cmp(x)>=0&&(a=n,o=r),i.negative&&(i=i.neg(),s=s.neg()),a.negative&&(a=a.neg(),o=o.neg()),[{a:i,b:s},{a:a,b:o}]},s.prototype._endoSplit=function(e){var t=this.endo.basis,n=t[0],r=t[1],i=r.b.mul(e).divRound(this.n),s=n.b.neg().mul(e).divRound(this.n),a=i.mul(n.a),o=s.mul(r.a),c=i.mul(n.b),u=s.mul(r.b);return{k1:e.sub(a).sub(o),k2:c.add(u).neg()}},s.prototype.pointFromX=function(e,n){(e=new t(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),i=r.redSqrt();if(0!==i.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var s=i.fromRed().isOdd();return(n&&!s||!n&&s)&&(i=i.redNeg()),this.point(e,i)},s.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,n=e.y,r=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(r).redIAdd(this.b);return 0===n.redSqr().redISub(i).cmpn(0)},s.prototype._endoWnafMulAdd=function(e,t,n){for(var r=this._endoWnafT1,i=this._endoWnafT2,s=0;s<e.length;s++){var a=this._endoSplit(t[s]),o=e[s],c=o._getBeta();a.k1.negative&&(a.k1.ineg(),o=o.neg(!0)),a.k2.negative&&(a.k2.ineg(),c=c.neg(!0)),r[2*s]=o,r[2*s+1]=c,i[2*s]=a.k1,i[2*s+1]=a.k2}for(var u=this._wnafMulAdd(1,r,i,2*s,n),l=0;l<2*s;l++)r[l]=null,i[l]=null;return u},n(a,r.BasePoint),s.prototype.point=function(e,t,n){return new a(this,e,t,n)},s.prototype.pointFromJSON=function(e,t){return a.fromJSON(this,e,t)},a.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var n=this.curve,r=function(e){return n.point(e.x.redMul(n.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(r)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(r)}}}return t}},a.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},a.fromJSON=function(e,t,n){"string"==typeof t&&(t=JSON.parse(t));var r=e.point(t[0],t[1],n);if(!t[2])return r;function i(t){return e.point(t[0],t[1],n)}var s=t[2];return r.precomputed={beta:null,doubles:s.doubles&&{step:s.doubles.step,points:[r].concat(s.doubles.points.map(i))},naf:s.naf&&{wnd:s.naf.wnd,points:[r].concat(s.naf.points.map(i))}},r},a.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},a.prototype.isInfinity=function(){return this.inf},a.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var n=t.redSqr().redISub(this.x).redISub(e.x),r=t.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,r)},a.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,n=this.x.redSqr(),r=e.redInvm(),i=n.redAdd(n).redIAdd(n).redIAdd(t).redMul(r),s=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(s)).redISub(this.y);return this.curve.point(s,a)},a.prototype.getX=function(){return this.x.fromRed()},a.prototype.getY=function(){return this.y.fromRed()},a.prototype.mul=function(e){return e=new t(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},a.prototype.mulAdd=function(e,t,n){var r=[this,t],i=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,i):this.curve._wnafMulAdd(1,r,i,2)},a.prototype.jmulAdd=function(e,t,n){var r=[this,t],i=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,i,!0):this.curve._wnafMulAdd(1,r,i,2,!0)},a.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},a.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,r=function(e){return e.neg()};t.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(r)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(r)}}}return t},a.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},n(o,r.BasePoint),s.prototype.jpoint=function(e,t,n){return new o(this,e,t,n)},o.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),n=this.x.redMul(t),r=this.y.redMul(t).redMul(e);return this.curve.point(n,r)},o.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},o.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),n=this.z.redSqr(),r=this.x.redMul(t),i=e.x.redMul(n),s=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(n.redMul(this.z)),o=r.redSub(i),c=s.redSub(a);if(0===o.cmpn(0))return 0!==c.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=o.redSqr(),l=u.redMul(o),d=r.redMul(u),p=c.redSqr().redIAdd(l).redISub(d).redISub(d),f=c.redMul(d.redISub(p)).redISub(s.redMul(l)),h=this.z.redMul(e.z).redMul(o);return this.curve.jpoint(p,f,h)},o.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),n=this.x,r=e.x.redMul(t),i=this.y,s=e.y.redMul(t).redMul(this.z),a=n.redSub(r),o=i.redSub(s);if(0===a.cmpn(0))return 0!==o.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=a.redSqr(),u=c.redMul(a),l=n.redMul(c),d=o.redSqr().redIAdd(u).redISub(l).redISub(l),p=o.redMul(l.redISub(d)).redISub(i.redMul(u)),f=this.z.redMul(a);return this.curve.jpoint(d,p,f)},o.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var n=this;for(t=0;t<e;t++)n=n.dbl();return n}var r=this.curve.a,i=this.curve.tinv,s=this.x,a=this.y,o=this.z,c=o.redSqr().redSqr(),u=a.redAdd(a);for(t=0;t<e;t++){var l=s.redSqr(),d=u.redSqr(),p=d.redSqr(),f=l.redAdd(l).redIAdd(l).redIAdd(r.redMul(c)),h=s.redMul(d),m=f.redSqr().redISub(h.redAdd(h)),g=h.redISub(m),y=f.redMul(g);y=y.redIAdd(y).redISub(p);var b=u.redMul(o);t+1<e&&(c=c.redMul(p)),s=m,o=b,u=y}return this.curve.jpoint(s,u.redMul(i),o)},o.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},o.prototype._zeroDbl=function(){var e,t,n;if(this.zOne){var r=this.x.redSqr(),i=this.y.redSqr(),s=i.redSqr(),a=this.x.redAdd(i).redSqr().redISub(r).redISub(s);a=a.redIAdd(a);var o=r.redAdd(r).redIAdd(r),c=o.redSqr().redISub(a).redISub(a),u=s.redIAdd(s);u=(u=u.redIAdd(u)).redIAdd(u),e=c,t=o.redMul(a.redISub(c)).redISub(u),n=this.y.redAdd(this.y)}else{var l=this.x.redSqr(),d=this.y.redSqr(),p=d.redSqr(),f=this.x.redAdd(d).redSqr().redISub(l).redISub(p);f=f.redIAdd(f);var h=l.redAdd(l).redIAdd(l),m=h.redSqr(),g=p.redIAdd(p);g=(g=g.redIAdd(g)).redIAdd(g),e=m.redISub(f).redISub(f),t=h.redMul(f.redISub(e)).redISub(g),n=(n=this.y.redMul(this.z)).redIAdd(n)}return this.curve.jpoint(e,t,n)},o.prototype._threeDbl=function(){var e,t,n;if(this.zOne){var r=this.x.redSqr(),i=this.y.redSqr(),s=i.redSqr(),a=this.x.redAdd(i).redSqr().redISub(r).redISub(s);a=a.redIAdd(a);var o=r.redAdd(r).redIAdd(r).redIAdd(this.curve.a),c=o.redSqr().redISub(a).redISub(a);e=c;var u=s.redIAdd(s);u=(u=u.redIAdd(u)).redIAdd(u),t=o.redMul(a.redISub(c)).redISub(u),n=this.y.redAdd(this.y)}else{var l=this.z.redSqr(),d=this.y.redSqr(),p=this.x.redMul(d),f=this.x.redSub(l).redMul(this.x.redAdd(l));f=f.redAdd(f).redIAdd(f);var h=p.redIAdd(p),m=(h=h.redIAdd(h)).redAdd(h);e=f.redSqr().redISub(m),n=this.y.redAdd(this.z).redSqr().redISub(d).redISub(l);var g=d.redSqr();g=(g=(g=g.redIAdd(g)).redIAdd(g)).redIAdd(g),t=f.redMul(h.redISub(e)).redISub(g)}return this.curve.jpoint(e,t,n)},o.prototype._dbl=function(){var e=this.curve.a,t=this.x,n=this.y,r=this.z,i=r.redSqr().redSqr(),s=t.redSqr(),a=n.redSqr(),o=s.redAdd(s).redIAdd(s).redIAdd(e.redMul(i)),c=t.redAdd(t),u=(c=c.redIAdd(c)).redMul(a),l=o.redSqr().redISub(u.redAdd(u)),d=u.redISub(l),p=a.redSqr();p=(p=(p=p.redIAdd(p)).redIAdd(p)).redIAdd(p);var f=o.redMul(d).redISub(p),h=n.redAdd(n).redMul(r);return this.curve.jpoint(l,f,h)},o.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),n=this.z.redSqr(),r=t.redSqr(),i=e.redAdd(e).redIAdd(e),s=i.redSqr(),a=this.x.redAdd(t).redSqr().redISub(e).redISub(r),o=(a=(a=(a=a.redIAdd(a)).redAdd(a).redIAdd(a)).redISub(s)).redSqr(),c=r.redIAdd(r);c=(c=(c=c.redIAdd(c)).redIAdd(c)).redIAdd(c);var u=i.redIAdd(a).redSqr().redISub(s).redISub(o).redISub(c),l=t.redMul(u);l=(l=l.redIAdd(l)).redIAdd(l);var d=this.x.redMul(o).redISub(l);d=(d=d.redIAdd(d)).redIAdd(d);var p=this.y.redMul(u.redMul(c.redISub(u)).redISub(a.redMul(o)));p=(p=(p=p.redIAdd(p)).redIAdd(p)).redIAdd(p);var f=this.z.redAdd(a).redSqr().redISub(n).redISub(o);return this.curve.jpoint(d,p,f)},o.prototype.mul=function(e,n){return e=new t(e,n),this.curve._wnafMul(this,e)},o.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),n=e.z.redSqr();if(0!==this.x.redMul(n).redISub(e.x.redMul(t)).cmpn(0))return!1;var r=t.redMul(this.z),i=n.redMul(e.z);return 0===this.y.redMul(i).redISub(e.y.redMul(r)).cmpn(0)},o.prototype.eqXToP=function(e){var t=this.z.redSqr(),n=e.toRed(this.curve.red).redMul(t);if(0===this.x.cmp(n))return!0;for(var r=e.clone(),i=this.curve.redN.redMul(t);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(n.redIAdd(i),0===this.x.cmp(n))return!0}},o.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},o.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},Bd}(),t.mont=function(){if(Hd)return qd;Hd=1;var e=Md(),t=ur(),n=Wd(),r=Cd();function i(t){n.call(this,"mont",t),this.a=new e(t.a,16).toRed(this.red),this.b=new e(t.b,16).toRed(this.red),this.i4=new e(4).toRed(this.red).redInvm(),this.two=new e(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function s(t,r,i){n.BasePoint.call(this,t,"projective"),null===r&&null===i?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new e(r,16),this.z=new e(i,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}return t(i,n),qd=i,i.prototype.validate=function(e){var t=e.normalize().x,n=t.redSqr(),r=n.redMul(t).redAdd(n.redMul(this.a)).redAdd(t);return 0===r.redSqrt().redSqr().cmp(r)},t(s,n.BasePoint),i.prototype.decodePoint=function(e,t){return this.point(r.toArray(e,t),1)},i.prototype.point=function(e,t){return new s(this,e,t)},i.prototype.pointFromJSON=function(e){return s.fromJSON(this,e)},s.prototype.precompute=function(){},s.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},s.fromJSON=function(e,t){return new s(e,t[0],t[1]||e.one)},s.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},s.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},s.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),n=e.redSub(t),r=e.redMul(t),i=n.redMul(t.redAdd(this.curve.a24.redMul(n)));return this.curve.point(r,i)},s.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},s.prototype.diffAdd=function(e,t){var n=this.x.redAdd(this.z),r=this.x.redSub(this.z),i=e.x.redAdd(e.z),s=e.x.redSub(e.z).redMul(n),a=i.redMul(r),o=t.z.redMul(s.redAdd(a).redSqr()),c=t.x.redMul(s.redISub(a).redSqr());return this.curve.point(o,c)},s.prototype.mul=function(e){for(var t=e.clone(),n=this,r=this.curve.point(null,null),i=[];0!==t.cmpn(0);t.iushrn(1))i.push(t.andln(1));for(var s=i.length-1;s>=0;s--)0===i[s]?(n=n.diffAdd(r,this),r=r.dbl()):(r=n.diffAdd(r,this),n=n.dbl());return r},s.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},s.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},s.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},s.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},s.prototype.getX=function(){return this.normalize(),this.x.fromRed()},qd}(),t.edwards=function(){if(Yd)return Fd;Yd=1;var e=Cd(),t=Md(),n=ur(),r=Wd(),i=e.assert;function s(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,r.call(this,"edwards",e),this.a=new t(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new t(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new t(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),i(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}function a(e,n,i,s,a){r.BasePoint.call(this,e,"projective"),null===n&&null===i&&null===s?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new t(n,16),this.y=new t(i,16),this.z=s?new t(s,16):this.curve.one,this.t=a&&new t(a,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}return n(s,r),Fd=s,s.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},s.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},s.prototype.jpoint=function(e,t,n,r){return this.point(e,t,n,r)},s.prototype.pointFromX=function(e,n){(e=new t(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),i=this.c2.redSub(this.a.redMul(r)),s=this.one.redSub(this.c2.redMul(this.d).redMul(r)),a=i.redMul(s.redInvm()),o=a.redSqrt();if(0!==o.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");var c=o.fromRed().isOdd();return(n&&!c||!n&&c)&&(o=o.redNeg()),this.point(e,o)},s.prototype.pointFromY=function(e,n){(e=new t(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),i=r.redSub(this.c2),s=r.redMul(this.d).redMul(this.c2).redSub(this.a),a=i.redMul(s.redInvm());if(0===a.cmp(this.zero)){if(n)throw new Error("invalid point");return this.point(this.zero,e)}var o=a.redSqrt();if(0!==o.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");return o.fromRed().isOdd()!==n&&(o=o.redNeg()),this.point(o,e)},s.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),n=e.y.redSqr(),r=t.redMul(this.a).redAdd(n),i=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(n)));return 0===r.cmp(i)},n(a,r.BasePoint),s.prototype.pointFromJSON=function(e){return a.fromJSON(this,e)},s.prototype.point=function(e,t,n,r){return new a(this,e,t,n,r)},a.fromJSON=function(e,t){return new a(e,t[0],t[1],t[2])},a.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},a.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},a.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),n=this.z.redSqr();n=n.redIAdd(n);var r=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),s=r.redAdd(t),a=s.redSub(n),o=r.redSub(t),c=i.redMul(a),u=s.redMul(o),l=i.redMul(o),d=a.redMul(s);return this.curve.point(c,u,d,l)},a.prototype._projDbl=function(){var e,t,n,r,i,s,a=this.x.redAdd(this.y).redSqr(),o=this.x.redSqr(),c=this.y.redSqr();if(this.curve.twisted){var u=(r=this.curve._mulA(o)).redAdd(c);this.zOne?(e=a.redSub(o).redSub(c).redMul(u.redSub(this.curve.two)),t=u.redMul(r.redSub(c)),n=u.redSqr().redSub(u).redSub(u)):(i=this.z.redSqr(),s=u.redSub(i).redISub(i),e=a.redSub(o).redISub(c).redMul(s),t=u.redMul(r.redSub(c)),n=u.redMul(s))}else r=o.redAdd(c),i=this.curve._mulC(this.z).redSqr(),s=r.redSub(i).redSub(i),e=this.curve._mulC(a.redISub(r)).redMul(s),t=this.curve._mulC(r).redMul(o.redISub(c)),n=r.redMul(s);return this.curve.point(e,t,n)},a.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},a.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),n=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),r=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),s=n.redSub(t),a=i.redSub(r),o=i.redAdd(r),c=n.redAdd(t),u=s.redMul(a),l=o.redMul(c),d=s.redMul(c),p=a.redMul(o);return this.curve.point(u,l,p,d)},a.prototype._projAdd=function(e){var t,n,r=this.z.redMul(e.z),i=r.redSqr(),s=this.x.redMul(e.x),a=this.y.redMul(e.y),o=this.curve.d.redMul(s).redMul(a),c=i.redSub(o),u=i.redAdd(o),l=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(s).redISub(a),d=r.redMul(c).redMul(l);return this.curve.twisted?(t=r.redMul(u).redMul(a.redSub(this.curve._mulA(s))),n=c.redMul(u)):(t=r.redMul(u).redMul(a.redSub(s)),n=this.curve._mulC(c).redMul(u)),this.curve.point(d,t,n)},a.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},a.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},a.prototype.mulAdd=function(e,t,n){return this.curve._wnafMulAdd(1,[this,t],[e,n],2,!1)},a.prototype.jmulAdd=function(e,t,n){return this.curve._wnafMulAdd(1,[this,t],[e,n],2,!0)},a.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},a.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},a.prototype.getX=function(){return this.normalize(),this.x.fromRed()},a.prototype.getY=function(){return this.normalize(),this.y.fromRed()},a.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},a.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var n=e.clone(),r=this.curve.redN.redMul(this.z);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(r),0===this.x.cmp(t))return!0}},a.prototype.toP=a.prototype.normalize,a.prototype.mixedAdd=a.prototype.add,Fd}()}(Kd)),Kd}var Jd,Zd={},Xd={},Qd={};function ep(){if(Jd)return Qd;Jd=1;var e=Rd(),t=ur();function n(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function r(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function i(e){return 1===e.length?"0"+e:e}function s(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}return Qd.inherits=t,Qd.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),s=0;s<e.length;s+=2)r.push(parseInt(e[s]+e[s+1],16))}else for(var i=0,s=0;s<e.length;s++){var a=e.charCodeAt(s);a<128?r[i++]=a:a<2048?(r[i++]=a>>6|192,r[i++]=63&a|128):n(e,s)?(a=65536+((1023&a)<<10)+(1023&e.charCodeAt(++s)),r[i++]=a>>18|240,r[i++]=a>>12&63|128,r[i++]=a>>6&63|128,r[i++]=63&a|128):(r[i++]=a>>12|224,r[i++]=a>>6&63|128,r[i++]=63&a|128)}else for(s=0;s<e.length;s++)r[s]=0|e[s];return r},Qd.toHex=function(e){for(var t="",n=0;n<e.length;n++)t+=i(e[n].toString(16));return t},Qd.htonl=r,Qd.toHex32=function(e,t){for(var n="",i=0;i<e.length;i++){var a=e[i];"little"===t&&(a=r(a)),n+=s(a.toString(16))}return n},Qd.zero2=i,Qd.zero8=s,Qd.join32=function(t,n,r,i){var s=r-n;e(s%4==0);for(var a=new Array(s/4),o=0,c=n;o<a.length;o++,c+=4){var u;u="big"===i?t[c]<<24|t[c+1]<<16|t[c+2]<<8|t[c+3]:t[c+3]<<24|t[c+2]<<16|t[c+1]<<8|t[c],a[o]=u>>>0}return a},Qd.split32=function(e,t){for(var n=new Array(4*e.length),r=0,i=0;r<e.length;r++,i+=4){var s=e[r];"big"===t?(n[i]=s>>>24,n[i+1]=s>>>16&255,n[i+2]=s>>>8&255,n[i+3]=255&s):(n[i+3]=s>>>24,n[i+2]=s>>>16&255,n[i+1]=s>>>8&255,n[i]=255&s)}return n},Qd.rotr32=function(e,t){return e>>>t|e<<32-t},Qd.rotl32=function(e,t){return e<<t|e>>>32-t},Qd.sum32=function(e,t){return e+t>>>0},Qd.sum32_3=function(e,t,n){return e+t+n>>>0},Qd.sum32_4=function(e,t,n,r){return e+t+n+r>>>0},Qd.sum32_5=function(e,t,n,r,i){return e+t+n+r+i>>>0},Qd.sum64=function(e,t,n,r){var i=e[t],s=r+e[t+1]>>>0,a=(s<r?1:0)+n+i;e[t]=a>>>0,e[t+1]=s},Qd.sum64_hi=function(e,t,n,r){return(t+r>>>0<t?1:0)+e+n>>>0},Qd.sum64_lo=function(e,t,n,r){return t+r>>>0},Qd.sum64_4_hi=function(e,t,n,r,i,s,a,o){var c=0,u=t;return c+=(u=u+r>>>0)<t?1:0,c+=(u=u+s>>>0)<s?1:0,e+n+i+a+(c+=(u=u+o>>>0)<o?1:0)>>>0},Qd.sum64_4_lo=function(e,t,n,r,i,s,a,o){return t+r+s+o>>>0},Qd.sum64_5_hi=function(e,t,n,r,i,s,a,o,c,u){var l=0,d=t;return l+=(d=d+r>>>0)<t?1:0,l+=(d=d+s>>>0)<s?1:0,l+=(d=d+o>>>0)<o?1:0,e+n+i+a+c+(l+=(d=d+u>>>0)<u?1:0)>>>0},Qd.sum64_5_lo=function(e,t,n,r,i,s,a,o,c,u){return t+r+s+o+u>>>0},Qd.rotr64_hi=function(e,t,n){return(t<<32-n|e>>>n)>>>0},Qd.rotr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0},Qd.shr64_hi=function(e,t,n){return e>>>n},Qd.shr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0},Qd}var tp,np={};function rp(){if(tp)return np;tp=1;var e=ep(),t=Rd();function n(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}return np.BlockHash=n,n.prototype.update=function(t,n){if(t=e.toArray(t,n),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var r=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-r,t.length),0===this.pending.length&&(this.pending=null),t=e.join32(t,0,t.length-r,this.endian);for(var i=0;i<t.length;i+=this._delta32)this._update(t,i,i+this._delta32)}return this},n.prototype.digest=function(e){return this.update(this._pad()),t(null===this.pending),this._digest(e)},n.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,n=t-(e+this.padLength)%t,r=new Array(n+this.padLength);r[0]=128;for(var i=1;i<n;i++)r[i]=0;if(e<<=3,"big"===this.endian){for(var s=8;s<this.padLength;s++)r[i++]=0;r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=e>>>24&255,r[i++]=e>>>16&255,r[i++]=e>>>8&255,r[i++]=255&e}else for(r[i++]=255&e,r[i++]=e>>>8&255,r[i++]=e>>>16&255,r[i++]=e>>>24&255,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,s=8;s<this.padLength;s++)r[i++]=0;return r},np}var ip,sp,ap,op,cp,up,lp,dp,pp,fp,hp,mp,gp={},yp={};function bp(){if(ip)return yp;ip=1;var e=ep().rotr32;function t(e,t,n){return e&t^~e&n}function n(e,t,n){return e&t^e&n^t&n}function r(e,t,n){return e^t^n}return yp.ft_1=function(e,i,s,a){return 0===e?t(i,s,a):1===e||3===e?r(i,s,a):2===e?n(i,s,a):void 0},yp.ch32=t,yp.maj32=n,yp.p32=r,yp.s0_256=function(t){return e(t,2)^e(t,13)^e(t,22)},yp.s1_256=function(t){return e(t,6)^e(t,11)^e(t,25)},yp.g0_256=function(t){return e(t,7)^e(t,18)^t>>>3},yp.g1_256=function(t){return e(t,17)^e(t,19)^t>>>10},yp}function vp(){if(cp)return op;cp=1;var e=ep(),t=rp(),n=bp(),r=Rd(),i=e.sum32,s=e.sum32_4,a=e.sum32_5,o=n.ch32,c=n.maj32,u=n.s0_256,l=n.s1_256,d=n.g0_256,p=n.g1_256,f=t.BlockHash,h=[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];function m(){if(!(this instanceof m))return new m;f.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=h,this.W=new Array(64)}return e.inherits(m,f),op=m,m.blockSize=512,m.outSize=256,m.hmacStrength=192,m.padLength=64,m.prototype._update=function(e,t){for(var n=this.W,f=0;f<16;f++)n[f]=e[t+f];for(;f<n.length;f++)n[f]=s(p(n[f-2]),n[f-7],d(n[f-15]),n[f-16]);var h=this.h[0],m=this.h[1],g=this.h[2],y=this.h[3],b=this.h[4],v=this.h[5],w=this.h[6],x=this.h[7];for(r(this.k.length===n.length),f=0;f<n.length;f++){var _=a(x,l(b),o(b,v,w),this.k[f],n[f]),E=i(u(h),c(h,m,g));x=w,w=v,v=b,b=i(y,_),y=g,g=m,m=h,h=i(_,E)}this.h[0]=i(this.h[0],h),this.h[1]=i(this.h[1],m),this.h[2]=i(this.h[2],g),this.h[3]=i(this.h[3],y),this.h[4]=i(this.h[4],b),this.h[5]=i(this.h[5],v),this.h[6]=i(this.h[6],w),this.h[7]=i(this.h[7],x)},m.prototype._digest=function(t){return"hex"===t?e.toHex32(this.h,"big"):e.split32(this.h,"big")},op}function wp(){if(pp)return dp;pp=1;var e=ep(),t=rp(),n=Rd(),r=e.rotr64_hi,i=e.rotr64_lo,s=e.shr64_hi,a=e.shr64_lo,o=e.sum64,c=e.sum64_hi,u=e.sum64_lo,l=e.sum64_4_hi,d=e.sum64_4_lo,p=e.sum64_5_hi,f=e.sum64_5_lo,h=t.BlockHash,m=[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];function g(){if(!(this instanceof g))return new g;h.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=m,this.W=new Array(160)}function y(e,t,n,r,i){var s=e&n^~e&i;return s<0&&(s+=4294967296),s}function b(e,t,n,r,i,s){var a=t&r^~t&s;return a<0&&(a+=4294967296),a}function v(e,t,n,r,i){var s=e&n^e&i^n&i;return s<0&&(s+=4294967296),s}function w(e,t,n,r,i,s){var a=t&r^t&s^r&s;return a<0&&(a+=4294967296),a}function x(e,t){var n=r(e,t,28)^r(t,e,2)^r(t,e,7);return n<0&&(n+=4294967296),n}function _(e,t){var n=i(e,t,28)^i(t,e,2)^i(t,e,7);return n<0&&(n+=4294967296),n}function E(e,t){var n=r(e,t,14)^r(e,t,18)^r(t,e,9);return n<0&&(n+=4294967296),n}function S(e,t){var n=i(e,t,14)^i(e,t,18)^i(t,e,9);return n<0&&(n+=4294967296),n}function k(e,t){var n=r(e,t,1)^r(e,t,8)^s(e,t,7);return n<0&&(n+=4294967296),n}function A(e,t){var n=i(e,t,1)^i(e,t,8)^a(e,t,7);return n<0&&(n+=4294967296),n}function T(e,t){var n=r(e,t,19)^r(t,e,29)^s(e,t,6);return n<0&&(n+=4294967296),n}function M(e,t){var n=i(e,t,19)^i(t,e,29)^a(e,t,6);return n<0&&(n+=4294967296),n}return e.inherits(g,h),dp=g,g.blockSize=1024,g.outSize=512,g.hmacStrength=192,g.padLength=128,g.prototype._prepareBlock=function(e,t){for(var n=this.W,r=0;r<32;r++)n[r]=e[t+r];for(;r<n.length;r+=2){var i=T(n[r-4],n[r-3]),s=M(n[r-4],n[r-3]),a=n[r-14],o=n[r-13],c=k(n[r-30],n[r-29]),u=A(n[r-30],n[r-29]),p=n[r-32],f=n[r-31];n[r]=l(i,s,a,o,c,u,p,f),n[r+1]=d(i,s,a,o,c,u,p,f)}},g.prototype._update=function(e,t){this._prepareBlock(e,t);var r=this.W,i=this.h[0],s=this.h[1],a=this.h[2],l=this.h[3],d=this.h[4],h=this.h[5],m=this.h[6],g=this.h[7],k=this.h[8],A=this.h[9],T=this.h[10],M=this.h[11],R=this.h[12],O=this.h[13],I=this.h[14],N=this.h[15];n(this.k.length===r.length);for(var P=0;P<r.length;P+=2){var C=I,j=N,L=E(k,A),D=S(k,A),$=y(k,A,T,M,R),U=b(k,A,T,M,R,O),B=this.k[P],z=this.k[P+1],q=r[P],H=r[P+1],F=p(C,j,L,D,$,U,B,z,q,H),Y=f(C,j,L,D,$,U,B,z,q,H);C=x(i,s),j=_(i,s),L=v(i,s,a,l,d),D=w(i,s,a,l,d,h);var V=c(C,j,L,D),K=u(C,j,L,D);I=R,N=O,R=T,O=M,T=k,M=A,k=c(m,g,F,Y),A=u(g,g,F,Y),m=d,g=h,d=a,h=l,a=i,l=s,i=c(F,Y,V,K),s=u(F,Y,V,K)}o(this.h,0,i,s),o(this.h,2,a,l),o(this.h,4,d,h),o(this.h,6,m,g),o(this.h,8,k,A),o(this.h,10,T,M),o(this.h,12,R,O),o(this.h,14,I,N)},g.prototype._digest=function(t){return"hex"===t?e.toHex32(this.h,"big"):e.split32(this.h,"big")},dp}function xp(){return mp||(mp=1,gp.sha1=function(){if(ap)return sp;ap=1;var e=ep(),t=rp(),n=bp(),r=e.rotl32,i=e.sum32,s=e.sum32_5,a=n.ft_1,o=t.BlockHash,c=[1518500249,1859775393,2400959708,3395469782];function u(){if(!(this instanceof u))return new u;o.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}return e.inherits(u,o),sp=u,u.blockSize=512,u.outSize=160,u.hmacStrength=80,u.padLength=64,u.prototype._update=function(e,t){for(var n=this.W,o=0;o<16;o++)n[o]=e[t+o];for(;o<n.length;o++)n[o]=r(n[o-3]^n[o-8]^n[o-14]^n[o-16],1);var u=this.h[0],l=this.h[1],d=this.h[2],p=this.h[3],f=this.h[4];for(o=0;o<n.length;o++){var h=~~(o/20),m=s(r(u,5),a(h,l,d,p),f,n[o],c[h]);f=p,p=d,d=r(l,30),l=u,u=m}this.h[0]=i(this.h[0],u),this.h[1]=i(this.h[1],l),this.h[2]=i(this.h[2],d),this.h[3]=i(this.h[3],p),this.h[4]=i(this.h[4],f)},u.prototype._digest=function(t){return"hex"===t?e.toHex32(this.h,"big"):e.split32(this.h,"big")},sp}(),gp.sha224=function(){if(lp)return up;lp=1;var e=ep(),t=vp();function n(){if(!(this instanceof n))return new n;t.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}return e.inherits(n,t),up=n,n.blockSize=512,n.outSize=224,n.hmacStrength=192,n.padLength=64,n.prototype._digest=function(t){return"hex"===t?e.toHex32(this.h.slice(0,7),"big"):e.split32(this.h.slice(0,7),"big")},up}(),gp.sha256=vp(),gp.sha384=function(){if(hp)return fp;hp=1;var e=ep(),t=wp();function n(){if(!(this instanceof n))return new n;t.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}return e.inherits(n,t),fp=n,n.blockSize=1024,n.outSize=384,n.hmacStrength=192,n.padLength=128,n.prototype._digest=function(t){return"hex"===t?e.toHex32(this.h.slice(0,12),"big"):e.split32(this.h.slice(0,12),"big")},fp}(),gp.sha512=wp()),gp}var _p,Ep,Sp,kp,Ap,Tp,Mp,Rp,Op,Ip,Np,Pp,Cp,jp,Lp,Dp,$p,Up,Bp,zp,qp,Hp,Fp={};function Yp(){return kp||(kp=1,function(){var e=Xd;e.utils=ep(),e.common=rp(),e.sha=xp(),e.ripemd=function(){if(_p)return Fp;_p=1;var e=ep(),t=rp(),n=e.rotl32,r=e.sum32,i=e.sum32_3,s=e.sum32_4,a=t.BlockHash;function o(){if(!(this instanceof o))return new o;a.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function c(e,t,n,r){return e<=15?t^n^r:e<=31?t&n|~t&r:e<=47?(t|~n)^r:e<=63?t&r|n&~r:t^(n|~r)}function u(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function l(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}e.inherits(o,a),Fp.ripemd160=o,o.blockSize=512,o.outSize=160,o.hmacStrength=192,o.padLength=64,o.prototype._update=function(e,t){for(var a=this.h[0],o=this.h[1],m=this.h[2],g=this.h[3],y=this.h[4],b=a,v=o,w=m,x=g,_=y,E=0;E<80;E++){var S=r(n(s(a,c(E,o,m,g),e[d[E]+t],u(E)),f[E]),y);a=y,y=g,g=n(m,10),m=o,o=S,S=r(n(s(b,c(79-E,v,w,x),e[p[E]+t],l(E)),h[E]),_),b=_,_=x,x=n(w,10),w=v,v=S}S=i(this.h[1],m,x),this.h[1]=i(this.h[2],g,_),this.h[2]=i(this.h[3],y,b),this.h[3]=i(this.h[4],a,v),this.h[4]=i(this.h[0],o,w),this.h[0]=S},o.prototype._digest=function(t){return"hex"===t?e.toHex32(this.h,"little"):e.split32(this.h,"little")};var d=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],p=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],f=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],h=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11];return Fp}(),e.hmac=function(){if(Sp)return Ep;Sp=1;var e=ep(),t=Rd();function n(t,r,i){if(!(this instanceof n))return new n(t,r,i);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(e.toArray(r,i))}return Ep=n,n.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),t(e.length<=this.blockSize);for(var n=e.length;n<this.blockSize;n++)e.push(0);for(n=0;n<e.length;n++)e[n]^=54;for(this.inner=(new this.Hash).update(e),n=0;n<e.length;n++)e[n]^=106;this.outer=(new this.Hash).update(e)},n.prototype.update=function(e,t){return this.inner.update(e,t),this},n.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)},Ep}(),e.sha1=e.sha.sha1,e.sha256=e.sha.sha256,e.sha224=e.sha.sha224,e.sha384=e.sha.sha384,e.sha512=e.sha.sha512,e.ripemd160=e.ripemd.ripemd160}()),Xd}function Vp(){return Mp||(Mp=1,function(e){var t,n=e,r=Yp(),i=Gd(),s=Cd().assert;function a(e){"short"===e.type?this.curve=new i.short(e):"edwards"===e.type?this.curve=new i.edwards(e):this.curve=new i.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function o(e,t){Object.defineProperty(n,e,{configurable:!0,enumerable:!0,get:function(){var r=new a(t);return Object.defineProperty(n,e,{configurable:!0,enumerable:!0,value:r}),r}})}n.PresetCurve=a,o("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:r.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),o("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:r.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),o("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:r.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),o("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:r.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),o("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:r.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),o("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:r.sha256,gRed:!1,g:["9"]}),o("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:r.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{t=Tp?Ap:(Tp=1,Ap={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}})}catch(e){t=void 0}o("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:r.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",t]})}(Zd)),Zd}function Kp(){if(Lp)return jp;Lp=1;var e=Md(),t=function(){if(Op)return Rp;Op=1;var e=Yp(),t=Pd(),n=Rd();function r(e){if(!(this instanceof r))return new r(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var i=t.toArray(e.entropy,e.entropyEnc||"hex"),s=t.toArray(e.nonce,e.nonceEnc||"hex"),a=t.toArray(e.pers,e.persEnc||"hex");n(i.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(i,s,a)}return Rp=r,r.prototype._init=function(e,t,n){var r=e.concat(t).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(r),this._reseed=1,this.reseedInterval=281474976710656},r.prototype._hmac=function(){return new e.hmac(this.hash,this.K)},r.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},r.prototype.reseed=function(e,r,i,s){"string"!=typeof r&&(s=i,i=r,r=null),e=t.toArray(e,r),i=t.toArray(i,s),n(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(i||[])),this._reseed=1},r.prototype.generate=function(e,n,r,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof n&&(i=r,r=n,n=null),r&&(r=t.toArray(r,i||"hex"),this._update(r));for(var s=[];s.length<e;)this.V=this._hmac().update(this.V).digest(),s=s.concat(this.V);var a=s.slice(0,e);return this._update(r),this._reseed++,t.encode(a,n)},Rp}(),n=Cd(),r=Vp(),i=Dd(),s=n.assert,a=function(){if(Np)return Ip;Np=1;var e=Md(),t=Cd().assert;function n(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}return Ip=n,n.fromPublic=function(e,t,r){return t instanceof n?t:new n(e,{pub:t,pubEnc:r})},n.fromPrivate=function(e,t,r){return t instanceof n?t:new n(e,{priv:t,privEnc:r})},n.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},n.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},n.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},n.prototype._importPrivate=function(t,n){this.priv=new e(t,n||16),this.priv=this.priv.umod(this.ec.curve.n)},n.prototype._importPublic=function(e,n){if(e.x||e.y)return"mont"===this.ec.curve.type?t(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||t(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,n)},n.prototype.derive=function(e){return e.validate()||t(e.validate(),"public point not validated"),e.mul(this.priv).getX()},n.prototype.sign=function(e,t,n){return this.ec.sign(e,this,t,n)},n.prototype.verify=function(e,t,n){return this.ec.verify(e,t,this,void 0,n)},n.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"},Ip}(),o=function(){if(Cp)return Pp;Cp=1;var e=Md(),t=Cd(),n=t.assert;function r(t,i){if(t instanceof r)return t;this._importDER(t,i)||(n(t.r&&t.s,"Signature without r or s"),this.r=new e(t.r,16),this.s=new e(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}function i(){this.place=0}function s(e,t){var n=e[t.place++];if(!(128&n))return n;var r=15&n;if(0===r||r>4)return!1;if(0===e[t.place])return!1;for(var i=0,s=0,a=t.place;s<r;s++,a++)i<<=8,i|=e[a],i>>>=0;return!(i<=127)&&(t.place=a,i)}function a(e){for(var t=0,n=e.length-1;!e[t]&&!(128&e[t+1])&&t<n;)t++;return 0===t?e:e.slice(t)}function o(e,t){if(t<128)e.push(t);else{var n=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|n);--n;)e.push(t>>>(n<<3)&255);e.push(t)}}return Pp=r,r.prototype._importDER=function(n,r){n=t.toArray(n,r);var a=new i;if(48!==n[a.place++])return!1;var o=s(n,a);if(!1===o)return!1;if(o+a.place!==n.length)return!1;if(2!==n[a.place++])return!1;var c=s(n,a);if(!1===c)return!1;if(128&n[a.place])return!1;var u=n.slice(a.place,c+a.place);if(a.place+=c,2!==n[a.place++])return!1;var l=s(n,a);if(!1===l)return!1;if(n.length!==l+a.place)return!1;if(128&n[a.place])return!1;var d=n.slice(a.place,l+a.place);if(0===u[0]){if(!(128&u[1]))return!1;u=u.slice(1)}if(0===d[0]){if(!(128&d[1]))return!1;d=d.slice(1)}return this.r=new e(u),this.s=new e(d),this.recoveryParam=null,!0},r.prototype.toDER=function(e){var n=this.r.toArray(),r=this.s.toArray();for(128&n[0]&&(n=[0].concat(n)),128&r[0]&&(r=[0].concat(r)),n=a(n),r=a(r);!(r[0]||128&r[1]);)r=r.slice(1);var i=[2];o(i,n.length),(i=i.concat(n)).push(2),o(i,r.length);var s=i.concat(r),c=[48];return o(c,s.length),c=c.concat(s),t.encode(c,e)},Pp}();function c(e){if(!(this instanceof c))return new c(e);"string"==typeof e&&(s(Object.prototype.hasOwnProperty.call(r,e),"Unknown curve "+e),e=r[e]),e instanceof r.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}return jp=c,c.prototype.keyPair=function(e){return new a(this,e)},c.prototype.keyFromPrivate=function(e,t){return a.fromPrivate(this,e,t)},c.prototype.keyFromPublic=function(e,t){return a.fromPublic(this,e,t)},c.prototype.genKeyPair=function(n){n||(n={});for(var r=new t({hash:this.hash,pers:n.pers,persEnc:n.persEnc||"utf8",entropy:n.entropy||i(this.hash.hmacStrength),entropyEnc:n.entropy&&n.entropyEnc||"utf8",nonce:this.n.toArray()}),s=this.n.byteLength(),a=this.n.sub(new e(2));;){var o=new e(r.generate(s));if(!(o.cmp(a)>0))return o.iaddn(1),this.keyFromPrivate(o)}},c.prototype._truncateToN=function(t,n,r){var i;if(e.isBN(t)||"number"==typeof t)i=(t=new e(t,16)).byteLength();else if("object"==typeof t)i=t.length,t=new e(t,16);else{var s=t.toString();i=s.length+1>>>1,t=new e(s,16)}"number"!=typeof r&&(r=8*i);var a=r-this.n.bitLength();return a>0&&(t=t.ushrn(a)),!n&&t.cmp(this.n)>=0?t.sub(this.n):t},c.prototype.sign=function(n,r,i,a){if("object"==typeof i&&(a=i,i=null),a||(a={}),"string"!=typeof n&&"number"!=typeof n&&!e.isBN(n)){s("object"==typeof n&&n&&"number"==typeof n.length,"Expected message to be an array-like, a hex string, or a BN instance"),s(n.length>>>0===n.length);for(var c=0;c<n.length;c++)s((255&n[c])===n[c])}r=this.keyFromPrivate(r,i),n=this._truncateToN(n,!1,a.msgBitLength),s(!n.isNeg(),"Can not sign a negative message");var u=this.n.byteLength(),l=r.getPrivate().toArray("be",u),d=n.toArray("be",u);s(new e(d).eq(n),"Can not sign message");for(var p=new t({hash:this.hash,entropy:l,nonce:d,pers:a.pers,persEnc:a.persEnc||"utf8"}),f=this.n.sub(new e(1)),h=0;;h++){var m=a.k?a.k(h):new e(p.generate(this.n.byteLength()));if(!((m=this._truncateToN(m,!0)).cmpn(1)<=0||m.cmp(f)>=0)){var g=this.g.mul(m);if(!g.isInfinity()){var y=g.getX(),b=y.umod(this.n);if(0!==b.cmpn(0)){var v=m.invm(this.n).mul(b.mul(r.getPrivate()).iadd(n));if(0!==(v=v.umod(this.n)).cmpn(0)){var w=(g.getY().isOdd()?1:0)|(0!==y.cmp(b)?2:0);return a.canonical&&v.cmp(this.nh)>0&&(v=this.n.sub(v),w^=1),new o({r:b,s:v,recoveryParam:w})}}}}}},c.prototype.verify=function(e,t,n,r,i){i||(i={}),e=this._truncateToN(e,!1,i.msgBitLength),n=this.keyFromPublic(n,r);var s=(t=new o(t,"hex")).r,a=t.s;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var c,u=a.invm(this.n),l=u.mul(e).umod(this.n),d=u.mul(s).umod(this.n);return this.curve._maxwellTrick?!(c=this.g.jmulAdd(l,n.getPublic(),d)).isInfinity()&&c.eqXToP(s):!(c=this.g.mulAdd(l,n.getPublic(),d)).isInfinity()&&0===c.getX().umod(this.n).cmp(s)},c.prototype.recoverPubKey=function(t,n,r,i){s((3&r)===r,"The recovery param is more than two bits"),n=new o(n,i);var a=this.n,c=new e(t),u=n.r,l=n.s,d=1&r,p=r>>1;if(u.cmp(this.curve.p.umod(this.curve.n))>=0&&p)throw new Error("Unable to find sencond key candinate");u=p?this.curve.pointFromX(u.add(this.curve.n),d):this.curve.pointFromX(u,d);var f=n.r.invm(a),h=a.sub(c).mul(f).umod(a),m=l.mul(f).umod(a);return this.g.mulAdd(h,u,m)},c.prototype.getKeyRecoveryParam=function(e,t,n,r){if(null!==(t=new o(t,r)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var s;try{s=this.recoverPubKey(e,t,i)}catch(e){continue}if(s.eq(n))return i}throw new Error("Unable to find valid recovery factor")},jp}function Wp(){if(qp)return zp;qp=1;var e=Yp(),t=Vp(),n=Cd(),r=n.assert,i=n.parseBytes,s=function(){if($p)return Dp;$p=1;var e=Cd(),t=e.assert,n=e.parseBytes,r=e.cachedProperty;function i(e,t){this.eddsa=e,this._secret=n(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=n(t.pub)}return i.fromPublic=function(e,t){return t instanceof i?t:new i(e,{pub:t})},i.fromSecret=function(e,t){return t instanceof i?t:new i(e,{secret:t})},i.prototype.secret=function(){return this._secret},r(i,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),r(i,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),r(i,"privBytes",(function(){var e=this.eddsa,t=this.hash(),n=e.encodingLength-1,r=t.slice(0,e.encodingLength);return r[0]&=248,r[n]&=127,r[n]|=64,r})),r(i,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),r(i,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),r(i,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),i.prototype.sign=function(e){return t(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},i.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},i.prototype.getSecret=function(n){return t(this._secret,"KeyPair is public only"),e.encode(this.secret(),n)},i.prototype.getPublic=function(t){return e.encode(this.pubBytes(),t)},Dp=i}(),a=function(){if(Bp)return Up;Bp=1;var e=Md(),t=Cd(),n=t.assert,r=t.cachedProperty,i=t.parseBytes;function s(t,r){this.eddsa=t,"object"!=typeof r&&(r=i(r)),Array.isArray(r)&&(n(r.length===2*t.encodingLength,"Signature has invalid size"),r={R:r.slice(0,t.encodingLength),S:r.slice(t.encodingLength)}),n(r.R&&r.S,"Signature without R or S"),t.isPoint(r.R)&&(this._R=r.R),r.S instanceof e&&(this._S=r.S),this._Rencoded=Array.isArray(r.R)?r.R:r.Rencoded,this._Sencoded=Array.isArray(r.S)?r.S:r.Sencoded}return r(s,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),r(s,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),r(s,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),r(s,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),s.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},s.prototype.toHex=function(){return t.encode(this.toBytes(),"hex").toUpperCase()},Up=s}();function o(n){if(r("ed25519"===n,"only tested with ed25519 so far"),!(this instanceof o))return new o(n);n=t[n].curve,this.curve=n,this.g=n.g,this.g.precompute(n.n.bitLength()+1),this.pointClass=n.point().constructor,this.encodingLength=Math.ceil(n.n.bitLength()/8),this.hash=e.sha512}return zp=o,o.prototype.sign=function(e,t){e=i(e);var n=this.keyFromSecret(t),r=this.hashInt(n.messagePrefix(),e),s=this.g.mul(r),a=this.encodePoint(s),o=this.hashInt(a,n.pubBytes(),e).mul(n.priv()),c=r.add(o).umod(this.curve.n);return this.makeSignature({R:s,S:c,Rencoded:a})},o.prototype.verify=function(e,t,n){if(e=i(e),(t=this.makeSignature(t)).S().gte(t.eddsa.curve.n)||t.S().isNeg())return!1;var r=this.keyFromPublic(n),s=this.hashInt(t.Rencoded(),r.pubBytes(),e),a=this.g.mul(t.S());return t.R().add(r.pub().mul(s)).eq(a)},o.prototype.hashInt=function(){for(var e=this.hash(),t=0;t<arguments.length;t++)e.update(arguments[t]);return n.intFromLE(e.digest()).umod(this.curve.n)},o.prototype.keyFromPublic=function(e){return s.fromPublic(this,e)},o.prototype.keyFromSecret=function(e){return s.fromSecret(this,e)},o.prototype.makeSignature=function(e){return e instanceof a?e:new a(this,e)},o.prototype.encodePoint=function(e){var t=e.getY().toArray("le",this.encodingLength);return t[this.encodingLength-1]|=e.getX().isOdd()?128:0,t},o.prototype.decodePoint=function(e){var t=(e=n.parseBytes(e)).length-1,r=e.slice(0,t).concat(-129&e[t]),i=!!(128&e[t]),s=n.intFromLE(r);return this.curve.pointFromY(s,i)},o.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)},o.prototype.decodeInt=function(e){return n.intFromLE(e)},o.prototype.isPoint=function(e){return e instanceof this.pointClass},zp}function Gp(){return Hp||(Hp=1,function(){var e=Ed;e.version=Sd,e.utils=Cd(),e.rand=Dd(),e.curve=Gd(),e.curves=Vp(),e.ec=Kp(),e.eddsa=Wp()}()),Ed}const Jp=new(Gp().ec)("secp256k1"),Zp=globalThis.crypto||globalThis.msCrypto||{};Zp.subtle||Zp.webkitSubtle;const Xp=Buffer.from("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141","hex"),Qp=Buffer.alloc(32,0);function ef(e,t){if(!e)throw new Error(t)}function tf(e){return t=e,!(!Buffer.isBuffer(t)||32!==t.length)&&(e.compare(Qp)>0&&e.compare(Xp)<0);var t}function nf(e){if(void 0===Zp.getRandomValues)return Buffer.from(Zp.randomBytes(e));const t=new Uint8Array(e);return Zp.getRandomValues(t),Buffer.from(t)}var rf,sf={},af={},of={},cf={exports:{}},uf=cf.exports;function lf(){return rf||(rf=1,function(e,t){function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function r(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function i(e,t,n){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var s;"object"==typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:require("buffer").Buffer}catch(e){}function a(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+e)}function o(e,t,n){var r=a(e,n);return n-1>=t&&(r|=a(e,n-1)<<4),r}function c(e,t,r,i){for(var s=0,a=0,o=Math.min(e.length,r),c=t;c<o;c++){var u=e.charCodeAt(c)-48;s*=i,a=u>=49?u-49+10:u>=17?u-17+10:u,n(u>=0&&a<i,"Invalid character"),s+=a}return s}function u(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(i.isBN=function(e){return e instanceof i||null!==e&&"object"==typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,r):(this._parseBase(e,t,i),"le"===r&&this._initArray(this.toArray(),t,r)))},i.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},i.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var s,a,o=0;if("be"===r)for(i=e.length-1,s=0;i>=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[s]|=a<<o&67108863,this.words[s+1]=a>>>26-o&67108863,(o+=24)>=26&&(o-=26,s++);else if("le"===r)for(i=0,s=0;i<e.length;i+=3)a=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[s]|=a<<o&67108863,this.words[s+1]=a>>>26-o&67108863,(o+=24)>=26&&(o-=26,s++);return this._strip()},i.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i,s=0,a=0;if("be"===n)for(r=e.length-1;r>=t;r-=2)i=o(e,t,r)<<s,this.words[a]|=67108863&i,s>=18?(s-=18,a+=1,this.words[a]|=i>>>26):s+=8;else for(r=(e.length-t)%2==0?t+1:t;r<e.length;r+=2)i=o(e,t,r)<<s,this.words[a]|=67108863&i,s>=18?(s-=18,a+=1,this.words[a]|=i>>>26):s+=8;this._strip()},i.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var s=e.length-n,a=s%r,o=Math.min(s,s-a)+n,u=0,l=n;l<o;l+=r)u=c(e,l,l+r,t),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==a){var d=1;for(u=c(e,l,e.length,t),l=0;l<a;l++)d*=t;this.imuln(d),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this._strip()},i.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},i.prototype._move=function(e){u(e,this)},i.prototype.clone=function(){var e=new i(null);return this.copy(e),e},i.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},i.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=l}catch(e){i.prototype.inspect=l}else i.prototype.inspect=l;function l(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],p=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=0|e.words[0],s=0|t.words[0],a=i*s,o=67108863&a,c=a/67108864|0;n.words[0]=o;for(var u=1;u<r;u++){for(var l=c>>>26,d=67108863&c,p=Math.min(u,t.length-1),f=Math.max(0,u-e.length+1);f<=p;f++){var h=u-f|0;l+=(a=(i=0|e.words[h])*(s=0|t.words[f])+d)/67108864|0,d=67108863&a}n.words[u]=0|d,c=0|l}return 0!==c?n.words[u]=0|c:n.length--,n._strip()}i.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,s=0,a=0;a<this.length;a++){var o=this.words[a],c=(16777215&(o<<i|s)).toString(16);s=o>>>24-i&16777215,(i+=2)>=26&&(i-=26,a--),r=0!==s||a!==this.length-1?d[6-c.length]+c+r:c+r}for(0!==s&&(r=s.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var u=p[e],l=f[e];r="";var h=this.clone();for(h.negative=0;!h.isZero();){var m=h.modrn(l).toString(e);r=(h=h.idivn(l)).isZero()?m+r:d[u-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16,2)},s&&(i.prototype.toBuffer=function(e,t){return this.toArrayLike(s,e,t)}),i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,r){this._strip();var i=this.byteLength(),s=r||Math.max(1,i);n(i<=s,"byte array longer than desired length"),n(s>0,"Requested array length <= 0");var a=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,s);return this["_toArrayLike"+("le"===t?"LE":"BE")](a,i),a},i.prototype._toArrayLikeLE=function(e,t){for(var n=0,r=0,i=0,s=0;i<this.length;i++){var a=this.words[i]<<s|r;e[n++]=255&a,n<e.length&&(e[n++]=a>>8&255),n<e.length&&(e[n++]=a>>16&255),6===s?(n<e.length&&(e[n++]=a>>24&255),r=0,s=0):(r=a>>>24,s+=2)}if(n<e.length)for(e[n++]=r;n<e.length;)e[n++]=0},i.prototype._toArrayLikeBE=function(e,t){for(var n=e.length-1,r=0,i=0,s=0;i<this.length;i++){var a=this.words[i]<<s|r;e[n--]=255&a,n>=0&&(e[n--]=a>>8&255),n>=0&&(e[n--]=a>>16&255),6===s?(n>=0&&(e[n--]=a>>24&255),r=0,s=0):(r=a>>>24,s+=2)}if(n>=0)for(e[n--]=r;n>=0;)e[n--]=0},Math.clz32?i.prototype._countBits=function(e){return 32-Math.clz32(e)}:i.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 8191&t||(n+=13,t>>>=13),127&t||(n+=7,t>>>=7),15&t||(n+=4,t>>>=4),3&t||(n+=2,t>>>=2),1&t||n++,n},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,26!==n)break}return e},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},i.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},i.prototype.isNeg=function(){return 0!==this.negative},i.prototype.neg=function(){return this.clone().ineg()},i.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},i.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this._strip()},i.prototype.ior=function(e){return n(!(this.negative|e.negative)),this.iuor(e)},i.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this._strip()},i.prototype.iand=function(e){return n(!(this.negative|e.negative)),this.iuand(e)},i.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;r<n.length;r++)this.words[r]=t.words[r]^n.words[r];if(this!==t)for(;r<t.length;r++)this.words[r]=t.words[r];return this.length=t.length,this._strip()},i.prototype.ixor=function(e){return n(!(this.negative|e.negative)),this.iuxor(e)},i.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this._strip()},i.prototype.iadd=function(e){var t,n,r;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(n=this,r=e):(n=e,r=this);for(var i=0,s=0;s<r.length;s++)t=(0|n.words[s])+(0|r.words[s])+i,this.words[s]=67108863&t,i=t>>>26;for(;0!==i&&s<n.length;s++)t=(0|n.words[s])+i,this.words[s]=67108863&t,i=t>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;s<n.length;s++)this.words[s]=n.words[s];return this},i.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=e):(n=e,r=this);for(var s=0,a=0;a<r.length;a++)s=(t=(0|n.words[a])-(0|r.words[a])+s)>>26,this.words[a]=67108863&t;for(;0!==s&&a<n.length;a++)s=(t=(0|n.words[a])+s)>>26,this.words[a]=67108863&t;if(0===s&&a<n.length&&n!==this)for(;a<n.length;a++)this.words[a]=n.words[a];return this.length=Math.max(this.length,a),n!==this&&(this.negative=1),this._strip()},i.prototype.sub=function(e){return this.clone().isub(e)};var m=function(e,t,n){var r,i,s,a=e.words,o=t.words,c=n.words,u=0,l=0|a[0],d=8191&l,p=l>>>13,f=0|a[1],h=8191&f,m=f>>>13,g=0|a[2],y=8191&g,b=g>>>13,v=0|a[3],w=8191&v,x=v>>>13,_=0|a[4],E=8191&_,S=_>>>13,k=0|a[5],A=8191&k,T=k>>>13,M=0|a[6],R=8191&M,O=M>>>13,I=0|a[7],N=8191&I,P=I>>>13,C=0|a[8],j=8191&C,L=C>>>13,D=0|a[9],$=8191&D,U=D>>>13,B=0|o[0],z=8191&B,q=B>>>13,H=0|o[1],F=8191&H,Y=H>>>13,V=0|o[2],K=8191&V,W=V>>>13,G=0|o[3],J=8191&G,Z=G>>>13,X=0|o[4],Q=8191&X,ee=X>>>13,te=0|o[5],ne=8191&te,re=te>>>13,ie=0|o[6],se=8191&ie,ae=ie>>>13,oe=0|o[7],ce=8191&oe,ue=oe>>>13,le=0|o[8],de=8191&le,pe=le>>>13,fe=0|o[9],he=8191&fe,me=fe>>>13;n.negative=e.negative^t.negative,n.length=19;var ge=(u+(r=Math.imul(d,z))|0)+((8191&(i=(i=Math.imul(d,q))+Math.imul(p,z)|0))<<13)|0;u=((s=Math.imul(p,q))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(h,z),i=(i=Math.imul(h,q))+Math.imul(m,z)|0,s=Math.imul(m,q);var ye=(u+(r=r+Math.imul(d,F)|0)|0)+((8191&(i=(i=i+Math.imul(d,Y)|0)+Math.imul(p,F)|0))<<13)|0;u=((s=s+Math.imul(p,Y)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(y,z),i=(i=Math.imul(y,q))+Math.imul(b,z)|0,s=Math.imul(b,q),r=r+Math.imul(h,F)|0,i=(i=i+Math.imul(h,Y)|0)+Math.imul(m,F)|0,s=s+Math.imul(m,Y)|0;var be=(u+(r=r+Math.imul(d,K)|0)|0)+((8191&(i=(i=i+Math.imul(d,W)|0)+Math.imul(p,K)|0))<<13)|0;u=((s=s+Math.imul(p,W)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(w,z),i=(i=Math.imul(w,q))+Math.imul(x,z)|0,s=Math.imul(x,q),r=r+Math.imul(y,F)|0,i=(i=i+Math.imul(y,Y)|0)+Math.imul(b,F)|0,s=s+Math.imul(b,Y)|0,r=r+Math.imul(h,K)|0,i=(i=i+Math.imul(h,W)|0)+Math.imul(m,K)|0,s=s+Math.imul(m,W)|0;var ve=(u+(r=r+Math.imul(d,J)|0)|0)+((8191&(i=(i=i+Math.imul(d,Z)|0)+Math.imul(p,J)|0))<<13)|0;u=((s=s+Math.imul(p,Z)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(E,z),i=(i=Math.imul(E,q))+Math.imul(S,z)|0,s=Math.imul(S,q),r=r+Math.imul(w,F)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(x,F)|0,s=s+Math.imul(x,Y)|0,r=r+Math.imul(y,K)|0,i=(i=i+Math.imul(y,W)|0)+Math.imul(b,K)|0,s=s+Math.imul(b,W)|0,r=r+Math.imul(h,J)|0,i=(i=i+Math.imul(h,Z)|0)+Math.imul(m,J)|0,s=s+Math.imul(m,Z)|0;var we=(u+(r=r+Math.imul(d,Q)|0)|0)+((8191&(i=(i=i+Math.imul(d,ee)|0)+Math.imul(p,Q)|0))<<13)|0;u=((s=s+Math.imul(p,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(A,z),i=(i=Math.imul(A,q))+Math.imul(T,z)|0,s=Math.imul(T,q),r=r+Math.imul(E,F)|0,i=(i=i+Math.imul(E,Y)|0)+Math.imul(S,F)|0,s=s+Math.imul(S,Y)|0,r=r+Math.imul(w,K)|0,i=(i=i+Math.imul(w,W)|0)+Math.imul(x,K)|0,s=s+Math.imul(x,W)|0,r=r+Math.imul(y,J)|0,i=(i=i+Math.imul(y,Z)|0)+Math.imul(b,J)|0,s=s+Math.imul(b,Z)|0,r=r+Math.imul(h,Q)|0,i=(i=i+Math.imul(h,ee)|0)+Math.imul(m,Q)|0,s=s+Math.imul(m,ee)|0;var xe=(u+(r=r+Math.imul(d,ne)|0)|0)+((8191&(i=(i=i+Math.imul(d,re)|0)+Math.imul(p,ne)|0))<<13)|0;u=((s=s+Math.imul(p,re)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(R,z),i=(i=Math.imul(R,q))+Math.imul(O,z)|0,s=Math.imul(O,q),r=r+Math.imul(A,F)|0,i=(i=i+Math.imul(A,Y)|0)+Math.imul(T,F)|0,s=s+Math.imul(T,Y)|0,r=r+Math.imul(E,K)|0,i=(i=i+Math.imul(E,W)|0)+Math.imul(S,K)|0,s=s+Math.imul(S,W)|0,r=r+Math.imul(w,J)|0,i=(i=i+Math.imul(w,Z)|0)+Math.imul(x,J)|0,s=s+Math.imul(x,Z)|0,r=r+Math.imul(y,Q)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(b,Q)|0,s=s+Math.imul(b,ee)|0,r=r+Math.imul(h,ne)|0,i=(i=i+Math.imul(h,re)|0)+Math.imul(m,ne)|0,s=s+Math.imul(m,re)|0;var _e=(u+(r=r+Math.imul(d,se)|0)|0)+((8191&(i=(i=i+Math.imul(d,ae)|0)+Math.imul(p,se)|0))<<13)|0;u=((s=s+Math.imul(p,ae)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(N,z),i=(i=Math.imul(N,q))+Math.imul(P,z)|0,s=Math.imul(P,q),r=r+Math.imul(R,F)|0,i=(i=i+Math.imul(R,Y)|0)+Math.imul(O,F)|0,s=s+Math.imul(O,Y)|0,r=r+Math.imul(A,K)|0,i=(i=i+Math.imul(A,W)|0)+Math.imul(T,K)|0,s=s+Math.imul(T,W)|0,r=r+Math.imul(E,J)|0,i=(i=i+Math.imul(E,Z)|0)+Math.imul(S,J)|0,s=s+Math.imul(S,Z)|0,r=r+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(x,Q)|0,s=s+Math.imul(x,ee)|0,r=r+Math.imul(y,ne)|0,i=(i=i+Math.imul(y,re)|0)+Math.imul(b,ne)|0,s=s+Math.imul(b,re)|0,r=r+Math.imul(h,se)|0,i=(i=i+Math.imul(h,ae)|0)+Math.imul(m,se)|0,s=s+Math.imul(m,ae)|0;var Ee=(u+(r=r+Math.imul(d,ce)|0)|0)+((8191&(i=(i=i+Math.imul(d,ue)|0)+Math.imul(p,ce)|0))<<13)|0;u=((s=s+Math.imul(p,ue)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(j,z),i=(i=Math.imul(j,q))+Math.imul(L,z)|0,s=Math.imul(L,q),r=r+Math.imul(N,F)|0,i=(i=i+Math.imul(N,Y)|0)+Math.imul(P,F)|0,s=s+Math.imul(P,Y)|0,r=r+Math.imul(R,K)|0,i=(i=i+Math.imul(R,W)|0)+Math.imul(O,K)|0,s=s+Math.imul(O,W)|0,r=r+Math.imul(A,J)|0,i=(i=i+Math.imul(A,Z)|0)+Math.imul(T,J)|0,s=s+Math.imul(T,Z)|0,r=r+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(S,Q)|0,s=s+Math.imul(S,ee)|0,r=r+Math.imul(w,ne)|0,i=(i=i+Math.imul(w,re)|0)+Math.imul(x,ne)|0,s=s+Math.imul(x,re)|0,r=r+Math.imul(y,se)|0,i=(i=i+Math.imul(y,ae)|0)+Math.imul(b,se)|0,s=s+Math.imul(b,ae)|0,r=r+Math.imul(h,ce)|0,i=(i=i+Math.imul(h,ue)|0)+Math.imul(m,ce)|0,s=s+Math.imul(m,ue)|0;var Se=(u+(r=r+Math.imul(d,de)|0)|0)+((8191&(i=(i=i+Math.imul(d,pe)|0)+Math.imul(p,de)|0))<<13)|0;u=((s=s+Math.imul(p,pe)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul($,z),i=(i=Math.imul($,q))+Math.imul(U,z)|0,s=Math.imul(U,q),r=r+Math.imul(j,F)|0,i=(i=i+Math.imul(j,Y)|0)+Math.imul(L,F)|0,s=s+Math.imul(L,Y)|0,r=r+Math.imul(N,K)|0,i=(i=i+Math.imul(N,W)|0)+Math.imul(P,K)|0,s=s+Math.imul(P,W)|0,r=r+Math.imul(R,J)|0,i=(i=i+Math.imul(R,Z)|0)+Math.imul(O,J)|0,s=s+Math.imul(O,Z)|0,r=r+Math.imul(A,Q)|0,i=(i=i+Math.imul(A,ee)|0)+Math.imul(T,Q)|0,s=s+Math.imul(T,ee)|0,r=r+Math.imul(E,ne)|0,i=(i=i+Math.imul(E,re)|0)+Math.imul(S,ne)|0,s=s+Math.imul(S,re)|0,r=r+Math.imul(w,se)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(x,se)|0,s=s+Math.imul(x,ae)|0,r=r+Math.imul(y,ce)|0,i=(i=i+Math.imul(y,ue)|0)+Math.imul(b,ce)|0,s=s+Math.imul(b,ue)|0,r=r+Math.imul(h,de)|0,i=(i=i+Math.imul(h,pe)|0)+Math.imul(m,de)|0,s=s+Math.imul(m,pe)|0;var ke=(u+(r=r+Math.imul(d,he)|0)|0)+((8191&(i=(i=i+Math.imul(d,me)|0)+Math.imul(p,he)|0))<<13)|0;u=((s=s+Math.imul(p,me)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul($,F),i=(i=Math.imul($,Y))+Math.imul(U,F)|0,s=Math.imul(U,Y),r=r+Math.imul(j,K)|0,i=(i=i+Math.imul(j,W)|0)+Math.imul(L,K)|0,s=s+Math.imul(L,W)|0,r=r+Math.imul(N,J)|0,i=(i=i+Math.imul(N,Z)|0)+Math.imul(P,J)|0,s=s+Math.imul(P,Z)|0,r=r+Math.imul(R,Q)|0,i=(i=i+Math.imul(R,ee)|0)+Math.imul(O,Q)|0,s=s+Math.imul(O,ee)|0,r=r+Math.imul(A,ne)|0,i=(i=i+Math.imul(A,re)|0)+Math.imul(T,ne)|0,s=s+Math.imul(T,re)|0,r=r+Math.imul(E,se)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(S,se)|0,s=s+Math.imul(S,ae)|0,r=r+Math.imul(w,ce)|0,i=(i=i+Math.imul(w,ue)|0)+Math.imul(x,ce)|0,s=s+Math.imul(x,ue)|0,r=r+Math.imul(y,de)|0,i=(i=i+Math.imul(y,pe)|0)+Math.imul(b,de)|0,s=s+Math.imul(b,pe)|0;var Ae=(u+(r=r+Math.imul(h,he)|0)|0)+((8191&(i=(i=i+Math.imul(h,me)|0)+Math.imul(m,he)|0))<<13)|0;u=((s=s+Math.imul(m,me)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul($,K),i=(i=Math.imul($,W))+Math.imul(U,K)|0,s=Math.imul(U,W),r=r+Math.imul(j,J)|0,i=(i=i+Math.imul(j,Z)|0)+Math.imul(L,J)|0,s=s+Math.imul(L,Z)|0,r=r+Math.imul(N,Q)|0,i=(i=i+Math.imul(N,ee)|0)+Math.imul(P,Q)|0,s=s+Math.imul(P,ee)|0,r=r+Math.imul(R,ne)|0,i=(i=i+Math.imul(R,re)|0)+Math.imul(O,ne)|0,s=s+Math.imul(O,re)|0,r=r+Math.imul(A,se)|0,i=(i=i+Math.imul(A,ae)|0)+Math.imul(T,se)|0,s=s+Math.imul(T,ae)|0,r=r+Math.imul(E,ce)|0,i=(i=i+Math.imul(E,ue)|0)+Math.imul(S,ce)|0,s=s+Math.imul(S,ue)|0,r=r+Math.imul(w,de)|0,i=(i=i+Math.imul(w,pe)|0)+Math.imul(x,de)|0,s=s+Math.imul(x,pe)|0;var Te=(u+(r=r+Math.imul(y,he)|0)|0)+((8191&(i=(i=i+Math.imul(y,me)|0)+Math.imul(b,he)|0))<<13)|0;u=((s=s+Math.imul(b,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul($,J),i=(i=Math.imul($,Z))+Math.imul(U,J)|0,s=Math.imul(U,Z),r=r+Math.imul(j,Q)|0,i=(i=i+Math.imul(j,ee)|0)+Math.imul(L,Q)|0,s=s+Math.imul(L,ee)|0,r=r+Math.imul(N,ne)|0,i=(i=i+Math.imul(N,re)|0)+Math.imul(P,ne)|0,s=s+Math.imul(P,re)|0,r=r+Math.imul(R,se)|0,i=(i=i+Math.imul(R,ae)|0)+Math.imul(O,se)|0,s=s+Math.imul(O,ae)|0,r=r+Math.imul(A,ce)|0,i=(i=i+Math.imul(A,ue)|0)+Math.imul(T,ce)|0,s=s+Math.imul(T,ue)|0,r=r+Math.imul(E,de)|0,i=(i=i+Math.imul(E,pe)|0)+Math.imul(S,de)|0,s=s+Math.imul(S,pe)|0;var Me=(u+(r=r+Math.imul(w,he)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(x,he)|0))<<13)|0;u=((s=s+Math.imul(x,me)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul($,Q),i=(i=Math.imul($,ee))+Math.imul(U,Q)|0,s=Math.imul(U,ee),r=r+Math.imul(j,ne)|0,i=(i=i+Math.imul(j,re)|0)+Math.imul(L,ne)|0,s=s+Math.imul(L,re)|0,r=r+Math.imul(N,se)|0,i=(i=i+Math.imul(N,ae)|0)+Math.imul(P,se)|0,s=s+Math.imul(P,ae)|0,r=r+Math.imul(R,ce)|0,i=(i=i+Math.imul(R,ue)|0)+Math.imul(O,ce)|0,s=s+Math.imul(O,ue)|0,r=r+Math.imul(A,de)|0,i=(i=i+Math.imul(A,pe)|0)+Math.imul(T,de)|0,s=s+Math.imul(T,pe)|0;var Re=(u+(r=r+Math.imul(E,he)|0)|0)+((8191&(i=(i=i+Math.imul(E,me)|0)+Math.imul(S,he)|0))<<13)|0;u=((s=s+Math.imul(S,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,r=Math.imul($,ne),i=(i=Math.imul($,re))+Math.imul(U,ne)|0,s=Math.imul(U,re),r=r+Math.imul(j,se)|0,i=(i=i+Math.imul(j,ae)|0)+Math.imul(L,se)|0,s=s+Math.imul(L,ae)|0,r=r+Math.imul(N,ce)|0,i=(i=i+Math.imul(N,ue)|0)+Math.imul(P,ce)|0,s=s+Math.imul(P,ue)|0,r=r+Math.imul(R,de)|0,i=(i=i+Math.imul(R,pe)|0)+Math.imul(O,de)|0,s=s+Math.imul(O,pe)|0;var Oe=(u+(r=r+Math.imul(A,he)|0)|0)+((8191&(i=(i=i+Math.imul(A,me)|0)+Math.imul(T,he)|0))<<13)|0;u=((s=s+Math.imul(T,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul($,se),i=(i=Math.imul($,ae))+Math.imul(U,se)|0,s=Math.imul(U,ae),r=r+Math.imul(j,ce)|0,i=(i=i+Math.imul(j,ue)|0)+Math.imul(L,ce)|0,s=s+Math.imul(L,ue)|0,r=r+Math.imul(N,de)|0,i=(i=i+Math.imul(N,pe)|0)+Math.imul(P,de)|0,s=s+Math.imul(P,pe)|0;var Ie=(u+(r=r+Math.imul(R,he)|0)|0)+((8191&(i=(i=i+Math.imul(R,me)|0)+Math.imul(O,he)|0))<<13)|0;u=((s=s+Math.imul(O,me)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul($,ce),i=(i=Math.imul($,ue))+Math.imul(U,ce)|0,s=Math.imul(U,ue),r=r+Math.imul(j,de)|0,i=(i=i+Math.imul(j,pe)|0)+Math.imul(L,de)|0,s=s+Math.imul(L,pe)|0;var Ne=(u+(r=r+Math.imul(N,he)|0)|0)+((8191&(i=(i=i+Math.imul(N,me)|0)+Math.imul(P,he)|0))<<13)|0;u=((s=s+Math.imul(P,me)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,r=Math.imul($,de),i=(i=Math.imul($,pe))+Math.imul(U,de)|0,s=Math.imul(U,pe);var Pe=(u+(r=r+Math.imul(j,he)|0)|0)+((8191&(i=(i=i+Math.imul(j,me)|0)+Math.imul(L,he)|0))<<13)|0;u=((s=s+Math.imul(L,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863;var Ce=(u+(r=Math.imul($,he))|0)+((8191&(i=(i=Math.imul($,me))+Math.imul(U,he)|0))<<13)|0;return u=((s=Math.imul(U,me))+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,c[0]=ge,c[1]=ye,c[2]=be,c[3]=ve,c[4]=we,c[5]=xe,c[6]=_e,c[7]=Ee,c[8]=Se,c[9]=ke,c[10]=Ae,c[11]=Te,c[12]=Me,c[13]=Re,c[14]=Oe,c[15]=Ie,c[16]=Ne,c[17]=Pe,c[18]=Ce,0!==u&&(c[19]=u,n.length++),n};function g(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,s=0;s<n.length-1;s++){var a=i;i=0;for(var o=67108863&r,c=Math.min(s,t.length-1),u=Math.max(0,s-e.length+1);u<=c;u++){var l=s-u,d=(0|e.words[l])*(0|t.words[u]),p=67108863&d;o=67108863&(p=p+o|0),i+=(a=(a=a+(d/67108864|0)|0)+(p>>>26)|0)>>>26,a&=67108863}n.words[s]=o,r=a,a=i}return 0!==r?n.words[s]=r:n.length--,n._strip()}function y(e,t,n){return g(e,t,n)}Math.imul||(m=h),i.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?m(this,e,t):n<63?h(this,e,t):n<1024?g(this,e,t):y(this,e,t)},i.prototype.mul=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},i.prototype.mulf=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),y(this,e,t)},i.prototype.imul=function(e){return this.clone().mulTo(e,this)},i.prototype.imuln=function(e){var t=e<0;t&&(e=-e),n("number"==typeof e),n(e<67108864);for(var r=0,i=0;i<this.length;i++){var s=(0|this.words[i])*e,a=(67108863&s)+(67108863&r);r>>=26,r+=s/67108864|0,r+=a>>>26,this.words[i]=67108863&a}return 0!==r&&(this.words[i]=r,this.length++),t?this.ineg():this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n<t.length;n++){var r=n/26|0,i=n%26;t[n]=e.words[r]>>>i&1}return t}(e);if(0===t.length)return new i(1);for(var n=this,r=0;r<t.length&&0===t[r];r++,n=n.sqr());if(++r<t.length)for(var s=n.sqr();r<t.length;r++,s=s.sqr())0!==t[r]&&(n=n.mul(s));return n},i.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,s=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t<this.length;t++){var o=this.words[t]&s,c=(0|this.words[t])-o<<r;this.words[t]=c|a,a=o>>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this._strip()},i.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},i.prototype.iushrn=function(e,t,r){var i;n("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var s=e%26,a=Math.min((e-s)/26,this.length),o=67108863^67108863>>>s<<s,c=r;if(i-=a,i=Math.max(0,i),c){for(var u=0;u<a;u++)c.words[u]=this.words[u];c.length=a}if(0===a);else if(this.length>a)for(this.length-=a,u=0;u<this.length;u++)this.words[u]=this.words[u+a];else this.words[0]=0,this.length=1;var l=0;for(u=this.length-1;u>=0&&(0!==l||u>=i);u--){var d=0|this.words[u];this.words[u]=l<<26-s|d>>>s,l=d&o}return c&&0!==l&&(c.words[c.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;return!(this.length<=r||!(this.words[r]&i))},i.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this._strip()},i.prototype.maskn=function(e){return this.clone().imaskn(e)},i.prototype.iaddn=function(e){return n("number"==typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<=e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},i.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this._strip()},i.prototype.addn=function(e){return this.clone().iaddn(e)},i.prototype.subn=function(e){return this.clone().isubn(e)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(e,t,r){var i,s,a=e.length+r;this._expand(a);var o=0;for(i=0;i<e.length;i++){s=(0|this.words[i+r])+o;var c=(0|e.words[i])*t;o=((s-=67108863&c)>>26)-(c/67108864|0),this.words[i+r]=67108863&s}for(;i<this.length-r;i++)o=(s=(0|this.words[i+r])+o)>>26,this.words[i+r]=67108863&s;if(0===o)return this._strip();for(n(-1===o),o=0,i=0;i<this.length;i++)o=(s=-(0|this.words[i])+o)>>26,this.words[i]=67108863&s;return this.negative=1,this._strip()},i.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),s=e,a=0|s.words[s.length-1];0!=(n=26-this._countBits(a))&&(s=s.ushln(n),r.iushln(n),a=0|s.words[s.length-1]);var o,c=r.length-s.length;if("mod"!==t){(o=new i(null)).length=c+1,o.words=new Array(o.length);for(var u=0;u<o.length;u++)o.words[u]=0}var l=r.clone()._ishlnsubmul(s,1,c);0===l.negative&&(r=l,o&&(o.words[c]=1));for(var d=c-1;d>=0;d--){var p=67108864*(0|r.words[s.length+d])+(0|r.words[s.length+d-1]);for(p=Math.min(p/a|0,67108863),r._ishlnsubmul(s,p,d);0!==r.negative;)p--,r.negative=0,r._ishlnsubmul(s,1,d),r.isZero()||(r.negative^=1);o&&(o.words[d]=p)}return o&&o._strip(),r._strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:o||null,mod:r}},i.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,t),"mod"!==t&&(s=o.div.neg()),"div"!==t&&(a=o.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:s,mod:a}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),t),"mod"!==t&&(s=o.div.neg()),{div:s,mod:o.mod}):this.negative&e.negative?(o=this.neg().divmod(e.neg(),t),"div"!==t&&(a=o.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:o.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modrn(e.words[0]))}:this._wordDiv(e,t);var s,a,o},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),s=n.cmp(r);return s<0||1===i&&0===s?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=(1<<26)%e,i=0,s=this.length-1;s>=0;s--)i=(r*i+(0|this.words[s]))%e;return t?-i:i},i.prototype.modn=function(e){return this.modrn(e)},i.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var s=(0|this.words[i])+67108864*r;this.words[i]=s/e|0,r=s%e}return this._strip(),t?this.ineg():this},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var s=new i(1),a=new i(0),o=new i(0),c=new i(1),u=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++u;for(var l=r.clone(),d=t.clone();!t.isZero();){for(var p=0,f=1;!(t.words[0]&f)&&p<26;++p,f<<=1);if(p>0)for(t.iushrn(p);p-- >0;)(s.isOdd()||a.isOdd())&&(s.iadd(l),a.isub(d)),s.iushrn(1),a.iushrn(1);for(var h=0,m=1;!(r.words[0]&m)&&h<26;++h,m<<=1);if(h>0)for(r.iushrn(h);h-- >0;)(o.isOdd()||c.isOdd())&&(o.iadd(l),c.isub(d)),o.iushrn(1),c.iushrn(1);t.cmp(r)>=0?(t.isub(r),s.isub(o),a.isub(c)):(r.isub(t),o.isub(s),c.isub(a))}return{a:o,b:c,gcd:r.iushln(u)}},i.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var s,a=new i(1),o=new i(0),c=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,l=1;!(t.words[0]&l)&&u<26;++u,l<<=1);if(u>0)for(t.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(c),a.iushrn(1);for(var d=0,p=1;!(r.words[0]&p)&&d<26;++d,p<<=1);if(d>0)for(r.iushrn(d);d-- >0;)o.isOdd()&&o.iadd(c),o.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(o)):(r.isub(t),o.isub(a))}return(s=0===t.cmpn(1)?a:o).cmpn(0)<0&&s.iadd(e),s},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var s=t;t=n,n=s}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return!(1&this.words[0])},i.prototype.isOdd=function(){return!(1&~this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var s=i,a=r;0!==s&&a<this.length;a++){var o=0|this.words[a];s=(o+=s)>>>26,o&=67108863,this.words[a]=o}return 0!==s&&(this.words[a]=s,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},i.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},i.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|e.words[n];if(r!==i){r<i?t=-1:r>i&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new S(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var b={k256:null,p224:null,p192:null,p25519:null};function v(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function w(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function x(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function E(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(e){if("string"==typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function k(e){S.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},v.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},v.prototype.split=function(e,t){e.iushrn(this.n,0,t)},v.prototype.imulK=function(e){return e.imul(this.k)},r(w,v),w.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),i=0;i<r;i++)t.words[i]=e.words[i];if(t.length=r,e.length<=9)return e.words[0]=0,void(e.length=1);var s=e.words[9];for(t.words[t.length++]=s&n,i=10;i<e.length;i++){var a=0|e.words[i];e.words[i-10]=(a&n)<<4|s>>>22,s=a}s>>>=22,e.words[i-10]=s,0===s&&e.length>10?e.length-=10:e.length-=9},w.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var r=0|e.words[n];t+=977*r,e.words[n]=67108863&t,t=64*r+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},r(x,v),r(_,v),r(E,v),E.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var r=19*(0|e.words[n])+t,i=67108863&r;r>>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(b[e])return b[e];var t;if("k256"===e)t=new w;else if("p224"===e)t=new x;else if("p192"===e)t=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new E}return b[e]=t,t},S.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},S.prototype._verify2=function(e,t){n(!(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},S.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(u(e,e.umod(this.m)._forceRed(this)),e)},S.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},S.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},S.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},S.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},S.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},S.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},S.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},S.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},S.prototype.isqr=function(e){return this.imul(e,e.clone())},S.prototype.sqr=function(e){return this.mul(e,e)},S.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new i(1)).iushrn(2);return this.pow(e,r)}for(var s=this.m.subn(1),a=0;!s.isZero()&&0===s.andln(1);)a++,s.iushrn(1);n(!s.isZero());var o=new i(1).toRed(this),c=o.redNeg(),u=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new i(2*l*l).toRed(this);0!==this.pow(l,u).cmp(c);)l.redIAdd(c);for(var d=this.pow(l,s),p=this.pow(e,s.addn(1).iushrn(1)),f=this.pow(e,s),h=a;0!==f.cmp(o);){for(var m=f,g=0;0!==m.cmp(o);g++)m=m.redSqr();n(g<h);var y=this.pow(d,new i(1).iushln(h-g-1));p=p.redMul(y),d=y.redSqr(),f=f.redMul(d),h=g}return p},S.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},S.prototype.pow=function(e,t){if(t.isZero())return new i(1).toRed(this);if(0===t.cmpn(1))return e.clone();var n=new Array(16);n[0]=new i(1).toRed(this),n[1]=e;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],e);var s=n[0],a=0,o=0,c=t.bitLength()%26;for(0===c&&(c=26),r=t.length-1;r>=0;r--){for(var u=t.words[r],l=c-1;l>=0;l--){var d=u>>l&1;s!==n[0]&&(s=this.sqr(s)),0!==d||0!==a?(a<<=1,a|=d,(4==++o||0===r&&0===l)&&(s=this.mul(s,n[a]),o=0,a=0)):o=0}c=26}return s},S.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},S.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new k(e)},r(k,S),k.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},k.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},k.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},k.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=n.isub(r).iushrn(this.shift),a=s;return s.cmp(this.m)>=0?a=s.isub(this.m):s.cmpn(0)<0&&(a=s.iadd(this.m)),a._forceRed(this)},k.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(cf,uf)),cf.exports}var df,pf,ff,hf={};function mf(){if(df)return hf;df=1;var e=hf&&hf.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(hf,"__esModule",{value:!0}),hf.getLength=hf.decode=hf.encode=void 0;const t=e(lf());function n(e,t){if("0"===e[0]&&"0"===e[1])throw new Error("invalid RLP: extra zeros");return parseInt(e,t)}function r(e,t){if(e<56)return Buffer.from([e+t]);{const n=a(e),r=a(t+55+n.length/2);return Buffer.from(r+n,"hex")}}function i(e){let t,r,s,a,o;const c=[],u=e[0];if(u<=127)return{data:e.slice(0,1),remainder:e.slice(1)};if(u<=183){if(t=u-127,s=128===u?Buffer.from([]):e.slice(1,t),2===t&&s[0]<128)throw new Error("invalid rlp encoding: byte must be less 0x80");return{data:s,remainder:e.slice(t)}}if(u<=191){if(r=u-182,e.length-1<r)throw new Error("invalid RLP: not enough bytes for string length");if(t=n(e.slice(1,r).toString("hex"),16),t<=55)throw new Error("invalid RLP: expected string length to be greater than 55");if(s=e.slice(r,t+r),s.length<t)throw new Error("invalid RLP: not enough bytes for string");return{data:s,remainder:e.slice(t+r)}}if(u<=247){for(t=u-191,a=e.slice(1,t);a.length;)o=i(a),c.push(o.data),a=o.remainder;return{data:c,remainder:e.slice(t)}}{r=u-246,t=n(e.slice(1,r).toString("hex"),16);const s=r+t;if(s>e.length)throw new Error("invalid rlp: total length is larger than the data");if(a=e.slice(r,s),0===a.length)throw new Error("invalid rlp, List has a invalid length");for(;a.length;)o=i(a),c.push(o.data),a=o.remainder;return{data:c,remainder:e.slice(s)}}}function s(e){return"0x"===e.slice(0,2)}function a(e){if(e<0)throw new Error("Invalid integer as argument, must be unsigned!");const t=e.toString(16);return t.length%2?`0${t}`:t}function o(e){if(!Buffer.isBuffer(e)){if("string"==typeof e)return s(e)?Buffer.from((n="string"!=typeof(r=e)?r:s(r)?r.slice(2):r).length%2?`0${n}`:n,"hex"):Buffer.from(e);if("number"==typeof e||"bigint"==typeof e)return e?function(e){const t=a(e);return Buffer.from(t,"hex")}(e):Buffer.from([]);if(null==e)return Buffer.from([]);if(e instanceof Uint8Array)return Buffer.from(e);if(t.default.isBN(e))return Buffer.from(e.toArray());throw new Error("invalid type")}var n,r;return e}return hf.encode=function e(t){if(Array.isArray(t)){const n=[];for(let r=0;r<t.length;r++)n.push(e(t[r]));const i=Buffer.concat(n);return Buffer.concat([r(i.length,192),i])}{const e=o(t);return 1===e.length&&e[0]<128?e:Buffer.concat([r(e.length,128),e])}},hf.decode=function(e,t=!1){if(!e||0===e.length)return Buffer.from([]);const n=i(o(e));if(t)return n;if(0!==n.remainder.length)throw new Error("invalid remainder");return n.data},hf.getLength=function(e){if(!e||0===e.length)return Buffer.from([]);const t=o(e),r=t[0];if(r<=127)return t.length;if(r<=183)return r-127;if(r<=191)return r-182;if(r<=247)return r-191;{const e=r-246;return e+n(t.slice(1,e).toString("hex"),16)}},hf}function gf(){if(pf)return of;pf=1;var e=of&&of.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),t=of&&of.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=of&&of.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var i in n)"default"!==i&&Object.prototype.hasOwnProperty.call(n,i)&&e(r,n,i);return t(r,n),r},r=of&&of.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(of,"__esModule",{value:!0}),of.rlp=of.BN=void 0;const i=r(lf());of.BN=i.default;const s=n(mf());return of.rlp=s,of}function yf(){return ff||(ff=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.KECCAK256_RLP=e.KECCAK256_RLP_S=e.KECCAK256_RLP_ARRAY=e.KECCAK256_RLP_ARRAY_S=e.KECCAK256_NULL=e.KECCAK256_NULL_S=e.TWO_POW256=e.MAX_INTEGER=e.MAX_UINT64=void 0;const t=p,n=gf();e.MAX_UINT64=new n.BN("ffffffffffffffff",16),e.MAX_INTEGER=new n.BN("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16),e.TWO_POW256=new n.BN("10000000000000000000000000000000000000000000000000000000000000000",16),e.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",e.KECCAK256_NULL=t.Buffer.from(e.KECCAK256_NULL_S,"hex"),e.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",e.KECCAK256_RLP_ARRAY=t.Buffer.from(e.KECCAK256_RLP_ARRAY_S,"hex"),e.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",e.KECCAK256_RLP=t.Buffer.from(e.KECCAK256_RLP_S,"hex")}(af)),af}var bf,vf,wf,xf,_f,Ef,Sf,kf,Af,Tf,Mf,Rf,Of={},If={},Nf={exports:{}},Pf={exports:{}};function Cf(){if(wf)return Pf.exports;wf=1;const e="function"==typeof __webpack_require__?__non_webpack_require__:Xa;return"function"==typeof e.addon?Pf.exports=e.addon.bind(e):Pf.exports=function(){if(vf)return bf;vf=1;var e=n,t=s,r=l,i="function"==typeof __webpack_require__?__non_webpack_require__:Xa,a=process.config&&process.config.variables||{},o=!!process.env.PREBUILDS_ONLY,c=process.versions.modules,u=process.versions&&process.versions.electron||process.env.ELECTRON_RUN_AS_NODE||"undefined"!=typeof window&&window.process&&"renderer"===window.process.type?"electron":process.versions&&process.versions.nw?"node-webkit":"node",d=process.env.npm_config_arch||r.arch(),p=process.env.npm_config_platform||r.platform(),f=process.env.LIBC||(function(t){return"linux"===t&&e.existsSync("/etc/alpine-release")}(p)?"musl":"glibc"),h=process.env.ARM_VERSION||("arm64"===d?"8":a.arm_version)||"",m=(process.versions.uv||"").split(".")[0];function g(e){return i(g.resolve(e))}function y(t){try{return e.readdirSync(t)}catch(e){return[]}}function b(e,n){var r=y(e).filter(n);return r[0]&&t.join(e,r[0])}function v(e){return/\.node$/.test(e)}function w(e){var t=e.split("-");if(2===t.length){var n=t[0],r=t[1].split("+");if(n&&r.length&&r.every(Boolean))return{name:e,platform:n,architectures:r}}}function x(e,t){return function(n){return null!=n&&n.platform===e&&n.architectures.includes(t)}}function _(e,t){return e.architectures.length-t.architectures.length}function E(e){var t=e.split("."),n={file:e,specificity:0};if("node"===t.pop()){for(var r=0;r<t.length;r++){var i=t[r];if("node"===i||"electron"===i||"node-webkit"===i)n.runtime=i;else if("napi"===i)n.napi=!0;else if("abi"===i.slice(0,3))n.abi=i.slice(3);else if("uv"===i.slice(0,2))n.uv=i.slice(2);else if("armv"===i.slice(0,4))n.armv=i.slice(4);else{if("glibc"!==i&&"musl"!==i)continue;n.libc=i}n.specificity++}return n}}function S(e,t){return function(n){return!(null==n||n.runtime&&n.runtime!==e&&!function(e){return"node"===e.runtime&&e.napi}(n)||n.abi&&n.abi!==t&&!n.napi||n.uv&&n.uv!==m||n.armv&&n.armv!==h||n.libc&&n.libc!==f)}}function k(e){return function(t,n){return t.runtime!==n.runtime?t.runtime===e?-1:1:t.abi!==n.abi?t.abi?-1:1:t.specificity!==n.specificity?t.specificity>n.specificity?-1:1:0}}return bf=g,g.resolve=g.path=function(e){e=t.resolve(e||".");try{var n=i(t.join(e,"package.json")).name.toUpperCase().replace(/-/g,"_");process.env[n+"_PREBUILD"]&&(e=process.env[n+"_PREBUILD"])}catch(e){}if(!o){var r=b(t.join(e,"build/Release"),v);if(r)return r;var s=b(t.join(e,"build/Debug"),v);if(s)return s}var a=A(e);if(a)return a;var l=A(t.dirname(process.execPath));if(l)return l;var g=["platform="+p,"arch="+d,"runtime="+u,"abi="+c,"uv="+m,h?"armv="+h:"","libc="+f,"node="+process.versions.node,process.versions.electron?"electron="+process.versions.electron:"","function"==typeof __webpack_require__?"webpack=true":""].filter(Boolean).join(" ");throw new Error("No native build was found for "+g+"\n loaded from: "+e+"\n");function A(e){var n=y(t.join(e,"prebuilds")).map(w).filter(x(p,d)).sort(_)[0];if(n){var r=t.join(e,"prebuilds",n.name),i=y(r).map(E).filter(S(u,c)).sort(k(u))[0];return i?t.join(r,i.file):void 0}}},g.parseTags=E,g.matchTags=S,g.compareTags=k,g.parseTuple=w,g.matchTuple=x,g.compareTuples=_,bf}(),Pf.exports}function jf(){if(_f)return xf;_f=1;const e="Impossible case. Please create issue.",t="The tweak was out of range or the resulted private key is invalid",n="The tweak was out of range or equal to zero",r="Unknow error on context randomization",i="Private Key is invalid",s="Public Key could not be parsed",a="Public Key serialization error",o="The sum of the public keys is not valid",c="Signature could not be parsed",u="The nonce generation function failed, or the private key was invalid",l="Public key could not be recover",d="Scalar was invalid (zero or overflow)";function p(e,t){if(!e)throw new Error(t)}function f(e,t,n){if(p(t instanceof Uint8Array,`Expected ${e} to be an Uint8Array`),void 0!==n)if(Array.isArray(n)){const r=`Expected ${e} to be an Uint8Array with length [${n.join(", ")}]`;p(n.includes(t.length),r)}else{const r=`Expected ${e} to be an Uint8Array with length ${n}`;p(t.length===n,r)}}function h(e){p("Boolean"===g(e),"Expected compressed to be a Boolean")}function m(e=e=>new Uint8Array(e),t){return"function"==typeof e&&(e=e(t)),f("output",e,t),e}function g(e){return Object.prototype.toString.call(e).slice(8,-1)}return xf=y=>({contextRandomize(e){if(p(null===e||e instanceof Uint8Array,"Expected seed to be an Uint8Array or null"),null!==e&&f("seed",e,32),1===y.contextRandomize(e))throw new Error(r)},privateKeyVerify:e=>(f("private key",e,32),0===y.privateKeyVerify(e)),privateKeyNegate(t){switch(f("private key",t,32),y.privateKeyNegate(t)){case 0:return t;case 1:throw new Error(e)}},privateKeyTweakAdd(e,n){switch(f("private key",e,32),f("tweak",n,32),y.privateKeyTweakAdd(e,n)){case 0:return e;case 1:throw new Error(t)}},privateKeyTweakMul(e,t){switch(f("private key",e,32),f("tweak",t,32),y.privateKeyTweakMul(e,t)){case 0:return e;case 1:throw new Error(n)}},publicKeyVerify:e=>(f("public key",e,[33,65]),0===y.publicKeyVerify(e)),publicKeyCreate(e,t=!0,n){switch(f("private key",e,32),h(t),n=m(n,t?33:65),y.publicKeyCreate(n,e)){case 0:return n;case 1:throw new Error(i);case 2:throw new Error(a)}},publicKeyConvert(e,t=!0,n){switch(f("public key",e,[33,65]),h(t),n=m(n,t?33:65),y.publicKeyConvert(n,e)){case 0:return n;case 1:throw new Error(s);case 2:throw new Error(a)}},publicKeyNegate(t,n=!0,r){switch(f("public key",t,[33,65]),h(n),r=m(r,n?33:65),y.publicKeyNegate(r,t)){case 0:return r;case 1:throw new Error(s);case 2:throw new Error(e);case 3:throw new Error(a)}},publicKeyCombine(e,t=!0,n){p(Array.isArray(e),"Expected public keys to be an Array"),p(e.length>0,"Expected public keys array will have more than zero items");for(const t of e)f("public key",t,[33,65]);switch(h(t),n=m(n,t?33:65),y.publicKeyCombine(n,e)){case 0:return n;case 1:throw new Error(s);case 2:throw new Error(o);case 3:throw new Error(a)}},publicKeyTweakAdd(e,n,r=!0,i){switch(f("public key",e,[33,65]),f("tweak",n,32),h(r),i=m(i,r?33:65),y.publicKeyTweakAdd(i,e,n)){case 0:return i;case 1:throw new Error(s);case 2:throw new Error(t)}},publicKeyTweakMul(e,t,r=!0,i){switch(f("public key",e,[33,65]),f("tweak",t,32),h(r),i=m(i,r?33:65),y.publicKeyTweakMul(i,e,t)){case 0:return i;case 1:throw new Error(s);case 2:throw new Error(n)}},signatureNormalize(e){switch(f("signature",e,64),y.signatureNormalize(e)){case 0:return e;case 1:throw new Error(c)}},signatureExport(t,n){f("signature",t,64);const r={output:n=m(n,72),outputlen:72};switch(y.signatureExport(r,t)){case 0:return n.slice(0,r.outputlen);case 1:throw new Error(c);case 2:throw new Error(e)}},signatureImport(t,n){switch(f("signature",t),n=m(n,64),y.signatureImport(n,t)){case 0:return n;case 1:throw new Error(c);case 2:throw new Error(e)}},ecdsaSign(t,n,r={},i){f("message",t,32),f("private key",n,32),p("Object"===g(r),"Expected options to be an Object"),void 0!==r.data&&f("options.data",r.data),void 0!==r.noncefn&&p("Function"===g(r.noncefn),"Expected options.noncefn to be a Function");const s={signature:i=m(i,64),recid:null};switch(y.ecdsaSign(s,t,n,r.data,r.noncefn)){case 0:return s;case 1:throw new Error(u);case 2:throw new Error(e)}},ecdsaVerify(e,t,n){switch(f("signature",e,64),f("message",t,32),f("public key",n,[33,65]),y.ecdsaVerify(e,t,n)){case 0:return!0;case 3:return!1;case 1:throw new Error(c);case 2:throw new Error(s)}},ecdsaRecover(t,n,r,i=!0,s){switch(f("signature",t,64),p("Number"===g(n)&&n>=0&&n<=3,"Expected recovery id to be a Number within interval [0, 3]"),f("message",r,32),h(i),s=m(s,i?33:65),y.ecdsaRecover(s,t,n,r)){case 0:return s;case 1:throw new Error(c);case 2:throw new Error(l);case 3:throw new Error(e)}},ecdh(e,t,n={},r){switch(f("public key",e,[33,65]),f("private key",t,32),p("Object"===g(n),"Expected options to be an Object"),void 0!==n.data&&f("options.data",n.data),void 0!==n.hashfn?(p("Function"===g(n.hashfn),"Expected options.hashfn to be a Function"),void 0!==n.xbuf&&f("options.xbuf",n.xbuf,32),void 0!==n.ybuf&&f("options.ybuf",n.ybuf,32),f("output",r)):r=m(r,32),y.ecdh(r,e,t,n.data,n.hashfn,n.xbuf,n.ybuf)){case 0:return r;case 1:throw new Error(s);case 2:throw new Error(d)}}}),xf}function Lf(){if(Af)return kf;Af=1;const e=new(0,Gp().ec)("secp256k1"),t=e.curve,n=t.n.constructor;function r(r){const i=r[0];switch(i){case 2:case 3:return 33!==r.length?null:function(r,i){let s=new n(i);if(s.cmp(t.p)>=0)return null;s=s.toRed(t.red);let a=s.redSqr().redIMul(s).redIAdd(t.b).redSqrt();3===r!==a.isOdd()&&(a=a.redNeg());const o=s.redSqr().redIMul(s);return a.redSqr().redISub(o.redIAdd(t.b)).isZero()?e.keyPair({pub:{x:s,y:a}}):null}(i,r.subarray(1,33));case 4:case 6:case 7:return 65!==r.length?null:function(r,i,s){let a=new n(i),o=new n(s);if(a.cmp(t.p)>=0||o.cmp(t.p)>=0)return null;if(a=a.toRed(t.red),o=o.toRed(t.red),(6===r||7===r)&&o.isOdd()!==(7===r))return null;const c=a.redSqr().redIMul(a);return o.redSqr().redISub(c.redIAdd(t.b)).isZero()?e.keyPair({pub:{x:a,y:o}}):null}(i,r.subarray(1,33),r.subarray(33,65));default:return null}}function i(e,t){const n=t.encode(null,33===e.length);for(let t=0;t<e.length;++t)e[t]=n[t]}return kf={contextRandomize:()=>0,privateKeyVerify(e){const r=new n(e);return r.cmp(t.n)<0&&!r.isZero()?0:1},privateKeyNegate(e){const r=new n(e),i=t.n.sub(r).umod(t.n).toArrayLike(Uint8Array,"be",32);return e.set(i),0},privateKeyTweakAdd(e,r){const i=new n(r);if(i.cmp(t.n)>=0)return 1;if(i.iadd(new n(e)),i.cmp(t.n)>=0&&i.isub(t.n),i.isZero())return 1;const s=i.toArrayLike(Uint8Array,"be",32);return e.set(s),0},privateKeyTweakMul(e,r){let i=new n(r);if(i.cmp(t.n)>=0||i.isZero())return 1;i.imul(new n(e)),i.cmp(t.n)>=0&&(i=i.umod(t.n));const s=i.toArrayLike(Uint8Array,"be",32);return e.set(s),0},publicKeyVerify:e=>null===r(e)?1:0,publicKeyCreate(r,s){const a=new n(s);if(a.cmp(t.n)>=0||a.isZero())return 1;return i(r,e.keyFromPrivate(s).getPublic()),0},publicKeyConvert(e,t){const n=r(t);if(null===n)return 1;return i(e,n.getPublic()),0},publicKeyNegate(e,t){const n=r(t);if(null===n)return 1;const s=n.getPublic();return s.y=s.y.redNeg(),i(e,s),0},publicKeyCombine(e,t){const n=new Array(t.length);for(let e=0;e<t.length;++e)if(n[e]=r(t[e]),null===n[e])return 1;let s=n[0].getPublic();for(let e=1;e<n.length;++e)s=s.add(n[e].pub);return s.isInfinity()?2:(i(e,s),0)},publicKeyTweakAdd(e,s,a){const o=r(s);if(null===o)return 1;if((a=new n(a)).cmp(t.n)>=0)return 2;const c=o.getPublic().add(t.g.mul(a));return c.isInfinity()?2:(i(e,c),0)},publicKeyTweakMul(e,s,a){const o=r(s);if(null===o)return 1;if((a=new n(a)).cmp(t.n)>=0||a.isZero())return 2;return i(e,o.getPublic().mul(a)),0},signatureNormalize(r){const i=new n(r.subarray(0,32)),s=new n(r.subarray(32,64));return i.cmp(t.n)>=0||s.cmp(t.n)>=0?1:(1===s.cmp(e.nh)&&r.set(t.n.sub(s).toArrayLike(Uint8Array,"be",32),32),0)},signatureExport(e,r){const i=r.subarray(0,32),s=r.subarray(32,64);if(new n(i).cmp(t.n)>=0)return 1;if(new n(s).cmp(t.n)>=0)return 1;const{output:a}=e;let o=a.subarray(4,37);o[0]=0,o.set(i,1);let c=33,u=0;for(;c>1&&0===o[u]&&!(128&o[u+1]);--c,++u);if(o=o.subarray(u),128&o[0])return 1;if(c>1&&0===o[0]&&!(128&o[1]))return 1;let l=a.subarray(39,72);l[0]=0,l.set(s,1);let d=33,p=0;for(;d>1&&0===l[p]&&!(128&l[p+1]);--d,++p);return l=l.subarray(p),128&l[0]||d>1&&0===l[0]&&!(128&l[1])?1:(e.outputlen=6+c+d,a[0]=48,a[1]=e.outputlen-2,a[2]=2,a[3]=o.length,a.set(o,4),a[4+c]=2,a[5+c]=l.length,a.set(l,6+c),0)},signatureImport(e,r){if(r.length<8)return 1;if(r.length>72)return 1;if(48!==r[0])return 1;if(r[1]!==r.length-2)return 1;if(2!==r[2])return 1;const i=r[3];if(0===i)return 1;if(5+i>=r.length)return 1;if(2!==r[4+i])return 1;const s=r[5+i];if(0===s)return 1;if(6+i+s!==r.length)return 1;if(128&r[4])return 1;if(i>1&&0===r[4]&&!(128&r[5]))return 1;if(128&r[i+6])return 1;if(s>1&&0===r[i+6]&&!(128&r[i+7]))return 1;let a=r.subarray(4,4+i);if(33===a.length&&0===a[0]&&(a=a.subarray(1)),a.length>32)return 1;let o=r.subarray(6+i);if(33===o.length&&0===o[0]&&(o=o.slice(1)),o.length>32)throw new Error("S length is too long");let c=new n(a);c.cmp(t.n)>=0&&(c=new n(0));let u=new n(r.subarray(6+i));return u.cmp(t.n)>=0&&(u=new n(0)),e.set(c.toArrayLike(Uint8Array,"be",32),0),e.set(u.toArrayLike(Uint8Array,"be",32),32),0},ecdsaSign(r,i,s,a,o){if(o){const e=o;o=t=>{const r=e(i,s,null,a,t);if(!(r instanceof Uint8Array&&32===r.length))throw new Error("This is the way");return new n(r)}}const c=new n(s);if(c.cmp(t.n)>=0||c.isZero())return 1;let u;try{u=e.sign(i,s,{canonical:!0,k:o,pers:a})}catch(e){return 1}return r.signature.set(u.r.toArrayLike(Uint8Array,"be",32),0),r.signature.set(u.s.toArrayLike(Uint8Array,"be",32),32),r.recid=u.recoveryParam,0},ecdsaVerify(i,s,a){const o={r:i.subarray(0,32),s:i.subarray(32,64)},c=new n(o.r),u=new n(o.s);if(c.cmp(t.n)>=0||u.cmp(t.n)>=0)return 1;if(1===u.cmp(e.nh)||c.isZero()||u.isZero())return 3;const l=r(a);if(null===l)return 2;const d=l.getPublic();return e.verify(s,o,d)?0:3},ecdsaRecover(r,s,a,o){const c={r:s.slice(0,32),s:s.slice(32,64)},u=new n(c.r),l=new n(c.s);if(u.cmp(t.n)>=0||l.cmp(t.n)>=0)return 1;if(u.isZero()||l.isZero())return 2;let d;try{d=e.recoverPubKey(o,c,a)}catch(e){return 2}return i(r,d),0},ecdh(i,s,a,o,c,u,l){const d=r(s);if(null===d)return 1;const p=new n(a);if(p.cmp(t.n)>=0||p.isZero())return 2;const f=d.getPublic().mul(p);if(void 0===c){const t=f.encode(null,!0),n=e.hash().update(t).digest();for(let e=0;e<32;++e)i[e]=n[e]}else{u||(u=new Uint8Array(32));const e=f.getX().toArray("be",32);for(let t=0;t<32;++t)u[t]=e[t];l||(l=new Uint8Array(32));const t=f.getY().toArray("be",32);for(let e=0;e<32;++e)l[e]=t[e];const n=c(u,l,o);if(!(n instanceof Uint8Array&&n.length===i.length))return 2;i.set(n)}return 0}},kf}function Df(){if(Rf)return Nf.exports;Rf=1;try{Nf.exports=function(){if(Sf)return Ef;Sf=1;const e=Cf()(__dirname);return Ef=jf()(new e.Secp256k1)}()}catch(e){Nf.exports=Mf?Tf:(Mf=1,Tf=jf()(Lf()))}return Nf.exports}var $f,Uf,Bf,zf,qf={};function Hf(){return Uf?$f:(Uf=1,$f=E.randomBytes)}function Ff(){if(Bf)return qf;Bf=1,Object.defineProperty(qf,"__esModule",{value:!0});var e=Hf();return qf.getRandomBytes=function(t){return new Promise((function(n,r){e(t,(function(e,t){e?r(e):n(t)}))}))},qf.getRandomBytesSync=function(t){return e(t)},qf}function Yf(){return zf||(zf=1,function(e){var t=If&&If.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{c(r.next(e))}catch(e){s(e)}}function o(e){try{c(r.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}c((r=r.apply(e,t||[])).next())}))},n=If&&If.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var r=Df(),i=Ff();e.createPrivateKey=function(){return t(this,void 0,void 0,(function(){var e;return n(this,(function(t){switch(t.label){case 0:return[4,i.getRandomBytes(32)];case 1:return e=t.sent(),r.privateKeyVerify(e)?[2,e]:[3,0];case 2:return[2]}}))}))},e.createPrivateKeySync=function(){for(;;){var e=i.getRandomBytesSync(32);if(r.privateKeyVerify(e))return e}},function(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}(Df())}(If)),If}var Vf,Kf={};function Wf(){if(Vf)return Kf;function e(e){if("string"!=typeof e)throw new Error("[isHexPrefixed] input must be type 'string', received type "+typeof e);return"0"===e[0]&&"x"===e[1]}Vf=1,Object.defineProperty(Kf,"__esModule",{value:!0}),Kf.isHexString=Kf.getKeys=Kf.fromAscii=Kf.fromUtf8=Kf.toAscii=Kf.arrayContainsArray=Kf.getBinarySize=Kf.padToEven=Kf.stripHexPrefix=Kf.isHexPrefixed=void 0,Kf.isHexPrefixed=e;function t(e){let t=e;if("string"!=typeof t)throw new Error("[padToEven] value must be type 'string', received "+typeof t);return t.length%2&&(t=`0${t}`),t}return Kf.stripHexPrefix=t=>{if("string"!=typeof t)throw new Error("[stripHexPrefix] input must be type 'string', received "+typeof t);return e(t)?t.slice(2):t},Kf.padToEven=t,Kf.getBinarySize=function(e){if("string"!=typeof e)throw new Error("[getBinarySize] method requires input type 'string', recieved "+typeof e);return Buffer.byteLength(e,"utf8")},Kf.arrayContainsArray=function(e,t,n){if(!0!==Array.isArray(e))throw new Error(`[arrayContainsArray] method requires input 'superset' to be an array, got type '${typeof e}'`);if(!0!==Array.isArray(t))throw new Error(`[arrayContainsArray] method requires input 'subset' to be an array, got type '${typeof t}'`);return t[n?"some":"every"]((t=>e.indexOf(t)>=0))},Kf.toAscii=function(e){let t="",n=0;const r=e.length;for("0x"===e.substring(0,2)&&(n=2);n<r;n+=2){const r=parseInt(e.substr(n,2),16);t+=String.fromCharCode(r)}return t},Kf.fromUtf8=function(e){return`0x${t(Buffer.from(e,"utf8").toString("hex")).replace(/^0+|0+$/g,"")}`},Kf.fromAscii=function(e){let t="";for(let n=0;n<e.length;n++){const r=e.charCodeAt(n).toString(16);t+=r.length<2?`0${r}`:r}return`0x${t}`},Kf.getKeys=function(e,t,n){if(!Array.isArray(e))throw new Error("[getKeys] method expects input 'params' to be an array, got "+typeof e);if("string"!=typeof t)throw new Error("[getKeys] method expects input 'key' to be type 'string', got "+typeof e);const r=[];for(let i=0;i<e.length;i++){let s=e[i][t];if(n&&!s)s="";else if("string"!=typeof s)throw new Error("invalid abi - expected type 'string', received "+typeof s);r.push(s)}return r},Kf.isHexString=function(e,t){return!("string"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/))&&(!t||e.length===2+2*t)},Kf}var Gf,Jf,Zf={},Xf={};function Qf(){if(Gf)return Xf;Gf=1,Object.defineProperty(Xf,"__esModule",{value:!0}),Xf.assertIsString=Xf.assertIsArray=Xf.assertIsBuffer=Xf.assertIsHexString=void 0;const e=Wf();Xf.assertIsHexString=function(t){if(!(0,e.isHexString)(t)){throw new Error(`This method only supports 0x-prefixed hex strings but input was: ${t}`)}};Xf.assertIsBuffer=function(e){if(!Buffer.isBuffer(e)){throw new Error(`This method only supports Buffer but input was: ${e}`)}};Xf.assertIsArray=function(e){if(!Array.isArray(e)){throw new Error(`This method only supports number arrays but input was: ${e}`)}};return Xf.assertIsString=function(e){if("string"!=typeof e){throw new Error(`This method only supports strings but input was: ${e}`)}},Xf}function eh(){return Jf||(Jf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.bufArrToArr=e.arrToBufArr=e.validateNoLeadingZeroes=e.baToJSON=e.toUtf8=e.addHexPrefix=e.toUnsigned=e.fromSigned=e.bufferToHex=e.bufferToInt=e.toBuffer=e.unpadHexString=e.unpadArray=e.unpadBuffer=e.setLengthRight=e.setLengthLeft=e.zeros=e.intToBuffer=e.intToHex=void 0;const t=gf(),n=Wf(),r=Qf();e.intToHex=function(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Received an invalid integer type: ${e}`);return`0x${e.toString(16)}`};e.intToBuffer=function(t){const r=(0,e.intToHex)(t);return Buffer.from((0,n.padToEven)(r.slice(2)),"hex")};e.zeros=function(e){return Buffer.allocUnsafe(e).fill(0)};const i=function(t,n,r){const i=(0,e.zeros)(n);return r?t.length<n?(t.copy(i),i):t.slice(0,n):t.length<n?(t.copy(i,n-t.length),i):t.slice(-n)};e.setLengthLeft=function(e,t){return(0,r.assertIsBuffer)(e),i(e,t,!1)};e.setLengthRight=function(e,t){return(0,r.assertIsBuffer)(e),i(e,t,!0)};const s=function(e){let t=e[0];for(;e.length>0&&"0"===t.toString();)t=(e=e.slice(1))[0];return e};e.unpadBuffer=function(e){return(0,r.assertIsBuffer)(e),s(e)};e.unpadArray=function(e){return(0,r.assertIsArray)(e),s(e)};e.unpadHexString=function(e){return(0,r.assertIsHexString)(e),e=(0,n.stripHexPrefix)(e),s(e)};e.toBuffer=function(r){if(null==r)return Buffer.allocUnsafe(0);if(Buffer.isBuffer(r))return Buffer.from(r);if(Array.isArray(r)||r instanceof Uint8Array)return Buffer.from(r);if("string"==typeof r){if(!(0,n.isHexString)(r))throw new Error(`Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: ${r}`);return Buffer.from((0,n.padToEven)((0,n.stripHexPrefix)(r)),"hex")}if("number"==typeof r)return(0,e.intToBuffer)(r);if(t.BN.isBN(r)){if(r.isNeg())throw new Error(`Cannot convert negative BN to buffer. Given: ${r}`);return r.toArrayLike(Buffer)}if(r.toArray)return Buffer.from(r.toArray());if(r.toBuffer)return Buffer.from(r.toBuffer());throw new Error("invalid type")};e.bufferToInt=function(n){return new t.BN((0,e.toBuffer)(n)).toNumber()};e.bufferToHex=function(t){return"0x"+(t=(0,e.toBuffer)(t)).toString("hex")};e.fromSigned=function(e){return new t.BN(e).fromTwos(256)};e.toUnsigned=function(e){return Buffer.from(e.toTwos(256).toArray())};e.addHexPrefix=function(e){return"string"!=typeof e||(0,n.isHexPrefixed)(e)?e:"0x"+e};e.toUtf8=function(e){if((e=(0,n.stripHexPrefix)(e)).length%2!=0)throw new Error("Invalid non-even hex string input for toUtf8() provided");return Buffer.from(e.replace(/^(00)+|(00)+$/g,""),"hex").toString("utf8")};e.baToJSON=function(t){if(Buffer.isBuffer(t))return`0x${t.toString("hex")}`;if(t instanceof Array){const n=[];for(let r=0;r<t.length;r++)n.push((0,e.baToJSON)(t[r]));return n}};e.validateNoLeadingZeroes=function(e){for(const[t,n]of Object.entries(e))if(void 0!==n&&n.length>0&&0===n[0])throw new Error(`${t} cannot have leading zeroes, received: ${n.toString("hex")}`)},e.arrToBufArr=function e(t){return Array.isArray(t)?t.map((t=>e(t))):Buffer.from(t)},e.bufArrToArr=function e(t){return Array.isArray(t)?t.map((t=>e(t))):Uint8Array.from(null!=t?t:[])}}(Zf)),Zf}var th,nh={},rh={},ih={};function sh(){if(th)return ih;return th=1,Object.defineProperty(ih,"__esModule",{value:!0}),ih.createHashFunction=function(e){return function(t){var n=e();return n.update(t),Buffer.from(n.digest())}},ih}var ah,oh,ch,uh,lh,dh,ph,fh,hh={exports:{}};function mh(){if(dh)return lh;dh=1;const e=function(){if(oh)return ah;oh=1;const{Transform:e}=Fi();return ah=t=>class n extends e{constructor(e,n,r,i,s){super(s),this._rate=e,this._capacity=n,this._delimitedSuffix=r,this._hashBitLength=i,this._options=s,this._state=new t,this._state.initialize(e,n),this._finalized=!1}_transform(e,t,n){let r=null;try{this.update(e,t)}catch(e){r=e}n(r)}_flush(e){let t=null;try{this.push(this.digest())}catch(e){t=e}e(t)}update(e,t){if(!Buffer.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return Buffer.isBuffer(e)||(e=Buffer.from(e,t)),this._state.absorb(e),this}digest(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);let t=this._state.squeeze(this._hashBitLength/8);return void 0!==e&&(t=t.toString(e)),this._resetState(),t}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const e=new n(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(e._state),e._finalized=this._finalized,e}},ah}(),t=function(){if(uh)return ch;uh=1;const{Transform:e}=Fi();return ch=t=>class n extends e{constructor(e,n,r,i){super(i),this._rate=e,this._capacity=n,this._delimitedSuffix=r,this._options=i,this._state=new t,this._state.initialize(e,n),this._finalized=!1}_transform(e,t,n){let r=null;try{this.update(e,t)}catch(e){r=e}n(r)}_flush(){}_read(e){this.push(this.squeeze(e))}update(e,t){if(!Buffer.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return Buffer.isBuffer(e)||(e=Buffer.from(e,t)),this._state.absorb(e),this}squeeze(e,t){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));let n=this._state.squeeze(e);return void 0!==t&&(n=n.toString(t)),n}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const e=new n(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(e._state),e._finalized=this._finalized,e}},ch}();return lh=function(n){const r=e(n),i=t(n);return function(e,t){switch("string"==typeof e?e.toLowerCase():e){case"keccak224":return new r(1152,448,null,224,t);case"keccak256":return new r(1088,512,null,256,t);case"keccak384":return new r(832,768,null,384,t);case"keccak512":return new r(576,1024,null,512,t);case"sha3-224":return new r(1152,448,6,224,t);case"sha3-256":return new r(1088,512,6,256,t);case"sha3-384":return new r(832,768,6,384,t);case"sha3-512":return new r(576,1024,6,512,t);case"shake128":return new i(1344,256,31,t);case"shake256":return new i(1088,512,31,t);default:throw new Error("Invald algorithm: "+e)}}},lh}var gh,yh,bh,vh,wh,xh,_h,Eh,Sh,kh,Ah={};function Th(){if(bh)return yh;bh=1;const e=function(){if(gh)return Ah;gh=1;const e=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648];return Ah.p1600=function(t){for(let n=0;n<24;++n){const r=t[0]^t[10]^t[20]^t[30]^t[40],i=t[1]^t[11]^t[21]^t[31]^t[41],s=t[2]^t[12]^t[22]^t[32]^t[42],a=t[3]^t[13]^t[23]^t[33]^t[43],o=t[4]^t[14]^t[24]^t[34]^t[44],c=t[5]^t[15]^t[25]^t[35]^t[45],u=t[6]^t[16]^t[26]^t[36]^t[46],l=t[7]^t[17]^t[27]^t[37]^t[47],d=t[8]^t[18]^t[28]^t[38]^t[48],p=t[9]^t[19]^t[29]^t[39]^t[49];let f=d^(s<<1|a>>>31),h=p^(a<<1|s>>>31);const m=t[0]^f,g=t[1]^h,y=t[10]^f,b=t[11]^h,v=t[20]^f,w=t[21]^h,x=t[30]^f,_=t[31]^h,E=t[40]^f,S=t[41]^h;f=r^(o<<1|c>>>31),h=i^(c<<1|o>>>31);const k=t[2]^f,A=t[3]^h,T=t[12]^f,M=t[13]^h,R=t[22]^f,O=t[23]^h,I=t[32]^f,N=t[33]^h,P=t[42]^f,C=t[43]^h;f=s^(u<<1|l>>>31),h=a^(l<<1|u>>>31);const j=t[4]^f,L=t[5]^h,D=t[14]^f,$=t[15]^h,U=t[24]^f,B=t[25]^h,z=t[34]^f,q=t[35]^h,H=t[44]^f,F=t[45]^h;f=o^(d<<1|p>>>31),h=c^(p<<1|d>>>31);const Y=t[6]^f,V=t[7]^h,K=t[16]^f,W=t[17]^h,G=t[26]^f,J=t[27]^h,Z=t[36]^f,X=t[37]^h,Q=t[46]^f,ee=t[47]^h;f=u^(r<<1|i>>>31),h=l^(i<<1|r>>>31);const te=t[8]^f,ne=t[9]^h,re=t[18]^f,ie=t[19]^h,se=t[28]^f,ae=t[29]^h,oe=t[38]^f,ce=t[39]^h,ue=t[48]^f,le=t[49]^h,de=m,pe=g,fe=b<<4|y>>>28,he=y<<4|b>>>28,me=v<<3|w>>>29,ge=w<<3|v>>>29,ye=_<<9|x>>>23,be=x<<9|_>>>23,ve=E<<18|S>>>14,we=S<<18|E>>>14,xe=k<<1|A>>>31,_e=A<<1|k>>>31,Ee=M<<12|T>>>20,Se=T<<12|M>>>20,ke=R<<10|O>>>22,Ae=O<<10|R>>>22,Te=N<<13|I>>>19,Me=I<<13|N>>>19,Re=P<<2|C>>>30,Oe=C<<2|P>>>30,Ie=L<<30|j>>>2,Ne=j<<30|L>>>2,Pe=D<<6|$>>>26,Ce=$<<6|D>>>26,je=B<<11|U>>>21,Le=U<<11|B>>>21,De=z<<15|q>>>17,$e=q<<15|z>>>17,Ue=F<<29|H>>>3,Be=H<<29|F>>>3,ze=Y<<28|V>>>4,qe=V<<28|Y>>>4,He=W<<23|K>>>9,Fe=K<<23|W>>>9,Ye=G<<25|J>>>7,Ve=J<<25|G>>>7,Ke=Z<<21|X>>>11,We=X<<21|Z>>>11,Ge=ee<<24|Q>>>8,Je=Q<<24|ee>>>8,Ze=te<<27|ne>>>5,Xe=ne<<27|te>>>5,Qe=re<<20|ie>>>12,et=ie<<20|re>>>12,tt=ae<<7|se>>>25,nt=se<<7|ae>>>25,rt=oe<<8|ce>>>24,it=ce<<8|oe>>>24,st=ue<<14|le>>>18,at=le<<14|ue>>>18;t[0]=de^~Ee&je,t[1]=pe^~Se&Le,t[10]=ze^~Qe&me,t[11]=qe^~et&ge,t[20]=xe^~Pe&Ye,t[21]=_e^~Ce&Ve,t[30]=Ze^~fe&ke,t[31]=Xe^~he&Ae,t[40]=Ie^~He&tt,t[41]=Ne^~Fe&nt,t[2]=Ee^~je&Ke,t[3]=Se^~Le&We,t[12]=Qe^~me&Te,t[13]=et^~ge&Me,t[22]=Pe^~Ye&rt,t[23]=Ce^~Ve&it,t[32]=fe^~ke&De,t[33]=he^~Ae&$e,t[42]=He^~tt&ye,t[43]=Fe^~nt&be,t[4]=je^~Ke&st,t[5]=Le^~We&at,t[14]=me^~Te&Ue,t[15]=ge^~Me&Be,t[24]=Ye^~rt&ve,t[25]=Ve^~it&we,t[34]=ke^~De&Ge,t[35]=Ae^~$e&Je,t[44]=tt^~ye&Re,t[45]=nt^~be&Oe,t[6]=Ke^~st&de,t[7]=We^~at&pe,t[16]=Te^~Ue&ze,t[17]=Me^~Be&qe,t[26]=rt^~ve&xe,t[27]=it^~we&_e,t[36]=De^~Ge&Ze,t[37]=$e^~Je&Xe,t[46]=ye^~Re&Ie,t[47]=be^~Oe&Ne,t[8]=st^~de&Ee,t[9]=at^~pe&Se,t[18]=Ue^~ze&Qe,t[19]=Be^~qe&et,t[28]=ve^~xe&Pe,t[29]=we^~_e&Ce,t[38]=Ge^~Ze&fe,t[39]=Je^~Xe&he,t[48]=Re^~Ie&He,t[49]=Oe^~Ne&Fe,t[0]^=e[2*n],t[1]^=e[2*n+1]}},Ah}();function t(){this.state=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.blockSize=null,this.count=0,this.squeezing=!1}return t.prototype.initialize=function(e,t){for(let e=0;e<50;++e)this.state[e]=0;this.blockSize=e/8,this.count=0,this.squeezing=!1},t.prototype.absorb=function(t){for(let n=0;n<t.length;++n)this.state[~~(this.count/4)]^=t[n]<<this.count%4*8,this.count+=1,this.count===this.blockSize&&(e.p1600(this.state),this.count=0)},t.prototype.absorbLastFewBits=function(t){this.state[~~(this.count/4)]^=t<<this.count%4*8,128&t&&this.count===this.blockSize-1&&e.p1600(this.state),this.state[~~((this.blockSize-1)/4)]^=128<<(this.blockSize-1)%4*8,e.p1600(this.state),this.count=0,this.squeezing=!0},t.prototype.squeeze=function(t){this.squeezing||this.absorbLastFewBits(1);const n=Buffer.alloc(t);for(let r=0;r<t;++r)n[r]=this.state[~~(this.count/4)]>>>this.count%4*8&255,this.count+=1,this.count===this.blockSize&&(e.p1600(this.state),this.count=0);return n},t.prototype.copy=function(e){for(let t=0;t<50;++t)e.state[t]=this.state[t];e.blockSize=this.blockSize,e.count=this.count,e.squeezing=this.squeezing},yh=t}function Mh(){if(xh)return hh.exports;xh=1;try{hh.exports=function(){if(fh)return ph;fh=1;const e=Cf()(__dirname);if("function"!=typeof e)throw new Error("Native add-on failed to load");return ph=mh()(e)}()}catch(e){hh.exports=wh?vh:(wh=1,vh=mh()(Th()))}return hh.exports}function Rh(){if(_h)return rh;_h=1,Object.defineProperty(rh,"__esModule",{value:!0});var e=sh(),t=Mh();return rh.keccak224=e.createHashFunction((function(){return t("keccak224")})),rh.keccak256=e.createHashFunction((function(){return t("keccak256")})),rh.keccak384=e.createHashFunction((function(){return t("keccak384")})),rh.keccak512=e.createHashFunction((function(){return t("keccak512")})),rh}function Oh(){return Sh?Eh:(Sh=1,Eh=E.createHash)}function Ih(){return kh||(kh=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.rlphash=e.ripemd160FromArray=e.ripemd160FromString=e.ripemd160=e.sha256FromArray=e.sha256FromString=e.sha256=e.keccakFromArray=e.keccakFromHexString=e.keccakFromString=e.keccak256=e.keccak=void 0;const t=Rh(),n=Oh(),r=gf(),i=eh(),s=Qf();e.keccak=function(e,n=256){switch((0,s.assertIsBuffer)(e),n){case 224:return(0,t.keccak224)(e);case 256:return(0,t.keccak256)(e);case 384:return(0,t.keccak384)(e);case 512:return(0,t.keccak512)(e);default:throw new Error(`Invald algorithm: keccak${n}`)}};e.keccak256=function(t){return(0,e.keccak)(t)};e.keccakFromString=function(t,n=256){(0,s.assertIsString)(t);const r=Buffer.from(t,"utf8");return(0,e.keccak)(r,n)};e.keccakFromHexString=function(t,n=256){return(0,s.assertIsHexString)(t),(0,e.keccak)((0,i.toBuffer)(t),n)};e.keccakFromArray=function(t,n=256){return(0,s.assertIsArray)(t),(0,e.keccak)((0,i.toBuffer)(t),n)};const a=function(e){return e=(0,i.toBuffer)(e),n("sha256").update(e).digest()};e.sha256=function(e){return(0,s.assertIsBuffer)(e),a(e)};e.sha256FromString=function(e){return(0,s.assertIsString)(e),a(e)};e.sha256FromArray=function(e){return(0,s.assertIsArray)(e),a(e)};const o=function(e,t){e=(0,i.toBuffer)(e);const r=n("rmd160").update(e).digest();return!0===t?(0,i.setLengthLeft)(r,32):r};e.ripemd160=function(e,t){return(0,s.assertIsBuffer)(e),o(e,t)};e.ripemd160FromString=function(e,t){return(0,s.assertIsString)(e),o(e,t)};e.ripemd160FromArray=function(e,t){return(0,s.assertIsArray)(e),o(e,t)};e.rlphash=function(t){return(0,e.keccak)(r.rlp.encode(t))}}(nh)),nh}var Nh,Ph,Ch={};function jh(){return Nh||(Nh=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.toType=e.TypeOutput=e.bnToRlp=e.bnToUnpaddedBuffer=e.bnToHex=void 0;const t=gf(),n=Wf(),r=eh();function i(e){return(0,r.unpadBuffer)(e.toArrayLike(Buffer))}var s;e.bnToHex=function(e){return`0x${e.toString(16)}`},e.bnToUnpaddedBuffer=i,e.bnToRlp=function(e){return i(e)},function(e){e[e.Number=0]="Number",e[e.BN=1]="BN",e[e.Buffer=2]="Buffer",e[e.PrefixedHexString=3]="PrefixedHexString"}(s=e.TypeOutput||(e.TypeOutput={})),e.toType=function(e,i){if(null===e)return null;if(void 0===e)return;if("string"==typeof e&&!(0,n.isHexString)(e))throw new Error(`A string must be provided with a 0x-prefix, given: ${e}`);if("number"==typeof e&&!Number.isSafeInteger(e))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)");const a=(0,r.toBuffer)(e);if(i===s.Buffer)return a;if(i===s.BN)return new t.BN(a);if(i===s.Number){const e=new t.BN(a),n=new t.BN(Number.MAX_SAFE_INTEGER.toString());if(e.gt(n))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative output type)");return e.toNumber()}return`0x${a.toString("hex")}`}}(Ch)),Ch}function Lh(){return Ph||(Ph=1,function(e){var t=Of&&Of.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.isZeroAddress=e.zeroAddress=e.importPublic=e.privateToAddress=e.privateToPublic=e.publicToAddress=e.pubToAddress=e.isValidPublic=e.isValidPrivate=e.generateAddress2=e.generateAddress=e.isValidChecksumAddress=e.toChecksumAddress=e.isValidAddress=e.Account=void 0;const n=t(T),r=gf(),i=Yf(),s=Wf(),a=yf(),o=eh(),c=Ih(),u=Qf(),l=jh();class d{constructor(e=new r.BN(0),t=new r.BN(0),n=a.KECCAK256_RLP,i=a.KECCAK256_NULL){this.nonce=e,this.balance=t,this.stateRoot=n,this.codeHash=i,this._validate()}static fromAccountData(e){const{nonce:t,balance:n,stateRoot:i,codeHash:s}=e;return new d(t?new r.BN((0,o.toBuffer)(t)):void 0,n?new r.BN((0,o.toBuffer)(n)):void 0,i?(0,o.toBuffer)(i):void 0,s?(0,o.toBuffer)(s):void 0)}static fromRlpSerializedAccount(e){const t=r.rlp.decode(e);if(!Array.isArray(t))throw new Error("Invalid serialized account input. Must be array");return this.fromValuesArray(t)}static fromValuesArray(e){const[t,n,i,s]=e;return new d(new r.BN(t),new r.BN(n),i,s)}_validate(){if(this.nonce.lt(new r.BN(0)))throw new Error("nonce must be greater than zero");if(this.balance.lt(new r.BN(0)))throw new Error("balance must be greater than zero");if(32!==this.stateRoot.length)throw new Error("stateRoot must have a length of 32");if(32!==this.codeHash.length)throw new Error("codeHash must have a length of 32")}raw(){return[(0,l.bnToUnpaddedBuffer)(this.nonce),(0,l.bnToUnpaddedBuffer)(this.balance),this.stateRoot,this.codeHash]}serialize(){return r.rlp.encode(this.raw())}isContract(){return!this.codeHash.equals(a.KECCAK256_NULL)}isEmpty(){return this.balance.isZero()&&this.nonce.isZero()&&this.codeHash.equals(a.KECCAK256_NULL)}}e.Account=d;e.isValidAddress=function(e){try{(0,u.assertIsString)(e)}catch(e){return!1}return/^0x[0-9a-fA-F]{40}$/.test(e)};e.toChecksumAddress=function(e,t){(0,u.assertIsHexString)(e);const n=(0,s.stripHexPrefix)(e).toLowerCase();let r="";if(t){r=(0,l.toType)(t,l.TypeOutput.BN).toString()+"0x"}const i=(0,c.keccakFromString)(r+n).toString("hex");let a="0x";for(let e=0;e<n.length;e++)parseInt(i[e],16)>=8?a+=n[e].toUpperCase():a+=n[e];return a};e.isValidChecksumAddress=function(t,n){return(0,e.isValidAddress)(t)&&(0,e.toChecksumAddress)(t,n)===t};e.generateAddress=function(e,t){(0,u.assertIsBuffer)(e),(0,u.assertIsBuffer)(t);const n=new r.BN(t);return n.isZero()?(0,c.rlphash)([e,null]).slice(-20):(0,c.rlphash)([e,Buffer.from(n.toArray())]).slice(-20)};e.generateAddress2=function(e,t,r){(0,u.assertIsBuffer)(e),(0,u.assertIsBuffer)(t),(0,u.assertIsBuffer)(r),(0,n.default)(20===e.length),(0,n.default)(32===t.length);return(0,c.keccak256)(Buffer.concat([Buffer.from("ff","hex"),e,t,(0,c.keccak256)(r)])).slice(-20)};e.isValidPrivate=function(e){return(0,i.privateKeyVerify)(e)};e.isValidPublic=function(e,t=!1){return(0,u.assertIsBuffer)(e),64===e.length?(0,i.publicKeyVerify)(Buffer.concat([Buffer.from([4]),e])):!!t&&(0,i.publicKeyVerify)(e)};e.pubToAddress=function(e,t=!1){return(0,u.assertIsBuffer)(e),t&&64!==e.length&&(e=Buffer.from((0,i.publicKeyConvert)(e,!1).slice(1))),(0,n.default)(64===e.length),(0,c.keccak)(e).slice(-20)},e.publicToAddress=e.pubToAddress;e.privateToPublic=function(e){return(0,u.assertIsBuffer)(e),Buffer.from((0,i.publicKeyCreate)(e,!1)).slice(1)};e.privateToAddress=function(t){return(0,e.publicToAddress)((0,e.privateToPublic)(t))};e.importPublic=function(e){return(0,u.assertIsBuffer)(e),64!==e.length&&(e=Buffer.from((0,i.publicKeyConvert)(e,!1).slice(1))),e};e.zeroAddress=function(){const e=(0,o.zeros)(20);return(0,o.bufferToHex)(e)};e.isZeroAddress=function(t){try{(0,u.assertIsString)(t)}catch(e){return!1}return(0,e.zeroAddress)()===t}}(Of)),Of}var Dh,$h={};var Uh,Bh={};var zh,qh,Hh={};var Fh,Yh,Vh,Kh,Wh,Gh=(qh||(qh=1,function(e){var t=sf&&sf.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=sf&&sf.__exportStar||function(e,n){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.isHexString=e.getKeys=e.fromAscii=e.fromUtf8=e.toAscii=e.arrayContainsArray=e.getBinarySize=e.padToEven=e.stripHexPrefix=e.isHexPrefixed=void 0,n(yf(),e),n(Lh(),e),n(function(){if(Dh)return $h;Dh=1;var e=$h&&$h.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty($h,"__esModule",{value:!0}),$h.Address=void 0;const t=e(T),n=gf(),r=eh(),i=Lh();class s{constructor(e){(0,t.default)(20===e.length,"Invalid address length"),this.buf=e}static zero(){return new s((0,r.zeros)(20))}static fromString(e){return(0,t.default)((0,i.isValidAddress)(e),"Invalid address"),new s((0,r.toBuffer)(e))}static fromPublicKey(e){(0,t.default)(Buffer.isBuffer(e),"Public key should be Buffer");const n=(0,i.pubToAddress)(e);return new s(n)}static fromPrivateKey(e){(0,t.default)(Buffer.isBuffer(e),"Private key should be Buffer");const n=(0,i.privateToAddress)(e);return new s(n)}static generate(e,r){return(0,t.default)(n.BN.isBN(r)),new s((0,i.generateAddress)(e.buf,r.toArrayLike(Buffer)))}static generate2(e,n,r){return(0,t.default)(Buffer.isBuffer(n)),(0,t.default)(Buffer.isBuffer(r)),new s((0,i.generateAddress2)(e.buf,n,r))}equals(e){return this.buf.equals(e.buf)}isZero(){return this.equals(s.zero())}isPrecompileOrSystemAddress(){const e=new n.BN(this.buf),t=new n.BN(0),r=new n.BN("ffff","hex");return e.gte(t)&&e.lte(r)}toString(){return"0x"+this.buf.toString("hex")}toBuffer(){return Buffer.from(this.buf)}}return $h.Address=s,$h}(),e),n(Ih(),e),n(function(){if(Uh)return Bh;Uh=1,Object.defineProperty(Bh,"__esModule",{value:!0}),Bh.hashPersonalMessage=Bh.isValidSignature=Bh.fromRpcSig=Bh.toCompactSig=Bh.toRpcSig=Bh.ecrecover=Bh.ecsign=void 0;const e=Yf(),t=gf(),n=eh(),r=Ih(),i=Qf(),s=jh();function a(e,t){const n=(0,s.toType)(e,s.TypeOutput.BN);if(n.eqn(0)||n.eqn(1))return(0,s.toType)(e,s.TypeOutput.BN);if(!t)return n.subn(27);const r=(0,s.toType)(t,s.TypeOutput.BN);return n.sub(r.muln(2).addn(35))}function o(e){const n=new t.BN(e);return n.eqn(0)||n.eqn(1)}return Bh.ecsign=function(t,n,r){const{signature:i,recid:a}=(0,e.ecdsaSign)(t,n),o=Buffer.from(i.slice(0,32)),c=Buffer.from(i.slice(32,64));if(!r||"number"==typeof r){if(r&&!Number.isSafeInteger(r))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)");return{r:o,s:c,v:r?a+(2*r+35):a+27}}return{r:o,s:c,v:(0,s.toType)(r,s.TypeOutput.BN).muln(2).addn(35).addn(a).toArrayLike(Buffer)}},Bh.ecrecover=function(t,r,i,s,c){const u=Buffer.concat([(0,n.setLengthLeft)(i,32),(0,n.setLengthLeft)(s,32)],64),l=a(r,c);if(!o(l))throw new Error("Invalid signature v value");const d=(0,e.ecdsaRecover)(u,l.toNumber(),t);return Buffer.from((0,e.publicKeyConvert)(d,!1).slice(1))},Bh.toRpcSig=function(e,t,r,i){if(!o(a(e,i)))throw new Error("Invalid signature v value");return(0,n.bufferToHex)(Buffer.concat([(0,n.setLengthLeft)(t,32),(0,n.setLengthLeft)(r,32),(0,n.toBuffer)(e)]))},Bh.toCompactSig=function(e,t,r,i){if(!o(a(e,i)))throw new Error("Invalid signature v value");const c=(0,s.toType)(e,s.TypeOutput.Number);let u=r;return(c>28&&c%2==1||1===c||28===c)&&(u=Buffer.from(r),u[0]|=128),(0,n.bufferToHex)(Buffer.concat([(0,n.setLengthLeft)(t,32),(0,n.setLengthLeft)(u,32)]))},Bh.fromRpcSig=function(e){const t=(0,n.toBuffer)(e);let r,i,s;if(t.length>=65)r=t.slice(0,32),i=t.slice(32,64),s=(0,n.bufferToInt)(t.slice(64));else{if(64!==t.length)throw new Error("Invalid signature length");r=t.slice(0,32),i=t.slice(32,64),s=(0,n.bufferToInt)(t.slice(32,33))>>7,i[0]&=127}return s<27&&(s+=27),{v:s,r:r,s:i}},Bh.isValidSignature=function(e,n,r,i=!0,s){const c=new t.BN("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),u=new t.BN("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);if(32!==n.length||32!==r.length)return!1;if(!o(a(e,s)))return!1;const l=new t.BN(n),d=new t.BN(r);return!(l.isZero()||l.gt(u)||d.isZero()||d.gt(u)||i&&1===d.cmp(c))},Bh.hashPersonalMessage=function(e){(0,i.assertIsBuffer)(e);const t=Buffer.from(`Ethereum Signed Message:\n${e.length}`,"utf-8");return(0,r.keccak)(Buffer.concat([t,e]))},Bh}(),e),n(eh(),e),n(function(){if(zh)return Hh;zh=1;var e=Hh&&Hh.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Hh,"__esModule",{value:!0}),Hh.defineProperties=void 0;const t=e(T),n=Wf(),r=gf(),i=eh();return Hh.defineProperties=function(e,s,a){if(e.raw=[],e._fields=[],e.toJSON=function(t=!1){if(t){const t={};return e._fields.forEach((n=>{t[n]=`0x${e[n].toString("hex")}`})),t}return(0,i.baToJSON)(e.raw)},e.serialize=function(){return r.rlp.encode(e.raw)},s.forEach(((n,r)=>{function s(){return e.raw[r]}function a(s){"00"!==(s=(0,i.toBuffer)(s)).toString("hex")||n.allowZero||(s=Buffer.allocUnsafe(0)),n.allowLess&&n.length?(s=(0,i.unpadBuffer)(s),(0,t.default)(n.length>=s.length,`The field ${n.name} must not have more ${n.length} bytes`)):n.allowZero&&0===s.length||!n.length||(0,t.default)(n.length===s.length,`The field ${n.name} must have byte length of ${n.length}`),e.raw[r]=s}e._fields.push(n.name),Object.defineProperty(e,n.name,{enumerable:!0,configurable:!0,get:s,set:a}),n.default&&(e[n.name]=n.default),n.alias&&Object.defineProperty(e,n.alias,{enumerable:!1,configurable:!0,set:a,get:s})})),a)if("string"==typeof a&&(a=Buffer.from((0,n.stripHexPrefix)(a),"hex")),Buffer.isBuffer(a)&&(a=r.rlp.decode(a)),Array.isArray(a)){if(a.length>e._fields.length)throw new Error("wrong number of fields in data");a.forEach(((t,n)=>{e[e._fields[n]]=(0,i.toBuffer)(t)}))}else{if("object"!=typeof a)throw new Error("invalid data");{const t=Object.keys(a);s.forEach((n=>{-1!==t.indexOf(n.name)&&(e[n.name]=a[n.name]),-1!==t.indexOf(n.alias)&&(e[n.alias]=a[n.alias])}))}}},Hh}(),e),n(gf(),e),n(jh(),e);var r=Wf();Object.defineProperty(e,"isHexPrefixed",{enumerable:!0,get:function(){return r.isHexPrefixed}}),Object.defineProperty(e,"stripHexPrefix",{enumerable:!0,get:function(){return r.stripHexPrefix}}),Object.defineProperty(e,"padToEven",{enumerable:!0,get:function(){return r.padToEven}}),Object.defineProperty(e,"getBinarySize",{enumerable:!0,get:function(){return r.getBinarySize}}),Object.defineProperty(e,"arrayContainsArray",{enumerable:!0,get:function(){return r.arrayContainsArray}}),Object.defineProperty(e,"toAscii",{enumerable:!0,get:function(){return r.toAscii}}),Object.defineProperty(e,"fromUtf8",{enumerable:!0,get:function(){return r.fromUtf8}}),Object.defineProperty(e,"fromAscii",{enumerable:!0,get:function(){return r.fromAscii}}),Object.defineProperty(e,"getKeys",{enumerable:!0,get:function(){return r.getKeys}}),Object.defineProperty(e,"isHexString",{enumerable:!0,get:function(){return r.isHexString}})}(sf)),sf);class Jh{static hash(e){const t=Buffer.from(e,"utf8");return Gh.keccak256(t)}static hashRandomBits(e){if(!this.isValidSHA256(e.blockHash.replace("0x",""))||e.taskRequesterTimestamp<=0||e.dispatcherTimestamp<=0)throw`Invalid inputs for hashRandomBits:\n blockHash: ${e.blockHash},\n taskRequesterTimestamp: ${e.taskRequesterTimestamp},\n dispatcherTimestamp: ${e.dispatcherTimestamp}\n `;const t=e.taskRequesterTimestamp.toString()+e.dispatcherTimestamp.toString()+e.blockHash,n=Buffer.from(t,"utf8");return Gh.keccak256(n)}static hashMessage(e={}){let t=JSON.parse(JSON.stringify(e));t.payload&&(t=t.payload),delete t.type,delete t.msgHash,delete t.signature;const n=Object.keys(t).sort().reduce(((e,n)=>(e[n]=t[n],e)),{}),r=Buffer.from(JSON.stringify(n),"utf-8");return Gh.keccak256(r)}static computeFileSHA256(e){const t=_.createHash("sha256");return t.update(e),t.digest("hex")}static computeStringSHA256(e){const t=_.createHash("sha256");return t.update(e),t.digest("hex")}static isValidSHA256(e){return/^[a-f0-9]{64}$/gi.test(e)}}class Zh{static sign(e,t){const n=Gh.toBuffer("0x"+t);if(!Gh.isValidPrivate(n))throw"Invalid private key when trying to sign msg";return Gh.ecsign(e,n)}static getAddressFromPrivateKey(e){const t=Gh.toBuffer("0x"+e);if(!Gh.isValidPrivate(t))throw"Invalid private key when trying to get the address";const n=Gh.privateToPublic(t);return"0x"+Gh.pubToAddress(n).toString("hex")}static verifySignature(e,t,n){const r=Gh.ecrecover(e,t.v,t.r,t.s);return"0x"+Gh.pubToAddress(r).toString("hex").toLowerCase()===n.toLowerCase()}static serializeSignature(e){return JSON.stringify({v:e.v,r:e.r.toString("hex"),s:e.s.toString("hex")})}static deserializeSignature(e){const t=JSON.parse(e);return{v:t.v,r:Buffer.from(t.r,"hex"),s:Buffer.from(t.s,"hex")}}static ECDSASignatureToHex(e){return{v:e.v,r:e.r.toString("hex"),s:e.s.toString("hex")}}static SignatureHexToECDSA(e){return{v:e.v,r:Buffer.from(e.r,"hex"),s:Buffer.from(e.s,"hex")}}static isValidSignature(e){const t=Zh.SignatureHexToECDSA(e);return Gh.isValidSignature(t.v,t.r,t.s)}static generateAddress(){const e=function(){let e=nf(32);for(;!tf(e);)e=nf(32);return e}(),t=Gh.privateToPublic(e),n=function(e){return ef(32===e.length,"Bad private key"),ef(tf(e),"Bad private key"),Buffer.from(Jp.keyFromPrivate(e).getPublic("array"))}(e),r=Gh.pubToAddress(t),i=Gh.bufferToHex(e).replace("0x",""),s=Gh.bufferToHex(n).replace("0x","");return{addressHex:Gh.bufferToHex(r),privateKeyHex:i,publicKeyHex:s}}static createSignedBody(e,t,n){!e.walletAddress&&n&&(e.walletAddress=n);const r=Jh.hashMessage(e);let i;i="0"===t[0]&&"x"===t[1]?t.slice(2):t;const s=Zh.sign(r,i);return e.signature=Zh.ECDSASignatureToHex(s),e}}!function(e){e.ACTIVE="active",e.INACTIVE="inactive"}(Fh||(Fh={}));class Xh{constructor(){}}class Qh extends Xh{async build(e,n){const r=i.join(process.cwd(),e,"main.js");if(!t.existsSync(r))throw`File doesn't exist: ${r} `;t.copyFileSync(r,i.join(process.cwd(),`${n}/main.js`))}}class em extends Xh{async build(e,n){const r=i.join(process.cwd(),e,"task.py");if(!t.existsSync(r))throw`File doesn't exist: ${r} `;t.copyFileSync(r,i.join(process.cwd(),`${n}/task.py`))}}class tm extends Xh{async build(e,n){const r=i.join(process.cwd(),e),s=i.join(r,"task.wasm");if(t.existsSync(s)&&t.rmSync(s),await new Promise(((e,t)=>{I(`cd ${r} && sh compile.sh`,((n,r,i)=>{n&&t(i),e(r)}))})),!t.existsSync(s))throw`File doesn't exist: ${s}`;t.copyFileSync(s,i.join(process.cwd(),`${n}/task.wasm`))}}class nm extends Xh{async build(e,n){await new Promise(((t,n)=>{I("rustc --version",((r,s,a)=>{r&&n(`Rust ${a.split("error: ")[1]}`);const o=s.split(" ")[1];"1.78.0"!==o?n(`Rust version detected is: ${o}. Version must be 1.78`):I(`cargo build --manifest-path ${i.join(process.cwd(),e,"Cargo.toml")} --target wasm32-wasip1`,((e,r,i)=>{e&&n(`Cargo ${i.split("error: ")[1]}`),t(r)}))}))}));const r=e.split("/"),s=r[r.length-1]||r[r.length-2];if(!t.existsSync(i.join(process.cwd(),e,`/target/wasm32-wasip1/debug/${s}.wasm`)))throw`File doesn't exist: ${i.join(process.cwd(),e,`/target/wasm32-wasip1/debug/${s}.wasm`)}. Please check that your Cargo.toml file has the same name of the directory of the task. `;t.copyFileSync(i.join(process.cwd(),e,`/target/wasm32-wasip1/debug/${s}.wasm`),i.join(process.cwd(),`${n}/task.wasm`))}}class rm extends Xh{async build(e,n){const r=i.join(process.cwd(),e);if(!t.existsSync(r))throw`File doesn't exist: ${r}`;try{const e=t.readFileSync(r,"utf-8"),[n,i,s]=await N(JSON.parse(e),{fullResult:!0});if(void 0!==i)throw console.error(i),new Error(i);void 0!==s&&console.warn(s),void 0!==n&&console.log("OpenAPI manifest is valid!")}catch{throw"Error validating OpenAPI manifest"}t.copyFileSync(r,i.join(process.cwd(),`${n}/manifest.json`))}}class im{static createBuild(e){switch(e){case ao.RUST:return new nm;case ao.C:return new tm;case ao.JS:return new Qh;case oo.API:return new rm;case ao.PYTHON:return new em;default:throw"Invalid language"}}}function sm(){if(Wh)return Kh;Wh=1;var e=a,t=d.Stream,n=function(){if(Vh)return Yh;Vh=1;var e=d.Stream;function t(){this.source=null,this.dataSize=0,this.maxDataSize=1048576,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}return Yh=t,a.inherits(t,e),t.create=function(e,t){var n=new this;for(var r in t=t||{})n[r]=t[r];n.source=e;var i=e.emit;return e.emit=function(){return n._handleEmit(arguments),i.apply(e,arguments)},e.on("error",(function(){})),n.pauseStream&&e.pause(),n},Object.defineProperty(t.prototype,"readable",{configurable:!0,enumerable:!0,get:function(){return this.source.readable}}),t.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)},t.prototype.resume=function(){this._released||this.release(),this.source.resume()},t.prototype.pause=function(){this.source.pause()},t.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]},t.prototype.pipe=function(){var t=e.prototype.pipe.apply(this,arguments);return this.resume(),t},t.prototype._handleEmit=function(e){this._released?this.emit.apply(this,e):("data"===e[0]&&(this.dataSize+=e[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(e))},t.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))}},Yh}();function r(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2097152,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}return Kh=r,e.inherits(r,t),r.create=function(e){var t=new this;for(var n in e=e||{})t[n]=e[n];return t},r.isStreamLike=function(e){return"function"!=typeof e&&"string"!=typeof e&&"boolean"!=typeof e&&"number"!=typeof e&&!Buffer.isBuffer(e)},r.prototype.append=function(e){if(r.isStreamLike(e)){if(!(e instanceof n)){var t=n.create(e,{maxDataSize:1/0,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this)),e=t}this._handleErrors(e),this.pauseStreams&&e.pause()}return this._streams.push(e),this},r.prototype.pipe=function(e,n){return t.prototype.pipe.call(this,e,n),this.resume(),e},r.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop)this._pendingNext=!0;else{this._insideLoop=!0;try{do{this._pendingNext=!1,this._realGetNext()}while(this._pendingNext)}finally{this._insideLoop=!1}}},r.prototype._realGetNext=function(){var e=this._streams.shift();void 0!==e?"function"==typeof e?e(function(e){r.isStreamLike(e)&&(e.on("data",this._checkDataSize.bind(this)),this._handleErrors(e)),this._pipeNext(e)}.bind(this)):this._pipeNext(e):this.end()},r.prototype._pipeNext=function(e){if(this._currentStream=e,r.isStreamLike(e))return e.on("end",this._getNext.bind(this)),void e.pipe(this,{end:!1});var t=e;this.write(t),this._getNext()},r.prototype._handleErrors=function(e){var t=this;e.on("error",(function(e){t._emitError(e)}))},r.prototype.write=function(e){this.emit("data",e)},r.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&"function"==typeof this._currentStream.pause&&this._currentStream.pause(),this.emit("pause"))},r.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&"function"==typeof this._currentStream.resume&&this._currentStream.resume(),this.emit("resume")},r.prototype.end=function(){this._reset(),this.emit("end")},r.prototype.destroy=function(){this._reset(),this.emit("close")},r.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null},r.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}},r.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)},r.prototype._emitError=function(e){this._reset(),this.emit("error",e)},Kh}var am,om,cm,um,lm,dm,pm,fm,hm,mm,gm,ym,bm,vm,wm,xm,_m,Em={},Sm={"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}};function km(){return cm||(cm=1,function(e){var t=om?am:(om=1,am=Sm),n=s.extname,r=/^\s*([^;\s]*)(?:;|\s|$)/,i=/^text\//i;function a(e){if(!e||"string"!=typeof e)return!1;var n=r.exec(e),s=n&&t[n[1].toLowerCase()];return s&&s.charset?s.charset:!(!n||!i.test(n[1]))&&"UTF-8"}e.charset=a,e.charsets={lookup:a},e.contentType=function(t){if(!t||"string"!=typeof t)return!1;var n=-1===t.indexOf("/")?e.lookup(t):t;if(!n)return!1;if(-1===n.indexOf("charset")){var r=e.charset(n);r&&(n+="; charset="+r.toLowerCase())}return n},e.extension=function(t){if(!t||"string"!=typeof t)return!1;var n=r.exec(t),i=n&&e.extensions[n[1].toLowerCase()];if(!i||!i.length)return!1;return i[0]},e.extensions=Object.create(null),e.lookup=function(t){if(!t||"string"!=typeof t)return!1;var r=n("x."+t).toLowerCase().substr(1);if(!r)return!1;return e.types[r]||!1},e.types=Object.create(null),function(e,n){var r=["nginx","apache",void 0,"iana"];Object.keys(t).forEach((function(i){var s=t[i],a=s.extensions;if(a&&a.length){e[i]=a;for(var o=0;o<a.length;o++){var c=a[o];if(n[c]){var u=r.indexOf(t[n[c]].source),l=r.indexOf(s.source);if("application/octet-stream"!==n[c]&&(u>l||u===l&&"application/"===n[c].substr(0,12)))continue}n[c]=i}}}))}(e.extensions,e.types)}(Em)),Em}function Am(){if(pm)return dm;pm=1;var e=lm?um:(lm=1,um=function(e){var t="function"==typeof setImmediate?setImmediate:"object"==typeof process&&"function"==typeof process.nextTick?process.nextTick:null;t?t(e):setTimeout(e,0)});return dm=function(t){var n=!1;return e((function(){n=!0})),function(r,i){n?t(r,i):e((function(){t(r,i)}))}}}function Tm(){if(hm)return fm;function e(e){"function"==typeof this.jobs[e]&&this.jobs[e]()}return hm=1,fm=function(t){Object.keys(t.jobs).forEach(e.bind(t)),t.jobs={}},fm}function Mm(){if(gm)return mm;gm=1;var e=Am(),t=Tm();return mm=function(n,r,i,s){var a=i.keyedList?i.keyedList[i.index]:i.index;i.jobs[a]=function(t,n,r,i){var s;s=2==t.length?t(r,e(i)):t(r,n,e(i));return s}(r,a,n[a],(function(e,n){a in i.jobs&&(delete i.jobs[a],e?t(i):i.results[a]=n,s(e,i.results))}))},mm}function Rm(){if(bm)return ym;return bm=1,ym=function(e,t){var n=!Array.isArray(e),r={index:0,keyedList:n||t?Object.keys(e):null,jobs:{},results:n?{}:[],size:n?Object.keys(e).length:e.length};t&&r.keyedList.sort(n?t:function(n,r){return t(e[n],e[r])});return r}}function Om(){if(wm)return vm;wm=1;var e=Tm(),t=Am();return vm=function(n){if(!Object.keys(this.jobs).length)return;this.index=this.size,e(this),t(n)(null,this.results)}}function Im(){if(_m)return xm;_m=1;var e=Mm(),t=Rm(),n=Om();return xm=function(r,i,s){var a=t(r);for(;a.index<(a.keyedList||r).length;)e(r,i,a,(function(e,t){e?s(e,t):0!==Object.keys(a.jobs).length||s(null,a.results)})),a.index++;return n.bind(a,s)},xm}var Nm,Pm,Cm,jm,Lm,Dm,$m,Um,Bm,zm,qm,Hm,Fm,Ym,Vm,Km,Wm,Gm,Jm,Zm,Xm,Qm,eg,tg,ng,rg,ig,sg,ag,og,cg,ug,lg,dg,pg,fg,hg,mg,gg,yg,bg,vg,wg,xg,_g,Eg,Sg,kg,Ag,Tg,Mg,Rg,Og,Ig,Ng,Pg,Cg,jg,Lg,Dg,$g,Ug,Bg,zg,qg,Hg,Fg,Yg,Vg,Kg,Wg,Gg,Jg,Zg,Xg,Qg,ey,ty,ny,ry,iy,sy={exports:{}};function ay(){if(Nm)return sy.exports;Nm=1;var e=Mm(),t=Rm(),n=Om();function r(e,t){return e<t?-1:e>t?1:0}return sy.exports=function(r,i,s,a){var o=t(r,s);return e(r,i,o,(function t(n,s){n?a(n,s):(o.index++,o.index<(o.keyedList||r).length?e(r,i,o,t):a(null,o.results))})),n.bind(o,a)},sy.exports.ascending=r,sy.exports.descending=function(e,t){return-1*r(e,t)},sy.exports}function oy(){if(Cm)return Pm;Cm=1;var e=ay();return Pm=function(t,n,r){return e(t,n,null,r)},Pm}function cy(){return Lm?jm:(Lm=1,jm={parallel:Im(),serial:oy(),serialOrdered:ay()})}function uy(){return $m?Dm:($m=1,Dm=Object)}function ly(){return Bm?Um:(Bm=1,Um=Error)}function dy(){return qm?zm:(qm=1,zm=EvalError)}function py(){return Fm?Hm:(Fm=1,Hm=RangeError)}function fy(){return Vm?Ym:(Vm=1,Ym=ReferenceError)}function hy(){return Wm?Km:(Wm=1,Km=SyntaxError)}function my(){return Jm?Gm:(Jm=1,Gm=TypeError)}function gy(){return Xm?Zm:(Xm=1,Zm=URIError)}function yy(){return eg?Qm:(eg=1,Qm=Math.abs)}function by(){return ng?tg:(ng=1,tg=Math.floor)}function vy(){return ig?rg:(ig=1,rg=Math.max)}function wy(){return ag?sg:(ag=1,sg=Math.min)}function xy(){return cg?og:(cg=1,og=Math.pow)}function _y(){return lg?ug:(lg=1,ug=Math.round)}function Ey(){return pg?dg:(pg=1,dg=Number.isNaN||function(e){return e!=e})}function Sy(){if(hg)return fg;hg=1;var e=Ey();return fg=function(t){return e(t)||0===t?t:t<0?-1:1}}function ky(){return gg?mg:(gg=1,mg=Object.getOwnPropertyDescriptor)}function Ay(){if(bg)return yg;bg=1;var e=ky();if(e)try{e([],"length")}catch(t){e=null}return yg=e}function Ty(){if(wg)return vg;wg=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch(t){e=!1}return vg=e}function My(){return _g?xg:(_g=1,xg=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(var r in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var i=Object.getOwnPropertySymbols(e);if(1!==i.length||i[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var s=Object.getOwnPropertyDescriptor(e,t);if(42!==s.value||!0!==s.enumerable)return!1}return!0})}function Ry(){if(Sg)return Eg;Sg=1;var e="undefined"!=typeof Symbol&&Symbol,t=My();return Eg=function(){return"function"==typeof e&&("function"==typeof Symbol&&("symbol"==typeof e("foo")&&("symbol"==typeof Symbol("bar")&&t())))}}function Oy(){return Ag?kg:(Ag=1,kg="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null)}function Iy(){return Mg?Tg:(Mg=1,Tg=uy().getPrototypeOf||null)}function Ny(){if(Og)return Rg;Og=1;var e=Object.prototype.toString,t=Math.max,n=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var i=0;i<t.length;i+=1)n[i+e.length]=t[i];return n};return Rg=function(r){var i=this;if("function"!=typeof i||"[object Function]"!==e.apply(i))throw new TypeError("Function.prototype.bind called on incompatible "+i);for(var s,a=function(e,t){for(var n=[],r=t,i=0;r<e.length;r+=1,i+=1)n[i]=e[r];return n}(arguments,1),o=t(0,i.length-a.length),c=[],u=0;u<o;u++)c[u]="$"+u;if(s=Function("binder","return function ("+function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n}(c,",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof s){var e=i.apply(this,n(a,arguments));return Object(e)===e?e:this}return i.apply(r,n(a,arguments))})),i.prototype){var l=function(){};l.prototype=i.prototype,s.prototype=new l,l.prototype=null}return s},Rg}function Py(){if(Ng)return Ig;Ng=1;var e=Ny();return Ig=Function.prototype.bind||e}function Cy(){return Cg?Pg:(Cg=1,Pg=Function.prototype.call)}function jy(){return Lg?jg:(Lg=1,jg=Function.prototype.apply)}function Ly(){if(Bg)return Ug;Bg=1;var e=Py(),t=jy(),n=Cy(),r=$g?Dg:($g=1,Dg="undefined"!=typeof Reflect&&Reflect&&Reflect.apply);return Ug=r||e.call(n,t)}function Dy(){if(Fg)return Hg;Fg=1;var e,t=function(){if(qg)return zg;qg=1;var e=Py(),t=my(),n=Cy(),r=Ly();return zg=function(i){if(i.length<1||"function"!=typeof i[0])throw new t("a function is required");return r(e,n,i)}}(),n=Ay();try{e=[].__proto__===Array.prototype}catch(e){if(!e||"object"!=typeof e||!("code"in e)||"ERR_PROTO_ACCESS"!==e.code)throw e}var r=!!e&&n&&n(Object.prototype,"__proto__"),i=Object,s=i.getPrototypeOf;return Hg=r&&"function"==typeof r.get?t([r.get]):"function"==typeof s&&function(e){return s(null==e?e:i(e))}}function $y(){if(Vg)return Yg;Vg=1;var e=Oy(),t=Iy(),n=Dy();return Yg=e?function(t){return e(t)}:t?function(e){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("getProto: not an object");return t(e)}:n?function(e){return n(e)}:null}function Uy(){if(Wg)return Kg;Wg=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=Py();return Kg=n.call(e,t)}function By(){if(Jg)return Gg;var e;Jg=1;var t=uy(),n=ly(),r=dy(),i=py(),s=fy(),a=hy(),o=my(),c=gy(),u=yy(),l=by(),d=vy(),p=wy(),f=xy(),h=_y(),m=Sy(),g=Function,y=function(e){try{return g('"use strict"; return ('+e+").constructor;")()}catch(e){}},b=Ay(),v=Ty(),w=function(){throw new o},x=b?function(){try{return w}catch(e){try{return b(arguments,"callee").get}catch(e){return w}}}():w,_=Ry()(),E=$y(),S=Iy(),k=Oy(),A=jy(),T=Cy(),M={},R="undefined"!=typeof Uint8Array&&E?E(Uint8Array):e,O={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?e:ArrayBuffer,"%ArrayIteratorPrototype%":_&&E?E([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":M,"%AsyncGenerator%":M,"%AsyncGeneratorFunction%":M,"%AsyncIteratorPrototype%":M,"%Atomics%":"undefined"==typeof Atomics?e:Atomics,"%BigInt%":"undefined"==typeof BigInt?e:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?e:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":n,"%eval%":eval,"%EvalError%":r,"%Float16Array%":"undefined"==typeof Float16Array?e:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?e:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?e:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?e:FinalizationRegistry,"%Function%":g,"%GeneratorFunction%":M,"%Int8Array%":"undefined"==typeof Int8Array?e:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?e:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":_&&E?E(E([][Symbol.iterator]())):e,"%JSON%":"object"==typeof JSON?JSON:e,"%Map%":"undefined"==typeof Map?e:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&_&&E?E((new Map)[Symbol.iterator]()):e,"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":b,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?e:Promise,"%Proxy%":"undefined"==typeof Proxy?e:Proxy,"%RangeError%":i,"%ReferenceError%":s,"%Reflect%":"undefined"==typeof Reflect?e:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?e:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&_&&E?E((new Set)[Symbol.iterator]()):e,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":_&&E?E(""[Symbol.iterator]()):e,"%Symbol%":_?Symbol:e,"%SyntaxError%":a,"%ThrowTypeError%":x,"%TypedArray%":R,"%TypeError%":o,"%Uint8Array%":"undefined"==typeof Uint8Array?e:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?e:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?e:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?e:Uint32Array,"%URIError%":c,"%WeakMap%":"undefined"==typeof WeakMap?e:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?e:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?e:WeakSet,"%Function.prototype.call%":T,"%Function.prototype.apply%":A,"%Object.defineProperty%":v,"%Object.getPrototypeOf%":S,"%Math.abs%":u,"%Math.floor%":l,"%Math.max%":d,"%Math.min%":p,"%Math.pow%":f,"%Math.round%":h,"%Math.sign%":m,"%Reflect.getPrototypeOf%":k};if(E)try{null.error}catch(e){var I=E(E(e));O["%Error.prototype%"]=I}var N=function e(t){var n;if("%AsyncFunction%"===t)n=y("async function () {}");else if("%GeneratorFunction%"===t)n=y("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=y("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&E&&(n=E(i.prototype))}return O[t]=n,n},P={__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"]},C=Py(),j=Uy(),L=C.call(T,Array.prototype.concat),D=C.call(A,Array.prototype.splice),$=C.call(T,String.prototype.replace),U=C.call(T,String.prototype.slice),B=C.call(T,RegExp.prototype.exec),z=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,q=/\\(\\)?/g,H=function(e,t){var n,r=e;if(j(P,r)&&(r="%"+(n=P[r])[0]+"%"),j(O,r)){var i=O[r];if(i===M&&(i=N(r)),void 0===i&&!t)throw new o("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:i}}throw new a("intrinsic "+e+" does not exist!")};return Gg=function(e,t){if("string"!=typeof e||0===e.length)throw new o("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new o('"allowMissing" argument must be a boolean');if(null===B(/^%?[^%]*%?$/,e))throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=function(e){var t=U(e,0,1),n=U(e,-1);if("%"===t&&"%"!==n)throw new a("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new a("invalid intrinsic syntax, expected opening `%`");var r=[];return $(e,z,(function(e,t,n,i){r[r.length]=n?$(i,q,"$1"):t||e})),r}(e),r=n.length>0?n[0]:"",i=H("%"+r+"%",t),s=i.name,c=i.value,u=!1,l=i.alias;l&&(r=l[0],D(n,L([0,1],l)));for(var d=1,p=!0;d<n.length;d+=1){var f=n[d],h=U(f,0,1),m=U(f,-1);if(('"'===h||"'"===h||"`"===h||'"'===m||"'"===m||"`"===m)&&h!==m)throw new a("property names with quotes must have matching quotes");if("constructor"!==f&&p||(u=!0),j(O,s="%"+(r+="."+f)+"%"))c=O[s];else if(null!=c){if(!(f in c)){if(!t)throw new o("base intrinsic for "+e+" exists, but the property is not available.");return}if(b&&d+1>=n.length){var g=b(c,f);c=(p=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:c[f]}else p=j(c,f),c=c[f];p&&!u&&(O[s]=c)}}return c},Gg}function zy(){if(ey)return Qg;ey=1;var e=By()("%Object.defineProperty%",!0),t=function(){if(Xg)return Zg;Xg=1;var e=My();return Zg=function(){return e()&&!!Symbol.toStringTag}}()(),n=Uy(),r=my(),i=t?Symbol.toStringTag:null;return Qg=function(t,s){var a=arguments.length>2&&!!arguments[2]&&arguments[2].force,o=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(void 0!==a&&"boolean"!=typeof a||void 0!==o&&"boolean"!=typeof o)throw new r("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");!i||!a&&n(t,i)||(e?e(t,i,{configurable:!o,enumerable:!1,value:s,writable:!1}):t[i]=s)},Qg}function qy(){return ny||(ny=1,ty=function(e,t){return Object.keys(t).forEach((function(n){e[n]=e[n]||t[n]})),e}),ty}var Hy=function(){if(iy)return ry;iy=1;var e=sm(),t=a,r=s,i=b,o=w,c=P.parse,u=n,l=d.Stream,p=km(),f=cy(),h=zy(),m=qy();function g(t){if(!(this instanceof g))return new g(t);for(var n in this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],e.call(this),t=t||{})this[n]=t[n]}return ry=g,t.inherits(g,e),g.LINE_BREAK="\r\n",g.DEFAULT_CONTENT_TYPE="application/octet-stream",g.prototype.append=function(t,n,r){"string"==typeof(r=r||{})&&(r={filename:r});var i=e.prototype.append.bind(this);if("number"==typeof n&&(n=""+n),Array.isArray(n))this._error(new Error("Arrays are not supported."));else{var s=this._multiPartHeader(t,n,r),a=this._multiPartFooter();i(s),i(n),i(a),this._trackLength(s,n,r)}},g.prototype._trackLength=function(e,t,n){var r=0;null!=n.knownLength?r+=+n.knownLength:Buffer.isBuffer(t)?r=t.length:"string"==typeof t&&(r=Buffer.byteLength(t)),this._valueLength+=r,this._overheadLength+=Buffer.byteLength(e)+g.LINE_BREAK.length,t&&(t.path||t.readable&&Object.prototype.hasOwnProperty.call(t,"httpVersion")||t instanceof l)&&(n.knownLength||this._valuesToMeasure.push(t))},g.prototype._lengthRetriever=function(e,t){Object.prototype.hasOwnProperty.call(e,"fd")?null!=e.end&&e.end!=1/0&&null!=e.start?t(null,e.end+1-(e.start?e.start:0)):u.stat(e.path,(function(n,r){var i;n?t(n):(i=r.size-(e.start?e.start:0),t(null,i))})):Object.prototype.hasOwnProperty.call(e,"httpVersion")?t(null,+e.headers["content-length"]):Object.prototype.hasOwnProperty.call(e,"httpModule")?(e.on("response",(function(n){e.pause(),t(null,+n.headers["content-length"])})),e.resume()):t("Unknown stream")},g.prototype._multiPartHeader=function(e,t,n){if("string"==typeof n.header)return n.header;var r,i=this._getContentDisposition(t,n),s=this._getContentType(t,n),a="",o={"Content-Disposition":["form-data",'name="'+e+'"'].concat(i||[]),"Content-Type":[].concat(s||[])};for(var c in"object"==typeof n.header&&m(o,n.header),o)if(Object.prototype.hasOwnProperty.call(o,c)){if(null==(r=o[c]))continue;Array.isArray(r)||(r=[r]),r.length&&(a+=c+": "+r.join("; ")+g.LINE_BREAK)}return"--"+this.getBoundary()+g.LINE_BREAK+a+g.LINE_BREAK},g.prototype._getContentDisposition=function(e,t){var n,i;return"string"==typeof t.filepath?n=r.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e.name||e.path?n=r.basename(t.filename||e.name||e.path):e.readable&&Object.prototype.hasOwnProperty.call(e,"httpVersion")&&(n=r.basename(e.client._httpMessage.path||"")),n&&(i='filename="'+n+'"'),i},g.prototype._getContentType=function(e,t){var n=t.contentType;return!n&&e.name&&(n=p.lookup(e.name)),!n&&e.path&&(n=p.lookup(e.path)),!n&&e.readable&&Object.prototype.hasOwnProperty.call(e,"httpVersion")&&(n=e.headers["content-type"]),n||!t.filepath&&!t.filename||(n=p.lookup(t.filepath||t.filename)),n||"object"!=typeof e||(n=g.DEFAULT_CONTENT_TYPE),n},g.prototype._multiPartFooter=function(){return function(e){var t=g.LINE_BREAK;0===this._streams.length&&(t+=this._lastBoundary()),e(t)}.bind(this)},g.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+g.LINE_BREAK},g.prototype.getHeaders=function(e){var t,n={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t.toLowerCase()]=e[t]);return n},g.prototype.setBoundary=function(e){this._boundary=e},g.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary},g.prototype.getBuffer=function(){for(var e=new Buffer.alloc(0),t=this.getBoundary(),n=0,r=this._streams.length;n<r;n++)"function"!=typeof this._streams[n]&&(e=Buffer.isBuffer(this._streams[n])?Buffer.concat([e,this._streams[n]]):Buffer.concat([e,Buffer.from(this._streams[n])]),"string"==typeof this._streams[n]&&this._streams[n].substring(2,t.length+2)===t||(e=Buffer.concat([e,Buffer.from(g.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])},g.prototype._generateBoundary=function(){for(var e="--------------------------",t=0;t<24;t++)e+=Math.floor(10*Math.random()).toString(16);this._boundary=e},g.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},g.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e},g.prototype.getLength=function(e){var t=this._overheadLength+this._valueLength;this._streams.length&&(t+=this._lastBoundary().length),this._valuesToMeasure.length?f.parallel(this._valuesToMeasure,this._lengthRetriever,(function(n,r){n?e(n):(r.forEach((function(e){t+=e})),e(null,t))})):process.nextTick(e.bind(this,null,t))},g.prototype.submit=function(e,t){var n,r,s={method:"post"};return"string"==typeof e?(e=c(e),r=m({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},s)):(r=m(e,s)).port||(r.port="https:"==r.protocol?443:80),r.headers=this.getHeaders(e.headers),n="https:"==r.protocol?o.request(r):i.request(r),this.getLength(function(e,r){if(e&&"Unknown stream"!==e)this._error(e);else if(r&&n.setHeader("Content-Length",r),this.pipe(n),t){var i,s=function(e,r){return n.removeListener("error",s),n.removeListener("response",i),t.call(this,e,r)};i=s.bind(this,null),n.on("error",s),n.on("response",i)}}.bind(this)),n},g.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))},g.prototype.toString=function(){return"[object FormData]"},h(g,"FormData"),ry}(),Fy=we(Hy);const Yy={httpAdapterURL:"https://worker01-prod.truebit.network/http-adapter/",hubURL:"https://run.truebit.network/",defaultLanguage:"rs",privateKey:"",address:"",blockchainEnv:"production",eula:"",RPC_URL:""},Vy={httpAdapterURL:"http://localhost:3000/",hubURL:"http://localhost:5000/",defaultLanguage:"rs",privateKey:"",address:"",blockchainEnv:"local",eula:"",RPC_URL:""},Ky={httpAdapterURL:"http://localhost:3000/",hubURL:"http://localhost:5000/",defaultLanguage:"rs",privateKey:"",address:"",blockchainEnv:"testnet",eula:"",RPC_URL:""},Wy={httpAdapterURL:"https://worker01-staging.truebit.network/http-adapter/",hubURL:"https://staging.truebit.network/",defaultLanguage:"rs",privateKey:"",address:"",blockchainEnv:"staging",eula:"",RPC_URL:""},Gy={httpAdapterURL:"https://worker-02.go.truebit.network/http-adapter/",hubURL:"https://go.truebit.network/",defaultLanguage:"rs",privateKey:"",address:"",blockchainEnv:"early-access",eula:"",RPC_URL:""};function Jy(){let e=Yy;return"local"===process.env.TRUEBIT_ENV?e=Vy:"staging"===process.env.TRUEBIT_ENV?e=Wy:"testnet"===process.env.TRUEBIT_ENV?e=Ky:"early-access"===process.env.TRUEBIT_ENV&&(e=Gy),e}function Zy(){const e=Qy(),n=i.join(e,".truebit","secret.json");if(!t.existsSync(n))return null;const r=t.readFileSync(n,{encoding:"utf8"});try{return JSON.parse(r)}catch(e){return console.error("Error parsing secret config file:",e),null}}function Xy(e){const n=Qy(),r=i.join(n,".truebit","secret.json");if(!t.existsSync(r))return;const s=t.readFileSync(r,{encoding:"utf8"});try{const n={...JSON.parse(s),...e};t.writeFileSync(r,JSON.stringify(n,null,2),{encoding:"utf8"})}catch(e){console.error("Error updating secret config file:",e)}}function Qy(){return process.env.TRUEBIT_PATH||(process.env.TRUEBIT_PATH=u.homedir()),process.env.TRUEBIT_PATH}function eb(e){const t=Zy();return t&&e in t?t[e]:void 0}function tb(){const e=Zy();if(!e)return void console.error("Secret config file does not exist.");let t=!1;const n=["privateKey","address"];for(const r of n)r in e||(e[r]="",t=!0);const r=["httpAdapterURL","hubURL","defaultLanguage","blockchainEnv"];for(const n of r)n in e&&""!==e[n]||(e[n]=Jy()[n],t=!0);t&&(Xy(e),console.log("Configuration has been updated with default values for missing properties."))}class nb{static EULA_TERMS_LINK="https://truebit.io/terms/";static SETUP_INTRODUCTION=`\nYour all-in-one solution to develop, build, test, and deploy tasks seamlessly.\nLet's get started by setting up your account and configuring your wallet.\nWe'll guide you through each step to ensure a smooth experience.\n\n${C.bold("**Important: Private Key Information")}\n\nTruebit Verify employs a private key system to secure your account:\n\n - A unique private key will be automatically generated for you.\n - This key serves as your secure identifier within Truebit Verify.\n - It's used internally to authenticate your actions.\n - You won't need to manage this key directly.\n\nWe are committed to ensuring the security of your private key and safeguarding your account.\nReady to begin?`;static SETUP_INTRODUCTION_NO_ACCEPTANCE=`\n${C.bold("Account Setup Required")}\n\nYou need an account to access platform features.\n\n${C.bold("To get started:")}\n\n 1. Run the setup command: $ truebit setup\n 2. Follow the prompts to create your account.\n 3. Once setup is complete, you'll have full access to all Truebit Verify features.\n\n${C.bold("Need assistance?")}\nUse the 'truebit -h' command for more information.`;static SETUP_STEP1=`\n${C.bold("Step 1: Create an Account")}\n\nIt appears you're a new user without a wallet configured locally.\n\nWould you like to create a new wallet now?`;static SETUP_STEP1_SCENARIO1_P1=`\nYour configuration file has been detected and will not be overwritten.\nTo make any modifications, edit the file located at: ${Qy()}/.truebit/secret.json\n\nEnsure this file is kept secure, as it contains your credentials for using Truebit Verify.`;static SETUP_STEP1_SCENARIO1_P2(e){return`\nYour account setup appears to be complete.\n\nAccount Details:\n\n - Name: ${e.name}\n - Email: ${e.email}\n - Company: ${e.company}\n - Job Description: ${e.jobDescription}\n - Wallet Address: ${e.walletAddress}\n - Namespace: ${e.defaultNamespace} // API Key: ${e.defaultApiKey}\n\nRun 'truebit -h' to explore available commands and start your journey.`}static SETUP_STEP1_SCENARIO2(e){return`\nYour new wallet address is: ${e}\n\nYour wallet information has been securely stored in ${Qy()}/.truebit/secret.json\nPlease keep this file safe, as it contains your credentials for using Truebit Verify.`}static SETUP_STEP1_SCENARIO3=`\n${C.bold("(!) Important Notice (!)")}\n\nYou’ve chosen not to create a new wallet at this time.\n\n - A wallet is required for full access to Truebit Verify features.\n - Without a wallet, your functionality on the platform will be limited.\n - You can create a wallet at any time by running the truebit setup command again.\n\nRun 'truebit setup' to get started.`;static SETUP_STEP2_SCENARIO3_P1=`\n${C.bold("Step 2: Create an Account")}\n\nYour wallet is now set up. Let's proceed with creating your Truebit Verify account.\n\nPlease provide the following information:`;static SETUP_STEP2_SCENARIO3_P2(e,t,n,r){return`\n${C.bold("Account Registration Complete")}\n\nThanks for registering with Truebit Verify!\n\nCongratulations! Your Truebit Verify account has been successfully created.\n\nAccount Summary:\n\n ${C.bold("- Name: ")+e.fullNameAnswer}\n ${C.bold("- Email: ")+e.emailAddressAnswer}\n ${C.bold("- Company: ")+e.companyNameAnswer}\n ${C.bold("- Job Description: ")+e.jobPositionAnswer}\n ${C.bold("- Wallet Address: ")+t}\n ${C.bold("- Namespace: ")+n} // ${C.bold("API Key: ")+r}\n\nRun 'truebit -h' to begin your journey.`}static SETUP_STEP2_UNHANDLED_ERROR=C.bold("\nSomething went wrong with the user registration:\n \nAccount registration interrupted.\n\nPlease run 'truebit setup' again.");static EULA_INSTALLATION=`\nWelcome to Truebit Verify!\n\nBefore completing your Truebit Verify installation, you must review the Terms of Use at: ${nb.EULA_TERMS_LINK}`;static EULA_INSTALLATION_NO_ACCEPTED="Installation cancelled because you have not accepted the Terms of Use.";static EULA_REGISTRATION_NO_ACCEPTED=`\n${C.bold("(!) Important Notice (!)")}\n\nYou’ve chosen not to accept the End User License Agreement (EULA) at this time.\n\n - Accepting the EULA is required for full access to Truebit Verify features.\n\nRun 'truebit setup' to get started`;static USER_NO_REGISTERED="You need to set up your Truebit Verify account to access platform features.\n\nTo get started:\n\n 1. Run the setup command: $ truebit setup\n 2. Follow the prompts to create your account.\n 3. Once setup is complete, you'll have full access to all Truebit Verify features.\n\nNeed assistance?\nUse the 'truebit -h' command for additional information."}async function rb(){const e=eb("hubURL");if(e)return A.create({headers:{Connection:"keep-alive"},httpAgent:new v({keepAlive:!0}),httpsAgent:new x({keepAlive:!0}),baseURL:e,timeout:12e4,maxContentLength:1/0,maxBodyLength:1/0});throw nb.USER_NO_REGISTERED}async function ib(){const e=eb("httpAdapterURL");if(e)return A.create({headers:{Connection:"keep-alive"},httpAgent:new v({keepAlive:!0}),httpsAgent:new x({keepAlive:!0}),baseURL:e,timeout:12e4,maxContentLength:1/0,maxBodyLength:1/0});throw nb.USER_NO_REGISTERED}var sb,ab={},ob={};function cb(){return sb||(sb=1,ob.toString=function(e){switch(e){case 1:return"A";case 10:return"NULL";case 28:return"AAAA";case 18:return"AFSDB";case 42:return"APL";case 257:return"CAA";case 60:return"CDNSKEY";case 59:return"CDS";case 37:return"CERT";case 5:return"CNAME";case 49:return"DHCID";case 32769:return"DLV";case 39:return"DNAME";case 48:return"DNSKEY";case 43:return"DS";case 55:return"HIP";case 13:return"HINFO";case 45:return"IPSECKEY";case 25:return"KEY";case 36:return"KX";case 29:return"LOC";case 15:return"MX";case 35:return"NAPTR";case 2:return"NS";case 47:return"NSEC";case 50:return"NSEC3";case 51:return"NSEC3PARAM";case 12:return"PTR";case 46:return"RRSIG";case 17:return"RP";case 24:return"SIG";case 6:return"SOA";case 99:return"SPF";case 33:return"SRV";case 44:return"SSHFP";case 32768:return"TA";case 249:return"TKEY";case 52:return"TLSA";case 250:return"TSIG";case 16:return"TXT";case 252:return"AXFR";case 251:return"IXFR";case 41:return"OPT";case 255:return"ANY"}return"UNKNOWN_"+e},ob.toType=function(e){switch(e.toUpperCase()){case"A":return 1;case"NULL":return 10;case"AAAA":return 28;case"AFSDB":return 18;case"APL":return 42;case"CAA":return 257;case"CDNSKEY":return 60;case"CDS":return 59;case"CERT":return 37;case"CNAME":return 5;case"DHCID":return 49;case"DLV":return 32769;case"DNAME":return 39;case"DNSKEY":return 48;case"DS":return 43;case"HIP":return 55;case"HINFO":return 13;case"IPSECKEY":return 45;case"KEY":return 25;case"KX":return 36;case"LOC":return 29;case"MX":return 15;case"NAPTR":return 35;case"NS":return 2;case"NSEC":return 47;case"NSEC3":return 50;case"NSEC3PARAM":return 51;case"PTR":return 12;case"RRSIG":return 46;case"RP":return 17;case"SIG":return 24;case"SOA":return 6;case"SPF":return 99;case"SRV":return 33;case"SSHFP":return 44;case"TA":return 32768;case"TKEY":return 249;case"TLSA":return 52;case"TSIG":return 250;case"TXT":return 16;case"AXFR":return 252;case"IXFR":return 251;case"OPT":return 41;case"ANY":case"*":return 255}return e.toUpperCase().startsWith("UNKNOWN_")?parseInt(e.slice(8)):0}),ob}var ub,lb={};function db(){return ub||(ub=1,lb.toString=function(e){switch(e){case 0:return"NOERROR";case 1:return"FORMERR";case 2:return"SERVFAIL";case 3:return"NXDOMAIN";case 4:return"NOTIMP";case 5:return"REFUSED";case 6:return"YXDOMAIN";case 7:return"YXRRSET";case 8:return"NXRRSET";case 9:return"NOTAUTH";case 10:return"NOTZONE";case 11:return"RCODE_11";case 12:return"RCODE_12";case 13:return"RCODE_13";case 14:return"RCODE_14";case 15:return"RCODE_15"}return"RCODE_"+e},lb.toRcode=function(e){switch(e.toUpperCase()){case"NOERROR":return 0;case"FORMERR":return 1;case"SERVFAIL":return 2;case"NXDOMAIN":return 3;case"NOTIMP":return 4;case"REFUSED":return 5;case"YXDOMAIN":return 6;case"YXRRSET":return 7;case"NXRRSET":return 8;case"NOTAUTH":return 9;case"NOTZONE":return 10;case"RCODE_11":return 11;case"RCODE_12":return 12;case"RCODE_13":return 13;case"RCODE_14":return 14;case"RCODE_15":return 15}return 0}),lb}var pb,fb={};function hb(){return pb||(pb=1,fb.toString=function(e){switch(e){case 0:return"QUERY";case 1:return"IQUERY";case 2:return"STATUS";case 3:return"OPCODE_3";case 4:return"NOTIFY";case 5:return"UPDATE";case 6:return"OPCODE_6";case 7:return"OPCODE_7";case 8:return"OPCODE_8";case 9:return"OPCODE_9";case 10:return"OPCODE_10";case 11:return"OPCODE_11";case 12:return"OPCODE_12";case 13:return"OPCODE_13";case 14:return"OPCODE_14";case 15:return"OPCODE_15"}return"OPCODE_"+e},fb.toOpcode=function(e){switch(e.toUpperCase()){case"QUERY":return 0;case"IQUERY":return 1;case"STATUS":return 2;case"OPCODE_3":return 3;case"NOTIFY":return 4;case"UPDATE":return 5;case"OPCODE_6":return 6;case"OPCODE_7":return 7;case"OPCODE_8":return 8;case"OPCODE_9":return 9;case"OPCODE_10":return 10;case"OPCODE_11":return 11;case"OPCODE_12":return 12;case"OPCODE_13":return 13;case"OPCODE_14":return 14;case"OPCODE_15":return 15}return 0}),fb}var mb,gb={};function yb(){return mb||(mb=1,gb.toString=function(e){switch(e){case 1:return"IN";case 2:return"CS";case 3:return"CH";case 4:return"HS";case 255:return"ANY"}return"UNKNOWN_"+e},gb.toClass=function(e){switch(e.toUpperCase()){case"IN":return 1;case"CS":return 2;case"CH":return 3;case"HS":return 4;case"ANY":return 255}return 0}),gb}var bb,vb={};function wb(){return bb||(bb=1,vb.toString=function(e){switch(e){case 1:return"LLQ";case 2:return"UL";case 3:return"NSID";case 5:return"DAU";case 6:return"DHU";case 7:return"N3U";case 8:return"CLIENT_SUBNET";case 9:return"EXPIRE";case 10:return"COOKIE";case 11:return"TCP_KEEPALIVE";case 12:return"PADDING";case 13:return"CHAIN";case 14:return"KEY_TAG";case 26946:return"DEVICEID"}return e<0?null:`OPTION_${e}`},vb.toCode=function(e){if("number"==typeof e)return e;if(!e)return-1;switch(e.toUpperCase()){case"OPTION_0":return 0;case"LLQ":return 1;case"UL":return 2;case"NSID":return 3;case"OPTION_4":return 4;case"DAU":return 5;case"DHU":return 6;case"N3U":return 7;case"CLIENT_SUBNET":return 8;case"EXPIRE":return 9;case"COOKIE":return 10;case"TCP_KEEPALIVE":return 11;case"PADDING":return 12;case"CHAIN":return 13;case"KEY_TAG":return 14;case"DEVICEID":return 26946;case"OPTION_65535":return 65535}const t=e.match(/_(\d+)$/);return t?parseInt(t[1],10):-1}),vb}var xb,_b,Eb,Sb,kb={exports:{}};function Ab(){return _b||(_b=1,function(e){const t=p.Buffer,n=cb(),r=db(),i=hb(),s=yb(),a=wb(),o=(xb||(xb=1,function(e){var t=function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.decode=function(e,t,n){if(t=~~t,(n=n||e.length-t)===r.size)return r.decode(e,t,n);if(n===i.size)return i.decode(e,t,n);throw Error(`Invalid buffer size needs to be ${r.size} for v4 or ${i.size} for v6.`)},e.encode=function(e,t,n){n=~~n;const a=s(e);return"function"==typeof t&&(t=t(n+a)),a===r.size?r.encode(e,t,n):i.encode(e,t,n)},e.familyOf=function(e){return s(e)===r.size?1:2},e.name=void 0,e.sizeOf=s,e.v6=e.v4=void 0;const t=/^(\d{1,3}\.){3,3}\d{1,3}$/,n=/^(::)?(((\d{1,3}\.){3}(\d{1,3}){1})?([0-9a-f]){0,4}:{0,2}){1,8}(::)?$/i,r={name:"v4",size:4,isFormat:e=>t.test(e),encode(e,t,n){n=~~n,t=t||new Uint8Array(n+4);const r=e.length;let i=0;for(let s=0;s<r;){const r=e.charCodeAt(s++);46===r?(t[n++]=i,i=0):i=10*i+(r-48)}return t[n]=i,t},decode:(e,t)=>(t=~~t,`${e[t++]}.${e[t++]}.${e[t++]}.${e[t]}`)};e.v4=r;const i={name:"v6",size:16,isFormat:e=>e.length>0&&n.test(e),encode(e,t,n){let r=16+(n=~~n),i=-1,s=0,a=0,o=!0,c=!1;t=t||new Uint8Array(n+16);for(let u=0;u<e.length;u++){let l=e.charCodeAt(u);58===l?(o?-1!==i?(n<r&&(t[n]=0),n<r-1&&(t[n+1]=0),n+=2):n<r&&(i=n):(!0===c?(n<r&&(t[n]=a),n++):(n<r&&(t[n]=s>>8),n<r-1&&(t[n+1]=255&s),n+=2),s=0,a=0),o=!0,c=!1):46===l?(n<r&&(t[n]=a),n++,a=0,s=0,o=!1,c=!0):(o=!1,l>=97?l-=87:l>=65?l-=55:(l-=48,a=10*a+l),s=(s<<4)+l)}if(!1===o)!0===c?(n<r&&(t[n]=a),n++):(n<r&&(t[n]=s>>8),n<r-1&&(t[n+1]=255&s),n+=2);else if(0===i)n<r&&(t[n]=0),n<r-1&&(t[n+1]=0),n+=2;else if(-1!==i){n+=2;for(let e=Math.min(n-1,r-1);e>=i+2;e--)t[e]=t[e-2];t[i]=0,t[i+1]=0,i=n}if(i!==n&&-1!==i)for(n>r-2&&(n=r-2);r>i;)t[--r]=n<r&&n>i?t[--n]:0;else for(;n<r;)t[n++]=0;return t},decode(e,t){t=~~t;let n="";for(let r=0;r<16;r+=2)0!==r&&(n+=":"),n+=(e[t+r]<<8|e[t+r+1]).toString(16);return n.replace(/(^|:)0(:0)*:0(:|$)/,"$1::$3").replace(/:{3,4}/,"::")}};function s(e){if(r.isFormat(e))return r.size;if(i.isFormat(e))return i.size;throw Error(`Invalid ip address: ${e}`)}return e.v6=i,e.name="ip","default"in e?e.default:e}({});e.exports=t}(kb)),kb.exports),c=e.name={};c.encode=function(e,n,r,{mail:i=!1}={}){n||(n=t.alloc(c.encodingLength(e))),r||(r=0);const s=r,a=e.replace(/^\.|\.$/gm,"");if(a.length){let e=[];if(i){let t="";a.split(".").forEach((n=>{n.endsWith("\\")?t+=(t.length?".":"")+n.slice(0,-1):0===e.length&&t.length?e.push(t+"."+n):e.push(n)}))}else e=a.split(".");for(let t=0;t<e.length;t++){const i=n.write(e[t],r+1);n[r]=i,r+=i+1}}return n[r++]=0,c.encode.bytes=r-s,n},c.encode.bytes=0,c.decode=function(e,t,{mail:n=!1}={}){t||(t=0);const r=[];let i=t,s=0,a=0,o=!1;for(;;){if(t>=e.length)throw new Error("Cannot decode name (buffer overflow)");const c=e[t++];if(a+=o?0:1,0===c)break;if(192&c){if(192&~c)throw new Error("Cannot decode name (bad label)");{if(t+1>e.length)throw new Error("Cannot decode name (buffer overflow)");const n=e.readUInt16BE(t-1)-49152;if(n>=i)throw new Error("Cannot decode name (bad pointer)");t=n,i=n,a+=o?0:1,o=!0}}else{if(t+c>e.length)throw new Error("Cannot decode name (buffer overflow)");if(s+=c+1,s>254)throw new Error("Cannot decode name (name too long)");let i=e.toString("utf-8",t,t+c);n&&(i=i.replace(/\./g,"\\.")),r.push(i),t+=c,a+=o?0:c}}return c.decode.bytes=a,0===r.length?".":r.join(".")},c.decode.bytes=0,c.encodingLength=function(e){return"."===e||".."===e?1:t.byteLength(e.replace(/^\.|\.$/gm,""))+2};const u={encode:function(e,n,r){n||(n=t.alloc(u.encodingLength(e))),r||(r=0);const i=n.write(e,r+1);return n[r]=i,u.encode.bytes=i+1,n}};u.encode.bytes=0,u.decode=function(e,t){t||(t=0);const n=e[t],r=e.toString("utf-8",t+1,t+1+n);return u.decode.bytes=n+1,r},u.decode.bytes=0,u.encodingLength=function(e){return t.byteLength(e)+1};const l={encode:function(e,t,n){t||(t=l.encodingLength(e)),n||(n=0);const r=32767&(e.flags||0),i="response"===e.type?32768:0;return t.writeUInt16BE(e.id||0,n),t.writeUInt16BE(r|i,n+2),t.writeUInt16BE(e.questions.length,n+4),t.writeUInt16BE(e.answers.length,n+6),t.writeUInt16BE(e.authorities.length,n+8),t.writeUInt16BE(e.additionals.length,n+10),t}};l.encode.bytes=12,l.decode=function(e,t){if(t||(t=0),e.length<12)throw new Error("Header must be 12 bytes");const n=e.readUInt16BE(t+2);return{id:e.readUInt16BE(t),type:32768&n?"response":"query",flags:32767&n,flag_qr:1==(n>>15&1),opcode:i.toString(n>>11&15),flag_aa:1==(n>>10&1),flag_tc:1==(n>>9&1),flag_rd:1==(n>>8&1),flag_ra:1==(n>>7&1),flag_z:1==(n>>6&1),flag_ad:1==(n>>5&1),flag_cd:1==(n>>4&1),rcode:r.toString(15&n),questions:new Array(e.readUInt16BE(t+4)),answers:new Array(e.readUInt16BE(t+6)),authorities:new Array(e.readUInt16BE(t+8)),additionals:new Array(e.readUInt16BE(t+10))}},l.decode.bytes=12,l.encodingLength=function(){return 12};const d=e.unknown={};d.encode=function(e,n,r){return n||(n=t.alloc(d.encodingLength(e))),r||(r=0),n.writeUInt16BE(e.length,r),e.copy(n,r+2),d.encode.bytes=e.length+2,n},d.encode.bytes=0,d.decode=function(e,t){t||(t=0);const n=e.readUInt16BE(t),r=e.slice(t+2,t+2+n);return d.decode.bytes=n+2,r},d.decode.bytes=0,d.encodingLength=function(e){return e.length+2};const f=e.ns={};f.encode=function(e,n,r){return n||(n=t.alloc(f.encodingLength(e))),r||(r=0),c.encode(e,n,r+2),n.writeUInt16BE(c.encode.bytes,r),f.encode.bytes=c.encode.bytes+2,n},f.encode.bytes=0,f.decode=function(e,t){t||(t=0);const n=e.readUInt16BE(t),r=c.decode(e,t+2);return f.decode.bytes=n+2,r},f.decode.bytes=0,f.encodingLength=function(e){return c.encodingLength(e)+2};const h=e.soa={};h.encode=function(e,n,r){n||(n=t.alloc(h.encodingLength(e))),r||(r=0);const i=r;return r+=2,c.encode(e.mname,n,r),r+=c.encode.bytes,c.encode(e.rname,n,r,{mail:!0}),r+=c.encode.bytes,n.writeUInt32BE(e.serial||0,r),r+=4,n.writeUInt32BE(e.refresh||0,r),r+=4,n.writeUInt32BE(e.retry||0,r),r+=4,n.writeUInt32BE(e.expire||0,r),r+=4,n.writeUInt32BE(e.minimum||0,r),r+=4,n.writeUInt16BE(r-i-2,i),h.encode.bytes=r-i,n},h.encode.bytes=0,h.decode=function(e,t){t||(t=0);const n=t,r={};return t+=2,r.mname=c.decode(e,t),t+=c.decode.bytes,r.rname=c.decode(e,t,{mail:!0}),t+=c.decode.bytes,r.serial=e.readUInt32BE(t),t+=4,r.refresh=e.readUInt32BE(t),t+=4,r.retry=e.readUInt32BE(t),t+=4,r.expire=e.readUInt32BE(t),t+=4,r.minimum=e.readUInt32BE(t),t+=4,h.decode.bytes=t-n,r},h.decode.bytes=0,h.encodingLength=function(e){return 22+c.encodingLength(e.mname)+c.encodingLength(e.rname)};const m=e.txt={};m.encode=function(e,n,r){Array.isArray(e)||(e=[e]);for(let n=0;n<e.length;n++)if("string"==typeof e[n]&&(e[n]=t.from(e[n])),!t.isBuffer(e[n]))throw new Error("Must be a Buffer");n||(n=t.alloc(m.encodingLength(e))),r||(r=0);const i=r;return r+=2,e.forEach((function(e){n[r++]=e.length,e.copy(n,r,0,e.length),r+=e.length})),n.writeUInt16BE(r-i-2,i),m.encode.bytes=r-i,n},m.encode.bytes=0,m.decode=function(e,t){t||(t=0);const n=t;let r=e.readUInt16BE(t);t+=2;let i=[];for(;r>0;){const n=e[t++];if(--r,r<n)throw new Error("Buffer overflow");i.push(e.slice(t,t+n)),t+=n,r-=n}return m.decode.bytes=t-n,i},m.decode.bytes=0,m.encodingLength=function(e){Array.isArray(e)||(e=[e]);let n=2;return e.forEach((function(e){n+="string"==typeof e?t.byteLength(e)+1:e.length+1})),n};const g=e.null={};g.encode=function(e,n,r){n||(n=t.alloc(g.encodingLength(e))),r||(r=0),"string"==typeof e&&(e=t.from(e)),e||(e=t.alloc(0));const i=r;r+=2;const s=e.length;return e.copy(n,r,0,s),r+=s,n.writeUInt16BE(r-i-2,i),g.encode.bytes=r-i,n},g.encode.bytes=0,g.decode=function(e,t){t||(t=0);const n=t,r=e.readUInt16BE(t);t+=2;const i=e.slice(t,t+r);return t+=r,g.decode.bytes=t-n,i},g.decode.bytes=0,g.encodingLength=function(e){return e?(t.isBuffer(e)?e.length:t.byteLength(e))+2:2};const y=e.hinfo={};y.encode=function(e,n,r){n||(n=t.alloc(y.encodingLength(e))),r||(r=0);const i=r;return r+=2,u.encode(e.cpu,n,r),r+=u.encode.bytes,u.encode(e.os,n,r),r+=u.encode.bytes,n.writeUInt16BE(r-i-2,i),y.encode.bytes=r-i,n},y.encode.bytes=0,y.decode=function(e,t){t||(t=0);const n=t,r={};return t+=2,r.cpu=u.decode(e,t),t+=u.decode.bytes,r.os=u.decode(e,t),t+=u.decode.bytes,y.decode.bytes=t-n,r},y.decode.bytes=0,y.encodingLength=function(e){return u.encodingLength(e.cpu)+u.encodingLength(e.os)+2};const b=e.ptr={},v=e.cname=b,w=e.dname=b;b.encode=function(e,n,r){return n||(n=t.alloc(b.encodingLength(e))),r||(r=0),c.encode(e,n,r+2),n.writeUInt16BE(c.encode.bytes,r),b.encode.bytes=c.encode.bytes+2,n},b.encode.bytes=0,b.decode=function(e,t){t||(t=0);const n=c.decode(e,t+2);return b.decode.bytes=c.decode.bytes+2,n},b.decode.bytes=0,b.encodingLength=function(e){return c.encodingLength(e)+2};const x=e.srv={};x.encode=function(e,n,r){n||(n=t.alloc(x.encodingLength(e))),r||(r=0),n.writeUInt16BE(e.priority||0,r+2),n.writeUInt16BE(e.weight||0,r+4),n.writeUInt16BE(e.port||0,r+6),c.encode(e.target,n,r+8);const i=c.encode.bytes+6;return n.writeUInt16BE(i,r),x.encode.bytes=i+2,n},x.encode.bytes=0,x.decode=function(e,t){t||(t=0);const n=e.readUInt16BE(t),r={};return r.priority=e.readUInt16BE(t+2),r.weight=e.readUInt16BE(t+4),r.port=e.readUInt16BE(t+6),r.target=c.decode(e,t+8),x.decode.bytes=n+2,r},x.decode.bytes=0,x.encodingLength=function(e){return 8+c.encodingLength(e.target)};const _=e.caa={};_.ISSUER_CRITICAL=128,_.encode=function(e,n,r){const i=_.encodingLength(e);return n||(n=t.alloc(_.encodingLength(e))),r||(r=0),e.issuerCritical&&(e.flags=_.ISSUER_CRITICAL),n.writeUInt16BE(i-2,r),r+=2,n.writeUInt8(e.flags||0,r),r+=1,u.encode(e.tag,n,r),r+=u.encode.bytes,n.write(e.value,r),r+=t.byteLength(e.value),_.encode.bytes=i,n},_.encode.bytes=0,_.decode=function(e,t){t||(t=0);const n=e.readUInt16BE(t),r=t+=2,i={};return i.flags=e.readUInt8(t),t+=1,i.tag=u.decode(e,t),t+=u.decode.bytes,i.value=e.toString("utf-8",t,r+n),i.issuerCritical=!!(i.flags&_.ISSUER_CRITICAL),_.decode.bytes=n+2,i},_.decode.bytes=0,_.encodingLength=function(e){return u.encodingLength(e.tag)+u.encodingLength(e.value)+2};const E=e.mx={};E.encode=function(e,n,r){n||(n=t.alloc(E.encodingLength(e))),r||(r=0);const i=r;return r+=2,n.writeUInt16BE(e.preference||0,r),r+=2,c.encode(e.exchange,n,r),r+=c.encode.bytes,n.writeUInt16BE(r-i-2,i),E.encode.bytes=r-i,n},E.encode.bytes=0,E.decode=function(e,t){t||(t=0);const n=t,r={};return t+=2,r.preference=e.readUInt16BE(t),t+=2,r.exchange=c.decode(e,t),t+=c.decode.bytes,E.decode.bytes=t-n,r},E.encodingLength=function(e){return 4+c.encodingLength(e.exchange)};const S=e.a={};S.encode=function(e,n,r){return n||(n=t.alloc(S.encodingLength(e))),r||(r=0),n.writeUInt16BE(4,r),r+=2,o.v4.encode(e,n,r),S.encode.bytes=6,n},S.encode.bytes=0,S.decode=function(e,t){t||(t=0),t+=2;const n=o.v4.decode(e,t);return S.decode.bytes=6,n},S.decode.bytes=0,S.encodingLength=function(){return 6};const k=e.aaaa={};k.encode=function(e,n,r){return n||(n=t.alloc(k.encodingLength(e))),r||(r=0),n.writeUInt16BE(16,r),r+=2,o.v6.encode(e,n,r),k.encode.bytes=18,n},k.encode.bytes=0,k.decode=function(e,t){t||(t=0),t+=2;const n=o.v6.decode(e,t);return k.decode.bytes=18,n},k.decode.bytes=0,k.encodingLength=function(){return 18};const A=e.option={};A.encode=function(e,n,r){n||(n=t.alloc(A.encodingLength(e))),r||(r=0);const i=r,s=a.toCode(e.code);if(n.writeUInt16BE(s,r),r+=2,e.data)n.writeUInt16BE(e.data.length,r),r+=2,e.data.copy(n,r),r+=e.data.length;else switch(s){case 8:const i=e.sourcePrefixLength||0,s=e.family||o.familyOf(e.ip),a=o.encode(e.ip,t.alloc),c=Math.ceil(i/8);n.writeUInt16BE(c+4,r),r+=2,n.writeUInt16BE(s,r),r+=2,n.writeUInt8(i,r++),n.writeUInt8(e.scopePrefixLength||0,r++),a.copy(n,r,0,c),r+=c;break;case 11:e.timeout?(n.writeUInt16BE(2,r),r+=2,n.writeUInt16BE(e.timeout,r),r+=2):(n.writeUInt16BE(0,r),r+=2);break;case 12:const u=e.length||0;n.writeUInt16BE(u,r),r+=2,n.fill(0,r,r+u),r+=u;break;case 14:const l=2*e.tags.length;n.writeUInt16BE(l,r),r+=2;for(const t of e.tags)n.writeUInt16BE(t,r),r+=2;break;default:throw new Error(`Unknown roption code: ${e.code}`)}return A.encode.bytes=r-i,n},A.encode.bytes=0,A.decode=function(e,n){n||(n=0);const r={};r.code=e.readUInt16BE(n),r.type=a.toString(r.code),n+=2;const i=e.readUInt16BE(n);switch(n+=2,r.data=e.slice(n,n+i),r.code){case 8:r.family=e.readUInt16BE(n),n+=2,r.sourcePrefixLength=e.readUInt8(n++),r.scopePrefixLength=e.readUInt8(n++);const s=t.alloc(1===r.family?4:16);e.copy(s,0,n,n+i-4),r.ip=o.decode(s);break;case 11:i>0&&(r.timeout=e.readUInt16BE(n),n+=2);break;case 14:r.tags=[];for(let t=0;t<i;t+=2)r.tags.push(e.readUInt16BE(n)),n+=2}return A.decode.bytes=i+4,r},A.decode.bytes=0,A.encodingLength=function(e){if(e.data)return e.data.length+4;switch(a.toCode(e.code)){case 8:const t=e.sourcePrefixLength||0;return Math.ceil(t/8)+8;case 11:return"number"==typeof e.timeout?6:4;case 12:return e.length+4;case 14:return 4+2*e.tags.length}throw new Error(`Unknown roption code: ${e.code}`)};const T=e.opt={};T.encode=function(e,n,r){n||(n=t.alloc(T.encodingLength(e))),r||(r=0);const i=r,s=z(e,A);return n.writeUInt16BE(s,r),r=q(e,A,n,r+2),T.encode.bytes=r-i,n},T.encode.bytes=0,T.decode=function(e,t){t||(t=0);const n=t,r=[];let i=e.readUInt16BE(t);t+=2;let s=0;for(;i>0;)r[s++]=A.decode(e,t),t+=A.decode.bytes,i-=A.decode.bytes;return T.decode.bytes=t-n,r},T.decode.bytes=0,T.encodingLength=function(e){return 2+z(e||[],A)};const M=e.dnskey={};M.PROTOCOL_DNSSEC=3,M.ZONE_KEY=128,M.SECURE_ENTRYPOINT=32768,M.encode=function(e,n,r){n||(n=t.alloc(M.encodingLength(e))),r||(r=0);const i=r,s=e.key;if(!t.isBuffer(s))throw new Error("Key must be a Buffer");return r+=2,n.writeUInt16BE(e.flags,r),r+=2,n.writeUInt8(M.PROTOCOL_DNSSEC,r),r+=1,n.writeUInt8(e.algorithm,r),r+=1,s.copy(n,r,0,s.length),r+=s.length,M.encode.bytes=r-i,n.writeUInt16BE(M.encode.bytes-2,i),n},M.encode.bytes=0,M.decode=function(e,t){t||(t=0);const n=t;var r={},i=e.readUInt16BE(t);if(t+=2,r.flags=e.readUInt16BE(t),t+=2,e.readUInt8(t)!==M.PROTOCOL_DNSSEC)throw new Error("Protocol must be 3");return t+=1,r.algorithm=e.readUInt8(t),t+=1,r.key=e.slice(t,n+i+2),t+=r.key.length,M.decode.bytes=t-n,r},M.decode.bytes=0,M.encodingLength=function(e){return 6+t.byteLength(e.key)};const R=e.rrsig={};R.encode=function(e,r,i){r||(r=t.alloc(R.encodingLength(e))),i||(i=0);const s=i,a=e.signature;if(!t.isBuffer(a))throw new Error("Signature must be a Buffer");return i+=2,r.writeUInt16BE(n.toType(e.typeCovered),i),i+=2,r.writeUInt8(e.algorithm,i),i+=1,r.writeUInt8(e.labels,i),i+=1,r.writeUInt32BE(e.originalTTL,i),i+=4,r.writeUInt32BE(e.expiration,i),i+=4,r.writeUInt32BE(e.inception,i),i+=4,r.writeUInt16BE(e.keyTag,i),i+=2,c.encode(e.signersName,r,i),i+=c.encode.bytes,a.copy(r,i,0,a.length),i+=a.length,R.encode.bytes=i-s,r.writeUInt16BE(R.encode.bytes-2,s),r},R.encode.bytes=0,R.decode=function(e,t){t||(t=0);const r=t;var i={},s=e.readUInt16BE(t);return t+=2,i.typeCovered=n.toString(e.readUInt16BE(t)),t+=2,i.algorithm=e.readUInt8(t),t+=1,i.labels=e.readUInt8(t),t+=1,i.originalTTL=e.readUInt32BE(t),t+=4,i.expiration=e.readUInt32BE(t),t+=4,i.inception=e.readUInt32BE(t),t+=4,i.keyTag=e.readUInt16BE(t),t+=2,i.signersName=c.decode(e,t),t+=c.decode.bytes,i.signature=e.slice(t,r+s+2),t+=i.signature.length,R.decode.bytes=t-r,i},R.decode.bytes=0,R.encodingLength=function(e){return 20+c.encodingLength(e.signersName)+t.byteLength(e.signature)};const O=e.rp={};O.encode=function(e,n,r){n||(n=t.alloc(O.encodingLength(e))),r||(r=0);const i=r;return r+=2,c.encode(e.mbox||".",n,r,{mail:!0}),r+=c.encode.bytes,c.encode(e.txt||".",n,r),r+=c.encode.bytes,O.encode.bytes=r-i,n.writeUInt16BE(O.encode.bytes-2,i),n},O.encode.bytes=0,O.decode=function(e,t){t||(t=0);const n=t,r={};return t+=2,r.mbox=c.decode(e,t,{mail:!0})||".",t+=c.decode.bytes,r.txt=c.decode(e,t)||".",t+=c.decode.bytes,O.decode.bytes=t-n,r},O.decode.bytes=0,O.encodingLength=function(e){return 2+c.encodingLength(e.mbox||".")+c.encodingLength(e.txt||".")};const I={encode:function(e,r,i){r||(r=t.alloc(I.encodingLength(e))),i||(i=0);const s=i;for(var a=[],o=0;o<e.length;o++){var c=n.toType(e[o]);void 0===a[c>>8]&&(a[c>>8]=[]),a[c>>8][c>>3&31]|=1<<7-(7&c)}for(o=0;o<a.length;o++)if(void 0!==a[o]){var u=t.from(a[o]);r.writeUInt8(o,i),i+=1,r.writeUInt8(u.length,i),i+=1,u.copy(r,i),i+=u.length}return I.encode.bytes=i-s,r}};I.encode.bytes=0,I.decode=function(e,t,r){t||(t=0);const i=t;for(var s=[];t-i<r;){var a=e.readUInt8(t);t+=1;var o=e.readUInt8(t);t+=1;for(var c=0;c<o;c++)for(var u=e.readUInt8(t+c),l=0;l<8;l++)if(u&1<<7-l){var d=n.toString(a<<8|c<<3|l);s.push(d)}t+=o}return I.decode.bytes=t-i,s},I.decode.bytes=0,I.encodingLength=function(e){for(var t=[],r=0;r<e.length;r++){var i=n.toType(e[r]);t[i>>8]=Math.max(t[i>>8]||0,255&i)}var s=0;for(r=0;r<t.length;r++)void 0!==t[r]&&(s+=2+Math.ceil((t[r]+1)/8));return s};const N=e.nsec={};N.encode=function(e,n,r){n||(n=t.alloc(N.encodingLength(e))),r||(r=0);const i=r;return r+=2,c.encode(e.nextDomain,n,r),r+=c.encode.bytes,I.encode(e.rrtypes,n,r),r+=I.encode.bytes,N.encode.bytes=r-i,n.writeUInt16BE(N.encode.bytes-2,i),n},N.encode.bytes=0,N.decode=function(e,t){t||(t=0);const n=t;var r={},i=e.readUInt16BE(t);return t+=2,r.nextDomain=c.decode(e,t),t+=c.decode.bytes,r.rrtypes=I.decode(e,t,i-(t-n)),t+=I.decode.bytes,N.decode.bytes=t-n,r},N.decode.bytes=0,N.encodingLength=function(e){return 2+c.encodingLength(e.nextDomain)+I.encodingLength(e.rrtypes)};const P=e.nsec3={};P.encode=function(e,n,r){n||(n=t.alloc(P.encodingLength(e))),r||(r=0);const i=r,s=e.salt;if(!t.isBuffer(s))throw new Error("salt must be a Buffer");const a=e.nextDomain;if(!t.isBuffer(a))throw new Error("nextDomain must be a Buffer");return r+=2,n.writeUInt8(e.algorithm,r),r+=1,n.writeUInt8(e.flags,r),r+=1,n.writeUInt16BE(e.iterations,r),r+=2,n.writeUInt8(s.length,r),r+=1,s.copy(n,r,0,s.length),r+=s.length,n.writeUInt8(a.length,r),r+=1,a.copy(n,r,0,a.length),r+=a.length,I.encode(e.rrtypes,n,r),r+=I.encode.bytes,P.encode.bytes=r-i,n.writeUInt16BE(P.encode.bytes-2,i),n},P.encode.bytes=0,P.decode=function(e,t){t||(t=0);const n=t;var r={},i=e.readUInt16BE(t);t+=2,r.algorithm=e.readUInt8(t),t+=1,r.flags=e.readUInt8(t),t+=1,r.iterations=e.readUInt16BE(t),t+=2;const s=e.readUInt8(t);t+=1,r.salt=e.slice(t,t+s),t+=s;const a=e.readUInt8(t);return t+=1,r.nextDomain=e.slice(t,t+a),t+=a,r.rrtypes=I.decode(e,t,i-(t-n)),t+=I.decode.bytes,P.decode.bytes=t-n,r},P.decode.bytes=0,P.encodingLength=function(e){return 8+e.salt.length+e.nextDomain.length+I.encodingLength(e.rrtypes)};const C=e.ds={};C.encode=function(e,n,r){n||(n=t.alloc(C.encodingLength(e))),r||(r=0);const i=r,s=e.digest;if(!t.isBuffer(s))throw new Error("Digest must be a Buffer");return r+=2,n.writeUInt16BE(e.keyTag,r),r+=2,n.writeUInt8(e.algorithm,r),r+=1,n.writeUInt8(e.digestType,r),r+=1,s.copy(n,r,0,s.length),r+=s.length,C.encode.bytes=r-i,n.writeUInt16BE(C.encode.bytes-2,i),n},C.encode.bytes=0,C.decode=function(e,t){t||(t=0);const n=t;var r={},i=e.readUInt16BE(t);return t+=2,r.keyTag=e.readUInt16BE(t),t+=2,r.algorithm=e.readUInt8(t),t+=1,r.digestType=e.readUInt8(t),t+=1,r.digest=e.slice(t,n+i+2),t+=r.digest.length,C.decode.bytes=t-n,r},C.decode.bytes=0,C.encodingLength=function(e){return 6+t.byteLength(e.digest)};const j=e.sshfp={};j.getFingerprintLengthForHashType=function(e){switch(e){case 1:return 20;case 2:return 32}},j.encode=function(e,n,r){n||(n=t.alloc(j.encodingLength(e))),r||(r=0);const i=r;n[r+=2]=e.algorithm,n[r+=1]=e.hash,r+=1;const s=t.from(e.fingerprint.toUpperCase(),"hex");if(s.length!==j.getFingerprintLengthForHashType(e.hash))throw new Error("Invalid fingerprint length");return s.copy(n,r),r+=s.byteLength,j.encode.bytes=r-i,n.writeUInt16BE(j.encode.bytes-2,i),n},j.encode.bytes=0,j.decode=function(e,t){t||(t=0);const n=t,r={};t+=2,r.algorithm=e[t],t+=1,r.hash=e[t],t+=1;const i=j.getFingerprintLengthForHashType(r.hash);return r.fingerprint=e.slice(t,t+i).toString("hex").toUpperCase(),t+=i,j.decode.bytes=t-n,r},j.decode.bytes=0,j.encodingLength=function(e){return 4+t.from(e.fingerprint,"hex").byteLength};const L=e.naptr={};L.encode=function(e,n,r){n||(n=t.alloc(L.encodingLength(e))),r||(r=0);const i=r;return r+=2,n.writeUInt16BE(e.order||0,r),r+=2,n.writeUInt16BE(e.preference||0,r),r+=2,u.encode(e.flags,n,r),r+=u.encode.bytes,u.encode(e.services,n,r),r+=u.encode.bytes,u.encode(e.regexp,n,r),r+=u.encode.bytes,c.encode(e.replacement,n,r),r+=c.encode.bytes,L.encode.bytes=r-i,n.writeUInt16BE(L.encode.bytes-2,i),n},L.encode.bytes=0,L.decode=function(e,t){t||(t=0);const n=t,r={};return t+=2,r.order=e.readUInt16BE(t),t+=2,r.preference=e.readUInt16BE(t),t+=2,r.flags=u.decode(e,t),t+=u.decode.bytes,r.services=u.decode(e,t),t+=u.decode.bytes,r.regexp=u.decode(e,t),t+=u.decode.bytes,r.replacement=c.decode(e,t),t+=c.decode.bytes,L.decode.bytes=t-n,r},L.decode.bytes=0,L.encodingLength=function(e){return u.encodingLength(e.flags)+u.encodingLength(e.services)+u.encodingLength(e.regexp)+c.encodingLength(e.replacement)+6};const D=e.tlsa={};D.encode=function(e,n,r){n||(n=t.alloc(D.encodingLength(e))),r||(r=0);const i=r,s=e.certificate;if(!t.isBuffer(s))throw new Error("Certificate must be a Buffer");return r+=2,n.writeUInt8(e.usage,r),r+=1,n.writeUInt8(e.selector,r),r+=1,n.writeUInt8(e.matchingType,r),r+=1,s.copy(n,r,0,s.length),r+=s.length,D.encode.bytes=r-i,n.writeUInt16BE(D.encode.bytes-2,i),n},D.encode.bytes=0,D.decode=function(e,t){t||(t=0);const n=t,r={},i=e.readUInt16BE(t);return t+=2,r.usage=e.readUInt8(t),t+=1,r.selector=e.readUInt8(t),t+=1,r.matchingType=e.readUInt8(t),t+=1,r.certificate=e.slice(t,n+i+2),t+=r.certificate.length,D.decode.bytes=t-n,r},D.decode.bytes=0,D.encodingLength=function(e){return 5+t.byteLength(e.certificate)};const $=e.record=function(e){switch(e.toUpperCase()){case"A":return S;case"PTR":return b;case"CNAME":return v;case"DNAME":return w;case"TXT":return m;case"NULL":return g;case"AAAA":return k;case"SRV":return x;case"HINFO":return y;case"CAA":return _;case"NS":return f;case"SOA":return h;case"MX":return E;case"OPT":return T;case"DNSKEY":return M;case"RRSIG":return R;case"RP":return O;case"NSEC":return N;case"NSEC3":return P;case"SSHFP":return j;case"DS":return C;case"NAPTR":return L;case"TLSA":return D}return d},U=e.answer={};U.encode=function(e,r,i){r||(r=t.alloc(U.encodingLength(e))),i||(i=0);const a=i;if(c.encode(e.name,r,i),i+=c.encode.bytes,r.writeUInt16BE(n.toType(e.type),i),"OPT"===e.type.toUpperCase()){if("."!==e.name)throw new Error("OPT name must be root.");r.writeUInt16BE(e.udpPayloadSize||4096,i+2),r.writeUInt8(e.extendedRcode||0,i+4),r.writeUInt8(e.ednsVersion||0,i+5),r.writeUInt16BE(e.flags||0,i+6),i+=8,T.encode(e.options||[],r,i),i+=T.encode.bytes}else{let t=s.toClass(void 0===e.class?"IN":e.class);e.flush&&(t|=32768),r.writeUInt16BE(t,i+2),r.writeUInt32BE(e.ttl||0,i+4),i+=8;const n=$(e.type);n.encode(e.data,r,i),i+=n.encode.bytes}return U.encode.bytes=i-a,r},U.encode.bytes=0,U.decode=function(e,t){t||(t=0);const r={},i=t;if(r.name=c.decode(e,t),t+=c.decode.bytes,r.type=n.toString(e.readUInt16BE(t)),"OPT"===r.type)r.udpPayloadSize=e.readUInt16BE(t+2),r.extendedRcode=e.readUInt8(t+4),r.ednsVersion=e.readUInt8(t+5),r.flags=e.readUInt16BE(t+6),r.flag_do=1==(r.flags>>15&1),r.options=T.decode(e,t+8),t+=8+T.decode.bytes;else{const n=e.readUInt16BE(t+2);r.ttl=e.readUInt32BE(t+4),r.class=s.toString(-32769&n),r.flush=!!(32768&n);const i=$(r.type);r.data=i.decode(e,t+8),t+=8+i.decode.bytes}return U.decode.bytes=t-i,r},U.decode.bytes=0,U.encodingLength=function(e){const t=null!==e.data&&void 0!==e.data?e.data:e.options;return c.encodingLength(e.name)+8+$(e.type).encodingLength(t)};const B=e.question={};function z(e,t){let n=0;for(let r=0;r<e.length;r++)n+=t.encodingLength(e[r]);return n}function q(e,t,n,r){for(let i=0;i<e.length;i++)t.encode(e[i],n,r),r+=t.encode.bytes;return r}function H(e,t,n,r){for(let i=0;i<e.length;i++)e[i]=t.decode(n,r),r+=t.decode.bytes;return r}B.encode=function(e,r,i){r||(r=t.alloc(B.encodingLength(e))),i||(i=0);const a=i;return c.encode(e.name,r,i),i+=c.encode.bytes,r.writeUInt16BE(n.toType(e.type),i),i+=2,r.writeUInt16BE(s.toClass(void 0===e.class?"IN":e.class),i),i+=2,B.encode.bytes=i-a,e},B.encode.bytes=0,B.decode=function(e,t){t||(t=0);const r=t,i={};i.name=c.decode(e,t),t+=c.decode.bytes,i.type=n.toString(e.readUInt16BE(t)),t+=2,i.class=s.toString(e.readUInt16BE(t)),t+=2;return!!(32768&i.class)&&(i.class&=-32769),B.decode.bytes=t-r,i},B.decode.bytes=0,B.encodingLength=function(e){return c.encodingLength(e.name)+4},e.AUTHORITATIVE_ANSWER=1024,e.TRUNCATED_RESPONSE=512,e.RECURSION_DESIRED=256,e.RECURSION_AVAILABLE=128,e.AUTHENTIC_DATA=32,e.CHECKING_DISABLED=16,e.DNSSEC_OK=32768,e.encode=function(n,r,i){const s=!r;s&&(r=t.alloc(e.encodingLength(n))),i||(i=0);const a=i;return n.questions||(n.questions=[]),n.answers||(n.answers=[]),n.authorities||(n.authorities=[]),n.additionals||(n.additionals=[]),l.encode(n,r,i),i+=l.encode.bytes,i=q(n.questions,B,r,i),i=q(n.answers,U,r,i),i=q(n.authorities,U,r,i),i=q(n.additionals,U,r,i),e.encode.bytes=i-a,s&&e.encode.bytes!==r.length?r.slice(0,e.encode.bytes):r},e.encode.bytes=0,e.decode=function(t,n){n||(n=0);const r=n,i=l.decode(t,n);return n+=l.decode.bytes,n=H(i.questions,B,t,n),n=H(i.answers,U,t,n),n=H(i.authorities,U,t,n),n=H(i.additionals,U,t,n),e.decode.bytes=n-r,i},e.decode.bytes=0,e.encodingLength=function(e){return l.encodingLength(e)+z(e.questions||[],B)+z(e.answers||[],U)+z(e.authorities||[],U)+z(e.additionals||[],U)},e.streamEncode=function(n){const r=e.encode(n),i=t.alloc(2);i.writeUInt16BE(r.byteLength);const s=t.concat([i,r]);return e.streamEncode.bytes=s.byteLength,s},e.streamEncode.bytes=0,e.streamDecode=function(t){const n=t.readUInt16BE(0);if(t.byteLength<n+2)return null;const r=e.decode(t.slice(2));return e.streamDecode.bytes=e.decode.bytes,r},e.streamDecode.bytes=0}(ab)),ab}var Tb=function(){if(Sb)return Eb;Sb=1;const e=$,t=a,n=Ab(),r=f;function i(t){if(!(this instanceof i))return new i(t);t||(t={}),r.EventEmitter.call(this);const n=this;function s(){n._ontimeoutCheck()}function a(){n._interval=setInterval(s,n.timeoutChecks),n.emit("listening")}this.retries=void 0!==t.retries?t.retries:5,this.timeout=t.timeout||7500,this.timeoutChecks=t.timeoutChecks||this.timeout/10,this.destroyed=!1,this.inflight=0,this.maxQueries=t.maxQueries||1e4,this.maxRedirects=t.maxRedirects||0,this.socket=t.socket||e.createSocket("udp4"),this._id=Math.ceil(Math.random()*this.maxQueries),this._queries=new Array(this.maxQueries).fill(null),this._interval=null,this.socket.on("error",(function(e){"EACCES"===e.code||"EADDRINUSE"===e.code?n.emit("error",e):n.emit("warning",e)})),this.socket.on("message",(function(e,t){n._onmessage(e,t)})),!function(e){try{return 0!==e.address().port}catch(e){return!1}}(this.socket)?this.socket.on("listening",a):a(),this.socket.on("close",(function(){n.emit("close")}))}function s(){}return Eb=i,t.inherits(i,r.EventEmitter),i.RECURSION_DESIRED=i.prototype.RECURSION_DESIRED=n.RECURSION_DESIRED,i.RECURSION_AVAILABLE=i.prototype.RECURSION_AVAILABLE=n.RECURSION_AVAILABLE,i.TRUNCATED_RESPONSE=i.prototype.TRUNCATED_RESPONSE=n.TRUNCATED_RESPONSE,i.AUTHORITATIVE_ANSWER=i.prototype.AUTHORITATIVE_ANSWER=n.AUTHORITATIVE_ANSWER,i.AUTHENTIC_DATA=i.prototype.AUTHENTIC_DATA=n.AUTHENTIC_DATA,i.CHECKING_DISABLED=i.prototype.CHECKING_DISABLED=n.CHECKING_DISABLED,i.prototype.address=function(){return this.socket.address()},i.prototype.bind=function(...e){const t=e.length>0&&e[e.length-1];"function"==typeof t?(this.once("listening",t),this.socket.bind(...e.slice(0,-1))):this.socket.bind(...e)},i.prototype.destroy=function(e){if(e&&this.once("close",e),!this.destroyed){this.destroyed=!0,clearInterval(this._interval),this.socket.close();for(let e=0;e<this.maxQueries;e++){const t=this._queries[e];t&&(t.callback(new Error("Socket destroyed")),this._queries[e]=null)}this.inflight=0}},i.prototype._ontimeoutCheck=function(){const e=Date.now();for(let t=0;t<this.maxQueries;t++){const n=this._queries[t];!n||e-n.firstTry<(n.tries+1)*this.timeout||(n.tries>this.retries?(this._queries[t]=null,this.inflight--,this.emit("timeout",n.query,n.port,n.host),n.callback(new Error("Query timed out"))):(n.tries++,this.socket.send(n.buffer,0,n.buffer.length,n.port,Array.isArray(n.host)?n.host[Math.floor(n.host.length*Math.random())]:n.host||"127.0.0.1")))}},i.prototype._shouldRedirect=function(e,t){if(this.maxRedirects<=0||!e||1!==e.query.questions.length||t.answers.filter((e=>"A"===e.type)).length>0)return!1;if(e.redirects>this.maxRedirects)return!1;const r=t.answers.filter((e=>"CNAME"===e.type));if(0===r.length)return!1;const i=this._getNextEmptyId();return-1===i?(e.callback(new Error("Query array is full!")),!0):(e.query={id:i+1,flags:n.RECURSION_DESIRED,questions:[{type:"A",name:r[0].data}]},e.redirects++,e.firstTry=Date.now(),e.tries=0,e.buffer=n.encode(e.query),this._queries[i]=e,this.socket.send(e.buffer,0,e.buffer.length,e.port,Array.isArray(e.host)?e.host[Math.floor(e.host.length*Math.random())]:e.host||"127.0.0.1"),!0)},i.prototype._onmessage=function(e,t){let r;try{r=n.decode(e)}catch(e){return void this.emit("warning",e)}if("response"===r.type&&r.id){const e=this._queries[r.id-1];e&&(this._queries[r.id-1]=null,this.inflight--,this._shouldRedirect(e,r)||e.callback(null,r))}this.emit(r.type,r,t.port,t.address)},i.prototype.unref=function(){this.socket.unref()},i.prototype.ref=function(){this.socket.ref()},i.prototype.response=function(e,t,r,i){if(this.destroyed)return;t.type="response",t.id=e.id;const s=n.encode(t);this.socket.send(s,0,s.length,r,i)},i.prototype.cancel=function(e){const t=this._queries[e];t&&(this._queries[e]=null,this.inflight--,t.callback(new Error("Query cancelled")))},i.prototype.setRetries=function(e,t){const n=this._queries[e];n&&(n.firstTry=n.firstTry-this.timeout*(t-n.retries),n.retries=this.retries-t)},i.prototype._getNextEmptyId=function(){let e=-1;for(let t=this.maxQueries;t>0;t--){const n=(this._id+t)%this.maxQueries;if(null===this._queries[n]){e=n,this._id=(n+1)%this.maxQueries;break}}return e},i.prototype.query=function(e,t,r,a){if(this.destroyed)return a(new Error("Socket destroyed")),0;this.inflight++,e.type="query",e.flags="number"==typeof e.flags?e.flags:i.RECURSION_DESIRED;const o=this._getNextEmptyId();if(-1===o)return a(new Error("Query array is full!")),0;e.id=o+1;const c=n.encode(e);return this._queries[o]={callback:a||s,redirects:0,firstTry:Date.now(),query:e,tries:0,buffer:c,port:t,host:r},this.socket.send(c,0,c.length,t,Array.isArray(r)?r[Math.floor(r.length*Math.random())]:r||"127.0.0.1"),o},Eb}(),Mb=we(Tb);const Rb=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];const Ob=["Function","Generator","AsyncGenerator","GeneratorFunction","AsyncGeneratorFunction","AsyncFunction","Observable","Array","Buffer","Blob","Object","RegExp","Date","Error","Map","Set","WeakMap","WeakSet","WeakRef","ArrayBuffer","SharedArrayBuffer","DataView","Promise","URL","FormData","URLSearchParams","HTMLElement","NaN",...Rb];const Ib=["null","undefined","string","number","bigint","boolean","symbol"];function Nb(e){return t=>typeof t===e}const{toString:Pb}=Object.prototype,Cb=e=>{const t=Pb.call(e).slice(8,-1);return/HTML\w+Element/.test(t)&&Lb.domElement(e)?"HTMLElement":(n=t,Ob.includes(n)?t:void 0);var n},jb=e=>t=>Cb(t)===e;function Lb(e){if(null===e)return"null";switch(typeof e){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"NaN":"number";case"boolean":return"boolean";case"function":return"Function";case"bigint":return"bigint";case"symbol":return"symbol"}if(Lb.observable(e))return"Observable";if(Lb.array(e))return"Array";if(Lb.buffer(e))return"Buffer";const t=Cb(e);if(t)return t;if(e instanceof String||e instanceof Boolean||e instanceof Number)throw new TypeError("Please don't use object wrappers for primitive types");return"Object"}Lb.undefined=Nb("undefined"),Lb.string=Nb("string");const Db=Nb("number");Lb.number=e=>Db(e)&&!Lb.nan(e),Lb.positiveNumber=e=>Lb.number(e)&&e>0,Lb.negativeNumber=e=>Lb.number(e)&&e<0,Lb.bigint=Nb("bigint"),Lb.function_=Nb("function"),Lb.null_=e=>null===e,Lb.class_=e=>Lb.function_(e)&&e.toString().startsWith("class "),Lb.boolean=e=>!0===e||!1===e,Lb.symbol=Nb("symbol"),Lb.numericString=e=>Lb.string(e)&&!Lb.emptyStringOrWhitespace(e)&&!Number.isNaN(Number(e)),Lb.array=(e,t)=>!!Array.isArray(e)&&(!Lb.function_(t)||e.every((e=>t(e)))),Lb.buffer=e=>e?.constructor?.isBuffer?.(e)??!1,Lb.blob=e=>jb("Blob")(e),Lb.nullOrUndefined=e=>Lb.null_(e)||Lb.undefined(e),Lb.object=e=>!Lb.null_(e)&&("object"==typeof e||Lb.function_(e)),Lb.iterable=e=>Lb.function_(e?.[Symbol.iterator]),Lb.asyncIterable=e=>Lb.function_(e?.[Symbol.asyncIterator]),Lb.generator=e=>Lb.iterable(e)&&Lb.function_(e?.next)&&Lb.function_(e?.throw),Lb.asyncGenerator=e=>Lb.asyncIterable(e)&&Lb.function_(e.next)&&Lb.function_(e.throw),Lb.nativePromise=e=>jb("Promise")(e);Lb.promise=e=>Lb.nativePromise(e)||(e=>Lb.function_(e?.then)&&Lb.function_(e?.catch))(e),Lb.generatorFunction=jb("GeneratorFunction"),Lb.asyncGeneratorFunction=e=>"AsyncGeneratorFunction"===Cb(e),Lb.asyncFunction=e=>"AsyncFunction"===Cb(e),Lb.boundFunction=e=>Lb.function_(e)&&!e.hasOwnProperty("prototype"),Lb.regExp=jb("RegExp"),Lb.date=jb("Date"),Lb.error=jb("Error"),Lb.map=e=>jb("Map")(e),Lb.set=e=>jb("Set")(e),Lb.weakMap=e=>jb("WeakMap")(e),Lb.weakSet=e=>jb("WeakSet")(e),Lb.weakRef=e=>jb("WeakRef")(e),Lb.int8Array=jb("Int8Array"),Lb.uint8Array=jb("Uint8Array"),Lb.uint8ClampedArray=jb("Uint8ClampedArray"),Lb.int16Array=jb("Int16Array"),Lb.uint16Array=jb("Uint16Array"),Lb.int32Array=jb("Int32Array"),Lb.uint32Array=jb("Uint32Array"),Lb.float32Array=jb("Float32Array"),Lb.float64Array=jb("Float64Array"),Lb.bigInt64Array=jb("BigInt64Array"),Lb.bigUint64Array=jb("BigUint64Array"),Lb.arrayBuffer=jb("ArrayBuffer"),Lb.sharedArrayBuffer=jb("SharedArrayBuffer"),Lb.dataView=jb("DataView"),Lb.enumCase=(e,t)=>Object.values(t).includes(e),Lb.directInstanceOf=(e,t)=>Object.getPrototypeOf(e)===t.prototype,Lb.urlInstance=e=>jb("URL")(e),Lb.urlString=e=>{if(!Lb.string(e))return!1;try{return new URL(e),!0}catch{return!1}},Lb.truthy=e=>Boolean(e),Lb.falsy=e=>!e,Lb.nan=e=>Number.isNaN(e),Lb.primitive=e=>{return Lb.null_(e)||(t=typeof e,Ib.includes(t));var t},Lb.integer=e=>Number.isInteger(e),Lb.safeInteger=e=>Number.isSafeInteger(e),Lb.plainObject=e=>{if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},Lb.typedArray=e=>{return t=Cb(e),Rb.includes(t);var t};Lb.arrayLike=e=>!Lb.nullOrUndefined(e)&&!Lb.function_(e)&&(e=>Lb.safeInteger(e)&&e>=0)(e.length),Lb.tupleLike=(e,t)=>!(!Lb.array(t)||!Lb.array(e)||t.length!==e.length)&&t.every(((t,n)=>t(e[n]))),Lb.inRange=(e,t)=>{if(Lb.number(t))return e>=Math.min(0,t)&&e<=Math.max(t,0);if(Lb.array(t)&&2===t.length)return e>=Math.min(...t)&&e<=Math.max(...t);throw new TypeError(`Invalid range: ${JSON.stringify(t)}`)};const $b=["innerHTML","ownerDocument","style","attributes","nodeValue"];Lb.domElement=e=>Lb.object(e)&&1===e.nodeType&&Lb.string(e.nodeName)&&!Lb.plainObject(e)&&$b.every((t=>t in e)),Lb.observable=e=>!!e&&(e===e[Symbol.observable]?.()||e===e["@@observable"]?.()),Lb.nodeStream=e=>Lb.object(e)&&Lb.function_(e.pipe)&&!Lb.observable(e),Lb.infinite=e=>e===Number.POSITIVE_INFINITY||e===Number.NEGATIVE_INFINITY;const Ub=e=>t=>Lb.integer(t)&&Math.abs(t%2)===e;Lb.evenInteger=Ub(0),Lb.oddInteger=Ub(1),Lb.emptyArray=e=>Lb.array(e)&&0===e.length,Lb.nonEmptyArray=e=>Lb.array(e)&&e.length>0,Lb.emptyString=e=>Lb.string(e)&&0===e.length;Lb.emptyStringOrWhitespace=e=>Lb.emptyString(e)||(e=>Lb.string(e)&&!/\S/.test(e))(e),Lb.nonEmptyString=e=>Lb.string(e)&&e.length>0,Lb.nonEmptyStringAndNotWhitespace=e=>Lb.string(e)&&!Lb.emptyStringOrWhitespace(e),Lb.emptyObject=e=>Lb.object(e)&&!Lb.map(e)&&!Lb.set(e)&&0===Object.keys(e).length,Lb.nonEmptyObject=e=>Lb.object(e)&&!Lb.map(e)&&!Lb.set(e)&&Object.keys(e).length>0,Lb.emptySet=e=>Lb.set(e)&&0===e.size,Lb.nonEmptySet=e=>Lb.set(e)&&e.size>0,Lb.emptyMap=e=>Lb.map(e)&&0===e.size,Lb.nonEmptyMap=e=>Lb.map(e)&&e.size>0,Lb.propertyKey=e=>Lb.any([Lb.string,Lb.number,Lb.symbol],e),Lb.formData=e=>jb("FormData")(e),Lb.urlSearchParams=e=>jb("URLSearchParams")(e);const Bb=(e,t,n)=>{if(!Lb.function_(t))throw new TypeError(`Invalid predicate: ${JSON.stringify(t)}`);if(0===n.length)throw new TypeError("Invalid number of values");return e.call(n,t)};Lb.any=(e,...t)=>(Lb.array(e)?e:[e]).some((e=>Bb(Array.prototype.some,e,t))),Lb.all=(e,...t)=>Bb(Array.prototype.every,e,t);const zb=(e,t,n,r={})=>{if(!e){const{multipleValues:e}=r,i=e?`received values of types ${[...new Set(n.map((e=>`\`${Lb(e)}\``)))].join(", ")}`:`received value of type \`${Lb(n)}\``;throw new TypeError(`Expected value which is \`${t}\`, ${i}.`)}},qb={undefined:e=>zb(Lb.undefined(e),"undefined",e),string:e=>zb(Lb.string(e),"string",e),number:e=>zb(Lb.number(e),"number",e),positiveNumber:e=>zb(Lb.positiveNumber(e),"positive number",e),negativeNumber:e=>zb(Lb.negativeNumber(e),"negative number",e),bigint:e=>zb(Lb.bigint(e),"bigint",e),function_:e=>zb(Lb.function_(e),"Function",e),null_:e=>zb(Lb.null_(e),"null",e),class_:e=>zb(Lb.class_(e),"Class",e),boolean:e=>zb(Lb.boolean(e),"boolean",e),symbol:e=>zb(Lb.symbol(e),"symbol",e),numericString:e=>zb(Lb.numericString(e),"string with a number",e),array:(e,t)=>{zb(Lb.array(e),"Array",e),t&&e.forEach(t)},buffer:e=>zb(Lb.buffer(e),"Buffer",e),blob:e=>zb(Lb.blob(e),"Blob",e),nullOrUndefined:e=>zb(Lb.nullOrUndefined(e),"null or undefined",e),object:e=>zb(Lb.object(e),"Object",e),iterable:e=>zb(Lb.iterable(e),"Iterable",e),asyncIterable:e=>zb(Lb.asyncIterable(e),"AsyncIterable",e),generator:e=>zb(Lb.generator(e),"Generator",e),asyncGenerator:e=>zb(Lb.asyncGenerator(e),"AsyncGenerator",e),nativePromise:e=>zb(Lb.nativePromise(e),"native Promise",e),promise:e=>zb(Lb.promise(e),"Promise",e),generatorFunction:e=>zb(Lb.generatorFunction(e),"GeneratorFunction",e),asyncGeneratorFunction:e=>zb(Lb.asyncGeneratorFunction(e),"AsyncGeneratorFunction",e),asyncFunction:e=>zb(Lb.asyncFunction(e),"AsyncFunction",e),boundFunction:e=>zb(Lb.boundFunction(e),"Function",e),regExp:e=>zb(Lb.regExp(e),"RegExp",e),date:e=>zb(Lb.date(e),"Date",e),error:e=>zb(Lb.error(e),"Error",e),map:e=>zb(Lb.map(e),"Map",e),set:e=>zb(Lb.set(e),"Set",e),weakMap:e=>zb(Lb.weakMap(e),"WeakMap",e),weakSet:e=>zb(Lb.weakSet(e),"WeakSet",e),weakRef:e=>zb(Lb.weakRef(e),"WeakRef",e),int8Array:e=>zb(Lb.int8Array(e),"Int8Array",e),uint8Array:e=>zb(Lb.uint8Array(e),"Uint8Array",e),uint8ClampedArray:e=>zb(Lb.uint8ClampedArray(e),"Uint8ClampedArray",e),int16Array:e=>zb(Lb.int16Array(e),"Int16Array",e),uint16Array:e=>zb(Lb.uint16Array(e),"Uint16Array",e),int32Array:e=>zb(Lb.int32Array(e),"Int32Array",e),uint32Array:e=>zb(Lb.uint32Array(e),"Uint32Array",e),float32Array:e=>zb(Lb.float32Array(e),"Float32Array",e),float64Array:e=>zb(Lb.float64Array(e),"Float64Array",e),bigInt64Array:e=>zb(Lb.bigInt64Array(e),"BigInt64Array",e),bigUint64Array:e=>zb(Lb.bigUint64Array(e),"BigUint64Array",e),arrayBuffer:e=>zb(Lb.arrayBuffer(e),"ArrayBuffer",e),sharedArrayBuffer:e=>zb(Lb.sharedArrayBuffer(e),"SharedArrayBuffer",e),dataView:e=>zb(Lb.dataView(e),"DataView",e),enumCase:(e,t)=>zb(Lb.enumCase(e,t),"EnumCase",e),urlInstance:e=>zb(Lb.urlInstance(e),"URL",e),urlString:e=>zb(Lb.urlString(e),"string with a URL",e),truthy:e=>zb(Lb.truthy(e),"truthy",e),falsy:e=>zb(Lb.falsy(e),"falsy",e),nan:e=>zb(Lb.nan(e),"NaN",e),primitive:e=>zb(Lb.primitive(e),"primitive",e),integer:e=>zb(Lb.integer(e),"integer",e),safeInteger:e=>zb(Lb.safeInteger(e),"integer",e),plainObject:e=>zb(Lb.plainObject(e),"plain object",e),typedArray:e=>zb(Lb.typedArray(e),"TypedArray",e),arrayLike:e=>zb(Lb.arrayLike(e),"array-like",e),tupleLike:(e,t)=>zb(Lb.tupleLike(e,t),"tuple-like",e),domElement:e=>zb(Lb.domElement(e),"HTMLElement",e),observable:e=>zb(Lb.observable(e),"Observable",e),nodeStream:e=>zb(Lb.nodeStream(e),"Node.js Stream",e),infinite:e=>zb(Lb.infinite(e),"infinite number",e),emptyArray:e=>zb(Lb.emptyArray(e),"empty array",e),nonEmptyArray:e=>zb(Lb.nonEmptyArray(e),"non-empty array",e),emptyString:e=>zb(Lb.emptyString(e),"empty string",e),emptyStringOrWhitespace:e=>zb(Lb.emptyStringOrWhitespace(e),"empty string or whitespace",e),nonEmptyString:e=>zb(Lb.nonEmptyString(e),"non-empty string",e),nonEmptyStringAndNotWhitespace:e=>zb(Lb.nonEmptyStringAndNotWhitespace(e),"non-empty string and not whitespace",e),emptyObject:e=>zb(Lb.emptyObject(e),"empty object",e),nonEmptyObject:e=>zb(Lb.nonEmptyObject(e),"non-empty object",e),emptySet:e=>zb(Lb.emptySet(e),"empty set",e),nonEmptySet:e=>zb(Lb.nonEmptySet(e),"non-empty set",e),emptyMap:e=>zb(Lb.emptyMap(e),"empty map",e),nonEmptyMap:e=>zb(Lb.nonEmptyMap(e),"non-empty map",e),propertyKey:e=>zb(Lb.propertyKey(e),"PropertyKey",e),formData:e=>zb(Lb.formData(e),"FormData",e),urlSearchParams:e=>zb(Lb.urlSearchParams(e),"URLSearchParams",e),evenInteger:e=>zb(Lb.evenInteger(e),"even integer",e),oddInteger:e=>zb(Lb.oddInteger(e),"odd integer",e),directInstanceOf:(e,t)=>zb(Lb.directInstanceOf(e,t),"T",e),inRange:(e,t)=>zb(Lb.inRange(e,t),"in range",e),any:(e,...t)=>zb(Lb.any(e,...t),"predicate returns truthy for any value",t,{multipleValues:!0}),all:(e,...t)=>zb(Lb.all(e,...t),"predicate returns truthy for all values",t,{multipleValues:!0})};Object.defineProperties(Lb,{class:{value:Lb.class_},function:{value:Lb.function_},null:{value:Lb.null_}}),Object.defineProperties(qb,{class:{value:qb.class_},function:{value:qb.function_},null:{value:qb.null_}});let Hb=class extends Error{constructor(e){super(e||"Promise was canceled"),this.name="CancelError"}get isCanceled(){return!0}};class Fb{static fn(e){return(...t)=>new Fb(((n,r,i)=>{t.push(i),e(...t).then(n,r)}))}constructor(e){this._cancelHandlers=[],this._isPending=!0,this._isCanceled=!1,this._rejectOnCancel=!0,this._promise=new Promise(((t,n)=>{this._reject=n;const r=e=>{if(!this._isPending)throw new Error("The `onCancel` handler was attached after the promise settled.");this._cancelHandlers.push(e)};Object.defineProperties(r,{shouldReject:{get:()=>this._rejectOnCancel,set:e=>{this._rejectOnCancel=e}}}),e((e=>{this._isCanceled&&r.shouldReject||(this._isPending=!1,t(e))}),(e=>{this._isPending=!1,n(e)}),r)}))}then(e,t){return this._promise.then(e,t)}catch(e){return this._promise.catch(e)}finally(e){return this._promise.finally(e)}cancel(e){if(this._isPending&&!this._isCanceled){if(this._isCanceled=!0,this._cancelHandlers.length>0)try{for(const e of this._cancelHandlers)e()}catch(e){return void this._reject(e)}this._rejectOnCancel&&this._reject(new Hb(e))}}get isCanceled(){return this._isCanceled}}Object.setPrototypeOf(Fb.prototype,Promise.prototype);let Yb=class extends Error{constructor(e,t,n){var r;if(super(e),Object.defineProperty(this,"input",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"stack",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"response",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"request",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"timings",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Error.captureStackTrace(this,this.constructor),this.name="RequestError",this.code=t.code??"ERR_GOT_REQUEST_ERROR",this.input=t.input,r=n,Lb.object(r)&&"_onResponse"in r?(Object.defineProperty(this,"request",{enumerable:!1,value:n}),Object.defineProperty(this,"response",{enumerable:!1,value:n.response}),this.options=n.options):this.options=n,this.timings=this.request?.timings,Lb.string(t.stack)&&Lb.string(this.stack)){const e=this.stack.indexOf(this.message)+this.message.length,n=this.stack.slice(e).split("\n").reverse(),r=t.stack.slice(t.stack.indexOf(t.message)+t.message.length).split("\n").reverse();for(;r.length>0&&r[0]===n[0];)n.shift();this.stack=`${this.stack.slice(0,e)}${n.reverse().join("\n")}${r.reverse().join("\n")}`}}};class Vb extends Yb{constructor(e){super(`Redirected ${e.options.maxRedirects} times. Aborting.`,{},e),this.name="MaxRedirectsError",this.code="ERR_TOO_MANY_REDIRECTS"}}class Kb extends Yb{constructor(e){super(`Response code ${e.statusCode} (${e.statusMessage})`,{},e.request),this.name="HTTPError",this.code="ERR_NON_2XX_3XX_RESPONSE"}}let Wb=class extends Yb{constructor(e,t){super(e.message,e,t),this.name="CacheError",this.code="ERR_GOT_REQUEST_ERROR"===this.code?"ERR_CACHE_ACCESS":this.code}};class Gb extends Yb{constructor(e,t){super(e.message,e,t),this.name="UploadError",this.code="ERR_GOT_REQUEST_ERROR"===this.code?"ERR_UPLOAD":this.code}}let Jb=class extends Yb{constructor(e,t,n){super(e.message,e,n),Object.defineProperty(this,"timings",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"event",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name="TimeoutError",this.event=e.event,this.timings=t}};class Zb extends Yb{constructor(e,t){super(e.message,e,t),this.name="ReadError",this.code="ERR_GOT_REQUEST_ERROR"===this.code?"ERR_READING_RESPONSE_STREAM":this.code}}class Xb extends Yb{constructor(e){super("Retrying",{},e),this.name="RetryError",this.code="ERR_RETRYING"}}class Qb extends Yb{constructor(e){super("This operation was aborted.",{},e),this.code="ERR_ABORTED",this.name="AbortError"}}var ev,tv={exports:{}};var nv=(ev||(ev=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const n=(e,t)=>{let n;n="function"==typeof t?{connect:t}:t;const r="function"==typeof n.connect,i="function"==typeof n.secureConnect,s="function"==typeof n.close,a=()=>{r&&n.connect(),function(e){return e.encrypted}(e)&&i&&(e.authorized?n.secureConnect():e.authorizationError||e.once("secureConnect",n.secureConnect)),s&&e.once("close",n.close)};e.writable&&!e.connecting?a():e.connecting?e.once("connect",a):e.destroyed&&s&&n.close(e._hadError)};t.default=n,e.exports=n,e.exports.default=n}(tv,tv.exports)),tv.exports),rv=we(nv);const iv=(e,t)=>t.some((t=>t instanceof RegExp?t.test(e):t===e)),sv=new Set(["https:","http:","file:"]);function av(e,t){if("string"!=typeof(t={defaultProtocol:"http",normalizeProtocol:!0,forceHttp:!1,forceHttps:!1,stripAuthentication:!0,stripHash:!1,stripTextFragment:!0,stripWWW:!0,removeQueryParameters:[/^utm_\w+/i],removeTrailingSlash:!0,removeSingleSlash:!0,removeDirectoryIndex:!1,removeExplicitPort:!1,sortQueryParameters:!0,...t}).defaultProtocol||t.defaultProtocol.endsWith(":")||(t.defaultProtocol=`${t.defaultProtocol}:`),e=e.trim(),/^data:/i.test(e))return((e,{stripHash:t})=>{const n=/^data:(?<type>[^,]*?),(?<data>[^#]*?)(?:#(?<hash>.*))?$/.exec(e);if(!n)throw new Error(`Invalid URL: ${e}`);let{type:r,data:i,hash:s}=n.groups;const a=r.split(";");s=t?"":s;let o=!1;"base64"===a[a.length-1]&&(a.pop(),o=!0);const c=a.shift()?.toLowerCase()??"",u=a.map((e=>{let[t,n=""]=e.split("=").map((e=>e.trim()));return"charset"===t&&(n=n.toLowerCase(),"us-ascii"===n)?"":`${t}${n?`=${n}`:""}`})).filter(Boolean),l=[...u];return o&&l.push("base64"),(l.length>0||c&&"text/plain"!==c)&&l.unshift(c),`data:${l.join(";")},${o?i.trim():i}${s?`#${s}`:""}`})(e,t);if((e=>{try{const{protocol:t}=new URL(e);return t.endsWith(":")&&!t.includes(".")&&!sv.has(t)}catch{return!1}})(e))return e;const n=e.startsWith("//");!n&&/^\.*\//.test(e)||(e=e.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,t.defaultProtocol));const r=new URL(e);if(t.forceHttp&&t.forceHttps)throw new Error("The `forceHttp` and `forceHttps` options cannot be used together");if(t.forceHttp&&"https:"===r.protocol&&(r.protocol="http:"),t.forceHttps&&"http:"===r.protocol&&(r.protocol="https:"),t.stripAuthentication&&(r.username="",r.password=""),t.stripHash?r.hash="":t.stripTextFragment&&(r.hash=r.hash.replace(/#?:~:text.*?$/i,"")),r.pathname){const e=/\b[a-z][a-z\d+\-.]{1,50}:\/\//g;let t=0,n="";for(;;){const i=e.exec(r.pathname);if(!i)break;const s=i[0],a=i.index;n+=r.pathname.slice(t,a).replace(/\/{2,}/g,"/"),n+=s,t=a+s.length}n+=r.pathname.slice(t,r.pathname.length).replace(/\/{2,}/g,"/"),r.pathname=n}if(r.pathname)try{r.pathname=decodeURI(r.pathname)}catch{}if(!0===t.removeDirectoryIndex&&(t.removeDirectoryIndex=[/^index\.[a-z]+$/]),Array.isArray(t.removeDirectoryIndex)&&t.removeDirectoryIndex.length>0){let e=r.pathname.split("/");const n=e[e.length-1];iv(n,t.removeDirectoryIndex)&&(e=e.slice(0,-1),r.pathname=e.slice(1).join("/")+"/")}if(r.hostname&&(r.hostname=r.hostname.replace(/\.$/,""),t.stripWWW&&/^www\.(?!www\.)[a-z\-\d]{1,63}\.[a-z.\-\d]{2,63}$/.test(r.hostname)&&(r.hostname=r.hostname.replace(/^www\./,""))),Array.isArray(t.removeQueryParameters))for(const e of[...r.searchParams.keys()])iv(e,t.removeQueryParameters)&&r.searchParams.delete(e);if(Array.isArray(t.keepQueryParameters)||!0!==t.removeQueryParameters||(r.search=""),Array.isArray(t.keepQueryParameters)&&t.keepQueryParameters.length>0)for(const e of[...r.searchParams.keys()])iv(e,t.keepQueryParameters)||r.searchParams.delete(e);if(t.sortQueryParameters){r.searchParams.sort();try{r.search=decodeURIComponent(r.search)}catch{}}t.removeTrailingSlash&&(r.pathname=r.pathname.replace(/\/$/,"")),t.removeExplicitPort&&r.port&&(r.port="");const i=e;return e=r.toString(),t.removeSingleSlash||"/"!==r.pathname||i.endsWith("/")||""!==r.hash||(e=e.replace(/\/$/,"")),(t.removeTrailingSlash||"/"===r.pathname)&&""===r.hash&&t.removeSingleSlash&&(e=e.replace(/\/$/,"")),n&&!t.normalizeProtocol&&(e=e.replace(/^http:\/\//,"//")),t.stripProtocol&&(e=e.replace(/^(?:https?:)?\/\//,"")),e}var ov,cv,uv,lv={exports:{}};function dv(){if(cv)return ov;cv=1;const{PassThrough:e}=d;return ov=t=>{t={...t};const{array:n}=t;let{encoding:r}=t;const i="buffer"===r;let s=!1;n?s=!(r||i):r=r||"utf8",i&&(r=null);const a=new e({objectMode:s});r&&a.setEncoding(r);let o=0;const c=[];return a.on("data",(e=>{c.push(e),s?o=c.length:o+=e.length})),a.getBufferedValue=()=>n?c:i?Buffer.concat(c,o):c.join(""),a.getBufferedLength=()=>o,a},ov}var pv,fv,hv=function(){if(uv)return lv.exports;uv=1;const{constants:e}=p,t=d,{promisify:n}=a,r=dv(),i=n(t.pipeline);class s extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}async function o(t,n){if(!t)throw new Error("Expected a stream");n={maxBuffer:1/0,...n};const{maxBuffer:a}=n,o=r(n);return await new Promise(((n,r)=>{const c=t=>{t&&o.getBufferedLength()<=e.MAX_LENGTH&&(t.bufferedData=o.getBufferedValue()),r(t)};(async()=>{try{await i(t,o),n()}catch(e){c(e)}})(),o.on("data",(()=>{o.getBufferedLength()>a&&c(new s)}))})),o.getBufferedValue()}return lv.exports=o,lv.exports.buffer=(e,t)=>o(e,{...t,encoding:"buffer"}),lv.exports.array=(e,t)=>o(e,{...t,array:!0}),lv.exports.MaxBufferError=s,lv.exports}(),mv=we(hv);var gv=we(function(){if(fv)return pv;fv=1;const e=new Set([200,203,204,206,300,301,308,404,405,410,414,501]),t=new Set([200,203,204,300,301,302,303,307,308,404,405,410,414,501]),n=new Set([500,502,503,504]),r={date:!0,connection:!0,"keep-alive":!0,"proxy-authenticate":!0,"proxy-authorization":!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0},i={"content-length":!0,"content-encoding":!0,"transfer-encoding":!0,"content-range":!0};function s(e){const t=parseInt(e,10);return isFinite(t)?t:0}function a(e){const t={};if(!e)return t;const n=e.trim().split(/,/);for(const e of n){const[n,r]=e.split(/=/,2);t[n.trim()]=void 0===r||r.trim().replace(/^"|"$/g,"")}return t}function o(e){let t=[];for(const n in e){const r=e[n];t.push(!0===r?n:n+"="+r)}if(t.length)return t.join(", ")}return pv=class{constructor(e,t,{shared:n,cacheHeuristic:r,immutableMinTimeToLive:i,ignoreCargoCult:s,_fromObject:c}={}){if(c)this._fromObject(c);else{if(!t||!t.headers)throw Error("Response headers missing");this._assertRequestHasHeaders(e),this._responseTime=this.now(),this._isShared=!1!==n,this._cacheHeuristic=void 0!==r?r:.1,this._immutableMinTtl=void 0!==i?i:864e5,this._status="status"in t?t.status:200,this._resHeaders=t.headers,this._rescc=a(t.headers["cache-control"]),this._method="method"in e?e.method:"GET",this._url=e.url,this._host=e.headers.host,this._noAuthorization=!e.headers.authorization,this._reqHeaders=t.headers.vary?e.headers:null,this._reqcc=a(e.headers["cache-control"]),s&&"pre-check"in this._rescc&&"post-check"in this._rescc&&(delete this._rescc["pre-check"],delete this._rescc["post-check"],delete this._rescc["no-cache"],delete this._rescc["no-store"],delete this._rescc["must-revalidate"],this._resHeaders=Object.assign({},this._resHeaders,{"cache-control":o(this._rescc)}),delete this._resHeaders.expires,delete this._resHeaders.pragma),null==t.headers["cache-control"]&&/no-cache/.test(t.headers.pragma)&&(this._rescc["no-cache"]=!0)}}now(){return Date.now()}storable(){return!(this._reqcc["no-store"]||!("GET"===this._method||"HEAD"===this._method||"POST"===this._method&&this._hasExplicitExpiration())||!t.has(this._status)||this._rescc["no-store"]||this._isShared&&this._rescc.private||this._isShared&&!this._noAuthorization&&!this._allowsStoringAuthenticated()||!(this._resHeaders.expires||this._rescc["max-age"]||this._isShared&&this._rescc["s-maxage"]||this._rescc.public||e.has(this._status)))}_hasExplicitExpiration(){return this._isShared&&this._rescc["s-maxage"]||this._rescc["max-age"]||this._resHeaders.expires}_assertRequestHasHeaders(e){if(!e||!e.headers)throw Error("Request headers missing")}satisfiesWithoutRevalidation(e){this._assertRequestHasHeaders(e);const t=a(e.headers["cache-control"]);if(t["no-cache"]||/no-cache/.test(e.headers.pragma))return!1;if(t["max-age"]&&this.age()>t["max-age"])return!1;if(t["min-fresh"]&&this.timeToLive()<1e3*t["min-fresh"])return!1;if(this.stale()){if(!(t["max-stale"]&&!this._rescc["must-revalidate"]&&(!0===t["max-stale"]||t["max-stale"]>this.age()-this.maxAge())))return!1}return this._requestMatches(e,!1)}_requestMatches(e,t){return(!this._url||this._url===e.url)&&this._host===e.headers.host&&(!e.method||this._method===e.method||t&&"HEAD"===e.method)&&this._varyMatches(e)}_allowsStoringAuthenticated(){return this._rescc["must-revalidate"]||this._rescc.public||this._rescc["s-maxage"]}_varyMatches(e){if(!this._resHeaders.vary)return!0;if("*"===this._resHeaders.vary)return!1;const t=this._resHeaders.vary.trim().toLowerCase().split(/\s*,\s*/);for(const n of t)if(e.headers[n]!==this._reqHeaders[n])return!1;return!0}_copyWithoutHopByHopHeaders(e){const t={};for(const n in e)r[n]||(t[n]=e[n]);if(e.connection){const n=e.connection.trim().split(/\s*,\s*/);for(const e of n)delete t[e]}if(t.warning){const e=t.warning.split(/,/).filter((e=>!/^\s*1[0-9][0-9]/.test(e)));e.length?t.warning=e.join(",").trim():delete t.warning}return t}responseHeaders(){const e=this._copyWithoutHopByHopHeaders(this._resHeaders),t=this.age();return t>86400&&!this._hasExplicitExpiration()&&this.maxAge()>86400&&(e.warning=(e.warning?`${e.warning}, `:"")+'113 - "rfc7234 5.5.4"'),e.age=`${Math.round(t)}`,e.date=new Date(this.now()).toUTCString(),e}date(){const e=Date.parse(this._resHeaders.date);return isFinite(e)?e:this._responseTime}age(){return this._ageValue()+(this.now()-this._responseTime)/1e3}_ageValue(){return s(this._resHeaders.age)}maxAge(){if(!this.storable()||this._rescc["no-cache"])return 0;if(this._isShared&&this._resHeaders["set-cookie"]&&!this._rescc.public&&!this._rescc.immutable)return 0;if("*"===this._resHeaders.vary)return 0;if(this._isShared){if(this._rescc["proxy-revalidate"])return 0;if(this._rescc["s-maxage"])return s(this._rescc["s-maxage"])}if(this._rescc["max-age"])return s(this._rescc["max-age"]);const e=this._rescc.immutable?this._immutableMinTtl:0,t=this.date();if(this._resHeaders.expires){const n=Date.parse(this._resHeaders.expires);return Number.isNaN(n)||n<t?0:Math.max(e,(n-t)/1e3)}if(this._resHeaders["last-modified"]){const n=Date.parse(this._resHeaders["last-modified"]);if(isFinite(n)&&t>n)return Math.max(e,(t-n)/1e3*this._cacheHeuristic)}return e}timeToLive(){const e=this.maxAge()-this.age(),t=e+s(this._rescc["stale-if-error"]),n=e+s(this._rescc["stale-while-revalidate"]);return 1e3*Math.max(0,e,t,n)}stale(){return this.maxAge()<=this.age()}_useStaleIfError(){return this.maxAge()+s(this._rescc["stale-if-error"])>this.age()}useStaleWhileRevalidate(){return this.maxAge()+s(this._rescc["stale-while-revalidate"])>this.age()}static fromObject(e){return new this(void 0,void 0,{_fromObject:e})}_fromObject(e){if(this._responseTime)throw Error("Reinitialized");if(!e||1!==e.v)throw Error("Invalid serialization");this._responseTime=e.t,this._isShared=e.sh,this._cacheHeuristic=e.ch,this._immutableMinTtl=void 0!==e.imm?e.imm:864e5,this._status=e.st,this._resHeaders=e.resh,this._rescc=e.rescc,this._method=e.m,this._url=e.u,this._host=e.h,this._noAuthorization=e.a,this._reqHeaders=e.reqh,this._reqcc=e.reqcc}toObject(){return{v:1,t:this._responseTime,sh:this._isShared,ch:this._cacheHeuristic,imm:this._immutableMinTtl,st:this._status,resh:this._resHeaders,rescc:this._rescc,m:this._method,u:this._url,h:this._host,a:this._noAuthorization,reqh:this._reqHeaders,reqcc:this._reqcc}}revalidationHeaders(e){this._assertRequestHasHeaders(e);const t=this._copyWithoutHopByHopHeaders(e.headers);if(delete t["if-range"],!this._requestMatches(e,!0)||!this.storable())return delete t["if-none-match"],delete t["if-modified-since"],t;this._resHeaders.etag&&(t["if-none-match"]=t["if-none-match"]?`${t["if-none-match"]}, ${this._resHeaders.etag}`:this._resHeaders.etag);if(t["accept-ranges"]||t["if-match"]||t["if-unmodified-since"]||this._method&&"GET"!=this._method){if(delete t["if-modified-since"],t["if-none-match"]){const e=t["if-none-match"].split(/,/).filter((e=>!/^\s*W\//.test(e)));e.length?t["if-none-match"]=e.join(",").trim():delete t["if-none-match"]}}else this._resHeaders["last-modified"]&&!t["if-modified-since"]&&(t["if-modified-since"]=this._resHeaders["last-modified"]);return t}revalidatedPolicy(e,t){if(this._assertRequestHasHeaders(e),this._useStaleIfError()&&function(e){return!e||n.has(e.status)}(t))return{modified:!1,matches:!1,policy:this};if(!t||!t.headers)throw Error("Response headers missing");let r=!1;if(void 0!==t.status&&304!=t.status?r=!1:t.headers.etag&&!/^\s*W\//.test(t.headers.etag)?r=this._resHeaders.etag&&this._resHeaders.etag.replace(/^\s*W\//,"")===t.headers.etag:this._resHeaders.etag&&t.headers.etag?r=this._resHeaders.etag.replace(/^\s*W\//,"")===t.headers.etag.replace(/^\s*W\//,""):this._resHeaders["last-modified"]?r=this._resHeaders["last-modified"]===t.headers["last-modified"]:this._resHeaders.etag||this._resHeaders["last-modified"]||t.headers.etag||t.headers["last-modified"]||(r=!0),!r)return{policy:new this.constructor(e,t),modified:304!=t.status,matches:!1};const s={};for(const e in this._resHeaders)s[e]=e in t.headers&&!i[e]?t.headers[e]:this._resHeaders[e];const a=Object.assign({},t,{status:this._status,method:this._method,headers:s});return{policy:new this.constructor(e,a,{shared:this._isShared,cacheHeuristic:this._cacheHeuristic,immutableMinTimeToLive:this._immutableMinTtl}),modified:!1,matches:!0}}}}());function yv(e){return Object.fromEntries(Object.entries(e).map((([e,t])=>[e.toLowerCase(),t])))}class bv extends F{statusCode;headers;body;url;constructor({statusCode:e,headers:t,body:n,url:r}){if("number"!=typeof e)throw new TypeError("Argument `statusCode` should be a number");if("object"!=typeof t)throw new TypeError("Argument `headers` should be an object");if(!(n instanceof Uint8Array))throw new TypeError("Argument `body` should be a buffer");if("string"!=typeof r)throw new TypeError("Argument `url` should be a string");super({read(){this.push(n),this.push(null)}}),this.statusCode=e,this.headers=yv(t),this.body=n,this.url=r}}var vv,wv,xv,_v={};var Ev=function(){if(xv)return wv;xv=1;const e=f,t=(vv||(vv=1,_v.stringify=function e(t){if(void 0===t)return t;if(t&&Buffer.isBuffer(t))return JSON.stringify(":base64:"+t.toString("base64"));if(t&&t.toJSON&&(t=t.toJSON()),t&&"object"==typeof t){var n="",r=Array.isArray(t);n=r?"[":"{";var i=!0;for(var s in t){var a="function"==typeof t[s]||!r&&void 0===t[s];Object.hasOwnProperty.call(t,s)&&!a&&(i||(n+=","),i=!1,r?null==t[s]?n+="null":n+=e(t[s]):void 0!==t[s]&&(n+=e(s)+":"+e(t[s])))}return n+(r?"]":"}")}return"string"==typeof t?JSON.stringify(/^:/.test(t)?":"+t:t):void 0===t?"null":JSON.stringify(t)},_v.parse=function(e){return JSON.parse(e,(function(e,t){return"string"==typeof t?/^:base64:/.test(t)?Buffer.from(t.substring(8),"base64"):/^:/.test(t)?t.substring(1):t:t}))}),_v),n=["sqlite","postgres","mysql","mongo","redis","tiered"];return wv=class extends e{constructor(e,{emitErrors:n=!0,...r}={}){if(super(),this.opts={namespace:"keyv",serialize:t.stringify,deserialize:t.parse,..."string"==typeof e?{uri:e}:e,...r},!this.opts.store){const e={...this.opts};this.opts.store=(e=>{const t={redis:"@keyv/redis",rediss:"@keyv/redis",mongodb:"@keyv/mongo",mongo:"@keyv/mongo",sqlite:"@keyv/sqlite",postgresql:"@keyv/postgres",postgres:"@keyv/postgres",mysql:"@keyv/mysql",etcd:"@keyv/etcd",offline:"@keyv/offline",tiered:"@keyv/tiered"};if(e.adapter||e.uri)return new(Xa(t[e.adapter||/^[^:+]*/.exec(e.uri)[0]]))(e);return new Map})(e)}if(this.opts.compression){const e=this.opts.compression;this.opts.serialize=e.serialize.bind(e),this.opts.deserialize=e.deserialize.bind(e)}"function"==typeof this.opts.store.on&&n&&this.opts.store.on("error",(e=>this.emit("error",e))),this.opts.store.namespace=this.opts.namespace;const i=e=>async function*(){for await(const[t,n]of"function"==typeof e?e(this.opts.store.namespace):e){const e=await this.opts.deserialize(n);this.opts.store.namespace&&!t.includes(this.opts.store.namespace)||("number"==typeof e.expires&&Date.now()>e.expires?this.delete(t):yield[this._getKeyUnprefix(t),e.value])}};"function"==typeof this.opts.store[Symbol.iterator]&&this.opts.store instanceof Map?this.iterator=i(this.opts.store):"function"==typeof this.opts.store.iterator&&this.opts.store.opts&&this._checkIterableAdaptar()&&(this.iterator=i(this.opts.store.iterator.bind(this.opts.store)))}_checkIterableAdaptar(){return n.includes(this.opts.store.opts.dialect)||n.findIndex((e=>this.opts.store.opts.url.includes(e)))>=0}_getKeyPrefix(e){return`${this.opts.namespace}:${e}`}_getKeyPrefixArray(e){return e.map((e=>`${this.opts.namespace}:${e}`))}_getKeyUnprefix(e){return e.split(":").splice(1).join(":")}get(e,t){const{store:n}=this.opts,r=Array.isArray(e),i=r?this._getKeyPrefixArray(e):this._getKeyPrefix(e);if(r&&void 0===n.getMany){const e=[];for(const r of i)e.push(Promise.resolve().then((()=>n.get(r))).then((e=>"string"==typeof e||this.opts.compression?this.opts.deserialize(e):e)).then((e=>{if(null!=e)return"number"==typeof e.expires&&Date.now()>e.expires?this.delete(r).then((()=>{})):t&&t.raw?e:e.value})));return Promise.allSettled(e).then((e=>{const t=[];for(const n of e)t.push(n.value);return t}))}return Promise.resolve().then((()=>r?n.getMany(i):n.get(i))).then((e=>"string"==typeof e||this.opts.compression?this.opts.deserialize(e):e)).then((n=>{if(null!=n)return r?n.map(((n,r)=>{if("string"==typeof n&&(n=this.opts.deserialize(n)),null!=n){if(!("number"==typeof n.expires&&Date.now()>n.expires))return t&&t.raw?n:n.value;this.delete(e[r]).then((()=>{}))}})):"number"==typeof n.expires&&Date.now()>n.expires?this.delete(e).then((()=>{})):t&&t.raw?n:n.value}))}set(e,t,n){const r=this._getKeyPrefix(e);void 0===n&&(n=this.opts.ttl),0===n&&(n=void 0);const{store:i}=this.opts;return Promise.resolve().then((()=>{const e="number"==typeof n?Date.now()+n:null;return"symbol"==typeof t&&this.emit("error","symbol cannot be serialized"),t={value:t,expires:e},this.opts.serialize(t)})).then((e=>i.set(r,e,n))).then((()=>!0))}delete(e){const{store:t}=this.opts;if(Array.isArray(e)){const n=this._getKeyPrefixArray(e);if(void 0===t.deleteMany){const e=[];for(const r of n)e.push(t.delete(r));return Promise.allSettled(e).then((e=>e.every((e=>!0===e.value))))}return Promise.resolve().then((()=>t.deleteMany(n)))}const n=this._getKeyPrefix(e);return Promise.resolve().then((()=>t.delete(n)))}clear(){const{store:e}=this.opts;return Promise.resolve().then((()=>e.clear()))}has(e){const t=this._getKeyPrefix(e),{store:n}=this.opts;return Promise.resolve().then((async()=>{if("function"==typeof n.has)return n.has(t);return void 0!==await n.get(t)}))}disconnect(){const{store:e}=this.opts;if("function"==typeof e.disconnect)return e.disconnect()}},wv}(),Sv=we(Ev);const kv=["aborted","complete","headers","httpVersion","httpVersionMinor","httpVersionMajor","method","rawHeaders","rawTrailers","setTimeout","socket","statusCode","statusMessage","trailers","url"];class Av extends Error{constructor(e){super(e.message),Object.assign(this,e)}}class Tv extends Error{constructor(e){super(e.message),Object.assign(this,e)}}class Mv{constructor(e,t){this.hooks=new Map,this.request=()=>(e,t)=>{let n;if("string"==typeof e)n=Nv(G.parse(e)),e={};else if(e instanceof G.URL)n=Nv(G.parse(e.toString())),e={};else{const[t,...r]=(e.path??"").split("?"),i=r.length>0?`?${r.join("?")}`:"";n=Nv({...e,pathname:t,search:i})}(e={headers:{},method:"GET",cache:!0,strictTtl:!1,automaticFailover:!1,...e,...Iv(n)}).headers=Object.fromEntries(Rv(e.headers).map((([e,t])=>[e.toLowerCase(),t])));const r=new U,i=av(G.format(n),{stripWWW:!1,removeTrailingSlash:!1,stripAuthentication:!1});let s=`${e.method}:${i}`;e.body&&void 0!==e.method&&["POST","PATCH","PUT"].includes(e.method)&&(e.body instanceof H.Readable?e.cache=!1:s+=`:${J.createHash("md5").update(e.body).digest("hex")}`);let a=!1,o=!1;const c=e=>{o=!0;let n=!1,i=()=>{};const c=new Promise((e=>{i=()=>{n||(n=!0,e())}})),u=async n=>{if(a){n.status=n.statusCode;const t=gv.fromObject(a.cachePolicy).revalidatedPolicy(e,n);if(!t.modified){n.resume(),await new Promise((e=>{n.once("end",e)}));const e=Pv(t.policy.responseHeaders());(n=new bv({statusCode:a.statusCode,headers:e,body:a.body,url:a.url})).cachePolicy=t.policy,n.fromCache=!0}}let i;n.fromCache||(n.cachePolicy=new gv(e,n,e),n.fromCache=!1),e.cache&&n.cachePolicy.storable()?(i=Ov(n),(async()=>{try{const t=mv.buffer(n);await Promise.race([c,new Promise((e=>n.once("end",e))),new Promise((e=>n.once("close",e)))]);const r=await t;let i={url:n.url,statusCode:n.fromCache?a.statusCode:n.statusCode,body:r,cachePolicy:n.cachePolicy.toObject()},o=e.strictTtl?n.cachePolicy.timeToLive():void 0;if(e.maxTtl&&(o=o?Math.min(o,e.maxTtl):e.maxTtl),this.hooks.size>0)for(const e of this.hooks.keys())i=await this.runHook(e,i,n);await this.cache.set(s,i,o)}catch(e){r.emit("error",new Tv(e))}})()):e.cache&&a&&(async()=>{try{await this.cache.delete(s)}catch(e){r.emit("error",new Tv(e))}})(),r.emit("response",i??n),"function"==typeof t&&t(i??n)};try{const t=this.cacheRequest(e,u);t.once("error",i),t.once("abort",i),t.once("destroy",i),r.emit("request",t)}catch(e){r.emit("error",new Av(e))}};return(async()=>{const n=async e=>{await Promise.resolve();const n=e.cache?await this.cache.get(s):void 0;if(void 0===n&&!e.forceRefresh)return void c(e);const i=gv.fromObject(n.cachePolicy);if(i.satisfiesWithoutRevalidation(e)&&!e.forceRefresh){const e=Pv(i.responseHeaders()),s=new bv({statusCode:n.statusCode,headers:e,body:n.body,url:n.url});s.cachePolicy=i,s.fromCache=!0,r.emit("response",s),"function"==typeof t&&t(s)}else i.satisfiesWithoutRevalidation(e)&&Date.now()>=i.timeToLive()&&e.forceRefresh?(await this.cache.delete(s),e.headers=i.revalidationHeaders(e),c(e)):(a=n,e.headers=i.revalidationHeaders(e),c(e))},i=e=>r.emit("error",new Tv(e));if(this.cache instanceof Sv){const e=this.cache;e.once("error",i),r.on("error",(()=>e.removeListener("error",i))),r.on("response",(()=>e.removeListener("error",i)))}try{await n(e)}catch(t){e.automaticFailover&&!o&&c(e),r.emit("error",new Tv(t))}})(),r},this.addHook=(e,t)=>{this.hooks.has(e)||this.hooks.set(e,t)},this.removeHook=e=>this.hooks.delete(e),this.getHook=e=>this.hooks.get(e),this.runHook=async(e,...t)=>this.hooks.get(e)?.(...t),this.cache=t instanceof Sv?t:new Sv("string"==typeof t?{uri:t,namespace:"cacheable-request"}:{store:t,namespace:"cacheable-request"}),this.request=this.request.bind(this),this.cacheRequest=e}}const Rv=Object.entries,Ov=e=>{const t=new Y({autoDestroy:!1});return function(e,t){if(t._readableState.autoDestroy)throw new Error("The second stream must have the `autoDestroy` option set to `false`");const n=new Set([...Object.keys(e),...kv]),r={};for(const i of n)i in t||(r[i]={get(){const t=e[i];return"function"==typeof t?t.bind(e):t},set(t){e[i]=t},enumerable:!0,configurable:!1});Object.defineProperties(t,r),e.once("aborted",(()=>{t.destroy(),t.emit("aborted")})),e.once("close",(()=>{e.complete&&t.readable?t.once("end",(()=>{t.emit("close")})):t.emit("close")}))}(e,t),e.pipe(t)},Iv=e=>{const t={...e};return t.path=`${e.pathname||"/"}${e.search||""}`,delete t.pathname,delete t.search,t},Nv=e=>({protocol:e.protocol,auth:e.auth,hostname:e.hostname||e.host||"localhost",port:e.port,pathname:e.pathname,search:e.search}),Pv=e=>{const t=[];for(const n of Object.keys(e))t[n.toLowerCase()]=e[n];return t};var Cv,jv,Lv,Dv;function $v(){if(jv)return Cv;jv=1;const e=["aborted","complete","headers","httpVersion","httpVersionMinor","httpVersionMajor","method","rawHeaders","rawTrailers","setTimeout","socket","statusCode","statusMessage","trailers","url"];return Cv=(t,n)=>{if(n._readableState.autoDestroy)throw new Error("The second stream must have the `autoDestroy` option set to `false`");const r=new Set(Object.keys(t).concat(e)),i={};for(const e of r)e in n||(i[e]={get(){const n=t[e];return"function"==typeof n?n.bind(t):n},set(n){t[e]=n},enumerable:!0,configurable:!1});return Object.defineProperties(n,i),t.once("aborted",(()=>{n.destroy(),n.emit("aborted")})),t.once("close",(()=>{t.complete&&n.readable?n.once("end",(()=>{n.emit("close")})):n.emit("close")})),n}}var Uv=function(){if(Dv)return Lv;Dv=1;const{Transform:e,PassThrough:t}=d,n=m,r=$v();return Lv=i=>{const s=(i.headers["content-encoding"]||"").toLowerCase();if(!["gzip","deflate","br"].includes(s))return i;const a="br"===s;if(a&&"function"!=typeof n.createBrotliDecompress)return i.destroy(new Error("Brotli is not supported on Node.js < 12")),i;let o=!0;const c=new e({transform(e,t,n){o=!1,n(null,e)},flush(e){e()}}),u=new t({autoDestroy:!1,destroy(e,t){i.destroy(),t(e)}}),l=a?n.createBrotliDecompress():n.createUnzip();return l.once("error",(e=>{!o||i.readable?u.destroy(e):u.end()})),r(i,u),i.pipe(c).pipe(l).pipe(u),u}}(),Bv=we(Uv);const zv=e=>"function"==typeof e;const qv=e=>{if(zv(e[Symbol.asyncIterator]))return e;if(zv(e.getReader))return async function*(e){const t=e.getReader();for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}(e);throw new TypeError("Unsupported data source: Expected either ReadableStream or async iterable.")},Hv="abcdefghijklmnopqrstuvwxyz0123456789";const Fv=e=>String(e).replace(/\r|\n/g,((e,t,n)=>"\r"===e&&"\n"!==n[t+1]||"\n"===e&&"\r"!==n[t-1]?"\r\n":e));function Yv(e){if("object"!==(e=>Object.prototype.toString.call(e).slice(8,-1).toLowerCase())(e))return!1;const t=Object.getPrototypeOf(e);if(null==t)return!0;return(t.constructor&&t.constructor.toString())===Object.toString()}function Vv(e,t){if("string"==typeof t)for(const[n,r]of Object.entries(e))if(t.toLowerCase()===n.toLowerCase())return r}const Kv=e=>Boolean(e&&zv(e.constructor)&&"FormData"===e[Symbol.toStringTag]&&zv(e.append)&&zv(e.getAll)&&zv(e.entries)&&zv(e[Symbol.iterator])),Wv=e=>String(e).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22"),Gv=e=>Boolean(e&&"object"==typeof e&&zv(e.constructor)&&"File"===e[Symbol.toStringTag]&&zv(e.stream)&&null!=e.name);var Jv,Zv,Xv,Qv,ew,tw,nw,rw,iw,sw,aw,ow=function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n},cw=function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};const uw={enableAdditionalHeaders:!1},lw={writable:!1,configurable:!1};class dw{constructor(e,t,n){if(Jv.add(this),Zv.set(this,"\r\n"),Xv.set(this,void 0),Qv.set(this,void 0),ew.set(this,"-".repeat(2)),tw.set(this,new TextEncoder),nw.set(this,void 0),rw.set(this,void 0),iw.set(this,void 0),!Kv(e))throw new TypeError("Expected first argument to be a FormData instance.");let r;if(Yv(t)?n=t:r=t,r||(r=function(){let e=16,t="";for(;e--;)t+=Hv[36*Math.random()|0];return t}()),"string"!=typeof r)throw new TypeError("Expected boundary argument to be a string.");if(n&&!Yv(n))throw new TypeError("Expected options argument to be an object.");ow(this,rw,Array.from(e.entries()),"f"),ow(this,iw,{...uw,...n},"f"),ow(this,Xv,cw(this,tw,"f").encode(cw(this,Zv,"f")),"f"),ow(this,Qv,cw(this,Xv,"f").byteLength,"f"),this.boundary=`form-data-boundary-${r}`,this.contentType=`multipart/form-data; boundary=${this.boundary}`,ow(this,nw,cw(this,tw,"f").encode(`${cw(this,ew,"f")}${this.boundary}${cw(this,ew,"f")}${cw(this,Zv,"f").repeat(2)}`),"f");const i={"Content-Type":this.contentType},s=cw(this,Jv,"m",aw).call(this);s&&(this.contentLength=s,i["Content-Length"]=s),this.headers=(e=>new Proxy(e,{get:(e,t)=>Vv(e,t),has:(e,t)=>void 0!==Vv(e,t)}))(Object.freeze(i)),Object.defineProperties(this,{boundary:lw,contentType:lw,contentLength:lw,headers:lw})}getContentLength(){return null==this.contentLength?void 0:Number(this.contentLength)}*values(){for(const[e,t]of cw(this,rw,"f")){const n=Gv(t)?t:cw(this,tw,"f").encode(Fv(t));yield cw(this,Jv,"m",sw).call(this,e,n),yield n,yield cw(this,Xv,"f")}yield cw(this,nw,"f")}async*encode(){for(const e of this.values())Gv(e)?yield*qv(e.stream()):yield e}[(Zv=new WeakMap,Xv=new WeakMap,Qv=new WeakMap,ew=new WeakMap,tw=new WeakMap,nw=new WeakMap,rw=new WeakMap,iw=new WeakMap,Jv=new WeakSet,sw=function(e,t){let n="";n+=`${cw(this,ew,"f")}${this.boundary}${cw(this,Zv,"f")}`,n+=`Content-Disposition: form-data; name="${Wv(e)}"`,Gv(t)&&(n+=`; filename="${Wv(t.name)}"${cw(this,Zv,"f")}`,n+=`Content-Type: ${t.type||"application/octet-stream"}`);const r=Gv(t)?t.size:t.byteLength;return!0!==cw(this,iw,"f").enableAdditionalHeaders||null==r||isNaN(r)||(n+=`${cw(this,Zv,"f")}Content-Length: ${Gv(t)?t.size:t.byteLength}`),cw(this,tw,"f").encode(`${n}${cw(this,Zv,"f").repeat(2)}`)},aw=function(){let e=0;for(const[t,n]of cw(this,rw,"f")){const r=Gv(n)?n:cw(this,tw,"f").encode(Fv(n)),i=Gv(r)?r.size:r.byteLength;if(null==i||isNaN(i))return;e+=cw(this,Jv,"m",sw).call(this,t,r).byteLength,e+=i,e+=cw(this,Qv,"f")}return String(e+cw(this,nw,"f").byteLength)},Symbol.iterator)](){return this.values()}[Symbol.asyncIterator](){return this.encode()}}function pw(e){return Lb.nodeStream(e)&&Lb.function_(e.getBoundary)}function fw(e,t,n){const r={};for(const i of n){const n=(...e)=>{t.emit(i,...e)};r[i]=n,e.on(i,n)}return()=>{for(const[t,n]of Object.entries(r))e.off(t,n)}}const hw=Symbol("reentry"),mw=()=>{};class gw extends Error{constructor(e,t){super(`Timeout awaiting '${t}' for ${e}ms`),Object.defineProperty(this,"event",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name="TimeoutError",this.code="ETIMEDOUT"}}const yw=({attemptCount:e,retryOptions:t,error:n,retryAfter:r,computedValue:i})=>{if("RetryError"===n.name)return 1;if(e>t.limit)return 0;const s=t.methods.includes(n.options.method),a=t.errorCodes.includes(n.code),o=n.response&&t.statusCodes.includes(n.response.statusCode);if(!s||!a&&!o)return 0;if(n.response){if(r)return r>i?0:r;if(413===n.response.statusCode)return 0}const c=Math.random()*t.noise;return Math.min(2**(e-1)*1e3,t.backoffLimit)+c},{Resolver:bw}=te,vw=Symbol("cacheableLookupCreateConnection"),ww=Symbol("cacheableLookupInstance"),xw=Symbol("expires"),_w="number"==typeof ie,Ew=e=>{if(!e||"function"!=typeof e.createConnection)throw new Error("Expected an Agent instance as the first argument")},Sw=()=>{let e=!1,t=!1;for(const n of Object.values(ae.networkInterfaces()))for(const r of n)if(!r.internal&&("IPv6"===r.family?t=!0:e=!0,e&&t))return{has4:e,has6:t};return{has4:e,has6:t}},kw=e=>e.catch((e=>{if("ENODATA"===e.code||"ENOTFOUND"===e.code||"ENOENT"===e.code)return[];throw e})),Aw={ttl:!0},Tw={all:!0},Mw={all:!0,family:4},Rw={all:!0,family:6};class Ow{constructor({cache:e=new Map,maxTtl:t=1/0,fallbackDuration:n=3600,errorTtl:r=.15,resolver:i=new bw,lookup:s=ne}={}){if(this.maxTtl=t,this.errorTtl=r,this._cache=e,this._resolver=i,this._dnsLookup=s&&j(s),this.stats={cache:0,query:0},this._resolver instanceof bw?(this._resolve4=this._resolver.resolve4.bind(this._resolver),this._resolve6=this._resolver.resolve6.bind(this._resolver)):(this._resolve4=j(this._resolver.resolve4.bind(this._resolver)),this._resolve6=j(this._resolver.resolve6.bind(this._resolver))),this._iface=Sw(),this._pending={},this._nextRemovalTime=!1,this._hostnamesToFallback=new Set,this.fallbackDuration=n,n>0){const e=setInterval((()=>{this._hostnamesToFallback.clear()}),1e3*n);e.unref&&e.unref(),this._fallbackInterval=e}this.lookup=this.lookup.bind(this),this.lookupAsync=this.lookupAsync.bind(this)}set servers(e){this.clear(),this._resolver.setServers(e)}get servers(){return this._resolver.getServers()}lookup(e,t,n){if("function"==typeof t?(n=t,t={}):"number"==typeof t&&(t={family:t}),!n)throw new Error("Callback must be a function.");this.lookupAsync(e,t).then((e=>{t.all?n(null,e):n(null,e.address,e.family,e.expires,e.ttl,e.source)}),n)}async lookupAsync(e,t={}){"number"==typeof t&&(t={family:t});let n=await this.query(e);if(6===t.family){const e=n.filter((e=>6===e.family));t.hints&re&&(_w&&t.hints&ie||0===e.length)?(e=>{for(const t of e)6!==t.family&&(t.address=`::ffff:${t.address}`,t.family=6)})(n):n=e}else 4===t.family&&(n=n.filter((e=>4===e.family)));if(t.hints&se){const{_iface:e}=this;n=n.filter((t=>6===t.family?e.has6:e.has4))}if(0===n.length){const t=new Error(`cacheableLookup ENOTFOUND ${e}`);throw t.code="ENOTFOUND",t.hostname=e,t}return t.all?n:n[0]}async query(e){let t="cache",n=await this._cache.get(e);if(n&&this.stats.cache++,!n){const r=this._pending[e];if(r)this.stats.cache++,n=await r;else{t="query";const r=this.queryAndCache(e);this._pending[e]=r,this.stats.query++;try{n=await r}finally{delete this._pending[e]}}}return n=n.map((e=>({...e,source:t}))),n}async _resolve(e){const[t,n]=await Promise.all([kw(this._resolve4(e,Aw)),kw(this._resolve6(e,Aw))]);let r=0,i=0,s=0;const a=Date.now();for(const e of t)e.family=4,e.expires=a+1e3*e.ttl,r=Math.max(r,e.ttl);for(const e of n)e.family=6,e.expires=a+1e3*e.ttl,i=Math.max(i,e.ttl);return s=t.length>0?n.length>0?Math.min(r,i):r:i,{entries:[...t,...n],cacheTtl:s}}async _lookup(e){try{const[t,n]=await Promise.all([kw(this._dnsLookup(e,Mw)),kw(this._dnsLookup(e,Rw))]);return{entries:[...t,...n],cacheTtl:0}}catch{return{entries:[],cacheTtl:0}}}async _set(e,t,n){if(this.maxTtl>0&&n>0){n=1e3*Math.min(n,this.maxTtl),t[xw]=Date.now()+n;try{await this._cache.set(e,t,n)}catch(e){this.lookupAsync=async()=>{const t=new Error("Cache Error. Please recreate the CacheableLookup instance.");throw t.cause=e,t}}r=this._cache,Symbol.iterator in r&&this._tick(n)}var r}async queryAndCache(e){if(this._hostnamesToFallback.has(e))return this._dnsLookup(e,Tw);let t=await this._resolve(e);0===t.entries.length&&this._dnsLookup&&(t=await this._lookup(e),0!==t.entries.length&&this.fallbackDuration>0&&this._hostnamesToFallback.add(e));const n=0===t.entries.length?this.errorTtl:t.cacheTtl;return await this._set(e,t.entries,n),t.entries}_tick(e){const t=this._nextRemovalTime;(!t||e<t)&&(clearTimeout(this._removalTimeout),this._nextRemovalTime=e,this._removalTimeout=setTimeout((()=>{this._nextRemovalTime=!1;let e=1/0;const t=Date.now();for(const[n,r]of this._cache){const i=r[xw];t>=i?this._cache.delete(n):i<e&&(e=i)}e!==1/0&&this._tick(e-t)}),e),this._removalTimeout.unref&&this._removalTimeout.unref())}install(e){if(Ew(e),vw in e)throw new Error("CacheableLookup has been already installed");e[vw]=e.createConnection,e[ww]=this,e.createConnection=(t,n)=>("lookup"in t||(t.lookup=this.lookup),e[vw](t,n))}uninstall(e){if(Ew(e),e[vw]){if(e[ww]!==this)throw new Error("The agent is not owned by this CacheableLookup instance");e.createConnection=e[vw],delete e[vw],delete e[ww]}}updateInterfaceInfo(){const{_iface:e}=this;this._iface=Sw(),(e.has4&&!this._iface.has4||e.has6&&!this._iface.has6)&&this._cache.clear()}clear(e){e?this._cache.delete(e):this._cache.clear()}}var Iw,Nw,Pw,Cw,jw,Lw,Dw,$w,Uw,Bw;function zw(){if(Nw)return Iw;Nw=1;class e{constructor(e={}){if(!(e.maxSize&&e.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");this.maxSize=e.maxSize,this.onEviction=e.onEviction,this.cache=new Map,this.oldCache=new Map,this._size=0}_set(e,t){if(this.cache.set(e,t),this._size++,this._size>=this.maxSize){if(this._size=0,"function"==typeof this.onEviction)for(const[e,t]of this.oldCache.entries())this.onEviction(e,t);this.oldCache=this.cache,this.cache=new Map}}get(e){if(this.cache.has(e))return this.cache.get(e);if(this.oldCache.has(e)){const t=this.oldCache.get(e);return this.oldCache.delete(e),this._set(e,t),t}}set(e,t){return this.cache.has(e)?this.cache.set(e,t):this._set(e,t),this}has(e){return this.cache.has(e)||this.oldCache.has(e)}peek(e){return this.cache.has(e)?this.cache.get(e):this.oldCache.has(e)?this.oldCache.get(e):void 0}delete(e){const t=this.cache.delete(e);return t&&this._size--,this.oldCache.delete(e)||t}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}*keys(){for(const[e]of this)yield e}*values(){for(const[,e]of this)yield e}*[Symbol.iterator](){for(const e of this.cache)yield e;for(const e of this.oldCache){const[t]=e;this.cache.has(t)||(yield e)}}get size(){let e=0;for(const t of this.oldCache.keys())this.cache.has(t)||e++;return Math.min(this._size+e,this.maxSize)}}return Iw=e}function qw(){return Cw||(Cw=1,Pw=e=>{if(0!==e.listenerCount("error"))return e;e.__destroy=e._destroy,e._destroy=(...t)=>{const n=t.pop();e.__destroy(...t,(async e=>{await Promise.resolve(),n(e)}))};const t=t=>{Promise.resolve().then((()=>{e.emit("error",t)}))};return e.once("error",t),Promise.resolve().then((()=>{e.off("error",t)})),e}),Pw}function Hw(){if(Lw)return jw;Lw=1;const{URL:e}=P,t=f,n=ce,r=oe,i=zw(),s=qw(),a=Symbol("currentStreamCount"),o=Symbol("request"),c=Symbol("cachedOriginSet"),u=Symbol("gracefullyClosing"),l=Symbol("length"),d=["createConnection","maxDeflateDynamicTableSize","maxSettings","maxSessionMemory","maxHeaderListPairs","maxOutstandingPings","maxReservedRemoteStreams","maxSendHeaderBlockLength","paddingStrategy","peerMaxConcurrentStreams","settings","family","localAddress","rejectUnauthorized","pskCallback","minDHSize","path","socket","ca","cert","sigalgs","ciphers","clientCertEngine","crl","dhparam","ecdhCurve","honorCipherOrder","key","privateKeyEngine","privateKeyIdentifier","maxVersion","minVersion","pfx","secureOptions","secureProtocol","sessionIdContext","ticketKeys"],p=(e,t)=>e.remoteSettings.maxConcurrentStreams>t.remoteSettings.maxConcurrentStreams,h=(e,t)=>{for(let n=0;n<e.length;n++){const r=e[n];r[c].length>0&&r[c].length<t[c].length&&r[c].every((e=>t[c].includes(e)))&&r[a]+t[a]<=t.remoteSettings.maxConcurrentStreams&&g(r)}},m=(e,t)=>{for(let n=0;n<e.length;n++){const r=e[n];if(t[c].length>0&&t[c].length<r[c].length&&t[c].every((e=>r[c].includes(e)))&&t[a]+r[a]<=r.remoteSettings.maxConcurrentStreams)return g(t),!0}return!1},g=e=>{e[u]=!0,0===e[a]&&e.close()};class y extends t{constructor({timeout:e=0,maxSessions:t=Number.POSITIVE_INFINITY,maxEmptySessions:n=10,maxCachedTlsSessions:r=100}={}){super(),this.sessions={},this.queue={},this.timeout=e,this.maxSessions=t,this.maxEmptySessions=n,this._emptySessionCount=0,this._sessionCount=0,this.settings={enablePush:!1,initialWindowSize:33554432},this.tlsSessionCache=new i({maxSize:r})}get protocol(){return"https:"}normalizeOptions(e){let t="";for(let n=0;n<d.length;n++){const r=d[n];t+=":",e&&void 0!==e[r]&&(t+=e[r])}return t}_processQueue(){if(this._sessionCount>=this.maxSessions)this.closeEmptySessions(this.maxSessions-this._sessionCount+1);else for(const e in this.queue)for(const t in this.queue[e]){const n=this.queue[e][t];n.completed||(n.completed=!0,n())}}_isBetterSession(e,t){return e>t}_accept(e,t,n,r){let i=0;for(;i<t.length&&e[a]<e.remoteSettings.maxConcurrentStreams;)t[i].resolve(e),i++;t.splice(0,i),t.length>0&&(this.getSession(n,r,t),t.length=0)}getSession(t,n,i){return new Promise(((s,d)=>{Array.isArray(i)&&i.length>0?(i=[...i],s()):i=[{resolve:s,reject:d}];try{if("string"==typeof t)t=new e(t);else if(!(t instanceof e))throw new TypeError("The `origin` argument needs to be a string or an URL object");if(n){const{servername:e}=n,{hostname:r}=t;if(e&&r!==e)throw new Error(`Origin ${r} differs from servername ${e}`)}}catch(e){for(let t=0;t<i.length;t++)i[t].reject(e);return}const f=this.normalizeOptions(n),g=t.origin;if(f in this.sessions){const e=this.sessions[f];let t,r=-1,s=-1;for(let n=0;n<e.length;n++){const i=e[n],o=i.remoteSettings.maxConcurrentStreams;if(o<r)break;if(!i[c].includes(g))continue;const l=i[a];l>=o||i[u]||i.destroyed||(t||(r=o),this._isBetterSession(l,s)&&(t=i,s=l))}if(t)return void this._accept(t,i,g,n)}if(f in this.queue){if(g in this.queue[f])return void this.queue[f][g].listeners.push(...i)}else this.queue[f]={[l]:0};const y=()=>{f in this.queue&&this.queue[f][g]===b&&(delete this.queue[f][g],0==--this.queue[f][l]&&delete this.queue[f])},b=async()=>{this._sessionCount++;const e=`${g}:${f}`;let s,d=!1;try{const v={...n};void 0===v.settings&&(v.settings=this.settings),void 0===v.session&&(v.session=this.tlsSessionCache.get(e));const w=v.createConnection||this.createConnection;s=await w.call(this,t,v),v.createConnection=()=>s;const x=r.connect(t,v);x[a]=0,x[u]=!1;const _=()=>{const{socket:e}=x;let t;return!1===e.servername?(e.servername=e.remoteAddress,t=x.originSet,e.servername=!1):t=x.originSet,t},E=()=>x[a]<x.remoteSettings.maxConcurrentStreams;x.socket.once("session",(t=>{this.tlsSessionCache.set(e,t)})),x.once("error",(t=>{for(let e=0;e<i.length;e++)i[e].reject(t);this.tlsSessionCache.delete(e)})),x.setTimeout(this.timeout,(()=>{x.destroy()})),x.once("close",(()=>{if(this._sessionCount--,d){this._emptySessionCount--;const e=this.sessions[f];1===e.length?delete this.sessions[f]:e.splice(e.indexOf(x),1)}else{y();const e=new Error("Session closed without receiving a SETTINGS frame");e.code="HTTP2WRAPPER_NOSETTINGS";for(let t=0;t<i.length;t++)i[t].reject(e)}this._processQueue()}));const S=()=>{const e=this.queue[f];if(!e)return;const t=x[c];for(let n=0;n<t.length;n++){const r=t[n];if(r in e){const{listeners:t,completed:n}=e[r];let i=0;for(;i<t.length&&E();)t[i].resolve(x),i++;if(e[r].listeners.splice(0,i),0===e[r].listeners.length&&!n&&(delete e[r],0==--e[l])){delete this.queue[f];break}if(!E())break}}};x.on("origin",(()=>{x[c]=_()||[],x[u]=!1,m(this.sessions[f],x),!x[u]&&E()&&(S(),E()&&h(this.sessions[f],x))})),x.once("remoteSettings",(()=>{if(b.destroyed){const e=new Error("Agent has been destroyed");for(let t=0;t<i.length;t++)i[t].reject(e);x.destroy()}else{if(x.setLocalWindowSize&&x.setLocalWindowSize(4194304),x[c]=_()||[],x.socket.encrypted){const e=x[c][0];if(e!==g){const t=new Error(`Requested origin ${g} does not match server ${e}`);for(let e=0;e<i.length;e++)i[e].reject(t);return void x.destroy()}}y();{const e=this.sessions;if(f in e){const t=e[f];t.splice(((e,t,n)=>{let r=0,i=e.length;for(;r<i;){const s=r+i>>>1;n(e[s],t)?r=s+1:i=s}return r})(t,x,p),0,x)}else e[f]=[x]}d=!0,this._emptySessionCount++,this.emit("session",x),this._accept(x,i,g,n),0===x[a]&&this._emptySessionCount>this.maxEmptySessions&&this.closeEmptySessions(this._emptySessionCount-this.maxEmptySessions),x.on("remoteSettings",(()=>{E()&&(S(),E()&&h(this.sessions[f],x))}))}})),x[o]=x.request,x.request=(e,t)=>{if(x[u])throw new Error("The session is gracefully closing. No new streams are allowed.");const n=x[o](e,t);return x.ref(),0==x[a]++&&this._emptySessionCount--,n.once("close",(()=>{0==--x[a]&&(this._emptySessionCount++,x.unref(),this._emptySessionCount>this.maxEmptySessions||x[u])?x.close():x.destroyed||x.closed||E()&&!m(this.sessions[f],x)&&(h(this.sessions[f],x),S(),0===x[a]&&this._processQueue())})),n}}catch(e){y(),this._sessionCount--;for(let t=0;t<i.length;t++)i[t].reject(e)}};b.listeners=i,b.completed=!1,b.destroyed=!1,this.queue[f][g]=b,this.queue[f][l]++,this._processQueue()}))}request(e,t,n,r){return new Promise(((i,a)=>{this.getSession(e,t,[{reject:a,resolve:e=>{try{const t=e.request(n,r);s(t),i(t)}catch(e){a(e)}}}])}))}async createConnection(e,t){return y.connect(e,t)}static connect(e,t){t.ALPNProtocols=["h2"];const r=e.port||443,i=e.hostname;void 0===t.servername&&(t.servername=i);const s=n.connect(r,i,t);return t.socket&&(s._peername={family:void 0,address:void 0,port:r}),s}closeEmptySessions(e=Number.POSITIVE_INFINITY){let t=0;const{sessions:n}=this;for(const r in n){const i=n[r];for(let n=0;n<i.length;n++){const r=i[n];if(0===r[a]&&(t++,r.close(),t>=e))return t}}return t}destroy(e){const{sessions:t,queue:n}=this;for(const n in t){const r=t[n];for(let t=0;t<r.length;t++)r[t].destroy(e)}for(const e in n){const t=n[e];for(const e in t)t[e].destroyed=!0}this.queue={},this.tlsSessionCache.clear()}get emptySessionCount(){return this._emptySessionCount}get pendingSessionCount(){return this._sessionCount-this._emptySessionCount}get sessionCount(){return this._sessionCount}}return y.kCurrentStreamCount=a,y.kGracefullyClosing=u,jw={Agent:y,globalAgent:new y}}function Fw(){if($w)return Dw;$w=1;const{Readable:e}=d;return Dw=class extends e{constructor(e,t){super({emitClose:!1,autoDestroy:!0,highWaterMark:t}),this.statusCode=null,this.statusMessage="",this.httpVersion="2.0",this.httpVersionMajor=2,this.httpVersionMinor=0,this.headers={},this.trailers={},this.req=null,this.aborted=!1,this.complete=!1,this.upgrade=null,this.rawHeaders=[],this.rawTrailers=[],this.socket=e,this._dumped=!1}get connection(){return this.socket}set connection(e){this.socket=e}_destroy(e,t){this.readableEnded||(this.aborted=!0),t(),this.req._request.destroy(e)}setTimeout(e,t){return this.req.setTimeout(e,t),this}_dump(){this._dumped||(this._dumped=!0,this.removeAllListeners("data"),this.resume())}_read(){this.req&&this.req._request.resume()}},Dw}function Yw(){return Bw?Uw:(Bw=1,Uw=(e,t,n)=>{for(const r of n)e.on(r,((...e)=>t.emit(r,...e)))})}var Vw,Kw,Ww,Gw,Jw,Zw,Xw,Qw,ex,tx,nx,rx={exports:{}};function ix(){return Vw||(Vw=1,function(e){const t=(t,n,r)=>{e.exports[n]=class extends t{constructor(...e){super("string"==typeof r?r:r(e)),this.name=`${super.name} [${n}]`,this.code=n}}};t(TypeError,"ERR_INVALID_ARG_TYPE",(e=>{const t=e[0].includes(".")?"property":"argument";let n=e[1];const r=Array.isArray(n);return r&&(n=`${n.slice(0,-1).join(", ")} or ${n.slice(-1)}`),`The "${e[0]}" ${t} must be ${r?"one of":"of"} type ${n}. Received ${typeof e[2]}`})),t(TypeError,"ERR_INVALID_PROTOCOL",(e=>`Protocol "${e[0]}" not supported. Expected "${e[1]}"`)),t(Error,"ERR_HTTP_HEADERS_SENT",(e=>`Cannot ${e[0]} headers after they are sent to the client`)),t(TypeError,"ERR_INVALID_HTTP_TOKEN",(e=>`${e[0]} must be a valid HTTP token [${e[1]}]`)),t(TypeError,"ERR_HTTP_INVALID_HEADER_VALUE",(e=>`Invalid value "${e[0]} for header "${e[1]}"`)),t(TypeError,"ERR_INVALID_CHAR",(e=>`Invalid character in ${e[0]} [${e[1]}]`)),t(Error,"ERR_HTTP2_NO_SOCKET_MANIPULATION","HTTP/2 sockets should not be directly manipulated (e.g. read and written)")}(rx)),rx.exports}function sx(){return Ww?Kw:(Ww=1,Kw=e=>{switch(e){case":method":case":scheme":case":authority":case":path":return!0;default:return!1}})}function ax(){if(Jw)return Gw;Jw=1;const{ERR_INVALID_HTTP_TOKEN:e}=ix(),t=sx(),n=/^[\^`\-\w!#$%&*+.|~]+$/;return Gw=r=>{if("string"!=typeof r||!n.test(r)&&!t(r))throw new e("Header name",r)}}function ox(){if(Xw)return Zw;Xw=1;const{ERR_HTTP_INVALID_HEADER_VALUE:e,ERR_INVALID_CHAR:t}=ix(),n=/[^\t\u0020-\u007E\u0080-\u00FF]/;return Zw=(r,i)=>{if(void 0===i)throw new e(i,r);if(n.test(i))throw new t("header content",r)}}function cx(){if(nx)return tx;nx=1;const{URL:e,urlToHttpOptions:t}=P,n=oe,{Writable:r}=d,{Agent:i,globalAgent:s}=Hw(),a=Fw(),o=Yw(),{ERR_INVALID_ARG_TYPE:c,ERR_INVALID_PROTOCOL:u,ERR_HTTP_HEADERS_SENT:l}=ix(),p=ax(),f=ox(),h=function(){if(ex)return Qw;ex=1;const{ERR_HTTP2_NO_SOCKET_MANIPULATION:e}=ix(),t={has(e,t){const n=void 0===e.session?e:e.session.socket;return t in e||t in n},get(t,n){switch(n){case"on":case"once":case"end":case"emit":case"destroy":return t[n].bind(t);case"writable":case"destroyed":return t[n];case"readable":return!t.destroyed&&t.readable;case"setTimeout":{const{session:e}=t;return void 0!==e?e.setTimeout.bind(e):t.setTimeout.bind(t)}case"write":case"read":case"pause":case"resume":throw new e;default:{const e=void 0===t.session?t:t.session.socket,r=e[n];return"function"==typeof r?r.bind(e):r}}},getPrototypeOf:e=>void 0!==e.session?Reflect.getPrototypeOf(e.session.socket):Reflect.getPrototypeOf(e),set(t,n,r){switch(n){case"writable":case"readable":case"destroyed":case"on":case"once":case"end":case"emit":case"destroy":return t[n]=r,!0;case"setTimeout":{const{session:e}=t;return void 0===e?t.setTimeout=r:e.setTimeout=r,!0}case"write":case"read":case"pause":case"resume":throw new e;default:return(void 0===t.session?t:t.session.socket)[n]=r,!0}}};return Qw=t}(),{HTTP2_HEADER_STATUS:m,HTTP2_HEADER_METHOD:g,HTTP2_HEADER_PATH:y,HTTP2_HEADER_AUTHORITY:b,HTTP2_METHOD_CONNECT:v}=n.constants,w=Symbol("headers"),x=Symbol("origin"),_=Symbol("session"),E=Symbol("options"),S=Symbol("flushedHeaders"),k=Symbol("jobs"),A=Symbol("pendingAgentPromise");return tx=class extends r{constructor(n,r,a){if(super({autoDestroy:!1,emitClose:!1}),n="string"==typeof n?t(new e(n)):n instanceof e?t(n):{...n},"function"==typeof r||void 0===r?(a=r,r=n):r=Object.assign(n,r),r.h2session){if(this[_]=r.h2session,this[_].destroyed)throw new Error("The session has been closed already");this.protocol=this[_].socket.encrypted?"https:":"http:"}else if(!1===r.agent)this.agent=new i({maxEmptySessions:0});else if(void 0===r.agent||null===r.agent)this.agent=s;else{if("function"!=typeof r.agent.request)throw new c("options.agent",["http2wrapper.Agent-like Object","undefined","false"],r.agent);this.agent=r.agent}if(this.agent&&(this.protocol=this.agent.protocol),r.protocol&&r.protocol!==this.protocol)throw new u(r.protocol,this.protocol);r.port||(r.port=r.defaultPort||this.agent&&this.agent.defaultPort||443),r.host=r.hostname||r.host||"localhost",delete r.hostname;const{timeout:o}=r;r.timeout=void 0,this[w]=Object.create(null),this[k]=[],this[A]=void 0,this.socket=null,this.connection=null,this.method=r.method||"GET",("CONNECT"!==this.method||"/"!==r.path&&void 0!==r.path)&&(this.path=r.path),this.res=null,this.aborted=!1,this.reusedSocket=!1;const{headers:l}=r;if(l)for(const e in l)this.setHeader(e,l[e]);r.auth&&!("authorization"in this[w])&&(this[w].authorization="Basic "+Buffer.from(r.auth).toString("base64")),r.session=r.tlsSession,r.path=r.socketPath,this[E]=r,this[x]=new e(`${this.protocol}//${r.servername||r.host}:${r.port}`);const d=r._reuseSocket;d&&(r.createConnection=(...e)=>d.destroyed?this.agent.createConnection(...e):d,this.agent.getSession(this[x],this[E]).catch((()=>{}))),o&&this.setTimeout(o),a&&this.once("response",a),this[S]=!1}get method(){return this[w][g]}set method(e){e&&(this[w][g]=e.toUpperCase())}get path(){const e="CONNECT"===this.method?b:y;return this[w][e]}set path(e){if(e){const t="CONNECT"===this.method?b:y;this[w][t]=e}}get host(){return this[x].hostname}set host(e){}get _mustNotHaveABody(){return"GET"===this.method||"HEAD"===this.method||"DELETE"===this.method}_write(e,t,n){if(this._mustNotHaveABody)return void n(new Error("The GET, HEAD and DELETE methods must NOT have a body"));this.flushHeaders();const r=()=>this._request.write(e,t,n);this._request?r():this[k].push(r)}_final(e){this.flushHeaders();const t=()=>{this._mustNotHaveABody||"CONNECT"===this.method?e():this._request.end(e)};this._request?t():this[k].push(t)}abort(){this.res&&this.res.complete||(this.aborted||process.nextTick((()=>this.emit("abort"))),this.aborted=!0,this.destroy())}async _destroy(e,t){this.res&&this.res._dump(),this._request?this._request.destroy():process.nextTick((()=>{this.emit("close")}));try{await this[A]}catch(t){this.aborted&&(e=t)}t(e)}async flushHeaders(){if(this[S]||this.destroyed)return;this[S]=!0;const e=this.method===v,t=t=>{if(this._request=t,this.destroyed)return void t.destroy();e||o(t,this,["timeout","continue"]),t.once("error",(e=>{this.destroy(e)})),t.once("aborted",(()=>{const{res:e}=this;e?(e.aborted=!0,e.emit("aborted"),e.destroy()):this.destroy(new Error("The server aborted the HTTP/2 stream"))}));const n=(n,r,i)=>{const s=new a(this.socket,t.readableHighWaterMark);this.res=s,s.url=`${this[x].origin}${this.path}`,s.req=this,s.statusCode=n[m],s.headers=n,s.rawHeaders=i,s.once("end",(()=>{s.complete=!0,s.socket=null,s.connection=null})),e?(s.upgrade=!0,this.emit("connect",s,t,Buffer.alloc(0))?this.emit("close"):t.destroy()):(t.on("data",(e=>{s._dumped||s.push(e)||t.pause()})),t.once("end",(()=>{this.aborted||s.push(null)})),this.emit("response",s)||s._dump())};t.once("response",n),t.once("headers",(e=>this.emit("information",{statusCode:e[m]}))),t.once("trailers",((e,t,r)=>{const{res:i}=this;null!==i?(i.trailers=e,i.rawTrailers=r):n(e,0,r)})),t.once("close",(()=>{const{aborted:e,res:t}=this;if(t){e&&(t.aborted=!0,t.emit("aborted"),t.destroy());const n=()=>{t.emit("close"),this.destroy(),this.emit("close")};t.readable?t.once("end",n):n()}else{if(!this.destroyed)return this.destroy(new Error("The HTTP/2 stream has been early terminated")),void this.emit("close");this.destroy(),this.emit("close")}})),this.socket=new Proxy(t,h);for(const e of this[k])e();this[k].length=0,this.emit("socket",this.socket)};if(b in this[w]||e||(this[w][b]=this[x].host),this[_])try{t(this[_].request(this[w]))}catch(e){this.destroy(e)}else{this.reusedSocket=!0;try{const e=this.agent.request(this[x],this[E],this[w]);this[A]=e,t(await e),this[A]=!1}catch(e){this[A]=!1,this.destroy(e)}}}get connection(){return this.socket}set connection(e){this.socket=e}getHeaderNames(){return Object.keys(this[w])}hasHeader(e){if("string"!=typeof e)throw new c("name","string",e);return Boolean(this[w][e.toLowerCase()])}getHeader(e){if("string"!=typeof e)throw new c("name","string",e);return this[w][e.toLowerCase()]}get headersSent(){return this[S]}removeHeader(e){if("string"!=typeof e)throw new c("name","string",e);if(this.headersSent)throw new l("remove");delete this[w][e.toLowerCase()]}setHeader(e,t){if(this.headersSent)throw new l("set");p(e),f(e,t);const n=e.toLowerCase();if("connection"===n){if("keep-alive"===t.toLowerCase())return;throw new Error(`Invalid 'connection' header: ${t}`)}"host"===n&&"CONNECT"===this.method?this[w][b]=t:this[w][n]=t}setNoDelay(){}setSocketKeepAlive(){}setTimeout(e,t){const n=()=>this._request.setTimeout(e,t);return this._request?n():this[k].push(n),this}get maxHeadersCount(){if(!this.destroyed&&this._request)return this._request.session.localSettings.maxHeaderListSize}set maxHeadersCount(e){}},tx}var ux,lx,dx,px,fx,hx,mx,gx,yx,bx,vx,wx,xx,_x,Ex,Sx,kx,Ax,Tx,Mx,Rx,Ox,Ix,Nx,Px,Cx={exports:{}};function jx(){if(px)return dx;px=1;const{isIP:e}=ue,t=T;return dx=n=>{const r=(e=>{if("["===e[0]){const n=e.indexOf("]");return t(-1!==n),e.slice(1,n)}const n=e.indexOf(":");return-1===n?e:e.slice(0,n)})(n);return e(r)?"":r}}function Lx(){if(fx)return Cx.exports;fx=1;const{URL:e,urlToHttpOptions:t}=P,n=b,r=w,i=function(){if(lx)return ux;lx=1;const e=ce;return ux=(t={},n=e.connect)=>new Promise(((e,r)=>{let i,s=!1;const a=async()=>{await c,i.off("timeout",o),i.off("error",r),t.resolveSocket?(e({alpnProtocol:i.alpnProtocol,socket:i,timeout:s}),s&&(await Promise.resolve(),i.emit("timeout"))):(i.destroy(),e({alpnProtocol:i.alpnProtocol,timeout:s}))},o=async()=>{s=!0,a()},c=(async()=>{try{i=await n(t,a),i.on("error",r),i.once("timeout",o)}catch(e){r(e)}})()})),ux}(),s=zw(),{Agent:a,globalAgent:o}=Hw(),c=cx(),u=jx(),l=qw(),d=new s({maxSize:100}),p=new Map,f=(e,t=new Map,n=void 0)=>async r=>{const s=`${r.host}:${r.port}:${r.ALPNProtocols.sort()}`;if(!e.has(s)){if(t.has(s)){return{alpnProtocol:(await t.get(s)).alpnProtocol}}const{path:a}=r;r.path=r.socketPath;const o=i(r,n);t.set(s,o);try{const n=await o;return e.set(s,n.alpnProtocol),t.delete(s),r.path=a,n}catch(e){throw t.delete(s),r.path=a,e}}return{alpnProtocol:e.get(s)}},h=f(d,p);return Cx.exports=async(i,s,d)=>{if(i="string"==typeof i?t(new e(i)):i instanceof e?t(i):{...i},"function"==typeof s||void 0===s?(d=s,s=i):s=Object.assign(i,s),s.ALPNProtocols=s.ALPNProtocols||["h2","http/1.1"],!Array.isArray(s.ALPNProtocols)||0===s.ALPNProtocols.length)throw new Error("The `ALPNProtocols` option must be an Array with at least one entry");s.protocol=s.protocol||"https:";const p="https:"===s.protocol;s.host=s.hostname||s.host||"localhost",s.session=s.tlsSession,s.servername=s.servername||u(s.headers&&s.headers.host||s.host),s.port=s.port||(p?443:80),s._defaultAgent=p?r.globalAgent:n.globalAgent;const f=s.resolveProtocol||h;let{agent:m}=s;if(void 0!==m&&!1!==m&&"Object"!==m.constructor.name)throw new Error("The `options.agent` can be only an object `http`, `https` or `http2` properties");if(p){s.resolveSocket=!0;let{socket:e,alpnProtocol:t,timeout:n}=await f(s);if(n){e&&e.destroy();const t=new Error(`Timed out resolving ALPN: ${s.timeout} ms`);throw t.code="ETIMEDOUT",t.ms=s.timeout,t}e&&s.createConnection&&(e.destroy(),e=void 0),delete s.resolveSocket;const i="h2"===t;if(m&&(m=i?m.http2:m.https,s.agent=m),void 0===m&&(m=i?o:r.globalAgent),e)if(!1===m)e.destroy();else{const t=(i?a:r.Agent).prototype.createConnection;m.createConnection===t?i?s._reuseSocket=e:((e,t,n)=>{t._httpMessage={shouldKeepAlive:!0};const r=()=>{e.emit("free",t,n)};t.on("free",r);const i=()=>{e.removeSocket(t,n)};t.on("close",i);const s=()=>{const{freeSockets:n}=e;for(const e of Object.values(n))if(e.includes(t))return void t.destroy()};t.on("timeout",s);const a=()=>{e.removeSocket(t,n),t.off("close",i),t.off("free",r),t.off("timeout",s),t.off("agentRemove",a)};t.on("agentRemove",a),e.emit("free",t,n)})(m,e,s):e.destroy()}if(i)return l(new c(s,d))}else m&&(s.agent=m.http);return s.headers&&(s.headers={...s.headers},s.headers[":authority"]&&(s.headers.host||(s.headers.host=s.headers[":authority"]),delete s.headers[":authority"]),delete s.headers[":method"],delete s.headers[":scheme"],delete s.headers[":path"]),l(n.request(s,d))},Cx.exports.protocolCache=d,Cx.exports.resolveProtocol=h,Cx.exports.createResolveProtocol=f,Cx.exports}function Dx(){if(mx)return hx;mx=1;const e=d,t=new ce.TLSSocket(new e.PassThrough)._handle._parentWrap.constructor;return hx=t}function $x(){if(yx)return gx;yx=1;class e extends Error{constructor(e,t=""){super(`The proxy server rejected the request with status code ${e} (${t||"empty status message"})`),this.statusCode=e,this.statusMessage=t}}return gx=e}function Ux(){if(xx)return wx;xx=1;const{URL:e}=P,t=(vx||(vx=1,bx=(e,t,n)=>{const r=n.some((e=>"string"==typeof e?typeof t===e:t instanceof e));if(!r){const r=n.map((e=>"string"==typeof e?e:e.name));throw new TypeError(`Expected '${e}' to be a type of ${r.join(" or ")}, got ${typeof t}`)}}),bx);return wx=(n,r)=>{t("proxyOptions",r,["object"]),t("proxyOptions.headers",r.headers,["object","undefined"]),t("proxyOptions.raw",r.raw,["boolean","undefined"]),t("proxyOptions.url",r.url,[e,"string"]);const i=new e(r.url);n.proxyOptions={raw:!0,...r,headers:{...r.headers},url:i}}}function Bx(){return Ex?_x:(Ex=1,_x=e=>{const{username:t,password:n}=e.proxyOptions.url;if(t||n){const e=`${t}:${n}`,r=`Basic ${Buffer.from(e).toString("base64")}`;return{"proxy-authorization":r,authorization:r}}return{}})}function zx(){if(Tx)return Ax;Tx=1;const{Agent:e}=Hw(),t=Dx(),n=$x(),r=Ux();return Ax=class extends e{constructor(e){super(e),r(this,e.proxyOptions)}async createConnection(e,r){const i=`${e.hostname}:${e.port||443}`,[s,a,o]=await this._getProxyStream(i);if(200!==a)throw new n(a,o);if(!this.proxyOptions.raw){const e=new t(s);return e.encrypted=!1,e._handle.getpeername=e=>{e.family=void 0,e.address=void 0,e.port=void 0},e}return r.socket=s,super.createConnection(e,r)}},Ax}function qx(){if(Rx)return Mx;Rx=1;const{globalAgent:e}=Hw(),t=zx(),n=Bx();return Mx=class extends t{async _getProxyStream(t){const{proxyOptions:r}=this,i={...n(this),...r.headers,":method":"CONNECT",":authority":t},s=await e.request(r.url,r,i),a=await(e=>new Promise(((t,n)=>{e.once("error",n),e.once("response",(r=>{e.off("error",n),t(r[":status"])}))})))(s);return[s,a,""]}},Mx}function Hx(){if(Ix)return Ox;Ix=1;const e=b,t=w,n=zx(),r=Bx();class i extends n{async _getProxyStream(n){const{proxyOptions:i}=this,{url:s,headers:a}=this.proxyOptions;return(e=>new Promise(((t,n)=>{e.once("error",n),e.once("connect",((r,i,s)=>{i.unshift(s),e.off("error",n),t([i,r.statusCode,r.statusMessage])}))})))(("https:"===s.protocol?t:e).request({...i,hostname:s.hostname,port:s.port,path:n,headers:{...r(this),...a,host:n},method:"CONNECT"}).end())}}return Ox={Http2OverHttp:i,Http2OverHttps:i}}var Fx=function(){if(Px)return Nx;Px=1;const e=oe,{Agent:t,globalAgent:n}=Hw(),r=cx(),i=Fw(),s=Lx(),{HttpOverHttp2:a,HttpsOverHttp2:o}=function(){if(kx)return Sx;kx=1;const e=ce,t=b,n=w,r=Dx(),{globalAgent:i}=Hw(),s=$x(),a=Ux(),o=Bx(),c=(t,a,c)=>{(async()=>{try{const{proxyOptions:u}=t,{url:l,headers:d,raw:p}=u,f=await i.request(l,u,{...o(t),...d,":method":"CONNECT",":authority":`${a.host}:${a.port}`});f.once("error",c),f.once("response",(i=>{const o=i[":status"];if(200!==o)return void c(new s(o,""));const u=t instanceof n.Agent;if(p&&u){a.socket=f;const t=e.connect(a);return t.once("close",(()=>{f.destroy()})),void c(null,t)}const l=new r(f);l.encrypted=!1,l._handle.getpeername=e=>{e.family=void 0,e.address=void 0,e.port=void 0},c(null,l)}))}catch(e){c(e)}})()};class u extends t.Agent{constructor(e){super(e),a(this,e.proxyOptions)}createConnection(e,t){c(this,e,t)}}class l extends n.Agent{constructor(e){super(e),a(this,e.proxyOptions)}createConnection(e,t){c(this,e,t)}}return Sx={HttpOverHttp2:u,HttpsOverHttp2:l}}(),c=qx(),{Http2OverHttp:u,Http2OverHttps:l}=Hx(),d=ax(),p=ox();return Nx={...e,ClientRequest:r,IncomingMessage:i,Agent:t,globalAgent:n,request:(e,t,n)=>new r(e,t,n),get:(e,t,n)=>{const i=new r(e,t,n);return i.end(),i},auto:s,proxies:{HttpOverHttp2:a,HttpsOverHttp2:o,Http2OverHttp2:c,Http2OverHttp:u,Http2OverHttps:l},validateHeaderName:d,validateHeaderValue:p},Nx}(),Yx=we(Fx);const[Vx,Kx]=z.versions.node.split(".").map(Number);const Wx=new Map;let Gx;const Jx={request:void 0,agent:{http:void 0,https:void 0,http2:void 0},h2session:void 0,decompress:!0,timeout:{connect:void 0,lookup:void 0,read:void 0,request:void 0,response:void 0,secureConnect:void 0,send:void 0,socket:void 0},prefixUrl:"",body:void 0,form:void 0,json:void 0,cookieJar:void 0,ignoreInvalidCookies:!1,searchParams:void 0,dnsLookup:void 0,dnsCache:void 0,context:{},hooks:{init:[],beforeRequest:[],beforeError:[],beforeRedirect:[],beforeRetry:[],afterResponse:[]},followRedirect:!0,maxRedirects:10,cache:void 0,throwHttpErrors:!0,username:"",password:"",http2:!1,allowGetBody:!1,headers:{"user-agent":"got (https://github.com/sindresorhus/got)"},methodRewriting:!1,dnsLookupIpVersion:void 0,parseJson:JSON.parse,stringifyJson:JSON.stringify,retry:{limit:2,methods:["GET","PUT","HEAD","DELETE","OPTIONS","TRACE"],statusCodes:[408,413,429,500,502,503,504,521,522,524],errorCodes:["ETIMEDOUT","ECONNRESET","EADDRINUSE","ECONNREFUSED","EPIPE","ENOTFOUND","ENETUNREACH","EAI_AGAIN"],maxRetryAfter:void 0,calculateDelay:({computedValue:e})=>e,backoffLimit:Number.POSITIVE_INFINITY,noise:100},localAddress:void 0,method:"GET",createConnection:void 0,cacheOptions:{shared:void 0,cacheHeuristic:void 0,immutableMinTimeToLive:void 0,ignoreCargoCult:void 0},https:{alpnProtocols:void 0,rejectUnauthorized:void 0,checkServerIdentity:void 0,certificateAuthority:void 0,key:void 0,certificate:void 0,passphrase:void 0,pfx:void 0,ciphers:void 0,honorCipherOrder:void 0,minVersion:void 0,maxVersion:void 0,signatureAlgorithms:void 0,tlsSessionLifetime:void 0,dhparam:void 0,ecdhCurve:void 0,certificateRevocationLists:void 0},encoding:void 0,resolveBodyOnly:!1,isStream:!1,responseType:"text",url:void 0,pagination:{transform:e=>"json"===e.request.options.responseType?e.body:JSON.parse(e.body),paginate({response:e}){const t=e.headers.link;if("string"!=typeof t||""===t.trim())return!1;const n=function(e){const t=[],n=e.split(",");for(const r of n){const[n,...i]=r.split(";"),s=n.trim();if("<"!==s[0]||">"!==s[s.length-1])throw new Error(`Invalid format of the Link header reference: ${s}`);const a=s.slice(1,-1),o={};if(0===i.length)throw new Error(`Unexpected end of Link header parameters: ${i.join(";")}`);for(const t of i){const n=t.trim(),r=n.indexOf("=");if(-1===r)throw new Error(`Failed to parse Link header: ${e}`);const i=n.slice(0,r).trim(),s=n.slice(r+1).trim();o[i]=s}t.push({reference:a,parameters:o})}return t}(t).find((e=>"next"===e.parameters.rel||'"next"'===e.parameters.rel));return!!n&&{url:new URL(n.reference,e.url)}},filter:()=>!0,shouldContinue:()=>!0,countLimit:Number.POSITIVE_INFINITY,backoff:0,requestLimit:1e4,stackAllItems:!1},setHost:!0,maxHeaderSize:void 0,signal:void 0,enableUnixSockets:!1},Zx=e=>{const t=[e.timeout.socket,e.timeout.connect,e.timeout.lookup,e.timeout.request,e.timeout.secureConnect].filter((e=>"number"==typeof e));if(t.length>0)return Math.min(...t)},Xx=(e,t,n)=>{const r=e.hooks?.init;if(r)for(const e of r)e(t,n)};class Qx{constructor(e,t,n){if(Object.defineProperty(this,"_unixOptions",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_internals",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_merging",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_init",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),qb.any([Lb.string,Lb.urlInstance,Lb.object,Lb.undefined],e),qb.any([Lb.object,Lb.undefined],t),qb.any([Lb.object,Lb.undefined],n),e instanceof Qx||t instanceof Qx)throw new TypeError("The defaults must be passed as the third argument");this._internals=(e=>{const{hooks:t,retry:n}=e,r={...e,context:{...e.context},cacheOptions:{...e.cacheOptions},https:{...e.https},agent:{...e.agent},headers:{...e.headers},retry:{...n,errorCodes:[...n.errorCodes],methods:[...n.methods],statusCodes:[...n.statusCodes]},timeout:{...e.timeout},hooks:{init:[...t.init],beforeRequest:[...t.beforeRequest],beforeError:[...t.beforeError],beforeRedirect:[...t.beforeRedirect],beforeRetry:[...t.beforeRetry],afterResponse:[...t.afterResponse]},searchParams:e.searchParams?new URLSearchParams(e.searchParams):void 0,pagination:{...e.pagination}};return void 0!==r.url&&(r.prefixUrl=""),r})(n?._internals??n??Jx),this._init=[...n?._init??[]],this._merging=!1,this._unixOptions=void 0;try{if(Lb.plainObject(e))try{this.merge(e),this.merge(t)}finally{this.url=e.url}else try{this.merge(t)}finally{if(void 0!==t?.url){if(void 0!==e)throw new TypeError("The `url` option is mutually exclusive with the `input` argument");this.url=t.url}else void 0!==e&&(this.url=e)}}catch(e){throw e.options=this,e}}merge(e){if(e)if(e instanceof Qx)for(const t of e._init)this.merge(t);else{e=(e=>{const{hooks:t,retry:n}=e,r={...e};return Lb.object(e.context)&&(r.context={...e.context}),Lb.object(e.cacheOptions)&&(r.cacheOptions={...e.cacheOptions}),Lb.object(e.https)&&(r.https={...e.https}),Lb.object(e.cacheOptions)&&(r.cacheOptions={...r.cacheOptions}),Lb.object(e.agent)&&(r.agent={...e.agent}),Lb.object(e.headers)&&(r.headers={...e.headers}),Lb.object(n)&&(r.retry={...n},Lb.array(n.errorCodes)&&(r.retry.errorCodes=[...n.errorCodes]),Lb.array(n.methods)&&(r.retry.methods=[...n.methods]),Lb.array(n.statusCodes)&&(r.retry.statusCodes=[...n.statusCodes])),Lb.object(e.timeout)&&(r.timeout={...e.timeout}),Lb.object(t)&&(r.hooks={...t},Lb.array(t.init)&&(r.hooks.init=[...t.init]),Lb.array(t.beforeRequest)&&(r.hooks.beforeRequest=[...t.beforeRequest]),Lb.array(t.beforeError)&&(r.hooks.beforeError=[...t.beforeError]),Lb.array(t.beforeRedirect)&&(r.hooks.beforeRedirect=[...t.beforeRedirect]),Lb.array(t.beforeRetry)&&(r.hooks.beforeRetry=[...t.beforeRetry]),Lb.array(t.afterResponse)&&(r.hooks.afterResponse=[...t.afterResponse])),Lb.object(e.pagination)&&(r.pagination={...e.pagination}),r})(e),Xx(this,e,this),Xx(e,e,this),this._merging=!0,"isStream"in e&&(this.isStream=e.isStream);try{let t=!1;for(const n in e){if("mutableDefaults"===n||"handlers"===n)continue;if("url"===n)continue;if(!(n in this))throw new Error(`Unexpected option: ${n}`);const r=e[n];void 0!==r&&(this[n]=r,t=!0)}t&&this._init.push(e)}finally{this._merging=!1}}}get request(){return this._internals.request}set request(e){qb.any([Lb.function_,Lb.undefined],e),this._internals.request=e}get agent(){return this._internals.agent}set agent(e){qb.plainObject(e);for(const t in e){if(!(t in this._internals.agent))throw new TypeError(`Unexpected agent option: ${t}`);qb.any([Lb.object,Lb.undefined],e[t])}this._merging?Object.assign(this._internals.agent,e):this._internals.agent={...e}}get h2session(){return this._internals.h2session}set h2session(e){this._internals.h2session=e}get decompress(){return this._internals.decompress}set decompress(e){qb.boolean(e),this._internals.decompress=e}get timeout(){return this._internals.timeout}set timeout(e){qb.plainObject(e);for(const t in e){if(!(t in this._internals.timeout))throw new Error(`Unexpected timeout option: ${t}`);qb.any([Lb.number,Lb.undefined],e[t])}this._merging?Object.assign(this._internals.timeout,e):this._internals.timeout={...e}}get prefixUrl(){return this._internals.prefixUrl}set prefixUrl(e){if(qb.any([Lb.string,Lb.urlInstance],e),""!==e){if((e=e.toString()).endsWith("/")||(e+="/"),this._internals.prefixUrl&&this._internals.url){const{href:t}=this._internals.url;this._internals.url.href=e+t.slice(this._internals.prefixUrl.length)}this._internals.prefixUrl=e}else this._internals.prefixUrl=""}get body(){return this._internals.body}set body(e){qb.any([Lb.string,Lb.buffer,Lb.nodeStream,Lb.generator,Lb.asyncGenerator,Kv,Lb.undefined],e),Lb.nodeStream(e)&&qb.truthy(e.readable),void 0!==e&&(qb.undefined(this._internals.form),qb.undefined(this._internals.json)),this._internals.body=e}get form(){return this._internals.form}set form(e){qb.any([Lb.plainObject,Lb.undefined],e),void 0!==e&&(qb.undefined(this._internals.body),qb.undefined(this._internals.json)),this._internals.form=e}get json(){return this._internals.json}set json(e){void 0!==e&&(qb.undefined(this._internals.body),qb.undefined(this._internals.form)),this._internals.json=e}get url(){return this._internals.url}set url(e){if(qb.any([Lb.string,Lb.urlInstance,Lb.undefined],e),void 0===e)return void(this._internals.url=void 0);if(Lb.string(e)&&e.startsWith("/"))throw new Error("`url` must not start with a slash");const t=`${this.prefixUrl}${e.toString()}`,n=new URL(t);if(this._internals.url=n,"unix:"===n.protocol&&(n.href=`http://unix${n.pathname}${n.search}`),"http:"!==n.protocol&&"https:"!==n.protocol){const e=new Error(`Unsupported protocol: ${n.protocol}`);throw e.code="ERR_UNSUPPORTED_PROTOCOL",e}if(this._internals.username&&(n.username=this._internals.username,this._internals.username=""),this._internals.password&&(n.password=this._internals.password,this._internals.password=""),this._internals.searchParams&&(n.search=this._internals.searchParams.toString(),this._internals.searchParams=void 0),"unix"!==n.hostname)this._unixOptions=void 0;else{if(!this._internals.enableUnixSockets)throw new Error("Using UNIX domain sockets but option `enableUnixSockets` is not enabled");const e=/(?<socketPath>.+?):(?<path>.+)/.exec(`${n.pathname}${n.search}`);if(e?.groups){const{socketPath:t,path:n}=e.groups;this._unixOptions={socketPath:t,path:n,host:""}}else this._unixOptions=void 0}}get cookieJar(){return this._internals.cookieJar}set cookieJar(e){if(qb.any([Lb.object,Lb.undefined],e),void 0===e)return void(this._internals.cookieJar=void 0);let{setCookie:t,getCookieString:n}=e;qb.function_(t),qb.function_(n),4===t.length&&0===n.length?(t=j(t.bind(e)),n=j(n.bind(e)),this._internals.cookieJar={setCookie:t,getCookieString:n}):this._internals.cookieJar=e}get signal(){return this._internals.signal}set signal(e){qb.object(e),this._internals.signal=e}get ignoreInvalidCookies(){return this._internals.ignoreInvalidCookies}set ignoreInvalidCookies(e){qb.boolean(e),this._internals.ignoreInvalidCookies=e}get searchParams(){return this._internals.url?this._internals.url.searchParams:(void 0===this._internals.searchParams&&(this._internals.searchParams=new URLSearchParams),this._internals.searchParams)}set searchParams(e){qb.any([Lb.string,Lb.object,Lb.undefined],e);const t=this._internals.url;if(void 0===e)return this._internals.searchParams=void 0,void(t&&(t.search=""));const n=this.searchParams;let r;if(Lb.string(e))r=new URLSearchParams(e);else if(e instanceof URLSearchParams)r=e;else{!function(e){for(const t in e){const n=e[t];qb.any([Lb.string,Lb.number,Lb.boolean,Lb.null_,Lb.undefined],n)}}(e),r=new URLSearchParams;for(const t in e){const i=e[t];null===i?r.append(t,""):void 0===i?n.delete(t):r.append(t,i)}}if(this._merging){for(const e of r.keys())n.delete(e);for(const[e,t]of r)n.append(e,t)}else t?t.search=n.toString():this._internals.searchParams=n}get searchParameters(){throw new Error("The `searchParameters` option does not exist. Use `searchParams` instead.")}set searchParameters(e){throw new Error("The `searchParameters` option does not exist. Use `searchParams` instead.")}get dnsLookup(){return this._internals.dnsLookup}set dnsLookup(e){qb.any([Lb.function_,Lb.undefined],e),this._internals.dnsLookup=e}get dnsCache(){return this._internals.dnsCache}set dnsCache(e){qb.any([Lb.object,Lb.boolean,Lb.undefined],e),this._internals.dnsCache=!0===e?Gx||(Gx=new Ow,Gx):!1===e?void 0:e}get context(){return this._internals.context}set context(e){qb.object(e),this._merging?Object.assign(this._internals.context,e):this._internals.context={...e}}get hooks(){return this._internals.hooks}set hooks(e){qb.object(e);for(const t in e){if(!(t in this._internals.hooks))throw new Error(`Unexpected hook event: ${t}`);const n=t,r=e[n];if(qb.any([Lb.array,Lb.undefined],r),r)for(const e of r)qb.function_(e);if(this._merging)r&&this._internals.hooks[n].push(...r);else{if(!r)throw new Error(`Missing hook event: ${t}`);this._internals.hooks[t]=[...r]}}}get followRedirect(){return this._internals.followRedirect}set followRedirect(e){qb.boolean(e),this._internals.followRedirect=e}get followRedirects(){throw new TypeError("The `followRedirects` option does not exist. Use `followRedirect` instead.")}set followRedirects(e){throw new TypeError("The `followRedirects` option does not exist. Use `followRedirect` instead.")}get maxRedirects(){return this._internals.maxRedirects}set maxRedirects(e){qb.number(e),this._internals.maxRedirects=e}get cache(){return this._internals.cache}set cache(e){qb.any([Lb.object,Lb.string,Lb.boolean,Lb.undefined],e),this._internals.cache=!0===e?Wx:!1===e?void 0:e}get throwHttpErrors(){return this._internals.throwHttpErrors}set throwHttpErrors(e){qb.boolean(e),this._internals.throwHttpErrors=e}get username(){const e=this._internals.url,t=e?e.username:this._internals.username;return decodeURIComponent(t)}set username(e){qb.string(e);const t=this._internals.url,n=encodeURIComponent(e);t?t.username=n:this._internals.username=n}get password(){const e=this._internals.url,t=e?e.password:this._internals.password;return decodeURIComponent(t)}set password(e){qb.string(e);const t=this._internals.url,n=encodeURIComponent(e);t?t.password=n:this._internals.password=n}get http2(){return this._internals.http2}set http2(e){qb.boolean(e),this._internals.http2=e}get allowGetBody(){return this._internals.allowGetBody}set allowGetBody(e){qb.boolean(e),this._internals.allowGetBody=e}get headers(){return this._internals.headers}set headers(e){qb.plainObject(e),this._merging?Object.assign(this._internals.headers,yv(e)):this._internals.headers=yv(e)}get methodRewriting(){return this._internals.methodRewriting}set methodRewriting(e){qb.boolean(e),this._internals.methodRewriting=e}get dnsLookupIpVersion(){return this._internals.dnsLookupIpVersion}set dnsLookupIpVersion(e){if(void 0!==e&&4!==e&&6!==e)throw new TypeError(`Invalid DNS lookup IP version: ${e}`);this._internals.dnsLookupIpVersion=e}get parseJson(){return this._internals.parseJson}set parseJson(e){qb.function_(e),this._internals.parseJson=e}get stringifyJson(){return this._internals.stringifyJson}set stringifyJson(e){qb.function_(e),this._internals.stringifyJson=e}get retry(){return this._internals.retry}set retry(e){if(qb.plainObject(e),qb.any([Lb.function_,Lb.undefined],e.calculateDelay),qb.any([Lb.number,Lb.undefined],e.maxRetryAfter),qb.any([Lb.number,Lb.undefined],e.limit),qb.any([Lb.array,Lb.undefined],e.methods),qb.any([Lb.array,Lb.undefined],e.statusCodes),qb.any([Lb.array,Lb.undefined],e.errorCodes),qb.any([Lb.number,Lb.undefined],e.noise),e.noise&&Math.abs(e.noise)>100)throw new Error(`The maximum acceptable retry noise is +/- 100ms, got ${e.noise}`);for(const t in e)if(!(t in this._internals.retry))throw new Error(`Unexpected retry option: ${t}`);this._merging?Object.assign(this._internals.retry,e):this._internals.retry={...e};const{retry:t}=this._internals;t.methods=[...new Set(t.methods.map((e=>e.toUpperCase())))],t.statusCodes=[...new Set(t.statusCodes)],t.errorCodes=[...new Set(t.errorCodes)]}get localAddress(){return this._internals.localAddress}set localAddress(e){qb.any([Lb.string,Lb.undefined],e),this._internals.localAddress=e}get method(){return this._internals.method}set method(e){qb.string(e),this._internals.method=e.toUpperCase()}get createConnection(){return this._internals.createConnection}set createConnection(e){qb.any([Lb.function_,Lb.undefined],e),this._internals.createConnection=e}get cacheOptions(){return this._internals.cacheOptions}set cacheOptions(e){qb.plainObject(e),qb.any([Lb.boolean,Lb.undefined],e.shared),qb.any([Lb.number,Lb.undefined],e.cacheHeuristic),qb.any([Lb.number,Lb.undefined],e.immutableMinTimeToLive),qb.any([Lb.boolean,Lb.undefined],e.ignoreCargoCult);for(const t in e)if(!(t in this._internals.cacheOptions))throw new Error(`Cache option \`${t}\` does not exist`);this._merging?Object.assign(this._internals.cacheOptions,e):this._internals.cacheOptions={...e}}get https(){return this._internals.https}set https(e){qb.plainObject(e),qb.any([Lb.boolean,Lb.undefined],e.rejectUnauthorized),qb.any([Lb.function_,Lb.undefined],e.checkServerIdentity),qb.any([Lb.string,Lb.object,Lb.array,Lb.undefined],e.certificateAuthority),qb.any([Lb.string,Lb.object,Lb.array,Lb.undefined],e.key),qb.any([Lb.string,Lb.object,Lb.array,Lb.undefined],e.certificate),qb.any([Lb.string,Lb.undefined],e.passphrase),qb.any([Lb.string,Lb.buffer,Lb.array,Lb.undefined],e.pfx),qb.any([Lb.array,Lb.undefined],e.alpnProtocols),qb.any([Lb.string,Lb.undefined],e.ciphers),qb.any([Lb.string,Lb.buffer,Lb.undefined],e.dhparam),qb.any([Lb.string,Lb.undefined],e.signatureAlgorithms),qb.any([Lb.string,Lb.undefined],e.minVersion),qb.any([Lb.string,Lb.undefined],e.maxVersion),qb.any([Lb.boolean,Lb.undefined],e.honorCipherOrder),qb.any([Lb.number,Lb.undefined],e.tlsSessionLifetime),qb.any([Lb.string,Lb.undefined],e.ecdhCurve),qb.any([Lb.string,Lb.buffer,Lb.array,Lb.undefined],e.certificateRevocationLists);for(const t in e)if(!(t in this._internals.https))throw new Error(`HTTPS option \`${t}\` does not exist`);this._merging?Object.assign(this._internals.https,e):this._internals.https={...e}}get encoding(){return this._internals.encoding}set encoding(e){if(null===e)throw new TypeError("To get a Buffer, set `options.responseType` to `buffer` instead");qb.any([Lb.string,Lb.undefined],e),this._internals.encoding=e}get resolveBodyOnly(){return this._internals.resolveBodyOnly}set resolveBodyOnly(e){qb.boolean(e),this._internals.resolveBodyOnly=e}get isStream(){return this._internals.isStream}set isStream(e){qb.boolean(e),this._internals.isStream=e}get responseType(){return this._internals.responseType}set responseType(e){if(void 0!==e){if("text"!==e&&"buffer"!==e&&"json"!==e)throw new Error(`Invalid \`responseType\` option: ${e}`);this._internals.responseType=e}else this._internals.responseType="text"}get pagination(){return this._internals.pagination}set pagination(e){qb.object(e),this._merging?Object.assign(this._internals.pagination,e):this._internals.pagination=e}get auth(){throw new Error("Parameter `auth` is deprecated. Use `username` / `password` instead.")}set auth(e){throw new Error("Parameter `auth` is deprecated. Use `username` / `password` instead.")}get setHost(){return this._internals.setHost}set setHost(e){qb.boolean(e),this._internals.setHost=e}get maxHeaderSize(){return this._internals.maxHeaderSize}set maxHeaderSize(e){qb.any([Lb.number,Lb.undefined],e),this._internals.maxHeaderSize=e}get enableUnixSockets(){return this._internals.enableUnixSockets}set enableUnixSockets(e){qb.boolean(e),this._internals.enableUnixSockets=e}toJSON(){return{...this._internals}}[Symbol.for("nodejs.util.inspect.custom")](e,t){return L(this._internals,t)}createNativeRequestOptions(){const e=this._internals;let t;t="https:"===e.url.protocol?e.http2?e.agent:e.agent.https:e.agent.http;const{https:n}=e;let{pfx:r}=n;return Lb.array(r)&&Lb.plainObject(r[0])&&(r=r.map((e=>({buf:e.buffer,passphrase:e.passphrase})))),{...e.cacheOptions,...this._unixOptions,ALPNProtocols:n.alpnProtocols,ca:n.certificateAuthority,cert:n.certificate,key:n.key,passphrase:n.passphrase,pfx:n.pfx,rejectUnauthorized:n.rejectUnauthorized,checkServerIdentity:n.checkServerIdentity??Q,ciphers:n.ciphers,honorCipherOrder:n.honorCipherOrder,minVersion:n.minVersion,maxVersion:n.maxVersion,sigalgs:n.signatureAlgorithms,sessionTimeout:n.tlsSessionLifetime,dhparam:n.dhparam,ecdhCurve:n.ecdhCurve,crl:n.certificateRevocationLists,lookup:e.dnsLookup??e.dnsCache?.lookup,family:e.dnsLookupIpVersion,agent:t,setHost:e.setHost,method:e.method,maxHeaderSize:e.maxHeaderSize,localAddress:e.localAddress,headers:e.headers,createConnection:e.createConnection,timeout:e.http2?Zx(e):void 0,h2session:e.h2session}}getRequestFunction(){const e=this._internals.url,{request:t}=this._internals;return!t&&e?this.getFallbackRequestFunction():t}getFallbackRequestFunction(){const e=this._internals.url;if(e){if("https:"===e.protocol){if(this._internals.http2){if(Vx<15||15===Vx&&Kx<10){const e=new Error("To use the `http2` option, install Node.js 15.10.0 or above");throw e.code="EUNSUPPORTED",e}return Yx.auto}return ee.request}return K.request}}freeze(){const e=this._internals;Object.freeze(e),Object.freeze(e.hooks),Object.freeze(e.hooks.afterResponse),Object.freeze(e.hooks.beforeError),Object.freeze(e.hooks.beforeRedirect),Object.freeze(e.hooks.beforeRequest),Object.freeze(e.hooks.beforeRetry),Object.freeze(e.hooks.init),Object.freeze(e.https),Object.freeze(e.cacheOptions),Object.freeze(e.agent),Object.freeze(e.headers),Object.freeze(e.timeout),Object.freeze(e.retry),Object.freeze(e.retry.errorCodes),Object.freeze(e.retry.methods),Object.freeze(e.retry.statusCodes)}}const e_=e=>{const{statusCode:t}=e,n=e.request.options.followRedirect?299:399;return t>=200&&t<=n||304===t};class t_ extends Yb{constructor(e,t){const{options:n}=t.request;super(`${e.message} in "${n.url.toString()}"`,e,t.request),this.name="ParseError",this.code="ERR_BODY_PARSE_FAILURE"}}const n_=(e,t,n,r)=>{const{rawBody:i}=e;try{if("text"===t)return i.toString(r);if("json"===t)return 0===i.length?"":n(i.toString(r));if("buffer"===t)return i}catch(t){throw new t_(t,e)}throw new t_({message:`Unknown body type '${t}'`,name:"Error"},e)};function r_(e){return"unix:"===e.protocol||"unix"===e.hostname}const{buffer:i_}=mv,s_=Lb.string(z.versions.brotli),a_=new Set(["GET","HEAD"]),o_=new class{constructor(){Object.defineProperty(this,"weakMap",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"map",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.weakMap=new WeakMap,this.map=new Map}set(e,t){"object"==typeof e?this.weakMap.set(e,t):this.map.set(e,t)}get(e){return"object"==typeof e?this.weakMap.get(e):this.map.get(e)}has(e){return"object"==typeof e?this.weakMap.has(e):this.map.has(e)}},c_=new Set([300,301,302,303,304,307,308]),u_=["socket","connect","continue","information","upgrade"],l_=()=>{};class d_ extends V{constructor(e,t,n){super({autoDestroy:!1,highWaterMark:0}),Object.defineProperty(this,"constructor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_noPipe",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"response",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"requestUrl",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"redirectUrls",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"retryCount",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_stopRetry",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_downloadedSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_uploadedSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_stopReading",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_pipedServerResponses",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_request",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_responseSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_bodySize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_unproxyEvents",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_isFromCache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_cannotHaveBody",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_triggerRead",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_cancelTimeouts",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_removeListeners",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_nativeResponse",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_flushed",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_aborted",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_requestInitialized",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._downloadedSize=0,this._uploadedSize=0,this._stopReading=!1,this._pipedServerResponses=new Set,this._cannotHaveBody=!1,this._unproxyEvents=l_,this._triggerRead=!1,this._cancelTimeouts=l_,this._removeListeners=l_,this._jobs=[],this._flushed=!1,this._requestInitialized=!1,this._aborted=!1,this.redirectUrls=[],this.retryCount=0,this._stopRetry=l_,this.on("pipe",(e=>{e?.headers&&Object.assign(this.options.headers,e.headers)})),this.on("newListener",(e=>{if("retry"===e&&this.listenerCount("retry")>0)throw new Error("A retry listener has been attached already.")}));try{if(this.options=new Qx(e,t,n),!this.options.url){if(""===this.options.prefixUrl)throw new TypeError("Missing `url` property");this.options.url=""}this.requestUrl=this.options.url}catch(e){const{options:t}=e;return t&&(this.options=t),void(this.flush=async()=>{this.flush=async()=>{},this.destroy(e)})}const{body:r}=this.options;if(Lb.nodeStream(r)&&r.once("error",(e=>{this._flushed?this._beforeError(new Gb(e,this)):this.flush=async()=>{this.flush=async()=>{},this._beforeError(new Gb(e,this))}})),this.options.signal){const e=()=>{this.destroy(new Qb(this))};this.options.signal.aborted?e():(this.options.signal.addEventListener("abort",e),this._removeListeners=()=>{this.options.signal?.removeEventListener("abort",e)})}}async flush(){if(!this._flushed){this._flushed=!0;try{if(await this._finalizeBody(),this.destroyed)return;if(await this._makeRequest(),this.destroyed)return void this._request?.destroy();for(const e of this._jobs)e();this._jobs.length=0,this._requestInitialized=!0}catch(e){this._beforeError(e)}}}_beforeError(e){if(this._stopReading)return;const{response:t,options:n}=this,r=this.retryCount+("RetryError"===e.name?0:1);this._stopReading=!0,e instanceof Yb||(e=new Yb(e.message,e,this));const i=e;(async()=>{if(t?.readable&&!t.rawBody&&!this._request?.socket?.destroyed){t.setEncoding(this.readableEncoding);await this._setRawBody(t)&&(t.body=t.rawBody.toString())}if(0!==this.listenerCount("retry")){let s;try{let e;t&&"retry-after"in t.headers&&(e=Number(t.headers["retry-after"]),Number.isNaN(e)?(e=Date.parse(t.headers["retry-after"])-Date.now(),e<=0&&(e=1)):e*=1e3);const a=n.retry;s=await a.calculateDelay({attemptCount:r,retryOptions:a,error:i,retryAfter:e,computedValue:yw({attemptCount:r,retryOptions:a,error:i,retryAfter:e,computedValue:a.maxRetryAfter??n.timeout.request??Number.POSITIVE_INFINITY})})}catch(e){return void this._error(new Yb(e.message,e,this))}if(s){if(await new Promise((e=>{const t=setTimeout(e,s);this._stopRetry=()=>{clearTimeout(t),e()}})),this.destroyed)return;try{for(const e of this.options.hooks.beforeRetry)await e(i,this.retryCount+1)}catch(t){return void this._error(new Yb(t.message,e,this))}if(this.destroyed)return;return this.destroy(),void this.emit("retry",this.retryCount+1,e,(e=>{const t=new d_(n.url,e,n);return t.retryCount=this.retryCount+1,z.nextTick((()=>{t.flush()})),t}))}}this._error(i)})()}_read(){this._triggerRead=!0;const{response:e}=this;if(e&&!this._stopReading){let t;for(e.readableLength&&(this._triggerRead=!1);null!==(t=e.read());){this._downloadedSize+=t.length;const e=this.downloadProgress;e.percent<1&&this.emit("downloadProgress",e),this.push(t)}}}_write(e,t,n){const r=()=>{this._writeRequest(e,t,n)};this._requestInitialized?r():this._jobs.push(r)}_final(e){const t=()=>{this._request&&!this._request.destroyed?this._request.end((t=>{this._request._writableState?.errored||(t||(this._bodySize=this._uploadedSize,this.emit("uploadProgress",this.uploadProgress),this._request.emit("upload-complete")),e(t))})):e()};this._requestInitialized?t():this._jobs.push(t)}_destroy(e,t){if(this._stopReading=!0,this.flush=async()=>{},this._stopRetry(),this._cancelTimeouts(),this._removeListeners(),this.options){const{body:e}=this.options;Lb.nodeStream(e)&&e.destroy()}this._request&&this._request.destroy(),null===e||Lb.undefined(e)||e instanceof Yb||(e=new Yb(e.message,e,this)),t(e)}pipe(e,t){return e instanceof W&&this._pipedServerResponses.add(e),super.pipe(e,t)}unpipe(e){return e instanceof W&&this._pipedServerResponses.delete(e),super.unpipe(e),this}async _finalizeBody(){const{options:e}=this,{headers:t}=e,n=!Lb.undefined(e.form),r=!Lb.undefined(e.json),i=!Lb.undefined(e.body),s=a_.has(e.method)&&!("GET"===e.method&&e.allowGetBody);if(this._cannotHaveBody=s,n||r||i){if(s)throw new TypeError(`The \`${e.method}\` method cannot be used with a body`);const r=!Lb.string(t["content-type"]);if(i){if(Kv(e.body)){const n=new dw(e.body);r&&(t["content-type"]=n.headers["Content-Type"]),"Content-Length"in n.headers&&(t["content-length"]=n.headers["Content-Length"]),e.body=n.encode()}pw(e.body)&&r&&(t["content-type"]=`multipart/form-data; boundary=${e.body.getBoundary()}`)}else if(n){r&&(t["content-type"]="application/x-www-form-urlencoded");const{form:n}=e;e.form=void 0,e.body=new URLSearchParams(n).toString()}else{r&&(t["content-type"]="application/json");const{json:n}=e;e.json=void 0,e.body=e.stringifyJson(n)}const a=await async function(e,t){return t&&"content-length"in t?Number(t["content-length"]):e?Lb.string(e)?q.byteLength(e):Lb.buffer(e)?e.length:pw(e)?j(e.getLength.bind(e))():void 0:0}(e.body,e.headers);Lb.undefined(t["content-length"])&&Lb.undefined(t["transfer-encoding"])&&!s&&!Lb.undefined(a)&&(t["content-length"]=String(a))}"json"!==e.responseType||"accept"in e.headers||(e.headers.accept="application/json"),this._bodySize=Number(t["content-length"])||void 0}async _onResponseBase(e){if(this.isAborted)return;const{options:t}=this,{url:n}=t;this._nativeResponse=e,t.decompress&&(e=Bv(e));const r=e.statusCode,i=e;i.statusMessage=i.statusMessage??K.STATUS_CODES[r],i.url=t.url.toString(),i.requestUrl=this.requestUrl,i.redirectUrls=this.redirectUrls,i.request=this,i.isFromCache=this._nativeResponse.fromCache??!1,i.ip=this.ip,i.retryCount=this.retryCount,i.ok=e_(i),this._isFromCache=i.isFromCache,this._responseSize=Number(e.headers["content-length"])||void 0,this.response=i,e.once("end",(()=>{this._responseSize=this._downloadedSize,this.emit("downloadProgress",this.downloadProgress)})),e.once("error",(t=>{this._aborted=!0,e.destroy(),this._beforeError(new Zb(t,this))})),e.once("aborted",(()=>{this._aborted=!0,this._beforeError(new Zb({name:"Error",message:"The server aborted pending request",code:"ECONNRESET"},this))})),this.emit("downloadProgress",this.downloadProgress);const s=e.headers["set-cookie"];if(Lb.object(t.cookieJar)&&s){let e=s.map((async e=>t.cookieJar.setCookie(e,n.toString())));t.ignoreInvalidCookies&&(e=e.map((async e=>{try{await e}catch{}})));try{await Promise.all(e)}catch(e){return void this._beforeError(e)}}if(!this.isAborted)if(t.followRedirect&&e.headers.location&&c_.has(r)){if(e.resume(),this._cancelTimeouts(),this._unproxyEvents(),this.redirectUrls.length>=t.maxRedirects)return void this._beforeError(new Vb(this));this._request=void 0;const s=new Qx(void 0,void 0,this.options),a=303===r&&"GET"!==s.method&&"HEAD"!==s.method,o=307!==r&&308!==r,c=s.methodRewriting&&o;(a||c)&&(s.method="GET",s.body=void 0,s.json=void 0,s.form=void 0,delete s.headers["content-length"]);try{const t=q.from(e.headers.location,"binary").toString(),r=new URL(t,n);if(!r_(n)&&r_(r))return void this._beforeError(new Yb("Cannot redirect to UNIX socket",{},this));r.hostname!==n.hostname||r.port!==n.port?("host"in s.headers&&delete s.headers.host,"cookie"in s.headers&&delete s.headers.cookie,"authorization"in s.headers&&delete s.headers.authorization,(s.username||s.password)&&(s.username="",s.password="")):(r.username=s.username,r.password=s.password),this.redirectUrls.push(r),s.prefixUrl="",s.url=r;for(const e of s.hooks.beforeRedirect)await e(s,i);this.emit("redirect",s,i),this.options=s,await this._makeRequest()}catch(e){return void this._beforeError(e)}}else if(t.isStream&&t.throwHttpErrors&&!e_(i))this._beforeError(new Kb(i));else if(e.on("readable",(()=>{this._triggerRead&&this._read()})),this.on("resume",(()=>{e.resume()})),this.on("pause",(()=>{e.pause()})),e.once("end",(()=>{this.push(null)})),this._noPipe){await this._setRawBody()&&this.emit("response",e)}else{this.emit("response",e);for(const n of this._pipedServerResponses)if(!n.headersSent){for(const r in e.headers){const i=!t.decompress||"content-encoding"!==r,s=e.headers[r];i&&n.setHeader(r,s)}n.statusCode=r}}}async _setRawBody(e=this){if(e.readableEnded)return!1;try{const t=await i_(e);if(!this.isAborted)return this.response.rawBody=t,!0}catch{}return!1}async _onResponse(e){try{await this._onResponseBase(e)}catch(e){this._beforeError(e)}}_onRequest(e){const{options:t}=this,{timeout:n,url:r}=t;(e=>{if(e.timings)return e.timings;const t={start:Date.now(),socket:void 0,lookup:void 0,connect:void 0,secureConnect:void 0,upload:void 0,response:void 0,end:void 0,error:void 0,abort:void 0,phases:{wait:void 0,dns:void 0,tcp:void 0,tls:void 0,request:void 0,firstByte:void 0,download:void 0,total:void 0}};e.timings=t;const n=e=>{e.once(h,(()=>{t.error=Date.now(),t.phases.total=t.error-t.start}))};n(e);const r=()=>{t.abort=Date.now(),t.phases.total=t.abort-t.start};e.prependOnceListener("abort",r);const i=e=>{if(t.socket=Date.now(),t.phases.wait=t.socket-t.start,o.isProxy(e))return;const n=()=>{t.lookup=Date.now(),t.phases.dns=t.lookup-t.socket};e.prependOnceListener("lookup",n),rv(e,{connect:()=>{t.connect=Date.now(),void 0===t.lookup&&(e.removeListener("lookup",n),t.lookup=t.connect,t.phases.dns=t.lookup-t.socket),t.phases.tcp=t.connect-t.lookup},secureConnect:()=>{t.secureConnect=Date.now(),t.phases.tls=t.secureConnect-t.connect}})};e.socket?i(e.socket):e.prependOnceListener("socket",i);const s=()=>{t.upload=Date.now(),t.phases.request=t.upload-(t.secureConnect??t.connect)};e.writableFinished?s():e.prependOnceListener("finish",s),e.prependOnceListener("response",(i=>{t.response=Date.now(),t.phases.firstByte=t.response-t.upload,i.timings=t,n(i),i.prependOnceListener("end",(()=>{e.off("abort",r),i.off("aborted",r),t.phases.total||(t.end=Date.now(),t.phases.download=t.end-t.response,t.phases.total=t.end-t.start)})),i.prependOnceListener("aborted",r)}))})(e),this.options.http2&&e.setTimeout(0),this._cancelTimeouts=function(e,t,n){if(hw in e)return mw;e[hw]=!0;const r=[],{once:i,unhandleAll:s}=function(){const e=[];return{once(t,n,r){t.once(n,r),e.push({origin:t,event:n,fn:r})},unhandleAll(){for(const t of e){const{origin:e,event:n,fn:r}=t;e.removeListener(n,r)}e.length=0}}}(),a=(e,t,n)=>{const i=setTimeout(t,e,e,n);i.unref?.();const s=()=>{clearTimeout(i)};return r.push(s),s},{host:o,hostname:c}=n,u=(t,n)=>{e.destroy(new gw(t,n))},l=()=>{for(const e of r)e();s()};if(e.once("error",(t=>{if(l(),0===e.listenerCount("error"))throw t})),void 0!==t.request){const n=a(t.request,u,"request");i(e,"response",(e=>{i(e,"end",n)}))}if(void 0!==t.socket){const{socket:n}=t,i=()=>{u(n,"socket")};e.setTimeout(n,i),r.push((()=>{e.removeListener("timeout",i)}))}const d=void 0!==t.lookup,p=void 0!==t.connect,f=void 0!==t.secureConnect,h=void 0!==t.send;return(d||p||f||h)&&i(e,"socket",(r=>{const{socketPath:s}=e;if(r.connecting){const e=Boolean(s??0!==Z.isIP(c??o??""));if(d&&!e&&void 0===r.address().address){const e=a(t.lookup,u,"lookup");i(r,"lookup",e)}if(p){const n=()=>a(t.connect,u,"connect");e?i(r,"connect",n()):i(r,"lookup",(e=>{null===e&&i(r,"connect",n())}))}f&&"https:"===n.protocol&&i(r,"connect",(()=>{const e=a(t.secureConnect,u,"secureConnect");i(r,"secureConnect",e)}))}if(h){const n=()=>a(t.send,u,"send");r.connecting?i(r,"connect",(()=>{i(e,"upload-complete",n())})):i(e,"upload-complete",n())}})),void 0!==t.response&&i(e,"upload-complete",(()=>{const n=a(t.response,u,"response");i(e,"response",n)})),void 0!==t.read&&i(e,"response",(e=>{const n=a(t.read,u,"read");i(e,"end",n)})),l}(e,n,r);const i=t.cache?"cacheableResponse":"response";e.once(i,(e=>{this._onResponse(e)})),e.once("error",(t=>{this._aborted=!0,e.destroy(),t=t instanceof gw?new Jb(t,this.timings,this):new Yb(t.message,t,this),this._beforeError(t)})),this._unproxyEvents=fw(e,this,u_),this._request=e,this.emit("uploadProgress",this.uploadProgress),this._sendBody(),this.emit("request",e)}async _asyncWrite(e){return new Promise(((t,n)=>{super.write(e,(e=>{e?n(e):t()}))}))}_sendBody(){const{body:e}=this.options,t=0===this.redirectUrls.length?this:this._request??this;Lb.nodeStream(e)?e.pipe(t):Lb.generator(e)||Lb.asyncGenerator(e)?(async()=>{try{for await(const t of e)await this._asyncWrite(t);super.end()}catch(e){this._beforeError(e)}})():Lb.undefined(e)?(this._cannotHaveBody||this._noPipe)&&t.end():(this._writeRequest(e,void 0,(()=>{})),t.end())}_prepareCache(e){if(!o_.has(e)){const t=new Mv(((e,t)=>{const n=e._request(e,t);return Lb.promise(n)&&(n.once=(e,t)=>{if("error"===e)(async()=>{try{await n}catch(e){t(e)}})();else{if("abort"!==e)throw new Error(`Unknown HTTP2 promise event: ${e}`);(async()=>{try{(await n).once("abort",t)}catch{}})()}return n}),n}),e);o_.set(e,t.request())}}async _createCacheableRequest(e,t){return new Promise(((n,r)=>{let i;Object.assign(t,function(e){const t={protocol:e.protocol,hostname:Lb.string(e.hostname)&&e.hostname.startsWith("[")?e.hostname.slice(1,-1):e.hostname,host:e.host,hash:e.hash,search:e.search,pathname:e.pathname,href:e.href,path:`${e.pathname||""}${e.search||""}`};return Lb.string(e.port)&&e.port.length>0&&(t.port=Number(e.port)),(e.username||e.password)&&(t.auth=`${e.username||""}:${e.password||""}`),t}(e));const s=o_.get(t.cache)(t,(async e=>{if(e._readableState.autoDestroy=!1,i){const t=()=>{e.req&&(e.complete=e.req.res.complete)};e.prependOnceListener("end",t),t(),(await i).emit("cacheableResponse",e)}n(e)}));s.once("error",r),s.once("request",(async e=>{i=e,n(i)}))}))}async _makeRequest(){const{options:e}=this,{headers:t,username:n,password:r}=e,i=e.cookieJar;for(const e in t)if(Lb.undefined(t[e]))delete t[e];else if(Lb.null_(t[e]))throw new TypeError(`Use \`undefined\` instead of \`null\` to delete the \`${e}\` header`);if(e.decompress&&Lb.undefined(t["accept-encoding"])&&(t["accept-encoding"]=s_?"gzip, deflate, br":"gzip, deflate"),n||r){const e=q.from(`${n}:${r}`).toString("base64");t.authorization=`Basic ${e}`}if(i){const n=await i.getCookieString(e.url.toString());Lb.nonEmptyString(n)&&(t.cookie=n)}let s;e.prefixUrl="";for(const t of e.hooks.beforeRequest){const n=await t(e);if(!Lb.undefined(n)){s=()=>n;break}}s||(s=e.getRequestFunction());const a=e.url;this._requestOptions=e.createNativeRequestOptions(),e.cache&&(this._requestOptions._request=s,this._requestOptions.cache=e.cache,this._requestOptions.body=e.body,this._prepareCache(e.cache));const o=e.cache?this._createCacheableRequest:s;try{let t=o(a,this._requestOptions);Lb.promise(t)&&(t=await t),Lb.undefined(t)&&(t=e.getFallbackRequestFunction()(a,this._requestOptions),Lb.promise(t)&&(t=await t)),!function(e){return e.writable&&!e.writableEnded}(t)?this.writable?(this.once("finish",(()=>{this._onResponse(t)})),this._sendBody()):this._onResponse(t):this._onRequest(t)}catch(e){if(e instanceof Tv)throw new Wb(e,this);throw e}}async _error(e){try{if(e instanceof Kb&&!this.options.throwHttpErrors);else for(const t of this.options.hooks.beforeError)e=await t(e)}catch(t){e=new Yb(t.message,t,this)}this.destroy(e)}_writeRequest(e,t,n){this._request&&!this._request.destroyed&&this._request.write(e,t,(r=>{if(!r&&!this._request.destroyed){this._uploadedSize+=q.byteLength(e,t);const n=this.uploadProgress;n.percent<1&&this.emit("uploadProgress",n)}n(r)}))}get ip(){return this.socket?.remoteAddress}get isAborted(){return this._aborted}get socket(){return this._request?.socket??void 0}get downloadProgress(){let e;return e=this._responseSize?this._downloadedSize/this._responseSize:this._responseSize===this._downloadedSize?1:0,{percent:e,transferred:this._downloadedSize,total:this._responseSize}}get uploadProgress(){let e;return e=this._bodySize?this._uploadedSize/this._bodySize:this._bodySize===this._uploadedSize?1:0,{percent:e,transferred:this._uploadedSize,total:this._bodySize}}get timings(){return this._request?.timings}get isFromCache(){return this._isFromCache}get reusedSocket(){return this._request?.reusedSocket}}class p_ extends Yb{constructor(e){super("Promise was canceled",{},e),this.name="CancelError",this.code="ERR_CANCELED"}get isCanceled(){return!0}}const f_=["request","response","redirect","uploadProgress","downloadProgress"];function h_(e){let t,n,r;const i=new B,s=new Fb(((a,o,c)=>{c((()=>{t.destroy()})),c.shouldReject=!1,c((()=>{o(new p_(t))}));const u=l=>{c((()=>{}));const d=e??new d_(void 0,void 0,r);d.retryCount=l,d._noPipe=!0,t=d,d.once("response",(async e=>{const t=(e.headers["content-encoding"]??"").toLowerCase(),r="gzip"===t||"deflate"===t||"br"===t,{options:i}=d;if(r&&!i.decompress)e.body=e.rawBody;else try{e.body=n_(e,i.responseType,i.parseJson,i.encoding)}catch(t){if(e.body=e.rawBody.toString(),e_(e))return void d._beforeError(t)}try{const t=i.hooks.afterResponse;for(const[n,r]of t.entries())if(e=await r(e,(async e=>{throw i.merge(e),i.prefixUrl="",e.url&&(i.url=e.url),i.hooks.afterResponse=i.hooks.afterResponse.slice(0,n),new Xb(d)})),!Lb.object(e)||!Lb.number(e.statusCode)||Lb.nullOrUndefined(e.body))throw new TypeError("The `afterResponse` hook returned an invalid value")}catch(e){return void d._beforeError(e)}n=e,e_(e)?(d.destroy(),a(d.options.resolveBodyOnly?e.body:e)):d._beforeError(new Kb(e))}));const p=e=>{if(s.isCanceled)return;const{options:t}=d;if(e instanceof Kb&&!t.throwHttpErrors){const{response:t}=e;return d.destroy(),void a(d.options.resolveBodyOnly?t.body:t)}o(e)};d.once("error",p);const f=d.options?.body;d.once("retry",((t,n)=>{e=void 0;const i=d.options.body;if(f===i&&Lb.nodeStream(i))return n.message="Cannot retry with consumed body stream",void p(n);r=d.options,u(t)})),fw(d,i,f_),Lb.undefined(e)&&d.flush()};u(0)}));s.on=(e,t)=>(i.on(e,t),s),s.off=(e,t)=>(i.off(e,t),s);const a=e=>{const t=(async()=>{await s;const{options:t}=n.request;return n_(n,e,t.parseJson,t.encoding)})();return Object.defineProperties(t,Object.getOwnPropertyDescriptors(s)),t};return s.json=()=>{if(t.options){const{headers:e}=t.options;t.writableFinished||"accept"in e||(e.accept="application/json")}return a("json")},s.buffer=()=>a("buffer"),s.text=()=>a("text"),s}const m_=async e=>new Promise((t=>{setTimeout(t,e)})),g_=e=>Lb.function_(e),y_=["get","post","put","patch","head","delete"],b_=e=>{e={options:new Qx(void 0,void 0,e.options),handlers:[...e.handlers],mutableDefaults:e.mutableDefaults},Object.defineProperty(e,"mutableDefaults",{enumerable:!0,configurable:!1,writable:!1});const t=(t,n,r=e.options)=>{const i=new d_(t,n,r);let s;const a=e=>(i.options=e,i._noPipe=!e.isStream,i.flush(),e.isStream?i:(s||(s=h_(i)),s));let o=0;const c=t=>{const n=(e.handlers[o++]??a)(t,c);if(Lb.promise(n)&&!i.options.isStream&&(s||(s=h_(i)),n!==s)){const e=Object.getOwnPropertyDescriptors(s);for(const t in e)t in n&&delete e[t];Object.defineProperties(n,e),n.cancel=s.cancel}return n};return c(i.options)};t.extend=(...t)=>{const n=new Qx(void 0,void 0,e.options),r=[...e.handlers];let i;for(const e of t)g_(e)?(n.merge(e.defaults.options),r.push(...e.defaults.handlers),i=e.defaults.mutableDefaults):(n.merge(e),e.handlers&&r.push(...e.handlers),i=e.mutableDefaults);return b_({options:n,handlers:r,mutableDefaults:Boolean(i)})};const n=async function*(n,r){let i=new Qx(n,r,e.options);i.resolveBodyOnly=!1;const{pagination:s}=i;qb.function_(s.transform),qb.function_(s.shouldContinue),qb.function_(s.filter),qb.function_(s.paginate),qb.number(s.countLimit),qb.number(s.requestLimit),qb.number(s.backoff);const a=[];let{countLimit:o}=s,c=0;for(;c<s.requestLimit;){0!==c&&await m_(s.backoff);const e=await t(void 0,void 0,i),n=await s.transform(e),r=[];qb.array(n);for(const e of n)if(s.filter({item:e,currentItems:r,allItems:a})){if(!s.shouldContinue({item:e,currentItems:r,allItems:a}))return;if(yield e,s.stackAllItems&&a.push(e),r.push(e),--o<=0)return}const u=s.paginate({response:e,currentItems:r,allItems:a});if(!1===u)return;u===e.request.options?i=e.request.options:(i.merge(u),qb.any([Lb.urlInstance,Lb.undefined],u.url),void 0!==u.url&&(i.prefixUrl="",i.url=u.url)),c++}};(t.paginate=n).all=async(e,t)=>{const r=[];for await(const i of n(e,t))r.push(i);return r},t.paginate.each=n,t.stream=(e,n)=>t(e,{...n,isStream:!0});for(const e of y_)t[e]=(n,r)=>t(n,{...r,method:e}),t.stream[e]=(n,r)=>t(n,{...r,method:e,isStream:!0});return e.mutableDefaults||(Object.freeze(e.handlers),e.options.freeze()),Object.defineProperty(t,"defaults",{value:e,writable:!1,configurable:!1,enumerable:!0}),t},v_={options:new Qx,handlers:[],mutableDefaults:!1},w_=b_(v_),x_="[a-fA-F\\d:]",__=e=>e&&e.includeBoundaries?`(?:(?<=\\s|^)(?=${x_})|(?<=${x_})(?=\\s|$))`:"",E_="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",S_="[a-fA-F\\d]{1,4}",k_=`\n(?:\n(?:${S_}:){7}(?:${S_}|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8\n(?:${S_}:){6}(?:${E_}|:${S_}|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4\n(?:${S_}:){5}(?::${E_}|(?::${S_}){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4\n(?:${S_}:){4}(?:(?::${S_}){0,1}:${E_}|(?::${S_}){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4\n(?:${S_}:){3}(?:(?::${S_}){0,2}:${E_}|(?::${S_}){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4\n(?:${S_}:){2}(?:(?::${S_}){0,3}:${E_}|(?::${S_}){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4\n(?:${S_}:){1}(?:(?::${S_}){0,4}:${E_}|(?::${S_}){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4\n(?::(?:(?::${S_}){0,5}:${E_}|(?::${S_}){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4\n)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1\n`.replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),A_=new RegExp(`(?:^${E_}$)|(?:^${k_}$)`),T_=new RegExp(`^${E_}$`),M_=new RegExp(`^${k_}$`),R_=e=>e&&e.exact?A_:new RegExp(`(?:${__(e)}${E_}${__(e)})|(?:${__(e)}${k_}${__(e)})`,"g");R_.v4=e=>e&&e.exact?T_:new RegExp(`${__(e)}${E_}${__(e)}`,"g"),R_.v6=e=>e&&e.exact?M_:new RegExp(`${__(e)}${k_}${__(e)}`,"g");const{toString:O_}=Object.prototype;const I_={global:"g",ignoreCase:"i",multiline:"m",dotAll:"s",sticky:"y",unicode:"u"};function N_(e,t={}){if(n=e,"[object RegExp]"!==O_.call(n))throw new TypeError("Expected a RegExp instance");var n;const r=Object.keys(I_).map((n=>("boolean"==typeof t[n]?t[n]:e[n])?I_[n]:"")).join(""),i=new RegExp(t.source||e.source,r);return i.lastIndex="number"==typeof t.lastIndex?t.lastIndex:e.lastIndex,i}function P_(e,t,{timeout:n}={}){try{return function(e,{timeout:t}={}){const n=new le.Script("returnValue = function_()"),r=(...r)=>{const i={function_:()=>e(...r)};return n.runInNewContext(i,{timeout:t}),i.returnValue};return Object.defineProperty(r,"name",{value:`functionTimeout(${e.name||"<anonymous>"})`,configurable:!0}),r}((()=>N_(e).test(t)),{timeout:n})()}catch(e){if(function(e){return"ERR_SCRIPT_EXECUTION_TIMEOUT"===e?.code}(e))return!1;throw e}}const C_={timeout:400};function j_(e){return!(e.length>45)&&P_(R_.v6({exact:!0}),e,C_)}function L_(e){return!(e.length>15)&&P_(R_.v4({exact:!0}),e,C_)}class D_ extends Error{constructor(e){super("Could not get the public IP address",e),this.name="IpNotFoundError"}}const $_={timeout:5e3,onlyHttps:!1},U_=[{v4:{servers:["208.67.222.222","208.67.220.220","208.67.222.220","208.67.220.222"],name:"myip.opendns.com",type:"A"},v6:{servers:["2620:0:ccc::2","2620:0:ccd::2"],name:"myip.opendns.com",type:"AAAA"}},{v4:{servers:["216.239.32.10","216.239.34.10","216.239.36.10","216.239.38.10"],name:"o-o.myaddr.l.google.com",type:"TXT",transform:e=>e.replaceAll('"',"")},v6:{servers:["2001:4860:4802:32::a","2001:4860:4802:34::a","2001:4860:4802:36::a","2001:4860:4802:38::a"],name:"o-o.myaddr.l.google.com",type:"TXT",transform:e=>e.replaceAll('"',"")}}],B_={v4:{dnsServers:U_.map((({v4:{servers:e,...t}})=>({servers:e,question:t}))),httpsUrls:["https://icanhazip.com/","https://api.ipify.org/"]},v6:{dnsServers:U_.map((({v6:{servers:e,...t}})=>({servers:e,question:t}))),httpsUrls:["https://icanhazip.com/","https://api6.ipify.org/"]}},z_=(e,t)=>{const n=B_[e],r=Mb({retries:0,maxQueries:1,socket:D.createSocket("v6"===e?"udp6":"udp4"),timeout:t.timeout}),i=j(r.query.bind(r)),s=(async()=>{let t;for(const s of n.dnsServers){const{servers:n,question:a}=s;for(const s of n){if(r.destroyed)return;try{const{name:t,type:n,transform:o}=a,c=await i({questions:[{name:t,type:n}]},53,s),{answers:{0:{data:u}}}=c,l=("string"==typeof u?u:u.toString()).trim(),d=o?o(l):l;if(d&&("v6"===e?j_:L_)(d))return r.destroy(),d}catch(e){t=e}}}throw r.destroy(),new D_({cause:t})})();return s.cancel=()=>{r.destroy()},s},q_=(e,t)=>{let n;const r=(async()=>{try{const r={dnsLookupIpVersion:"v6"===e?6:4,retry:{limit:0},timeout:{request:t.timeout}},i=[...B_[e].httpsUrls,...t.fallbackUrls??[]];let s;for(const t of i)try{const i=w_.get(t,r);n=i.cancel;const s=await i,a=s.body?.trim();if(a&&("v6"===e?j_:L_)(a))return a}catch(e){if(s=e,e instanceof p_)throw e}throw new D_({cause:s})}catch(e){if(!(e instanceof p_))throw e}})();return r.cancel=function(){return n.apply(this)},r},H_=(e,t)=>{let n;const r=(async()=>{let r;const i=z_(e,t);n=i.cancel;try{r=await i}catch{const i=q_(e,t);n=i.cancel,r=await i}return r})();return r.cancel=n,r},F_=function(e,t){return function(n){const r=e(n),i=t(n),s=(async()=>{try{const e=await i;return r.catch((()=>{})),r.cancel(),e}catch(e){if(!(e instanceof D_))throw e;try{return await r}catch(t){throw new AggregateError([t,e])}}})();return s.cancel=()=>{r.cancel(),i.cancel()},s}}((function(e){if(e={...$_,...e},!e.onlyHttps)return H_("v4",e);if(e.onlyHttps)return q_("v4",e);return z_("v4",e)}),(function(e){if(e={...$_,...e},!e.onlyHttps)return H_("v6",e);if(e.onlyHttps)return q_("v6",e);return z_("v6",e)}));class Y_{static create(e,t,n,r){if(t===Ul.EVM)return new lE(e,n,r);throw new Error(`Unsupported blockchain: ${t}`)}}class V_{serviceLogger;env;pk;constructor(e,t,n){this.serviceLogger=e,this.env=t,this.pk=n}}var K_;function W_(e){switch(e){case K_.LOCAL:return{url:"http://127.0.0.1:8545",chainId:"31337",contractAddress:"0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0",taskRegistryAddress:"0xDc64a140Aa3E981100a9becA4E685f962f0cF6C9",authorizationAddress:"0x0165878A594ca255338adfa4d48449f69242Eb8F"};case K_.LOCAL_DOCKER:return{url:"http://hardhat-node:8545",chainId:"31337",contractAddress:"0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0",taskRegistryAddress:"0xDc64a140Aa3E981100a9becA4E685f962f0cF6C9",authorizationAddress:"0x0165878A594ca255338adfa4d48449f69242Eb8F"};case K_.TESTNET:return{url:process.env.RPC_URL||"https://api.avax-test.network/ext/bc/C/rpc",chainId:"43113",contractAddress:"0xB0Cd8d3430C14ecc08c4ccff713d5b21b472f88C",taskRegistryAddress:"0x26F9aD5E14518C4D4FD86EDA9753c28db5a85bEA",authorizationAddress:"0xdA5a5a58ee6fd52B3D0a60758695F7f0f2354F7a"};case K_.STAGING:return{url:process.env.RPC_URL||"https://api.avax-test.network/ext/bc/C/rpc",chainId:"43113",contractAddress:"0x84B5e1c533F3A4b24336a4cFFE546E09D56666Ce",taskRegistryAddress:"0x712c0E7122CBa5b0087DED2D7F1beAE9d24e5f5A",authorizationAddress:"0xc84f349C46e046ca6dbd7e653700DF728FA496E4"};case K_.EARLY_ACCESS:return{url:process.env.RPC_URL||"https://api.avax-test.network/ext/bc/C/rpc",chainId:"43113",contractAddress:"0x5F13b58a9737F0507c841F63417d27eEd066eaB1",taskRegistryAddress:"0x2DC64DC9AFa010fd702e5Ad721cd8864B77080df",authorizationAddress:"0xB2DE18FC7A3776f137dD590EaDD133793354882f"};case K_.PRODUCTION:return{url:process.env.RPC_URL||"https://api.avax.network/ext/bc/C/rpc",chainId:"43114",contractAddress:"0x6E7175c46C1e2aC0EEE92C22Fa18Df0D98da72C2",taskRegistryAddress:"0x6825142A0e85dDB3cBf872a26eE2beefaedbc465",authorizationAddress:"0x6da8eE7DF16BD92eb71F314f4b701C6c5b0b2721"};default:throw new Error(`Unsupported environment: ${e}`)}}!function(e){e.LOCAL="local",e.LOCAL_DOCKER="local-docker",e.TESTNET="testnet",e.STAGING="staging",e.EARLY_ACCESS="early-access",e.PRODUCTION="production"}(K_||(K_={}));var G_=[{inputs:[],name:"InvalidInitialization",type:"error"},{inputs:[],name:"NotInitializing",type:"error"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"OwnableInvalidOwner",type:"error"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"OwnableUnauthorizedAccount",type:"error"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"id",type:"address"}],name:"DeRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint64",name:"version",type:"uint64"}],name:"Initialized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"id",type:"address"},{indexed:!1,internalType:"uint256",name:"index",type:"uint256"}],name:"Registered",type:"event"},{inputs:[],name:"deRegister",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"id",type:"address"}],name:"deRegisterAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"deRegisterAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"index",type:"uint256"}],name:"getNodeAtIndex",outputs:[{components:[{internalType:"address",name:"nodeAddress",type:"address"},{internalType:"uint256",name:"blockNumber",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct NodeRegistry.Registration",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getNodeCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"node",type:"address"}],name:"getNodeIndexByAddress",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getNodes",outputs:[{components:[{internalType:"address",name:"nodeAddress",type:"address"},{internalType:"uint256",name:"blockNumber",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct NodeRegistry.Registration[]",name:"",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"nodeIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"registerNode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"registeredNodes",outputs:[{internalType:"address",name:"nodeAddress",type:"address"},{internalType:"uint256",name:"blockNumber",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"}];let J_={delay:250,maxTry:240,until:null};function Z_(e,t){const n=Object.assign(Object.assign({},Object.assign({},J_)),t);return Object.assign(Object.assign({},n),{currentTry:e,maxTry:n.maxTry||240,delay:X_(n.delay),until:n.until?n.until:()=>!0})}function X_(e){return void 0===e?()=>250:"function"==typeof e?e:()=>e}class Q_ extends Error{constructor(e=void 0){super("function did not complete within allowed number of attempts"),this.lastResult=e,this.tooManyTries=!0}getLastResult(){return this.lastResult}}function eE(e){return!0===e.tooManyTries}var tE=function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{c(r.next(e))}catch(e){s(e)}}function o(e){try{c(r.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}c((r=r.apply(e,t||[])).next())}))};function nE(e,t){return tE(this,void 0,void 0,(function*(){const n=Z_(1,t);return yield rE(e,n)}))}function rE(e,t){return tE(this,void 0,void 0,(function*(){const n=t.currentTry<t.maxTry;try{const r=yield e();if(t.until(r))return t.onSuccessFunc&&t.onSuccessFunc(r,t.currentTry),r;throw n?new Error("function result failed to meet until() requirements"):new Q_(r)}catch(r){if(!eE(r)&&n)return t.onError&&t.onError(r,t.currentTry),yield function(e,t,n){return tE(this,void 0,void 0,(function*(){const r=t.delay({currentTry:t.currentTry,maxTry:t.maxTry,lastDelay:t.lastDelay,lastResult:n});yield function(e=6e4){return new Promise((t=>setTimeout(t,e)))}(r);const i=Object.assign(Object.assign({},t),{currentTry:t.currentTry+1});return yield rE(e,i)}))}(e,t);throw t.onMaxRetryFunc&&t.onMaxRetryFunc(r,t.currentTry),r}}))}class iE{serviceLogger;provider;signer;contractAddress;nodeRegistryContract;constructor(e,t,n){this.serviceLogger=e;const r=W_(t);this.provider=n.provider,this.signer=n,this.contractAddress=r.contractAddress,this.nodeRegistryContract=new de.Contract(this.contractAddress,G_,this.signer)}async getChainId(){const{chainId:e}=await this.provider.getNetwork();return e.toString()}getRegistrationContractAddress(){return this.contractAddress}async registerNode(){await this.nodeRegistryContract.registerNode()}async getNodes(){return(await this.nodeRegistryContract.getNodes()).map((e=>({nodeAddress:e.nodeAddress,blockNumber:e.blockNumber,timestamp:e.timestamp})))}async getNodeCount(){return await this.nodeRegistryContract.getNodeCount()}async deRegister(){return await this.nodeRegistryContract.deRegister()}async deRegisterAddress(e){await this.nodeRegistryContract.deRegisterAddress(e)}async getNodeAtIndex(e){const t=await this.nodeRegistryContract.getNodeAtIndex(e);return{nodeAddress:t.nodeAddress,blockNumber:t.blockNumber,timestamp:t.timestamp}}async getNodeIndexByAddress(e){return await this.nodeRegistryContract.getNodeIndexByAddress(e)}async deRegisterAll(){await this.nodeRegistryContract.deRegisterAll()}async getBlockInfo(){const e=await this.provider.getBlock("latest");if(!e)throw"Couldn't get latest block information";if(!e.hash)throw"Couldn't get block hash";return{hash:e.hash,number:e.number,timestamp:e.timestamp}}async getBlockHash(){const e=await this.provider.getBlock("latest");return e?e.hash:null}async waitForBlocks(e){const t=(await nE((async()=>await this.provider.getBlock("latest")),{delay:2e3,maxTry:Number.MAX_SAFE_INTEGER,until:e=>null!=e})).number+e;await nE((async()=>await this.provider.getBlock("latest")),{delay:2e3,maxTry:Number.MAX_SAFE_INTEGER,until:e=>null!=e&&e.number>=t})}async sendSignedTransaction(e){if(!this.signer)throw"Private key wasn't provided";const t=await this.signer.sendTransaction({data:e}),n=await t.wait();if(n)return n.blockHash;throw new Error("Transaction receipt is null")}async signTransaction(e){if(!this.signer)throw"Private key wasn't provided";return await this.signer.signTransaction(e)}async estimateGas(e){try{return await this.provider.estimateGas(e)}catch(e){throw console.error("Error estimating gas:",e),e}}}var sE=[{inputs:[],name:"ECDSAInvalidSignature",type:"error"},{inputs:[{internalType:"uint256",name:"length",type:"uint256"}],name:"ECDSAInvalidSignatureLength",type:"error"},{inputs:[{internalType:"bytes32",name:"s",type:"bytes32"}],name:"ECDSAInvalidSignatureS",type:"error"},{inputs:[],name:"InvalidInitialization",type:"error"},{inputs:[],name:"NotInitializing",type:"error"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"OwnableInvalidOwner",type:"error"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"OwnableUnauthorizedAccount",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!1,internalType:"address",name:"grantee",type:"address"}],name:"AccessGranted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!1,internalType:"address",name:"grantee",type:"address"}],name:"AccessRevoked",type:"event"},{anonymous:!1,inputs:[],name:"EIP712DomainChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint64",name:"version",type:"uint64"}],name:"Initialized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"string",name:"namespace",type:"string"},{indexed:!1,internalType:"uint256",name:"nonce",type:"uint256"}],name:"MetaNamespaceRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"string",name:"namespace",type:"string"},{indexed:!1,internalType:"string",name:"taskName",type:"string"},{indexed:!1,internalType:"uint256",name:"nonce",type:"uint256"}],name:"MetaTaskRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!1,internalType:"address",name:"oldOwner",type:"address"},{indexed:!1,internalType:"address",name:"newOwner",type:"address"}],name:"NamespaceOwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!1,internalType:"address",name:"owner",type:"address"}],name:"NamespaceRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!0,internalType:"string",name:"taskName",type:"string"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"TaskDisabled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!0,internalType:"string",name:"taskName",type:"string"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"TaskEnabled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"string",name:"cid",type:"string"},{indexed:!1,internalType:"address",name:"sender",type:"address"}],name:"TaskIdRevoked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!0,internalType:"string",name:"taskName",type:"string"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"TaskRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!0,internalType:"string",name:"taskName",type:"string"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"},{indexed:!1,internalType:"string",name:"label",type:"string"}],name:"VersionLabelSet",type:"event"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{internalType:"uint256",name:"version",type:"uint256"}],name:"disableTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{internalType:"string",name:"label",type:"string"}],name:"disableTaskByLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"eip712Domain",outputs:[{internalType:"bytes1",name:"fields",type:"bytes1"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"version",type:"string"},{internalType:"uint256",name:"chainId",type:"uint256"},{internalType:"address",name:"verifyingContract",type:"address"},{internalType:"bytes32",name:"salt",type:"bytes32"},{internalType:"uint256[]",name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{internalType:"uint256",name:"version",type:"uint256"}],name:"enableTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"}],name:"getLatestActiveVersion",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"}],name:"getLatestVersion",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"}],name:"getTask",outputs:[{components:[{internalType:"string",name:"taskId",type:"string"},{internalType:"string",name:"meta",type:"string"},{internalType:"bool",name:"active",type:"bool"}],internalType:"struct TaskRegistry.Task",name:"",type:"tuple"},{internalType:"address",name:"",type:"address"},{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{internalType:"string",name:"label",type:"string"}],name:"getTaskByLabel",outputs:[{components:[{internalType:"string",name:"taskId",type:"string"},{internalType:"string",name:"meta",type:"string"},{internalType:"bool",name:"active",type:"bool"}],internalType:"struct TaskRegistry.Task",name:"",type:"tuple"},{internalType:"address",name:"",type:"address"},{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{internalType:"uint256",name:"version",type:"uint256"}],name:"getTaskByVersion",outputs:[{components:[{internalType:"string",name:"taskId",type:"string"},{internalType:"string",name:"meta",type:"string"},{internalType:"bool",name:"active",type:"bool"}],internalType:"struct TaskRegistry.Task",name:"",type:"tuple"},{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"address",name:"grantee",type:"address"}],name:"grantNamespaceAccess",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"input",type:"string"}],name:"isAsciiString",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"string",name:"taskId",type:"string"}],name:"isTaskRevoked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"str",type:"string"}],name:"isValidName",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"},{internalType:"string",name:"",type:"string"},{internalType:"string",name:"",type:"string"}],name:"labeledVersions",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"},{internalType:"string",name:"",type:"string"}],name:"latestVersion",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"},{internalType:"address",name:"",type:"address"}],name:"namespaceGrantees",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"}],name:"namespaceOwners",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{components:[{internalType:"string",name:"taskId",type:"string"},{internalType:"string",name:"meta",type:"string"},{internalType:"bool",name:"active",type:"bool"}],internalType:"struct TaskRegistry.Task",name:"task",type:"tuple"}],name:"registerTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"}],name:"registerTaskNamespace",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"string",name:"namespace",type:"string"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"registerTaskNamespaceWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{components:[{internalType:"string",name:"taskId",type:"string"},{internalType:"string",name:"meta",type:"string"},{internalType:"bool",name:"active",type:"bool"}],internalType:"struct TaskRegistry.Task",name:"task",type:"tuple"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"registerTaskWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"address",name:"grantee",type:"address"}],name:"revokeNamespaceAccess",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"taskId",type:"string"}],name:"revokeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"}],name:"revokedTaskId",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{internalType:"uint256",name:"version",type:"uint256"},{internalType:"string",name:"label",type:"string"}],name:"setTaskLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"},{internalType:"string",name:"",type:"string"},{internalType:"uint256",name:"",type:"uint256"}],name:"tasks",outputs:[{internalType:"string",name:"taskId",type:"string"},{internalType:"string",name:"meta",type:"string"},{internalType:"bool",name:"active",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"address",name:"newOwner",type:"address"}],name:"transferTaskNamespace",outputs:[],stateMutability:"nonpayable",type:"function"}];class aE{serviceLogger;provider;signer;taskRegistryAddress;taskRegistryContract;transactionSuccess=1;constructor(e,t,n){this.serviceLogger=e;const r=W_(t);this.provider=n.provider,this.signer=n,this.taskRegistryAddress=r.taskRegistryAddress,this.taskRegistryContract=new de.Contract(this.taskRegistryAddress,sE,this.signer)}getTaskRegistryContractAddress(){return this.taskRegistryAddress}async getEIP712Domain(){return{name:"TaskRegistry",version:"1",chainId:Number(await this.provider.getNetwork().then((e=>e.chainId))),verifyingContract:this.taskRegistryAddress}}async registerTaskNamespace(e){if((await(await this.taskRegistryContract.registerTaskNamespace(e)).wait()).status==this.transactionSuccess)return!0;throw new Error("Error registering task namespace")}async nonces(e){return await this.taskRegistryContract.nonces(e)}async getNamespaceOwner(e){return await this.taskRegistryContract.namespaceOwners(e)}async registerTaskNamespaceWithSignature(e){const t=await this.provider.getFeeData();let n=null;t.gasPrice&&(n=2n*t.gasPrice);const r=2n*await this.taskRegistryContract.registerTaskNamespaceWithSignature.estimateGas(e.user,e.namespace,e.deadline,e.signatureMeta,{gasPrice:n}),i=await nE((async()=>{const t=await this.taskRegistryContract.registerTaskNamespaceWithSignature(e.user,e.namespace,e.deadline,e.signatureMeta,{gasPrice:n,gasLimit:r});return await t.wait()}),{delay:1e3,maxTry:10,until:e=>!e.messages||!e.messages.includes("nonce too")&&!e.messages.includes("replacement transaction underpriced")||(this.serviceLogger&&this.serviceLogger.error(`${e.messages}`),this.signer instanceof de.NonceManager&&this.signer.reset(),!1)});if(i.status==this.transactionSuccess)return i;throw new Error("Error registering task namespace")}async transferTaskNamespace(e,t){if((await(await this.taskRegistryContract.transferTaskNamespace(e,t)).wait()).status==this.transactionSuccess)return!0;throw new Error("Error transferring task namespace")}async grantNamespaceAccess(e,t){if((await(await this.taskRegistryContract.grantNamespaceAccess(e,t)).wait()).status==this.transactionSuccess)return!0;throw new Error("Error granting task namespace")}async revokeNamespaceAccess(e,t){if((await(await this.taskRegistryContract.revokeNamespaceAccess(e,t)).wait()).status==this.transactionSuccess)return!0;throw new Error("Error revoking task namespace")}async setTaskLabel(e,t,n,r){if(r.length>128)throw new Error("Label exceeds maximum length of 128 chars");if((await(await this.taskRegistryContract.setTaskLabel(e,t,n,r)).wait()).status==this.transactionSuccess)return!0;throw new Error("Error setting task label")}async registerTask(e,t,n){if((await(await this.taskRegistryContract.registerTask(e,t,n)).wait()).status==this.transactionSuccess)return!0;throw new Error("Error registering task")}async registerTaskWithSignature(e){const t=await this.provider.getFeeData();let n=null;t.gasPrice&&(n=2n*t.gasPrice);const r=2n*await this.taskRegistryContract.registerTaskWithSignature.estimateGas(e.user,e.namespace,e.taskName,e.task,e.deadline,e.signatureMeta,{gasPrice:n}),i=await nE((async()=>{const t=await this.taskRegistryContract.registerTaskWithSignature(e.user,e.namespace,e.taskName,e.task,e.deadline,e.signatureMeta,{gasPrice:n,gasLimit:r});return await t.wait()}),{delay:1e3,maxTry:10,until:e=>!e.messages||!e.messages.includes("nonce too")&&!e.messages.includes("replacement transaction underpriced")||(this.serviceLogger&&this.serviceLogger.error(`${e.messages}`),this.signer instanceof de.NonceManager&&this.signer.reset(),!1)});if(i.status==this.transactionSuccess)return i;throw new Error("Error registering task")}async getTask(e,t){const n=await this.taskRegistryContract.getTask(e,t);return{namespace:e,taskId:n[0][0],version:Number(n[2]),meta:n[0][1],nameSpaceOwner:n[1]}}async getTaskByLabel(e,t,n){const r=await this.taskRegistryContract.getTaskByLabel(e,t,n);return{namespace:e,taskId:r[0][0],version:Number(r[2]),label:n,meta:r[0][1],nameSpaceOwner:r[1]}}async getTaskByVersion(e,t,n){const r=await this.taskRegistryContract.getTaskByVersion(e,t,n);return{namespace:e,taskId:r[0][0],version:Number(n),meta:r[0][1],nameSpaceOwner:r[1]}}async disableTask(e,t,n){if((await(await this.taskRegistryContract.disableTask(e,t,n)).wait()).status==this.transactionSuccess)return!0;throw new Error("Error disabling task")}async enableTask(e,t,n){if((await(await this.taskRegistryContract.enableTask(e,t,n)).wait()).status==this.transactionSuccess)return!0;throw new Error("Error enabling task")}async isTaskRevoked(e){return await this.taskRegistryContract.isTaskRevoked(e)}async getLatestVersion(e,t){const n=Number(await this.taskRegistryContract.getLatestVersion(e,t));if(0==n)throw`Task (${t}) not found in namespace (${e})`;return n}async getLatestActiveVersion(e,t){return Number(await this.taskRegistryContract.getLatestActiveVersion(e,t))}}var oE=[{inputs:[],name:"ECDSAInvalidSignature",type:"error"},{inputs:[{internalType:"uint256",name:"length",type:"uint256"}],name:"ECDSAInvalidSignatureLength",type:"error"},{inputs:[{internalType:"bytes32",name:"s",type:"bytes32"}],name:"ECDSAInvalidSignatureS",type:"error"},{inputs:[],name:"InvalidInitialization",type:"error"},{inputs:[],name:"NotInitializing",type:"error"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"OwnableInvalidOwner",type:"error"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"OwnableUnauthorizedAccount",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"Deregistered",type:"event"},{anonymous:!1,inputs:[],name:"EIP712DomainChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!0,internalType:"address",name:"grantee",type:"address"}],name:"Granted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint64",name:"version",type:"uint64"}],name:"Initialized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"Registered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!0,internalType:"address",name:"grantee",type:"address"}],name:"Revoked",type:"event"},{inputs:[{internalType:"string",name:"apiKeyHash",type:"string"}],name:"deregister",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"string",name:"apiKeyHash",type:"string"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"deregisterWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"eip712Domain",outputs:[{internalType:"bytes1",name:"fields",type:"bytes1"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"version",type:"string"},{internalType:"uint256",name:"chainId",type:"uint256"},{internalType:"address",name:"verifyingContract",type:"address"},{internalType:"bytes32",name:"salt",type:"bytes32"},{internalType:"uint256[]",name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"apiKeyHash",type:"string"}],name:"getPayer",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"address",name:"grantee",type:"address"}],name:"grant",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"string",name:"namespace",type:"string"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"grantWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_taskRegistry",type:"address"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"address",name:"grantee",type:"address"}],name:"isAuthorized",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"apiKeyHash",type:"string"}],name:"register",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"string",name:"apiKeyHash",type:"string"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"registerWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"address",name:"grantee",type:"address"}],name:"revoke",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"string",name:"namespace",type:"string"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"revokeWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_taskRegistry",type:"address"}],name:"setTaskRegistry",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"taskRegistry",outputs:[{internalType:"contract ITaskRegistry",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"}];class cE{serviceLogger;provider;signer;authorizationAddress;authorizationContract;transactionSuccess=1;constructor(e,t,n){this.serviceLogger=e;const r=W_(t);this.provider=n.provider,this.signer=n,this.authorizationAddress=r.authorizationAddress,this.authorizationContract=new de.Contract(this.authorizationAddress,oE,this.signer)}getAuthorizationContractAddress(){return this.authorizationAddress}async getEIP712Domain(){return{name:"Authorization",version:"1",chainId:Number(await this.provider.getNetwork().then((e=>e.chainId))),verifyingContract:this.authorizationAddress}}async nonces(e){return await this.authorizationContract.nonces(e)}async grantAuthorization(e,t){if((await(await this.authorizationContract.grant(e,t)).wait()).status==this.transactionSuccess)return!0;throw new Error("Error granting authorization")}async grantAuthorizationWithSignature(e){const t=await this.provider.getFeeData();let n=null;t.gasPrice&&(n=2n*t.gasPrice);if((await nE((async()=>{const t=await this.authorizationContract.grantWithSignature(e.user,e.namespace,e.deadline,e.signatureMeta,{gasPrice:n});return await t.wait()}),{delay:1e3,maxTry:10,until:e=>!e.messages||!e.messages.includes("Nonce too")&&!e.messages.includes("replacement transaction underpriced")||(this.serviceLogger&&this.serviceLogger.error(`${e.messages}`),this.signer instanceof de.NonceManager&&this.signer.reset(),!1)})).status==this.transactionSuccess)return!0;throw new Error("Error granting authorization with signature")}async revokeAuthorization(e,t){if((await(await this.authorizationContract.revoke(e,t)).wait()).status==this.transactionSuccess)return!0;throw new Error("Error revoking authorization")}async revokeAuthorizationWithSignature(e){if((await nE((async()=>{const t=await this.authorizationContract.revokeWithSignature(e.user,e.namespace,e.deadline,e.signatureMeta);return await t.wait()}),{delay:1e3,maxTry:10,until:e=>!e.messages||!e.messages.includes("Nonce too")&&!e.messages.includes("replacement transaction underpriced")||(this.serviceLogger&&this.serviceLogger.error(`${e.messages}`),this.signer instanceof de.NonceManager&&this.signer.reset(),!1)})).status==this.transactionSuccess)return!0;throw new Error("Error revoking authorization with signature")}async registerAuthorization(e){if((await(await this.authorizationContract.register(e)).wait()).status==this.transactionSuccess)return!0;throw new Error("Error registering authorization")}async registerAuthorizationWithSignature(e){const t=await this.provider.getFeeData();let n=null;t.gasPrice&&(n=2n*t.gasPrice);const r=2n*await this.authorizationContract.registerWithSignature.estimateGas(e.user,e.apiKeyHash,e.deadline,e.signatureMeta,{gasPrice:n}),i=await nE((async()=>{const t=await this.authorizationContract.registerWithSignature(e.user,e.apiKeyHash,e.deadline,e.signatureMeta,{gasPrice:n,gasLimit:r});return await t.wait()}),{delay:1e3,maxTry:10,until:e=>!e.messages||!e.messages.includes("Nonce too")&&!e.messages.includes("replacement transaction underpriced")||(this.serviceLogger&&this.serviceLogger.error(`${e.messages}`),this.signer instanceof de.NonceManager&&this.signer.reset(),!1)});if(i.status==this.transactionSuccess)return i;throw new Error("Error registering authorization with signature")}async deRegisterAuthorization(e){if((await(await this.authorizationContract.deregister(e)).wait()).status==this.transactionSuccess)return!0;throw new Error("Error deregistering authorization")}async deRegisterAuthorizationWithSignature(e){if((await nE((async()=>{const t=await this.authorizationContract.deregisterWithSignature(e.user,e.apiKeyHash,e.deadline,e.signatureMeta);return await t.wait()}),{delay:1e3,maxTry:10,until:e=>!e.messages||!e.messages.includes("Nonce too")&&!e.messages.includes("replacement transaction underpriced")||(this.serviceLogger&&this.serviceLogger.error(`${e.messages}`),this.signer instanceof de.NonceManager&&this.signer.reset(),!1)})).status==this.transactionSuccess)return!0;throw new Error("Error deregistering authorization with signature")}async isAuthorized(e,t){return await this.authorizationContract.isAuthorized(e,t)}async getPayerAddress(e){return await this.authorizationContract.getPayer(e)}}class uE{provider;signer;constructor(e,t){this.provider=t.provider,this.signer=t}async signMeta(e,t,n){if(!function(e){return e&&"string"==typeof e.name&&"string"==typeof e.version&&"number"==typeof e.chainId&&"string"==typeof e.verifyingContract}(e))throw new Error("Invalid EIP712Domain");return await this.signer.signTypedData(e,t,n)}async getCurrentNonce(){return await this.signer.getNonce()}async reSyncNonceManager(){this.signer instanceof de.NonceManager&&this.signer.reset()}}class lE extends V_{nodeRegistry;taskRegistry;authorization;utils;signer;constructor(e,t,n){if(super(e,t,n),void 0===n)throw new Error("Private key wasn't provided");const r=W_(t),i=new de.Network(t,r.chainId),s=new de.JsonRpcProvider(`${r.url}`,i,{staticNetwork:i}),a=new de.Wallet(n,s);this.signer=new de.NonceManager(a),this.nodeRegistry=new iE(this.serviceLogger,t,this.signer),this.taskRegistry=new aE(this.serviceLogger,t,this.signer),this.authorization=new cE(this.serviceLogger,t,this.signer),this.utils=new uE(t,this.signer)}}const dE=e=>{throw A.isAxiosError(e)?e.response?e.response.data.message.includes("Entitlement Validation Error")?nb.USER_NO_REGISTERED:`${e.response.data.message||e.response.data}`:e.request?`Server is not responding: ${e.message}\n${e.config?.method} - ${e.config?.url}`:e.message:e.message};function pE(e,t){if(e!==e.toLowerCase())throw new Error(`${t} must be lowercase.`)}function fE(e){return Y_.create(null,Ul.EVM,e,eb("privateKey"))}function hE(e){if(!de.isAddress(e)||42!==e.length||!e.startsWith("0x"))throw new Error("Must be a valid ethereum address. (ENS not supported yet)")}async function mE(){try{return await F_({onlyHttps:!0})}catch{return"unknown"}}function gE(e){const t=Zy(),n=null!==t;let r=0;switch(r=n&&(!n||t.privateKey&&t.address)?2:1,r){case 1:console.error(nb.USER_NO_REGISTERED),process.exit(1);break;case 2:e=Zh.createSignedBody(e,t.privateKey,t.address)}return e}const yE=async(e,n)=>{const r=`./tmp.${k()}`;try{t.mkdirSync(r);const a=i.join(process.cwd(),n);if(!t.existsSync(a))throw"Task path doesn't exist";if(e===ao.C||e===ao.RUST||e===ao.JS||e===ao.PYTHON){const e="config.json",n=i.join(a,e);if(!t.existsSync(n)){const e={run:{limits:{call:"65536",frame:"524288",gas:"1099511627776",memory:"2048"}}};t.writeFileSync(n,JSON.stringify(e))}t.copyFileSync(n,i.join(r,e));const s="fs.tar",o=i.join(a,s);t.existsSync(o)&&t.copyFileSync(o,i.join(r,s))}const o=im.createBuild(e);await o.build(n,r);const c=await async function(e,n){if(!t.existsSync(e))throw"Invalid source code path";const r=t.readdirSync(e);if(0===r.length)throw"No files found in directory";const i=new Fy;for(const n of r){const r=e+`/${n}`,a=t.readFileSync(r),o=s.basename(r);i.append("files",a,o)}i.append("lang",n);const a={files:r,lang:n},o=gE(a),c=await ib();return i.append("walletAddress",o.walletAddress),i.append("signature",JSON.stringify(o.signature)),i.append("fmpayload",JSON.stringify(a)),(await c.post("api/filesystem/pushLocal",i,{headers:{...i.getHeaders()}}).catch((e=>{dE(e)}))).data}(r,e);return t.rmSync(r,{recursive:!0}),c}catch(e){throw t.rmSync(r,{recursive:!0}),e}},{parse:bE,stringify:vE}=JSON,wE=String,xE=(e,t)=>t,_E=(e,t,n)=>{const r=wE(t.push(n)-1);return e.set(n,r),r},EE=(e,t,n)=>{const r=xE,i=new Map,s=[],a=[];let o=+_E(i,s,r.call({"":e},"",e)),c=!o;for(;o<s.length;)c=!0,a[o]=vE(s[o++],u,n);return"["+a.join(",")+"]";function u(e,t){if(c)return c=!c,t;const n=r.call(this,e,t);switch(typeof n){case"object":if(null===n)return n;case"string":return i.get(n)||_E(i,s,n)}return n}},SE=e=>bE(EE(e));async function kE(e,t,n,r,i){const s=n.body,a=n.method.toLowerCase();let o,c={},u=0,l=0;o=["post","put","patch"].includes(a)?e+t.path:`${e}${function(e,t){if(t)for(const n in t){const r=t[n];e=e.replace(new RegExp(`{${n}}`,"g"),r)}return e}(t.path,t.params||{})}`;const d=A.create({headers:{Connection:"keep-alive"},httpsAgent:new w.Agent({keepAlive:!0}).on("keylog",((e,t)=>{const n=t.getSession(),r=Buffer.from(n).toString("hex").toUpperCase();c={tlsCert:SE(t.getPeerCertificate(!0)),localCertificate:SE(t.getCertificate()),ephemeral:t.getEphemeralKeyInfo(),cipher:t.getCipher(),session:r,ticket:t.getTLSTicket(),localAddress:t.localAddress,sharedSigAlgs:t.getSharedSigalgs(),remoteAddress:t.remoteAddress,protocol:t.getProtocol()}})),maxContentLength:1/0,maxBodyLength:1/0});d.interceptors.request.use((e=>{const t=e.data?JSON.stringify(e.data):"";return u=(e.url?.length||0)+(t.length||0)+JSON.stringify(e.headers).length,e})),d.interceptors.response.use((e=>(l=JSON.stringify(e.data).length+JSON.stringify(e.headers).length,e)));try{let e;switch(a){case"get":e=await d.get(o,{headers:r,timeout:i});break;case"patch":e=await d.patch(o,s,{headers:r,timeout:i});break;case"post":e=await d.post(o,s,{headers:r,timeout:i});break;case"put":e=await d.put(o,s,{headers:r,timeout:i});break;case"delete":e=await d.delete(o,{headers:r,timeout:i});break;default:throw new Error("Unsupported HTTP method")}return[e.data,JSON.stringify(c),bu.SUCCEED,u,l]}catch(e){let t,n;return n=e.response&&e.response.data?JSON.stringify(e.response.data):e.message,t=A.isAxiosError(e)&&e.response||{data:n,status:500,statusText:"",headers:{},config:{headers:{}}},[t.data,JSON.stringify(c),bu.FAILED,u,l]}}function AE(e,t){const n=t.method;if(["POST","PUT","PATCH"].includes(n)){return{host:e,path:t.path,method:n,body:t.body,headers:{}}}if("GET"===n||"DELETE"===n){const r=t.path,i=t.params;return{host:e,path:r.replace(/{(\w+)}/g,((e,t)=>i?.[t]??"")),method:n,headers:{}}}throw console.error("Unsupported method:",n),new Error("Api_Adapter create request error format")}async function TE(e,t){try{const n=await N(e),r=function(e){const t=e.servers;if(t&&t.length>0){const e=t[0];let n=e.url;return e.variables&&Object.keys(e.variables).forEach((t=>{const r=e.variables[t],i=r.default||r.enum&&r.enum[0];if(void 0===i)throw new Error(`No default value found for variable ${t}`);n=n.replace(`{${t}}`,i)})),n}throw new Error("No servers defined in OpenAPI document")}(n),i=AE(r,t),[s,a]=n.request(i);return a?["",a,bu.FAILED]:[r,"",bu.SUCCEED]}catch(e){return console.log(e),["",e,bu.FAILED]}}class ME{tokens=[];authInputs;parse(e,t){const n=this.parseKeyValuePairs(t);if(0==e.length)return void(this.authInputs=n);const r=Object.keys(n);if(!e.every((e=>r.includes(e))))throw new Error(`Invalid authString: ${e} are required`);{const t={};for(const r of e)t[r]=n[r];this.authInputs=t}}parseKeyValuePairs(e){try{const t=e.split(","),n={};for(const e of t){const[t,r]=e.split(":");n[t.trim()]=r.trim()}return n}catch{throw new Error("Invalid auth string")}}}class RE extends ME{tokens=["accessKey","secretKey"];constructor(e){super(),this.parse(this.tokens,e)}authHeaders(e){return fe.sign(e,{accessKeyId:this.authInputs.accessKey,secretAccessKey:this.authInputs.secretKey}).headers||{}}}class OE extends ME{tokens=["username","password"];constructor(e){super(),this.parse(this.tokens,e)}authHeaders(e){return{Authorization:`Basic ${btoa(`${this.authInputs.username}:${this.authInputs.password}`)}`}}}class IE extends ME{tokens=[];constructor(e){super(),this.parse([],e)}authHeaders(e){return{...this.authInputs}}}var NE;!function(e){e.AWS_SIGNATURE="aws-signature",e.BASIC_AUTH="basic-auth",e.CUSTOM_HEADER="custom-header"}(NE||(NE={}));const PE=(e,t)=>{switch(e){case NE.AWS_SIGNATURE:return new RE(t);case NE.BASIC_AUTH:return new OE(t);case NE.CUSTOM_HEADER:return new IE(t);default:throw new Error(`Invalid authentication method specified. Should be one of <${Object.values(NE)}>`)}},CE=async(e,n,r,i)=>{let s="";const a=t.readFileSync(n,"utf8"),o=JSON.parse(a).input,c=JSON.parse(a).executionTimeout,[u,l,d]=await async function(e){try{const t=JSON.parse(e);return[{path:t.path.toString(),method:t.method.toString(),body:t.body,params:t.params,headers:{}},"",bu.SUCCEED]}catch(e){return console.error("Invalid JSON format:",e),[null,"Api_Adapter create request input format",bu.FAILED]}}(JSON.stringify(o));if(s+=`${C.cyanBright("\nInput request :\n")}`,s+=JSON.stringify(u,null,2)+"\n",null===u)throw s+=`Invalid message input - ${C.red("FAIL")} \n`,new Error(`Invalid message input ${l}`);const[p,f,h]=await TE(e,u);let m,g,y;s+=`${C.cyanBright("\nBase URL = ")}${p} \n`;let b={};if(h!=bu.SUCCEED)throw console.info(`Axios call - ${C.red("ERROR")} `),console.log(s),new Error(`Invalid message input ${f}`);{s+=`${C.cyanBright("OpenAPI manifest check -")} ${C.green("OK")} \n`;const e=AE(p,u),t=new URL(p),n={host:t.host,path:t.pathname+u.path,method:u.method.toUpperCase(),headers:{"Content-Type":"application/json; charset=utf-8"},body:JSON.stringify(u.body)||""};if(r&&(b=((e,t,n)=>PE(e,t).authHeaders(n))(r,i,n)),[m,g,y]=await kE(p,u,e,b,c),null===y)throw s+=`${C.cyanBright("OpenAPI manifest check -")} ${C.red("FAIL")} \n`,new Error(` Error in Axios ${m}`);s+=`${C.cyanBright("\nAPI Task response")}\n`,s+=C.green(JSON.stringify(m,null,2)),console.log(`API Task executed with status - ${C.green("OK")} `),console.log(s)}};he.config({path:process.cwd()+"/truebit.verify.env"});const jE=e=>{const t=e.split("/");if(2!=t.length)return!1;const n=t[0].split("_");return r=n[n.length-1],!(!/^[a-f0-9]{64}$/gi.test(r)||!(e=>/^\d+\.\d+\.\d+$/.test(e))(t[1]));var r};function LE(e){if(!/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/.test(e))throw new Error("Invalid API key format")}async function DE(e,t,n=null,r=eb("blockchainEnv")){let i;pE(e,"Namespace");const s=fE(r),a=eb("address");if(!a)throw`Please provide an address property in '${Qy()}/.truebit/secret.json'`;return i=n?await s.taskRegistry.registerTaskNamespace(e):await async function(e,t,n,r){const i=await n.taskRegistry.getEIP712Domain(),s={RegisterTaskNamespaceMeta:[{name:"user",type:"address"},{name:"namespace",type:"string"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"}]},a=BigInt(await n.taskRegistry.nonces(e)),o={user:de.getAddress(e),namespace:t,nonce:a,deadline:Math.floor(Date.now()/1e3)+3600};let c=await n.utils.signMeta(i,s,o);Date.now()/1e3>=o.deadline&&(o.deadline=Math.floor(Date.now()/1e3)+7200,c=await n.utils.signMeta(i,s,o));const u=await async function(e,t,n,r,i,s){const a={user:e,namespace:t,nonce:BigInt(n),deadline:r,signatureMeta:i};try{const e=await rb(),t={...a};return t.nonce=String(a.nonce),await e.post("user/relayer/namespace",t,{params:{fromSetup:s}})}catch(e){throw A.isAxiosError(e)?e.response?new Error(`The server responding with an error - ${e.response.status+" - "+e.response.statusText+" - "+e.response.data.message}.`):e.request?new Error(`The server is not responding - ${e.message}.`):new Error(`There was an error in the communication with the server - ${e.message}.`):"string"==typeof e?new Error(`There was an error in the communication with the server -> ${e}`):new Error("There was an error in the communication with the server.")}}(e,t,o.nonce,o.deadline,c,r);return 201==u.status}(a,e,s,t),i}async function $E(e,t,n,r,i){const s=await i.taskRegistry.getEIP712Domain(),a={Task:[{name:"taskId",type:"string"},{name:"meta",type:"string"},{name:"active",type:"bool"}],RegisterTaskMeta:[{name:"user",type:"address"},{name:"namespace",type:"string"},{name:"taskName",type:"string"},{name:"task",type:"Task"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"}]},o={user:e,namespace:t,taskName:n,task:{taskId:r.taskId,meta:r.meta,active:r.active},nonce:BigInt(await i.taskRegistry.nonces(e)),deadline:Math.floor(Date.now()/1e3)+3600};let c=await i.utils.signMeta(s,a,o);Date.now()/1e3>=o.deadline&&(o.deadline=Math.floor(Date.now()/1e3)+7200,c=await i.utils.signMeta(s,a,o));const u=await async function(e,t,n,r,i,s,a){const o={user:e,namespace:t,taskName:n,task:r,nonce:BigInt(i),deadline:s,signatureMeta:a};try{const e=await rb(),t={...o};return t.nonce=String(o.nonce),await e.post("user/relayer/task",t)}catch(e){throw A.isAxiosError(e)?e.response?new Error(`The server responding with an error - ${e.response.status+" - "+e.response.statusText+" - "+e.response.data.message}.`):e.request?new Error(`The server is not responding - ${e.message}.`):new Error(`There was an error in the communication with the server - ${e.message}.`):"string"==typeof e?new Error(`There was an error in the communication with the server -> ${e}`):new Error("There was an error in the communication with the server.")}}(e,t,n,r,o.nonce,o.deadline,c);return 201==u.status}async function UE(e,t,n,r,i){if(!jE(n))throw new Error("Invalid taskId");if(r)try{r=JSON.stringify(r)}catch{throw new Error("Meta information cannot be serialized as JSON")}let s=null;try{await async function(e){const t=await ib();return await t.post("api/filesystem/push",gE({taskId:e})).catch(dE)}(n);const a={taskId:n,meta:r||"",active:!0};await async function(e,t,n,r=null){const i=fE(eb("blockchainEnv"));let s=!1;try{if(r)s=await i.taskRegistry.registerTask(t,n,e);else{const r=eb("address");if(!r)throw Error(`Please provide an address property in '${Qy()}/.truebit/secret.json'`);s=await $E(r,t,n,e,i)}}catch(e){const t=e.message,n=t.match(/execution reverted: "(.*?)" /)?.[1];throw n?new Error(`Trying to register a task -> ${n}`):new Error(`Trying to register a task -> ${t}`)}return s}(a,e,t,i),s=await async function(e,t){const n=fE(eb("blockchainEnv"));return await n.taskRegistry.getLatestVersion(e,t)}(e,t)}catch(e){if(e instanceof Error)throw e;if("string"==typeof e)throw new Error(e)}return s}function BE(e,n){if(console.log(`Task executed with status: ${n.status}`),n.output)if(console.log(`Task executed with result: ${n.output.result}`),n.output.metering){console.log("Task resource usage:");const r=n.output.metering,s=(e,t)=>{if(0==t)return"N/A";const n=e/t;return n<1?"Short":Number(n.toFixed(0))},a={Gas:{Unit:"Steps",Limits:r.limits.gas,Peak:"N/A","Last status":r.last.steps,Capacity:s(r.limits.gas,r.last.steps)},"Nested calls":{Unit:"Calls",Limits:r.limits.call,Peak:r.peak.call,"Last status":r.last.call,Capacity:s(r.limits.call,r.peak.call)},"Frame memory":{Unit:"Bytes",Limits:r.limits.frame,Peak:r.peak.frame,"Last status":r.last.frame,Capacity:s(r.limits.frame,r.peak.frame)},"System memory":{Unit:"64 Kb pages",Limits:r.limits.memory,Peak:r.peak.memory,"Last status":"𝚫 "+r.last.memoryGrowDelta,Capacity:s(r.limits.memory,r.peak.memory)}};if(console.table(a),e.updateConfig){const e=i.join(process.cwd(),"config.json");try{const n=t.readFileSync(e),i=JSON.parse(n.toString());i.run.limits.gas=String(r.last.steps),i.run.limits.call=String(r.peak.call),i.run.limits.frame=String(r.peak.frame),i.run.limits.memory=String(r.limits.memory),t.writeFileSync(e,JSON.stringify(i)),console.log("Task limits updated with last/peak values (--update-config)")}catch(t){console.log(`Error updating config file at '${e}': '${t}', (--update-config)`)}}}else console.log("No task resource usage reported.")}async function zE(){const e=Zy(),t=null!==e,n=me.createInterface({input:process.stdin,output:process.stdout});let r=0;if(t&&e.privateKey&&e.address)r=1;else if(t){console.log(nb.SETUP_STEP1);switch((await(i="Press [Y] to proceed or [N] to skip: ",new Promise((e=>n.question(i,e))))).trim().toUpperCase()){case"Y":r=2;break;case"N":r=3;break;default:return console.log("Invalid input. Please enter Y or N."),void n.close()}}var i;switch(r){case 1:tb(),console.log(nb.SETUP_STEP1_SCENARIO1_P1);break;case 2:{tb();const e=de.Wallet.createRandom(),t=e.privateKey,n=e.address;Xy({privateKey:t,address:n}),console.log("\nSetting up your new wallet..."),console.log(nb.SETUP_STEP1_SCENARIO2(n));break}case 3:tb(),console.log(nb.SETUP_STEP1_SCENARIO3),process.exit(1);break;default:console.log("An unexpected error occurred.")}n.close()}async function qE(e,t,n,r,i,s,a){console.log("Deploying the API Authentication Credentials");try{if(!function(e){try{new pe(e)}catch{return!1}return!0}(s))throw"Invalid private key provided";if(!de.isAddress(a))throw"Invalid address provided";if(PE(r,i),!jE(e))throw"Invalid taskId";const o=await ib();await o.post("api/api-credentials",gE({taskId:e,namespace:t,taskName:n,authString:i,method:r})).catch(dE),console.log("The credentials were deployed "+C.green("Successfully"))}catch(e){throw`There was an Error deploying credentials:\nCouldn't push api credentials to remote server: ${e}`}}async function HE(e,t,n=eb("blockchainEnv"),r=eb("address")){LE(e);const i=fE(n),s=await i.authorization.getEIP712Domain(),a=await i.authorization.nonces(r),o=Math.floor(Date.now()/1e3)+3600,c=de.keccak256(de.toUtf8Bytes(e)),u={user:r,apiKeyHash:c,nonce:Number(a),deadline:o},l=await i.utils.signMeta(s,{RegisterMeta:[{name:"user",type:"address"},{name:"apiKeyHash",type:"string"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"}]},u),d=await async function(e,t,n,r,i){const s={user:e,apiKeyHash:t,deadline:n,signatureMeta:r};try{const e=await rb();return await e.post("user/relayer/auth",s,{params:{fromSetup:i}})}catch(e){throw A.isAxiosError(e)?e.response?new Error(`The server responding with an error - ${e.response.status+" - "+e.response.statusText+" - "+e.response.data.message}.`):e.request?new Error(`The server is not responding - ${e.message}.`):new Error(`There was an error in the communication with the server - ${e.message}.`):"string"==typeof e?new Error(`There was an error in the communication with the server -> ${e}`):new Error("There was an error in the communication with the server.")}}(r,c,o,l,t);return 201==d.status?c:null}const FE="0x0000000000000000000000000000000000000000";async function YE(e){let t=!0;if(""===e)t=!1,console.log("An email address is required. Please provide your email address to proceed.");else{new RegExp(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/).test(e)?await async function(e){const t=await rb();try{return!0===(await t.get(`userexistence/${e}`)).data}catch(e){if(A.isAxiosError(e)&&404===e.response?.status&&"string"==typeof e.response?.data?.message&&e.response.data.message.includes("User not found"))return!1;throw e}}(e)&&(t=!1,console.log("The provided email address is already in use. Please enter a different email address.")):(t=!1,console.log("The email address provided is not valid. Please try again."))}return t}function VE(e){return"Y"===e||"N"===e}async function KE(){const e=await async function(){const e=fE(eb("blockchainEnv"));let t="";try{await nE((async()=>{t=k();const n=de.keccak256(de.toUtf8Bytes(t));return await e.authorization.getPayerAddress(n)===FE}),{delay:500,maxTry:5,until:e=>!0===e})}catch(e){throw eE(e)?Error("Attempts to generate unique Api Key for the user exhausted."):e}return t}();try{if(!await HE(e,!0))throw Error("The API key could not been registered.")}catch(e){const t=e.message;if(t)throw Error(`There was an error registering the API key -> ${t}`)}return e}async function WE(){const e=await async function(){const e=fE(eb("blockchainEnv"));let t="";try{await nE((async()=>{t=S(4).toString("hex");return await e.taskRegistry.getNamespaceOwner(t)===FE}),{delay:500,maxTry:5,until:e=>!0===e})}catch(e){throw eE(e)?Error("Attempts to generate unique namespace for the user exhausted."):e}return t}();try{if(!await DE(e,!0))throw Error("The namespace could not been registered.")}catch(e){const t=e.message,n=t?t.match(/execution reverted: "(.*?)" /)?.[1]:null;if(n)throw Error(`There was an error registering the namespace -> ${n}`);if(t)throw Error(`There was an error registering the namespace -> ${t}`)}return e}async function GE(e,t){try{const n={message:"I am a Truebit User"};if(!t)throw Error("Secret.json does not exists");const r=t.privateKey,i=t.address,s=Zh.createSignedBody(n,r,i),a=await rb();return(await a.get(`user/${e}`,{headers:{"truebit-auth":JSON.stringify(s)}})).data}catch(e){if(A.isAxiosError(e)&&401===e.response?.status&&e.response?.data.message.includes("Entitlement Validation Error"))return null;if(A.isAxiosError(e)&&404==e.response?.status&&e.response?.data.message&&e.response?.data.message.includes("User not found"))return null;throw A.isAxiosError(e)?e.response?Error(`The server responding with an error -> ${e.response.data.message||e.response.status+" - "+e.response.statusText}`):e.request?Error(`The server is not responding -> ${e.message}`):Error(`There was an error in the communication with the server -> ${e.message}`):"string"==typeof e?Error(`There was an error in the communication with the server -> ${e}`):Error("There was an error in the communication with the server.")}}async function JE(){const e=Zy(),t=null!==e;let n,r=0;const i=be({input:process.stdin,output:process.stdout,terminal:!0});switch(t&&(!function(e){return!de.isAddress(e)||42!==e.length||!e.startsWith("0x")}(e.address)?(n=await GE(e.address,e),r=n?2:3):r=1),r){case 1:console.log("The wallet set in the configuration must be a valid ethereum address. (ENS not supported yet)");break;case 2:console.log(nb.SETUP_STEP1_SCENARIO1_P2(n));break;case 3:{console.log(nb.SETUP_STEP2_SCENARIO3_P1),console.log();const t={confirmRegistration:"",fullNameAnswer:"",emailAddressAnswer:"",companyNameAnswer:"",jobPositionAnswer:"",eulaAnswer:""};for(;"Y"!=t.confirmRegistration;){for(t.fullNameAnswer=(await i.question(C.bold(" 1. Full Name: "))).trim();""===t.fullNameAnswer;)console.log("Your full name is required. Please provide your first and last name to proceed."),t.fullNameAnswer=(await i.question(C.bold(" 1. Full Name: "))).trim();for(t.emailAddressAnswer=(await i.question(C.bold(" 2. Email Address: "))).trim();!await YE(t.emailAddressAnswer);)t.emailAddressAnswer=(await i.question(C.bold(" 2. Email Address: "))).trim();for(t.companyNameAnswer=(await i.question(C.bold(" 3. Company Name: "))).trim(),t.jobPositionAnswer=(await i.question(C.bold(" 4. Job Position: "))).trim();!VE(t.eulaAnswer);)t.eulaAnswer=(await i.question(C.bold(` 5. Accept EULA? [Y|N] (${nb.EULA_TERMS_LINK}): `))).toUpperCase();if("N"==t.eulaAnswer){console.log(nb.EULA_REGISTRATION_NO_ACCEPTED);break}for(;!VE(t.confirmRegistration);)console.log("\nIs the information provided above correct?"),t.confirmRegistration=(await i.question(C.bold("Press [Y] to confirm or [N] to edit: "))).toUpperCase();"N"==t.confirmRegistration&&(console.log("\nPlease provide the following information:"),(s=t).fullNameAnswer="",s.emailAddressAnswer="",s.companyNameAnswer="",s.jobPositionAnswer="",s.eulaAnswer="",s.confirmRegistration="")}if("N"==t.eulaAnswer)break;console.log(),console.log("By completing registration, you'll be automatically subscribed to our newsletter."),console.log("To opt-out, please follow the steps described in our documentation portal."),console.log();const n=ge({text:C.bold("... registering your account."),stream:process.stdout}).start();try{const r=await WE(),i=await KE(),s={name:t.fullNameAnswer,email:t.emailAddressAnswer,walletAddress:e?.address,company:t.companyNameAnswer,jobDescription:t.jobPositionAnswer,EULA:Zh.createSignedBody({ip:await mE(),date:(new Date).toISOString()},e.privateKey),defaultNamespace:r,defaultApiKey:i};await async function(e){try{const t=await rb();return await t.post("user/register",e)}catch(e){throw A.isAxiosError(e)?e.response?Error(`The server responding with an error -> ${e.response.data.message||e.response.status+" - "+e.response.statusText}`):e.request?Error(`The server is not responding -> ${e.message}`):Error(`There was an error in the communication with the server -> ${e.message}`):"string"==typeof e?Error(`There was an error in the communication with the server -> ${e}`):Error("There was an error in the communication with the server.")}}(s),n.stop(),console.log(nb.SETUP_STEP2_SCENARIO3_P2(t,e.address,r,i))}catch(e){n.stop();const t=e.message,r=t?t.match(/CreateUserValidation - (.*?.*)/)?.[1]:null;if(r)throw Error(r);if(t.includes("Sender doesn't have enough funds to send tx"))throw Error("We are currently experiencing technical difficulties. Please try again later.");console.error(nb.SETUP_STEP2_UNHANDLED_ERROR),process.exit(1)}finally{n.clear()}break}default:throw Error("An unexpected error occurred.")}var s;i.close()}async function ZE(){const e=Zy(),n=null!==e;let r=0;switch(r=n?n&&!e.eula?2:3:1,r){case 1:case 2:{const e=be({input:process.stdin,output:process.stdout,terminal:!0});let n="";for(console.log(nb.EULA_INSTALLATION);!VE(n);)n=(await e.question(C.bold("\nHave you read, and do you accept the Terms of Use? [Y|N]: "))).toUpperCase();if("N"==n)throw nb.EULA_INSTALLATION_NO_ACCEPTED;const s=Math.round((new Date).getTime()).toString();if(1===r){!function(e=Jy()){const n=Qy(),r=i.join(n,".truebit"),s=i.join(r,"secret.json");t.existsSync(r)||t.mkdirSync(r,{recursive:!0}),t.writeFileSync(s,JSON.stringify(e,null,2),{encoding:"utf8"})}({...Jy(),eula:s})}else 2===r&&Xy({eula:s});e.close()}}}async function XE(e=!1){const t=Zy(),n=null!==t;let r=null,i=0;switch(n?!n||t.privateKey&&t.address?(r=await GE(t.address,t),i=r?4:3):i=2:i=1,i){case 1:case 2:case 3:console.log(nb.USER_NO_REGISTERED),process.exit(1);break;case 4:e&&console.log(`You are logged in as: ${r?.name} - ${r?.email}`)}}he.config({path:process.cwd()+"/truebit.verify.env"}),X(!1);const QE=ye(import.meta.url),eS=JSON.parse(r(s.dirname(QE.resolve("@truebit/cli"))+"/../package.json","utf8"));process.on("unhandledRejection",((e,t)=>{console.error(`Unhandled Rejection at: \n${c(t,void 0,100)}, \nreason: ${e}`)})),async function(){try{await ZE()}catch(e){console.error(`${e}`),process.exit(1)}let t;await async function(e){if(!wu.satisfies(process.version,e)){const t=`Nodejs required version ${e} not satisfied with current version ${process.version}.`;console.log(t),process.exit(1)}}(eS.engines.node),eb("blockchainEnv")&&(t=eb("blockchainEnv"));const n=eb("RPC_URL");n&&(process.env.RPC_URL=n);const r=new M;r.showSuggestionAfterError(!0),r.description(e.green(O.textSync("Truebit Verify\nCLI"))+"\nA CLI to interact with Truebit Verify node\nBy accessing and using the Protocol, you hereby agree to our Terms of Use and our Privacy Policy. Patents pending.\nTerms of Use: https://www.truebit.io/terms\nPrivacy Policy: https://www.truebit.io/privacy-policy").name("truebit").version(eS.version).helpOption("-h, --help","Display help for command"),r.command("setup").description("Setup generate a secret.json in your home directory with your information").summary("Initialize user profile configuration").action((async()=>{try{await async function(){console.log(C.bold("\nWelcome to Truebit Verify!"));const e=Zy(),t=null!==e;if(!t||t&&(!e.privateKey||!e.address)){const e=be({input:process.stdin,output:process.stdout,terminal:!0});console.log(nb.SETUP_INTRODUCTION);let t="";for(;!VE(t);)t=(await e.question("Press [Y] to proceed or [N] to exit: ")).toUpperCase();e.close(),"N"==t&&(console.log(nb.SETUP_INTRODUCTION_NO_ACCEPTANCE),process.exit(1))}}(),await zE(),await JE()}catch(e){console.error(`${e}`),process.exit(1)}})),r.command("start").description("Executes a task within the context of Truebit Verify node. The task should be already uploaded to local-storage.").summary("Run a Truebit Task").argument("<taskId>","Id of the task").argument("<input>","Input for task execution").option("--update-config","Automatically update resource limits in config.json according to peak usage report").hook("preAction",(async()=>{try{await XE()}catch(e){console.error(`${e}`),process.exit(1)}})).action((async(e,t,n)=>{try{await(async(e,t,n)=>{if(console.log("Executing the function Task"),!jE(t))throw"Invalid task id";const r=await ib(),i=await r.post("api/execution/",gE({taskId:t,input:n})).catch(dE),s=i.data.executionId;if(console.log(`Execution Id: ${s}`),i.data.payload)BE(e,i.data.payload);else{const t=setInterval((async()=>{const n=await r.get(`api/execution/${s}`);n.data&&"running"!=n.data.status&&(BE(e,n.data),clearInterval(t))}),1e3)}})(n,e,t)}catch(e){console.error(`Error: ${e}`)}})),r.command("deploy").description("Deploys and registers a new Truebit task specified by the --taskId parameter. Using the deploy command makes the Truebit task available for execution.").summary("Deploy and register a new Truebit Task").argument("<namespace>","Namespace to register the task in (lowercase)").argument("<taskName>","Name of the task (lowercase)").option("--taskId <taskId>","Id of the task <Required>").option("--meta <meta>","Meta information for the task (string between single quotes)").addOption(new R("--label <label>","Label for the task").hideHelp()).option("--norelay","Do not relay the transaction").hook("preAction",(async()=>{try{await XE()}catch(e){console.error(`${e}`),process.exit(1)}})).action((async(t,n,r)=>{const i=ge({text:"Deploying and registering the function task \n",stream:process.stdout}).start();try{if(pE(t,"Namespace"),pE(n,"TaskName"),r.label&&r.label.length>128)throw new Error("Label exceeds maximum length of 128 chars");if(!r.taskId)throw new Error("Task ID is required to register a task");const s=await UE(t,n,r.taskId,r.meta,r.norelay);let a=!1;r.label&&(a=await async function(e,t,n){const r=fE(eb("blockchainEnv")),i=await r.taskRegistry.getLatestVersion(e,t);return await r.taskRegistry.setTaskLabel(e,t,i,n)}(t,n,r.label)),i.stop(),s&&(console.log(e.green(`The function task has been deployed successfully.\nThe Task ${n} version '${s}' was registered successfully in namespace ${t}.`)),r.meta&&console.log(e.green(`Metadata associated to the task: ${r.meta}.`)),a&&console.log(e.green(`Label ${r.label} set successfully for task ${n} in namespace ${t}.`)))}catch(e){i.stop(),console.error(`${e}`)}i.clear()})),r.command("build").description("Compiles source code to obtain compiled and instrumented Truebit task and pushes it to the Truebit node.").summary("Create a Function Task").option("-l, --lang [programming-language]","Specify the programming language in which the task was developed").argument("<sourceCodePath>","Path of the task source code.").hook("preAction",(async()=>{try{await XE()}catch(e){console.error(`${e}`),process.exit(1)}})).action((async(e,t)=>{try{t.lang=t.lang?t.lang:eb("defaultLanguage");if(!Object.values(ao).includes(t.lang))throw`Invalid language provided, the current options are: ${Object.values(ao)}`;console.log("Building the function task");const n=await yE(t.lang,e||"./");t.lang!=ao.JS&&t.lang!=ao.PYTHON?await async function(e){try{const t=await ib(),n=await t.post("api/instrumentation",gE({taskId:`${e}`})).catch(dE);if(!0===n.data.error?.status){if(!n.data.error.message)throw"Malformed instrumentation service error message";console.log(`Instrumentation failed: ${n.data.error?.message}`)}else{if(!n.data.payload||!n.data.payload.instrumentedTaskId)throw"Malformed instrumentation service success message";console.log("Your function task is ready."),console.log(`Use the following TaskId for execution or deployment:\n${n.data.payload.instrumentedTaskId}`)}}catch(e){throw console.error(e),e}}(n):(console.log("Your function task is ready."),console.log(`Use the following TaskId for execution or deployment:\n${n}`))}catch(e){console.error(`Error: ${e}`)}})),r.command("create-api").description("Create the Truebit API Task and upload the Manifest to the local storage. As a result, it returns the taskId").summary("Create an API Task").argument("<manifestPath>","Path of the manifest.").hook("preAction",(async()=>{try{await XE()}catch(e){console.error(`${e}`),process.exit(1)}})).action((async e=>{try{console.log("Creating API task...");const t=await yE(oo.API,e||"./");console.log("Your API task is ready!"),console.log(`Use the following TaskId for execution or deployment: \n${t}`)}catch(e){console.error(`Error: ${e}`)}})),r.command("start-api").description("Start the Truebit API Task, verify with enforcer and request the api. As a result, it returns the API response").summary("Run an API Task").argument("<manifestPath>","Path of the manifest.").argument("<input>","Input request JSON file path").argument("[authType]",`Type of authentication needed for API task usage. One of: <${Object.values(NE)}>`).argument("[authString]",'Auth string is a comma separated value that represents auth method.\n\n\tExamples:\r\n\t\tAWS_SIGNATURE = "accessKey:<accesskey>,secretKey:<secretkey>"\r\n\t\tBASIC_AUTH = "username:<username>,password:<password>"\r\n\t\tCUSTOM_HEADER = "<customheader>"').hook("preAction",(async()=>{try{await XE()}catch(e){console.error(`${e}`),process.exit(1)}})).action((async(e,t,n,r)=>{try{console.log("Executing the API Task"),n&&r?await CE(e,t,n,r):await CE(e,t,null,"")}catch(e){console.error(`${e}`)}})),r.command("status").description("Retrieves the status of a given execution id.").summary("Get execution status").argument("<executionId>","Execution Id").hook("preAction",(async()=>{try{await XE()}catch(e){console.error(`${e}`),process.exit(1)}})).action((async e=>{try{await async function(e){try{console.log("Fetching execution status...");const t=await ib(),n=await t.get(`api/execution/${e}`).catch(dE);if(n.data.message)throw n.data.message;console.log("Task execution status: ",n.data.status),n.data.output&&console.log("Task execution output: ",n.data.output)}catch(t){console.error(`Couldn't fetch execution status for executionId ${e}: ${t}`)}}(e)}catch(e){console.error(`Error: ${e}`)}})),r.command("api-auth").description("Specify authentication for a truebit api task").summary("Set API Task authentication").argument("<namespace>","Namespace to register").argument("<taskname>","Taskname to register").argument("<taskId>","Id of the task").argument("<authType>",`Type of authentication need for api task usage. One of: <${Object.values(NE)}>`).argument("<authString>",'Auth string is a comma separated value that represent auth method.\n\n\tExamples:\r\n\t\tAWS_SIGNATURE = "accessKey:<accesskey>,secretKey:<secretkey>"\r\n\t\tBASIC_AUTH = "username:<username>,password:<password>"\r\n\t\tCUSTOM_HEADER = "<customheader>"').hook("preAction",(async()=>{try{await XE()}catch(e){console.error(`${e}`),process.exit(1)}})).action((async(e,t,n,r,i)=>{try{const s=eb("privateKey"),a=eb("address");await qE(n,e,t,r,i,s,a)}catch(e){console.error(`Error: ${e}`)}}));const i=r.command("namespace").description("The namespace command helps you group and manage different tasks under a single name, like an umbrella.\nThis name, called a namespace, can be anything that represents your tasks, such as the name of your company. Each task you create will be associated with a namespace.").summary("Manage Namespace operations").hook("preAction",(async()=>{try{await XE()}catch(e){console.error(`${e}`),process.exit(1)}}));i.command("register").argument("<namespace>","Namespace to register").description("Register a new namespace. The user who calls this command will become the owner of the registered namespace. Each namespace can have only one owner. The owner can grant access to other users using the grant command.").summary("Register a new namespace").option("--norelay","Do not relay the transaction").action((async(n,r)=>{const i=ge({text:`Registering namespace: ${e.cyan(n)} \n`,stream:process.stdout}).start();try{const s=await DE(n,!1,r.norelay,t);i.stop(),s&&console.log(e.green(`Namespace ${n} registered successfully`))}catch(t){i.stop();const r=t.message,s=r.match(/execution reverted: "(.*?)" /)?.[1];s?console.error(`${e.red("ERROR:")} registering namespace -> ${e.yellow(n)}: ${s}`):console.error(`${e.red("ERROR:")} registering namespace -> ${e.yellow(n)}: ${r}`)}i.clear()})),i.command("transfer").argument("<namespace>","Namespace to transfer").argument("<address>","Address to transfer namespace to").description("Change the owner of a namespace. \nOnly the current owner can use this command to grant access.").summary("Transfer a namespace").action((async(n,r)=>{const i=ge({text:`Transferring namespace: ${e.cyan(n)} to address: ${e.cyan(r)}`,stream:process.stdout}).start();try{pE(n,"Namespace"),hE(r);const s=fE(t),a=await s.taskRegistry.transferTaskNamespace(n,r);i.stop(),a&&console.log(e.green(`Namespace ${n} transferred successfully to ${r}`))}catch(t){i.stop();const s=t.message,a=s.match(/execution reverted: "(.*?)" /)?.[1];a?console.error(`${e.red("ERROR:")} transferring namespace -> ${e.yellow(n)} to ${e.yellow(r)}: ${a}`):console.error(`${e.red("ERROR:")} transferring namespace -> ${e.yellow(n)} to ${e.yellow(r)}: ${s}`)}i.clear()})),i.command("grant").argument("<namespace>","Namespace to grant access to").argument("<address>","Address to grant access to").description("Give a user access to the namespace. \nOnly the current owner can use this command to grant access.").summary("Grant access to a namespace").action((async(n,r)=>{const i=ge({text:`Granting access to namespace: ${e.cyan(n)} for address: ${e.cyan(r)}`,stream:process.stdout}).start();try{pE(n,"Namespace"),hE(r);const s=fE(t),a=await s.taskRegistry.grantNamespaceAccess(n,r);i.stop(),a&&console.log(e.green(`Access to namespace ${n} granted successfully to ${r}`))}catch(t){i.stop();const s=t.message,a=s.match(/execution reverted: "(.*?)" /)?.[1];a?console.error(`${e.red("ERROR:")} granting access to namespace -> ${e.yellow(n)} for ${e.yellow(r)}: ${a}`):console.error(`${e.red("ERROR:")} granting access to namespace -> ${e.yellow(n)} for ${e.yellow(r)}: ${s}`)}i.clear()})),i.command("revoke").argument("<namespace>","Namespace to revoke access from").argument("<address>","Address to revoke access from").description("Take away a user's access to the namespace. \nOnly the current owner can use this command to revoke access.").summary("Revoke access to a namespace").action((async(n,r)=>{const i=ge({text:`Revoking access to namespace: ${e.cyan(n)} from address: ${e.cyan(r)}`,stream:process.stdout}).start();try{pE(n,"Namespace"),hE(r);const s=fE(t),a=await s.taskRegistry.revokeNamespaceAccess(n,r);i.stop(),a&&console.log(e.green(`Access to namespace ${n} revoked successfully from ${r}`))}catch(t){i.stop();const s=t.message,a=s.match(/execution reverted: "(.*?)" /)?.[1];a?console.error(`${e.red("ERROR:")} revoking access to namespace -> ${e.yellow(n)} from ${e.yellow(r)}: ${a}`):console.error(`${e.red("ERROR:")} revoking access to namespace -> ${e.yellow(n)} from ${e.yellow(r)}: ${s}`)}i.clear()}));const s=r.command("task").description("Manages tasks within a specified namespace, facilitating the organization, tracking, and management of tasks across different projects or domains. This command serves as a gateway to various task-related operations such as registration, modification, and querying, thereby enhancing project management and operational efficiency.").summary("Manage Task operations").hook("preAction",(async()=>{try{await XE()}catch(e){console.error(`${e}`),process.exit(1)}}));s.command("label").description("Set label for a task in a namespace").summary("Assign a label to a registered task.").argument("<namespace>","Namespace of the task").argument("<taskName>","Name of the task").option("--label <label>","Label for the task <Required>").option("--ver <version>","Version of the task <Required>").action((async(n,r,i)=>{const s=ge({text:`Setting label: ${e.cyan(i.label)} for task: ${e.cyan(r)} in namespace: ${e.cyan(n)}`,stream:process.stdout}).start();try{pE(n,"Namespace");const a=fE(t);if(!i.label)throw new Error(`${e.red("ERROR:")} Label is required to set a label for a task. Check -h for help`);if(!i.ver)throw new Error(`${e.red("ERROR:")} Version is required to set a label for a task. Check -h for help`);const o=await a.taskRegistry.setTaskLabel(n,r,i.ver,i.label);s.stop(),s.clear(),o&&console.log(e.green(`Label ${i.label} set successfully for task ${r} in namespace ${n}`))}catch(t){s.stop(),s.clear();const n=t.message;console.error(n);const r=n.match(/execution reverted: "(.*?)" /)?.[1];r?console.error(`${e.red("ERROR:")} Setting label for task -> : ${r}`):console.error(`${e.red("ERROR:")} Setting label for task -> : ${n}`)}})),s.command("disable").description("Disable task in a namespace --ver <version> or --label <label> can be used to disable specific task ").summary("Disable a registered task.").argument("<namespace>","Namespace of the task").argument("<taskName>","Name of the task").option("--ver <version>","Version of the task to disable <Required>").option("--label <label>","Label for the task to disable <Required>").action((async(n,r,i)=>{const s=ge({text:`Disabling task: ${e.cyan(r)} in namespace: ${e.cyan(n)}`,stream:process.stdout}).start();try{pE(n,"Namespace");const a=fE(t);let o;if(!i.ver&&!i.label)throw new Error(`${e.red("ERROR:")} Version or label is required to enable a task`);if(i.ver&&i.label)throw new Error(`${e.red("ERROR:")} Cannot provide both version and label`);if(i.label){const e=await a.taskRegistry.getTaskByLabel(n,r,i.label);return o=await a.taskRegistry.disableTask(n,r,e.version),s.stop(),void s.clear()}o=await a.taskRegistry.disableTask(n,r,i.ver),s.stop(),o&&console.log(e.green(`Task ${r} disabled successfully in namespace ${n}`))}catch(t){s.stop(),s.clear();const n=t.message,r=n.match(/execution reverted: "(.*?)" /)?.[1];r?console.error(`${e.red("ERROR:")} Disabling task -> : ${r}`):console.error(`${e.red("ERROR:")} Disabling task -> : ${n}`)}})),s.command("enable").description("Enable a task in a namespace --ver <version> or --label <label> can be used to enable specific task").summary("Enable a registered task.").argument("<namespace>","Namespace of the task").argument("<taskName>","Name of the task").option("--ver <version>","Version of the task to enable <Required>").option("--label <label>","Label for the task to enable <Required>").action((async(n,r,i)=>{const s=ge({text:`Enabling task: ${e.cyan(r)} in namespace: ${e.cyan(n)}`,stream:process.stdout}).start();try{pE(n,"Namespace");const a=fE(t);let o;if(!i.ver&&!i.label)throw new Error(`${e.red("ERROR:")} Version or label is required to enable a task`);if(i.ver&&i.label)throw new Error(`${e.red("ERROR:")} Cannot provide both version and label`);if(i.label){const e=await a.taskRegistry.getTaskByLabel(n,r,i.label);return o=await a.taskRegistry.enableTask(n,r,e.version),s.stop(),void s.clear()}o=await a.taskRegistry.enableTask(n,r,i.ver),s.stop(),s.clear(),o&&console.log(e.green(`Task ${r} enabled successfully in namespace ${n}`))}catch(t){s.stop();const n=t.message,r=n.match(/execution reverted: "(.*?)" /)?.[1];r?console.error(`${e.red("ERROR:")} Enabling task -> : ${r}`):console.error(`${e.red("ERROR:")} Enabling task -> : ${n}`)}})),s.command("get-task").description("Get task information from a namespace and a taskName --ver or --label can be used to get specific task").summary("Retrieve information from a namespace and a taskName").argument("<namespace>","Namespace of the task").argument("<taskName>","Name of the task").option("--ver <version>","Version of the task <Optional>").option("--label <label>","Label for the task <Optional>").action((async(n,r,i)=>{const s=ge({text:`Getting latest task: ${e.cyan(r)} in namespace: ${e.cyan(n)}`,stream:process.stdout}).start();try{pE(n,"Namespace");const a=fE(t);let o={meta:""};if(i.label&&i.ver)throw new Error(`${e.red("ERROR:")} Cannot have both version and label at the same time`);if(i.ver||i.label||(o=await a.taskRegistry.getTask(n,r)),!i.label&&i.ver&&(o=await a.taskRegistry.getTaskByVersion(n,r,i.ver)),i.label&&!i.ver&&(o=await a.taskRegistry.getTaskByLabel(n,r,i.label)),""!==o.meta){const e=JSON.parse(o.meta);o.meta=e}s.stop(),console.log(o)}catch(t){s.stop();const n=t.message,r=n.match(/execution reverted: "(.*?)" /)?.[1];r?console.error(`${e.red("ERROR:")} Getting task -> : ${r}`):console.error(`${e.red("ERROR:")} Getting task -> : ${n}`)}s.clear()}));const a=r.command("auth").description("The auth command is responsible for managing the authorization for task execution. It allows the namespace owner to grant or deny access to addresses, ensuring that only authorized individuals can execute specific tasks.").summary("Manage authorization operations").hook("preAction",(async()=>{try{await XE()}catch(e){console.error(`${e}`),process.exit(1)}}));a.command("grant").description("The auth grant command is responsible for granting access to a specific address within a namespace. The grantee will have the ability to execute the tasks stored within that namespace.").summary("Grant authorization to a grantee").argument("<namespace>","Namespace of the task").argument("<grantee>","Grantee to be authorized").action((async(n,r)=>{const i=ge({text:`Granting authorization to ${e.cyan(r)} in namespace ${e.cyan(n)}`,stream:process.stdout}).start();try{pE(n,"Namespace"),hE(r);const s=fE(t),a=await s.authorization.grantAuthorization(n,r);i.stop(),a&&console.log(e.green(`Authorization granted to ${r} in namespace ${n}`))}catch(t){i.stop(),i.clear();const n=t.message,r=n.match(/execution reverted: "(.*?)" /)?.[1];r?console.error(`${e.red("ERROR:")} Granting authorization -> : ${r}`):console.error(`${e.red("ERROR:")} Granting authorization -> : ${n}`)}})),a.command("revoke").description("The auth revoke command is responsible for revoking access from a specific address within a namespace. This command ensures that the specified address can no longer execute the tasks stored within that namespace.").summary("Revoke authorization from a grantee").argument("<namespace>","Namespace of the task").argument("<grantee>","Grantee to be unauthorized").action((async(n,r)=>{const i=ge({text:`Revoking authorization from ${e.cyan(r)} in namespace ${e.cyan(n)}`,stream:process.stdout}).start();try{pE(n,"Namespace");const s=fE(t),a=await s.authorization.revokeAuthorization(n,r);i.stop(),a&&console.log(e.green(`Authorization revoked from ${r} in namespace ${n}`))}catch(t){i.stop(),i.clear();const n=t.message,r=n.match(/execution reverted: "(.*?)" /)?.[1];r?console.error(`${e.red("ERROR:")} Revoking authorization -> : ${r}`):console.error(`${e.red("ERROR:")} Revoking authorization -> : ${n}`)}i.clear()})),a.command("register").description("The auth register command is responsible for registering a specific API_KEY. Every execution made with this API_KEY will be charged to the user who registered it. This way, you can ensure that the user who registered the API_KEY is responsible for paying for all executions made with it.").summary("Register authorization with an API key hash").argument("<apiKey>","API key for authorization").option("--norelay","Do not relay the transaction").action((async(t,n)=>{const r=ge({text:`Registering authorization with API key hash ${e.cyan(t)}`,stream:process.stdout}).start();try{let i;if(i=n.norelay?await async function(e,t=eb("blockchainEnv")){LE(e);const n=fE(t),r=de.keccak256(de.toUtf8Bytes(e));return await n.authorization.registerAuthorization(r),r}(t):await HE(t,!1),r.stop(),!i)throw Error("The API key could not been registered.");console.log(e.green(`Authorization registered with API key ${t} with hash -> ${i}`))}catch(t){r.stop(),r.clear();const n=t.message,i=n.match(/execution reverted: "(.*?)" /)?.[1];i?console.error(`${e.red("ERROR:")} Registering authorization -> : ${i}`):console.error(`${e.red("ERROR:")} Registering authorization -> : ${n}`)}r.clear()})),a.command("deregister").description('The auth deregister command will revoke access to a specific API_KEY. After deregistration, any execution attempt using this API_KEY will result in a "not authorized" message.').summary("Deregister authorization with an API key hash").argument("<apiKey>","API key hash for deregistration").action((async n=>{const r=ge({text:`Deregistering authorization with API key ${e.cyan(n)}`,stream:process.stdout}).start();try{LE(n);const i=de.keccak256(de.toUtf8Bytes(n)),s=fE(t),a=await s.authorization.deRegisterAuthorization(i);r.stop(),a&&console.log(e.green(`Authorization deregistered with API key hash ${n} with hash -> ${i}`))}catch(t){r.stop(),r.clear();const n=t.message,i=n.match(/execution reverted: "(.*?)" /)?.[1];i?console.error(`${e.red("ERROR:")} Deregistering authorization -> : ${i}`):console.error(`${e.red("ERROR:")} Deregistering authorization -> : ${n}`)}r.clear()})),a.command("check-authorization").description("The auth check-authorization command verifies if a specific address has permission to execute tasks in a particular namespace.").summary("Check if a grantee is authorized").argument("<namespace>","Namespace of the task").argument("<grantee>","Grantee to check authorization for").action((async(n,r)=>{const i=ge({text:`Checking authorization for ${e.cyan(r)} in namespace ${e.cyan(n)}`,stream:process.stdout}).start();try{pE(n,"Namespace");const s=fE(t),a=await s.authorization.isAuthorized(n,r);i.stop(),console.log(e.green(`Grantee ${r} is ${a?"authorized":"not authorized"} in namespace ${n}`))}catch(t){i.stop(),i.clear();const n=t.message,r=n.match(/execution reverted: "(.*?)" /)?.[1];r?console.error(`${e.red("ERROR:")} Checking authorization -> : ${r}`):console.error(`${e.red("ERROR:")} Checking authorization -> : ${n}`)}i.clear()})),a.command("get-payer").description("The auth get-payer command retrieves the payer address associated with a specific API_KEY.").summary("Get payer address from an API key hash").argument("<apiKey>","API key for payer address").action((async n=>{const r=ge({text:`Getting payer address for API key hash ${e.cyan(n)}`,stream:process.stdout}).start();try{const i=fE(t),s=de.keccak256(de.toUtf8Bytes(n)),a=await i.authorization.getPayerAddress(s);r.stop(),console.log(e.green(`Payer address for API key ${n} is ${a}`))}catch(t){r.stop(),r.clear();const n=t.message,i=n.match(/execution reverted: "(.*?)" /)?.[1];i?console.error(`${e.red("ERROR:")} Getting payer address -> : ${i}`):console.error(`${e.red("ERROR:")} Getting payer address -> : ${n}`)}r.clear()})),a.command("new-apikey").description("Generate a new Api Key to be used for execution payment. The Api Key is a unique identifier for the payer.").summary("Generate a new Api Key").action((()=>{const e=k();console.log(`Api Key: ${e}`)})),await r.parseAsync(process.argv)}().catch((e=>{console.error(e)}));
12
12
  //# sourceMappingURL=index.mjs.map