evm-contracts-tools 0.0.49 → 0.0.51
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/dist/evm-contract-call/evm-contract-call.js +1 -1
- package/dist/evm-contract-call/fs-worker.js +1 -1
- package/dist/evm-contract-deployment-abi/evm-contract-deployment-abi.js +1 -1
- package/dist/evm-contract-deployment-abi/fs-worker.js +1 -1
- package/dist/evm-contract-deployment-address/evm-contract-deployment-address.js +1 -1
- package/dist/evm-contract-deployment-address/fs-worker.js +1 -1
- package/dist/evm-contract-deployment-bytecode/evm-contract-deployment-bytecode.js +1 -1
- package/dist/evm-contract-deployment-bytecode/fs-worker.js +1 -1
- package/dist/evm-contract-deployment-compiler-output/evm-contract-deployment-compiler-output.js +1 -1
- package/dist/evm-contract-deployment-compiler-output/fs-worker.js +1 -1
- package/dist/evm-contract-deployment-deployment-networks +1 -1
- package/dist/evm-contract-deployment-networks/evm-contract-deployment-networks.js +1 -1
- package/dist/evm-contract-deployment-versions/evm-contract-deployment-versions.js +1 -1
- package/dist/evm-contract-deployment-versions/fs-worker.js +1 -1
- package/dist/evm-contract-deployments-dir/evm-contract-deployments-dir.js +1 -1
- package/dist/evm-contract-deployments-dir/fs-worker.js +1 -1
- package/dist/evm-contracts-tools/evm-contracts-tools.js +1 -1
- package/dist/evm-contracts-tools/fs-worker.js +1 -1
- package/dist/libevm-contract-call/fs-worker.js +1 -1
- package/dist/libevm-contract-call/libevm-contract-call.js +1 -1
- package/dist/libevm-contract-deployment-abi/fs-worker.js +1 -1
- package/dist/libevm-contract-deployment-abi/libevm-contract-deployment-abi.js +1 -1
- package/dist/libevm-contract-deployment-address/fs-worker.js +1 -1
- package/dist/libevm-contract-deployment-address/libevm-contract-deployment-address.js +1 -1
- package/dist/libevm-contract-deployment-bytecode/fs-worker.js +1 -1
- package/dist/libevm-contract-deployment-bytecode/libevm-contract-deployment-bytecode.js +1 -1
- package/dist/libevm-contract-deployment-compiler-output/fs-worker.js +1 -1
- package/dist/libevm-contract-deployment-compiler-output/libevm-contract-deployment-compiler-output.js +2 -0
- package/dist/libevm-contract-deployment-deployment-networks +1 -1
- package/dist/libevm-contract-deployment-networks/libevm-contract-deployment-networks.js +1 -1
- package/dist/libevm-contract-deployment-versions/fs-worker.js +1 -1
- package/dist/libevm-contract-deployment-versions/libevm-contract-deployment-versions.js +1 -1
- package/dist/libevm-contract-deployments-dir/fs-worker.js +1 -1
- package/dist/libevm-contract-deployments-dir/libevm-contract-deployments-dir.js +1 -1
- package/dist/libevm-contracts-tools +1 -1
- package/eslint.config.mjs +150 -0
- package/evm-contract-call +18 -11
- package/evm-contract-call.webpack.config.cjs +159 -0
- package/evm-contract-deployment-abi.webpack.config.cjs +159 -0
- package/evm-contract-deployment-address.webpack.config.cjs +159 -0
- package/evm-contract-deployment-bytecode.webpack.config.cjs +159 -0
- package/evm-contract-deployment-compiler-output.webpack.config.cjs +159 -0
- package/evm-contract-deployment-networks.webpack.config.cjs +159 -0
- package/evm-contract-deployment-versions.webpack.config.cjs +159 -0
- package/evm-contract-deployments-dir.webpack.config.cjs +159 -0
- package/fs-worker.webpack.config.cjs +82 -0
- package/lib/address-check +16 -11
- package/lib/bytecode-creation-get +24 -14
- package/lib/bytecode-runtime-get +20 -15
- package/lib/contract-get +35 -17
- package/lib/deployer-get +47 -10
- package/lib/deployer-verify +19 -16
- package/lib/evm-contract-call-dynamic +40 -23
- package/lib/evm-contract-call-static +222 -153
- package/libevm-contract-call +10 -5
- package/libevm-contract-call.webpack.config.cjs +159 -0
- package/libevm-contract-deployment-abi.webpack.config.cjs +155 -0
- package/libevm-contract-deployment-address.webpack.config.cjs +155 -0
- package/libevm-contract-deployment-bytecode.webpack.config.cjs +155 -0
- package/libevm-contract-deployment-compiler-output.webpack.config.cjs +155 -0
- package/libevm-contract-deployment-networks.webpack.config.cjs +159 -0
- package/libevm-contract-deployment-versions.webpack.config.cjs +159 -0
- package/libevm-contract-deployments-dir.webpack.config.cjs +159 -0
- package/package.json +47 -46
- package/webpack.config.cjs +155 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see libevm-contract-deployment-compiler-output.js.LICENSE.txt */
|
|
2
|
+
(()=>{var e={9486(e,t,n){const r=n(8368),o=r._basename,i=r._chmod,a=r._cp,s=r._dir_exists,u=r._file_exists,l=(r._file_read,r._from_bash_ass_array,r._homedir_get,r._json_read,r._mkdir,r._msg_info),c=r._msg_error,f=r._override_set,d=r._path_join,p=r._pwd,h=n(5515)._evm_chains_info,_=n(1419)._evm_contract_deployments_dir,g=n(2822)._evm_contract_deployment_networks,y=n(4724)._evm_contract_deployment_versions;async function m(e,t){const n=[e,"y"],r=await _.apply(null,n);i(t,"0700");const o=await _ls(r);for(_file of o)a(_file,t);return!0}function w(e){let t;if(e.endsWith(".sh"))t="bash";else{if(!e.endsWith(".json")){const e="Impossible determining configuration format from file extension, defaulting to 'json'.";throw l(e,0),e}t="json"}return t}e.exports={_configuration_format_auto_detect:function(){const e=w(config_file);f("configuration","format",e)},_configuration_format_get:w,_contract_version_auto_detect:async function(){let e,t,n,r,o,i,a,s,p,h;s=[];const _=target_contract;if(r=!1,"bash"==configuration_format?t="sh":"bash"==configuration_format&&(t="json"),""!=_&&void 0!==_){const f=typeof deployments_dir;if("undefined"!=f&&""!=deployments_dir){n=deployments_dir,0<target_networks.length&&(i=target_networks[0]),0<network_ids.length&&(a=_network_ids[0]);const f=d([n,_]);if("n"==networks_all)s.push(i,a);else if("y"==networks_all){const e=[f,"y","n","n"];_networks_new=await g.apply(null,e),s=s.concat(_networks_new)}for(o of s)if(e=d([f,o,`config.${t}`]),u(e)){r=!0,h=`Found deployment configuration at location '${e}'.`,l(h);break}r||(h=`No deployment configuration file found for network '${i}' with ID '${a}'.`,c(h,1));const m=[e,"y","n",configuration_format];p=await y.apply(null,m)}else"undefined"!=f&&""!=deployments_dir||c("If no target application is specified then the user-defined deployments switch must be enabled with '-u' and a deployments directory must be specified with '-d'.",1)}return f("contract","version",p),!0},_deployments_dir_auto_detect:async function(){let e;e="";const t=target_app;if(void 0!==t&&""!=t){const n=[t,user_defined];e=await _.apply(null,n)}f("deployments","dir",e)},_network_check:async function(e,t,n,r){let o,i,a;o=!1,_deployments_path=d([e,t]);const s=[_deployments_path,"y","n","n"],u=await g.apply(null,s);""!=r?u.includes(r)||(i=`The contract does not result deployed on network with id '${r}'.`,o=!0):""!=n?u.includes(n)||(i=`The contract does not result deployed on network '${n}'.`,o=!0):(i="Provide one between a target network name or ID.",o=!0),o&&c(i,1),""==r?(_evm_chains_info_args=["get","name","id","offline",["system","node"],"kirsh","n","n",n,[]],a=await h.apply(null,_evm_chains_info_args)):""==n&&(_evm_chains_info_args=["get","id","name","offline",["system","node"],"kirsh","n","n",r,[]],n=await h(_evm_chains_info_args)),""!=r&&r!=a&&(i=`Requested target network ID '${r}' does not correspond to '${n}' known ID '${a}'.`,c(i,1))},_networks_all_auto_detect:function(){let e;e="n",target_networks.length<1&&network_ids.length<1&&(e="y"),f("networks","all",e)},_target_app_auto_detect:async function(){let e;e="";const t=o(p()),n=[t,user_defined],r=await _.apply(null,n);s(r)?e=t:(_msg=`Directory '${r}' not found.`,l(_msg)),f("target","app",e)},_user_deployments_check:async function(e,t){if(!u(t)){const n=[e,t];await m.apply(null,n)}}}},8306(e,t,n){const r=n(8368),o=(r._basename,r._chmod,r._cp,r._dir_exists,r._file_exists,r._file_read,r._from_bash_ass_array,r._homedir_get,r._json_read,r._lib_get,r._mkdir,r._msg_info,r._msg_error,r._override_set,r._path_join,r._pwd,n(5515)._evm_chains_info,n(1419)._evm_contract_deployments_dir,n(9486));o._contract_version_auto_detect,o._deployments_dir_auto_detect,o._network_check,o._networks_all_auto_detect,o._target_app_auto_detect,o._user_deployments_check,n(2822)._evm_contract_deployment_networks,n(4724)._evm_contract_deployment_versions,e.exports={}},2822(e,t,n){const r=n(8368),o=r._dir_exists,i=(r._file_exists,r._homedir_get,r._json_read,r._lib_get,r._ls),a=r._msg_error,s=(r._msg_info,r._msg_warning),u=(r._path_join,r._stat);n(9486)._network_check,n(1419)._evm_contract_deployments_dir,n(5515)._evm_chains_info,e.exports={_evm_contract_deployment_networks:async function(e,t,n,r){return"object"==typeof e&&a("Deployment directory argument must be of type 'string'.",1),await async function(e){let t,n,r;const a=[],l=await i(e);for(t of l)r=`${e}/${t}`,n=o(r),n?a.push(t):(s(`There shouldn't be the file '${t}' into this directory.`),u(r));return a}(e)}}},4724(e,t,n){const r=n(8368),o=r._file_read,i=r._from_bash_ass_array,a=r._json_read,s=(r._msg_info,r._msg_error),u=n(9486);u._configuration_format_auto_detect,u._configuration_format_get,e.exports={_evm_contract_deployment_versions:function(e,t,n,r){let u,l,c;if(void 0!==r&&""!=r||(r="json"),"json"==r)u=a(e),l="contract-address";else{if("bash"!=r){const e=`Unknown configuration format '${r}'.`;throw s(e,0),e}u=i(o(e)),l="contract_address"}const f=u[l];return c=Object.keys(f),"y"==t&&(c=c.reverse()[0]),"y"==n&&(c=c.sort()[0]),c}}},1419(e,t,n){const r=n(8368),o=r._homedir_get,i=r._lib_get,a=(r._msg_info,r._msg_error);function s(e){let t,n;const r=typeof e;"undefined"!=r&&""!=e||(n="No application specified.",t=!0),"string"!=r&&(n="Application argument must be of type string.",t=!0),t&&a(n,1)}e.exports={_evm_contract_deployments_dir:async function(e,t){let n;if(s(e),"n"==t)n="system";else{if("y"!=t){const e="User level argument must be can be 'y' or 'n'.";throw a(e,0),e}n="user"}return await async function(e,t){let n;return s(e),void 0!==t&&""!=t||(t="system"),"system"==t?n=await i():"user"==t&&(n=`${o()}/.config`),`${n}/${e}/deployments`}(e,n)}}},7526(e,t){"use strict";t.toByteArray=function(e){var t,n,i=function(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}(e),a=i[0],s=i[1],u=new o(function(e,t,n){return 3*(t+n)/4-n}(0,a,s)),l=0,c=s>0?a-4:a;for(n=0;n<c;n+=4)t=r[e.charCodeAt(n)]<<18|r[e.charCodeAt(n+1)]<<12|r[e.charCodeAt(n+2)]<<6|r[e.charCodeAt(n+3)],u[l++]=t>>16&255,u[l++]=t>>8&255,u[l++]=255&t;return 2===s&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,u[l++]=255&t),1===s&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t),u},t.fromByteArray=function(e){for(var t,r=e.length,o=r%3,i=[],a=16383,s=0,l=r-o;s<l;s+=a)i.push(u(e,s,s+a>l?l:s+a));return 1===o?(t=e[r-1],i.push(n[t>>2]+n[t<<4&63]+"==")):2===o&&(t=(e[r-2]<<8)+e[r-1],i.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"=")),i.join("")};for(var n=[],r=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)n[a]=i[a],r[i.charCodeAt(a)]=a;function s(e){return n[e>>18&63]+n[e>>12&63]+n[e>>6&63]+n[63&e]}function u(e,t,n){for(var r,o=[],i=t;i<n;i+=3)r=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(255&e[i+2]),o.push(s(r));return o.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},8287(e,t,n){"use strict";const r=n(7526),o=n(251),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=u,t.SlowBuffer=function(e){return+e!=e&&(e=0),u.alloc(+e)},t.INSPECT_MAX_BYTES=50;const a=2147483647;function s(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,u.prototype),t}function u(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return f(e)}return l(e,t,n)}function l(e,t,n){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!u.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|_(e,t);let r=s(n);const o=r.write(e,t);return o!==n&&(r=r.slice(0,o)),r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(V(e,Uint8Array)){const t=new Uint8Array(e);return p(t.buffer,t.byteOffset,t.byteLength)}return d(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(V(e,ArrayBuffer)||e&&V(e.buffer,ArrayBuffer))return p(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(V(e,SharedArrayBuffer)||e&&V(e.buffer,SharedArrayBuffer)))return p(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return u.from(r,t,n);const o=function(e){if(u.isBuffer(e)){const t=0|h(e.length),n=s(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||K(e.length)?s(0):d(e):"Buffer"===e.type&&Array.isArray(e.data)?d(e.data):void 0}(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return u.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function c(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function f(e){return c(e),s(e<0?0:0|h(e))}function d(e){const t=e.length<0?0:0|h(e.length),n=s(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function p(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');let r;return r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n),Object.setPrototypeOf(r,u.prototype),r}function h(e){if(e>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function _(e,t){if(u.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||V(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return G(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return J(e).length;default:if(o)return r?-1:G(e).length;t=(""+t).toLowerCase(),o=!0}}function g(e,t,n){let r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return $(this,t,n);case"utf8":case"utf-8":return T(this,t,n);case"ascii":return x(this,t,n);case"latin1":case"binary":return O(this,t,n);case"base64":return A(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function y(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function m(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),K(n=+n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=u.from(t,r)),u.isBuffer(t))return 0===t.length?-1:w(e,t,n,r,o);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):w(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function w(e,t,n,r,o){let i,a=1,s=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,n/=2}function l(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){let r=-1;for(i=n;i<s;i++)if(l(e,i)===l(t,-1===r?0:i-r)){if(-1===r&&(r=i),i-r+1===u)return r*a}else-1!==r&&(i-=i-r),r=-1}else for(n+u>s&&(n=s-u),i=n;i>=0;i--){let n=!0;for(let r=0;r<u;r++)if(l(e,i+r)!==l(t,r)){n=!1;break}if(n)return i}return-1}function v(e,t,n,r){n=Number(n)||0;const o=e.length-n;r?(r=Number(r))>o&&(r=o):r=o;const i=t.length;let a;for(r>i/2&&(r=i/2),a=0;a<r;++a){const r=parseInt(t.substr(2*a,2),16);if(K(r))return a;e[n+a]=r}return a}function b(e,t,n,r){return Y(G(t,e.length-n),e,n,r)}function k(e,t,n,r){return Y(function(e){const t=[];for(let n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function E(e,t,n,r){return Y(J(t),e,n,r)}function S(e,t,n,r){return Y(function(e,t){let n,r,o;const i=[];for(let a=0;a<e.length&&!((t-=2)<0);++a)n=e.charCodeAt(a),r=n>>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function A(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function T(e,t,n){n=Math.min(e.length,n);const r=[];let o=t;for(;o<n;){const t=e[o];let i=null,a=t>239?4:t>223?3:t>191?2:1;if(o+a<=n){let n,r,s,u;switch(a){case 1:t<128&&(i=t);break;case 2:n=e[o+1],128==(192&n)&&(u=(31&t)<<6|63&n,u>127&&(i=u));break;case 3:n=e[o+1],r=e[o+2],128==(192&n)&&128==(192&r)&&(u=(15&t)<<12|(63&n)<<6|63&r,u>2047&&(u<55296||u>57343)&&(i=u));break;case 4:n=e[o+1],r=e[o+2],s=e[o+3],128==(192&n)&&128==(192&r)&&128==(192&s)&&(u=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&s,u>65535&&u<1114112&&(i=u))}}null===i?(i=65533,a=1):i>65535&&(i-=65536,r.push(i>>>10&1023|55296),i=56320|1023&i),r.push(i),o+=a}return function(e){const t=e.length;if(t<=R)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=R));return n}(r)}t.kMaxLength=a,u.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),u.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(e,t,n){return l(e,t,n)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(e,t,n){return function(e,t,n){return c(e),e<=0?s(e):void 0!==t?"string"==typeof n?s(e).fill(t,n):s(e).fill(t):s(e)}(e,t,n)},u.allocUnsafe=function(e){return f(e)},u.allocUnsafeSlow=function(e){return f(e)},u.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==u.prototype},u.compare=function(e,t){if(V(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),V(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let n=e.length,r=t.length;for(let o=0,i=Math.min(n,r);o<i;++o)if(e[o]!==t[o]){n=e[o],r=t[o];break}return n<r?-1:r<n?1:0},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);let n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;const r=u.allocUnsafe(t);let o=0;for(n=0;n<e.length;++n){let t=e[n];if(V(t,Uint8Array))o+t.length>r.length?(u.isBuffer(t)||(t=u.from(t)),t.copy(r,o)):Uint8Array.prototype.set.call(r,t,o);else{if(!u.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(r,o)}o+=t.length}return r},u.byteLength=_,u.prototype._isBuffer=!0,u.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)y(this,t,t+1);return this},u.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)y(this,t,t+3),y(this,t+1,t+2);return this},u.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)y(this,t,t+7),y(this,t+1,t+6),y(this,t+2,t+5),y(this,t+3,t+4);return this},u.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?T(this,0,e):g.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){let e="";const n=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(e+=" ... "),"<Buffer "+e+">"},i&&(u.prototype[i]=u.prototype.inspect),u.prototype.compare=function(e,t,n,r,o){if(V(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(this===e)return 0;let i=(o>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0);const s=Math.min(i,a),l=this.slice(r,o),c=e.slice(t,n);for(let e=0;e<s;++e)if(l[e]!==c[e]){i=l[e],a=c[e];break}return i<a?-1:a<i?1:0},u.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},u.prototype.indexOf=function(e,t,n){return m(this,e,t,n,!0)},u.prototype.lastIndexOf=function(e,t,n){return m(this,e,t,n,!1)},u.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let i=!1;for(;;)switch(r){case"hex":return v(this,e,t,n);case"utf8":case"utf-8":return b(this,e,t,n);case"ascii":case"latin1":case"binary":return k(this,e,t,n);case"base64":return E(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const R=4096;function x(e,t,n){let r="";n=Math.min(e.length,n);for(let o=t;o<n;++o)r+=String.fromCharCode(127&e[o]);return r}function O(e,t,n){let r="";n=Math.min(e.length,n);for(let o=t;o<n;++o)r+=String.fromCharCode(e[o]);return r}function $(e,t,n){const r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);let o="";for(let r=t;r<n;++r)o+=X[e[r]];return o}function C(e,t,n){const r=e.slice(t,n);let o="";for(let e=0;e<r.length-1;e+=2)o+=String.fromCharCode(r[e]+256*r[e+1]);return o}function j(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function L(e,t,n,r,o,i){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function N(e,t,n,r,o){q(t,r,o,e,n,7);let i=Number(t&BigInt(4294967295));e[n++]=i,i>>=8,e[n++]=i,i>>=8,e[n++]=i,i>>=8,e[n++]=i;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,n}function P(e,t,n,r,o){q(t,r,o,e,n,7);let i=Number(t&BigInt(4294967295));e[n+7]=i,i>>=8,e[n+6]=i,i>>=8,e[n+5]=i,i>>=8,e[n+4]=i;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=a,a>>=8,e[n+2]=a,a>>=8,e[n+1]=a,a>>=8,e[n]=a,n+8}function U(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function D(e,t,n,r,i){return t=+t,n>>>=0,i||U(e,0,n,4),o.write(e,t,n,r,23,4),n+4}function M(e,t,n,r,i){return t=+t,n>>>=0,i||U(e,0,n,8),o.write(e,t,n,r,52,8),n+8}u.prototype.slice=function(e,t){const n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);const r=this.subarray(e,t);return Object.setPrototypeOf(r,u.prototype),r},u.prototype.readUintLE=u.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||j(e,t,this.length);let r=this[e],o=1,i=0;for(;++i<t&&(o*=256);)r+=this[e+i]*o;return r},u.prototype.readUintBE=u.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||j(e,t,this.length);let r=this[e+--t],o=1;for(;t>0&&(o*=256);)r+=this[e+--t]*o;return r},u.prototype.readUint8=u.prototype.readUInt8=function(e,t){return e>>>=0,t||j(e,1,this.length),this[e]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(e,t){return e>>>=0,t||j(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(e,t){return e>>>=0,t||j(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(e,t){return e>>>=0,t||j(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(e,t){return e>>>=0,t||j(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readBigUInt64LE=Z(function(e){W(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||z(e,this.length-8);const r=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,o=this[++e]+256*this[++e]+65536*this[++e]+n*2**24;return BigInt(r)+(BigInt(o)<<BigInt(32))}),u.prototype.readBigUInt64BE=Z(function(e){W(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||z(e,this.length-8);const r=t*2**24+65536*this[++e]+256*this[++e]+this[++e],o=this[++e]*2**24+65536*this[++e]+256*this[++e]+n;return(BigInt(r)<<BigInt(32))+BigInt(o)}),u.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||j(e,t,this.length);let r=this[e],o=1,i=0;for(;++i<t&&(o*=256);)r+=this[e+i]*o;return o*=128,r>=o&&(r-=Math.pow(2,8*t)),r},u.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||j(e,t,this.length);let r=t,o=1,i=this[e+--r];for(;r>0&&(o*=256);)i+=this[e+--r]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i},u.prototype.readInt8=function(e,t){return e>>>=0,t||j(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){e>>>=0,t||j(e,2,this.length);const n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(e,t){e>>>=0,t||j(e,2,this.length);const n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(e,t){return e>>>=0,t||j(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return e>>>=0,t||j(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readBigInt64LE=Z(function(e){W(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||z(e,this.length-8);const r=this[e+4]+256*this[e+5]+65536*this[e+6]+(n<<24);return(BigInt(r)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)}),u.prototype.readBigInt64BE=Z(function(e){W(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||z(e,this.length-8);const r=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(r)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+n)}),u.prototype.readFloatLE=function(e,t){return e>>>=0,t||j(e,4,this.length),o.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e>>>=0,t||j(e,4,this.length),o.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e>>>=0,t||j(e,8,this.length),o.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e>>>=0,t||j(e,8,this.length),o.read(this,e,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||L(this,e,t,n,Math.pow(2,8*n)-1,0);let o=1,i=0;for(this[t]=255&e;++i<n&&(o*=256);)this[t+i]=e/o&255;return t+n},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||L(this,e,t,n,Math.pow(2,8*n)-1,0);let o=n-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+n},u.prototype.writeUint8=u.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,1,255,0),this[t]=255&e,t+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigUInt64LE=Z(function(e,t=0){return N(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeBigUInt64BE=Z(function(e,t=0){return P(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);L(this,e,t,n,r-1,-r)}let o=0,i=1,a=0;for(this[t]=255&e;++o<n&&(i*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/i|0)-a&255;return t+n},u.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);L(this,e,t,n,r-1,-r)}let o=n-1,i=1,a=0;for(this[t+o]=255&e;--o>=0&&(i*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/i|0)-a&255;return t+n},u.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},u.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigInt64LE=Z(function(e,t=0){return N(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeBigInt64BE=Z(function(e,t=0){return P(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeFloatLE=function(e,t,n){return D(this,e,t,!0,n)},u.prototype.writeFloatBE=function(e,t,n){return D(this,e,t,!1,n)},u.prototype.writeDoubleLE=function(e,t,n){return M(this,e,t,!0,n)},u.prototype.writeDoubleBE=function(e,t,n){return M(this,e,t,!1,n)},u.prototype.copy=function(e,t,n,r){if(!u.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);const o=r-n;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,n,r):Uint8Array.prototype.set.call(e,this.subarray(n,r),t),o},u.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!u.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===e.length){const t=e.charCodeAt(0);("utf8"===r&&t<128||"latin1"===r)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;let o;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{const i=u.isBuffer(e)?e:u.from(e,r),a=i.length;if(0===a)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<n-t;++o)this[o+t]=i[o%a]}return this};const F={};function I(e,t,n){F[e]=class extends n{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function B(e){let t="",n=e.length;const r="-"===e[0]?1:0;for(;n>=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function q(e,t,n,r,o,i){if(e>n||e<t){const r="bigint"==typeof t?"n":"";let o;throw o=i>3?0===t||t===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(i+1)}${r}`:`>= -(2${r} ** ${8*(i+1)-1}${r}) and < 2 ** ${8*(i+1)-1}${r}`:`>= ${t}${r} and <= ${n}${r}`,new F.ERR_OUT_OF_RANGE("value",o,e)}!function(e,t,n){W(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||z(t,e.length-(n+1))}(r,o,i)}function W(e,t){if("number"!=typeof e)throw new F.ERR_INVALID_ARG_TYPE(t,"number",e)}function z(e,t,n){if(Math.floor(e)!==e)throw W(e,n),new F.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new F.ERR_BUFFER_OUT_OF_BOUNDS;throw new F.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${t}`,e)}I("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),I("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError),I("ERR_OUT_OF_RANGE",function(e,t,n){let r=`The value of "${e}" is out of range.`,o=n;return Number.isInteger(n)&&Math.abs(n)>2**32?o=B(String(n)):"bigint"==typeof n&&(o=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(o=B(o)),o+="n"),r+=` It must be ${t}. Received ${o}`,r},RangeError);const H=/[^+/0-9A-Za-z-_]/g;function G(e,t){let n;t=t||1/0;const r=e.length;let o=null;const i=[];for(let a=0;a<r;++a){if(n=e.charCodeAt(a),n>55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function J(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(H,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Y(e,t,n,r){let o;for(o=0;o<r&&!(o+n>=t.length||o>=e.length);++o)t[o+n]=e[o];return o}function V(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function K(e){return e!=e}const X=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let o=0;o<16;++o)t[r+o]=e[n]+e[o]}return t}();function Z(e){return"undefined"==typeof BigInt?Q:e}function Q(){throw new Error("BigInt not supported")}},8368(e,t,n){const r=n(6070),o=r._argv_get,i=(r._argv_url_get,r._child_process_spawn_get),a=r._global_get,s=i(),u=i("async"),l=(r._yargv_get,n(6314)),c=l._basename,f=l._dirname,d=(l._file_append,l._exit),p=l._file_exists,h=l._path_join,_=l._stat;function g(e,t){let n;return void 0===t||""==t?n=`${e}: {_msg}`:"string"!=typeof t&&""==t||(n=`[${t}] ${e}: {_msg}`),n}function y(e){let t;"n"==quiet&&(_template=g("WARNING",app_name),t=_template.replaceAll("{_msg}",e),console.warn(t))}function m(e){let t;"undefined"!=typeof quiet&&""!=quiet||(quiet="y"),"n"==quiet&&(t=g("INFO",app_name).replaceAll("{_msg}",e),console.log(t))}function w(e,t){let n,r,o;n=app_name,t=String(t),r=g("ERROR",n),o=r.replaceAll("{_msg}",e),"1"===t?(console.error(o),d(1)):"0"===t&&console.warn(o)}async function v(){let e;return new Set,"undefined"==typeof window&&void 0!==n.g&&n.g.global===n.g&&"function"!=typeof n||(e="/usr/lib"),e}function b(e){return new Promise(t=>setTimeout(t,e))}function k(e,t){return E(e,t),a()[`${e}_${t}`]}function E(e,t,n){void 0!==e&&""!=e||void 0!==t&&""!=t||w("Either one of the 'object' or the 'variable' arguments must be non-empty",1),void 0===n&&(n="")}function S(e,t,n){E(e,t),a()[`${e}_${t}`]=n}e.exports={_argv_get:o,_basename:l._basename,_cat:l._cat,_chmod:l._chmod,...void l._chown,_cmdline_check:function(e){let t,n,r;return"undefined"==typeof window&&(t=o(),n=t[1],void 0===n&&(n=t.$0),r=c(n),r==e)},...void l.cd,...void l.cd,_cp:l._cp,...void l._cwd,_dirname:f,_echo:function(e){console.log(e)},_exit:l._exit,...void l._ext_rm,_dir_exists:l._dir_exists,...void l._file_append,_file_exists:l._file_exists,_file_read:l._file_read,_file_write:l._file_write,_from_bash_ass_array:function(e){let t,n,r,o,i,a,s,u,l,c,f;const d=[],p={},h=new RegExp("(.+)=\\(","g"),_=e.match(h);for(c of _)n=c.replace("=(",""),d.push(n);for(n of d){for(a of(p[n]={},r=new RegExp(`${n}=\\(((.|\n)*?)\\)\n`,"g"),o=e.match(r),1<o.length?(l=`Multiple array '${n}' definitions detected.`,w(l,1)):0<o.length?t=o[0]:(l="No arrays found in input string.",w(l,1)),u=new RegExp('\\["(.*?)"\\]',"g"),s=t.match(u),i=[],s))_key_name=a.replace('["',""),_key_name=_key_name.replace('"]',""),i.push(_key_name);for(a of i)_value_re=new RegExp(`\\["${a}"\\]="(.*?)"`,"g"),_value_assignment_matches=t.match(_value_re),1<_value_assignment_matches.length?(l=`Multiple values '${_value_assignment_matches}' assignments found for key '${a}' of associative array '${n}'.`,w(l,1)):0<_value_assignment_matches.length?_value_assignment=_value_assignment_matches[0]:(l=`No values found for key '${a}'.`,w(l,1)),f=_value_assignment.replace(RegExp(`^\\["${a}"\\]="`,"g"),""),f=f.replace(RegExp('"$',"g"),""),p[n][a]=f}return p},...void l._fs_worker_new,...void l._fs_worker_start,_homedir_get:function(){let e;return"undefined"==typeof window&&void 0!==n.g&&(n.g.global,n.g),"undefined"!=typeof window&&(e="/home/user"),e},...void l._json_display,_json_read:l._json_read,_lib_get:v,_ls:l._ls,_mkdir:l._mkdir,...void l._mktemp,_msg_info:m,_msg_error:w,_msg_warning:y,_msg_info_obj:function(e,t){let n;n=`${e}: '${t}'`,m(n)},...void l._mv,_override_set:function(e,t,n){E(e,t,n);const r=a(),o=k(e,t),i=typeof o;Object.keys(r).includes(`override_${e}_${t}`)?S(e,t,k(`override_${e}`,t)):"undefined"!=i&&""!=o?""!=n&&S(e,t,n):"undefined"!=i&&""!=o||""!=n&&S(e,t,n)},_path_join:h,...void l._argv,...void l._cd,...void l._cwd,...void l._exit,...void l._pwd,_pwd:l._pwd,_require:async function(e){let t,r,o,i,a,s;r=!1,s=!1;try{o=n(801)(e),r=!0}catch(n){"MODULE_NOT_FOUND"==n.code?(a=`Program '${e}' not found as module.`,m(a),s=!0):(_display_error(n),t=n)}if(s){const t=await v(),a=[`${t}/${e}`,`${t}/${e}/nodejs`];for(_dir of a)if(i=`${_dir}/package.json`,p(i)){o=n(801)(i),r=!0;break}}if(!r)throw t.shortMessage=`Module '${e}'found not as Node.js module nor as standalone library module in ${_program_dirs}.`,exception;return o},...void l._rm,_run:async function(e,t,n,r,o,i){let a,l,c;void 0!==t&&""!=t&&t!=[]||(l="No command given in input.",w(l,1));const f=t[0],d=t.slice(1,t.length);if(void 0!==e&&""!=e||(e="sync"),void 0!==n&&""!=n||(n=""),void 0!==r&&""!=r||(r="0"),void 0!==o&&""!=o||(o="spawn"),void 0!==i&&""!=i||(i=""),l=`Running '${f}' with arguments '${d}'.`,m(l),c="","async"==e){const e=function(e){c+=e.toString()},t=function(e){let t,n;return 0!=e?(n=`Process exited with code '${e}'`,w(n,1)):(n="Process exited normally.",m(n)),t=c.split("\n"),t},n=u(f,d);return n.stdout.on("data",e),n.on("close",t),a=c.split("\n"),m(a.length),a}if("sync"==e){if("spawn"==o)return a=s(f,d,{encoding:"utf-8"}).stdout.split("\n"),a;if("native"==o){if(0<r){_msg_timeout=`Timeout of length '${r}' ms reached for task '${n}'.`,_time_over=!1;try{if(new Promise((e,t)=>{setTimeout(()=>{},r,"hurr")}),""!=i){if(c=await Promise.race([b(r),f[i].apply(f,d)]),void 0===c)throw _msg_timeout}else c=await f.apply(f,d)}catch(e){_time_over=!0}return _time_over?void y(_msg_timeout):c}c=await f[i].apply(f,d)}}},_sleep:b,_stat:_}},6314(e,t,n){const r=n(6070)._os_tmpdir_get,o=n(4962),i=o.readdirSync,a=o.existsSync,s=o.appendFileSync,u=o.readFileSync,l=o.writeFileSync,c=o.fsWorkerNew,f=o.fsWorkerStart,d=o.isDir,p=o.mkdtempSync,h=o.statSync,_=JSON.parse,g=JSON.stringify,y=n(8843),m=y.basename,w=y.dirname,v=y.join,b=y.parse,k=n(8272),E=k.exit;function S(e,t){return void 0!==t&&t!={}&&""!=t||(t={encoding:"utf8",flag:"r"}),u(e,t)}function A(e){let t;return t=v.apply(null,e),t}e.exports={_argv:k.argv,_basename:function(e){let t;return t=m(e),t},_cat:S,_chmod:o.chmodSync,_chown:o.chownSync,_cd:k.chdir,_cp:o.cpSync,_cwd:k.cwd,_dirname:function(e){let t;return t=w(e),t},_ext_rm:function(e){let t,n,r;return t=b(e).dir,n=b(e).name,r=[t,n],A(r)},_exit:E,_dir_exists:function(e){try{_return=d(e)}catch(e){if("ENOENT"!=e.code)throw e;_return=!1}return _return},_file_append:function(e,t,n){const r=[e,t];void 0!==n&&n!={}&&""!=n&&r.push(n),s.apply(null,r)},_file_exists:function(e){let t,n;return n=!1,t=a(e),t&&(n=!0),n},_file_read:S,_file_write:function(e,t,n){l(e,t)},_fs_worker_new:c,_fs_worker_start:f,_json_display:g,_json_read:function(e){let t,n;return t=S(e),n=_(t),n},_ls:function(e){return i.apply(null,[e])},_mkdir:o.mkdirSync,_mktemp:async function(e,t){const n=typeof t;if(void 0!==e&&""!=e||(e=`${r()}/tmp.`),"undefined"!=n&&""!=t&&"true"!=t||(t=!0),"false"==t&&(t=!1),t)try{return p(e)}catch(e){throw e}else _msg="It only supports creating temporary directories.",console.error(_msg),E(1)},_mv:o.renameSync,_path_join:A,_pwd:k.cwd,_rm:o.rmSync,_stat:h}},6070(e,t,n){function r(e){let t,n,r,o,i,a,s,u,l;void 0!==e&&""!=e&&null!=e||(s="Getting all values.",_msg_info("Getting all values."),e=""),t=[],a=window.location,u=a.search.substring(1),r=u.split("&");for(let a=0;a<r.length;a++)n=r[a],i=n.split("="),o=i[0],o!=e&&""!=e||(l=i[1],t.push(l));return t}e.exports={_argv_get:function(e){let t;return"undefined"==typeof window&&void 0!==n.g&&n.g.global===n.g&&"function"!=typeof n||(t=r()),t},_argv_url_get:r,_child_process_spawn_get:function(e){let t;return void 0!==e&&""!=e||(e="sync"),"undefined"==typeof window&&void 0!==n.g&&n.g.global===n.g&&"function"!=typeof n||(t=function(e,t,n){return n}),t},_global_get:function(){let e;return"undefined"==typeof window&&void 0!==n.g&&(n.g.global,n.g),"undefined"!=typeof window&&(e=window),e},_os_tmpdir_get:function(){let e;return"undefined"==typeof window&&void 0!==n.g&&n.g.global===n.g&&"function"!=typeof n||(e=function(){return"/tmp"}),e},_yargv_get:function(e){let t;const r={},o={};void 0!==e&&e!={}&&""!=e||(e={booleans:[],string:!0});const i=e.booleans;if("undefined"==typeof window&&void 0!==n.g&&n.g.global===n.g){const a=n(Object(function(){const e=new Error("Cannot find module 'yargs'");throw e.code="MODULE_NOT_FOUND",e}()));_yargs_helpers_module=n(Object(function(){const e=new Error("Cannot find module 'yargs/helpers'");throw e.code="MODULE_NOT_FOUND",e}()));const s=_yargs_helpers_module.hideBin;if("string"in e&&e.string&&(r._={type:"string",string:!0},o["parse-numbers"]=!1,o["parse-positional-numbers"]=!1),i.length>0)for(t of i)r[t]={demand:!1,default:!1,type:"boolean"};return 0<i.length||e.string?a(s(process.argv)).parserConfiguration(o).options(r).string("_").parse():a(s(process.argv))}}}},801(e){function t(e){const t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=801,e.exports=t},7511(e,t,n){const r=n(8014);_file_exists=r._file_exists,_json_read=r._json_read,_path_join=r._path_join,e.exports={_data_get:function(e){let t;return t=void 0===e||""==e?function(){const e=_path_join(["/","chains","chains.json"]);return _json_read(e)}():function(e){let t;t=[];const n=_path_join(["/","chains",`${e}.json`]);return _file_exists(n)&&(t=_json_read(n)),t}(e),t}}},8014(e,t,n){const r=n(1744),o=(r._argv_get,r._argv_url_get,r._child_process_spawn_get),i=(r._global_get,o(),o("async"),r._yargv_get,n(496)),a=(i._basename,i._dirname,i._file_append,i._exit,i._file_exists,i._path_join);i._stat,e.exports={...void i._basename,...void i._cat,...void i._chmod,...void i._chown,...void i.cd,...void i.cd,...void i._cp,...void i._cwd,...void i._exit,...void i._ext_rm,...void i._dir_exists,...void i._file_append,_file_exists:i._file_exists,...void i._file_read,...void i._file_write,...void i._fs_worker_new,...void i._fs_worker_start,...void i._json_display,_json_read:i._json_read,...void i._ls,...void i._mkdir,...void i._mktemp,...void i._mv,_path_join:a,...void i._argv,...void i._cd,...void i._cwd,...void i._exit,...void i._pwd,...void i._pwd,...void i._rm}},496(e,t,n){const r=n(1744)._os_tmpdir_get,o=n(4962),i=o.readdirSync,a=o.existsSync,s=o.appendFileSync,u=o.readFileSync,l=o.writeFileSync,c=o.fsWorkerNew,f=o.fsWorkerStart,d=o.isDir,p=o.mkdtempSync,h=o.statSync,_=JSON.parse,g=JSON.stringify,y=n(8843),m=y.basename,w=y.dirname,v=y.join,b=y.parse,k=n(8272),E=k.exit;function S(e,t){return void 0!==t&&t!={}&&""!=t||(t={encoding:"utf8",flag:"r"}),u(e,t)}function A(e){let t;return t=v.apply(null,e),t}e.exports={_argv:k.argv,_basename:function(e){let t;return t=m(e),t},_cat:S,_chmod:o.chmodSync,_chown:o.chownSync,_cd:k.chdir,_cp:o.cpSync,_cwd:k.cwd,_dirname:function(e){let t;return t=w(e),t},_ext_rm:function(e){let t,n,r;return t=b(e).dir,n=b(e).name,r=[t,n],A(r)},_exit:E,_dir_exists:function(e){try{_return=d(e)}catch(e){if("ENOENT"!=e.code)throw e;_return=!1}return _return},_file_append:function(e,t,n){const r=[e,t];void 0!==n&&n!={}&&""!=n&&r.push(n),s.apply(null,r)},_file_exists:function(e){let t,n;return n=!1,t=a(e),t&&(n=!0),n},_file_read:S,_file_write:function(e,t,n){l(e,t)},_fs_worker_new:c,_fs_worker_start:f,_json_display:g,_json_read:function(e){let t,n;return t=S(e),n=_(t),n},_ls:function(e){return i.apply(null,[e])},_mkdir:o.mkdirSync,_mktemp:async function(e,t){const n=typeof t;if(void 0!==e&&""!=e||(e=`${r()}/tmp.`),"undefined"!=n&&""!=t&&"true"!=t||(t=!0),"false"==t&&(t=!1),t)try{return p(e)}catch(e){throw e}else _msg="It only supports creating temporary directories.",console.error(_msg),E(1)},_mv:o.renameSync,_path_join:A,_pwd:k.cwd,_rm:o.rmSync,_stat:h}},1744(e,t,n){function r(e){let t,n,r,o,i,a,s,u,l;void 0!==e&&""!=e&&null!=e||(s="Getting all values.",_msg_info("Getting all values."),e=""),t=[],a=window.location,u=a.search.substring(1),r=u.split("&");for(let a=0;a<r.length;a++)n=r[a],i=n.split("="),o=i[0],o!=e&&""!=e||(l=i[1],t.push(l));return t}e.exports={_argv_get:function(e){let t;return"undefined"==typeof window&&void 0!==n.g&&n.g.global===n.g&&"function"!=typeof n||(t=r()),t},_argv_url_get:r,_child_process_spawn_get:function(e){let t;return void 0!==e&&""!=e||(e="sync"),"undefined"==typeof window&&void 0!==n.g&&n.g.global===n.g&&"function"!=typeof n||(t=function(e,t,n){return n}),t},_global_get:function(){let e;return"undefined"==typeof window&&void 0!==n.g&&(n.g.global,n.g),"undefined"!=typeof window&&(e=window),e},_os_tmpdir_get:function(){let e;return"undefined"==typeof window&&void 0!==n.g&&n.g.global===n.g&&"function"!=typeof n||(e=function(){return"/tmp"}),e},_yargv_get:function(e){let t;const r={},o={};void 0!==e&&e!={}&&""!=e||(e={booleans:[],string:!0});const i=e.booleans;if("undefined"==typeof window&&void 0!==n.g&&n.g.global===n.g){const a=n(Object(function(){const e=new Error("Cannot find module 'yargs'");throw e.code="MODULE_NOT_FOUND",e}()));_yargs_helpers_module=n(Object(function(){const e=new Error("Cannot find module 'yargs/helpers'");throw e.code="MODULE_NOT_FOUND",e}()));const s=_yargs_helpers_module.hideBin;if("string"in e&&e.string&&(r._={type:"string",string:!0},o["parse-numbers"]=!1,o["parse-positional-numbers"]=!1),i.length>0)for(t of i)r[t]={demand:!1,default:!1,type:"boolean"};return 0<i.length||e.string?a(s(process.argv)).parserConfiguration(o).options(r).string("_").parse():a(s(process.argv))}}}},7007(e){"use strict";var t,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!=e};function i(){i.init.call(this)}e.exports=i,e.exports.once=function(e,t){return new Promise(function(n,r){function o(n){e.removeListener(t,i),r(n)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",o),n([].slice.call(arguments))}_(e,t,i,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&_(e,"error",t,{once:!0})}(e,o)})},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var a=10;function s(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?i.defaultMaxListeners:e._maxListeners}function l(e,t,n,r){var o,i,a,l;if(s(n),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),i=e._events),a=i[t]),void 0===a)a=i[t]=n,++e._eventsCount;else if("function"==typeof a?a=i[t]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),(o=u(e))>0&&a.length>o&&!a.warned){a.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=a.length,l=c,console&&console.warn&&console.warn(l)}return e}function c(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=c.bind(r);return o.listener=n,r.wrapFn=o,o}function d(e,t,n){var r=e._events;if(void 0===r)return[];var o=r[t];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(o):h(o,o.length)}function p(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function h(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function _(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,function o(i){r.once&&e.removeEventListener(t,o),n(i)})}}Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");a=e}}),i.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},i.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},i.prototype.getMaxListeners=function(){return u(this)},i.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var o="error"===e,i=this._events;if(void 0!==i)o=o&&void 0===i.error;else if(!o)return!1;if(o){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var u=i[e];if(void 0===u)return!1;if("function"==typeof u)r(u,this,t);else{var l=u.length,c=h(u,l);for(n=0;n<l;++n)r(c[n],this,t)}return!0},i.prototype.addListener=function(e,t){return l(this,e,t,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(e,t){return l(this,e,t,!0)},i.prototype.once=function(e,t){return s(t),this.on(e,f(this,e,t)),this},i.prototype.prependOnceListener=function(e,t){return s(t),this.prependListener(e,f(this,e,t)),this},i.prototype.removeListener=function(e,t){var n,r,o,i,a;if(s(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0===--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(o=-1,i=n.length-1;i>=0;i--)if(n[i]===t||n[i].listener===t){a=n[i].listener,o=i;break}if(o<0)return this;0===o?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,o),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,a||t)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0===--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var o,i=Object.keys(n);for(r=0;r<i.length;++r)"removeListener"!==(o=i[r])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},i.prototype.listeners=function(e){return d(this,e,!0)},i.prototype.rawListeners=function(e){return d(this,e,!1)},i.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},i.prototype.listenerCount=p,i.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},5515(e,t,n){const r=n(6684),o=r._homedir_get,i=r._file_exists,a=r._file_read,s=r._file_write,u=r._json_read,l=r._lib_get,c=r._mkdir,f=r._msg_info,d=r._msg_error,p=r._path_join,h=(r._range,r._rm),_=n(7511)._data_get;async function g(e,t,n){let r,a,s;if(void 0!==e&&""!=e||(e="n"),void 0!==t&&""!=t||(t=""),void 0!==n&&""!=n||(""!=t?n="split":""==t&&(n="unified")),s=`Getting path for chain with chain id '${t}' with privilege user set to '${e}' in format '${n}'.`,f(s),"unified"==n?r="chains.json":"split"==n&&(r=`${t}.json`),"y"==e){const e=o();a=p([e,".config","evm-chains",r]);const t=i(a);1==t?(s=`Found database '${a}'.`,f(s)):0==t?(s=`Database '${a}' not found`,f(s)):(s="wat",d(s))}else if("n"==e){const e=await l();s=`Found system libraries directory '${e}'.`,a=p([e,"evm-chains",r])}else s=`Input variable '_user' must be a boolean. _user value is '${e}'.`,d(s,0);return a}function y(e){i(e)||d(`Database at '${e}' does not exist.`,1)}function m(e,t,n,r,o,i,a){let s,l,c,d,p,h,_,g;if(p=n,"id"==t?(d="chainId",h=a,g=`Getting data for filter key: '${d}' and value '${h}'.`,f(g)):"testnet"==t&&(g="Like I have to agg a tag.",f(g)),"id"==n?p="chainId":"rpc"==n&&(p=n),"y"==i)return c=function(e){console.log(e)}(p),g=`Showing results for all networks with filter '${c}'.`,f(g),s=u(e),g=`Showing results for all networks with filter '${c}'.`,f(g),s;if("n"==i){for(l of(_=[],g=`Showing results for chain '${a}' in database '${e}' with filter '${p}'.`,f(g),s=u(e),g=`Database '${e}' contains '${s.length}' items.`,f(g),s))if(Number(l[d])==Number(a)&&(_.push(l),"kirsh"==r))break;return g=`Total results returned for '${e}' are '${_.length}'.`,f(g),_}}function w(e,t,n,r,o,i,a,s,l){let c,p,h,g,w,v,b;if(v=0,"offline"==t){for(h of n)if("node"==h){for(g of(c=[],b=_(e),b))if(g.chainId==e&&(c.push(g),"kirsh"==i))break}else if("system"==h){for(p of(w=`Getting data from databases '${l}'`,f(w),l))if(w=`Looking in '${p}'.`,f(w),y(p),"amount"!=r)c=m(p,r,o,i,0,s,e);else if("amount"==r&&(c=u(p),v=c.length,"kirsh"==i))break;if("amount"!=r)v=c.length,0==c.length&&(w=`No results found for network '${e}'.`,d(w,0));else if("amount"==r)return w=`Found '${v}' networks.`,f(w),v}for(g of(b=[],c))if(g.chainId==e&&(b.push(g[o]),"all"!=i))break;c=b,v=c.length,w=`Found '${v}' networks in database '${p}'.`,f(w)}else"online"==t&&(w="About to implement it probably.",d(w,1));return c}async function v(e,t){let r,u;const l=n(3182)._block_number_get,_=[t,"","","3","10000"];try{u=`Testing connectivity for RPC '${t}' for network '${e}'.`,f(u),r=await l.apply(null,_),console.log(r),0<r&&(u=`RPC '${t}' for network '${e}' online.`,f(u),function(e,t){"number"==typeof e&&(e=e.toFixed(0));const n=o(),r=p([n,".cache","evm-chains",e,"rpc",t]),a=p([r,"offline"]);i(a)&&(h(a),f(`Deleting offline score for RPC '${t}'`))}(e,t))}catch(n){return console.error(n),u=`RPC '${t}' for network '${e}' offline.`,d(u,0),function(e,t){let n;const r=o(),u=p([r,".cache","evm-chains",e,"rpc",t]),l=p([u,"offline"]);console.log(u),i(u)?n=i(l)?a(l):0:(c(u),f(`Creating directory +'${u}'.`)),n+=1,s(l,n)}(e,t),r=0,r}return r}e.exports={_evm_chains_info:async function(e,t,n,r,o,a,s,u,l,c,p){let h,_,y;if(void 0!==c&&""!=c||(c=[]),0==c.length&&(c=await async function(e,t){let n,r,o;void 0!==t&&""!=t||(t="n");const a=[];"y"==t?(n="y",r="n"):"n"==t&&(n="n",r="y");const s=await g(n,"","unified"),u=await g(n,e,"split"),l=await g(r,"","unified"),c=await g(r,e,"split");return i(u)?(a.push(u),o=`Found database '${u}', adding.`,f(o)):i(u)?(o="wat",d(o,1)):(o=`Default per-network database '${u}' not found, trying '${s}'.`,f(o)),i(s)?(a.push(s),o=`Found database '${s}', adding.`,f(o)):(o=`Default unified database '${u}' not found, trying '${s}'.`,f(o)),i(c)?(a.push(c),o=`Found database '${c}', adding.`,f(o)):(o=`Fallback per-network database '${c}' not found, trying '${l}'.`,f(o)),i(l)?(a.push(l),o=`Found database '${l}', adding.`,f(o)):(o=`Fallback database '${c}' does not exist.`,d(o,0)),0==a.length&&(o="Found no databases!",f(o)),a}(l,p)),"get"==e){const e=[],i=w(l,r,o,t,n,a,0,s,c);if("rpc"==n){for(_ of i)for(y of _)if("y"==s?e.push(y):"n"==s&&(y.includes("API_KEY")||e.push(y)),"kirsh"==a)break;return e}if("name"==n)return i;if("id"==n)return i;if("explorers"==n){for(_ of i)for(h of _)if(e.push(h.url),"kirsh"==a)break;return e}}else if("set"==e)!function(e){"id"==e&&f(`Setting value for type '${e}'.`)}(t);else{if("check"==e){const e=await async function(e,t,n,r,o,i){let a,s,u;const l={},c=await w(e,t,n,r,"rpc","all",0,o,i);for(a of c)for(s of a)try{u=await v(e,s),l[s]=!0}catch(e){u=0,l[s]=!1}return l}(l,r,o,t,s,c);return console.log(e),e}d(`Unknown command '${e}'.`,1)}}}},6684(e,t,n){const r=n(3514),o=(r._argv_get,r._argv_url_get,r._child_process_spawn_get),i=(r._global_get,o(),o("async"),r._yargv_get,n(7558)),a=(i._basename,i._dirname,i._file_append,i._exit),s=(i._file_exists,i._path_join);function u(e,t){let n;return void 0===t||""==t?n=`${e}: {_msg}`:"string"!=typeof t&&""==t||(n=`[${t}] ${e}: {_msg}`),n}i._stat,e.exports={...void i._basename,...void i._cat,...void i._chmod,...void i._chown,...void i.cd,...void i.cd,...void i._cp,...void i._cwd,...void i._exit,...void i._ext_rm,...void i._dir_exists,...void i._file_append,_file_exists:i._file_exists,_file_read:i._file_read,_file_write:i._file_write,...void i._fs_worker_new,...void i._fs_worker_start,_homedir_get:function(){let e;return"undefined"==typeof window&&void 0!==n.g&&(n.g.global,n.g),"undefined"!=typeof window&&(e="/home/user"),e},...void i._json_display,_json_read:i._json_read,_lib_get:async function(){let e;return new Set,"undefined"==typeof window&&void 0!==n.g&&n.g.global===n.g&&"function"!=typeof n||(e="/usr/lib"),e},...void i._ls,_mkdir:i._mkdir,...void i._mktemp,_msg_info:function(e){let t;"undefined"!=typeof quiet&&""!=quiet||(quiet="y"),"n"==quiet&&(t=u("INFO",app_name).replaceAll("{_msg}",e),console.log(t))},_msg_error:function(e,t){let n,r,o;n=app_name,t=String(t),r=u("ERROR",n),o=r.replaceAll("{_msg}",e),"1"===t?(console.error(o),a(1)):"0"===t&&console.warn(o)},...void i._mv,_path_join:s,...void i._argv,...void i._cd,...void i._cwd,...void i._exit,...void i._pwd,...void i._pwd,_range:function(e,t){let n;return void 0===t&&(t=e,e=0),n=t-e,n<0?(_msg="Second argument 'end' is greater than first argument 'start', returning empty list.",function(e){let t;"n"==quiet&&(_template=u("WARNING",app_name),t=_template.replaceAll("{_msg}",e),console.warn(t))}(_msg),[]):Array(n).keys().map(t=>t+e)},_rm:i._rm}},7558(e,t,n){const r=n(3514)._os_tmpdir_get,o=n(4962),i=o.readdirSync,a=o.existsSync,s=o.appendFileSync,u=o.readFileSync,l=o.writeFileSync,c=o.fsWorkerNew,f=o.fsWorkerStart,d=o.isDir,p=o.mkdtempSync,h=o.statSync,_=JSON.parse,g=JSON.stringify,y=n(8843),m=y.basename,w=y.dirname,v=y.join,b=y.parse,k=n(8272),E=k.exit;function S(e,t){return void 0!==t&&t!={}&&""!=t||(t={encoding:"utf8",flag:"r"}),u(e,t)}function A(e){let t;return t=v.apply(null,e),t}e.exports={_argv:k.argv,_basename:function(e){let t;return t=m(e),t},_cat:S,_chmod:o.chmodSync,_chown:o.chownSync,_cd:k.chdir,_cp:o.cpSync,_cwd:k.cwd,_dirname:function(e){let t;return t=w(e),t},_ext_rm:function(e){let t,n,r;return t=b(e).dir,n=b(e).name,r=[t,n],A(r)},_exit:E,_dir_exists:function(e){try{_return=d(e)}catch(e){if("ENOENT"!=e.code)throw e;_return=!1}return _return},_file_append:function(e,t,n){const r=[e,t];void 0!==n&&n!={}&&""!=n&&r.push(n),s.apply(null,r)},_file_exists:function(e){let t,n;return n=!1,t=a(e),t&&(n=!0),n},_file_read:S,_file_write:function(e,t,n){l(e,t)},_fs_worker_new:c,_fs_worker_start:f,_json_display:g,_json_read:function(e){let t,n;return t=S(e),n=_(t),n},_ls:function(e){return i.apply(null,[e])},_mkdir:o.mkdirSync,_mktemp:async function(e,t){const n=typeof t;if(void 0!==e&&""!=e||(e=`${r()}/tmp.`),"undefined"!=n&&""!=t&&"true"!=t||(t=!0),"false"==t&&(t=!1),t)try{return p(e)}catch(e){throw e}else _msg="It only supports creating temporary directories.",console.error(_msg),E(1)},_mv:o.renameSync,_path_join:A,_pwd:k.cwd,_rm:o.rmSync,_stat:h}},3514(e,t,n){function r(e){let t,n,r,o,i,a,s,u,l;void 0!==e&&""!=e&&null!=e||(s="Getting all values.",_msg_info("Getting all values."),e=""),t=[],a=window.location,u=a.search.substring(1),r=u.split("&");for(let a=0;a<r.length;a++)n=r[a],i=n.split("="),o=i[0],o!=e&&""!=e||(l=i[1],t.push(l));return t}e.exports={_argv_get:function(e){let t;return"undefined"==typeof window&&void 0!==n.g&&n.g.global===n.g&&"function"!=typeof n||(t=r()),t},_argv_url_get:r,_child_process_spawn_get:function(e){let t;return void 0!==e&&""!=e||(e="sync"),"undefined"==typeof window&&void 0!==n.g&&n.g.global===n.g&&"function"!=typeof n||(t=function(e,t,n){return n}),t},_global_get:function(){let e;return"undefined"==typeof window&&void 0!==n.g&&(n.g.global,n.g),"undefined"!=typeof window&&(e=window),e},_os_tmpdir_get:function(){let e;return"undefined"==typeof window&&void 0!==n.g&&n.g.global===n.g&&"function"!=typeof n||(e=function(){return"/tmp"}),e},_yargv_get:function(e){let t;const r={},o={};void 0!==e&&e!={}&&""!=e||(e={booleans:[],string:!0});const i=e.booleans;if("undefined"==typeof window&&void 0!==n.g&&n.g.global===n.g){const a=n(Object(function(){const e=new Error("Cannot find module 'yargs'");throw e.code="MODULE_NOT_FOUND",e}()));_yargs_helpers_module=n(Object(function(){const e=new Error("Cannot find module 'yargs/helpers'");throw e.code="MODULE_NOT_FOUND",e}()));const s=_yargs_helpers_module.hideBin;if("string"in e&&e.string&&(r._={type:"string",string:!0},o["parse-numbers"]=!1,o["parse-positional-numbers"]=!1),i.length>0)for(t of i)r[t]={demand:!1,default:!1,type:"boolean"};return 0<i.length||e.string?a(s(process.argv)).parserConfiguration(o).options(r).string("_").parse():a(s(process.argv))}}}},2768(e,t,n){const r=n(8368),o=r._argv_get,i=r._basename,a=r._cmdline_check,s=r._dirname,u=r._exit,l=r._file_read,c=r._file_write,f=r._msg_info,d=(r._msg_info_obj,r._msg_error),p=r._override_set,h=r._path_join,_=n(7785)._wallet_get,g=n(9341),y=g._provider_get,m=g._msg_info_provider_generated;async function w(e,t,n,r,o,i){let a,u,f,p,g,w;return void 0!==e&&""!=e&&e!=[]||(_msg="No input seed file or phrase.",d(_msg,1)),g="",p=s(e),w=[p,"wallet.dat"],_wallet_path=h(w),u="",""!=n&&(u=l(n)),f=[t,u,r,o],_provider=y.apply(null,f),m(_provider),_wallet_get_opts=[_wallet_path,"",e,_provider],_wallet=_.apply(null,_wallet_get_opts),a=_wallet.address,null!=i&&""!=i&&c(i,a),a}function v(e){let t;void 0!==e&&""!=e||(e=0);const n=o(),r=["Returns the EOA fingerprint of a seed (the address)","","usage:",` ${i(n.$0)}`," <quiet>"," <seed>"," (<target-network>)"," (<api-key-path>)"," (<output-file>)","","args:",""," quiet It can be 'y' or 'n'.",""," seed A seed path or a seed phrase",""," target-network Chain ID or RPC address, optional.",""," api-key-path Etherscan-like service API key, optional.",""," output-file If specified will save the output"," to a file, otherwise will print it.","","options:",""," -h, --help Displays this help.",""];for(t of r)console.log(t);u(e)}function b(){p("chain","id","100")}(a("address-get")||a("eoa-fingerprint"))&&(app_name="address-get",wallet_seed="",target_network="",api_key_path="",chain_id="",chain_name="",output_file="",quiet="",quiet="y",process.argv.forEach(function(e,t,n){2==t&&(quiet=e),3==t&&(wallet_seed=e),4==t&&(target_network=e),5==t&&(api_key_path=e),6==t&&(output_file=e),"-h"!=e&&"--help"!=e||(b(),quiet="n",v(0))}),""==wallet_seed&&(b(),quiet="n",d("No arguments given.",0),v(1)),b(),function(){let e,t;for(e of(t=[` ${app_name} configuration:`,` Wallet seed: ${wallet_seed}`,` Target network: ${target_network}`,` API key: ${api_key_path}`,` Output file: ${output_file}`],t))f(e)}(),app_opts=[wallet_seed,target_network,api_key_path,chain_id,chain_name,output_file],async function(e){const t=await w.apply(null,e);console.log(t)}(app_opts)),e.exports={_address_get:w}},6500(e,t,n){"use strict";n.a(e,async(r,o)=>{try{n.r(t),e=n.hmd(e);const i=n(8368),a=i._dirname,s=i._exit,u=i._file_read,l=i._path_join,c=i._msg_info,f=(i._msg_info_obj,i._msg_error),d=i._require,p=((i._sleep,await d("ethers")).ethers.parseUnits,n(7785)._wallet_get),h=n(9712)._balance_get,_=n(9341),g=_._provider_get,y=_._msg_info_provider_generated;function m(e,t){let n;n=`Amount $'{_amount}' '${t}' requested to send is less than balance.`,f(n,1)}async function w(e,t,n,r,o,i){let s,c,d,_,m,w,v,b,k,E;for(i=void 0===i||""==i?3:Number(i),t=Number(t),m=0,v=!1,k="",b=a(e),E=[b,"wallet.dat"],_wallet_path=l(E),_=[n],""!=r&&(s=u(r),_.push(s)),_provider=await g.apply(null,_),y(_provider),_wallet_get_opts=[_wallet_path,"",e,_provider],_wallet=p.apply(null,_wallet_get_opts),w=_wallet.address,""==o&&(o="ether"),_balance_get_opts=[e,n,r,w,o];0==v&&m<i;)try{if(c=await h.apply(null,_balance_get_opts),c=Number(c),v=!0,c<=t)return d=`Balance is '${c}', requiring '${t}'.`,f(d,0),!1;if(c>t)return!0}catch(e){m+=1,d=`Error checking balance, retrying (${m} of ${i})`,console.error(e),f(d,0)}if(m==i&&0==v)throw"Failing checking the balance."}function v(){""==measure_unit&&(measure_unit="ether"),""==retries_max&&(retries_max="3")}function b(){let e,t;for(e of(t=[` Target amount: ${target_amount}`,` Measure unit: ${measure_unit}`` Network options:`,` Target network: ${target_network}`,` API Key: ${api_key}`,"Credentials options:",` Wallet seed: ${wallet_seed}`],t))c(e)}function k(e){let t,n;for(t of(n=["Checks if wallet balance is more or less than a given amount.","","Usage:"," balance-check"," <quiet>"," <seed-path>"," <amount>"," (<target-network>)"," (<api-key>)"," (<measure-unit>)","","Arguments:"," <seed-path> Path on disk of the file"," containing the seed phrase."," <amount> How much balance to send.","","Optional arguments:"," <target-network> Name of the network to connect to."," <api-key> Path on disk of the API key for"," the network service provider."," Default: the wallet address."," corresponding to the seed."," <measure-unit> Can be 'wei' or 'ether'.",` Default: '${display_unit}'`," <retries-max> Maximum number of retries.",` Default: ${retries_max}`],n))console.log(t);s(e)}function E(){let e;quiet="y",process.argv.forEach(function(e,t,n){2==t&&(quiet=e),3==t&&(wallet_seed=e),4==t&&(target_amount=e),5==t&&(target_network=e),6==t&&(api_key=e),7==t&&(measure_unit=e),8==t&&(retries_max=e)}),""==wallet_seed&&(e="No input seed file path.",v(),k(1)),""==target_amount&&(e="No input amount.",v(),k(1))}async function S(e){let t;try{t=await w.apply(null,e),process.stdout.write(t.toString())}catch(e){f(e,1)}}_cmdline_check("balance-check")&&(app_name="balance-check",wallet_seed="",target_address="",target_amount="",target_network="",api_key="",measure_unit="",retries_max="",quiet="",E(),b(),app_opts=[wallet_seed,target_amount,target_network,api_key,measure_unit,retries_max],S(app_opts)),e.exports={_balance_check:w,_msg_error_balance_insufficient:m},o()}catch(A){o(A)}},1)},9712(e,t,n){"use strict";n.a(e,async(r,o)=>{try{n.r(t),e=n.hmd(e);const i=n(8368),a=i._argv_get,s=i._cmdline_check,u=i._basename,l=i._dirname,c=i._exit,f=i._file_read,d=i._file_write,p=i._override_set,h=i._msg_info,_=(i._msg_info_obj,i._msg_error),g=i._path_join,y=i._require,m=i._run,w=i._sleep,v=(await y("ethers")).ethers.formatEther,b=n(7785)._wallet_get,k=n(9341),E=k._provider_get,S=k._msg_info_provider_generated;async function A(e,t,n,r,o,i,a,s){let u,c,p,y,k,A,T,R,x,O;for(a=void 0===a||""==a?3:Number(a),void 0!==s&&""!=s||(s=1e5),A=0,T=!1,x="",""!=e&&(R=l(e),O=[R,"wallet.dat"],_wallet_path=g(O)),k=[t],null==i&&(i=""),""!=n&&(_api_key=f(n),k.push(_api_key)),k.push(s),_provider=await E.apply(null,k),S(_provider),""==r&&(_wallet_get_opts=[_wallet_path,"",e,_provider],_wallet=b.apply(null,_wallet_get_opts),r=_wallet.address),y=`Retrieving balance for address '${r}' on network '${t}'.`,h(y);0==T&&A<a;)try{const e=[_provider,r];p=await m("sync",e,"_provider_get_balance",s,"native","getBalance"),""==o&&(o="ether"),"wei"==o?u=p:"ether"==o&&(c=v(p),u=c),""!=i&&d(i,u.toString()),T=!0}catch(e){A+=1,y=`Error retrieving balance, retrying (${A} of ${a})`,console.error(e),_(y,0),await w(3e3)}if(0==T&&A==a)throw y="Error retrieving balance.",y;return u}async function T(){let e,t;if(e=!1,t=typeof target_network,"undefined"!=t&&""!=target_network||(target_network=100,t=typeof target_network),"number"==t?e=!0:"string"==t?target_network.startsWith("https://")||(e=!0):_(`Unknown type '${t}' for network variable.`,1),e){const e=(await y("libevm"))._rpc_get;target_network=e([target_network])[target_network]}p("display","unit","ether"),p("retries","max","1"),p("call","timeout","30000")}function R(){let e;const t=a(),n=[` ${u(t.$0)} configuration:`,` Wallet seed: ${wallet_seed}`,` Target network: ${target_network}`,` API Key: ${api_key}`,` Target address: ${target_address}`,` Display unit: ${display_unit}`,` Output file: ${output_file}`,` Maximum retries: ${retries_max}`` Call timeout: ${call_timeout}`];for(e of n)h(e)}function x(e){let t;void 0!==e&&""!=e||(e=0);const n=a(),r=["Usage:",` ${u(n.$0)}`," <quiet>"," <seed-path>"," <target-network>"," (<api-keys-path)"," (<target-address>)"," (<display-unit>)"," (<output-file>)"," (<retries-max>)"," (<call-timeout>)","","Arguments:",""," <seed-path> Path on disk of the file"," containing the seed phrase.",""," <target-network> Name, chain ID or RPC address"," of the network to connect to.","","Optional arguments:",""," <api-key-path> Path on disk of the API key for"," the network service provider.",""," <target-address> Address of which to return"," the balance of."," Default: the wallet address."," corresponding to the seed.",""," <display-unit> Can be 'wei' or 'ether'.",` Default: '${display_unit}'`,""," <output-file> File in which to save the balance.",` Default: '${output_file}'`,""," <retries-max> Maximum number of retries.",` Default: ${retries_max}`,""," <call-timeout> Timeout before declaring the call failed.",` Default: ${call_timeout}`];for(t of r)console.log(t);c(e)}async function O(){let e,t;quiet="y",process.argv.forEach(async function(t,n,r){2==n&&(quiet=t),3==n&&(wallet_seed=t),4==n&&(target_network=t),5==n&&(api_key=t),6==n&&(target_address=t),7==n&&(display_unit=t),8==n&&(output_file=t),9==n&&(retries_max=t),10==n&&(call_timeout=t),"-h"!=t&&"--help"!=t||(e=!0)}),e&&(await T(),quiet="n",x(0)),""==wallet_seed&&""==target_address&&(t="You need to input either a seed file path or a target address.",_("You need to input either a seed file path or a target address.",0),await T(),x(1))}async function $(){app_name="balance-get",wallet_seed="",target_network="",api_key="",target_address="",display_unit="",output_file="",retries_max="",quiet="",await O(),await T(),R(),app_opts=[wallet_seed,target_network,api_key,target_address,display_unit,output_file,retries_max,call_timeout],await balance_get_cmdline(app_opts)}(s("balance-get")||s("gas-balance"))&&$(),e.exports={_balance_get:A},o()}catch(C){o(C)}},1)},7838(e,t,n){"use strict";n.a(e,async(r,o)=>{try{n.r(t),e=n.hmd(e);const i=n(8368),a=i._argv_get,s=i._basename,u=i._cmdline_check,l=i._dirname,c=i._echo,f=i._exit,d=i._file_read,p=i._path_join,h=i._msg_info,_=(i._msg_info_obj,i._msg_error),g=i._require,y=(await g("ethers")).ethers.parseUnits,m=n(7785)._wallet_get,w=n(6500),v=w._balance_check,b=w._msg_error_balance_insufficient,k=n(9341),E=k._provider_get,S=k._msg_info_provider_generated;function A(e){return y(e,"ether")}function T(e,t,n,r,o){let i;i=`Sending '${e}' '${n}' `,r!=n&&(i=i+`('${t}' `+`'${r}') `),i+=`to address '${o}'.`,h(i)}async function R(e,t,n,r,o,i,a,s){let u,c,f,_,g,y;void 0!==a&&""!=a||(a=3e5),void 0!==i&&""!=i||(i="ether"),void 0!==s&&""!=s||(s="n");const w=l(e),k=p([w,"wallet.dat"]);if(g=[r],""!=o){const e=d(o);g.push(e)}const R=await E.apply(null,g);S(R);const x=[k,"",e,R],O=m.apply(null,x);O.address,c=[e,n,r,o,i],_check=await v.apply(null,c),0==_check&&b(n,i),f=i,"wei"==i?u=n:"ether"==i&&(u=A(n),f="wei"),T(n,u,i,f,t),y={to:t,value:u};const $=await O.sendTransaction(y);"y"==s&&(_="Transaction response:",h(_),console.log($));const C=await $.wait(1,a);return"y"==s&&(_="Transaction receipt:",h(_),console.log(C)),[$,C]}async function x(){let e,t;if(e=!1,t=typeof target_network,"undefined"!=t&&""!=target_network||(target_network=100,t=typeof target_network),"number"==t?e=!0:"string"==t?target_network.startsWith("https://")||(e=!0):_(`Unknown type '${t}' for network variable.`,1),e){const e=(await g("libevm"))._rpc_get;target_network=e([target_network])[target_network]}_override_set("measure","unit","ether"),_override_set("call","timeout","30000")}function O(){let e;const t=a(),n=[` ${s(t.$0)} configuration:`,` Wallet seed: ${wallet_seed}`,` Target address: ${target_address}`,` Target amount: ${target_amount}`,` Target network: ${target_network}`,` API Key: ${api_key}`,` Measure unit: ${measure_unit}`,` Call timeout: ${call_timeout}`];for(e of n)h(e)}function $(e){let t;void 0!==e&&""!=e||(e=0);const n=a(),r=["Transfer gas from an address to another.","","Usage:",` ${s(n.$0)}`," <quiet>"," <seed-path>"," <target-address>"," <amount>"," ( <target-network>"," <api-key>"," <measure-unit>"," <call-timeout> )","","Args:",""," <seed-path> Path on disk of the file"," containing the seed phrase.",""," <target-address> Address to send some balance to.",""," <amount> How much balance to send.",""," <target-network> Name of the network to connect to.",` Default: ${target_network}`,""," <api-key> Path on disk of the API key for"," the network service provider."," Default: the wallet address.",""," <measure-unit> Can be 'wei' or 'ether'.",` Default: ${measure_unit}`,""," <call-timeout> Timeout before declaring the call failed.",` Default: ${call_timeout}`];for(t of r)console.log(t);f(e)}async function C(){let e,t;quiet="y",process.argv.forEach(function(t,n,r){2==n&&(quiet=t),3==n&&(wallet_seed=t),4==n&&(target_address=t),5==n&&(target_amount=t),6==n&&(target_network=t),7==n&&(api_key=t),8==n&&(measure_unit=t),9==n&&(call_timeout=t),"-h"!=t&&"--help"!=t||(e=!0)}),e&&(await x(),quiet="n",$(0)),"undefined"!=typeof wallet_seed&&""!=wallet_seed||(t="No seed phrase given in input.",_(t,0),$(1)),"undefined"!=typeof target_address&&""!=target_address||(await x(),quiet="n",t="No target address given in input.",_(t,0),$(1)),"undefined"!=typeof target_amount&&""!=target_amount||(await x(),t="No target address given in input.",_(t,0),$(1))}async function j(e){let t,n;[n,t]=await R.apply(null,e),console.log("Transaction response:"),console.log(n),console.log("Transaction receipt:"),console.log(t)}async function L(){app_name="balance-send",app_opts=[],method_args=[],wallet_seed="",target_address="",target_amount="",target_network="",api_key="",measure_unit="",call_timeout="",quiet="",await C(),await x(),O(),app_opts=[wallet_seed,target_address,target_amount,target_network,api_key,measure_unit,call_timeout];const e=await j.apply(null,app_opts);c(e)}(u("balance-send")||u("gas-transfer"))&&L(),e.exports={_balance_send:R,_ether_to_wei,_ethers_to_wei:_ether_to_wei},o()}catch(N){o(N)}},1)},8605(e,t,n){const r=n(8368),o=r._argv_get,i=r._basename,a=r._cmdline_check,s=(r._dirname,r._echo),u=r._exit,l=r._file_read,c=r._file_write,f=r._msg_info,d=(r._msg_info_obj,r._msg_error),p=(r._path_join,r._require),h=r._run,_=r._sleep,g=(n(7785)._wallet_get,n(9341)),y=g._provider_get,m=g._msg_info_provider_generated;async function w(e,t,n,r,o){let i,a,s,u,p;for(r=void 0===r||""==r?3:Number(r),void 0!==o&&""!=o||(o=1e5),u=0,p=!1,s=[e],null==n&&(n=""),""!=t&&(_api_key=l(t),s.push(_api_key)),s.push(o),_provider=await y.apply(null,s),m(_provider),a=`Retrieving block number for network '${e}'.`,f(a);0==p&&u<r;)try{const e=[_provider];if(i=await h("sync",e,"_provider_get_block_number",o,"native","getBlockNumber"),void 0===i)throw{message:"Timeout reached for block number retrieval."};""!=n&&c(n,i.toString()),p=!0}catch(t){u+=1,a=`Error retrieving block number from network/rpc '${e}', retrying (${u} of ${r})`,console.error(t),d(a,0),await _provider.destroy(),await _(3e3),_provider=await y.apply(null,s)}if(0==p&&u==r)throw _provider.destroy(),a=`Failed retrieving block numberfrom network '${e}'.`,a;return i}async function v(){let e;e=!1;const t=typeof target_network;if("number"==t?e=!0:"string"==t?target_network.startsWith("https://")||(e=!0):d(`Unknown type '${t}' for network variable.`,1),e){const e=(await p("libevm"))._rpc_get;target_network=e([target_network])[target_network]}"undefined"!=typeof retries_max&&""!=retries_max||(retries_max="1"),"undefined"!=typeof call_timeout&&""!=call_timeout||(call_timeout="30000")}function b(e){let t;void 0!==e&&""!=e||(e=0);const n=o(),r=["Returns current block number for a blockchain network","","Usage:",` ${i(n.$0)}`," <quiet>"," <target-network>"," ( <api-key-path"," <output-file>"," <retries-max>"," <call-timeout> )","","Arguments:",""," <target-network> Name, chain ID or RPC address"," of the network to connect to.","","Optional arguments:",""," <api-key-path> Path on disk of the API key for"," the network service provider.",""," <output-file> File in which to save the block number.",` Default: '${output_file}'`,""," <retries-max> Maximum number of retries.",` Default: ${retries_max}`,""," <call-timeout> Timeout before declaring the call failed.",` Default: ${call_timeout}`];for(t of r)s(t);u(e)}1!=a("block-number-get")&&1!=a("block-number")||async function(){app_name="block-number-get",wallet_seed="",target_network="",api_key="",target_address="",output_file="",retries_max="",call_timeout="",quiet="",await async function(){let e,t;quiet="y",process.argv.forEach(function(t,n,r){2==n&&(quiet=t),3==n&&(target_network=t),4==n&&(api_key=t),5==n&&(output_file=t),6==n&&(retries_max=t),7==n&&(call_timeout=t),"-h"!=t&&"--help"!=t||(e=!0)}),e&&(await v(),quiet="n",b(0)),""==target_network&&(t="No network given in input.",d("No network given in input.",0),await v(),b(1))}(),await v(),function(){let e;const t=o(),n=[` ${i(t.$0)} configuration:`,` Target network: ${target_network}`,` API Key: ${api_key}`,` Output file: ${output_file}`,` Maximum retries: ${retries_max}`,` Call timeout: ${call_timeout}`];for(e of n)f(e)}(),app_opts=[target_network,api_key,output_file,retries_max,call_timeout];const e=async function(e){let t;try{t=await w.apply(null,e),s(t.toString()),u(0)}catch(e){d(e,1)}}(app_opts);s(e)}(),e.exports={_block_number_get:w}},2574(e,t,n){"use strict";n.a(e,async(r,o)=>{try{n.r(t),e=n.hmd(e);const i=n(8368),a=i._cmdline_check,s=i._msg_info,u=i._msg_error,l=i._require,c=(await l("ethers")).ethers,f=(c.formatEther,c.parseUnits);function d(e){let t;return t=String(e),f(t,"ether")}function p(){let e,t;for(e of(t=[" Input ethers: {ethers_input}".replaceAll("{ethers_input}",ethers_input)],t))s(e)}function h(e){let t,n;for(t of(n=["Usage:"," ethers-to-wei"," <ethers-input>"],n))s(t);process.exit(e)}function _(){let e;quiet="y",process.argv.forEach(function(e,t,n){2==t&&(ethers_input=e),"-h"!=e&&"--help"!=e||(quiet="n",h(0))}),""==ethers_input&&(e="No arguments given.",u("No arguments given.",0),quiet="n",h(0))}a("ethers-to-wei")&&(app_name="ethers-to-wei",ethers_input="",quiet="",_(),p(),_wei=String(d(ethers_input)),console.log(_wei)),e.exports={_ethers_to_wei:d,_ether_to_wei:d},o()}catch(g){o(g)}},1)},9341(e,t,n){"use strict";n.a(e,async(r,o)=>{try{n.r(t),e=n.hmd(e);const i=n(8368),a=i._cmdline_check,s=i._exit,u=i._msg_info,l=(i._msg_error,i._require),c=(await l("ethers")).ethers,f=c.FetchRequest,d=c.getDefaultProvider,p=c.JsonRpcProvider,h=c.Network;function _(e){let t,n,r,o;const i=typeof e;if("undefined"==i)throw o="Provider undefined.",_error={error:o},_error;if("object"==i)if(t=typeof e._getConnection,"undefined"==t)o="Probably a dummy connection method",u(o);else if("JsonRpcProvider"==t)t=typeof e._getConnection,o="Json RPC provider.",u(o),"undefined"!=t&&(r=e._getConnection().timeout),o=`Provider '${e}' with timeout '${r}' generated.`,u(o);else for(n in e)o=`Provider key: ${n}, value '${e[n]}'`,u(o)}function g(e){let t,n;if(void 0!==e&&e!=[]&&""!=e||(e=[]),0<e.length?(t=e[0],n=typeof t,"object"==n&&(e=t)):t="",1==e.length&&(t=e[0],n=typeof t,"string"==n&&t.includes(","))){const n=t.split(",");1<n.length&&(e=n)}return[e,t]}function y(e){let t;const r=n(4136)._rpc_get;return t=[e],[t,_target_network]=g(t),r(t)[e]}async function m(e,t,n,r,o,i){let a,s,l,c,g,m,w,v;return void 0!==e&&""!=e||(void 0!==n&&""!=n?(l=`Getting RPC for network with chain ID '${n}'.`,u(l),e=y(n)):(l="No network or chain id given in input, will return empty provider.",u(l))),e.startsWith("https://")||e.startsWith("wss://")||(l=`Given chain ID as a network url, obtaining an RPC url for the network with chain ID '${n}'.`,u(l),e=y(e)),void 0===o||""==o?(o=300,i=!1):i=!0,o=Number(o),s=[],g=[null],w={},"gnosis"==e?(v="https://rpc.gnosischain.com",a=v):"ethereum"==e?""!=t?(a="etherscan",w={etherscan:t,exclusive:["etherscan","infura"]}):(v="https://rpc.ankr.com/eth",a=v):a=e,""==a&&(a="mainnet"),s.push(a),""!=r&&null!=r&&null!=r||(r=""),g.push(r),""==n||null==n||null==n||isNaN(n)||(n=Number(n),g.push(n)),2<g.length&&(c=new(Function.prototype.bind.apply(h,g)),s.push(c)),1==i?a.startsWith("http")&&(_request=new f(a),_request._getConnection().timeout=o,m=await new p(_request)):0==i&&s.push(w),m=await d.apply(null,s),_(m),m}function w(){let e,t;for(e of(t=[` Target network: ${target_network}`,` API Key: ${api_key}`,` Chain ID: ${chain_id}`,` Chain Name: ${chain_name}`," Timeout: "+(connection-timeout)],t))u(e)}function v(e){let t,n;for(t of(n=["Usage:"," network-provider"," <target-network>"," <api-key-path>"," (<chain-id>)"," (<chain-name>)","","Args:"," <target-network> Network on which the transaction"," resides."," <api-key-path> Path of the API key for the"," contract ABI provider service."," <chain-id> Chain ID for the network."," <chain-name> Name for the network.",""," Options:"," -h This help."],n))console.log(t);-1<e&&s(e)}function b(){quiet="y",process.argv.forEach(function(e,t,n){2==t&&(target_network=e),3==t&&(api_key=e),4==t&&(chain_id=e),5==t&&(chain_name=e),"-h"!=e&&"--help"!=e||(quiet="n",v(0))}),""==target_network&&(quiet="n",v(1))}a("network-provider")&&(app_name="network-provider",target_network="",api_key="",chain_id="",chain_name="",connection_timeout="",b(),""==target_network&&(target_network="gnosis"),""==connection_timeout&&(connection_timeout="300000"),w(),app_opts=[target_network,api_key,chain_id,chain_name,connection_timeout],m.apply(null,app_opts)),e.exports={_provider_get:m,_msg_info_provider_generated:_,_target_networks_check:g},o()}catch(k){o(k)}},1)},8119(e,t,n){"use strict";n.a(e,async(r,o)=>{try{n.r(t),e=n.hmd(e);const i=n(8368),a=i._dirname,s=(i._exit,i._file_read),u=i._file_write,l=i._override_set,c=i._path_join,f=i._msg_info,d=(i._msg_info_obj,i._msg_error),p=i._require,h=i._sleep,_=(await p("ethers")).ethers.formatEther,g=(n(7785)._wallet_get,n(9341)),y=g._provider_get,m=g._msg_info_provider_generated;async function w(e,t,n,r,o,i,l,f,p){let g,w,v,b,k,E,S,A,T,R,x;for(void 0!==p&&""!=p||(p="n"),void 0!==i&&""!=i||(i="price"),void 0!==f&&""!=f||(f=3),f=Number(f),void 0!==n&&""!=n||(n="wei"),_timeout=1e5,S=0,A=!1,R="",T=a(r),x=[T,"wallet.dat"],_wallet_path=c(x),E=[e],null==l&&(l=""),""!=t&&(_api_key=s(t),E.push(_api_key)),E.push(_timeout),_provider=await y.apply(null,E),m(_provider);0==A&&S<f;)try{g=await _provider.getFeeData(),"y"==p&&console.log(g),"price"==i?k=g.gasPrice:"fee"==i?k=g.maxFeePerGas:"priority"==i&&(k=g.maxPriorityFeePerGas),"wei"==n?v=k:"ether"==n&&(b=_(k),v=b),""!=l&&u(l,v.toString()),A=!0}catch(e){S+=1,w=`Error retrieving gas price, retrying (${S} of ${f})`,console.error(e),d(w,0),await h(3e3)}if(0==A&&S==f)throw"Error retrieving balance.";return v}function v(){let e,t;for(e of(t=[` Wallet seed: ${wallet_seed}`,` Target network: ${target_network}`,` API Key: ${api_key}`,` Target address: ${target_address}`,` Display unit: ${display_unit}`,` Output type: ${output_type}`,` Output file: ${output_file}`,` Maximum retries: ${retries_max}`],t))f(e)}function b(e){let t,n;for(t of(n=["Usage:"," price-gas-get"," <quiet>"," <target-network>"," (<api-keys-path)"," (<display-unit>)"," (<seed-path>)"," (<target-address>)"," (<output-type>)"," (<output-file>)"," (<retries-max>)","","Arguments:"," <target-network> Name of the network to connect to.","","Optional arguments:"," <api-key-path> Path on disk of the API key for"," the network service provider."," <display-unit> Can be 'wei' or 'ether'.",` Default: '${display_unit}'`," <seed-path> Path on disk of the file"," containing the seed phrase."," <target-address> Address for which to return"," the gas price (not used)."," Default: the wallet address."," corresponding to the seed."," <output-type> Type of price output to return.",` Default: '${output_type}'`," <output-file> File in which to save the balance.",` Default: '${output_file}'`," <retries-max> Maximum number of retries.",` Default: ${retries_max}`],n))console.log(t);process.exit(e)}function k(){let e;quiet="y",process.argv.forEach(function(e,t,n){2==t&&(quiet=e),3==t&&(target_network=e),4==t&&(api_key=e),5==t&&(display_unit=e),6==t&&(target_address=e),7==t&&(wallet_seed=e),8==t&&(output_type=e),9==t&&(output_file=e),10==t&&(retries_max=e),"-h"!=e&&"--help"!=e||(quiet="n",b(0))}),""==target_network&&(e="No input network given.",d("No input network given.",1),l("display","unit","wei"),l("output","type","price"),l("retries","max","1"),b(1))}async function E(e){let t;try{t=await w.apply(null,e)}catch(e){d(e,1),process.exit(1)}}_cmdline_check("price-gas-get")&&(app_name="price-gas-get",app_opts=[],wallet_seed="",target_network="",api_key="",target_address="",display_unit="",output_type="",output_file="",retries_max="",quiet="",k(),v(),app_opts=[target_network,api_key,display_unit,wallet_seed,target_address,output_type,output_file,retries_max],E(app_opts)),e.exports={_price_gas_get:w},o()}catch(S){o(S)}},1)},108(e,t,n){const r=n(8368),o=r._dirname,i=r._exit,a=r._file_read,s=r._file_write,u=r._override_set,l=r._path_join,c=r._msg_info,f=(r._msg_info_obj,r._msg_error),d=r._sleep,p=n(9341)._provider_get,h=(n(7785)._wallet_get,n(8119)._price_gas_get);async function _(e,t,n,r,i,u,_,g){let y,m,w,v,b,k,E,S,A,T;for(v=[],void 0!==t&&""!=t||(y=`No selection mode set. Setting '${t="auto"}'.`,c(y)),"undefined"!=typeof _output_type&&""!=_output_type||(_output_type="price"),g=void 0===g||""==g?3:Number(g),void 0!==r&&""!=r||(r="ether"),_timeout=1e5,k=0,E=!1,A="",S=o(i),T=[S,"wallet.dat"],_wallet_path=l(T),b=[e],null==_&&(_=""),""!=n&&(_api_key=a(n),b.push(_api_key)),b.push(_timeout),_provider=await p.apply(null,b),_msg_info_provider_generated(_provider);0==E&&k<g;)try{v.push(e,n,r,i,u,_output_type,"",g),m=await h.apply(null,v),y=`Got gas price '${m}' ${r} of output type '${_output_type}' for network '${e}'.`,c(y),m=Number(m),"auto"==t&&(t="rpc"),"simple"==t?w=Math.floor(12*m/10):"fast"==t?w=Math.floor(20*m/10):"nextblock"==t?w=Math.floor(50*m/10):"rpc"==t?w=m:(y=`Unknown selection mode '${t}'.`,f(y,1)),""!=_&&s(_,w.toString()),E=!0}catch(e){k+=1,y=`Error retrieving gas price, retrying (${k} of ${g})`,console.error(e),f(y,0),await d(3e3)}if(0==E&&k==g)throw"Error retrieving balance.";return w}function g(e){let t,n;for(t of(n=["Usage:"," price-gas-transaction-get"," <quiet>"," <target-network>"," (<selection-mode>)"," (<api-keys-path)"," (<display-unit>)"," (<seed-path>)"," (<target-address>)"," (<output-type>)"," (<output-file>)"," (<retries-max>)","","Arguments:"," <target-network> Name of the network to connect to."," <selection-mode> Can be 'simple'.",` Default: '${selection_mode}'`,"","Optional arguments:"," <api-key-path> Path on disk of the API key for"," the network service provider."," <display-unit> Can be 'wei' or 'ether'.",` Default: '${display_unit}'`," <seed-path> Path on disk of the file"," containing the seed phrase."," <target-address> Address for which to return"," the gas price (not used)."," Default: the wallet address."," corresponding to the seed."," <output-type> Type of price output to return.",` Default: '${output_type}'`," <output-file> File in which to save the balance.",` Default: '${output_file}'`," <retries-max> Maximum number of retries.",` Default: ${retries_max}`],n))console.log(t);i(e)}_cmdline_check("price-gas-transaction-get")&&(app_name="price-gas-transaction-get",app_opts=[],selection_mode="",wallet_seed="",target_network="",api_key="",target_address="",display_unit="",output_type="",output_file="",retries_max="",quiet="",quiet="y",process.argv.forEach(function(e,t,n){2==t&&(quiet=e),3==t&&(target_network=e),4==t&&(selection_mode=e),5==t&&(api_key=e),6==t&&(display_unit=e),7==t&&(target_address=e),8==t&&(wallet_seed=e),9==t&&(output_type=e),10==t&&(output_file=e),11==t&&(retries_max=e),"-h"!=e&&"--help"!=e||(quiet="n",g(0))}),""==target_network&&(_msg="No input network given.",f(_msg,1),u("selection","mode","simple"),u("display","unit","wei"),u("output","type","price"),u("retries","max","1"),g(1)),function(){let e;const t=[`${app_name} configuration:`,` Display unit: ${display_unit}`,` Selection mode: ${selection_mode}`,` Output type: ${output_type}`,` Output file: ${output_file}`,"Credentials options:",` Wallet seed: ${wallet_seed}`,` Target address: ${target_address}`," Network options:",` Target network: ${target_network}`,` API Key: ${api_key}`,` Maximum retries: ${retries_max}`];for(e of t)c(e)}(),app_opts=[target_network,selection_mode,api_key,display_unit,wallet_seed,target_address,output_type,output_file,retries_max],async function(e){let t;try{t=await _.apply(null,e),console.log(t.toString())}catch(e){f(e,1)}}(app_opts)),e.exports={_price_gas_transaction_get:_}},7439(e,t,n){"use strict";n.a(e,async(r,o)=>{try{n.r(t),e=n.hmd(e);const i=n(8368),a=i._dirname,s=i._exit,u=i._file_exists,l=i._file_write,c=i._msg_info,f=(i._msg_info_obj,i._msg_error),d=i._require,p=await d("ethers");_ethers=p.ethers;const h=_ethers.Wallet;function _(e){f(`The directory '${e}' does not exist.`,1)}function g(e){c(`Writing seed to '${e}'.`)}function y(e){c(`Seed written to '${e}'.`)}function m(e){const t=h.createRandom().mnemonic.phrase;if(""!=e){const n=a(e);u(n)?"y"!=quiet&&g(e):_(n),l(e,t),"y"!=quiet&&y(e)}else console.log(t)}function w(e){let t;const n=["Usage:"," mkseed"," ( <path> )"," ( <verbose> )"];for(t of n)c(t);s(e)}function v(){quiet="y",process.argv.forEach(function(e,t,n){2==t&&(seed_path=e),3==t&&(quiet=e)}),"-h"==seed_path&&w(0)}(_cmdline_check("seed-new")||_cmdline_check("mkseed"))&&(app_name="seed-new",seed_path="",quiet="",v(),app_opts=[seed_path],m.apply(null,app_opts)),e.exports={_mkseed:m},o()}catch(b){o(b)}},1)},7785(e,t,n){"use strict";n.a(e,async(r,o)=>{try{n.r(t),e=n.hmd(e);const i=n(8368),a=i._cmdline_check,s=i._exit,u=(i._msg_info,i._msg_info_obj),l=i._msg_error,c=i._file_exists,f=i._file_read,d=i._require,p=(await d("ethers")).ethers.HDNodeWallet;function h(e){let t;if(t=c(e),1==t)throw{error:`Wallet '${e}' already exists.`}}function _(e,t){let n,r;"file"==t?(n="Seed file",r=e):"string"!=t&&"array"!=t||(n="Seed phrase",r="****"),u(n,r)}function g(e){const t={error:`Seed has unspecified value '${e}'.`};throw m(),t}function y(e){let t,n;if(t=typeof e,"undefined"==t||""==e||e==[])g(e);else if(c(e))t="file",_phrase=f(e),n=_phrase.split(" "),_seed_is_phrase=12==n.length||24==n.length,_seed_is_phrase||(_msg="The seed phrase is encrypted, OpenPGP on Ethereum decryption not implemented.",l(_msg,1));else{"string"==t?n=e.split(" "):"object"==t?n=e:(_msg=`Unknown seed type '${t}'.`,l(_msg,1));const r=12==n.length||24==n.length;if("string"==t&&r)_phrase=e;else{if("object"!=t||!r)throw _msg=`The seed '${e}' has type '${t}', it's not a valid path and it does not contain a valid phrase.`,{error:_msg};_phrase=e.join(" ")}}return _(e,t),_phrase}function m(e){let t;const n=["Returns a wallet object.",""," usage:"," await _wallet_get("," _path"," _password,"," _seed,"," _provider,"," _wallet,"," _verbose);",""];for(t of n)console.log(t);s(e)}function w(e,t,n,r,o,i){let a;a="",void 0!==i&&""!=i||(i="n"),void 0!==t&&""==t||(a="****"),void 0!==n&&""!=n&&n!=[]||void 0!==o&&""!=o&&o!={}||g(n),"y"==i&&(u("Wallet path",e),""!=a&&u("Wallet password",a)),h(e);const s=y(n);return(o=p.fromPhrase(s)).provider=r,_signer=o.connect(r),_signer}a("wallet-get")&&(app_name="wallet-get",app_opts=[]),e.exports={_wallet_get:w},o()}catch(v){o(v)}},1)},263(e,t,n){const r=n(8368),o=r._cmdline_check,i=r._exit,a=r._msg_info,s=r._msg_info_obj,u=r._msg_error,l=n(9341);_provider_get=l._provider_get;const c=n(7785);async function f(e,t,n,r,o){let i,a;if(a=await _provider_get(r,o),"string"==typeof n){const e=n.split(" ").length;12!=e&&24!=e&&s("Seed path",n)}return""!=e&&s("Wallet path",e),i="",""!=t&&(i="****",s("Wallet password",i)),_wallet=_wallet_get(e,t,n,a),_wallet}_wallet_get=c._wallet_get,o("wallet-new")&&(app_name="wallet-new",app_opts=[],wallet_path="",wallet_password="",wallet_seed="",target_network="",api_key_path="",quiet="",quiet="y",process.argv.forEach(function(e,t,n){2==t&&(wallet_path=e),3==t&&(wallet_password=e),4==t&&(wallet_seed=e),5==t&&(target_network=e),6==t&&(api_key_path=e),6==t&&(quiet=e)}),""==wallet_path&&(u("No wallet path specified.",0),function(){let e;const t=["Usage:"," Returns a Wallet object.",""," wallet-new"," <path>"," <password>"," <seed>"," <network>"," <api-key-path>"," <quiet>","","Arguments:"," <path> Wallet path."," <password> Wallet password path"," <seed> Seed file path."," <network> Network RPC."," <api-key-path> Path on disk of the API key for"," the network service provider."," <quiet> Whether to display additional output.",` Default: ${quiet}`,""];for(e of t)a(e);-1<i&&i(1)}()),""==target_network&&(target_network="gnosis"),app_opts=[wallet_path,wallet_password,wallet_seed,target_network,api_key_path,quiet],async function(e){let t;t=await f.apply(null,e),console.log(t)}(app_opts)),e.exports={_wallet_new:f}},3182(e,t,n){const r=n(8368),o=(r._cat,r._file_read,r._file_exists,r._homedir_get,r._mkdir,r._msg_info,r._msg_error,r._path_join,r._require,r._stat,n(2768)._address_get,n(6500)),i=(o._balance_check,o._msg_error_balance_insufficient,n(9712)._balance_get,n(7838)._balance_send,n(8605)._block_number_get),a=(n(2574)._ethers_to_wei,n(9341));a._msg_info_provider_generated,a._provider_get,a._target_networks_check,n(8119)._price_gas_get,n(108)._price_gas_transaction_get,n(7439)._seed_new,n(7785)._wallet_get,n(263)._wallet_new,e.exports={_block_number_get:i}},251(e,t){t.read=function(e,t,n,r,o){var i,a,s=8*o-r-1,u=(1<<s)-1,l=u>>1,c=-7,f=n?o-1:0,d=n?-1:1,p=e[t+f];for(f+=d,i=p&(1<<-c)-1,p>>=-c,c+=s;c>0;i=256*i+e[t+f],f+=d,c-=8);for(a=i&(1<<-c)-1,i>>=-c,c+=r;c>0;a=256*a+e[t+f],f+=d,c-=8);if(0===i)i=1-l;else{if(i===u)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),i-=l}return(p?-1:1)*a*Math.pow(2,i-r)},t.write=function(e,t,n,r,o,i){var a,s,u,l=8*i-o-1,c=(1<<l)-1,f=c>>1,d=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:i-1,h=r?1:-1,_=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+f>=1?d/u:d*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=c?(s=0,a=c):a+f>=1?(s=(t*u-1)*Math.pow(2,o),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;e[n+p]=255&s,p+=h,s/=256,o-=8);for(a=a<<o|s,l+=o;l>0;e[n+p]=255&a,p+=h,a/=256,l-=8);e[n+p-h]|=128*_}},6698(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},4136(e,t,n){const r=n(8368);_homedir_get=r._homedir_get,_msg_error=r._msg_error,_msg_info=r._msg_info,_path_join=r._path_join,_require=r._require;const o=_require("evm-chains-info");_evm_chains_db_path_get=o._evm_chains_db_path_get,_rpc_backend_get=o._rpc_backend_get,_evm_chain_info_get=o._evm_chain_info_get,_evm_chains_info=o._evm_chains_info,e.exports={_rpc_get:function(e){let t,n,r,o,i;const a={};for(o of e)i=typeof o,"string"==i?o.startsWith("https://")?(a[o]=o,n="n"):n="y":"number"==i?n="y":(r=`Unknown type '${i}' for network variable.`,_msg_error(r,1)),"y"==n&&(t=["get","id","rpc","offline",["node","system"],"kirsh","n","n",o,[]],a[o]=_evm_chains_info.apply(null,t)[0]);return a}}},6010(e,t,n){"use strict";n.a(e,async(e,r)=>{try{n.r(t),n.d(t,{ABORT_ERROR:()=>o.ABORT_ERROR,CURRENT_DIR:()=>o.CURRENT_DIR,NOT_FOUND_ERROR:()=>o.NOT_FOUND_ERROR,ROOT_DIR:()=>o.ROOT_DIR,TIMEOUT_ERROR:()=>o.TIMEOUT_ERROR,TMP_DIR:()=>o.TMP_DIR,appendFile:()=>o.appendFile,appendFileSync:()=>o.appendFileSync,assertAbsolutePath:()=>o.assertAbsolutePath,assertFileUrl:()=>o.assertFileUrl,connectSyncAgent:()=>o.connectSyncAgent,copy:()=>o.copy,copySync:()=>o.copySync,createFile:()=>o.createFile,createFileSync:()=>o.createFileSync,default:()=>o,deleteTemp:()=>o.deleteTemp,deleteTempSync:()=>o.deleteTempSync,downloadFile:()=>o.downloadFile,emptyDir:()=>o.emptyDir,emptyDirSync:()=>o.emptyDirSync,exists:()=>o.exists,existsSync:()=>o.existsSync,generateTempPath:()=>o.generateTempPath,getFileDataByHandle:()=>o.getFileDataByHandle,getSyncMessenger:()=>o.getSyncMessenger,isDirectoryHandle:()=>o.isDirectoryHandle,isFileHandle:()=>o.isFileHandle,isFileHandleLike:()=>o.isFileHandleLike,isOPFSSupported:()=>o.isOPFSSupported,isTempPath:()=>o.isTempPath,mkTemp:()=>o.mkTemp,mkTempSync:()=>o.mkTempSync,mkdir:()=>o.mkdir,mkdirSync:()=>o.mkdirSync,move:()=>o.move,moveSync:()=>o.moveSync,pruneTemp:()=>o.pruneTemp,pruneTempSync:()=>o.pruneTempSync,readBlobFile:()=>o.readBlobFile,readBlobFileSync:()=>o.readBlobFileSync,readDir:()=>o.readDir,readDirSync:()=>o.readDirSync,readFile:()=>o.readFile,readFileSync:()=>o.readFileSync,readJsonFile:()=>o.readJsonFile,readJsonFileSync:()=>o.readJsonFileSync,readTextFile:()=>o.readTextFile,readTextFileSync:()=>o.readTextFileSync,remove:()=>o.remove,removeSync:()=>o.removeSync,setSyncMessenger:()=>o.setSyncMessenger,startSyncAgent:()=>o.startSyncAgent,stat:()=>o.stat,statSync:()=>o.statSync,toFileSystemHandleLike:()=>o.toFileSystemHandleLike,unzip:()=>o.unzip,unzipFromUrl:()=>o.unzipFromUrl,unzipSync:()=>o.unzipSync,uploadFile:()=>o.uploadFile,writeFile:()=>o.writeFile,writeFileSync:()=>o.writeFileSync,zip:()=>o.zip,zipFromUrl:()=>o.zipFromUrl,zipSync:()=>o.zipSync});var o=n(7516);const i=await Promise.resolve().then(()=>n(7516));await o;const a=await n.e(866).then(()=>n.t(7866,23)),s=(await n.e(949).then(()=>n(2949))).file,u=i.mkTemp,l=i.mkTempSync,c=function(e,t){return s(e).createReader()};function f(e,t){return s(e).createWriter()}const d=f;function p(e){return void 0===e&&(e="fs-worker.js"),new a(e)}const h=p;async function _(e,t,n){return void 0===e&&(e="fs-worker.js"),"number"!=typeof t&&(t=10485760),"number"!=typeof n&&(n=10485760),(0,i.connectSyncAgent)({worker:p(e),bufferLength:t,opTimeout:n})}const g=_;function y(e){return i.readDirSync.apply(null,[e]).unwrap()}const m=y;function w(e){return i.moveSync.apply(null,e).unwrap()}const v=w;function b(e){return i.removeSync.apply(null,e).unwrap()}const k=b;function E(e,t){const n=`chmod '${t}' on '${e}'.`;console.log(n)}const S=E,A=E;async function T(e,t){console.log(e)}const R=T,x=R;async function O(e){return void 0!==e&&""!=e&&e!={}||(e=await Promise.resolve().then(()=>n(7516))),function(t){return e.copySync.apply(null,[t]).unwrap()}}const $=await O(i),C=i.copy,j=$,L=i.copy,N=i.cpSync;n.d(t,["chmod",0,S,"chmodSync",0,A,"chown",0,R,"chownSync",0,x,"copyFile",0,C,"copyFileSync",0,j,"cp",0,L,"cpSync",0,N,"createReadStream",0,c,"createWriteStream",0,d,"fsWorkerNew",0,h,"fsWorkerStart",0,g,"mkdtemp",0,u,"mkdtempSync",0,l,"readdirSync",0,m,"renameSync",0,v,"rmSync",0,k]),r()}catch(P){r(P)}},1)},8272(e,t,n){function r(){let e,t;const r=["_fs","_fs_module","fs","fs_module"],o=function(){let e;return"undefined"==typeof window&&void 0!==n.g&&(n.g.global,n.g),"undefined"!=typeof window&&(e=window),e}();for(t of(e=!1,r))if(t in o){_fs_module=o[t],e=!0;break}return e||(_fs_module=n(4962)),_fs_module}function o(e){void 0!==e&&""!=e||(e=r());const t={};return t.argv=a,t.chdir=u,t.cwd=s,t.exit=l,t}function i(e){let t;return""!=e&&void 0!==e||(e=r()),"undefined"==typeof window&&void 0!==n.g&&n.g.global===n.g&&"function"!=typeof n||(t=o(e)),t}function a(e){let t,n,r,o,i,a,s,u;void 0!==e&&""!=e&&null!=e||(e="");const l=[];for(i=window.location,s=i.search.substring(1),n=s.split("&"),a=0;a<n.length;a++)t=n[a],o=t.split("="),r=o[0],r.length<2?l.push(`-${r}`):l.push(`--${r}`),r!=e&&""!=e||(u=o[1],l.push(u));return l}function s(e){return void 0!==e&&""!=e||(e=r()),e.CURRENT_DIR}function u(e,t){let n;return void 0!==t&&""!=t||(t=r()),(0,t.isDir)(e)?(t.CURRENT_DIR=e,n=!0):(n=!1,_msg_error(`Directory '${e}' does not exist.`,0)),n}function l(e){return e}_fs_module=r();const c=i(_fs_module);e.exports=c,e.exports.getModule=function(e){let t;if(_fs_module=r(),""==e||void 0===e)t=i(_fs_module);else if("process-browserify"==e)t=o(_fs_module);else if("node:process"==e)t=n(6167)(e),t.browser=!1;else{if("process"!=e){const t="Unknown process module "+`'${e}'.`.const;throw _error={msg:t},console.error(t),_error}t=i(_fs_module)}return t}},6167(e){function t(e){const t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=6167,e.exports=t},6048(e){"use strict";var t={};function n(e,n,r){r||(r=Error);var o=function(e){var t,r;function o(t,r,o){return e.call(this,function(e,t,r){return"string"==typeof n?n:n(e,t,r)}(t,r,o))||this}return r=e,(t=o).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r,o}(r);o.prototype.name=r.name,o.prototype.code=e,t[e]=o}function r(e,t){if(Array.isArray(e)){var n=e.length;return e=e.map(function(e){return String(e)}),n>2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}n("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError),n("ERR_INVALID_ARG_TYPE",function(e,t,n){var o,i,a,s,u;if("string"==typeof t&&(i="not ",t.substr(0,4)===i)?(o="must not be",t=t.replace(/^not /,"")):o="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-9,n)===t}(e," argument"))a="The ".concat(e," ").concat(o," ").concat(r(t,"type"));else{var l=("number"!=typeof u&&(u=0),u+1>(s=e).length||-1===s.indexOf(".",u)?"argument":"property");a='The "'.concat(e,'" ').concat(l," ").concat(o," ").concat(r(t,"type"))}return a+". Received type ".concat(typeof n)},TypeError),n("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),n("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"}),n("ERR_STREAM_PREMATURE_CLOSE","Premature close"),n("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"}),n("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),n("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),n("ERR_STREAM_WRITE_AFTER_END","write after end"),n("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),n("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError),n("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.F=t},5382(e,t,n){"use strict";var r=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=l;var o=n(5412),i=n(6708);n(6698)(l,o);for(var a=r(i.prototype),s=0;s<a.length;s++){var u=a[s];l.prototype[u]||(l.prototype[u]=i.prototype[u])}function l(e){if(!(this instanceof l))return new l(e);o.call(this,e),i.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",c)))}function c(){this._writableState.ended||process.nextTick(f,this)}function f(e){e.end()}Object.defineProperty(l.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(l.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(l.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(l.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})},3600(e,t,n){"use strict";e.exports=o;var r=n(4610);function o(e){if(!(this instanceof o))return new o(e);r.call(this,e)}n(6698)(o,r),o.prototype._transform=function(e,t,n){n(null,e)}},5412(e,t,n){"use strict";var r;e.exports=S,S.ReadableState=E,n(7007).EventEmitter;var o,i=function(e,t){return e.listeners(t).length},a=n(345),s=n(8287).Buffer,u=(void 0!==n.g?n.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},l=n(9838);o=l&&l.debuglog?l.debuglog("stream"):function(){};var c,f,d,p=n(2726),h=n(5896),_=n(5291).getHighWaterMark,g=n(6048).F,y=g.ERR_INVALID_ARG_TYPE,m=g.ERR_STREAM_PUSH_AFTER_EOF,w=g.ERR_METHOD_NOT_IMPLEMENTED,v=g.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;n(6698)(S,a);var b=h.errorOrDestroy,k=["error","close","destroy","pause","resume"];function E(e,t,o){r=r||n(5382),e=e||{},"boolean"!=typeof o&&(o=t instanceof r),this.objectMode=!!e.objectMode,o&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=_(this,e,"readableHighWaterMark",o),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(c||(c=n(3141).I),this.decoder=new c(e.encoding),this.encoding=e.encoding)}function S(e){if(r=r||n(5382),!(this instanceof S))return new S(e);var t=this instanceof r;this._readableState=new E(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),a.call(this)}function A(e,t,n,r,i){o("readableAddChunk",t);var a,l=e._readableState;if(null===t)l.reading=!1,function(e,t){if(o("onEofChunk"),!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,t.sync?O(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,$(e)))}}(e,l);else if(i||(a=function(e,t){var n,r;return r=t,s.isBuffer(r)||r instanceof u||"string"==typeof t||void 0===t||e.objectMode||(n=new y("chunk",["string","Buffer","Uint8Array"],t)),n}(l,t)),a)b(e,a);else if(l.objectMode||t&&t.length>0)if("string"==typeof t||l.objectMode||Object.getPrototypeOf(t)===s.prototype||(t=function(e){return s.from(e)}(t)),r)l.endEmitted?b(e,new v):T(e,l,t,!0);else if(l.ended)b(e,new m);else{if(l.destroyed)return!1;l.reading=!1,l.decoder&&!n?(t=l.decoder.write(t),l.objectMode||0!==t.length?T(e,l,t,!1):C(e,l)):T(e,l,t,!1)}else r||(l.reading=!1,C(e,l));return!l.ended&&(l.length<l.highWaterMark||0===l.length)}function T(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",n)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&O(e)),C(e,t)}Object.defineProperty(S.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),S.prototype.destroy=h.destroy,S.prototype._undestroy=h.undestroy,S.prototype._destroy=function(e,t){t(e)},S.prototype.push=function(e,t){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof e&&((t=t||r.defaultEncoding)!==r.encoding&&(e=s.from(e,t),t=""),n=!0),A(this,e,t,!1,n)},S.prototype.unshift=function(e){return A(this,e,null,!0,!1)},S.prototype.isPaused=function(){return!1===this._readableState.flowing},S.prototype.setEncoding=function(e){c||(c=n(3141).I);var t=new c(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,o="";null!==r;)o+=t.write(r.data),r=r.next;return this._readableState.buffer.clear(),""!==o&&this._readableState.buffer.push(o),this._readableState.length=o.length,this};var R=1073741824;function x(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=R?e=R:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function O(e){var t=e._readableState;o("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(o("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick($,e))}function $(e){var t=e._readableState;o("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,U(e)}function C(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(j,e,t))}function j(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var n=t.length;if(o("maybeReadMore read 0"),e.read(0),n===t.length)break}t.readingMore=!1}function L(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function N(e){o("readable nexttick read 0"),e.read(0)}function P(e,t){o("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),U(e),t.flowing&&!t.reading&&e.read(0)}function U(e){var t=e._readableState;for(o("flow",t.flowing);t.flowing&&null!==e.read(););}function D(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n);var n}function M(e){var t=e._readableState;o("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(F,t,e))}function F(e,t){if(o("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var n=t._writableState;(!n||n.autoDestroy&&n.finished)&&t.destroy()}}function I(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}S.prototype.read=function(e){o("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return o("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?M(this):O(this),null;if(0===(e=x(e,t))&&t.ended)return 0===t.length&&M(this),null;var r,i=t.needReadable;return o("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&o("length less than watermark",i=!0),t.ended||t.reading?o("reading or ended",i=!1):i&&(o("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=x(n,t))),null===(r=e>0?D(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&M(this)),null!==r&&this.emit("data",r),r},S.prototype._read=function(e){b(this,new w("_read()"))},S.prototype.pipe=function(e,t){var n=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=e;break;case 1:r.pipes=[r.pipes,e];break;default:r.pipes.push(e)}r.pipesCount+=1,o("pipe count=%d opts=%j",r.pipesCount,t);var a=t&&!1===t.end||e===process.stdout||e===process.stderr?h:s;function s(){o("onend"),e.end()}r.endEmitted?process.nextTick(a):n.once("end",a),e.on("unpipe",function t(i,a){o("onunpipe"),i===n&&a&&!1===a.hasUnpiped&&(a.hasUnpiped=!0,o("cleanup"),e.removeListener("close",d),e.removeListener("finish",p),e.removeListener("drain",u),e.removeListener("error",f),e.removeListener("unpipe",t),n.removeListener("end",s),n.removeListener("end",h),n.removeListener("data",c),l=!0,!r.awaitDrain||e._writableState&&!e._writableState.needDrain||u())});var u=function(e){return function(){var t=e._readableState;o("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&i(e,"data")&&(t.flowing=!0,U(e))}}(n);e.on("drain",u);var l=!1;function c(t){o("ondata");var i=e.write(t);o("dest.write",i),!1===i&&((1===r.pipesCount&&r.pipes===e||r.pipesCount>1&&-1!==I(r.pipes,e))&&!l&&(o("false write response, pause",r.awaitDrain),r.awaitDrain++),n.pause())}function f(t){o("onerror",t),h(),e.removeListener("error",f),0===i(e,"error")&&b(e,t)}function d(){e.removeListener("finish",p),h()}function p(){o("onfinish"),e.removeListener("close",d),h()}function h(){o("unpipe"),n.unpipe(e)}return n.on("data",c),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",f),e.once("close",d),e.once("finish",p),e.emit("pipe",n),r.flowing||(o("pipe resume"),n.resume()),e},S.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<o;i++)r[i].emit("unpipe",this,{hasUnpiped:!1});return this}var a=I(t.pipes,e);return-1===a||(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n)),this},S.prototype.on=function(e,t){var n=a.prototype.on.call(this,e,t),r=this._readableState;return"data"===e?(r.readableListening=this.listenerCount("readable")>0,!1!==r.flowing&&this.resume()):"readable"===e&&(r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.flowing=!1,r.emittedReadable=!1,o("on readable",r.length,r.reading),r.length?O(this):r.reading||process.nextTick(N,this))),n},S.prototype.addListener=S.prototype.on,S.prototype.removeListener=function(e,t){var n=a.prototype.removeListener.call(this,e,t);return"readable"===e&&process.nextTick(L,this),n},S.prototype.removeAllListeners=function(e){var t=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||process.nextTick(L,this),t},S.prototype.resume=function(){var e=this._readableState;return e.flowing||(o("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick(P,e,t))}(this,e)),e.paused=!1,this},S.prototype.pause=function(){return o("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(o("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},S.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on("end",function(){if(o("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(i){o("wrapped data"),n.decoder&&(i=n.decoder.write(i)),n.objectMode&&null==i||(n.objectMode||i&&i.length)&&(t.push(i)||(r=!0,e.pause()))}),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var a=0;a<k.length;a++)e.on(k[a],this.emit.bind(this,k[a]));return this._read=function(t){o("wrapped _read",t),r&&(r=!1,e.resume())},this},"function"==typeof Symbol&&(S.prototype[Symbol.asyncIterator]=function(){return void 0===f&&(f=n(2955)),f(this)}),Object.defineProperty(S.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(S.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(S.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),S._fromList=D,Object.defineProperty(S.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(S.from=function(e,t){return void 0===d&&(d=n(5157)),d(S,e,t)})},4610(e,t,n){"use strict";e.exports=c;var r=n(6048).F,o=r.ERR_METHOD_NOT_IMPLEMENTED,i=r.ERR_MULTIPLE_CALLBACK,a=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=r.ERR_TRANSFORM_WITH_LENGTH_0,u=n(5382);function l(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(null===r)return this.emit("error",new i);n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var o=this._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}function c(e){if(!(this instanceof c))return new c(e);u.call(this,e),this._transformState={afterTransform:l.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",f)}function f(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?d(this,null,null):this._flush(function(t,n){d(e,t,n)})}function d(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new s;if(e._transformState.transforming)throw new a;return e.push(null)}n(6698)(c,u),c.prototype.push=function(e,t){return this._transformState.needTransform=!1,u.prototype.push.call(this,e,t)},c.prototype._transform=function(e,t,n){n(new o("_transform()"))},c.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var o=this._readableState;(r.needTransform||o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}},c.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},c.prototype._destroy=function(e,t){u.prototype._destroy.call(this,e,function(e){t(e)})}},6708(e,t,n){"use strict";function r(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t){var n=e.entry;for(e.entry=null;n;){var r=n.callback;t.pendingcb--,r(void 0),n=n.next}t.corkedRequestsFree.next=e}(t,e)}}var o;e.exports=S,S.WritableState=E;var i,a={deprecate:n(4643)},s=n(345),u=n(8287).Buffer,l=(void 0!==n.g?n.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},c=n(5896),f=n(5291).getHighWaterMark,d=n(6048).F,p=d.ERR_INVALID_ARG_TYPE,h=d.ERR_METHOD_NOT_IMPLEMENTED,_=d.ERR_MULTIPLE_CALLBACK,g=d.ERR_STREAM_CANNOT_PIPE,y=d.ERR_STREAM_DESTROYED,m=d.ERR_STREAM_NULL_VALUES,w=d.ERR_STREAM_WRITE_AFTER_END,v=d.ERR_UNKNOWN_ENCODING,b=c.errorOrDestroy;function k(){}function E(e,t,i){o=o||n(5382),e=e||{},"boolean"!=typeof i&&(i=t instanceof o),this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=f(this,e,"writableHighWaterMark",i),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===e.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,r=n.sync,o=n.writecb;if("function"!=typeof o)throw new _;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,r,o){--t.pendingcb,n?(process.nextTick(o,r),process.nextTick($,e,t),e._writableState.errorEmitted=!0,b(e,r)):(o(r),e._writableState.errorEmitted=!0,b(e,r),$(e,t))}(e,n,r,t,o);else{var i=x(n)||e.destroyed;i||n.corked||n.bufferProcessing||!n.bufferedRequest||R(e,n),r?process.nextTick(T,e,n,i,o):T(e,n,i,o)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new r(this)}function S(e){var t=this instanceof(o=o||n(5382));if(!t&&!i.call(S,this))return new S(e);this._writableState=new E(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),s.call(this)}function A(e,t,n,r,o,i,a){t.writelen=r,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new y("write")):n?e._writev(o,t.onwrite):e._write(o,i,t.onwrite),t.sync=!1}function T(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),$(e,t)}function R(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var o=t.bufferedRequestCount,i=new Array(o),a=t.corkedRequestsFree;a.entry=n;for(var s=0,u=!0;n;)i[s]=n,n.isBuf||(u=!1),n=n.next,s+=1;i.allBuffers=u,A(e,t,!0,t.length,i,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new r(t),t.bufferedRequestCount=0}else{for(;n;){var l=n.chunk,c=n.encoding,f=n.callback;if(A(e,t,!1,t.objectMode?1:l.length,l,c,f),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function x(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function O(e,t){e._final(function(n){t.pendingcb--,n&&b(e,n),t.prefinished=!0,e.emit("prefinish"),$(e,t)})}function $(e,t){var n=x(t);if(n&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,process.nextTick(O,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var r=e._readableState;(!r||r.autoDestroy&&r.endEmitted)&&e.destroy()}return n}n(6698)(S,s),E.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(E.prototype,"buffer",{get:a.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(i=Function.prototype[Symbol.hasInstance],Object.defineProperty(S,Symbol.hasInstance,{value:function(e){return!!i.call(this,e)||this===S&&e&&e._writableState instanceof E}})):i=function(e){return e instanceof this},S.prototype.pipe=function(){b(this,new g)},S.prototype.write=function(e,t,n){var r,o=this._writableState,i=!1,a=!o.objectMode&&(r=e,u.isBuffer(r)||r instanceof l);return a&&!u.isBuffer(e)&&(e=function(e){return u.from(e)}(e)),"function"==typeof t&&(n=t,t=null),a?t="buffer":t||(t=o.defaultEncoding),"function"!=typeof n&&(n=k),o.ending?function(e,t){var n=new w;b(e,n),process.nextTick(t,n)}(this,n):(a||function(e,t,n,r){var o;return null===n?o=new m:"string"==typeof n||t.objectMode||(o=new p("chunk",["string","Buffer"],n)),!o||(b(e,o),process.nextTick(r,o),!1)}(this,o,e,n))&&(o.pendingcb++,i=function(e,t,n,r,o,i){if(!n){var a=function(e,t,n){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=u.from(t,n)),t}(t,r,o);r!==a&&(n=!0,o="buffer",r=a)}var s=t.objectMode?1:r.length;t.length+=s;var l=t.length<t.highWaterMark;if(l||(t.needDrain=!0),t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:o,isBuf:n,callback:i,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else A(e,t,!1,s,r,o,i);return l}(this,o,a,e,t,n)),i},S.prototype.cork=function(){this._writableState.corked++},S.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||R(this,e))},S.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new v(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(S.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(S.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),S.prototype._write=function(e,t,n){n(new h("_write()"))},S.prototype._writev=null,S.prototype.end=function(e,t,n){var r=this._writableState;return"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||function(e,t,n){t.ending=!0,$(e,t),n&&(t.finished?process.nextTick(n):e.once("finish",n)),t.ended=!0,e.writable=!1}(this,r,n),this},Object.defineProperty(S.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(S.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),S.prototype.destroy=c.destroy,S.prototype._undestroy=c.undestroy,S.prototype._destroy=function(e,t){t(e)}},2955(e,t,n){"use strict";var r;function o(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var i=n(6238),a=Symbol("lastResolve"),s=Symbol("lastReject"),u=Symbol("error"),l=Symbol("ended"),c=Symbol("lastPromise"),f=Symbol("handlePromise"),d=Symbol("stream");function p(e,t){return{value:e,done:t}}function h(e){var t=e[a];if(null!==t){var n=e[d].read();null!==n&&(e[c]=null,e[a]=null,e[s]=null,t(p(n,!1)))}}function _(e){process.nextTick(h,e)}var g=Object.getPrototypeOf(function(){}),y=Object.setPrototypeOf((o(r={get stream(){return this[d]},next:function(){var e=this,t=this[u];if(null!==t)return Promise.reject(t);if(this[l])return Promise.resolve(p(void 0,!0));if(this[d].destroyed)return new Promise(function(t,n){process.nextTick(function(){e[u]?n(e[u]):t(p(void 0,!0))})});var n,r=this[c];if(r)n=new Promise(function(e,t){return function(n,r){e.then(function(){t[l]?n(p(void 0,!0)):t[f](n,r)},r)}}(r,this));else{var o=this[d].read();if(null!==o)return Promise.resolve(p(o,!1));n=new Promise(this[f])}return this[c]=n,n}},Symbol.asyncIterator,function(){return this}),o(r,"return",function(){var e=this;return new Promise(function(t,n){e[d].destroy(null,function(e){e?n(e):t(p(void 0,!0))})})}),r),g);e.exports=function(e){var t,n=Object.create(y,(o(t={},d,{value:e,writable:!0}),o(t,a,{value:null,writable:!0}),o(t,s,{value:null,writable:!0}),o(t,u,{value:null,writable:!0}),o(t,l,{value:e._readableState.endEmitted,writable:!0}),o(t,f,{value:function(e,t){var r=n[d].read();r?(n[c]=null,n[a]=null,n[s]=null,e(p(r,!1))):(n[a]=e,n[s]=t)},writable:!0}),t));return n[c]=null,i(e,function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=n[s];return null!==t&&(n[c]=null,n[a]=null,n[s]=null,t(e)),void(n[u]=e)}var r=n[a];null!==r&&(n[c]=null,n[a]=null,n[s]=null,r(p(void 0,!0))),n[l]=!0}),e.on("readable",_.bind(null,n)),n}},2726(e,t,n){"use strict";function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach(function(t){i(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function i(e,t,n){return(t=s(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,s(r.key),r)}}function s(e){var t=function(e){if("object"!=typeof e||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}var u=n(8287).Buffer,l=n(5340).inspect,c=l&&l.custom||"inspect";function f(e,t,n){u.prototype.copy.call(e,t,n)}e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t,n;return t=e,(n=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n}},{key:"concat",value:function(e){if(0===this.length)return u.alloc(0);for(var t=u.allocUnsafe(e>>>0),n=this.head,r=0;n;)f(n.data,t,r),r+=n.data.length,n=n.next;return t}},{key:"consume",value:function(e,t){var n;return e<this.head.data.length?(n=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):n=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,n=1,r=t.data;for(e-=r.length;t=t.next;){var o=t.data,i=e>o.length?o.length:e;if(i===o.length?r+=o:r+=o.slice(0,e),0===(e-=i)){i===o.length?(++n,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=o.slice(i));break}++n}return this.length-=n,r}},{key:"_getBuffer",value:function(e){var t=u.allocUnsafe(e),n=this.head,r=1;for(n.data.copy(t),e-=n.data.length;n=n.next;){var o=n.data,i=e>o.length?o.length:e;if(o.copy(t,t.length-e,0,i),0===(e-=i)){i===o.length?(++r,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=o.slice(i));break}++r}return this.length-=r,t}},{key:c,value:function(e,t){return l(this,o(o({},t),{},{depth:0,customInspect:!1}))}}])&&a(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}()},5896(e){"use strict";function t(e,t){r(e,t),n(e)}function n(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function r(e,t){e.emit("error",t)}e.exports={destroy:function(e,o){var i=this,a=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return a||s?(o?o(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(r,this,e)):process.nextTick(r,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!o&&e?i._writableState?i._writableState.errorEmitted?process.nextTick(n,i):(i._writableState.errorEmitted=!0,process.nextTick(t,i,e)):process.nextTick(t,i,e):o?(process.nextTick(n,i),o(e)):process.nextTick(n,i)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var n=e._readableState,r=e._writableState;n&&n.autoDestroy||r&&r.autoDestroy?e.destroy(t):e.emit("error",t)}}},6238(e,t,n){"use strict";var r=n(6048).F.ERR_STREAM_PREMATURE_CLOSE;function o(){}e.exports=function e(t,n,i){if("function"==typeof n)return e(t,null,n);n||(n={}),i=function(e){var t=!1;return function(){if(!t){t=!0;for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];e.apply(this,r)}}}(i||o);var a=n.readable||!1!==n.readable&&t.readable,s=n.writable||!1!==n.writable&&t.writable,u=function(){t.writable||c()},l=t._writableState&&t._writableState.finished,c=function(){s=!1,l=!0,a||i.call(t)},f=t._readableState&&t._readableState.endEmitted,d=function(){a=!1,f=!0,s||i.call(t)},p=function(e){i.call(t,e)},h=function(){var e;return a&&!f?(t._readableState&&t._readableState.ended||(e=new r),i.call(t,e)):s&&!l?(t._writableState&&t._writableState.ended||(e=new r),i.call(t,e)):void 0},_=function(){t.req.on("finish",c)};return function(e){return e.setHeader&&"function"==typeof e.abort}(t)?(t.on("complete",c),t.on("abort",h),t.req?_():t.on("request",_)):s&&!t._writableState&&(t.on("end",u),t.on("close",u)),t.on("end",d),t.on("finish",c),!1!==n.error&&t.on("error",p),t.on("close",h),function(){t.removeListener("complete",c),t.removeListener("abort",h),t.removeListener("request",_),t.req&&t.req.removeListener("finish",c),t.removeListener("end",u),t.removeListener("close",u),t.removeListener("finish",c),t.removeListener("end",d),t.removeListener("error",p),t.removeListener("close",h)}}},5157(e){e.exports=function(){throw new Error("Readable.from is not available in the browser")}},7758(e,t,n){"use strict";var r,o=n(6048).F,i=o.ERR_MISSING_ARGS,a=o.ERR_STREAM_DESTROYED;function s(e){if(e)throw e}function u(e){e()}function l(e,t){return e.pipe(t)}e.exports=function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];var c,f=function(e){return e.length?"function"!=typeof e[e.length-1]?s:e.pop():s}(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new i("streams");var d=t.map(function(e,o){var i=o<t.length-1;return function(e,t,o,i){i=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(i);var s=!1;e.on("close",function(){s=!0}),void 0===r&&(r=n(6238)),r(e,{readable:t,writable:o},function(e){if(e)return i(e);s=!0,i()});var u=!1;return function(t){if(!s&&!u)return u=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(e)?e.abort():"function"==typeof e.destroy?e.destroy():void i(t||new a("pipe"))}}(e,i,o>0,function(e){c||(c=e),e&&d.forEach(u),i||(d.forEach(u),f(c))})});return t.reduce(l)}},5291(e,t,n){"use strict";var r=n(6048).F.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,n,o){var i=function(e,t,n){return null!=e.highWaterMark?e.highWaterMark:t?e[n]:null}(t,o,n);if(null!=i){if(!isFinite(i)||Math.floor(i)!==i||i<0)throw new r(o?n:"highWaterMark",i);return Math.floor(i)}return e.objectMode?16:16384}}},345(e,t,n){e.exports=n(7007).EventEmitter},2861(e,t,n){var r=n(8287),o=r.Buffer;function i(e,t){for(var n in e)t[n]=e[n]}function a(e,t,n){return o(e,t,n)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=r:(i(r,t),t.Buffer=a),a.prototype=Object.create(o.prototype),i(o,a),a.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,n)},a.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=o(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},8310(e,t,n){e.exports=o;var r=n(7007).EventEmitter;function o(){r.call(this)}n(6698)(o,r),o.Readable=n(5412),o.Writable=n(6708),o.Duplex=n(5382),o.Transform=n(4610),o.PassThrough=n(3600),o.finished=n(6238),o.pipeline=n(7758),o.Stream=o,o.prototype.pipe=function(e,t){var n=this;function o(t){e.writable&&!1===e.write(t)&&n.pause&&n.pause()}function i(){n.readable&&n.resume&&n.resume()}n.on("data",o),e.on("drain",i),e._isStdio||t&&!1===t.end||(n.on("end",s),n.on("close",u));var a=!1;function s(){a||(a=!0,e.end())}function u(){a||(a=!0,"function"==typeof e.destroy&&e.destroy())}function l(e){if(c(),0===r.listenerCount(this,"error"))throw e}function c(){n.removeListener("data",o),e.removeListener("drain",i),n.removeListener("end",s),n.removeListener("close",u),n.removeListener("error",l),e.removeListener("error",l),n.removeListener("end",c),n.removeListener("close",c),e.removeListener("close",c)}return n.on("error",l),e.on("error",l),n.on("end",c),n.on("close",c),e.on("close",c),e.emit("pipe",n),e}},3141(e,t,n){"use strict";var r=n(2861).Buffer,o=r.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function i(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(r.isEncoding===o||!o(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=l,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=c,this.end=f,t=3;break;default:return this.write=d,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,n=function(e,t){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function l(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function c(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function d(e){return e.toString(this.encoding)}function p(e){return e&&e.length?this.write(e):""}t.I=i,i.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},i.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},i.prototype.text=function(e,t){var n=function(e,t,n){var r=t.length-1;if(r<n)return 0;var o=a(t[r]);return o>=0?(o>0&&(e.lastNeed=o-1),o):--r<n||-2===o?0:(o=a(t[r]))>=0?(o>0&&(e.lastNeed=o-2),o):--r<n||-2===o?0:(o=a(t[r]))>=0?(o>0&&(2===o?o=0:e.lastNeed=o-3),o):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},i.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},4962(e,t,n){function r(){let e;return"undefined"==typeof window&&void 0!==n.g&&n.g.global===n.g&&"function"!=typeof n||(e=function(){let e;try{e=n(6010)}catch(e){console.log(e);const t="Error importing the '@themartiancompany/opfs' module as 'opfs'. If you got this error while bundling a webpack for a project depending on this module double check its 'webpack.config.js' file or whether the 'opfs' module is listed in developer dependencies and install them.I'm sorry for this inconvenience but Node packagement system does not currently distinguish 'development' from 'build' dependencies.";throw console.error(t),e}return e}()),e}const o=r();o.isDirSync=function(e){return void 0===e&&(e=r()),function(t){return!e.statSync(t).isFile()}}(o),o.isDir=o.isDirSync,e.exports=o,e.exports.getModule=function(e){let t;if(""==e||void 0===e)t=r();else if("opfs"==e)t=_opfs_module_auto_detect();else{if("fs"!=e){const t="Unknown file system module "+`'${e}'.`.const;throw _error={msg:t},console.error(t),_error}t=n(Object(function(){const e=new Error("Cannot find module 'node:fs'");throw e.code="MODULE_NOT_FOUND",e}())),t.fsWorkerStart=function(e){let t;return t=e.fsWorkerStart,void 0===t&&(t=function(){}),t}(t)}return t}},4643(e,t,n){function r(e){try{if(!n.g.localStorage)return!1}catch(e){return!1}var t=n.g.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}e.exports=function(e,t){if(r("noDeprecation"))return e;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}}},5340(){},9838(){},7516(e,t,n){"use strict";n.r(t),n.d(t,{ABORT_ERROR:()=>T,CURRENT_DIR:()=>Ke,NOT_FOUND_ERROR:()=>Ye,ROOT_DIR:()=>Ve,TIMEOUT_ERROR:()=>R,TMP_DIR:()=>Xe,appendFile:()=>At,appendFileSync:()=>wn,assertAbsolutePath:()=>Ze,assertFileUrl:()=>Qe,connectSyncAgent:()=>an,copy:()=>Tt,copySync:()=>vn,createFile:()=>_t,createFileSync:()=>cn,deleteTemp:()=>Nt,deleteTempSync:()=>En,downloadFile:()=>kt,emptyDir:()=>Rt,emptyDirSync:()=>bn,exists:()=>xt,existsSync:()=>kn,generateTempPath:()=>ut,getFileDataByHandle:()=>ht,getSyncMessenger:()=>sn,isDirectoryHandle:()=>dt,isFileHandle:()=>ft,isFileHandleLike:()=>pt,isOPFSSupported:()=>Wt,isTempPath:()=>lt,mkTemp:()=>Lt,mkTempSync:()=>Sn,mkdir:()=>gt,mkdirSync:()=>fn,move:()=>Ot,moveSync:()=>dn,pruneTemp:()=>Pt,pruneTempSync:()=>An,readBlobFile:()=>$t,readBlobFileSync:()=>Tn,readDir:()=>yt,readDirSync:()=>pn,readFile:()=>mt,readFileSync:()=>hn,readJsonFile:()=>Ct,readJsonFileSync:()=>Rn,readTextFile:()=>jt,readTextFileSync:()=>xn,remove:()=>wt,removeSync:()=>_n,setSyncMessenger:()=>un,startSyncAgent:()=>on,stat:()=>vt,statSync:()=>gn,toFileSystemHandleLike:()=>ct,unzip:()=>Dt,unzipFromUrl:()=>Mt,unzipSync:()=>On,uploadFile:()=>Ft,writeFile:()=>bt,writeFileSync:()=>mn,zip:()=>Bt,zipFromUrl:()=>qt,zipSync:()=>$n});function r(e,t){if(!e)throw new Error("Invariant failed")}function o(e){if("string"!=typeof e)throw new TypeError(`Path must be a string, received "${JSON.stringify(e)}"`)}function i(e,t){if(e.length<=1)return e;let n=e.length;for(let r=e.length-1;r>0&&t(e.charCodeAt(r));r--)n=r;return e.slice(0,n)}function a(e){return 47===e}function s(e){return e=function(e){if("file:"!==(e=e instanceof URL?e:new URL(e)).protocol)throw new TypeError(`URL must be a file URL: received "${e.protocol}"`);return e}(e),decodeURIComponent(e.pathname.replace(/%(?![0-9A-Fa-f]{2})/g,"%25"))}function u(e){e instanceof URL&&(e=s(e)),function(e){o(e),e.length}(e);let t=-1,n=!1;for(let r=e.length-1;r>=1;--r)if(a(e.charCodeAt(r))){if(n){t=r;break}}else n=!0;return-1===t?a(e.charCodeAt(0))?"/":".":i(e.slice(0,t),a)}function l(e,t=""){e instanceof URL&&(e=s(e)),function(e,t){if(o(e),0===e.length)return e;if("string"!=typeof t)throw new TypeError(`Suffix must be a string, received "${JSON.stringify(t)}"`)}(e,t);const n=function(e,t,n=0){let r=!1,o=e.length;for(let i=e.length-1;i>=n;--i)if(t(e.charCodeAt(i))){if(r){n=i+1;break}}else r||(r=!0,o=i+1);return e.slice(n,o)}(e,a),r=i(n,a);return t?function(e,t){if(t.length>=e.length)return e;const n=e.length-t.length;for(let r=t.length-1;r>=0;--r)if(e.charCodeAt(n+r)!==t.charCodeAt(r))return e;return e.slice(0,-t.length)}(r,t):r}function c(e,...t){if(void 0===e)return".";e instanceof URL&&(e=s(e)),(t=e?[e,...t]:t).forEach(e=>o(e));const n=t.filter(e=>e.length>0).join("/");return""===n?".":function(e){e instanceof URL&&(e=s(e)),function(e){o(e),e.length}(e);const t=a(e.charCodeAt(0)),n=a(e.charCodeAt(e.length-1));return e=function(e,t,n,r){let o,i="",a=0,s=-1,u=0;for(let l=0;l<=e.length;++l){if(l<e.length)o=e.charCodeAt(l);else{if(r(o))break;o=47}if(r(o)){if(s===l-1||1===u);else if(s!==l-1&&2===u){if(i.length<2||2!==a||46!==i.charCodeAt(i.length-1)||46!==i.charCodeAt(i.length-2)){if(i.length>2){const e=i.lastIndexOf(n);-1===e?(i="",a=0):(i=i.slice(0,e),a=i.length-1-i.lastIndexOf(n)),s=l,u=0;continue}if(2===i.length||1===i.length){i="",a=0,s=l,u=0;continue}}t&&(i.length>0?i+=`${n}..`:i="..",a=2)}else i.length>0?i+=n+e.slice(s+1,l):i=e.slice(s+1,l),a=l-s-1;s=l,u=0}else 46===o&&-1!==u?++u:u=-1}return i}(e,!t,"/",a),0!==e.length||t||(e="."),e.length>0&&n&&(e+="/"),t?`/${e}`:e}(n)}function f(e){e instanceof URL&&(e=s(e)),o(e);let t=-1,n=0,r=-1,i=!0,u=0;for(let o=e.length-1;o>=0;--o){const s=e.charCodeAt(o);if(a(s)){if(!i){n=o+1;break}}else-1===r&&(i=!1,r=o+1),46===s?-1===t?t=o:1!==u&&(u=1):-1!==t&&(u=-1)}return-1===t||-1===r||0===u||1===u&&t===r-1&&t===n+1?"":e.slice(t,r)}const d=Symbol("Option kind"),p=Symbol("Result kind"),h=Promise.resolve(!0),_=Promise.resolve(!1);function g(e){const t=Object.freeze({[Symbol.toStringTag]:"Option",[d]:"Some",*[Symbol.iterator](){yield e},toString:()=>`Some(${e})`,isSome:()=>!0,isNone:()=>!1,isSomeAnd:t=>t(e),isSomeAndAsync:t=>Promise.resolve(t(e)),isNoneOr:t=>t(e),isNoneOrAsync:t=>Promise.resolve(t(e)),expect:t=>e,unwrap:()=>e,unwrapOr:t=>e,unwrapOrElse:t=>e,unwrapOrElseAsync:t=>Promise.resolve(e),okOr:t=>w(e),okOrElse:t=>w(e),transpose:()=>(E(e),e.isOk()?w(g(e.unwrap())):v(e.unwrapErr())),filter:n=>n(e)?t:y,flatten:()=>(k(e),e),map:t=>g(t(e)),mapOr:(t,n)=>n(e),mapOrElse:(t,n)=>n(e),zip:t=>(k(t),t.isSome()?g([e,t.unwrap()]):y),zipWith:(t,n)=>(k(t),t.isSome()?g(n(e,t.unwrap())):y),unzip(){const t=e;if(!Array.isArray(t)||2!==t.length)throw new TypeError("Option::unzip() requires a 2-element tuple, received "+(Array.isArray(t)?`array with ${t.length} elements`:typeof t));const[n,r]=t;return[g(n),g(r)]},reduce:(n,r)=>(k(n),n.isSome()?g(r(e,n.unwrap())):t),and:e=>(k(e),e),andThen:t=>t(e),andThenAsync:t=>Promise.resolve(t(e)),or:e=>t,orElse:e=>t,orElseAsync:e=>Promise.resolve(t),xor:e=>(k(e),e.isSome()?y:t),inspect:n=>(n(e),t),eq:t=>(k(t),t.isSome()&&t.unwrap()===e)});return t}const y=Object.freeze({[Symbol.toStringTag]:"Option",[d]:"None",*[Symbol.iterator](){},toString:()=>"None",isSome:()=>!1,isNone:()=>!0,isSomeAnd:e=>!1,isSomeAndAsync:e=>_,isNoneOr:e=>!0,isNoneOrAsync:e=>h,expect(e){throw new TypeError(e)},unwrap(){throw new TypeError("Option::unwrap() called on a `None` value")},unwrapOr:e=>e,unwrapOrElse:e=>e(),unwrapOrElseAsync:e=>Promise.resolve(e()),okOr:e=>v(e),okOrElse:e=>v(e()),transpose:()=>w(y),filter:e=>y,flatten:()=>y,map:e=>y,mapOr:(e,t)=>e,mapOrElse:(e,t)=>e(),zip:e=>y,zipWith:(e,t)=>y,unzip:()=>[y,y],reduce:(e,t)=>(k(e),e),and:e=>y,andThen:e=>y,andThenAsync:e=>m,or:e=>(k(e),e),orElse:e=>e(),orElseAsync:e=>Promise.resolve(e()),xor:e=>(k(e),e.isSome()?e:y),inspect:e=>y,eq:e=>(k(e),e===y)}),m=Promise.resolve(y);function w(e){const t=Object.freeze({[Symbol.toStringTag]:"Result",[p]:"Ok",*[Symbol.iterator](){yield e},toString:()=>`Ok(${e})`,isOk:()=>!0,isErr:()=>!1,isOkAnd:t=>t(e),isOkAndAsync:t=>Promise.resolve(t(e)),isErrAnd:e=>!1,isErrAndAsync:e=>_,expect:t=>e,unwrap:()=>e,unwrapOr:t=>e,unwrapOrElse:t=>e,unwrapOrElseAsync:t=>Promise.resolve(e),expectErr(t){throw new TypeError(`${t}: ${e}`)},unwrapErr(){throw new TypeError("Result::unwrapErr() called on an `Ok` value")},intoOk:()=>e,intoErr(){throw new TypeError("Result::intoErr() called on an `Ok` value")},ok:()=>g(e),err:()=>y,transpose:()=>(k(e),e.isSome()?g(w(e.unwrap())):y),map:t=>w(t(e)),mapErr:e=>t,mapOr:(t,n)=>n(e),mapOrElse:(t,n)=>n(e),flatten:()=>(E(e),e),and:e=>(E(e),e),or:e=>t,andThen:t=>t(e),andThenAsync:t=>Promise.resolve(t(e)),orElse:e=>t,orElseAsync:e=>Promise.resolve(t),inspect:n=>(n(e),t),inspectErr:e=>t,eq:t=>(E(t),t.isOk()&&t.unwrap()===e),asOk:()=>t,asErr(){throw new TypeError("Result::asErr() called on an `Ok` value")},andTryAsync(t){try{const n=t(e);return Promise.resolve(n).then(w,v)}catch(e){return Promise.resolve(v(e))}},orTryAsync:e=>Promise.resolve(t)});return t}function v(e){const t=Object.freeze({[Symbol.toStringTag]:"Result",[p]:"Err",*[Symbol.iterator](){},toString:()=>`Err(${e})`,isOk:()=>!1,isErr:()=>!0,isOkAnd:e=>!1,isOkAndAsync:e=>_,isErrAnd:t=>t(e),isErrAndAsync:t=>Promise.resolve(t(e)),expect(t){throw new TypeError(`${t}: ${e}`)},unwrap(){throw new TypeError("Result::unwrap() called on an `Err` value")},unwrapOr:e=>e,unwrapOrElse:t=>t(e),unwrapOrElseAsync:t=>Promise.resolve(t(e)),expectErr:t=>e,unwrapErr:()=>e,intoOk(){throw new TypeError("Result::intoOk() called on an `Err` value")},intoErr:()=>e,ok:()=>y,err:()=>g(e),transpose:()=>g(t),map:e=>t,mapErr:t=>v(t(e)),mapOr:(e,t)=>e,mapOrElse:(t,n)=>t(e),flatten:()=>t,and:e=>t,or:e=>(E(e),e),andThen:e=>t,andThenAsync:e=>Promise.resolve(t),orElse:t=>t(e),orElseAsync:t=>Promise.resolve(t(e)),inspect:e=>t,inspectErr:n=>(n(e),t),eq:t=>(E(t),t.isErr()&&t.unwrapErr()===e),asOk(){throw new TypeError("Result::asOk() called on an `Err` value")},asErr:()=>t,andTryAsync:e=>Promise.resolve(t),orTryAsync(t){try{const n=t(e);return Promise.resolve(n).then(w,v)}catch(e){return Promise.resolve(v(e))}}});return t}function b(e){try{return null===e?"null":void 0===e?"undefined":"object"==typeof e?Object.prototype.toString.call(e):String(e)}catch{return"[unable to stringify]"}}function k(e){if(!function(e){return null!=e&&"object"==typeof e&&d in e}(e))throw new TypeError(`Expected an Option, but received: ${b(e)}`)}function E(e){if(!function(e){return null!=e&&"object"==typeof e&&p in e}(e))throw new TypeError(`Expected a Result, but received: ${b(e)}`)}const S=w(!1),A=w(),T="AbortError",R="TimeoutError";var x=class extends Error{name="FetchError";status;constructor(e,t){super(e),this.status=t}};function O(e,t){const n=function(e){if(e instanceof URL)return e;try{return new URL(e,"undefined"!=typeof location?location.href:void 0)}catch{throw new TypeError(`Invalid URL: ${e}`)}}(e),r=t??{},{retries:o,delay:i,when:a,onRetry:s}=function(e){const{responseType:t,timeout:n,retry:r=0,onProgress:o,onChunk:i}=e;if(null!=t){const e=["text","arraybuffer","blob","json","bytes","stream"];if(!e.includes(t))throw new TypeError(`responseType must be one of ${e.join(", ")} but received ${t}`)}if(null!=n){if("number"!=typeof n)throw new TypeError("timeout must be a number but received "+typeof n);if(n<=0)throw new Error(`timeout must be a number greater than 0 but received ${n}`)}if(null!=o&&"function"!=typeof o)throw new TypeError("onProgress callback must be a function but received "+typeof o);if(null!=i&&"function"!=typeof i)throw new TypeError("onChunk callback must be a function but received "+typeof i);let a,s,u=0,l=0;if("number"==typeof r?u=r:r&&"object"==typeof r&&(u=r.retries??0,l=r.delay??0,a=r.when,s=r.onRetry),!Number.isInteger(u))throw new TypeError(`Retry count must be an integer but received ${u}`);if(u<0)throw new Error(`Retry count must be non-negative but received ${u}`);if("number"==typeof l){if(l<0)throw new Error(`Retry delay must be a non-negative number but received ${l}`)}else if("function"!=typeof l)throw new TypeError("Retry delay must be a number or a function but received "+typeof l);if(null!=a&&!Array.isArray(a)&&"function"!=typeof a)throw new TypeError("Retry when condition must be an array of status codes or a function but received "+typeof a);if(null!=s&&"function"!=typeof s)throw new TypeError("Retry onRetry callback must be a function but received "+typeof s);return{retries:u,delay:l,when:a,onRetry:s}}(r),{abortable:u=!1,responseType:l,timeout:c,onProgress:f,onChunk:d,...p}=r,h=p.signal;let _;u&&(_=new AbortController);const g=(e,t)=>"AbortError"!==e.name&&(a?Array.isArray(a)?e instanceof x&&a.includes(e.status):a(e,t):!(e instanceof x)),y=e=>"function"==typeof i?i(e):i,m=()=>{const e=[];h&&e.push(h),_&&e.push(_.signal),"number"==typeof c&&e.push(function(e){if("function"==typeof AbortSignal.timeout)return AbortSignal.timeout(e);const t=new AbortController,n=function(){const e="The operation timed out.";try{return new DOMException(e,R)}catch{const t=new Error(e);return t.name=R,t}}(),r=setTimeout(()=>{t.abort(n)},e);return"function"==typeof r?.unref&&r.unref(),t.signal}(c)),e.length>0&&(p.signal=1===e.length?e[0]:function(e){if("function"==typeof AbortSignal.any)return AbortSignal.any(e);const t=new AbortController;for(const n of e)if(n.aborted)return t.abort(n.reason),t.signal;const n=e=>{t.abort(e.target.reason)};for(const t of e)t.addEventListener("abort",n);return t.signal.addEventListener("abort",()=>{for(const t of e)t.removeEventListener("abort",n)}),t.signal}(e))},b=async()=>{m();try{const e=await fetch(n,p);return e.ok?await k(e):(e.body?.cancel().catch(()=>{}),v(new x(e.statusText,e.status)))}catch(e){return v(e instanceof Error?e:C(e))}},k=async e=>{switch(e.body&&(f||d)&&(async e=>{let t,n=0;if(f){const n=e.headers.get("content-length");if(null==n)try{f(v(new Error("No content-length in response headers")))}catch{}else t=Number.parseInt(n,10)}const r=e.clone().body;try{for await(const e of r){if(d)try{d(e)}catch{}if(f&&null!=t){n+=e.byteLength;try{f(w({totalByteLength:t,completedByteLength:n}))}catch{}}}}catch{}})(e),l){case"json":if(null==e.body)return w(null);try{return w(await e.json())}catch{return v(new Error("Response is invalid json while responseType is json"))}case"text":return w(await e.text());case"bytes":return"function"==typeof e.bytes?w(await e.bytes()):w(new Uint8Array(await e.arrayBuffer()));case"arraybuffer":return w(await e.arrayBuffer());case"blob":return w(await e.blob());case"stream":return w(e.body);default:return w(e)}},E=(async()=>{let e,t=0;do{if(t>0){if(_?.signal.aborted)return v(_.signal.reason);const n=y(t);if(n>0&&(await $(n),_?.signal.aborted))return v(_.signal.reason);try{s?.(e,t)}catch{}}const n=await b();if(n.isOk())return n;e=n.unwrapErr(),t++}while(t<=o&&g(e,t));return v(e)})();return u&&_?{abort(e){e instanceof Error?_.abort(e):null!=e?_.abort(C(e)):_.abort()},get aborted(){return _.signal.aborted},get result(){return E}}:E}function $(e){return new Promise(t=>setTimeout(t,e))}function C(e){const t=new Error("string"==typeof e?e:String(e));return t.name=T,t.cause=e,t}var j={},L=Uint8Array,N=Uint16Array,P=Int32Array,U=new L([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),D=new L([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),M=new L([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),F=function(e,t){for(var n=new N(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];var o=new P(n[30]);for(r=1;r<30;++r)for(var i=n[r];i<n[r+1];++i)o[i]=i-n[r]<<5|r;return{b:n,r:o}},I=F(U,2),B=I.b,q=I.r;B[28]=258,q[258]=28;for(var W=F(D,0),z=W.b,H=W.r,G=new N(32768),J=0;J<32768;++J){var Y=(43690&J)>>1|(21845&J)<<1;Y=(61680&(Y=(52428&Y)>>2|(13107&Y)<<2))>>4|(3855&Y)<<4,G[J]=((65280&Y)>>8|(255&Y)<<8)>>1}var V=function(e,t,n){for(var r=e.length,o=0,i=new N(t);o<r;++o)e[o]&&++i[e[o]-1];var a,s=new N(t);for(o=1;o<t;++o)s[o]=s[o-1]+i[o-1]<<1;if(n){a=new N(1<<t);var u=15-t;for(o=0;o<r;++o)if(e[o])for(var l=o<<4|e[o],c=t-e[o],f=s[e[o]-1]++<<c,d=f|(1<<c)-1;f<=d;++f)a[G[f]>>u]=l}else for(a=new N(r),o=0;o<r;++o)e[o]&&(a[o]=G[s[e[o]-1]++]>>15-e[o]);return a},K=new L(288);for(J=0;J<144;++J)K[J]=8;for(J=144;J<256;++J)K[J]=9;for(J=256;J<280;++J)K[J]=7;for(J=280;J<288;++J)K[J]=8;var X=new L(32);for(J=0;J<32;++J)X[J]=5;var Z=V(K,9,0),Q=V(K,9,1),ee=V(X,5,0),te=V(X,5,1),ne=function(e){for(var t=e[0],n=1;n<e.length;++n)e[n]>t&&(t=e[n]);return t},re=function(e,t,n){var r=t/8|0;return(e[r]|e[r+1]<<8)>>(7&t)&n},oe=function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(7&t)},ie=function(e){return(e+7)/8|0},ae=function(e,t,n){return(null==t||t<0)&&(t=0),(null==n||n>e.length)&&(n=e.length),new L(e.subarray(t,n))},se=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],ue=function(e,t,n){var r=new Error(t||se[e]);if(r.code=e,Error.captureStackTrace&&Error.captureStackTrace(r,ue),!n)throw r;return r},le=function(e,t,n,r){var o=e.length,i=r?r.length:0;if(!o||t.f&&!t.l)return n||new L(0);var a=!n,s=a||2!=t.i,u=t.i;a&&(n=new L(3*o));var l=function(e){var t=n.length;if(e>t){var r=new L(Math.max(2*t,e));r.set(n),n=r}},c=t.f||0,f=t.p||0,d=t.b||0,p=t.l,h=t.d,_=t.m,g=t.n,y=8*o;do{if(!p){c=re(e,f,1);var m=re(e,f+1,3);if(f+=3,!m){var w=e[($=ie(f)+4)-4]|e[$-3]<<8,v=$+w;if(v>o){u&&ue(0);break}s&&l(d+w),n.set(e.subarray($,v),d),t.b=d+=w,t.p=f=8*v,t.f=c;continue}if(1==m)p=Q,h=te,_=9,g=5;else if(2==m){var b=re(e,f,31)+257,k=re(e,f+10,15)+4,E=b+re(e,f+5,31)+1;f+=14;for(var S=new L(E),A=new L(19),T=0;T<k;++T)A[M[T]]=re(e,f+3*T,7);f+=3*k;var R=ne(A),x=(1<<R)-1,O=V(A,R,1);for(T=0;T<E;){var $,C=O[re(e,f,x)];if(f+=15&C,($=C>>4)<16)S[T++]=$;else{var j=0,N=0;for(16==$?(N=3+re(e,f,3),f+=2,j=S[T-1]):17==$?(N=3+re(e,f,7),f+=3):18==$&&(N=11+re(e,f,127),f+=7);N--;)S[T++]=j}}var P=S.subarray(0,b),F=S.subarray(b);_=ne(P),g=ne(F),p=V(P,_,1),h=V(F,g,1)}else ue(1);if(f>y){u&&ue(0);break}}s&&l(d+131072);for(var I=(1<<_)-1,q=(1<<g)-1,W=f;;W=f){var H=(j=p[oe(e,f)&I])>>4;if((f+=15&j)>y){u&&ue(0);break}if(j||ue(2),H<256)n[d++]=H;else{if(256==H){W=f,p=null;break}var G=H-254;if(H>264){var J=U[T=H-257];G=re(e,f,(1<<J)-1)+B[T],f+=J}var Y=h[oe(e,f)&q],K=Y>>4;if(Y||ue(3),f+=15&Y,F=z[K],K>3&&(J=D[K],F+=oe(e,f)&(1<<J)-1,f+=J),f>y){u&&ue(0);break}s&&l(d+131072);var X=d+G;if(d<F){var Z=i-F,ee=Math.min(F,X);for(Z+d<0&&ue(3);d<ee;++d)n[d]=r[Z+d]}for(;d<X;++d)n[d]=n[d-F]}}t.l=p,t.p=W,t.b=d,t.f=c,p&&(c=1,t.m=_,t.d=h,t.n=g)}while(!c);return d!=n.length&&a?ae(n,0,d):n.subarray(0,d)},ce=function(e,t,n){n<<=7&t;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8},fe=function(e,t,n){n<<=7&t;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8,e[r+2]|=n>>16},de=function(e,t){for(var n=[],r=0;r<e.length;++r)e[r]&&n.push({s:r,f:e[r]});var o=n.length,i=n.slice();if(!o)return{t:we,l:0};if(1==o){var a=new L(n[0].s+1);return a[n[0].s]=1,{t:a,l:1}}n.sort(function(e,t){return e.f-t.f}),n.push({s:-1,f:25001});var s=n[0],u=n[1],l=0,c=1,f=2;for(n[0]={s:-1,f:s.f+u.f,l:s,r:u};c!=o-1;)s=n[n[l].f<n[f].f?l++:f++],u=n[l!=c&&n[l].f<n[f].f?l++:f++],n[c++]={s:-1,f:s.f+u.f,l:s,r:u};var d=i[0].s;for(r=1;r<o;++r)i[r].s>d&&(d=i[r].s);var p=new N(d+1),h=pe(n[c-1],p,0);if(h>t){r=0;var _=0,g=h-t,y=1<<g;for(i.sort(function(e,t){return p[t.s]-p[e.s]||e.f-t.f});r<o;++r){var m=i[r].s;if(!(p[m]>t))break;_+=y-(1<<h-p[m]),p[m]=t}for(_>>=g;_>0;){var w=i[r].s;p[w]<t?_-=1<<t-p[w]++-1:++r}for(;r>=0&&_;--r){var v=i[r].s;p[v]==t&&(--p[v],++_)}h=t}return{t:new L(p),l:h}},pe=function(e,t,n){return-1==e.s?Math.max(pe(e.l,t,n+1),pe(e.r,t,n+1)):t[e.s]=n},he=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new N(++t),r=0,o=e[0],i=1,a=function(e){n[r++]=e},s=1;s<=t;++s)if(e[s]==o&&s!=t)++i;else{if(!o&&i>2){for(;i>138;i-=138)a(32754);i>2&&(a(i>10?i-11<<5|28690:i-3<<5|12305),i=0)}else if(i>3){for(a(o),--i;i>6;i-=6)a(8304);i>2&&(a(i-3<<5|8208),i=0)}for(;i--;)a(o);i=1,o=e[s]}return{c:n.subarray(0,r),n:t}},_e=function(e,t){for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n},ge=function(e,t,n){var r=n.length,o=ie(t+2);e[o]=255&r,e[o+1]=r>>8,e[o+2]=255^e[o],e[o+3]=255^e[o+1];for(var i=0;i<r;++i)e[o+i+4]=n[i];return 8*(o+4+r)},ye=function(e,t,n,r,o,i,a,s,u,l,c){ce(t,c++,n),++o[256];for(var f=de(o,15),d=f.t,p=f.l,h=de(i,15),_=h.t,g=h.l,y=he(d),m=y.c,w=y.n,v=he(_),b=v.c,k=v.n,E=new N(19),S=0;S<m.length;++S)++E[31&m[S]];for(S=0;S<b.length;++S)++E[31&b[S]];for(var A=de(E,7),T=A.t,R=A.l,x=19;x>4&&!T[M[x-1]];--x);var O,$,C,j,L=l+5<<3,P=_e(o,K)+_e(i,X)+a,F=_e(o,d)+_e(i,_)+a+14+3*x+_e(E,T)+2*E[16]+3*E[17]+7*E[18];if(u>=0&&L<=P&&L<=F)return ge(t,c,e.subarray(u,u+l));if(ce(t,c,1+(F<P)),c+=2,F<P){O=V(d,p,0),$=d,C=V(_,g,0),j=_;var I=V(T,R,0);for(ce(t,c,w-257),ce(t,c+5,k-1),ce(t,c+10,x-4),c+=14,S=0;S<x;++S)ce(t,c+3*S,T[M[S]]);c+=3*x;for(var B=[m,b],q=0;q<2;++q){var W=B[q];for(S=0;S<W.length;++S){var z=31&W[S];ce(t,c,I[z]),c+=T[z],z>15&&(ce(t,c,W[S]>>5&127),c+=W[S]>>12)}}}else O=Z,$=K,C=ee,j=X;for(S=0;S<s;++S){var H=r[S];if(H>255){fe(t,c,O[257+(z=H>>18&31)]),c+=$[z+257],z>7&&(ce(t,c,H>>23&31),c+=U[z]);var G=31&H;fe(t,c,C[G]),c+=j[G],G>3&&(fe(t,c,H>>5&8191),c+=D[G])}else fe(t,c,O[H]),c+=$[H]}return fe(t,c,O[256]),c+$[256]},me=new P([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),we=new L(0),ve=function(e,t,n,r,o,i){var a=i.z||e.length,s=new L(r+a+5*(1+Math.ceil(a/7e3))+o),u=s.subarray(r,s.length-o),l=i.l,c=7&(i.r||0);if(t){c&&(u[0]=i.r>>3);for(var f=me[t-1],d=f>>13,p=8191&f,h=(1<<n)-1,_=i.p||new N(32768),g=i.h||new N(h+1),y=Math.ceil(n/3),m=2*y,w=function(t){return(e[t]^e[t+1]<<y^e[t+2]<<m)&h},v=new P(25e3),b=new N(288),k=new N(32),E=0,S=0,A=i.i||0,T=0,R=i.w||0,x=0;A+2<a;++A){var O=w(A),$=32767&A,C=g[O];if(_[$]=C,g[O]=$,R<=A){var j=a-A;if((E>7e3||T>24576)&&(j>423||!l)){c=ye(e,u,0,v,b,k,S,T,x,A-x,c),T=E=S=0,x=A;for(var M=0;M<286;++M)b[M]=0;for(M=0;M<30;++M)k[M]=0}var F=2,I=0,B=p,W=$-C&32767;if(j>2&&O==w(A-W))for(var z=Math.min(d,j)-1,G=Math.min(32767,A),J=Math.min(258,j);W<=G&&--B&&$!=C;){if(e[A+F]==e[A+F-W]){for(var Y=0;Y<J&&e[A+Y]==e[A+Y-W];++Y);if(Y>F){if(F=Y,I=W,Y>z)break;var V=Math.min(W,Y-2),K=0;for(M=0;M<V;++M){var X=A-W+M&32767,Z=X-_[X]&32767;Z>K&&(K=Z,C=X)}}}W+=($=C)-(C=_[$])&32767}if(I){v[T++]=268435456|q[F]<<18|H[I];var Q=31&q[F],ee=31&H[I];S+=U[Q]+D[ee],++b[257+Q],++k[ee],R=A+F,++E}else v[T++]=e[A],++b[e[A]]}}for(A=Math.max(A,R);A<a;++A)v[T++]=e[A],++b[e[A]];c=ye(e,u,l,v,b,k,S,T,x,A-x,c),l||(i.r=7&c|u[c/8|0]<<3,c-=7,i.h=g,i.p=_,i.i=A,i.w=R)}else{for(A=i.w||0;A<a+l;A+=65535){var te=A+65535;te>=a&&(u[c/8|0]=l,te=a),c=ge(u,c+1,e.subarray(A,te))}i.i=a}return ae(s,0,r+ie(c)+o)},be=function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var n=t,r=9;--r;)n=(1&n&&-306674912)^n>>>1;e[t]=n}return e}(),ke=function(e,t,n,r,o){if(!o&&(o={l:1},t.dictionary)){var i=t.dictionary.subarray(-32768),a=new L(i.length+e.length);a.set(i),a.set(e,i.length),e=a,o.w=i.length}return ve(e,null==t.level?6:t.level,null==t.mem?o.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):20:12+t.mem,n,r,o)},Ee=function(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n},Se=function(e,t,n){for(var r=e(),o=e.toString(),i=o.slice(o.indexOf("[")+1,o.lastIndexOf("]")).replace(/\s+/g,"").split(","),a=0;a<r.length;++a){var s=r[a],u=i[a];if("function"==typeof s){t+=";"+u+"=";var l=s.toString();if(s.prototype)if(-1!=l.indexOf("[native code]")){var c=l.indexOf(" ",8)+1;t+=l.slice(c,l.indexOf("(",c))}else for(var f in t+=l,s.prototype)t+=";"+u+".prototype."+f+"="+s.prototype[f].toString();else t+=l}else n[u]=s}return t},Ae=[],Te=function(){return[L,N,P,U,D,M,B,z,Q,te,G,se,V,ne,re,oe,ie,ae,ue,le,Ue,xe,Oe]},Re=function(){return[L,N,P,U,D,M,q,H,Z,K,ee,X,G,me,we,V,ce,fe,de,pe,he,_e,ge,ye,ie,ae,ve,ke,Pe,xe]},xe=function(e){return postMessage(e,[e.buffer])},Oe=function(e){return e&&{out:e.size&&new L(e.size),dictionary:e.dictionary}},$e=function(e,t,n,r,o,i){var a=function(e,t,n,r){if(!Ae[n]){for(var o="",i={},a=e.length-1,s=0;s<a;++s)o=Se(e[s],o,i);Ae[n]={c:Se(e[a],o,i),e:i}}var u=Ee({},Ae[n].e);return function(e,t,n,r,o){var i=new Worker(j[t]||(j[t]=URL.createObjectURL(new Blob([e+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return i.onmessage=function(e){var t=e.data,n=t.$e$;if(n){var r=new Error(n[0]);r.code=n[1],r.stack=n[2],o(r,null)}else o(null,t)},i.postMessage(n,r),i}(Ae[n].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+t.toString()+"}",n,u,function(e){var t=[];for(var n in e)e[n].buffer&&t.push((e[n]=new e[n].constructor(e[n])).buffer);return t}(u),r)}(n,r,o,function(e,t){a.terminate(),i(e,t)});return a.postMessage([e,t],t.consume?[e.buffer]:[]),function(){a.terminate()}},Ce=function(e,t){return e[t]|e[t+1]<<8},je=function(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0},Le=function(e,t){return je(e,t)+4294967296*je(e,t+4)},Ne=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8};function Pe(e,t){return ke(e,t||{},0,0)}function Ue(e,t){return le(e,{i:2},t&&t.out,t&&t.dictionary)}var De=function(e,t,n,r){for(var o in e){var i=e[o],a=t+o,s=r;Array.isArray(i)&&(s=Ee(r,i[1]),i=i[0]),ArrayBuffer.isView(i)?n[a]=[i,s]:(n[a+="/"]=[new L(0),s],De(i,a,n,r))}},Me="undefined"!=typeof TextEncoder&&new TextEncoder,Fe="undefined"!=typeof TextDecoder&&new TextDecoder;try{Fe.decode(we,{stream:!0})}catch(e){}function Ie(e,t){if(t){for(var n=new L(e.length),r=0;r<e.length;++r)n[r]=e.charCodeAt(r);return n}if(Me)return Me.encode(e);var o=e.length,i=new L(e.length+(e.length>>1)),a=0,s=function(e){i[a++]=e};for(r=0;r<o;++r){if(a+5>i.length){var u=new L(a+8+(o-r<<1));u.set(i),i=u}var l=e.charCodeAt(r);l<128||t?s(l):l<2048?(s(192|l>>6),s(128|63&l)):l>55295&&l<57344?(s(240|(l=65536+(1047552&l)|1023&e.charCodeAt(++r))>>18),s(128|l>>12&63),s(128|l>>6&63),s(128|63&l)):(s(224|l>>12),s(128|l>>6&63),s(128|63&l))}return ae(i,0,a)}function Be(e,t){if(t){for(var n="",r=0;r<e.length;r+=16384)n+=String.fromCharCode.apply(null,e.subarray(r,r+16384));return n}if(Fe)return Fe.decode(e);var o=function(e){for(var t="",n=0;;){var r=e[n++],o=(r>127)+(r>223)+(r>239);if(n+o>e.length)return{s:t,r:ae(e,n-1)};o?3==o?(r=((15&r)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++])-65536,t+=String.fromCharCode(55296|r>>10,56320|1023&r)):t+=1&o?String.fromCharCode((31&r)<<6|63&e[n++]):String.fromCharCode((15&r)<<12|(63&e[n++])<<6|63&e[n++]):t+=String.fromCharCode(r)}}(e),i=o.s;return(n=o.r).length&&ue(8),i}var qe=function(e,t,n,r,o,i,a){var s=4294967295==o,u=4294967295==i,l=4294967295==a,c=t+n;if(r&&s+u+l){for(;t+4<c;t+=4+Ce(e,t+2))if(1==Ce(e,t))return[s?Le(e,t+4+8*u):o,u?Le(e,t+4):i,l?Le(e,t+4+8*(u+s)):a,1];r<2&&ue(13)}return[o,i,a,0]},We=function(e){var t=0;if(e)for(var n in e){var r=e[n].length;r>65535&&ue(9),t+=r+4}return t},ze=function(e,t,n,r,o,i,a,s){var u=r.length,l=n.extra,c=s&&s.length,f=We(l);Ne(e,t,null!=a?33639248:67324752),t+=4,null!=a&&(e[t++]=20,e[t++]=n.os),e[t]=20,t+=2,e[t++]=n.flag<<1|(i<0&&8),e[t++]=o&&8,e[t++]=255&n.compression,e[t++]=n.compression>>8;var d=new Date(null==n.mtime?Date.now():n.mtime),p=d.getFullYear()-1980;if((p<0||p>119)&&ue(10),Ne(e,t,p<<25|d.getMonth()+1<<21|d.getDate()<<16|d.getHours()<<11|d.getMinutes()<<5|d.getSeconds()>>1),t+=4,-1!=i&&(Ne(e,t,n.crc),Ne(e,t+4,i<0?-i-2:i),Ne(e,t+8,n.size)),Ne(e,t+12,u),Ne(e,t+14,f),t+=16,null!=a&&(Ne(e,t,c),Ne(e,t+6,n.attrs),Ne(e,t+10,a),t+=14),e.set(r,t),t+=u,f)for(var h in l){var _=l[h],g=_.length;Ne(e,t,+h),Ne(e,t+2,g),e.set(_,t+4),t+=4+g}return c&&(e.set(s,t),t+=c),t};function He(e,t,n){n||(n=t,t={}),"function"!=typeof n&&ue(7);var r={};De(e,"",r,t);var o=Object.keys(r),i=o.length,a=0,s=0,u=i,l=new Array(i),c=[],f=function(){for(var e=0;e<c.length;++e)c[e]()},d=function(e,t){Ge(function(){n(e,t)})};Ge(function(){d=n});var p=function(){var e=new L(s+22),t=a,n=s-a;s=0;for(var r=0;r<u;++r){var o=l[r];try{var i=o.c.length;ze(e,s,o,o.f,o.u,i);var c=30+o.f.length+We(o.extra),f=s+c;e.set(o.c,f),ze(e,a,o,o.f,o.u,i,s,o.m),a+=16+c+(o.m?o.m.length:0),s=f+i}catch(e){return d(e,null)}}(function(e,t,n,r,o){Ne(e,t,101010256),Ne(e,t+8,n),Ne(e,t+10,n),Ne(e,t+12,r),Ne(e,t+16,o)})(e,a,l.length,n,t),d(null,e)};i||p();for(var h=function(e){var t=o[e],n=r[t],u=n[0],h=n[1],_=function(){var e=-1;return{p:function(t){for(var n=e,r=0;r<t.length;++r)n=be[255&n^t[r]]^n>>>8;e=n},d:function(){return~e}}}(),g=u.length;_.p(u);var y=Ie(t),m=y.length,w=h.comment,v=w&&Ie(w),b=v&&v.length,k=We(h.extra),E=0==h.level?0:8,S=function(n,r){if(n)f(),d(n,null);else{var o=r.length;l[e]=Ee(h,{size:g,crc:_.d(),c:r,f:y,m:v,u:m!=t.length||v&&w.length!=b,compression:E}),a+=30+m+k+o,s+=76+2*(m+k)+(b||0)+o,--i||p()}};if(m>65535&&S(ue(11,0,1),null),E)if(g<16e4)try{S(null,Pe(u,h))}catch(e){S(e,null)}else c.push(function(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&ue(7),$e(e,t,[Re],function(e){return xe(Pe(e.data[0],e.data[1]))},0,n)}(u,h,S));else S(null,u)},_=0;_<u;++_)h(_);return f}var Ge="function"==typeof queueMicrotask?queueMicrotask:"function"==typeof setTimeout?setTimeout:function(e){e()};class Je{resolve;reject;promise;constructor(){if("function"==typeof Promise.withResolvers){const{promise:e,resolve:t,reject:n}=Promise.withResolvers();this.promise=e,this.resolve=t,this.reject=n}else this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}}const Ye="NotFoundError",Ve="/",Ke=".",Xe="/tmp";function Ze(e){r("string"==typeof e),r(e[0]===Ve)}function Qe(e){r("string"==typeof e)}let et;function tt(e){return e===Ve}async function nt(e,t,n){try{return w(await e.getDirectoryHandle(t,n))}catch(n){const r=n,o=new Error(`${r.name}: ${r.message} When get child directory '${t}' from directory '${e.name||Ve}'.`);return o.name=r.name,v(o)}}async function rt(e,t){let n=await async function(){return et??=await navigator.storage.getDirectory(),et}();if(tt(e))return w(n);let r=e.slice(1);for(;r;){let e="";const o=r.indexOf("/");if(-1===o)e=r,r="";else if(e=r.slice(0,o),r=r.slice(o+1),0===o)continue;const i=await nt(n,e,t);if(i.isErr())return i;n=i.unwrap()}return w(n)}async function ot(e,t){const n=t?.create??!1,r=u(e),o=l(e);return(await rt(r,{create:n})).andThenAsync(e=>async function(e,t,n){try{return w(await e.getFileHandle(t,n))}catch(n){const r=n,o=new Error(`${r.name}: ${r.message} When get child file '${t}' from directory '${e.name||Ve}'.`);return o.name=r.name,v(o)}}(e,o,{create:n}))}function it(e){return e.name===Ye}async function at(e){const t=(await Promise.all(e)).find(e=>e.isErr());return t??A}function st(){const e=new Error;return e.name=T,e}function ut(e){const{isDirectory:t=!1,basename:n="tmp",extname:r=""}=e??{},o=t?"":r;return c(Xe,`${n?`${n}-`:""}${crypto.randomUUID()}${o}`)}function lt(e){return e.startsWith(`${Xe}/`)}async function ct(e){const{name:t,kind:n}=e;if(ft(e)){const r=await e.getFile(),{size:o,lastModified:i,type:a}=r;return{name:t,kind:n,type:a,size:o,lastModified:i}}return{name:t,kind:n}}function ft(e){return"file"===e.kind}function dt(e){return"directory"===e.kind}function pt(e){return"file"===e.kind}async function ht(e){const t=await e.getFile(),n=await t.arrayBuffer();return new Uint8Array(n)}async function _t(e){return Ze(e),(await ot(e,{create:!0})).and(A)}async function gt(e){return Ze(e),(await rt(e,{create:!0})).and(A)}async function yt(e,t){async function*n(r,o){const i=r.entries();for await(const[a,s]of i){const i=o===e?a:c(o,a);yield{path:i,handle:s},dt(s)&&t?.recursive&&(yield*n(await r.getDirectoryHandle(a),i))}}return Ze(e),(await rt(e)).andThen(t=>w(n(t,e)))}async function mt(e,t){return Ze(e),(await ot(e)).andThenAsync(async e=>{const n=await e.getFile();switch(t?.encoding){case"blob":return w(n);case"utf8":return w(await n.text());default:return w(await n.arrayBuffer())}})}async function wt(e){Ze(e);const t=u(e),n=l(e),r=await rt(t);return(await r.andThenAsync(async e=>{try{tt(t)&&tt(n)?await e.remove({recursive:!0}):await e.removeEntry(n,{recursive:!0})}catch(e){return v(e)}return A})).orElse(e=>it(e)?A:v(e))}async function vt(e){Ze(e);const t=u(e),n=l(e),r=await rt(t);return n?r.andThenAsync(async t=>{for await(const[e,r]of t.entries())if(e===n)return w(r);const r=new Error(`${Ye}: '${n}' does not exist. Full path is '${e}'.`);return r.name=Ye,v(r)}):r}async function bt(e,t,n){Ze(e);const{append:r=!1,create:o=!0}=n??{};return(await ot(e,{create:o})).andThenAsync(async e=>{const n=await e.createWritable({keepExistingData:r}),o={type:"write",data:t};if(r){const{size:t}=await e.getFile();o.position=t}return await n.write(o),await n.close(),A})}function kt(e,t,n){let r,o;Qe(e),o=!1,"string"==typeof t?Ze(t):(n=t,t=ut({extname:f(e)}),o=!0),r=!1;const i=O(e,{redirect:"follow",...n,abortable:!0}),a=(async()=>(await i.response).andThenAsync(async e=>{const n=await e.blob();return r?v(st()):(await bt(t,n)).and(w(e))}))();return{abort(e){r=!0,i.abort(e)},get aborted(){return r},get response(){return o?a.then(e=>e.map(e=>({tempFilePath:t,rawResponse:e}))):a}}}async function Et(e,t){const n=u(t);return(await rt(n,{create:!0})).andThenAsync(async n=>{const r=l(t);try{return await e.move(n,r),A}catch(e){return v(e)}})}async function St(e,t,n,r=!0){return Ze(t),(await vt(e)).andThenAsync(async o=>{let i;i=!1;const a=await vt(t);if(a.isErr()){if(!it(a.unwrapErr()))return a.asErr()}else{i=!0;const e=a.unwrap();if(!(ft(o)&&ft(e)||dt(o)&&dt(e)))return v(new Error("Both 'srcPath' and 'destPath' must both be a file or directory."))}return ft(o)?r||!i?await n(o,t):A:(await yt(e,{recursive:!0})).andThenAsync(async e=>{const o=[gt(t)];for await(const{path:a,handle:s}of e){const e=c(t,a);let u=!1;if(i){const t=await xt(e);if(t.isErr()){o.push(Promise.resolve(t.asErr()));continue}u=t.unwrap()}const l=ft(s)?r||!u?n(s,e):Promise.resolve(A):gt(e);o.push(l)}return at(o)})})}function At(e,t){return bt(e,t,{append:!0})}async function Tt(e,t,n){const{overwrite:r=!0}=n??{};return St(e,t,async(e,t)=>await bt(t,await e.getFile()),r)}async function Rt(e){const t=await yt(e);if(t.isErr())return it(t.unwrapErr())?gt(e):t.asErr();const n=[];for await(const{path:r}of t.unwrap())n.push(wt(c(e,r)));return at(n)}async function xt(e,t){const{isDirectory:n=!1,isFile:o=!1}=t??{};r(!(n&&o));const i=await vt(e);return i.andThen(e=>w(!(n&&ft(e)||o&&dt(e)))).orElse(e=>it(e)?S:i.asErr())}async function Ot(e,t,n){const{overwrite:r=!0}=n??{};return(await St(e,t,Et,r)).andThenAsync(()=>wt(e))}function $t(e){return mt(e,{encoding:"blob"})}async function Ct(e){return(await jt(e)).andThenAsync(async e=>{try{return w(JSON.parse(e))}catch(e){return v(e)}})}function jt(e){return mt(e,{encoding:"utf8"})}async function Lt(e){const{isDirectory:t=!1}=e??{},n=ut(e);return(await(t?gt:_t)(n)).and(w(n))}function Nt(){return wt(Xe)}async function Pt(e){return r(e instanceof Date),(await yt(Xe,{recursive:!0})).andThenAsync(async t=>{try{for await(const{handle:n}of t)ft(n)&&(await n.getFile()).lastModified<=e.getTime()&&await n.remove()}catch(e){return v(e)}return A})}async function Ut(e,t){const n=new Uint8Array(e),r=new Je;return function(e,t,n){n||(n=t,t={}),"function"!=typeof n&&ue(7);var r=[],o=function(){for(var e=0;e<r.length;++e)r[e]()},i={},a=function(e,t){Ge(function(){n(e,t)})};Ge(function(){a=n});for(var s=e.length-22;101010256!=je(e,s);--s)if(!s||e.length-s>65558)return a(ue(13,0,1),null),o;var u=Ce(e,s+8);if(u){var l=u,c=je(e,s+16),f=117853008==je(e,s-20);if(f){var d=je(e,s-12);(f=101075792==je(e,d))&&(l=u=je(e,d+32),c=je(e,d+48))}for(var p=t&&t.filter,h=function(t){var n=function(e,t,n){var r=Ce(e,t+28),o=Ce(e,t+30),i=Be(e.subarray(t+46,t+46+r),!(2048&Ce(e,t+8))),a=t+46+r,s=qe(e,a,o,n,je(e,t+20),je(e,t+24),je(e,t+42)),u=s[0],l=s[1],c=s[2];return[Ce(e,t+10),u,l,i,a+o+Ce(e,t+32),c]}(e,c,f),s=n[0],l=n[1],d=n[2],h=n[3],_=n[4],g=n[5],y=function(e,t){return t+30+Ce(e,t+26)+Ce(e,t+28)}(e,g);c=_;var m=function(e,t){e?(o(),a(e,null)):(t&&(i[h]=t),--u||a(null,i))};if(!p||p({name:h,size:l,originalSize:d,compression:s}))if(s)if(8==s){var w=e.subarray(y,y+l);if(d<524288||l>.8*d)try{m(null,Ue(w,{out:new L(d)}))}catch(e){m(e,null)}else r.push(function(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&ue(7),$e(e,t,[Te],function(e){return xe(Ue(e.data[0],Oe(e.data[1])))},1,n)}(w,{size:d},m))}else m(ue(14,"unknown compression type "+s,1),null);else m(null,ae(e,y,y+l));else m(null,null)},_=0;_<l;++_)h()}else a(null,{})}(n,async(e,n)=>{if(e)return void r.resolve(v(e));const o=[];for(const e in n)"/"!==e.at(-1)&&o.push(bt(c(t,e),n[e]));r.resolve(at(o))}),await r.promise}async function Dt(e,t){return Ze(t),(await mt(e)).andThenAsync(e=>Ut(e,t))}async function Mt(e,t,n){return Qe(e),Ze(t),(await O(e,{redirect:"follow",...n,responseType:"arraybuffer",abortable:!1})).andThenAsync(e=>Ut(e,t))}function Ft(e,t,n){let r,o;Qe(t),r=!1;const i=(async()=>(await $t(e)).andThenAsync(async i=>{if(r)return v(st());const{filename:a=l(e),...s}=n??{},u=new FormData;return u.append(a,i,a),o=O(t,{method:"POST",...s,abortable:!0,body:u}),o.response}))();return{abort(e){r=!0,o?.abort(e)},get aborted(){return r},get response(){return i}}}async function It(e,t){const n=new Je;return He(e,{consume:!0},async(e,r)=>{if(e)n.resolve(v(e));else if(t){const e=await bt(t,r);n.resolve(e)}else n.resolve(w(r))}),await n.promise}async function Bt(e,t,n){return"string"==typeof t?Ze(t):(n=t,t=void 0),(await vt(e)).andThenAsync(async r=>{const o=l(e),i={};if(ft(r)){const e=await ht(r);i[o]=e}else{const t=await yt(e,{recursive:!0});if(t.isErr())return t.asErr();const r=n?.preserveRoot??!0;for await(const{path:e,handle:n}of t.unwrap())if(ft(n)){const t=r?c(o,e):e,a=await ht(n);i[t]=a}}return It(i,t)})}async function qt(e,t,n){return Qe(e),"string"==typeof t?Ze(t):(n=t,t=void 0),(await O(e,{redirect:"follow",...n,responseType:"arraybuffer",abortable:!1})).andThenAsync(n=>{const r={};return r[l(e)]=new Uint8Array(n),It(r,t)})}function Wt(){return"function"==typeof navigator?.storage?.getDirectory}function zt(e){return e?{name:e.name,message:e.message}:e}async function Ht(e){const t=await e.arrayBuffer();return{name:e.name,type:e.type,lastModified:e.lastModified,size:t.byteLength,data:t}}let Gt=1e3;var Jt=(e=>(e[e.createFile=0]="createFile",e[e.mkdir=1]="mkdir",e[e.move=2]="move",e[e.readDir=3]="readDir",e[e.remove=4]="remove",e[e.stat=5]="stat",e[e.writeFile=6]="writeFile",e[e.appendFile=7]="appendFile",e[e.copy=8]="copy",e[e.emptyDir=9]="emptyDir",e[e.exists=10]="exists",e[e.deleteTemp=11]="deleteTemp",e[e.mkTemp=12]="mkTemp",e[e.pruneTemp=13]="pruneTemp",e[e.readBlobFile=14]="readBlobFile",e[e.unzip=15]="unzip",e[e.zip=16]="zip",e))(Jt||{});let Yt,Vt;function Kt(e){const t=JSON.stringify(e);return(Yt??=new TextEncoder,Yt).encode(t)}function Xt(e){const t=Zt(e);return JSON.parse(t)}function Zt(e){return(Vt??=new TextDecoder,Vt).decode(e)}class Qt{i32a;u8a;headerLength=16;maxDataLength;constructor(e){this.i32a=new Int32Array(e),this.u8a=new Uint8Array(e),this.maxDataLength=e.byteLength-this.headerLength}}async function en(e,t){const{i32a:n,u8a:r,headerLength:o,maxDataLength:i}=e;for(;1!==Atomics.load(n,1););const a=n[2],s=r.slice(o,o+a);let u=await t(s);const l=u.byteLength;if(l>i){const e=`Response is too large: ${l} > ${i}. Consider grow the size of SharedArrayBuffer.`;if(u=Kt([{name:"RangeError",message:e}]),u.byteLength>i)throw Atomics.store(n,1,0),new RangeError(e)}n[2]=u.byteLength,r.set(u,o),Atomics.store(n,1,0),Atomics.store(n,0,0)}const tn={[Jt.createFile]:_t,[Jt.mkdir]:gt,[Jt.move]:Ot,[Jt.readDir]:yt,[Jt.remove]:wt,[Jt.stat]:vt,[Jt.writeFile]:bt,[Jt.appendFile]:At,[Jt.copy]:Tt,[Jt.emptyDir]:Rt,[Jt.exists]:xt,[Jt.deleteTemp]:Nt,[Jt.mkTemp]:Lt,[Jt.pruneTemp]:Pt,[Jt.readBlobFile]:$t,[Jt.unzip]:Dt,[Jt.zip]:Bt};let nn,rn;function on(){if("undefined"!=typeof window)throw new Error("Only can use in worker");if(nn)throw new Error("Worker messenger already started");addEventListener("message",e=>{const t=e.data;if(!(t instanceof SharedArrayBuffer))throw new TypeError("Only can post SharedArrayBuffer to Worker");nn=new Qt(t),postMessage(!0),async function(){for(;;)try{await en(nn,async e=>{const[t,...n]=Xt(e);let r;t===Jt.writeFile||t===Jt.appendFile?Array.isArray(n[1])&&(n[1]=new Uint8Array(n[1])):t===Jt.pruneTemp&&(n[0]=new Date(n[0]));const o=tn[t];try{const e=await o(...n);if(e.isErr())r=Kt([zt(e.unwrapErr())]);else{let n;if(t===Jt.readBlobFile){const t=e.unwrap(),r=await Ht(t);n={...r,data:[...new Uint8Array(r.data)]}}else if(t===Jt.readDir){const t=e.unwrap(),r=[];for await(const{path:e,handle:n}of t){const t=await ct(n);r.push({path:e,handle:t})}n=r}else if(t===Jt.stat){const t=e.unwrap();n=await ct(t)}else if(t===Jt.zip){const t=e.unwrap();n=t instanceof Uint8Array?[...t]:t}else n=e.unwrap();r=Kt([null,n])}}catch(e){r=Kt([zt(e)])}return r})}catch(e){console.error(e instanceof Error?e.stack:e)}}()})}function an(e){if("undefined"==typeof window)throw new Error("Only can use in main thread");if(rn)throw new Error("Main messenger already started");return new Promise(t=>{const{worker:n,bufferLength:o=1048576,opTimeout:i=1e3}=e;r(n instanceof Worker||n instanceof URL||"string"==typeof n&&n),r(o>16&&o%4==0),r(Number.isInteger(i)&&i>0),function(e){Gt=e}(i);const a=n instanceof Worker?n:new Worker(n),s=new SharedArrayBuffer(o);a.addEventListener("message",e=>{e.data&&(rn=new Qt(s),t())}),a.postMessage(s)})}function sn(){return rn}function un(e){r(null!=e),rn=e}function ln(e,...t){if(!rn)return v(new Error("Worker not initialized. Come back later."));const n=Kt([e,...t]);try{const e=Xt(function(e,t){const{i32a:n,u8a:r,headerLength:o,maxDataLength:i}=e,a=t.byteLength;if(a>i)throw new RangeError(`Request is too large: ${a} > ${i}. Consider grow the size of SharedArrayBuffer.`);Atomics.store(n,0,1),n[2]=a,r.set(t,o),Atomics.store(n,1,1),function(e){const t=Date.now();for(;!e();)if(Date.now()-t>Gt){const e=new Error("Operating Timeout");throw e.name=R,e}}(()=>0===Atomics.load(n,0));const s=n[2];return r.slice(o,o+s)}(rn,n)),t=e[0],r=t?v(function(e){const t=new Error(e.message);return t.name=e.name,t}(t)):w(e[1]??void 0);return r}catch(e){return v(e)}}function cn(e){return ln(Jt.createFile,e)}function fn(e){return ln(Jt.mkdir,e)}function dn(e,t,n){return ln(Jt.move,e,t,n)}function pn(e,t){return ln(Jt.readDir,e,t)}function hn(e,t){return ln(Jt.readBlobFile,e).map(e=>{const n=new Uint8Array(e.data);switch(e.data=n.buffer.slice(n.byteOffset,n.byteOffset+n.byteLength),t?.encoding){case"blob":return e;case"utf8":return Zt(new Uint8Array(e.data));default:return e.data}})}function _n(e){return ln(Jt.remove,e)}function gn(e){return ln(Jt.stat,e)}function yn(e){return e instanceof ArrayBuffer?[...new Uint8Array(e)]:ArrayBuffer.isView(e)?[...new Uint8Array(e.buffer)]:e}function mn(e,t,n){return ln(Jt.writeFile,e,yn(t),n)}function wn(e,t){return ln(Jt.appendFile,e,yn(t))}function vn(e,t,n){return ln(Jt.copy,e,t,n)}function bn(e){return ln(Jt.emptyDir,e)}function kn(e,t){return ln(Jt.exists,e,t)}function En(){return ln(Jt.deleteTemp)}function Sn(e){return ln(Jt.mkTemp,e)}function An(e){return ln(Jt.pruneTemp,e)}function Tn(e){return hn(e,{encoding:"blob"})}function Rn(e){return xn(e).andThen(e=>{try{return w(JSON.parse(e))}catch(e){return v(e)}})}function xn(e){return hn(e,{encoding:"utf8"})}function On(e,t){return ln(Jt.unzip,e,t)}function $n(e,t,n){return ln(Jt.zip,e,t,n).map(e=>e?new Uint8Array(e):e)}},8843(e,t,n){"use strict";n.d(t,{basename:()=>g,dirname:()=>m,join:()=>b,parse:()=>k});const r=function(){const e=globalThis,t=e.Deno?.build?.os;return"string"==typeof t?"windows"===t:e.navigator?.platform?.startsWith("Win")??e.process?.platform?.startsWith("win")??!1}();function o(e){if("string"!=typeof e)throw new TypeError(`Path must be a string, received "${JSON.stringify(e)}"`)}function i(e,t){if(t.length>=e.length)return e;const n=e.length-t.length;for(let r=t.length-1;r>=0;--r)if(e.charCodeAt(n+r)!==t.charCodeAt(r))return e;return e.slice(0,-t.length)}function a(e,t,n=0){let r=!1,o=e.length;for(let i=e.length-1;i>=n;--i)if(t(e.charCodeAt(i))){if(r){n=i+1;break}}else r||(r=!0,o=i+1);return e.slice(n,o)}function s(e,t){if(o(e),0===e.length)return e;if("string"!=typeof t)throw new TypeError(`Suffix must be a string, received "${JSON.stringify(t)}"`)}function u(e){if("file:"!==(e=e instanceof URL?e:new URL(e)).protocol)throw new TypeError(`URL must be a file URL: received "${e.protocol}"`);return e}function l(e){return e=u(e),decodeURIComponent(e.pathname.replace(/%(?![0-9A-Fa-f]{2})/g,"%25"))}function c(e,t){if(e.length<=1)return e;let n=e.length;for(let r=e.length-1;r>0&&t(e.charCodeAt(r));r--)n=r;return e.slice(0,n)}function f(e){return 47===e}function d(e){return 47===e}function p(e){return 47===e||92===e}function h(e){return e>=97&&e<=122||e>=65&&e<=90}function _(e){e=u(e);let t=decodeURIComponent(e.pathname.replace(/\//g,"\\").replace(/%(?![0-9A-Fa-f]{2})/g,"%25")).replace(/^\\*([A-Za-z]:)(\\|$)/,"$1\\");return""!==e.hostname&&(t=`\\\\${e.hostname}${t}`),t}function g(e,t=""){return r?function(e,t=""){e instanceof URL&&(e=_(e)),s(e,t);let n=0;e.length>=2&&h(e.charCodeAt(0))&&58===e.charCodeAt(1)&&(n=2);const r=c(a(e,p,n),p);return t?i(r,t):r}(e,t):function(e,t=""){e instanceof URL&&(e=l(e)),s(e,t);const n=c(a(e,f),f);return t?i(n,t):n}(e,t)}function y(e){if(o(e),0===e.length)return"."}function m(e){return r?function(e){e instanceof URL&&(e=_(e)),y(e);const t=e.length;let n=-1,r=-1,o=!0,i=0;const a=e.charCodeAt(0);if(t>1)if(p(a)){if(n=i=1,p(e.charCodeAt(1))){let r=2,o=r;for(;r<t&&!p(e.charCodeAt(r));++r);if(r<t&&r!==o){for(o=r;r<t&&p(e.charCodeAt(r));++r);if(r<t&&r!==o){for(o=r;r<t&&!p(e.charCodeAt(r));++r);if(r===t)return e;r!==o&&(n=i=r+1)}}}}else h(a)&&58===e.charCodeAt(1)&&(n=i=2,t>2&&p(e.charCodeAt(2))&&(n=i=3));else if(p(a))return e;for(let n=t-1;n>=i;--n)if(p(e.charCodeAt(n))){if(!o){r=n;break}}else o=!1;if(-1===r){if(-1===n)return".";r=n}return c(e.slice(0,r),d)}(e):function(e){e instanceof URL&&(e=l(e)),y(e);let t=-1,n=!1;for(let r=e.length-1;r>=1;--r)if(f(e.charCodeAt(r))){if(n){t=r;break}}else n=!0;return-1===t?f(e.charCodeAt(0))?"/":".":c(e.slice(0,t),f)}(e)}function w(e){if(o(e),0===e.length)return"."}function v(e,t,n,r){let o,i="",a=0,s=-1,u=0;for(let l=0;l<=e.length;++l){if(l<e.length)o=e.charCodeAt(l);else{if(r(o))break;o=47}if(r(o)){if(s===l-1||1===u);else if(s!==l-1&&2===u){if(i.length<2||2!==a||46!==i.charCodeAt(i.length-1)||46!==i.charCodeAt(i.length-2)){if(i.length>2){const e=i.lastIndexOf(n);-1===e?(i="",a=0):(i=i.slice(0,e),a=i.length-1-i.lastIndexOf(n)),s=l,u=0;continue}if(2===i.length||1===i.length){i="",a=0,s=l,u=0;continue}}t&&(i.length>0?i+=`${n}..`:i="..",a=2)}else i.length>0?i+=n+e.slice(s+1,l):i=e.slice(s+1,l),a=l-s-1;s=l,u=0}else 46===o&&-1!==u?++u:u=-1}return i}function b(e,...t){return r?function(e,...t){if(e instanceof URL&&(e=_(e)),(t=e?[e,...t]:t).forEach(e=>o(e)),t=t.filter(e=>e.length>0),0===t.length)return".";let n=!0,r=0;const i=t[0];if(p(i.charCodeAt(0))){++r;const e=i.length;e>1&&p(i.charCodeAt(1))&&(++r,e>2&&(p(i.charCodeAt(2))?++r:n=!1))}let a=t.join("\\");if(n){for(;r<a.length&&p(a.charCodeAt(r));++r);r>=2&&(a=`\\${a.slice(r)}`)}return function(e){e instanceof URL&&(e=_(e)),w(e);const t=e.length;let n,r=0,o=!1;const i=e.charCodeAt(0);if(t>1)if(p(i))if(o=!0,p(e.charCodeAt(1))){let o=2,i=o;for(;o<t&&!p(e.charCodeAt(o));++o);if(o<t&&o!==i){const a=e.slice(i,o);for(i=o;o<t&&p(e.charCodeAt(o));++o);if(o<t&&o!==i){for(i=o;o<t&&!p(e.charCodeAt(o));++o);if(o===t)return`\\\\${a}\\${e.slice(i)}\\`;o!==i&&(n=`\\\\${a}\\${e.slice(i,o)}`,r=o)}}}else r=1;else h(i)&&58===e.charCodeAt(1)&&(n=e.slice(0,2),r=2,t>2&&p(e.charCodeAt(2))&&(o=!0,r=3));else if(p(i))return"\\";let a;return a=r<t?v(e.slice(r),!o,"\\",p):"",0!==a.length||o||(a="."),a.length>0&&p(e.charCodeAt(t-1))&&(a+="\\"),void 0===n?o?a.length>0?`\\${a}`:"\\":a:o?a.length>0?`${n}\\${a}`:`${n}\\`:n+a}(a)}(e,...t):function(e,...t){if(void 0===e)return".";e instanceof URL&&(e=l(e)),(t=e?[e,...t]:t).forEach(e=>o(e));const n=t.filter(e=>e.length>0).join("/");return""===n?".":function(e){e instanceof URL&&(e=l(e)),w(e);const t=f(e.charCodeAt(0)),n=f(e.charCodeAt(e.length-1));return 0!==(e=v(e,!t,"/",f)).length||t||(e="."),e.length>0&&n&&(e+="/"),t?`/${e}`:e}(n)}(e,...t)}function k(e){return r?function(e){o(e);const t={root:"",dir:"",base:"",ext:"",name:""},n=e.length;if(0===n)return t;let r=0,i=e.charCodeAt(0);if(n>1){if(p(i)){if(r=1,p(e.charCodeAt(1))){let t=2,o=t;for(;t<n&&!p(e.charCodeAt(t));++t);if(t<n&&t!==o){for(o=t;t<n&&p(e.charCodeAt(t));++t);if(t<n&&t!==o){for(o=t;t<n&&!p(e.charCodeAt(t));++t);t===n?r=t:t!==o&&(r=t+1)}}}}else if(h(i)&&58===e.charCodeAt(1)){if(r=2,!(n>2))return t.root=t.dir=e,t;if(p(e.charCodeAt(2))){if(3===n)return t.root=t.dir=e,t.base="\\",t;r=3}}}else if(p(i))return t.root=t.dir=e,t.base="\\",t;r>0&&(t.root=e.slice(0,r));let a=-1,s=r,u=-1,l=!0,c=e.length-1,f=0;for(;c>=r;--c)if(i=e.charCodeAt(c),p(i)){if(!l){s=c+1;break}}else-1===u&&(l=!1,u=c+1),46===i?-1===a?a=c:1!==f&&(f=1):-1!==a&&(f=-1);return-1===a||-1===u||0===f||1===f&&a===u-1&&a===s+1?-1!==u&&(t.base=t.name=e.slice(s,u)):(t.name=e.slice(s,a),t.base=e.slice(s,u),t.ext=e.slice(a,u)),t.base=t.base||"\\",t.dir=s>0&&s!==r?e.slice(0,s-1):t.root,t}(e):function(e){o(e);const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const n=f(e.charCodeAt(0));let r;n?(t.root="/",r=1):r=0;let i=-1,a=0,s=-1,u=!0,l=e.length-1,d=0;for(;l>=r;--l){const t=e.charCodeAt(l);if(f(t)){if(!u){a=l+1;break}}else-1===s&&(u=!1,s=l+1),46===t?-1===i?i=l:1!==d&&(d=1):-1!==i&&(d=-1)}return-1===i||-1===s||0===d||1===d&&i===s-1&&i===a+1?(-1!==s&&(t.base=t.name=0===a&&n?e.slice(1,s):e.slice(a,s)),t.base=t.base||"/"):(0===a&&n?(t.name=e.slice(1,i),t.base=e.slice(1,s)):(t.name=e.slice(a,i),t.base=e.slice(a,s)),t.ext=e.slice(i,s)),a>0?t.dir=c(e.slice(0,a-1),f):n&&(t.dir="/"),t}(e)}}};const t={};function n(r){const o=t[r];if(void 0!==o)return o.exports;const i=t[r]={id:r,loaded:!1,exports:{}};return e[r](i,i.exports,n),i.loaded=!0,i.exports}n.m=e,(()=>{const e=Symbol("webpack queues"),t=Symbol("webpack exports"),r=Symbol("webpack error"),o=e=>{e?.d<1&&(e.d=1,e.forEach(e=>e.r--),e.forEach(e=>e.r--?e.r++:e()))};n.a=(n,i,a)=>{let s;a&&((s=[]).d=-1);const u=new Set,l=n.exports;let c,f,d;const p=new Promise((e,t)=>{d=t,f=e});p[t]=l,p[e]=e=>(s&&e(s),u.forEach(e),p.catch(e=>{})),n.exports=p,i(n=>{let i;c=(n=>n.map(n=>{if(null!==n&&"object"==typeof n){if(n[e])return n;if(n.then){const i=[];i.d=0,n.then(e=>{a[t]=e,o(i)},e=>{a[r]=e,o(i)});const a={};return a[e]=e=>e(i),a}}const i={};return i[e]=e=>{},i[t]=n,i}))(n);const a=()=>c.map(e=>{if(e[r])throw e[r];return e[t]}),l=new Promise(t=>{i=()=>t(a),i.r=0;const n=e=>e!==s&&!u.has(e)&&(u.add(e),e&&!e.d&&(i.r++,e.push(i)));c.forEach(t=>t[e](n))});return i.r?l:a()},e=>(e?d(p[r]=e):f(l),o(s))),s?.d<0&&(s.d=0)}})(),(()=>{const e=Object.getPrototypeOf;let t;n.t=function(r,o){if(1&o&&(r=this(r)),8&o)return r;if("object"==typeof r&&r){if(4&o&&r.__esModule)return r;if(16&o&&"function"==typeof r.then)return r}const i=Object.create(null);n.r(i);const a={};t=t||[null,e({}),e([]),e(e)];for(var s=2&o&&r;("object"==typeof s||"function"==typeof s)&&!~t.indexOf(s);s=e(s))Object.getOwnPropertyNames(s).forEach(e=>a[e]=()=>r[e]);return a.default=()=>r,n.d(i,a),i}})(),n.d=(e,t)=>{if(Array.isArray(t))for(var r=0;r<t.length;){var o=t[r++],i=t[r++],a=0===i?{enumerable:!0,value:t[r++]}:{enumerable:!0,get:i};n.o(e,o)||Object.defineProperty(e,o,a)}else for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce((t,r)=>(n.f[r](e,t),t),[])),n.u=e=>e+".libevm-contract-deployment-compiler-output.js",n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set(){throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{const e={},t="evm-contracts-tools:";n.l=(r,o,i,a)=>{if(e[r])return void e[r].push(o);let s,u;if(void 0!==i){const e=document.getElementsByTagName("script");for(var l=0;l<e.length;l++){const n=e[l];if(n.getAttribute("src")==r||n.getAttribute("data-webpack")==t+i){s=n;break}}}s||(u=!0,s=document.createElement("script"),s.charset="utf-8",n.nc&&s.setAttribute("nonce",n.nc),s.setAttribute("data-webpack",t+i),s.src=r),e[r]=[o];const c=(t,n)=>{s.onerror=s.onload=null,clearTimeout(f);const o=e[r];if(delete e[r],s.parentNode?.removeChild(s),o?.forEach(e=>e(n)),t)return t(n)},f=setTimeout(c.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=c.bind(null,s.onerror),s.onload=c.bind(null,s.onload),u&&document.head.appendChild(s)}})(),n.r=e=>{Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{let e;n.g.importScripts&&(e=n.g.location+"");const t=n.g.document;if(!e&&t&&("SCRIPT"===t.currentScript?.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){const n=t.getElementsByTagName("script");if(n.length){let t=n.length-1;for(;t>-1&&(!e||!/^https?:/.test(e));)e=n[t--].src}}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:|[?#].*$/g,"").replace(/\/[^/]+$/,"/"),n.p=e})(),(()=>{const e={792:0};n.f.j=(t,r)=>{let o=n.o(e,t)?e[t]:void 0;if(0!==o)if(o)r.push(o[2]);else{const i=new Promise((n,r)=>o=e[t]=[n,r]);r.push(o[2]=i);const a=new Error,s=r=>{if(n.o(e,t)&&(o=e[t],0!==o&&(e[t]=void 0),o)){const e=r&&("load"===r.type?"missing":r.type),n=r&&r.target&&r.target.src;a.message="Loading chunk "+t+" failed.\n("+e+": "+n+")",a.name="ChunkLoadError",a.type=e,a.request=n,a.event=r,o[1](a)}};n.l(n.p+n.u(t),s,"chunk-"+t,t)}};const t=(t,r)=>{let[o,i,a]=r;var s,u,l=0;if(o.some(t=>0!==e[t])){for(s in i)n.o(i,s)&&(n.m[s]=i[s]);a&&a(n)}for(t&&t(r);l<o.length;l++)u=o[l],n.o(e,u)&&e[u]&&e[u][0](),e[u]=0},r=self.webpackChunkevm_contracts_tools=self.webpackChunkevm_contracts_tools||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})(),n(8306)})();
|