@gibme/crypto-browser 7.0.5 → 20.0.0
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/Crypto.min.js +1 -1
- package/dist/Crypto.min.js.LICENSE.txt +0 -7
- package/dist/Crypto.min.js.map +1 -1
- package/dist/browser/src/index.d.ts +3 -3
- package/dist/browser/src/index.js +5 -5
- package/dist/browser/src/index.js.map +1 -1
- package/dist/browser/src/version.d.ts +1 -1
- package/dist/browser/src/version.js +1 -1
- package/dist/browser/src/version.js.map +1 -1
- package/dist/types/index.d.ts +246 -22
- package/dist/types/index.js +151 -29
- package/dist/types/index.js.map +1 -1
- package/dist/types/lite.d.ts +2 -2
- package/dist/types/lite.js +1 -1
- package/dist/types/lite.js.map +1 -1
- package/dist/types/types.d.ts +14 -198
- package/dist/types/types.js +1 -32
- package/dist/types/types.js.map +1 -1
- package/dist/types/uint64.d.ts +13 -12
- package/dist/types/uint64.js +22 -30
- package/dist/types/uint64.js.map +1 -1
- package/package.json +5 -5
- package/dist/types/helpers.d.ts +0 -43
- package/dist/types/helpers.js +0 -123
- package/dist/types/helpers.js.map +0 -1
package/dist/Crypto.min.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/*! For license information please see Crypto.min.js.LICENSE.txt */
|
|
2
|
-
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var r=e();for(var n in r)("object"==typeof exports?exports:t)[n]=r[n]}}(self,(()=>(()=>{var t={4148:(t,e,r)=>{"use strict";var n=r(5606),o=r(6763);function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(void 0,o=function(t){if("object"!==i(t)||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!==i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===i(o)?o:String(o)),n)}var o}function c(t,e,r){return e&&a(t.prototype,e),r&&a(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}var u,s,f=r(9597).codes,l=f.ERR_AMBIGUOUS_ARGUMENT,p=f.ERR_INVALID_ARG_TYPE,y=f.ERR_INVALID_ARG_VALUE,h=f.ERR_INVALID_RETURN_VALUE,g=f.ERR_MISSING_ARGS,d=r(3918),b=r(537).inspect,m=r(537).types,v=m.isPromise,_=m.isRegExp,w=r(1514)(),E=r(9394)(),O=r(8075)("RegExp.prototype.test");function A(){var t=r(2299);u=t.isDeepEqual,s=t.isDeepStrictEqual}new Map;var x=!1,S=t.exports=P,j={};function I(t){if(t.message instanceof Error)throw t.message;throw new d(t)}function k(t,e,r,n){if(!r){var o=!1;if(0===e)o=!0,n="No value argument passed to `assert.ok()`";else if(n instanceof Error)throw n;var i=new d({actual:r,expected:!0,message:n,operator:"==",stackStartFn:t});throw i.generatedMessage=o,i}}function P(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];k.apply(void 0,[P,e.length].concat(e))}S.fail=function t(e,r,i,a,c){var u,s=arguments.length;if(0===s?u="Failed":1===s?(i=e,e=void 0):(!1===x&&(x=!0,(n.emitWarning?n.emitWarning:o.warn.bind(o))("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094")),2===s&&(a="!=")),i instanceof Error)throw i;var f={actual:e,expected:r,operator:void 0===a?"fail":a,stackStartFn:c||t};void 0!==i&&(f.message=i);var l=new d(f);throw u&&(l.message=u,l.generatedMessage=!0),l},S.AssertionError=d,S.ok=P,S.equal=function t(e,r,n){if(arguments.length<2)throw new g("actual","expected");e!=r&&I({actual:e,expected:r,message:n,operator:"==",stackStartFn:t})},S.notEqual=function t(e,r,n){if(arguments.length<2)throw new g("actual","expected");e==r&&I({actual:e,expected:r,message:n,operator:"!=",stackStartFn:t})},S.deepEqual=function t(e,r,n){if(arguments.length<2)throw new g("actual","expected");void 0===u&&A(),u(e,r)||I({actual:e,expected:r,message:n,operator:"deepEqual",stackStartFn:t})},S.notDeepEqual=function t(e,r,n){if(arguments.length<2)throw new g("actual","expected");void 0===u&&A(),u(e,r)&&I({actual:e,expected:r,message:n,operator:"notDeepEqual",stackStartFn:t})},S.deepStrictEqual=function t(e,r,n){if(arguments.length<2)throw new g("actual","expected");void 0===u&&A(),s(e,r)||I({actual:e,expected:r,message:n,operator:"deepStrictEqual",stackStartFn:t})},S.notDeepStrictEqual=function t(e,r,n){if(arguments.length<2)throw new g("actual","expected");void 0===u&&A(),s(e,r)&&I({actual:e,expected:r,message:n,operator:"notDeepStrictEqual",stackStartFn:t})},S.strictEqual=function t(e,r,n){if(arguments.length<2)throw new g("actual","expected");E(e,r)||I({actual:e,expected:r,message:n,operator:"strictEqual",stackStartFn:t})},S.notStrictEqual=function t(e,r,n){if(arguments.length<2)throw new g("actual","expected");E(e,r)&&I({actual:e,expected:r,message:n,operator:"notStrictEqual",stackStartFn:t})};var B=c((function t(e,r,n){var o=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),r.forEach((function(t){t in e&&(void 0!==n&&"string"==typeof n[t]&&_(e[t])&&O(e[t],n[t])?o[t]=n[t]:o[t]=e[t])}))}));function N(t,e,r,n){if("function"!=typeof e){if(_(e))return O(e,t);if(2===arguments.length)throw new p("expected",["Function","RegExp"],e);if("object"!==i(t)||null===t){var o=new d({actual:t,expected:e,message:r,operator:"deepStrictEqual",stackStartFn:n});throw o.operator=n.name,o}var a=Object.keys(e);if(e instanceof Error)a.push("name","message");else if(0===a.length)throw new y("error",e,"may not be an empty object");return void 0===u&&A(),a.forEach((function(o){"string"==typeof t[o]&&_(e[o])&&O(e[o],t[o])||function(t,e,r,n,o,i){if(!(r in t)||!s(t[r],e[r])){if(!n){var a=new B(t,o),c=new B(e,o,t),u=new d({actual:a,expected:c,operator:"deepStrictEqual",stackStartFn:i});throw u.actual=t,u.expected=e,u.operator=i.name,u}I({actual:t,expected:e,message:n,operator:i.name,stackStartFn:i})}}(t,e,o,r,a,n)})),!0}return void 0!==e.prototype&&t instanceof e||!Error.isPrototypeOf(e)&&!0===e.call({},t)}function R(t){if("function"!=typeof t)throw new p("fn","Function",t);try{t()}catch(t){return t}return j}function T(t){return v(t)||null!==t&&"object"===i(t)&&"function"==typeof t.then&&"function"==typeof t.catch}function U(t){return Promise.resolve().then((function(){var e;if("function"==typeof t){if(!T(e=t()))throw new h("instance of Promise","promiseFn",e)}else{if(!T(t))throw new p("promiseFn",["Function","Promise"],t);e=t}return Promise.resolve().then((function(){return e})).then((function(){return j})).catch((function(t){return t}))}))}function L(t,e,r,n){if("string"==typeof r){if(4===arguments.length)throw new p("error",["Object","Error","Function","RegExp"],r);if("object"===i(e)&&null!==e){if(e.message===r)throw new l("error/message",'The error message "'.concat(e.message,'" is identical to the message.'))}else if(e===r)throw new l("error/message",'The error "'.concat(e,'" is identical to the message.'));n=r,r=void 0}else if(null!=r&&"object"!==i(r)&&"function"!=typeof r)throw new p("error",["Object","Error","Function","RegExp"],r);if(e===j){var o="";r&&r.name&&(o+=" (".concat(r.name,")")),o+=n?": ".concat(n):".";var a="rejects"===t.name?"rejection":"exception";I({actual:void 0,expected:r,operator:t.name,message:"Missing expected ".concat(a).concat(o),stackStartFn:t})}if(r&&!N(e,r,n,t))throw e}function F(t,e,r,n){if(e!==j){if("string"==typeof r&&(n=r,r=void 0),!r||N(e,r)){var o=n?": ".concat(n):".",i="doesNotReject"===t.name?"rejection":"exception";I({actual:e,expected:r,operator:t.name,message:"Got unwanted ".concat(i).concat(o,"\n")+'Actual message: "'.concat(e&&e.message,'"'),stackStartFn:t})}throw e}}function M(t,e,r,n,o){if(!_(e))throw new p("regexp","RegExp",e);var a="match"===o;if("string"!=typeof t||O(e,t)!==a){if(r instanceof Error)throw r;var c=!r;r=r||("string"!=typeof t?'The "string" argument must be of type string. Received type '+"".concat(i(t)," (").concat(b(t),")"):(a?"The input did not match the regular expression ":"The input was expected to not match the regular expression ")+"".concat(b(e),". Input:\n\n").concat(b(t),"\n"));var u=new d({actual:t,expected:e,message:r,operator:o,stackStartFn:n});throw u.generatedMessage=c,u}}function D(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];k.apply(void 0,[D,e.length].concat(e))}S.throws=function t(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];L.apply(void 0,[t,R(e)].concat(n))},S.rejects=function t(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return U(e).then((function(e){return L.apply(void 0,[t,e].concat(n))}))},S.doesNotThrow=function t(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];F.apply(void 0,[t,R(e)].concat(n))},S.doesNotReject=function t(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return U(e).then((function(e){return F.apply(void 0,[t,e].concat(n))}))},S.ifError=function t(e){if(null!=e){var r="ifError got unwanted exception: ";"object"===i(e)&&"string"==typeof e.message?0===e.message.length&&e.constructor?r+=e.constructor.name:r+=e.message:r+=b(e);var n=new d({actual:e,expected:null,operator:"ifError",message:r,stackStartFn:t}),o=e.stack;if("string"==typeof o){var a=o.split("\n");a.shift();for(var c=n.stack.split("\n"),u=0;u<a.length;u++){var s=c.indexOf(a[u]);if(-1!==s){c=c.slice(0,s);break}}n.stack="".concat(c.join("\n"),"\n").concat(a.join("\n"))}throw n}},S.match=function t(e,r,n){M(e,r,n,t,"match")},S.doesNotMatch=function t(e,r,n){M(e,r,n,t,"doesNotMatch")},S.strict=w(D,S,{equal:S.strictEqual,deepEqual:S.deepStrictEqual,notEqual:S.notStrictEqual,notDeepEqual:S.notDeepStrictEqual}),S.strict.strict=S.strict},3918:(t,e,r)=>{"use strict";var n=r(5606);function o(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?o(Object(r),!0).forEach((function(e){var n,o,i;n=t,o=e,i=r[e],(o=c(o))in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,c(n.key),n)}}function c(t){var e=function(t){if("object"!==g(t)||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!==g(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===g(e)?e:String(e)}function u(t,e){if(e&&("object"===g(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return s(t)}function s(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function f(t){var e="function"==typeof Map?new Map:void 0;return f=function(t){if(null===t||(r=t,-1===Function.toString.call(r).indexOf("[native code]")))return t;var r;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return l(t,arguments,h(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),y(n,t)},f(t)}function l(t,e,r){return l=p()?Reflect.construct.bind():function(t,e,r){var n=[null];n.push.apply(n,e);var o=new(Function.bind.apply(t,n));return r&&y(o,r.prototype),o},l.apply(null,arguments)}function p(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function y(t,e){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},y(t,e)}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}function g(t){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},g(t)}var d=r(537).inspect,b=r(9597).codes.ERR_INVALID_ARG_TYPE;function m(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}var v="",_="",w="",E="",O={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function A(t){var e=Object.keys(t),r=Object.create(Object.getPrototypeOf(t));return e.forEach((function(e){r[e]=t[e]})),Object.defineProperty(r,"message",{value:t.message}),r}function x(t){return d(t,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}var S=function(t,e){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&y(t,e)}(S,t);var r,o,c,f,l=(r=S,o=p(),function(){var t,e=h(r);if(o){var n=h(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return u(this,t)});function S(t){var e;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,S),"object"!==g(t)||null===t)throw new b("options","Object",t);var r=t.message,o=t.operator,i=t.stackStartFn,a=t.actual,c=t.expected,f=Error.stackTraceLimit;if(Error.stackTraceLimit=0,null!=r)e=l.call(this,String(r));else if(n.stderr&&n.stderr.isTTY&&(n.stderr&&n.stderr.getColorDepth&&1!==n.stderr.getColorDepth()?(v="[34m",_="[32m",E="[39m",w="[31m"):(v="",_="",E="",w="")),"object"===g(a)&&null!==a&&"object"===g(c)&&null!==c&&"stack"in a&&a instanceof Error&&"stack"in c&&c instanceof Error&&(a=A(a),c=A(c)),"deepStrictEqual"===o||"strictEqual"===o)e=l.call(this,function(t,e,r){var o="",i="",a=0,c="",u=!1,s=x(t),f=s.split("\n"),l=x(e).split("\n"),p=0,y="";if("strictEqual"===r&&"object"===g(t)&&"object"===g(e)&&null!==t&&null!==e&&(r="strictEqualObject"),1===f.length&&1===l.length&&f[0]!==l[0]){var h=f[0].length+l[0].length;if(h<=10){if(!("object"===g(t)&&null!==t||"object"===g(e)&&null!==e||0===t&&0===e))return"".concat(O[r],"\n\n")+"".concat(f[0]," !== ").concat(l[0],"\n")}else if("strictEqualObject"!==r&&h<(n.stderr&&n.stderr.isTTY?n.stderr.columns:80)){for(;f[0][p]===l[0][p];)p++;p>2&&(y="\n ".concat(function(t,e){if(e=Math.floor(e),0==t.length||0==e)return"";var r=t.length*e;for(e=Math.floor(Math.log(e)/Math.log(2));e;)t+=t,e--;return t+t.substring(0,r-t.length)}(" ",p),"^"),p=0)}}for(var d=f[f.length-1],b=l[l.length-1];d===b&&(p++<2?c="\n ".concat(d).concat(c):o=d,f.pop(),l.pop(),0!==f.length&&0!==l.length);)d=f[f.length-1],b=l[l.length-1];var A=Math.max(f.length,l.length);if(0===A){var S=s.split("\n");if(S.length>30)for(S[26]="".concat(v,"...").concat(E);S.length>27;)S.pop();return"".concat(O.notIdentical,"\n\n").concat(S.join("\n"),"\n")}p>3&&(c="\n".concat(v,"...").concat(E).concat(c),u=!0),""!==o&&(c="\n ".concat(o).concat(c),o="");var j=0,I=O[r]+"\n".concat(_,"+ actual").concat(E," ").concat(w,"- expected").concat(E),k=" ".concat(v,"...").concat(E," Lines skipped");for(p=0;p<A;p++){var P=p-a;if(f.length<p+1)P>1&&p>2&&(P>4?(i+="\n".concat(v,"...").concat(E),u=!0):P>3&&(i+="\n ".concat(l[p-2]),j++),i+="\n ".concat(l[p-1]),j++),a=p,o+="\n".concat(w,"-").concat(E," ").concat(l[p]),j++;else if(l.length<p+1)P>1&&p>2&&(P>4?(i+="\n".concat(v,"...").concat(E),u=!0):P>3&&(i+="\n ".concat(f[p-2]),j++),i+="\n ".concat(f[p-1]),j++),a=p,i+="\n".concat(_,"+").concat(E," ").concat(f[p]),j++;else{var B=l[p],N=f[p],R=N!==B&&(!m(N,",")||N.slice(0,-1)!==B);R&&m(B,",")&&B.slice(0,-1)===N&&(R=!1,N+=","),R?(P>1&&p>2&&(P>4?(i+="\n".concat(v,"...").concat(E),u=!0):P>3&&(i+="\n ".concat(f[p-2]),j++),i+="\n ".concat(f[p-1]),j++),a=p,i+="\n".concat(_,"+").concat(E," ").concat(N),o+="\n".concat(w,"-").concat(E," ").concat(B),j+=2):(i+=o,o="",1!==P&&0!==p||(i+="\n ".concat(N),j++))}if(j>20&&p<A-2)return"".concat(I).concat(k,"\n").concat(i,"\n").concat(v,"...").concat(E).concat(o,"\n")+"".concat(v,"...").concat(E)}return"".concat(I).concat(u?k:"","\n").concat(i).concat(o).concat(c).concat(y)}(a,c,o));else if("notDeepStrictEqual"===o||"notStrictEqual"===o){var p=O[o],y=x(a).split("\n");if("notStrictEqual"===o&&"object"===g(a)&&null!==a&&(p=O.notStrictEqualObject),y.length>30)for(y[26]="".concat(v,"...").concat(E);y.length>27;)y.pop();e=1===y.length?l.call(this,"".concat(p," ").concat(y[0])):l.call(this,"".concat(p,"\n\n").concat(y.join("\n"),"\n"))}else{var h=x(a),d="",j=O[o];"notDeepEqual"===o||"notEqual"===o?(h="".concat(O[o],"\n\n").concat(h)).length>1024&&(h="".concat(h.slice(0,1021),"...")):(d="".concat(x(c)),h.length>512&&(h="".concat(h.slice(0,509),"...")),d.length>512&&(d="".concat(d.slice(0,509),"...")),"deepEqual"===o||"equal"===o?h="".concat(j,"\n\n").concat(h,"\n\nshould equal\n\n"):d=" ".concat(o," ").concat(d)),e=l.call(this,"".concat(h).concat(d))}return Error.stackTraceLimit=f,e.generatedMessage=!r,Object.defineProperty(s(e),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),e.code="ERR_ASSERTION",e.actual=a,e.expected=c,e.operator=o,Error.captureStackTrace&&Error.captureStackTrace(s(e),i),e.stack,e.name="AssertionError",u(e)}return c=S,(f=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:e,value:function(t,e){return d(this,i(i({},e),{},{customInspect:!1,depth:0}))}}])&&a(c.prototype,f),Object.defineProperty(c,"prototype",{writable:!1}),S}(f(Error),d.custom);t.exports=S},9597:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},o(t,e)}function i(t){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},i(t)}var a,c,u={};function s(t,e,r){r||(r=Error);var a=function(r){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&o(t,e)}(f,r);var a,c,u,s=(c=f,u=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=i(c);if(u){var r=i(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function f(r,n,o){var i;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,f),i=s.call(this,function(t,r,n){return"string"==typeof e?e:e(t,r,n)}(r,n,o)),i.code=t,i}return a=f,Object.defineProperty(a,"prototype",{writable:!1}),a}(r);u[t]=a}function f(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map((function(t){return String(t)})),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}s("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),s("ERR_INVALID_ARG_TYPE",(function(t,e,o){var i,c,u,s,l;if(void 0===a&&(a=r(4148)),a("string"==typeof t,"'name' must be a string"),"string"==typeof e&&(c="not ",e.substr(0,4)===c)?(i="must not be",e=e.replace(/^not /,"")):i="must be",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-9,r)===e}(t," argument"))u="The ".concat(t," ").concat(i," ").concat(f(e,"type"));else{var p=("number"!=typeof l&&(l=0),l+1>(s=t).length||-1===s.indexOf(".",l)?"argument":"property");u='The "'.concat(t,'" ').concat(p," ").concat(i," ").concat(f(e,"type"))}return u+". Received type ".concat(n(o))}),TypeError),s("ERR_INVALID_ARG_VALUE",(function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===c&&(c=r(537));var o=c.inspect(e);return o.length>128&&(o="".concat(o.slice(0,128),"...")),"The argument '".concat(t,"' ").concat(n,". Received ").concat(o)}),TypeError,RangeError),s("ERR_INVALID_RETURN_VALUE",(function(t,e,r){var o;return o=r&&r.constructor&&r.constructor.name?"instance of ".concat(r.constructor.name):"type ".concat(n(r)),"Expected ".concat(t,' to be returned from the "').concat(e,'"')+" function but got ".concat(o,".")}),TypeError),s("ERR_MISSING_ARGS",(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];void 0===a&&(a=r(4148)),a(e.length>0,"At least one arg needs to be specified");var o="The ",i=e.length;switch(e=e.map((function(t){return'"'.concat(t,'"')})),i){case 1:o+="".concat(e[0]," argument");break;case 2:o+="".concat(e[0]," and ").concat(e[1]," arguments");break;default:o+=e.slice(0,i-1).join(", "),o+=", and ".concat(e[i-1]," arguments")}return"".concat(o," must be specified")}),TypeError),t.exports.codes=u},2299:(t,e,r)=>{"use strict";function n(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,s=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){s=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return o(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}var a=void 0!==/a/g.flags,c=function(t){var e=[];return t.forEach((function(t){return e.push(t)})),e},u=function(t){var e=[];return t.forEach((function(t,r){return e.push([r,t])})),e},s=Object.is?Object.is:r(7653),f=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},l=Number.isNaN?Number.isNaN:r(4133);function p(t){return t.call.bind(t)}var y=p(Object.prototype.hasOwnProperty),h=p(Object.prototype.propertyIsEnumerable),g=p(Object.prototype.toString),d=r(537).types,b=d.isAnyArrayBuffer,m=d.isArrayBufferView,v=d.isDate,_=d.isMap,w=d.isRegExp,E=d.isSet,O=d.isNativeError,A=d.isBoxedPrimitive,x=d.isNumberObject,S=d.isStringObject,j=d.isBooleanObject,I=d.isBigIntObject,k=d.isSymbolObject,P=d.isFloat32Array,B=d.isFloat64Array;function N(t){if(0===t.length||t.length>10)return!0;for(var e=0;e<t.length;e++){var r=t.charCodeAt(e);if(r<48||r>57)return!0}return 10===t.length&&t>=Math.pow(2,32)}function R(t){return Object.keys(t).filter(N).concat(f(t).filter(Object.prototype.propertyIsEnumerable.bind(t)))}function T(t,e){if(t===e)return 0;for(var r=t.length,n=e.length,o=0,i=Math.min(r,n);o<i;++o)if(t[o]!==e[o]){r=t[o],n=e[o];break}return r<n?-1:n<r?1:0}var U=0,L=1,F=2,M=3;function D(t,e,r,n){if(t===e)return 0!==t||!r||s(t,e);if(r){if("object"!==i(t))return"number"==typeof t&&l(t)&&l(e);if("object"!==i(e)||null===t||null===e)return!1;if(Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return!1}else{if(null===t||"object"!==i(t))return(null===e||"object"!==i(e))&&t==e;if(null===e||"object"!==i(e))return!1}var o,c,u,f,p=g(t);if(p!==g(e))return!1;if(Array.isArray(t)){if(t.length!==e.length)return!1;var y=R(t),h=R(e);return y.length===h.length&&$(t,e,r,n,L,y)}if("[object Object]"===p&&(!_(t)&&_(e)||!E(t)&&E(e)))return!1;if(v(t)){if(!v(e)||Date.prototype.getTime.call(t)!==Date.prototype.getTime.call(e))return!1}else if(w(t)){if(!w(e)||(u=t,f=e,!(a?u.source===f.source&&u.flags===f.flags:RegExp.prototype.toString.call(u)===RegExp.prototype.toString.call(f))))return!1}else if(O(t)||t instanceof Error){if(t.message!==e.message||t.name!==e.name)return!1}else{if(m(t)){if(r||!P(t)&&!B(t)){if(!function(t,e){return t.byteLength===e.byteLength&&0===T(new Uint8Array(t.buffer,t.byteOffset,t.byteLength),new Uint8Array(e.buffer,e.byteOffset,e.byteLength))}(t,e))return!1}else if(!function(t,e){if(t.byteLength!==e.byteLength)return!1;for(var r=0;r<t.byteLength;r++)if(t[r]!==e[r])return!1;return!0}(t,e))return!1;var d=R(t),N=R(e);return d.length===N.length&&$(t,e,r,n,U,d)}if(E(t))return!(!E(e)||t.size!==e.size)&&$(t,e,r,n,F);if(_(t))return!(!_(e)||t.size!==e.size)&&$(t,e,r,n,M);if(b(t)){if(c=e,(o=t).byteLength!==c.byteLength||0!==T(new Uint8Array(o),new Uint8Array(c)))return!1}else if(A(t)&&!function(t,e){return x(t)?x(e)&&s(Number.prototype.valueOf.call(t),Number.prototype.valueOf.call(e)):S(t)?S(e)&&String.prototype.valueOf.call(t)===String.prototype.valueOf.call(e):j(t)?j(e)&&Boolean.prototype.valueOf.call(t)===Boolean.prototype.valueOf.call(e):I(t)?I(e)&&BigInt.prototype.valueOf.call(t)===BigInt.prototype.valueOf.call(e):k(e)&&Symbol.prototype.valueOf.call(t)===Symbol.prototype.valueOf.call(e)}(t,e))return!1}return $(t,e,r,n,U)}function C(t,e){return e.filter((function(e){return h(t,e)}))}function $(t,e,r,o,a,s){if(5===arguments.length){s=Object.keys(t);var l=Object.keys(e);if(s.length!==l.length)return!1}for(var p=0;p<s.length;p++)if(!y(e,s[p]))return!1;if(r&&5===arguments.length){var g=f(t);if(0!==g.length){var d=0;for(p=0;p<g.length;p++){var b=g[p];if(h(t,b)){if(!h(e,b))return!1;s.push(b),d++}else if(h(e,b))return!1}var m=f(e);if(g.length!==m.length&&C(e,m).length!==d)return!1}else{var v=f(e);if(0!==v.length&&0!==C(e,v).length)return!1}}if(0===s.length&&(a===U||a===L&&0===t.length||0===t.size))return!0;if(void 0===o)o={val1:new Map,val2:new Map,position:0};else{var _=o.val1.get(t);if(void 0!==_){var w=o.val2.get(e);if(void 0!==w)return _===w}o.position++}o.val1.set(t,o.position),o.val2.set(e,o.position);var E=function(t,e,r,o,a,s){var f=0;if(s===F){if(!function(t,e,r,n){for(var o=null,a=c(t),u=0;u<a.length;u++){var s=a[u];if("object"===i(s)&&null!==s)null===o&&(o=new Set),o.add(s);else if(!e.has(s)){if(r)return!1;if(!z(t,e,s))return!1;null===o&&(o=new Set),o.add(s)}}if(null!==o){for(var f=c(e),l=0;l<f.length;l++){var p=f[l];if("object"===i(p)&&null!==p){if(!q(o,p,r,n))return!1}else if(!r&&!t.has(p)&&!q(o,p,r,n))return!1}return 0===o.size}return!0}(t,e,r,a))return!1}else if(s===M){if(!function(t,e,r,o){for(var a=null,c=u(t),s=0;s<c.length;s++){var f=n(c[s],2),l=f[0],p=f[1];if("object"===i(l)&&null!==l)null===a&&(a=new Set),a.add(l);else{var y=e.get(l);if(void 0===y&&!e.has(l)||!D(p,y,r,o)){if(r)return!1;if(!W(t,e,l,p,o))return!1;null===a&&(a=new Set),a.add(l)}}}if(null!==a){for(var h=u(e),g=0;g<h.length;g++){var d=n(h[g],2),b=d[0],m=d[1];if("object"===i(b)&&null!==b){if(!J(a,t,b,m,r,o))return!1}else if(!(r||t.has(b)&&D(t.get(b),m,!1,o)||J(a,t,b,m,!1,o)))return!1}return 0===a.size}return!0}(t,e,r,a))return!1}else if(s===L)for(;f<t.length;f++){if(!y(t,f)){if(y(e,f))return!1;for(var l=Object.keys(t);f<l.length;f++){var p=l[f];if(!y(e,p)||!D(t[p],e[p],r,a))return!1}return l.length===Object.keys(e).length}if(!y(e,f)||!D(t[f],e[f],r,a))return!1}for(f=0;f<o.length;f++){var h=o[f];if(!D(t[h],e[h],r,a))return!1}return!0}(t,e,r,s,o,a);return o.val1.delete(t),o.val2.delete(e),E}function q(t,e,r,n){for(var o=c(t),i=0;i<o.length;i++){var a=o[i];if(D(e,a,r,n))return t.delete(a),!0}return!1}function G(t){switch(i(t)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":t=+t;case"number":if(l(t))return!1}return!0}function z(t,e,r){var n=G(r);return null!=n?n:e.has(n)&&!t.has(n)}function W(t,e,r,n,o){var i=G(r);if(null!=i)return i;var a=e.get(i);return!(void 0===a&&!e.has(i)||!D(n,a,!1,o))&&!t.has(i)&&D(n,a,!1,o)}function J(t,e,r,n,o,i){for(var a=c(t),u=0;u<a.length;u++){var s=a[u];if(D(r,s,o,i)&&D(n,e.get(s),o,i))return t.delete(s),!0}return!1}t.exports={isDeepEqual:function(t,e){return D(t,e,!1)},isDeepStrictEqual:function(t,e){return D(t,e,!0)}}},7526:(t,e)=>{"use strict";e.byteLength=function(t){var e=c(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,i=c(t),a=i[0],u=i[1],s=new o(function(t,e,r){return 3*(e+r)/4-r}(0,a,u)),f=0,l=u>0?a-4:a;for(r=0;r<l;r+=4)e=n[t.charCodeAt(r)]<<18|n[t.charCodeAt(r+1)]<<12|n[t.charCodeAt(r+2)]<<6|n[t.charCodeAt(r+3)],s[f++]=e>>16&255,s[f++]=e>>8&255,s[f++]=255&e;return 2===u&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,s[f++]=255&e),1===u&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,s[f++]=e>>8&255,s[f++]=255&e),s},e.fromByteArray=function(t){for(var e,n=t.length,o=n%3,i=[],a=16383,c=0,s=n-o;c<s;c+=a)i.push(u(t,c,c+a>s?s:c+a));return 1===o?(e=t[n-1],i.push(r[e>>2]+r[e<<4&63]+"==")):2===o&&(e=(t[n-2]<<8)+t[n-1],i.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),i.join("")};for(var r=[],n=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)r[a]=i[a],n[i.charCodeAt(a)]=a;function c(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function u(t,e,n){for(var o,i,a=[],c=e;c<n;c+=3)o=(t[c]<<16&16711680)+(t[c+1]<<8&65280)+(255&t[c+2]),a.push(r[(i=o)>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},8287:(t,e,r)=>{"use strict";var n=r(6763);const o=r(7526),i=r(251),a="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=s,e.SlowBuffer=function(t){return+t!=t&&(t=0),s.alloc(+t)},e.INSPECT_MAX_BYTES=50;const c=2147483647;function u(t){if(t>c)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,s.prototype),e}function s(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return p(t)}return f(t,e,r)}function f(t,e,r){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!s.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const r=0|d(t,e);let n=u(r);const o=n.write(t,e);return o!==r&&(n=n.slice(0,o)),n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(K(t,Uint8Array)){const e=new Uint8Array(t);return h(e.buffer,e.byteOffset,e.byteLength)}return y(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(K(t,ArrayBuffer)||t&&K(t.buffer,ArrayBuffer))return h(t,e,r);if("undefined"!=typeof SharedArrayBuffer&&(K(t,SharedArrayBuffer)||t&&K(t.buffer,SharedArrayBuffer)))return h(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return s.from(n,e,r);const o=function(t){if(s.isBuffer(t)){const e=0|g(t.length),r=u(e);return 0===r.length||t.copy(r,0,0,e),r}return void 0!==t.length?"number"!=typeof t.length||Z(t.length)?u(0):y(t):"Buffer"===t.type&&Array.isArray(t.data)?y(t.data):void 0}(t);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return s.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function l(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function p(t){return l(t),u(t<0?0:0|g(t))}function y(t){const e=t.length<0?0:0|g(t.length),r=u(e);for(let n=0;n<e;n+=1)r[n]=255&t[n];return r}function h(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r),Object.setPrototypeOf(n,s.prototype),n}function g(t){if(t>=c)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+c.toString(16)+" bytes");return 0|t}function d(t,e){if(s.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||K(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let o=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return H(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return V(t).length;default:if(o)return n?-1:H(t).length;e=(""+e).toLowerCase(),o=!0}}function b(t,e,r){let n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return B(this,e,r);case"utf8":case"utf-8":return j(this,e,r);case"ascii":return k(this,e,r);case"latin1":case"binary":return P(this,e,r);case"base64":return S(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function m(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function v(t,e,r,n,o){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),Z(r=+r)&&(r=o?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(o)return-1;r=t.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof e&&(e=s.from(e,n)),s.isBuffer(e))return 0===e.length?-1:_(t,e,r,n,o);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):_(t,[e],r,n,o);throw new TypeError("val must be string, number or Buffer")}function _(t,e,r,n,o){let i,a=1,c=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,c/=2,u/=2,r/=2}function s(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(o){let n=-1;for(i=r;i<c;i++)if(s(t,i)===s(e,-1===n?0:i-n)){if(-1===n&&(n=i),i-n+1===u)return n*a}else-1!==n&&(i-=i-n),n=-1}else for(r+u>c&&(r=c-u),i=r;i>=0;i--){let r=!0;for(let n=0;n<u;n++)if(s(t,i+n)!==s(e,n)){r=!1;break}if(r)return i}return-1}function w(t,e,r,n){r=Number(r)||0;const o=t.length-r;n?(n=Number(n))>o&&(n=o):n=o;const i=e.length;let a;for(n>i/2&&(n=i/2),a=0;a<n;++a){const n=parseInt(e.substr(2*a,2),16);if(Z(n))return a;t[r+a]=n}return a}function E(t,e,r,n){return Y(H(e,t.length-r),t,r,n)}function O(t,e,r,n){return Y(function(t){const e=[];for(let r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function A(t,e,r,n){return Y(V(e),t,r,n)}function x(t,e,r,n){return Y(function(t,e){let r,n,o;const i=[];for(let a=0;a<t.length&&!((e-=2)<0);++a)r=t.charCodeAt(a),n=r>>8,o=r%256,i.push(o),i.push(n);return i}(e,t.length-r),t,r,n)}function S(t,e,r){return 0===e&&r===t.length?o.fromByteArray(t):o.fromByteArray(t.slice(e,r))}function j(t,e,r){r=Math.min(t.length,r);const n=[];let o=e;for(;o<r;){const e=t[o];let i=null,a=e>239?4:e>223?3:e>191?2:1;if(o+a<=r){let r,n,c,u;switch(a){case 1:e<128&&(i=e);break;case 2:r=t[o+1],128==(192&r)&&(u=(31&e)<<6|63&r,u>127&&(i=u));break;case 3:r=t[o+1],n=t[o+2],128==(192&r)&&128==(192&n)&&(u=(15&e)<<12|(63&r)<<6|63&n,u>2047&&(u<55296||u>57343)&&(i=u));break;case 4:r=t[o+1],n=t[o+2],c=t[o+3],128==(192&r)&&128==(192&n)&&128==(192&c)&&(u=(15&e)<<18|(63&r)<<12|(63&n)<<6|63&c,u>65535&&u<1114112&&(i=u))}}null===i?(i=65533,a=1):i>65535&&(i-=65536,n.push(i>>>10&1023|55296),i=56320|1023&i),n.push(i),o+=a}return function(t){const e=t.length;if(e<=I)return String.fromCharCode.apply(String,t);let r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=I));return r}(n)}e.kMaxLength=c,s.TYPED_ARRAY_SUPPORT=function(){try{const t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),s.TYPED_ARRAY_SUPPORT||void 0===n||"function"!=typeof n.error||n.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(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}}),s.poolSize=8192,s.from=function(t,e,r){return f(t,e,r)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array),s.alloc=function(t,e,r){return function(t,e,r){return l(t),t<=0?u(t):void 0!==e?"string"==typeof r?u(t).fill(e,r):u(t).fill(e):u(t)}(t,e,r)},s.allocUnsafe=function(t){return p(t)},s.allocUnsafeSlow=function(t){return p(t)},s.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==s.prototype},s.compare=function(t,e){if(K(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),K(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(t)||!s.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;let r=t.length,n=e.length;for(let o=0,i=Math.min(r,n);o<i;++o)if(t[o]!==e[o]){r=t[o],n=e[o];break}return r<n?-1:n<r?1:0},s.isEncoding=function(t){switch(String(t).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}},s.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return s.alloc(0);let r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;const n=s.allocUnsafe(e);let o=0;for(r=0;r<t.length;++r){let e=t[r];if(K(e,Uint8Array))o+e.length>n.length?(s.isBuffer(e)||(e=s.from(e)),e.copy(n,o)):Uint8Array.prototype.set.call(n,e,o);else{if(!s.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(n,o)}o+=e.length}return n},s.byteLength=d,s.prototype._isBuffer=!0,s.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;e<t;e+=2)m(this,e,e+1);return this},s.prototype.swap32=function(){const t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let e=0;e<t;e+=4)m(this,e,e+3),m(this,e+1,e+2);return this},s.prototype.swap64=function(){const t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let e=0;e<t;e+=8)m(this,e,e+7),m(this,e+1,e+6),m(this,e+2,e+5),m(this,e+3,e+4);return this},s.prototype.toString=function(){const t=this.length;return 0===t?"":0===arguments.length?j(this,0,t):b.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(t){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===s.compare(this,t)},s.prototype.inspect=function(){let t="";const r=e.INSPECT_MAX_BYTES;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},a&&(s.prototype[a]=s.prototype.inspect),s.prototype.compare=function(t,e,r,n,o){if(K(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),e<0||r>t.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&e>=r)return 0;if(n>=o)return-1;if(e>=r)return 1;if(this===t)return 0;let i=(o>>>=0)-(n>>>=0),a=(r>>>=0)-(e>>>=0);const c=Math.min(i,a),u=this.slice(n,o),f=t.slice(e,r);for(let t=0;t<c;++t)if(u[t]!==f[t]){i=u[t],a=f[t];break}return i<a?-1:a<i?1:0},s.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},s.prototype.indexOf=function(t,e,r){return v(this,t,e,r,!0)},s.prototype.lastIndexOf=function(t,e,r){return v(this,t,e,r,!1)},s.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const o=this.length-e;if((void 0===r||r>o)&&(r=o),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let i=!1;for(;;)switch(n){case"hex":return w(this,t,e,r);case"utf8":case"utf-8":return E(this,t,e,r);case"ascii":case"latin1":case"binary":return O(this,t,e,r);case"base64":return A(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,e,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const I=4096;function k(t,e,r){let n="";r=Math.min(t.length,r);for(let o=e;o<r;++o)n+=String.fromCharCode(127&t[o]);return n}function P(t,e,r){let n="";r=Math.min(t.length,r);for(let o=e;o<r;++o)n+=String.fromCharCode(t[o]);return n}function B(t,e,r){const n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);let o="";for(let n=e;n<r;++n)o+=X[t[n]];return o}function N(t,e,r){const n=t.slice(e,r);let o="";for(let t=0;t<n.length-1;t+=2)o+=String.fromCharCode(n[t]+256*n[t+1]);return o}function R(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function T(t,e,r,n,o,i){if(!s.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||e<i)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function U(t,e,r,n,o){G(e,n,o,t,r,7);let i=Number(e&BigInt(4294967295));t[r++]=i,i>>=8,t[r++]=i,i>>=8,t[r++]=i,i>>=8,t[r++]=i;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=a,a>>=8,t[r++]=a,a>>=8,t[r++]=a,a>>=8,t[r++]=a,r}function L(t,e,r,n,o){G(e,n,o,t,r,7);let i=Number(e&BigInt(4294967295));t[r+7]=i,i>>=8,t[r+6]=i,i>>=8,t[r+5]=i,i>>=8,t[r+4]=i;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=a,a>>=8,t[r+2]=a,a>>=8,t[r+1]=a,a>>=8,t[r]=a,r+8}function F(t,e,r,n,o,i){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function M(t,e,r,n,o){return e=+e,r>>>=0,o||F(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function D(t,e,r,n,o){return e=+e,r>>>=0,o||F(t,0,r,8),i.write(t,e,r,n,52,8),r+8}s.prototype.slice=function(t,e){const r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);const n=this.subarray(t,e);return Object.setPrototypeOf(n,s.prototype),n},s.prototype.readUintLE=s.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||R(t,e,this.length);let n=this[t],o=1,i=0;for(;++i<e&&(o*=256);)n+=this[t+i]*o;return n},s.prototype.readUintBE=s.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||R(t,e,this.length);let n=this[t+--e],o=1;for(;e>0&&(o*=256);)n+=this[t+--e]*o;return n},s.prototype.readUint8=s.prototype.readUInt8=function(t,e){return t>>>=0,e||R(t,1,this.length),this[t]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(t,e){return t>>>=0,e||R(t,2,this.length),this[t]|this[t+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(t,e){return t>>>=0,e||R(t,2,this.length),this[t]<<8|this[t+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(t,e){return t>>>=0,e||R(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(t,e){return t>>>=0,e||R(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},s.prototype.readBigUInt64LE=Q((function(t){z(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||W(t,this.length-8);const n=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,o=this[++t]+256*this[++t]+65536*this[++t]+r*2**24;return BigInt(n)+(BigInt(o)<<BigInt(32))})),s.prototype.readBigUInt64BE=Q((function(t){z(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||W(t,this.length-8);const n=e*2**24+65536*this[++t]+256*this[++t]+this[++t],o=this[++t]*2**24+65536*this[++t]+256*this[++t]+r;return(BigInt(n)<<BigInt(32))+BigInt(o)})),s.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||R(t,e,this.length);let n=this[t],o=1,i=0;for(;++i<e&&(o*=256);)n+=this[t+i]*o;return o*=128,n>=o&&(n-=Math.pow(2,8*e)),n},s.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||R(t,e,this.length);let n=e,o=1,i=this[t+--n];for(;n>0&&(o*=256);)i+=this[t+--n]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*e)),i},s.prototype.readInt8=function(t,e){return t>>>=0,e||R(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},s.prototype.readInt16LE=function(t,e){t>>>=0,e||R(t,2,this.length);const r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt16BE=function(t,e){t>>>=0,e||R(t,2,this.length);const r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt32LE=function(t,e){return t>>>=0,e||R(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},s.prototype.readInt32BE=function(t,e){return t>>>=0,e||R(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},s.prototype.readBigInt64LE=Q((function(t){z(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||W(t,this.length-8);const n=this[t+4]+256*this[t+5]+65536*this[t+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(e+256*this[++t]+65536*this[++t]+this[++t]*2**24)})),s.prototype.readBigInt64BE=Q((function(t){z(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||W(t,this.length-8);const n=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(n)<<BigInt(32))+BigInt(this[++t]*2**24+65536*this[++t]+256*this[++t]+r)})),s.prototype.readFloatLE=function(t,e){return t>>>=0,e||R(t,4,this.length),i.read(this,t,!0,23,4)},s.prototype.readFloatBE=function(t,e){return t>>>=0,e||R(t,4,this.length),i.read(this,t,!1,23,4)},s.prototype.readDoubleLE=function(t,e){return t>>>=0,e||R(t,8,this.length),i.read(this,t,!0,52,8)},s.prototype.readDoubleBE=function(t,e){return t>>>=0,e||R(t,8,this.length),i.read(this,t,!1,52,8)},s.prototype.writeUintLE=s.prototype.writeUIntLE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||T(this,t,e,r,Math.pow(2,8*r)-1,0);let o=1,i=0;for(this[e]=255&t;++i<r&&(o*=256);)this[e+i]=t/o&255;return e+r},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||T(this,t,e,r,Math.pow(2,8*r)-1,0);let o=r-1,i=1;for(this[e+o]=255&t;--o>=0&&(i*=256);)this[e+o]=t/i&255;return e+r},s.prototype.writeUint8=s.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||T(this,t,e,1,255,0),this[e]=255&t,e+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||T(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||T(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||T(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||T(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},s.prototype.writeBigUInt64LE=Q((function(t,e=0){return U(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),s.prototype.writeBigUInt64BE=Q((function(t,e=0){return L(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),s.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);T(this,t,e,r,n-1,-n)}let o=0,i=1,a=0;for(this[e]=255&t;++o<r&&(i*=256);)t<0&&0===a&&0!==this[e+o-1]&&(a=1),this[e+o]=(t/i|0)-a&255;return e+r},s.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);T(this,t,e,r,n-1,-n)}let o=r-1,i=1,a=0;for(this[e+o]=255&t;--o>=0&&(i*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/i|0)-a&255;return e+r},s.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||T(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},s.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||T(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},s.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||T(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},s.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||T(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},s.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||T(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},s.prototype.writeBigInt64LE=Q((function(t,e=0){return U(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),s.prototype.writeBigInt64BE=Q((function(t,e=0){return L(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),s.prototype.writeFloatLE=function(t,e,r){return M(this,t,e,!0,r)},s.prototype.writeFloatBE=function(t,e,r){return M(this,t,e,!1,r)},s.prototype.writeDoubleLE=function(t,e,r){return D(this,t,e,!0,r)},s.prototype.writeDoubleBE=function(t,e,r){return D(this,t,e,!1,r)},s.prototype.copy=function(t,e,r,n){if(!s.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);const o=n-r;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,r,n):Uint8Array.prototype.set.call(t,this.subarray(r,n),e),o},s.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!s.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===t.length){const e=t.charCodeAt(0);("utf8"===n&&e<128||"latin1"===n)&&(t=e)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;let o;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o<r;++o)this[o]=t;else{const i=s.isBuffer(t)?t:s.from(t,n),a=i.length;if(0===a)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(o=0;o<r-e;++o)this[o+e]=i[o%a]}return this};const C={};function $(t,e,r){C[t]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(t){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:t,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}function q(t){let e="",r=t.length;const n="-"===t[0]?1:0;for(;r>=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function G(t,e,r,n,o,i){if(t>r||t<e){const n="bigint"==typeof e?"n":"";let o;throw o=i>3?0===e||e===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(i+1)}${n}`:`>= -(2${n} ** ${8*(i+1)-1}${n}) and < 2 ** ${8*(i+1)-1}${n}`:`>= ${e}${n} and <= ${r}${n}`,new C.ERR_OUT_OF_RANGE("value",o,t)}!function(t,e,r){z(e,"offset"),void 0!==t[e]&&void 0!==t[e+r]||W(e,t.length-(r+1))}(n,o,i)}function z(t,e){if("number"!=typeof t)throw new C.ERR_INVALID_ARG_TYPE(e,"number",t)}function W(t,e,r){if(Math.floor(t)!==t)throw z(t,r),new C.ERR_OUT_OF_RANGE(r||"offset","an integer",t);if(e<0)throw new C.ERR_BUFFER_OUT_OF_BOUNDS;throw new C.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${e}`,t)}$("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),$("ERR_INVALID_ARG_TYPE",(function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`}),TypeError),$("ERR_OUT_OF_RANGE",(function(t,e,r){let n=`The value of "${t}" is out of range.`,o=r;return Number.isInteger(r)&&Math.abs(r)>2**32?o=q(String(r)):"bigint"==typeof r&&(o=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(o=q(o)),o+="n"),n+=` It must be ${e}. Received ${o}`,n}),RangeError);const J=/[^+/0-9A-Za-z-_]/g;function H(t,e){let r;e=e||1/0;const n=t.length;let o=null;const i=[];for(let a=0;a<n;++a){if(r=t.charCodeAt(a),r>55295&&r<57344){if(!o){if(r>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(e-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((e-=1)<0)break;i.push(r)}else if(r<2048){if((e-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function V(t){return o.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(J,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function Y(t,e,r,n){let o;for(o=0;o<n&&!(o+r>=e.length||o>=t.length);++o)e[o+r]=t[o];return o}function K(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function Z(t){return t!=t}const X=function(){const t="0123456789abcdef",e=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let o=0;o<16;++o)e[n+o]=t[r]+t[o]}return e}();function Q(t){return"undefined"==typeof BigInt?tt:t}function tt(){throw new Error("BigInt not supported")}},8075:(t,e,r)=>{"use strict";var n=r(453),o=r(487),i=o(n("String.prototype.indexOf"));t.exports=function(t,e){var r=n(t,!!e);return"function"==typeof r&&i(t,".prototype.")>-1?o(r):r}},487:(t,e,r)=>{"use strict";var n=r(6743),o=r(453),i=r(6897),a=r(9675),c=o("%Function.prototype.apply%"),u=o("%Function.prototype.call%"),s=o("%Reflect.apply%",!0)||n.call(u,c),f=r(655),l=o("%Math.max%");t.exports=function(t){if("function"!=typeof t)throw new a("a function is required");var e=s(n,u,arguments);return i(e,1+l(0,t.length-(arguments.length-1)),!0)};var p=function(){return s(n,c,arguments)};f?f(t.exports,"apply",{value:p}):t.exports.apply=p},6763:(t,e,r)=>{var n=r(537),o=r(4148);function i(){return(new Date).getTime()}var a,c=Array.prototype.slice,u={};a=void 0!==r.g&&r.g.console?r.g.console:"undefined"!=typeof window&&window.console?window.console:{};for(var s=[[function(){},"log"],[function(){a.log.apply(a,arguments)},"info"],[function(){a.log.apply(a,arguments)},"warn"],[function(){a.warn.apply(a,arguments)},"error"],[function(t){u[t]=i()},"time"],[function(t){var e=u[t];if(!e)throw new Error("No such label: "+t);delete u[t];var r=i()-e;a.log(t+": "+r+"ms")},"timeEnd"],[function(){var t=new Error;t.name="Trace",t.message=n.format.apply(null,arguments),a.error(t.stack)},"trace"],[function(t){a.log(n.inspect(t)+"\n")},"dir"],[function(t){if(!t){var e=c.call(arguments,1);o.ok(!1,n.format.apply(null,e))}},"assert"]],f=0;f<s.length;f++){var l=s[f],p=l[0],y=l[1];a[y]||(a[y]=p)}t.exports=a},41:(t,e,r)=>{"use strict";var n=r(655),o=r(8068),i=r(9675),a=r(5795);t.exports=function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new i("`obj` must be an object or a function`");if("string"!=typeof e&&"symbol"!=typeof e)throw new i("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new i("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new i("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new i("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new i("`loose`, if provided, must be a boolean");var c=arguments.length>3?arguments[3]:null,u=arguments.length>4?arguments[4]:null,s=arguments.length>5?arguments[5]:null,f=arguments.length>6&&arguments[6],l=!!a&&a(t,e);if(n)n(t,e,{configurable:null===s&&l?l.configurable:!s,enumerable:null===c&&l?l.enumerable:!c,value:r,writable:null===u&&l?l.writable:!u});else{if(!f&&(c||u||s))throw new o("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[e]=r}}},8452:(t,e,r)=>{"use strict";var n=r(1189),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,a=Array.prototype.concat,c=r(41),u=r(592)(),s=function(t,e,r,n){if(e in t)if(!0===n){if(t[e]===r)return}else if("function"!=typeof(o=n)||"[object Function]"!==i.call(o)||!n())return;var o;u?c(t,e,r,!0):c(t,e,r)},f=function(t,e){var r=arguments.length>2?arguments[2]:{},i=n(e);o&&(i=a.call(i,Object.getOwnPropertySymbols(e)));for(var c=0;c<i.length;c+=1)s(t,i[c],e[i[c]],r[i[c]])};f.supportsDescriptors=!!u,t.exports=f},655:(t,e,r)=>{"use strict";var n=r(453)("%Object.defineProperty%",!0)||!1;if(n)try{n({},"a",{value:1})}catch(t){n=!1}t.exports=n},1237:t=>{"use strict";t.exports=EvalError},9383:t=>{"use strict";t.exports=Error},9290:t=>{"use strict";t.exports=RangeError},9538:t=>{"use strict";t.exports=ReferenceError},8068:t=>{"use strict";t.exports=SyntaxError},9675:t=>{"use strict";t.exports=TypeError},5345:t=>{"use strict";t.exports=URIError},2682:(t,e,r)=>{"use strict";var n=r(9600),o=Object.prototype.toString,i=Object.prototype.hasOwnProperty;t.exports=function(t,e,r){if(!n(e))throw new TypeError("iterator must be a function");var a;arguments.length>=3&&(a=r),"[object Array]"===o.call(t)?function(t,e,r){for(var n=0,o=t.length;n<o;n++)i.call(t,n)&&(null==r?e(t[n],n,t):e.call(r,t[n],n,t))}(t,e,a):"string"==typeof t?function(t,e,r){for(var n=0,o=t.length;n<o;n++)null==r?e(t.charAt(n),n,t):e.call(r,t.charAt(n),n,t)}(t,e,a):function(t,e,r){for(var n in t)i.call(t,n)&&(null==r?e(t[n],n,t):e.call(r,t[n],n,t))}(t,e,a)}},9353:t=>{"use strict";var e=Object.prototype.toString,r=Math.max,n=function(t,e){for(var r=[],n=0;n<t.length;n+=1)r[n]=t[n];for(var o=0;o<e.length;o+=1)r[o+t.length]=e[o];return r};t.exports=function(t){var o=this;if("function"!=typeof o||"[object Function]"!==e.apply(o))throw new TypeError("Function.prototype.bind called on incompatible "+o);for(var i,a=function(t){for(var e=[],r=1,n=0;r<t.length;r+=1,n+=1)e[n]=t[r];return e}(arguments),c=r(0,o.length-a.length),u=[],s=0;s<c;s++)u[s]="$"+s;if(i=Function("binder","return function ("+function(t){for(var e="",r=0;r<t.length;r+=1)e+=t[r],r+1<t.length&&(e+=",");return e}(u)+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof i){var e=o.apply(this,n(a,arguments));return Object(e)===e?e:this}return o.apply(t,n(a,arguments))})),o.prototype){var f=function(){};f.prototype=o.prototype,i.prototype=new f,f.prototype=null}return i}},6743:(t,e,r)=>{"use strict";var n=r(9353);t.exports=Function.prototype.bind||n},453:(t,e,r)=>{"use strict";var n,o=r(9383),i=r(1237),a=r(9290),c=r(9538),u=r(8068),s=r(9675),f=r(5345),l=Function,p=function(t){try{return l('"use strict"; return ('+t+").constructor;")()}catch(t){}},y=Object.getOwnPropertyDescriptor;if(y)try{y({},"")}catch(t){y=null}var h=function(){throw new s},g=y?function(){try{return h}catch(t){try{return y(arguments,"callee").get}catch(t){return h}}}():h,d=r(4039)(),b=r(24)(),m=Object.getPrototypeOf||(b?function(t){return t.__proto__}:null),v={},_="undefined"!=typeof Uint8Array&&m?m(Uint8Array):n,w={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":d&&m?m([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":v,"%AsyncGenerator%":v,"%AsyncGeneratorFunction%":v,"%AsyncIteratorPrototype%":v,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":i,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":l,"%GeneratorFunction%":v,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":d&&m?m(m([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&d&&m?m((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":a,"%ReferenceError%":c,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&d&&m?m((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":d&&m?m(""[Symbol.iterator]()):n,"%Symbol%":d?Symbol:n,"%SyntaxError%":u,"%ThrowTypeError%":g,"%TypedArray%":_,"%TypeError%":s,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":f,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet};if(m)try{null.error}catch(t){var E=m(m(t));w["%Error.prototype%"]=E}var O=function t(e){var r;if("%AsyncFunction%"===e)r=p("async function () {}");else if("%GeneratorFunction%"===e)r=p("function* () {}");else if("%AsyncGeneratorFunction%"===e)r=p("async function* () {}");else if("%AsyncGenerator%"===e){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===e){var o=t("%AsyncGenerator%");o&&m&&(r=m(o.prototype))}return w[e]=r,r},A={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},x=r(6743),S=r(9957),j=x.call(Function.call,Array.prototype.concat),I=x.call(Function.apply,Array.prototype.splice),k=x.call(Function.call,String.prototype.replace),P=x.call(Function.call,String.prototype.slice),B=x.call(Function.call,RegExp.prototype.exec),N=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,R=/\\(\\)?/g,T=function(t,e){var r,n=t;if(S(A,n)&&(n="%"+(r=A[n])[0]+"%"),S(w,n)){var o=w[n];if(o===v&&(o=O(n)),void 0===o&&!e)throw new s("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new u("intrinsic "+t+" does not exist!")};t.exports=function(t,e){if("string"!=typeof t||0===t.length)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new s('"allowMissing" argument must be a boolean');if(null===B(/^%?[^%]*%?$/,t))throw new u("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=P(t,0,1),r=P(t,-1);if("%"===e&&"%"!==r)throw new u("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new u("invalid intrinsic syntax, expected opening `%`");var n=[];return k(t,N,(function(t,e,r,o){n[n.length]=r?k(o,R,"$1"):e||t})),n}(t),n=r.length>0?r[0]:"",o=T("%"+n+"%",e),i=o.name,a=o.value,c=!1,f=o.alias;f&&(n=f[0],I(r,j([0,1],f)));for(var l=1,p=!0;l<r.length;l+=1){var h=r[l],g=P(h,0,1),d=P(h,-1);if(('"'===g||"'"===g||"`"===g||'"'===d||"'"===d||"`"===d)&&g!==d)throw new u("property names with quotes must have matching quotes");if("constructor"!==h&&p||(c=!0),S(w,i="%"+(n+="."+h)+"%"))a=w[i];else if(null!=a){if(!(h in a)){if(!e)throw new s("base intrinsic for "+t+" exists, but the property is not available.");return}if(y&&l+1>=r.length){var b=y(a,h);a=(p=!!b)&&"get"in b&&!("originalValue"in b.get)?b.get:a[h]}else p=S(a,h),a=a[h];p&&!c&&(w[i]=a)}}return a}},5795:(t,e,r)=>{"use strict";var n=r(453)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(t){n=null}t.exports=n},592:(t,e,r)=>{"use strict";var n=r(655),o=function(){return!!n};o.hasArrayLengthDefineBug=function(){if(!n)return null;try{return 1!==n([],"length",{value:1}).length}catch(t){return!0}},t.exports=o},24:t=>{"use strict";var e={__proto__:null,foo:{}},r=Object;t.exports=function(){return{__proto__:e}.foo===e.foo&&!(e instanceof r)}},4039:(t,e,r)=>{"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r(1333);t.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&o()}},1333:t=>{"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(t,e);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},9092:(t,e,r)=>{"use strict";var n=r(1333);t.exports=function(){return n()&&!!Symbol.toStringTag}},9957:(t,e,r)=>{"use strict";var n=Function.prototype.call,o=Object.prototype.hasOwnProperty,i=r(6743);t.exports=i.call(n,o)},251:(t,e)=>{e.read=function(t,e,r,n,o){var i,a,c=8*o-n-1,u=(1<<c)-1,s=u>>1,f=-7,l=r?o-1:0,p=r?-1:1,y=t[e+l];for(l+=p,i=y&(1<<-f)-1,y>>=-f,f+=c;f>0;i=256*i+t[e+l],l+=p,f-=8);for(a=i&(1<<-f)-1,i>>=-f,f+=n;f>0;a=256*a+t[e+l],l+=p,f-=8);if(0===i)i=1-s;else{if(i===u)return a?NaN:1/0*(y?-1:1);a+=Math.pow(2,n),i-=s}return(y?-1:1)*a*Math.pow(2,i-n)},e.write=function(t,e,r,n,o,i){var a,c,u,s=8*i-o-1,f=(1<<s)-1,l=f>>1,p=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,y=n?0:i-1,h=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(c=isNaN(e)?1:0,a=f):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+l>=1?p/u:p*Math.pow(2,1-l))*u>=2&&(a++,u/=2),a+l>=f?(c=0,a=f):a+l>=1?(c=(e*u-1)*Math.pow(2,o),a+=l):(c=e*Math.pow(2,l-1)*Math.pow(2,o),a=0));o>=8;t[r+y]=255&c,y+=h,c/=256,o-=8);for(a=a<<o|c,s+=o;s>0;t[r+y]=255&a,y+=h,a/=256,s-=8);t[r+y-h]|=128*g}},6698:t=>{"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},7244:(t,e,r)=>{"use strict";var n=r(9092)(),o=r(8075)("Object.prototype.toString"),i=function(t){return!(n&&t&&"object"==typeof t&&Symbol.toStringTag in t)&&"[object Arguments]"===o(t)},a=function(t){return!!i(t)||null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Array]"!==o(t)&&"[object Function]"===o(t.callee)},c=function(){return i(arguments)}();i.isLegacyArguments=a,t.exports=c?i:a},9600:t=>{"use strict";var e,r,n=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{e=Object.defineProperty({},"length",{get:function(){throw r}}),r={},o((function(){throw 42}),null,e)}catch(t){t!==r&&(o=null)}else o=null;var i=/^\s*class\b/,a=function(t){try{var e=n.call(t);return i.test(e)}catch(t){return!1}},c=function(t){try{return!a(t)&&(n.call(t),!0)}catch(t){return!1}},u=Object.prototype.toString,s="function"==typeof Symbol&&!!Symbol.toStringTag,f=!(0 in[,]),l=function(){return!1};if("object"==typeof document){var p=document.all;u.call(p)===u.call(document.all)&&(l=function(t){if((f||!t)&&(void 0===t||"object"==typeof t))try{var e=u.call(t);return("[object HTMLAllCollection]"===e||"[object HTML document.all class]"===e||"[object HTMLCollection]"===e||"[object Object]"===e)&&null==t("")}catch(t){}return!1})}t.exports=o?function(t){if(l(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;try{o(t,null,e)}catch(t){if(t!==r)return!1}return!a(t)&&c(t)}:function(t){if(l(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if(s)return c(t);if(a(t))return!1;var e=u.call(t);return!("[object Function]"!==e&&"[object GeneratorFunction]"!==e&&!/^\[object HTML/.test(e))&&c(t)}},8184:(t,e,r)=>{"use strict";var n,o=Object.prototype.toString,i=Function.prototype.toString,a=/^\s*(?:function)?\*/,c=r(9092)(),u=Object.getPrototypeOf;t.exports=function(t){if("function"!=typeof t)return!1;if(a.test(i.call(t)))return!0;if(!c)return"[object GeneratorFunction]"===o.call(t);if(!u)return!1;if(void 0===n){var e=function(){if(!c)return!1;try{return Function("return function*() {}")()}catch(t){}}();n=!!e&&u(e)}return u(t)===n}},3003:t=>{"use strict";t.exports=function(t){return t!=t}},4133:(t,e,r)=>{"use strict";var n=r(487),o=r(8452),i=r(3003),a=r(6642),c=r(2464),u=n(a(),Number);o(u,{getPolyfill:a,implementation:i,shim:c}),t.exports=u},6642:(t,e,r)=>{"use strict";var n=r(3003);t.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:n}},2464:(t,e,r)=>{"use strict";var n=r(8452),o=r(6642);t.exports=function(){var t=o();return n(Number,{isNaN:t},{isNaN:function(){return Number.isNaN!==t}}),t}},5680:(t,e,r)=>{"use strict";var n=r(5767);t.exports=function(t){return!!n(t)}},9211:t=>{"use strict";var e=function(t){return t!=t};t.exports=function(t,r){return 0===t&&0===r?1/t==1/r:t===r||!(!e(t)||!e(r))}},7653:(t,e,r)=>{"use strict";var n=r(8452),o=r(487),i=r(9211),a=r(9394),c=r(6576),u=o(a(),Object);n(u,{getPolyfill:a,implementation:i,shim:c}),t.exports=u},9394:(t,e,r)=>{"use strict";var n=r(9211);t.exports=function(){return"function"==typeof Object.is?Object.is:n}},6576:(t,e,r)=>{"use strict";var n=r(9394),o=r(8452);t.exports=function(){var t=n();return o(Object,{is:t},{is:function(){return Object.is!==t}}),t}},8875:(t,e,r)=>{"use strict";var n;if(!Object.keys){var o=Object.prototype.hasOwnProperty,i=Object.prototype.toString,a=r(1093),c=Object.prototype.propertyIsEnumerable,u=!c.call({toString:null},"toString"),s=c.call((function(){}),"prototype"),f=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],l=function(t){var e=t.constructor;return e&&e.prototype===t},p={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},y=function(){if("undefined"==typeof window)return!1;for(var t in window)try{if(!p["$"+t]&&o.call(window,t)&&null!==window[t]&&"object"==typeof window[t])try{l(window[t])}catch(t){return!0}}catch(t){return!0}return!1}();n=function(t){var e=null!==t&&"object"==typeof t,r="[object Function]"===i.call(t),n=a(t),c=e&&"[object String]"===i.call(t),p=[];if(!e&&!r&&!n)throw new TypeError("Object.keys called on a non-object");var h=s&&r;if(c&&t.length>0&&!o.call(t,0))for(var g=0;g<t.length;++g)p.push(String(g));if(n&&t.length>0)for(var d=0;d<t.length;++d)p.push(String(d));else for(var b in t)h&&"prototype"===b||!o.call(t,b)||p.push(String(b));if(u)for(var m=function(t){if("undefined"==typeof window||!y)return l(t);try{return l(t)}catch(t){return!1}}(t),v=0;v<f.length;++v)m&&"constructor"===f[v]||!o.call(t,f[v])||p.push(f[v]);return p}}t.exports=n},1189:(t,e,r)=>{"use strict";var n=Array.prototype.slice,o=r(1093),i=Object.keys,a=i?function(t){return i(t)}:r(8875),c=Object.keys;a.shim=function(){if(Object.keys){var t=function(){var t=Object.keys(arguments);return t&&t.length===arguments.length}(1,2);t||(Object.keys=function(t){return o(t)?c(n.call(t)):c(t)})}else Object.keys=a;return Object.keys||a},t.exports=a},1093:t=>{"use strict";var e=Object.prototype.toString;t.exports=function(t){var r=e.call(t),n="[object Arguments]"===r;return n||(n="[object Array]"!==r&&null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Function]"===e.call(t.callee)),n}},8403:(t,e,r)=>{"use strict";var n=r(1189),o=r(1333)(),i=r(8075),a=Object,c=i("Array.prototype.push"),u=i("Object.prototype.propertyIsEnumerable"),s=o?Object.getOwnPropertySymbols:null;t.exports=function(t,e){if(null==t)throw new TypeError("target must be an object");var r=a(t);if(1===arguments.length)return r;for(var i=1;i<arguments.length;++i){var f=a(arguments[i]),l=n(f),p=o&&(Object.getOwnPropertySymbols||s);if(p)for(var y=p(f),h=0;h<y.length;++h){var g=y[h];u(f,g)&&c(l,g)}for(var d=0;d<l.length;++d){var b=l[d];if(u(f,b)){var m=f[b];r[b]=m}}}return r}},1514:(t,e,r)=>{"use strict";var n=r(8403);t.exports=function(){return Object.assign?function(){if(!Object.assign)return!1;for(var t="abcdefghijklmnopqrst",e=t.split(""),r={},n=0;n<e.length;++n)r[e[n]]=e[n];var o=Object.assign({},r),i="";for(var a in o)i+=a;return t!==i}()||function(){if(!Object.assign||!Object.preventExtensions)return!1;var t=Object.preventExtensions({1:2});try{Object.assign(t,"xy")}catch(e){return"y"===t[1]}return!1}()?n:Object.assign:n}},6578:t=>{"use strict";t.exports=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]},5606:t=>{var e,r,n=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function a(t){if(e===setTimeout)return setTimeout(t,0);if((e===o||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(r){try{return e.call(null,t,0)}catch(r){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:o}catch(t){e=o}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(t){r=i}}();var c,u=[],s=!1,f=-1;function l(){s&&c&&(s=!1,c.length?u=c.concat(u):f=-1,u.length&&p())}function p(){if(!s){var t=a(l);s=!0;for(var e=u.length;e;){for(c=u,u=[];++f<e;)c&&c[f].run();f=-1,e=u.length}c=null,s=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===i||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{return r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function y(t,e){this.fun=t,this.array=e}function h(){}n.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];u.push(new y(t,e)),1!==u.length||s||a(p)},y.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=h,n.addListener=h,n.once=h,n.off=h,n.removeListener=h,n.removeAllListeners=h,n.emit=h,n.prependListener=h,n.prependOnceListener=h,n.listeners=function(t){return[]},n.binding=function(t){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(t){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},6897:(t,e,r)=>{"use strict";var n=r(453),o=r(41),i=r(592)(),a=r(5795),c=r(9675),u=n("%Math.floor%");t.exports=function(t,e){if("function"!=typeof t)throw new c("`fn` is not a function");if("number"!=typeof e||e<0||e>4294967295||u(e)!==e)throw new c("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],n=!0,s=!0;if("length"in t&&a){var f=a(t,"length");f&&!f.configurable&&(n=!1),f&&!f.writable&&(s=!1)}return(n||s||!r)&&(i?o(t,"length",e,!0,!0):o(t,"length",e)),t}},8156:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.Crypto=void 0;const i=r(1319),a=r(5672);o(r(1319),e);class c extends i.CryptoModule{constructor(){super()}static async init(t={}){if(this.external_library=t,!this.runtime_configuration.library){if(await this.load_wasm_library())return new c;if(await this.load_js_library())return new c;throw new Error("Could not initialize an underlying library")}return new c}static async force_js_library(){return this.load_js_library()}static async force_wasm_library(){return this.load_wasm_library()}static async load(t){return!!await c.url_exists(t)&&new Promise(((e,r)=>{const n=document.createElement("script");n.src=t,n.defer=!0,n.async=!1,n.crossOrigin="anonymous",n.referrerPolicy="no-referrer",n.addEventListener("load",(()=>e(!0))),n.addEventListener("error",(()=>function(t){return r(new Error(t.message))})),document.head.appendChild(n)}))}static async load_library(t,e){if(!await this.load(t))return!1;if(!window.CryptoModule)return!1;const r=await new window.CryptoModule;return 0!==Object.getOwnPropertyNames(r).length&&void 0!==r.sha3&&(i.CryptoModule.runtime_configuration={type:e,library:r},!0)}static async load_js_library(){return!!await this.load_library(`https://cdn.jsdelivr.net/npm/@gibme/crypto@${a.version}/dist/src/loaders/crypto-module.js`,i.LibraryType.JS)||this.load_library("https://testmodule.pages.dev/crypto-module.js",i.LibraryType.JS)}static async load_wasm_library(){return!!await this.load_library(`https://cdn.jsdelivr.net/npm/@gibme/crypto@${a.version}/dist/src/loaders/crypto-module-wasm.js`,i.LibraryType.WASM)||this.load_library("https://testmodule.pages.dev/crypto-module-wasm.js",i.LibraryType.WASM)}static async url_exists(t){return(await fetch(t,{method:"HEAD"})).ok}}e.default=c,e.Crypto=c},5672:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.version=void 0,e.version="7.0.5"},8958:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguageName=e.LibraryTypeName=e.is_hex=e.make_module_result=void 0;const n=r(4274);e.make_module_result=(t,e,r)=>{const n={error:t,result:e};return r&&(n.error_message=r),JSON.stringify(n)},e.is_hex=t=>/^[0-9a-f]+$/i.test(t),e.LibraryTypeName=t=>{switch(t){case n.LibraryType.NODE:return"Node C++ Addon";case n.LibraryType.WASM:return"WASM.js Library";case n.LibraryType.JS:return"Javascript asm.js (slow)";default:return"unknown"}},e.LanguageName=t=>{switch(t){case n.Language.CHINESE_SIMPLIFIED:return"Chinese (simplified)";case n.Language.CHINESE_TRADITIONAL:return"Chinese (traditional)";case n.Language.CZECH:return"Czech";case n.Language.ENGLISH:return"English";case n.Language.FRENCH:return"French";case n.Language.ITALIAN:return"Italian";case n.Language.JAPANESE:return"Japanese";case n.Language.KOREAN:return"Korean";case n.Language.PORTUGUESE:return"Portuguese";case n.Language.SPANISH:return"Spanish";default:return"Unknown"}}},1319:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.CryptoModule=void 0;const i=r(4274),a=r(8958),c=r(4429),u=r(8287);o(r(4274),e),o(r(8958),e);class s{constructor(){}static get external_library(){return this._external_library}static set external_library(t){for(const e of Object.keys(t))this._external_library[e]=t[e]}static get library_name(){return(0,a.LibraryTypeName)(this.runtime_configuration.type)}static get library_type(){return this.runtime_configuration.type}static get is_native(){return this.runtime_configuration.type===i.LibraryType.NODE}set external_library(t){s.external_library=t}get external_library(){return s.external_library}get library_name(){return s.library_name}get library_type(){return s.library_type}get is_native(){return s.is_native}async base58_address_encode(t,e,r){return r?this.execute("base58_address_encode",{prefix:t,public_spend:e,public_view:r}):this.execute("base58_address_encode",{prefix:t,public_key:e})}async cn_base58_address_encode(t,e,r){return r?this.execute("cn_base58_address_encode",{prefix:t,public_spend:e,public_view:r}):this.execute("cn_base58_address_encode",{prefix:t,public_key:e})}async base58_address_decode(t){const e=await this.execute("base58_address_decode",t);return e.public_view&&c.uint256.from(e.public_view).value===BigInt(1)&&delete e.public_view,e}async cn_base58_address_decode(t){const e=await this.execute("cn_base58_address_decode",t);return e.public_view&&c.uint256.from(e.public_view).value===BigInt(1)&&delete e.public_view,e}async random_entropy(t,e=256,r=!0){return await this.execute("random_entropy",{entropy:null!=t?t:"",bits:e,encode_timestamp:r})}async random_hash(){return await this.execute("random_hash")}async random_hashes(t=1){return await this.execute("random_hashes",t)}async random_scalar(){return await this.execute("random_scalar")}async random_scalars(t=1){return await this.execute("random_scalars",t)}async random_point(){return await this.execute("random_point")}async random_points(t=1){return await this.execute("random_points",t)}async sha256(t){return"string"!=typeof t&&(t=JSON.stringify(t)),this.execute("sha256",t)}async sha384(t){return"string"!=typeof t&&(t=JSON.stringify(t)),this.execute("sha384",t)}async sha512(t){return"string"!=typeof t&&(t=JSON.stringify(t)),this.execute("sha512",t)}async sha3(t){return"string"!=typeof t&&(t=JSON.stringify(t)),this.execute("sha3",t)}async sha3_slow(t,e=0){return this.execute("sha3_slow",{input:t,iterations:e})}async blake2b(t){return"string"!=typeof t&&(t=JSON.stringify(t)),this.execute("blake2b",t)}async argon2i(t,e=1,r=256,n=1){return"string"!=typeof t&&(t=JSON.stringify(t)),this.execute("argon2i",{input:t,iterations:e,memory:r,threads:n})}async argon2d(t,e=1,r=256,n=1){return"string"!=typeof t&&(t=JSON.stringify(t)),this.execute("argon2d",{input:t,iterations:e,memory:r,threads:n})}async argon2id(t,e=1,r=256,n=1){return"string"!=typeof t&&(t=JSON.stringify(t)),this.execute("argon2id",{input:t,iterations:e,memory:r,threads:n})}async entropy_recover(t,e=i.Language.ENGLISH){return Array.isArray(t)&&(t=t.join(" ")),this.execute("entropy_recover",{input:t,language:e})}async generate_derivation(t,e){return this.execute("generate_derivation",{public_key:t,secret_key:e})}async generate_derivation_scalar(t,e=0){return this.execute("generate_derivation_scalar",{derivation:t,output_index:e})}async derive_public_key(t,e){return this.execute("derive_public_key",{derivation_scalar:t,public_key:e})}async derive_secret_key(t,e){return this.execute("derive_secret_key",{derivation_scalar:t,secret_key:e})}async generate_key_image(t,e){return this.execute("generate_key_image",{public_ephemeral:t,secret_ephemeral:e})}async generate_key_image_v2(t){return this.execute("generate_key_image_v2",t)}async generate_keys(){return this.execute("generate_keys")}async generate_keys_m(t=1){return this.execute("generate_keys_m",t)}async underive_public_key(t,e,r=0){return this.execute("underive_public_key",{derivation:t,output_index:r,public_ephemeral:e})}async secret_key_to_public_key(t){return this.execute("secret_key_to_public_key",t)}async private_key_to_keys(t){return this.execute("private_key_to_keys",t)}async hash_to_point(t){return t instanceof u.Buffer?this.execute("hash_to_point",t.toString("hex")):("string"!=typeof t&&(t=JSON.stringify(t)),this.execute("hash_to_point",t))}async hash_to_scalar(t){return t instanceof u.Buffer?this.execute("hash_to_scalar",t.toString("hex")):("string"!=typeof t&&(t=JSON.stringify(t)),this.execute("hash_to_scalar",t))}async scalar_reduce(t){return t instanceof u.Buffer?this.execute("scalar_reduce",t.subarray(0,32).toString("hex")):this.execute("scalar_reduce",t)}async tree_depth(t){return this.execute("tree_depth",t)}async root_hash(t){return this.execute("root_hash",{items:t})}async root_hash_from_branch(t,e,r=0,n=0){return this.execute("root_hash_from_branch",{branches:t,depth:r,leaf:e,path:n})}async tree_branch(t){return this.execute("tree_branch",{items:t})}async generate_rfc8032_signature(t,e){return this.execute("generate_rfc8032_signature",{message:t,secret_key:e})}async check_rfc8032_signature(t,e,r){try{return await this.execute("check_rfc8032_signature",{message:t,public_key:e,signature:r}),!0}catch(t){return!1}}async generate_signature(t,e){return this.execute("generate_signature",{message_digest:t,secret_key:e})}async prepare_signature(t,e){return this.execute("prepare_signature",{message_digest:t,public_key:e})}async complete_signature(t,e){return this.execute("complete_signature",{secret_key:t,signature:e})}async check_signature(t,e,r){try{return await this.execute("check_signature",{message_digest:t,public_key:e,signature:r}),!0}catch(t){return!1}}async generate_borromean_signature(t,e,r){return this.execute("generate_borromean_signature",{message_digest:t,secret_ephemeral:e,public_keys:r})}async prepare_borromean_signature(t,e,r,n){return this.execute("prepare_borromean_signature",{message_digest:t,key_image:e,public_keys:r,real_output_index:n})}async complete_borromean_signature(t,e,r){return this.execute("complete_borromean_signature",{secret_ephemeral:t,real_output_index:e,signature:r})}async check_borromean_signature(t,e,r,n){try{return await this.execute("check_borromean_signature",{message_digest:t,key_image:e,public_keys:r,signature:n}),!0}catch(t){return!1}}async generate_clsag_signature(t,e,r,n,o,i,a){const c={message_digest:t,secret_ephemeral:e,public_keys:r};return n&&(c.input_blinding_factor=n),o&&(c.public_commitments=o),i&&(c.pseudo_blinding_factor=i),a&&(c.pseudo_commitment=a),this.execute("generate_clsag_signature",c)}async prepare_clsag_signature(t,e,r,n,o,i,a,c){const u={message_digest:t,key_image:e,public_keys:r,real_output_index:n};return o&&(u.input_blinding_factor=o),i&&(u.public_commitments=i),a&&(u.pseudo_blinding_factor=a),c&&(u.pseudo_commitment=c),this.execute("prepare_clsag_signature",u)}async complete_clsag_signature(t,e,r,n,o){return this.execute("complete_clsag_signature",{secret_ephemeral:t,real_output_index:e,signature:r,h:n,mu_P:o})}async check_clsag_signature(t,e,r,n,o){try{const i={message_digest:t,key_image:e,public_keys:r,signature:n};return o&&(i.commitments=o),await this.execute("check_clsag_signature",i),!0}catch(t){return!1}}async generate_triptych_signature(t,e,r,n,o,i,a){const c={message_digest:t,secret_ephemeral:e,public_keys:r};return n&&(c.input_blinding_factor=n),o&&(c.public_commitments=o),i&&(c.pseudo_blinding_factor=i),a&&(c.pseudo_commitment=a),this.execute("generate_triptych_signature",c)}async prepare_triptych_signature(t,e,r,n,o,i,a,c){const u={message_digest:t,key_image:e,public_keys:r,real_output_index:n};return o&&(u.input_blinding_factor=o),i&&(u.public_commitments=i),a&&(u.pseudo_blinding_factor=a),c&&(u.pseudo_commitment=c),this.execute("prepare_triptych_signature",u)}async complete_triptych_signature(t,e,r){return this.execute("complete_triptych_signature",{secret_ephemeral:t,signature:e,xpow:r})}async check_triptych_signature(t,e,r,n,o){try{const i={message_digest:t,key_image:e,public_keys:r,signature:n};return o&&(i.commitments=o),await this.execute("check_triptych_signature",i),!0}catch(t){return!1}}async generate_bulletproof(t,e,r=64){return this.execute("generate_bulletproof",{amounts:t,blinding_factors:e,N:r})}async check_bulletproof(t,e,r=64){try{return Array.isArray(t)&&Array.isArray(e[0])?await this.execute("check_bulletproof_batch",{proofs:t,commitments:e,N:r}):await this.execute("check_bulletproof",{proof:t,commitments:e,N:r}),!0}catch(t){return!1}}async generate_bulletproof_plus(t,e,r=64){return this.execute("generate_bulletproof",{amounts:t,blinding_factors:e,N:r})}async check_bulletproof_plus(t,e,r=64){try{return Array.isArray(t)&&Array.isArray(e[0])?await this.execute("check_bulletproof_batch",{proofs:t,commitments:e,N:r}):await this.execute("check_bulletproof",{proof:t,commitments:e,N:r}),!0}catch(t){return!1}}async check_commitments_parity(t,e,r){try{return await this.execute("check_commitments_parity",{pseudo_commitments:t,output_commitments:e,transaction_fee:r}),!0}catch(t){return!1}}async generate_amount_mask(t){return this.execute("generate_amount_mask",t)}async generate_commitment_blinding_factor(t){return this.execute("generate_commitment_blinding_factor",t)}async generate_pedersen_commitment(t,e){return this.execute("generate_pedersen_commitment",{blinding_factor:t,amount:e})}async generate_pseudo_commitments(t,e){return this.execute("generate_pseudo_commitments",{amounts:t,output_blinding_factors:e})}async toggle_masked_amount(t,e){"number"==typeof e?e=BigInt(e):"string"==typeof e&&(e=c.uint256.from(e).value);const r=await this.execute("toggle_masked_amount",{amount_mask:t,amount:(0,c.uint256)(e).toString()});return c.uint256.from(r).value}async generate_outputs_proof(t){return this.execute("generate_outputs_proof",{items:t})}async check_outputs_proof(t,e){return this.execute("check_outputs_proof",{public_ephemerals:t,proof:e})}async base58_encode(t){return"string"==typeof t&&(t=u.Buffer.from(t,(0,a.is_hex)(t)?"hex":void 0)),this.execute("base58_encode",t.toString("hex"))}async base58_encode_check(t){return"string"==typeof t&&(t=u.Buffer.from(t,(0,a.is_hex)(t)?"hex":void 0)),this.execute("base58_encode_check",t.toString("hex"))}async base58_decode(t){const e=await this.execute("base58_decode",t);return u.Buffer.from(e,"hex")}async base58_decode_check(t){const e=await this.execute("base58_decode_check",t);return u.Buffer.from(e,"hex")}async cn_base58_encode(t){return"string"==typeof t&&(t=u.Buffer.from(t,(0,a.is_hex)(t)?"hex":void 0)),this.execute("cn_base58_encode",t.toString("hex"))}async cn_base58_encode_check(t){return"string"==typeof t&&(t=u.Buffer.from(t,(0,a.is_hex)(t)?"hex":void 0)),this.execute("cn_base58_encode_check",t.toString("hex"))}async cn_base58_decode(t){const e=await this.execute("cn_base58_decode",t);return u.Buffer.from(e,"hex")}async cn_base58_decode_check(t){const e=await this.execute("cn_base58_decode_check",t);return u.Buffer.from(e,"hex")}async generate_transaction_fee_commitment(t){return this.generate_pedersen_commitment("".padEnd(64,"0"),t)}async check_scalar(t){try{return await this.execute("check_scalar",t),!0}catch(t){return!1}}async check_point(t){try{return await this.execute("check_point",t),!0}catch(t){return!1}}async mnemonics_encode(t,e=i.Language.ENGLISH){return(await this.execute("mnemonics_encode",{entropy:t,language:e})).split(" ")}async mnemonics_decode(t,e=i.Language.ENGLISH){return Array.isArray(t)&&(t=t.join(" ")),this.execute("mnemonics_decode",{input:t,language:e})}async mnemonics_word_index(t,e=i.Language.ENGLISH){return this.execute("mnemonics_word_index",{input:t,language:e})}async word_list(t=i.Language.ENGLISH){return(await this.execute("word_list",{language:t})).split(" ")}async word_list_trimmed(t=i.Language.ENGLISH){return(await this.execute("word_list_trimmed",{language:t})).split(" ")}async calculate_base2_exponent(t){return this.execute("calculate_base2_exponent",t)}async aes_encrypt(t,e,r){"string"!=typeof t&&(t=JSON.stringify(t));const n={input:t,password:e};return r&&(n.iterations=r),this.execute("aes_encrypt",n)}async aes_decrypt(t,e,r){const n={input:t,password:e};return r&&(n.iterations=r),this.execute("aes_decrypt",n)}async languages(){return this.execute("languages")}async generate_seed(t,e=""){return this.execute("generate_seed",{entropy:t,passphrase:e})}async generate_child_key(t,e,r,n,o,i,a="ed25519 seed"){const c={seed:t,hmac_key:a};return"string"==typeof e?c.path=e.toLowerCase():(void 0!==e&&(c.purpose=e),void 0!==r&&(c.coin_type=r),void 0!==n&&(c.account=n),void 0!==o&&(c.change=o),void 0!==i&&(c.address_index=i)),this.execute("generate_child_key",c)}make_path(t,e,r,n,o){if("string"==typeof t)return t.toLowerCase();let i="m";return void 0!==t&&(i+=`/${t}'`,void 0!==e&&(i+=`/${e}'`,void 0!==r&&(i+=`/${r}'`,void 0!==n&&(i+=`/${n}'`,void 0!==o&&(i+=`/${o}'`))))),i}async execute(t,e){var r;const n=(()=>void 0!==this.external_library[t]?this.external_library[t]:s.runtime_configuration.library&&void 0!==s.runtime_configuration.library[t]?s.runtime_configuration.library[t]:void 0)();if(!n)throw new Error(`0x01: Method Not Found. ${t}(${e?JSON.stringify(e):""})`);let o;o=e?await n(JSON.stringify(e)):await n();const i=JSON.parse(o);if(i.error)throw new Error(null!==(r=i.error_message)&&void 0!==r?r:`0x04: An unknown error occurred: ${t}(${e?JSON.stringify(e):""})`);return i.result}}e.CryptoModule=s,s._external_library={},s.runtime_configuration={type:i.LibraryType.UNKNOWN}},4274:(t,e)=>{"use strict";var r,n;Object.defineProperty(e,"__esModule",{value:!0}),e.Language=e.LibraryType=void 0,function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.NODE=1]="NODE",t[t.WASM=2]="WASM",t[t.JS=3]="JS"}(r||(e.LibraryType=r={})),function(t){t[t.CHINESE_SIMPLIFIED=0]="CHINESE_SIMPLIFIED",t[t.CHINESE_TRADITIONAL=1]="CHINESE_TRADITIONAL",t[t.CZECH=2]="CZECH",t[t.ENGLISH=3]="ENGLISH",t[t.FRENCH=4]="FRENCH",t[t.ITALIAN=5]="ITALIAN",t[t.JAPANESE=6]="JAPANESE",t[t.KOREAN=7]="KOREAN",t[t.PORTUGUESE=8]="PORTUGUESE",t[t.SPANISH=9]="SPANISH"}(n||(e.Language=n={}))},4429:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.uint256=void 0;const r=t=>({value:t="number"==typeof t?BigInt(t):t,toString:(e=!0)=>{const r=new ArrayBuffer(32);new DataView(r).setBigUint64(0,t,e);let n="";return new Uint8Array(r).forEach((t=>{n+=t.toString(16).padStart(2,"0")})),n}});r.from=(t,e=!0)=>{if(!/^[0-9a-f]+$/i.test(t))throw new Error("Not a hexadecimal string");const n=t.match(/.{1,2}/g)||[];if(32!==n.length)throw new Error("Invalid hexadecimal length");const o=Uint8Array.from(n.map((t=>`0x${t}`))),i=new DataView(o.buffer).getBigUint64(0,e);return r(i)},e.uint256=r},1135:t=>{t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},9032:(t,e,r)=>{"use strict";var n=r(7244),o=r(8184),i=r(5767),a=r(5680);function c(t){return t.call.bind(t)}var u="undefined"!=typeof BigInt,s="undefined"!=typeof Symbol,f=c(Object.prototype.toString),l=c(Number.prototype.valueOf),p=c(String.prototype.valueOf),y=c(Boolean.prototype.valueOf);if(u)var h=c(BigInt.prototype.valueOf);if(s)var g=c(Symbol.prototype.valueOf);function d(t,e){if("object"!=typeof t)return!1;try{return e(t),!0}catch(t){return!1}}function b(t){return"[object Map]"===f(t)}function m(t){return"[object Set]"===f(t)}function v(t){return"[object WeakMap]"===f(t)}function _(t){return"[object WeakSet]"===f(t)}function w(t){return"[object ArrayBuffer]"===f(t)}function E(t){return"undefined"!=typeof ArrayBuffer&&(w.working?w(t):t instanceof ArrayBuffer)}function O(t){return"[object DataView]"===f(t)}function A(t){return"undefined"!=typeof DataView&&(O.working?O(t):t instanceof DataView)}e.isArgumentsObject=n,e.isGeneratorFunction=o,e.isTypedArray=a,e.isPromise=function(t){return"undefined"!=typeof Promise&&t instanceof Promise||null!==t&&"object"==typeof t&&"function"==typeof t.then&&"function"==typeof t.catch},e.isArrayBufferView=function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):a(t)||A(t)},e.isUint8Array=function(t){return"Uint8Array"===i(t)},e.isUint8ClampedArray=function(t){return"Uint8ClampedArray"===i(t)},e.isUint16Array=function(t){return"Uint16Array"===i(t)},e.isUint32Array=function(t){return"Uint32Array"===i(t)},e.isInt8Array=function(t){return"Int8Array"===i(t)},e.isInt16Array=function(t){return"Int16Array"===i(t)},e.isInt32Array=function(t){return"Int32Array"===i(t)},e.isFloat32Array=function(t){return"Float32Array"===i(t)},e.isFloat64Array=function(t){return"Float64Array"===i(t)},e.isBigInt64Array=function(t){return"BigInt64Array"===i(t)},e.isBigUint64Array=function(t){return"BigUint64Array"===i(t)},b.working="undefined"!=typeof Map&&b(new Map),e.isMap=function(t){return"undefined"!=typeof Map&&(b.working?b(t):t instanceof Map)},m.working="undefined"!=typeof Set&&m(new Set),e.isSet=function(t){return"undefined"!=typeof Set&&(m.working?m(t):t instanceof Set)},v.working="undefined"!=typeof WeakMap&&v(new WeakMap),e.isWeakMap=function(t){return"undefined"!=typeof WeakMap&&(v.working?v(t):t instanceof WeakMap)},_.working="undefined"!=typeof WeakSet&&_(new WeakSet),e.isWeakSet=function(t){return _(t)},w.working="undefined"!=typeof ArrayBuffer&&w(new ArrayBuffer),e.isArrayBuffer=E,O.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&O(new DataView(new ArrayBuffer(1),0,1)),e.isDataView=A;var x="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function S(t){return"[object SharedArrayBuffer]"===f(t)}function j(t){return void 0!==x&&(void 0===S.working&&(S.working=S(new x)),S.working?S(t):t instanceof x)}function I(t){return d(t,l)}function k(t){return d(t,p)}function P(t){return d(t,y)}function B(t){return u&&d(t,h)}function N(t){return s&&d(t,g)}e.isSharedArrayBuffer=j,e.isAsyncFunction=function(t){return"[object AsyncFunction]"===f(t)},e.isMapIterator=function(t){return"[object Map Iterator]"===f(t)},e.isSetIterator=function(t){return"[object Set Iterator]"===f(t)},e.isGeneratorObject=function(t){return"[object Generator]"===f(t)},e.isWebAssemblyCompiledModule=function(t){return"[object WebAssembly.Module]"===f(t)},e.isNumberObject=I,e.isStringObject=k,e.isBooleanObject=P,e.isBigIntObject=B,e.isSymbolObject=N,e.isBoxedPrimitive=function(t){return I(t)||k(t)||P(t)||B(t)||N(t)},e.isAnyArrayBuffer=function(t){return"undefined"!=typeof Uint8Array&&(E(t)||j(t))},["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(t){Object.defineProperty(e,t,{enumerable:!1,value:function(){throw new Error(t+" is not supported in userland")}})}))},537:(t,e,r)=>{var n=r(5606),o=r(6763),i=Object.getOwnPropertyDescriptors||function(t){for(var e=Object.keys(t),r={},n=0;n<e.length;n++)r[e[n]]=Object.getOwnPropertyDescriptor(t,e[n]);return r},a=/%[sdj%]/g;e.format=function(t){if(!_(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(f(arguments[r]));return e.join(" ")}r=1;for(var n=arguments,o=n.length,i=String(t).replace(a,(function(t){if("%%"===t)return"%";if(r>=o)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return t}})),c=n[r];r<o;c=n[++r])m(c)||!O(c)?i+=" "+c:i+=" "+f(c);return i},e.deprecate=function(t,r){if(void 0!==n&&!0===n.noDeprecation)return t;if(void 0===n)return function(){return e.deprecate(t,r).apply(this,arguments)};var i=!1;return function(){if(!i){if(n.throwDeprecation)throw new Error(r);n.traceDeprecation?o.trace(r):o.error(r),i=!0}return t.apply(this,arguments)}};var c={},u=/^$/;if(n.env.NODE_DEBUG){var s=n.env.NODE_DEBUG;s=s.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),u=new RegExp("^"+s+"$","i")}function f(t,r){var n={seen:[],stylize:p};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),b(r)?n.showHidden=r:r&&e._extend(n,r),w(n.showHidden)&&(n.showHidden=!1),w(n.depth)&&(n.depth=2),w(n.colors)&&(n.colors=!1),w(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=l),y(n,t,n.depth)}function l(t,e){var r=f.styles[e];return r?"["+f.colors[r][0]+"m"+t+"["+f.colors[r][1]+"m":t}function p(t,e){return t}function y(t,r,n){if(t.customInspect&&r&&S(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var o=r.inspect(n,t);return _(o)||(o=y(t,o,n)),o}var i=function(t,e){if(w(e))return t.stylize("undefined","undefined");if(_(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}return v(e)?t.stylize(""+e,"number"):b(e)?t.stylize(""+e,"boolean"):m(e)?t.stylize("null","null"):void 0}(t,r);if(i)return i;var a=Object.keys(r),c=function(t){var e={};return t.forEach((function(t,r){e[t]=!0})),e}(a);if(t.showHidden&&(a=Object.getOwnPropertyNames(r)),x(r)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return h(r);if(0===a.length){if(S(r)){var u=r.name?": "+r.name:"";return t.stylize("[Function"+u+"]","special")}if(E(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(A(r))return t.stylize(Date.prototype.toString.call(r),"date");if(x(r))return h(r)}var s,f="",l=!1,p=["{","}"];return d(r)&&(l=!0,p=["[","]"]),S(r)&&(f=" [Function"+(r.name?": "+r.name:"")+"]"),E(r)&&(f=" "+RegExp.prototype.toString.call(r)),A(r)&&(f=" "+Date.prototype.toUTCString.call(r)),x(r)&&(f=" "+h(r)),0!==a.length||l&&0!=r.length?n<0?E(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special"):(t.seen.push(r),s=l?function(t,e,r,n,o){for(var i=[],a=0,c=e.length;a<c;++a)P(e,String(a))?i.push(g(t,e,r,n,String(a),!0)):i.push("");return o.forEach((function(o){o.match(/^\d+$/)||i.push(g(t,e,r,n,o,!0))})),i}(t,r,n,c,a):a.map((function(e){return g(t,r,n,c,e,l)})),t.seen.pop(),function(t,e,r){return t.reduce((function(t,e){return e.indexOf("\n"),t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60?r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}(s,f,p)):p[0]+f+p[1]}function h(t){return"["+Error.prototype.toString.call(t)+"]"}function g(t,e,r,n,o,i){var a,c,u;if((u=Object.getOwnPropertyDescriptor(e,o)||{value:e[o]}).get?c=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(c=t.stylize("[Setter]","special")),P(n,o)||(a="["+o+"]"),c||(t.seen.indexOf(u.value)<0?(c=m(r)?y(t,u.value,null):y(t,u.value,r-1)).indexOf("\n")>-1&&(c=i?c.split("\n").map((function(t){return" "+t})).join("\n").slice(2):"\n"+c.split("\n").map((function(t){return" "+t})).join("\n")):c=t.stylize("[Circular]","special")),w(a)){if(i&&o.match(/^\d+$/))return c;(a=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.slice(1,-1),a=t.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=t.stylize(a,"string"))}return a+": "+c}function d(t){return Array.isArray(t)}function b(t){return"boolean"==typeof t}function m(t){return null===t}function v(t){return"number"==typeof t}function _(t){return"string"==typeof t}function w(t){return void 0===t}function E(t){return O(t)&&"[object RegExp]"===j(t)}function O(t){return"object"==typeof t&&null!==t}function A(t){return O(t)&&"[object Date]"===j(t)}function x(t){return O(t)&&("[object Error]"===j(t)||t instanceof Error)}function S(t){return"function"==typeof t}function j(t){return Object.prototype.toString.call(t)}function I(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(t){if(t=t.toUpperCase(),!c[t])if(u.test(t)){var r=n.pid;c[t]=function(){var n=e.format.apply(e,arguments);o.error("%s %d: %s",t,r,n)}}else c[t]=function(){};return c[t]},e.inspect=f,f.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},f.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.types=r(9032),e.isArray=d,e.isBoolean=b,e.isNull=m,e.isNullOrUndefined=function(t){return null==t},e.isNumber=v,e.isString=_,e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=w,e.isRegExp=E,e.types.isRegExp=E,e.isObject=O,e.isDate=A,e.types.isDate=A,e.isError=x,e.types.isNativeError=x,e.isFunction=S,e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=r(1135);var k=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function P(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){var t,r;o.log("%s - %s",(r=[I((t=new Date).getHours()),I(t.getMinutes()),I(t.getSeconds())].join(":"),[t.getDate(),k[t.getMonth()],r].join(" ")),e.format.apply(e,arguments))},e.inherits=r(6698),e._extend=function(t,e){if(!e||!O(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t};var B="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function N(t,e){if(!t){var r=new Error("Promise was rejected with a falsy value");r.reason=t,t=r}return e(t)}e.promisify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');if(B&&t[B]){var e;if("function"!=typeof(e=t[B]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,B,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var e,r,n=new Promise((function(t,n){e=t,r=n})),o=[],i=0;i<arguments.length;i++)o.push(arguments[i]);o.push((function(t,n){t?r(t):e(n)}));try{t.apply(this,o)}catch(t){r(t)}return n}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),B&&Object.defineProperty(e,B,{value:e,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(e,i(t))},e.promisify.custom=B,e.callbackify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');function e(){for(var e=[],r=0;r<arguments.length;r++)e.push(arguments[r]);var o=e.pop();if("function"!=typeof o)throw new TypeError("The last argument must be of type Function");var i=this,a=function(){return o.apply(i,arguments)};t.apply(this,e).then((function(t){n.nextTick(a.bind(null,null,t))}),(function(t){n.nextTick(N.bind(null,t,a))}))}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),Object.defineProperties(e,i(t)),e}},5767:(t,e,r)=>{"use strict";var n=r(2682),o=r(9209),i=r(487),a=r(8075),c=r(5795),u=a("Object.prototype.toString"),s=r(9092)(),f="undefined"==typeof globalThis?r.g:globalThis,l=o(),p=a("String.prototype.slice"),y=Object.getPrototypeOf,h=a("Array.prototype.indexOf",!0)||function(t,e){for(var r=0;r<t.length;r+=1)if(t[r]===e)return r;return-1},g={__proto__:null};n(l,s&&c&&y?function(t){var e=new f[t];if(Symbol.toStringTag in e){var r=y(e),n=c(r,Symbol.toStringTag);if(!n){var o=y(r);n=c(o,Symbol.toStringTag)}g["$"+t]=i(n.get)}}:function(t){var e=new f[t],r=e.slice||e.set;r&&(g["$"+t]=i(r))}),t.exports=function(t){if(!t||"object"!=typeof t)return!1;if(!s){var e=p(u(t),8,-1);return h(l,e)>-1?e:"Object"===e&&function(t){var e=!1;return n(g,(function(r,n){if(!e)try{r(t),e=p(n,1)}catch(t){}})),e}(t)}return c?function(t){var e=!1;return n(g,(function(r,n){if(!e)try{"$"+r(t)===n&&(e=p(n,1))}catch(t){}})),e}(t):null}},9209:(t,e,r)=>{"use strict";var n=r(6578),o="undefined"==typeof globalThis?r.g:globalThis;t.exports=function(){for(var t=[],e=0;e<n.length;e++)"function"==typeof o[n[e]]&&(t[t.length]=n[e]);return t}}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n].call(i.exports,i,i.exports,r),i.exports}return r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r(8156)})()));
|
|
2
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var r=t();for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(self,(()=>{return e={156:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.Crypto=void 0;const o=r(319),s=r(672);i(r(319),t);class a extends o.CryptoModule{constructor(){super()}static async init(e={}){if(this.external_library=e,!this.runtime_configuration.library){if(await this.load_wasm_library())return new a;if(await this.load_js_library())return new a;throw new Error("Could not initialize an underlying library")}return new a}static async force_js_library(){return this.load_js_library()}static async force_wasm_library(){return this.load_wasm_library()}static async load(e){return!!await a.url_exists(e)&&new Promise(((t,r)=>{const n=document.createElement("script");n.src=e,n.defer=!0,n.async=!1,n.crossOrigin="anonymous",n.referrerPolicy="no-referrer",n.addEventListener("load",(()=>t(!0))),n.addEventListener("error",(()=>function(e){return r(new Error(e.message))})),document.head.appendChild(n)}))}static async load_library(e,t){if(!await this.load(e))return!1;if(!window.CryptoModule)return!1;const r=await new window.CryptoModule;return 0!==Object.getOwnPropertyNames(r).length&&void 0!==r.sha3&&(o.CryptoModule.runtime_configuration={type:t,library:r},!0)}static async load_js_library(){return!!await this.load_library(`https://cdn.jsdelivr.net/npm/@gibme/crypto@${s.version}/dist/src/loaders/crypto-module.js`,o.CryptoModule.Type.JS)||this.load_library("https://testmodule.pages.dev/crypto-module.js",o.CryptoModule.Type.JS)}static async load_wasm_library(){return!!await this.load_library(`https://cdn.jsdelivr.net/npm/@gibme/crypto@${s.version}/dist/src/loaders/crypto-module-wasm.js`,o.CryptoModule.Type.WASM)||this.load_library("https://testmodule.pages.dev/crypto-module-wasm.js",o.CryptoModule.Type.WASM)}static async url_exists(e){return(await fetch(e,{method:"HEAD"})).ok}}t.default=a,t.Crypto=a},251:(e,t)=>{t.read=function(e,t,r,n,i){var o,s,a=8*i-n-1,u=(1<<a)-1,c=u>>1,f=-7,h=r?i-1:0,l=r?-1:1,p=e[t+h];for(h+=l,o=p&(1<<-f)-1,p>>=-f,f+=a;f>0;o=256*o+e[t+h],h+=l,f-=8);for(s=o&(1<<-f)-1,o>>=-f,f+=n;f>0;s=256*s+e[t+h],h+=l,f-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),o-=c}return(p?-1:1)*s*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var s,a,u,c=8*o-i-1,f=(1<<c)-1,h=f>>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,y=n?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=f):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),(t+=s+h>=1?l/u:l*Math.pow(2,1-h))*u>=2&&(s++,u/=2),s+h>=f?(a=0,s=f):s+h>=1?(a=(t*u-1)*Math.pow(2,i),s+=h):(a=t*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;e[r+p]=255&a,p+=y,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;e[r+p]=255&s,p+=y,s/=256,c-=8);e[r+p-y]|=128*g}},274:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},287:(e,t,r)=>{"use strict";const n=r(526),i=r(251),o="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 s=2147483647;function a(e){if(e>s)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,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return h(e)}return c(e,t,r)}function c(e,t,r){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 r=0|g(e,t);let n=a(r);const i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(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 l(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,r);if("undefined"!=typeof SharedArrayBuffer&&(V(e,SharedArrayBuffer)||e&&V(e.buffer,SharedArrayBuffer)))return p(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return u.from(n,t,r);const i=function(e){if(u.isBuffer(e)){const t=0|y(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||Z(e.length)?a(0):l(e):"Buffer"===e.type&&Array.isArray(e.data)?l(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return u.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function f(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 h(e){return f(e),a(e<0?0:0|y(e))}function l(e){const t=e.length<0?0:0|y(e.length),r=a(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function p(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,u.prototype),n}function y(e){if(e>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function g(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 r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return W(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Y(e).length;default:if(i)return n?-1:W(e).length;t=(""+t).toLowerCase(),i=!0}}function _(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return N(this,t,r);case"utf8":case"utf-8":return I(this,t,r);case"ascii":return S(this,t,r);case"latin1":case"binary":return O(this,t,r);case"base64":return A(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function d(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function m(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),Z(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:b(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):b(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function b(e,t,r,n,i){let o,s=1,a=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,u/=2,r/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){let n=-1;for(o=r;o<a;o++)if(c(e,o)===c(t,-1===n?0:o-n)){if(-1===n&&(n=o),o-n+1===u)return n*s}else-1!==n&&(o-=o-n),n=-1}else for(r+u>a&&(r=a-u),o=r;o>=0;o--){let r=!0;for(let n=0;n<u;n++)if(c(e,o+n)!==c(t,n)){r=!1;break}if(r)return o}return-1}function w(e,t,r,n){r=Number(r)||0;const i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;const o=t.length;let s;for(n>o/2&&(n=o/2),s=0;s<n;++s){const n=parseInt(t.substr(2*s,2),16);if(Z(n))return s;e[r+s]=n}return s}function x(e,t,r,n){return K(W(t,e.length-r),e,r,n)}function E(e,t,r,n){return K(function(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function v(e,t,r,n){return K(Y(t),e,r,n)}function B(e,t,r,n){return K(function(e,t){let r,n,i;const o=[];for(let s=0;s<e.length&&!((t-=2)<0);++s)r=e.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function A(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function I(e,t,r){r=Math.min(e.length,r);const n=[];let i=t;for(;i<r;){const t=e[i];let o=null,s=t>239?4:t>223?3:t>191?2:1;if(i+s<=r){let r,n,a,u;switch(s){case 1:t<128&&(o=t);break;case 2:r=e[i+1],128==(192&r)&&(u=(31&t)<<6|63&r,u>127&&(o=u));break;case 3:r=e[i+1],n=e[i+2],128==(192&r)&&128==(192&n)&&(u=(15&t)<<12|(63&r)<<6|63&n,u>2047&&(u<55296||u>57343)&&(o=u));break;case 4:r=e[i+1],n=e[i+2],a=e[i+3],128==(192&r)&&128==(192&n)&&128==(192&a)&&(u=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&a,u>65535&&u<1114112&&(o=u))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=s}return function(e){const t=e.length;if(t<=k)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=k));return r}(n)}t.kMaxLength=s,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,r){return c(e,t,r)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(e,t,r){return function(e,t,r){return f(e),e<=0?a(e):void 0!==t?"string"==typeof r?a(e).fill(t,r):a(e).fill(t):a(e)}(e,t,r)},u.allocUnsafe=function(e){return h(e)},u.allocUnsafeSlow=function(e){return h(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 r=e.length,n=t.length;for(let i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?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 r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const n=u.allocUnsafe(t);let i=0;for(r=0;r<e.length;++r){let t=e[r];if(V(t,Uint8Array))i+t.length>n.length?(u.isBuffer(t)||(t=u.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else{if(!u.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,i)}i+=t.length}return n},u.byteLength=g,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)d(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)d(this,t,t+3),d(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)d(this,t,t+7),d(this,t+1,t+6),d(this,t+2,t+5),d(this,t+3,t+4);return this},u.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?I(this,0,e):_.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 r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},o&&(u.prototype[o]=u.prototype.inspect),u.prototype.compare=function(e,t,r,n,i){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===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;let o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0);const a=Math.min(o,s),c=this.slice(n,i),f=e.slice(t,r);for(let e=0;e<a;++e)if(c[e]!==f[e]){o=c[e],s=f[e];break}return o<s?-1:s<o?1:0},u.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},u.prototype.indexOf=function(e,t,r){return m(this,e,t,r,!0)},u.prototype.lastIndexOf=function(e,t,r){return m(this,e,t,r,!1)},u.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return w(this,e,t,r);case"utf8":case"utf-8":return x(this,e,t,r);case"ascii":case"latin1":case"binary":return E(this,e,t,r);case"base64":return v(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const k=4096;function S(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function O(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function N(e,t,r){const n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let i="";for(let n=t;n<r;++n)i+=q[e[n]];return i}function U(e,t,r){const n=e.slice(t,r);let i="";for(let e=0;e<n.length-1;e+=2)i+=String.fromCharCode(n[e]+256*n[e+1]);return i}function L(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function T(e,t,r,n,i,o){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function R(e,t,r,n,i){H(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,r}function C(e,t,r,n,i){H(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o>>=8,e[r+6]=o,o>>=8,e[r+5]=o,o>>=8,e[r+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s>>=8,e[r+2]=s,s>>=8,e[r+1]=s,s>>=8,e[r]=s,r+8}function M(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function P(e,t,r,n,o){return t=+t,r>>>=0,o||M(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function j(e,t,r,n,o){return t=+t,r>>>=0,o||M(e,0,r,8),i.write(e,t,r,n,52,8),r+8}u.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);const n=this.subarray(e,t);return Object.setPrototypeOf(n,u.prototype),n},u.prototype.readUintLE=u.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||L(e,t,this.length);let n=this[e],i=1,o=0;for(;++o<t&&(i*=256);)n+=this[e+o]*i;return n},u.prototype.readUintBE=u.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||L(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},u.prototype.readUint8=u.prototype.readUInt8=function(e,t){return e>>>=0,t||L(e,1,this.length),this[e]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(e,t){return e>>>=0,t||L(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(e,t){return e>>>=0,t||L(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(e,t){return e>>>=0,t||L(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||L(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readBigUInt64LE=X((function(e){F(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||G(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(i)<<BigInt(32))})),u.prototype.readBigUInt64BE=X((function(e){F(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||G(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(i)})),u.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||L(e,t,this.length);let n=this[e],i=1,o=0;for(;++o<t&&(i*=256);)n+=this[e+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||L(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return e>>>=0,t||L(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){e>>>=0,t||L(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){e>>>=0,t||L(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return e>>>=0,t||L(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||L(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readBigInt64LE=X((function(e){F(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||G(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),u.prototype.readBigInt64BE=X((function(e){F(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||G(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)})),u.prototype.readFloatLE=function(e,t){return e>>>=0,t||L(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e>>>=0,t||L(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e>>>=0,t||L(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e>>>=0,t||L(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||T(this,e,t,r,Math.pow(2,8*r)-1,0);let i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||T(this,e,t,r,Math.pow(2,8*r)-1,0);let i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},u.prototype.writeUint8=u.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,1,255,0),this[t]=255&e,t+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||T(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,r){return e=+e,t>>>=0,r||T(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,r){return e=+e,t>>>=0,r||T(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,r){return e=+e,t>>>=0,r||T(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=X((function(e,t=0){return R(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeBigUInt64BE=X((function(e,t=0){return C(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);T(this,e,t,r,n-1,-n)}let i=0,o=1,s=0;for(this[t]=255&e;++i<r&&(o*=256);)e<0&&0===s&&0!==this[t+i-1]&&(s=1),this[t+i]=(e/o|0)-s&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);T(this,e,t,r,n-1,-n)}let i=r-1,o=1,s=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/o|0)-s&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||T(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,r){return e=+e,t>>>=0,r||T(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=X((function(e,t=0){return R(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeBigInt64BE=X((function(e,t=0){return C(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeFloatLE=function(e,t,r){return P(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return P(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return j(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return j(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(!u.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);const i=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),i},u.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){const t=e.charCodeAt(0);("utf8"===n&&t<128||"latin1"===n)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;let i;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{const o=u.isBuffer(e)?e:u.from(e,n),s=o.length;if(0===s)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=o[i%s]}return this};const $={};function J(e,t,r){$[e]=class extends r{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 D(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function H(e,t,r,n,i,o){if(e>r||e<t){const n="bigint"==typeof t?"n":"";let i;throw i=o>3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new $.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,r){F(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||G(t,e.length-(r+1))}(n,i,o)}function F(e,t){if("number"!=typeof e)throw new $.ERR_INVALID_ARG_TYPE(t,"number",e)}function G(e,t,r){if(Math.floor(e)!==e)throw F(e,r),new $.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new $.ERR_BUFFER_OUT_OF_BOUNDS;throw new $.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}J("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),J("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),J("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=D(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=D(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n}),RangeError);const z=/[^+/0-9A-Za-z-_]/g;function W(e,t){let r;t=t||1/0;const n=e.length;let i=null;const o=[];for(let s=0;s<n;++s){if(r=e.charCodeAt(s),r>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function Y(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(z,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function K(e,t,r,n){let i;for(i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function V(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Z(e){return e!=e}const q=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function X(e){return"undefined"==typeof BigInt?Q:e}function Q(){throw new Error("BigInt not supported")}},319:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.CryptoModule=void 0;const o=r(429),s=r(287);i(r(274),t);class a{constructor(){}static get external_library(){return this._external_library}static set external_library(e){for(const t of Object.keys(e))this._external_library[t]=e[t]}set external_library(e){a.external_library=e}static get library_name(){return a.typeToString(this.runtime_configuration.type)}static get library_type(){return this.runtime_configuration.type}static get is_native(){return this.runtime_configuration.type===a.Type.NODE}get external_library(){return a.external_library}get library_name(){return a.library_name}get library_type(){return a.library_type}get is_native(){return a.is_native}static is_hex(e){return/^[0-9a-f]+$/i.test(e)}static make_module_result(e,t,r){const n={error:e,result:t};return r&&(n.error_message=r),JSON.stringify(n)}static languageToString(e){switch(e){case a.Language.CHINESE_SIMPLIFIED:return"Chinese (simplified)";case a.Language.CHINESE_TRADITIONAL:return"Chinese (traditional)";case a.Language.CZECH:return"Czech";case a.Language.ENGLISH:return"English";case a.Language.FRENCH:return"French";case a.Language.ITALIAN:return"Italian";case a.Language.JAPANESE:return"Japanese";case a.Language.KOREAN:return"Korean";case a.Language.PORTUGUESE:return"Portuguese";case a.Language.SPANISH:return"Spanish";default:return"Unknown"}}static typeToString(e){switch(e){case a.Type.NODE:return"Node C++ Addon";case a.Type.WASM:return"WASM.js Library";case a.Type.JS:return"Javascript asm.js (slow)";default:return"unknown"}}async base58_address_encode(e,t,r){return r?this.execute("base58_address_encode",{prefix:e,public_spend:t,public_view:r}):this.execute("base58_address_encode",{prefix:e,public_key:t})}async cn_base58_address_encode(e,t,r){return r?this.execute("cn_base58_address_encode",{prefix:e,public_spend:t,public_view:r}):this.execute("cn_base58_address_encode",{prefix:e,public_key:t})}async base58_address_decode(e){const t=await this.execute("base58_address_decode",e);return t.public_view&&o.uint256.from(t.public_view).value===BigInt(1)&&delete t.public_view,t}async cn_base58_address_decode(e){const t=await this.execute("cn_base58_address_decode",e);return t.public_view&&o.uint256.from(t.public_view).value===BigInt(1)&&delete t.public_view,t}async random_entropy(e,t=256,r=!0){return await this.execute("random_entropy",{entropy:null!=e?e:"",bits:t,encode_timestamp:r})}async random_hash(){return await this.execute("random_hash")}async random_hashes(e=1){return await this.execute("random_hashes",e)}async random_scalar(){return await this.execute("random_scalar")}async random_scalars(e=1){return await this.execute("random_scalars",e)}async random_point(){return await this.execute("random_point")}async random_points(e=1){return await this.execute("random_points",e)}async sha256(e){return"string"!=typeof e&&(e=JSON.stringify(e)),this.execute("sha256",e)}async sha384(e){return"string"!=typeof e&&(e=JSON.stringify(e)),this.execute("sha384",e)}async sha512(e){return"string"!=typeof e&&(e=JSON.stringify(e)),this.execute("sha512",e)}async sha3(e){return"string"!=typeof e&&(e=JSON.stringify(e)),this.execute("sha3",e)}async sha3_slow(e,t=0){return this.execute("sha3_slow",{input:e,iterations:t})}async blake2b(e){return"string"!=typeof e&&(e=JSON.stringify(e)),this.execute("blake2b",e)}async argon2i(e,t=1,r=256,n=1){return"string"!=typeof e&&(e=JSON.stringify(e)),this.execute("argon2i",{input:e,iterations:t,memory:r,threads:n})}async argon2d(e,t=1,r=256,n=1){return"string"!=typeof e&&(e=JSON.stringify(e)),this.execute("argon2d",{input:e,iterations:t,memory:r,threads:n})}async argon2id(e,t=1,r=256,n=1){return"string"!=typeof e&&(e=JSON.stringify(e)),this.execute("argon2id",{input:e,iterations:t,memory:r,threads:n})}async entropy_recover(e,t=a.Language.ENGLISH){return Array.isArray(e)&&(e=e.join(" ")),this.execute("entropy_recover",{input:e,language:t})}async generate_derivation(e,t){return this.execute("generate_derivation",{public_key:e,secret_key:t})}async generate_derivation_scalar(e,t=0){return this.execute("generate_derivation_scalar",{derivation:e,output_index:t})}async derive_public_key(e,t){return this.execute("derive_public_key",{derivation_scalar:e,public_key:t})}async derive_secret_key(e,t){return this.execute("derive_secret_key",{derivation_scalar:e,secret_key:t})}async generate_key_image(e,t){return this.execute("generate_key_image",{public_ephemeral:e,secret_ephemeral:t})}async generate_key_image_v2(e){return this.execute("generate_key_image_v2",e)}async generate_keys(){return this.execute("generate_keys")}async generate_keys_m(e=1){return this.execute("generate_keys_m",e)}async underive_public_key(e,t,r=0){return this.execute("underive_public_key",{derivation:e,output_index:r,public_ephemeral:t})}async secret_key_to_public_key(e){return this.execute("secret_key_to_public_key",e)}async private_key_to_keys(e){return this.execute("private_key_to_keys",e)}async hash_to_point(e){return e instanceof s.Buffer?this.execute("hash_to_point",e.toString("hex")):("string"!=typeof e&&(e=JSON.stringify(e)),this.execute("hash_to_point",e))}async hash_to_scalar(e){return e instanceof s.Buffer?this.execute("hash_to_scalar",e.toString("hex")):("string"!=typeof e&&(e=JSON.stringify(e)),this.execute("hash_to_scalar",e))}async scalar_reduce(e){return e instanceof s.Buffer?this.execute("scalar_reduce",e.subarray(0,32).toString("hex")):this.execute("scalar_reduce",e)}async tree_depth(e){return this.execute("tree_depth",e)}async root_hash(e){return this.execute("root_hash",{items:e})}async root_hash_from_branch(e,t,r=0,n=0){return this.execute("root_hash_from_branch",{branches:e,depth:r,leaf:t,path:n})}async tree_branch(e){return this.execute("tree_branch",{items:e})}async generate_rfc8032_signature(e,t){return this.execute("generate_rfc8032_signature",{message:e,secret_key:t})}async check_rfc8032_signature(e,t,r){try{return await this.execute("check_rfc8032_signature",{message:e,public_key:t,signature:r}),!0}catch(e){return!1}}async generate_signature(e,t){return this.execute("generate_signature",{message_digest:e,secret_key:t})}async prepare_signature(e,t){return this.execute("prepare_signature",{message_digest:e,public_key:t})}async complete_signature(e,t){return this.execute("complete_signature",{secret_key:e,signature:t})}async check_signature(e,t,r){try{return await this.execute("check_signature",{message_digest:e,public_key:t,signature:r}),!0}catch(e){return!1}}async generate_borromean_signature(e,t,r){return this.execute("generate_borromean_signature",{message_digest:e,secret_ephemeral:t,public_keys:r})}async prepare_borromean_signature(e,t,r,n){return this.execute("prepare_borromean_signature",{message_digest:e,key_image:t,public_keys:r,real_output_index:n})}async complete_borromean_signature(e,t,r){return this.execute("complete_borromean_signature",{secret_ephemeral:e,real_output_index:t,signature:r})}async check_borromean_signature(e,t,r,n){try{return await this.execute("check_borromean_signature",{message_digest:e,key_image:t,public_keys:r,signature:n}),!0}catch(e){return!1}}async generate_clsag_signature(e,t,r,n,i,o,s){const a={message_digest:e,secret_ephemeral:t,public_keys:r};return n&&(a.input_blinding_factor=n),i&&(a.public_commitments=i),o&&(a.pseudo_blinding_factor=o),s&&(a.pseudo_commitment=s),this.execute("generate_clsag_signature",a)}async prepare_clsag_signature(e,t,r,n,i,o,s,a){const u={message_digest:e,key_image:t,public_keys:r,real_output_index:n};return i&&(u.input_blinding_factor=i),o&&(u.public_commitments=o),s&&(u.pseudo_blinding_factor=s),a&&(u.pseudo_commitment=a),this.execute("prepare_clsag_signature",u)}async complete_clsag_signature(e,t,r,n,i){return this.execute("complete_clsag_signature",{secret_ephemeral:e,real_output_index:t,signature:r,h:n,mu_P:i})}async check_clsag_signature(e,t,r,n,i){try{const o={message_digest:e,key_image:t,public_keys:r,signature:n};return i&&(o.commitments=i),await this.execute("check_clsag_signature",o),!0}catch(e){return!1}}async generate_triptych_signature(e,t,r,n,i,o,s){const a={message_digest:e,secret_ephemeral:t,public_keys:r};return n&&(a.input_blinding_factor=n),i&&(a.public_commitments=i),o&&(a.pseudo_blinding_factor=o),s&&(a.pseudo_commitment=s),this.execute("generate_triptych_signature",a)}async prepare_triptych_signature(e,t,r,n,i,o,s,a){const u={message_digest:e,key_image:t,public_keys:r,real_output_index:n};return i&&(u.input_blinding_factor=i),o&&(u.public_commitments=o),s&&(u.pseudo_blinding_factor=s),a&&(u.pseudo_commitment=a),this.execute("prepare_triptych_signature",u)}async complete_triptych_signature(e,t,r){return this.execute("complete_triptych_signature",{secret_ephemeral:e,signature:t,xpow:r})}async check_triptych_signature(e,t,r,n,i){try{const o={message_digest:e,key_image:t,public_keys:r,signature:n};return i&&(o.commitments=i),await this.execute("check_triptych_signature",o),!0}catch(e){return!1}}async generate_bulletproof(e,t,r=64){return this.execute("generate_bulletproof",{amounts:e,blinding_factors:t,N:r})}async check_bulletproof(e,t,r=64){try{return Array.isArray(e)&&Array.isArray(t[0])?await this.execute("check_bulletproof_batch",{proofs:e,commitments:t,N:r}):await this.execute("check_bulletproof",{proof:e,commitments:t,N:r}),!0}catch(e){return!1}}async generate_bulletproof_plus(e,t,r=64){return this.execute("generate_bulletproof",{amounts:e,blinding_factors:t,N:r})}async check_bulletproof_plus(e,t,r=64){try{return Array.isArray(e)&&Array.isArray(t[0])?await this.execute("check_bulletproof_batch",{proofs:e,commitments:t,N:r}):await this.execute("check_bulletproof",{proof:e,commitments:t,N:r}),!0}catch(e){return!1}}async check_commitments_parity(e,t,r){try{return await this.execute("check_commitments_parity",{pseudo_commitments:e,output_commitments:t,transaction_fee:r}),!0}catch(e){return!1}}async generate_amount_mask(e){return this.execute("generate_amount_mask",e)}async generate_commitment_blinding_factor(e){return this.execute("generate_commitment_blinding_factor",e)}async generate_pedersen_commitment(e,t){return this.execute("generate_pedersen_commitment",{blinding_factor:e,amount:t})}async generate_pseudo_commitments(e,t){return this.execute("generate_pseudo_commitments",{amounts:e,output_blinding_factors:t})}async toggle_masked_amount(e,t){"number"==typeof t?t=BigInt(t):"string"==typeof t&&(t=o.uint256.from(t).value);const r=await this.execute("toggle_masked_amount",{amount_mask:e,amount:(0,o.uint256)(t).toString()});return o.uint256.from(r).value}async generate_outputs_proof(e){return this.execute("generate_outputs_proof",{items:e})}async check_outputs_proof(e,t){return this.execute("check_outputs_proof",{public_ephemerals:e,proof:t})}async base58_encode(e){return"string"==typeof e&&(e=s.Buffer.from(e,a.is_hex(e)?"hex":void 0)),this.execute("base58_encode",e.toString("hex"))}async base58_encode_check(e){return"string"==typeof e&&(e=s.Buffer.from(e,a.is_hex(e)?"hex":void 0)),this.execute("base58_encode_check",e.toString("hex"))}async base58_decode(e){const t=await this.execute("base58_decode",e);return s.Buffer.from(t,"hex")}async base58_decode_check(e){const t=await this.execute("base58_decode_check",e);return s.Buffer.from(t,"hex")}async cn_base58_encode(e){return"string"==typeof e&&(e=s.Buffer.from(e,a.is_hex(e)?"hex":void 0)),this.execute("cn_base58_encode",e.toString("hex"))}async cn_base58_encode_check(e){return"string"==typeof e&&(e=s.Buffer.from(e,a.is_hex(e)?"hex":void 0)),this.execute("cn_base58_encode_check",e.toString("hex"))}async cn_base58_decode(e){const t=await this.execute("cn_base58_decode",e);return s.Buffer.from(t,"hex")}async cn_base58_decode_check(e){const t=await this.execute("cn_base58_decode_check",e);return s.Buffer.from(t,"hex")}async generate_transaction_fee_commitment(e){return this.generate_pedersen_commitment("".padEnd(64,"0"),e)}async check_scalar(e){try{return await this.execute("check_scalar",e),!0}catch(e){return!1}}async check_point(e){try{return await this.execute("check_point",e),!0}catch(e){return!1}}async mnemonics_encode(e,t=a.Language.ENGLISH){return(await this.execute("mnemonics_encode",{entropy:e,language:t})).split(" ")}async mnemonics_decode(e,t=a.Language.ENGLISH){return Array.isArray(e)&&(e=e.join(" ")),this.execute("mnemonics_decode",{input:e,language:t})}async mnemonics_word_index(e,t=a.Language.ENGLISH){return this.execute("mnemonics_word_index",{input:e,language:t})}async word_list(e=a.Language.ENGLISH){return(await this.execute("word_list",{language:e})).split(" ")}async word_list_trimmed(e=a.Language.ENGLISH){return(await this.execute("word_list_trimmed",{language:e})).split(" ")}async calculate_base2_exponent(e){return this.execute("calculate_base2_exponent",e)}async aes_encrypt(e,t,r){"string"!=typeof e&&(e=JSON.stringify(e));const n={input:e,password:t};return r&&(n.iterations=r),this.execute("aes_encrypt",n)}async aes_decrypt(e,t,r){const n={input:e,password:t};return r&&(n.iterations=r),this.execute("aes_decrypt",n)}async languages(){return this.execute("languages")}async generate_seed(e,t=""){return this.execute("generate_seed",{entropy:e,passphrase:t})}async generate_child_key(e,t,r,n,i,o,s="ed25519 seed"){const a={seed:e,hmac_key:s};return"string"==typeof t?a.path=t.toLowerCase():(void 0!==t&&(a.purpose=t),void 0!==r&&(a.coin_type=r),void 0!==n&&(a.account=n),void 0!==i&&(a.change=i),void 0!==o&&(a.address_index=o)),this.execute("generate_child_key",a)}make_path(e,t,r,n,i){if("string"==typeof e)return e.toLowerCase();let o="m";return void 0!==e&&(o+=`/${e}'`,void 0!==t&&(o+=`/${t}'`,void 0!==r&&(o+=`/${r}'`,void 0!==n&&(o+=`/${n}'`,void 0!==i&&(o+=`/${i}'`))))),o}async execute(e,t){var r;const n=(()=>void 0!==this.external_library[e]?this.external_library[e]:a.runtime_configuration.library&&void 0!==a.runtime_configuration.library[e]?a.runtime_configuration.library[e]:void 0)();if(!n)throw new Error(`0x01: Method Not Found. ${e}(${t?JSON.stringify(t):""})`);let i;i=t?await n(JSON.stringify(t)):await n();const o=JSON.parse(i);if(o.error)throw new Error(null!==(r=o.error_message)&&void 0!==r?r:`0x04: An unknown error occurred: ${e}(${t?JSON.stringify(t):""})`);return o.result}}t.CryptoModule=a,a.runtime_configuration={type:0},a._external_library={},function(e){let t,r;!function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.NODE=1]="NODE",e[e.WASM=2]="WASM",e[e.JS=3]="JS"}(t=e.Type||(e.Type={})),function(e){e[e.CHINESE_SIMPLIFIED=0]="CHINESE_SIMPLIFIED",e[e.CHINESE_TRADITIONAL=1]="CHINESE_TRADITIONAL",e[e.CZECH=2]="CZECH",e[e.ENGLISH=3]="ENGLISH",e[e.FRENCH=4]="FRENCH",e[e.ITALIAN=5]="ITALIAN",e[e.JAPANESE=6]="JAPANESE",e[e.KOREAN=7]="KOREAN",e[e.PORTUGUESE=8]="PORTUGUESE",e[e.SPANISH=9]="SPANISH"}(r=e.Language||(e.Language={}))}(a||(t.CryptoModule=a={})),t.default=a},429:(e,t)=>{"use strict";function r(e){return{value:e="number"==typeof e?BigInt(e):e,toString:(t=!0)=>{const r=new ArrayBuffer(32);new DataView(r).setBigUint64(0,e,t);let n="";return new Uint8Array(r).forEach((e=>{n+=e.toString(16).padStart(2,"0")})),n}}}Object.defineProperty(t,"__esModule",{value:!0}),t.uint256=r,function(e){e.from=(t,r=!0)=>{if(!/^[0-9a-f]+$/i.test(t))throw new Error("Not a hexadecimal string");const n=t.match(/.{1,2}/g)||[];if(32!==n.length)throw new Error("Invalid hexadecimal length");const i=Uint8Array.from(n.map((e=>`0x${e}`))),o=new DataView(i.buffer).getBigUint64(0,r);return e(o)}}(r||(t.uint256=r={})),t.default=r},526:(e,t)=>{"use strict";t.byteLength=function(e){var t=a(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,o=a(e),s=o[0],u=o[1],c=new i(function(e,t,r){return 3*(t+r)/4-r}(0,s,u)),f=0,h=u>0?s-4:s;for(r=0;r<h;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],c[f++]=t>>16&255,c[f++]=t>>8&255,c[f++]=255&t;return 2===u&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[f++]=255&t),1===u&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[f++]=t>>8&255,c[f++]=255&t),c},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],s=16383,a=0,c=n-i;a<c;a+=s)o.push(u(e,a,a+s>c?c:a+s));return 1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)r[s]=o[s],n[o.charCodeAt(s)]=s;function a(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function u(e,t,n){for(var i,o,s=[],a=t;a<n;a+=3)i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),s.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},672:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="20.0.0"}},t={},function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return e[n].call(o.exports,o,o.exports,r),o.exports}(156);var e,t}));
|
|
3
3
|
//# sourceMappingURL=Crypto.min.js.map
|