edge-currency-accountbased 2.0.0 → 2.2.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.
Files changed (63) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/android/src/main/assets/edge-currency-accountbased/{896.chunk.js → 124.chunk.js} +2 -2
  3. package/android/src/main/assets/edge-currency-accountbased/17.chunk.js +58 -0
  4. package/android/src/main/assets/edge-currency-accountbased/190.chunk.js +1 -0
  5. package/android/src/main/assets/edge-currency-accountbased/223.chunk.js +2 -2
  6. package/android/src/main/assets/edge-currency-accountbased/298.chunk.js +44 -0
  7. package/android/src/main/assets/edge-currency-accountbased/491.chunk.js +1 -1
  8. package/android/src/main/assets/edge-currency-accountbased/618.chunk.js +12 -12
  9. package/android/src/main/assets/edge-currency-accountbased/645.chunk.js +6 -6
  10. package/android/src/main/assets/edge-currency-accountbased/666.chunk.js +15 -15
  11. package/android/src/main/assets/edge-currency-accountbased/68.chunk.js +1 -0
  12. package/android/src/main/assets/edge-currency-accountbased/{139.chunk.js → 726.chunk.js} +10 -10
  13. package/android/src/main/assets/edge-currency-accountbased/786.chunk.js +2 -2
  14. package/android/src/main/assets/edge-currency-accountbased/935.chunk.js +1 -0
  15. package/android/src/main/assets/edge-currency-accountbased/945.chunk.js +12 -12
  16. package/android/src/main/assets/edge-currency-accountbased/978.chunk.js +2 -2
  17. package/android/src/main/assets/edge-currency-accountbased/bnb.chunk.js +1 -1
  18. package/android/src/main/assets/edge-currency-accountbased/edge-currency-accountbased.js +18 -2
  19. package/android/src/main/assets/edge-currency-accountbased/eos.chunk.js +5 -5
  20. package/android/src/main/assets/edge-currency-accountbased/ethereum.chunk.js +9 -9
  21. package/android/src/main/assets/edge-currency-accountbased/filecoin.chunk.js +1 -0
  22. package/android/src/main/assets/edge-currency-accountbased/fio.chunk.js +2 -2
  23. package/android/src/main/assets/edge-currency-accountbased/hedera.chunk.js +1 -1
  24. package/android/src/main/assets/edge-currency-accountbased/polkadot.chunk.js +2 -2
  25. package/android/src/main/assets/edge-currency-accountbased/ripple.chunk.js +3 -3
  26. package/android/src/main/assets/edge-currency-accountbased/solana.chunk.js +2 -2
  27. package/android/src/main/assets/edge-currency-accountbased/stellar.chunk.js +1 -1
  28. package/android/src/main/assets/edge-currency-accountbased/tezos.chunk.js +1 -1
  29. package/android/src/main/assets/edge-currency-accountbased/tron.chunk.js +1 -1
  30. package/android/src/main/assets/edge-currency-accountbased/zcash.chunk.js +2 -2
  31. package/lib/ethereum/EthereumEngine.js +2 -1
  32. package/lib/ethereum/EthereumNetwork.js +15 -22
  33. package/lib/ethereum/ethereumTypes.js +31 -0
  34. package/lib/ethereum/info/binancesmartchainInfo.js +8 -0
  35. package/lib/ethereum/info/ethereumInfo.js +27 -2
  36. package/lib/ethereum/info/fantomInfo.js +1 -1
  37. package/lib/ethereum/info/goerliInfo.js +2 -2
  38. package/lib/ethereum/info/kovanInfo.js +2 -2
  39. package/lib/ethereum/info/polygonInfo.js +1 -1
  40. package/lib/ethereum/info/rinkebyInfo.js +2 -2
  41. package/lib/ethereum/info/ropstenInfo.js +2 -2
  42. package/lib/filecoin/FilecoinEngine.js +383 -0
  43. package/lib/filecoin/FilecoinTools.js +184 -0
  44. package/lib/filecoin/Filscan.js +232 -0
  45. package/lib/filecoin/RpcExtra.js +93 -0
  46. package/lib/filecoin/filecoinInfo.js +85 -0
  47. package/lib/filecoin/filecoinTypes.js +89 -0
  48. package/lib/index.js +7 -1
  49. package/lib/polkadot/PolkadotEngine.js +104 -24
  50. package/lib/polkadot/PolkadotTools.js +11 -0
  51. package/lib/polkadot/info/liberlandInfo.js +63 -0
  52. package/lib/polkadot/info/liberlandTestnetInfo.js +66 -0
  53. package/lib/polkadot/{polkadotInfo.js → info/polkadotInfo.js} +2 -5
  54. package/lib/polkadot/polkadotTypes.js +8 -1
  55. package/lib/ripple/RippleEngine.js +1 -0
  56. package/package.json +2 -1
  57. package/android/src/main/assets/edge-currency-accountbased/153.chunk.js +0 -2
  58. package/android/src/main/assets/edge-currency-accountbased/266.chunk.js +0 -1
  59. package/android/src/main/assets/edge-currency-accountbased/284.chunk.js +0 -7
  60. package/android/src/main/assets/edge-currency-accountbased/291.chunk.js +0 -58
  61. package/android/src/main/assets/edge-currency-accountbased/341.chunk.js +0 -44
  62. package/android/src/main/assets/edge-currency-accountbased/428.chunk.js +0 -6
  63. package/android/src/main/assets/edge-currency-accountbased/821.chunk.js +0 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # edge-currency-accountbased
2
2
 
3
+ ## 2.2.0 (2023-08-29)
4
+
5
+ - added: Add new ETH tokens ARB, BUSD, and PAXG
6
+ - added: Add new BSC token BUSD
7
+ - added: Add new RPC server, Pocket Network
8
+ - changed: Parameterize apikey replacement in node urls and remove url-specific apikey logic in engines
9
+ - fixed: Skip Liberland transaction history query if subscan url isn't present
10
+ - fixed: Correctly report transaction history query status for new empty Filecoin wallets
11
+
12
+ ## 2.1.0 (2023-08-29)
13
+
14
+ - added: Add a Liberland plugin.
15
+ - added: Add a Filecoin plugin.
16
+ - fixed: Use the correct sign on Ripple transactions.
17
+
3
18
  ## 2.0.0 (2023-08-28)
4
19
 
5
20
  - changed: Replace deprecated display key and token methods with modern ones.
@@ -1,4 +1,4 @@
1
- (self.webpackChunkedge_currency_accountbased=self.webpackChunkedge_currency_accountbased||[]).push([[896],{51124:function(N,z,d){"use strict";d.d(z,{_B:function(){return k}});var a=d(15179),S=d(13550),j=d.n(S),E=function(r,t){return E=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])},E(r,t)};function Q(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");E(r,t);function e(){this.constructor=r}r.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}var D=function(){return D=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},D.apply(this,arguments)};function H(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(r);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(r,n[o])&&(e[n[o]]=r[n[o]]);return e}function l(r,t,e,n){var o=arguments.length,i=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,e):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,t,e,n);else for(var u=r.length-1;u>=0;u--)(s=r[u])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i}function J(r,t){return function(e,n){t(e,n,r)}}function L(r,t,e,n,o,i){function s(x){if(x!==void 0&&typeof x!="function")throw new TypeError("Function expected");return x}for(var u=n.kind,p=u==="getter"?"get":u==="setter"?"set":"value",c=!t&&r?n.static?r:r.prototype:null,f=t||(c?Object.getOwnPropertyDescriptor(c,n.name):{}),y,_=!1,m=e.length-1;m>=0;m--){var v={};for(var g in n)v[g]=g==="access"?{}:n[g];for(var g in n.access)v.access[g]=n.access[g];v.addInitializer=function(x){if(_)throw new TypeError("Cannot add initializers after decoration has completed");i.push(s(x||null))};var U=(0,e[m])(u==="accessor"?{get:f.get,set:f.set}:f[p],v);if(u==="accessor"){if(U===void 0)continue;if(U===null||typeof U!="object")throw new TypeError("Object expected");(y=s(U.get))&&(f.get=y),(y=s(U.set))&&(f.set=y),(y=s(U.init))&&o.push(y)}else(y=s(U))&&(u==="field"?o.push(y):f[p]=y)}c&&Object.defineProperty(c,n.name,f),_=!0}function W(r,t,e){for(var n=arguments.length>2,o=0;o<t.length;o++)e=n?t[o].call(r,e):t[o].call(r);return n?e:void 0}function Y(r){return typeof r=="symbol"?r:"".concat(r)}function Z(r,t,e){return typeof t=="symbol"&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(r,"name",{configurable:!0,value:e?"".concat(e," ",t):t})}function $(r,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(r,t)}function tt(r,t,e,n){function o(i){return i instanceof e?i:new e(function(s){s(i)})}return new(e||(e=Promise))(function(i,s){function u(f){try{c(n.next(f))}catch(y){s(y)}}function p(f){try{c(n.throw(f))}catch(y){s(y)}}function c(f){f.done?i(f.value):o(f.value).then(u,p)}c((n=n.apply(r,t||[])).next())})}function et(r,t){var e={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,s;return s={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function u(c){return function(f){return p([c,f])}}function p(c){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,c[0]&&(e=0)),e;)try{if(n=1,o&&(i=c[0]&2?o.return:c[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,c[1])).done)return i;switch(o=0,i&&(c=[c[0]&2,i.value]),c[0]){case 0:case 1:i=c;break;case 4:return e.label++,{value:c[1],done:!1};case 5:e.label++,o=c[1],c=[0];continue;case 7:c=e.ops.pop(),e.trys.pop();continue;default:if(i=e.trys,!(i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){e=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){e.label=c[1];break}if(c[0]===6&&e.label<i[1]){e.label=i[1],i=c;break}if(i&&e.label<i[2]){e.label=i[2],e.ops.push(c);break}i[2]&&e.ops.pop(),e.trys.pop();continue}c=t.call(r,e)}catch(f){c=[6,f],o=0}finally{n=i=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}var C=Object.create?function(r,t,e,n){n===void 0&&(n=e);var o=Object.getOwnPropertyDescriptor(t,e);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(r,n,o)}:function(r,t,e,n){n===void 0&&(n=e),r[n]=t[e]};function rt(r,t){for(var e in r)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&C(t,r,e)}function I(r){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&r[t],n=0;if(e)return e.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function G(r,t){var e=typeof Symbol=="function"&&r[Symbol.iterator];if(!e)return r;var n=e.call(r),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(u){s={error:u}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(s)throw s.error}}return i}function nt(){for(var r=[],t=0;t<arguments.length;t++)r=r.concat(G(arguments[t]));return r}function it(){for(var r=0,t=0,e=arguments.length;t<e;t++)r+=arguments[t].length;for(var n=Array(r),o=0,t=0;t<e;t++)for(var i=arguments[t],s=0,u=i.length;s<u;s++,o++)n[o]=i[s];return n}function ot(r,t,e){if(e||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return r.concat(i||Array.prototype.slice.call(t))}function M(r){return this instanceof M?(this.v=r,this):new M(r)}function at(r,t,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=e.apply(r,t||[]),o,i=[];return o={},s("next"),s("throw"),s("return"),o[Symbol.asyncIterator]=function(){return this},o;function s(_){n[_]&&(o[_]=function(m){return new Promise(function(v,g){i.push([_,m,v,g])>1||u(_,m)})})}function u(_,m){try{p(n[_](m))}catch(v){y(i[0][3],v)}}function p(_){_.value instanceof M?Promise.resolve(_.value.v).then(c,f):y(i[0][2],_)}function c(_){u("next",_)}function f(_){u("throw",_)}function y(_,m){_(m),i.shift(),i.length&&u(i[0][0],i[0][1])}}function st(r){var t,e;return t={},n("next"),n("throw",function(o){throw o}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(o,i){t[o]=r[o]?function(s){return(e=!e)?{value:M(r[o](s)),done:!1}:i?i(s):s}:i}}function ct(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=r[Symbol.asyncIterator],e;return t?t.call(r):(r=typeof I=="function"?I(r):r[Symbol.iterator](),e={},n("next"),n("throw"),n("return"),e[Symbol.asyncIterator]=function(){return this},e);function n(i){e[i]=r[i]&&function(s){return new Promise(function(u,p){s=r[i](s),o(u,p,s.done,s.value)})}}function o(i,s,u,p){Promise.resolve(p).then(function(c){i({value:c,done:u})},s)}}function ut(r,t){return Object.defineProperty?Object.defineProperty(r,"raw",{value:t}):r.raw=t,r}var X=Object.create?function(r,t){Object.defineProperty(r,"default",{enumerable:!0,value:t})}:function(r,t){r.default=t};function lt(r){if(r&&r.__esModule)return r;var t={};if(r!=null)for(var e in r)e!=="default"&&Object.prototype.hasOwnProperty.call(r,e)&&C(t,r,e);return X(t,r),t}function pt(r){return r&&r.__esModule?r:{default:r}}function ft(r,t,e,n){if(e==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?r!==t||!n:!t.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e==="m"?n:e==="a"?n.call(r):n?n.value:t.get(r)}function _t(r,t,e,n,o){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?r!==t||!o:!t.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?o.call(r,e):o?o.value=e:t.set(r,e),e}function ht(r,t){if(t===null||typeof t!="object"&&typeof t!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof r=="function"?t===r:r.has(t)}/**
1
+ "use strict";(self.webpackChunkedge_currency_accountbased=self.webpackChunkedge_currency_accountbased||[]).push([[124],{51124:function(K,I,x){x.d(I,{_B:function(){return B}});var s=x(15179),k=x(13550),O=x.n(k),M=function(r,t){return M=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])},M(r,t)};function Q(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");M(r,t);function e(){this.constructor=r}r.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}var R=function(){return R=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},R.apply(this,arguments)};function H(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(r);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(r,n[o])&&(e[n[o]]=r[n[o]]);return e}function l(r,t,e,n){var o=arguments.length,i=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,e):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,t,e,n);else for(var u=r.length-1;u>=0;u--)(a=r[u])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i}function J(r,t){return function(e,n){t(e,n,r)}}function L(r,t,e,n,o,i){function a(j){if(j!==void 0&&typeof j!="function")throw new TypeError("Function expected");return j}for(var u=n.kind,p=u==="getter"?"get":u==="setter"?"set":"value",c=!t&&r?n.static?r:r.prototype:null,f=t||(c?Object.getOwnPropertyDescriptor(c,n.name):{}),d,_=!1,m=e.length-1;m>=0;m--){var w={};for(var v in n)w[v]=v==="access"?{}:n[v];for(var v in n.access)w.access[v]=n.access[v];w.addInitializer=function(j){if(_)throw new TypeError("Cannot add initializers after decoration has completed");i.push(a(j||null))};var A=(0,e[m])(u==="accessor"?{get:f.get,set:f.set}:f[p],w);if(u==="accessor"){if(A===void 0)continue;if(A===null||typeof A!="object")throw new TypeError("Object expected");(d=a(A.get))&&(f.get=d),(d=a(A.set))&&(f.set=d),(d=a(A.init))&&o.push(d)}else(d=a(A))&&(u==="field"?o.push(d):f[p]=d)}c&&Object.defineProperty(c,n.name,f),_=!0}function W(r,t,e){for(var n=arguments.length>2,o=0;o<t.length;o++)e=n?t[o].call(r,e):t[o].call(r);return n?e:void 0}function Y(r){return typeof r=="symbol"?r:"".concat(r)}function Z(r,t,e){return typeof t=="symbol"&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(r,"name",{configurable:!0,value:e?"".concat(e," ",t):t})}function $(r,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(r,t)}function tt(r,t,e,n){function o(i){return i instanceof e?i:new e(function(a){a(i)})}return new(e||(e=Promise))(function(i,a){function u(f){try{c(n.next(f))}catch(d){a(d)}}function p(f){try{c(n.throw(f))}catch(d){a(d)}}function c(f){f.done?i(f.value):o(f.value).then(u,p)}c((n=n.apply(r,t||[])).next())})}function et(r,t){var e={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(c){return function(f){return p([c,f])}}function p(c){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(e=0)),e;)try{if(n=1,o&&(i=c[0]&2?o.return:c[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,c[1])).done)return i;switch(o=0,i&&(c=[c[0]&2,i.value]),c[0]){case 0:case 1:i=c;break;case 4:return e.label++,{value:c[1],done:!1};case 5:e.label++,o=c[1],c=[0];continue;case 7:c=e.ops.pop(),e.trys.pop();continue;default:if(i=e.trys,!(i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){e=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){e.label=c[1];break}if(c[0]===6&&e.label<i[1]){e.label=i[1],i=c;break}if(i&&e.label<i[2]){e.label=i[2],e.ops.push(c);break}i[2]&&e.ops.pop(),e.trys.pop();continue}c=t.call(r,e)}catch(f){c=[6,f],o=0}finally{n=i=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}var T=Object.create?function(r,t,e,n){n===void 0&&(n=e);var o=Object.getOwnPropertyDescriptor(t,e);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(r,n,o)}:function(r,t,e,n){n===void 0&&(n=e),r[n]=t[e]};function rt(r,t){for(var e in r)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&T(t,r,e)}function C(r){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&r[t],n=0;if(e)return e.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function F(r,t){var e=typeof Symbol=="function"&&r[Symbol.iterator];if(!e)return r;var n=e.call(r),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(u){a={error:u}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(a)throw a.error}}return i}function nt(){for(var r=[],t=0;t<arguments.length;t++)r=r.concat(F(arguments[t]));return r}function it(){for(var r=0,t=0,e=arguments.length;t<e;t++)r+=arguments[t].length;for(var n=Array(r),o=0,t=0;t<e;t++)for(var i=arguments[t],a=0,u=i.length;a<u;a++,o++)n[o]=i[a];return n}function ot(r,t,e){if(e||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return r.concat(i||Array.prototype.slice.call(t))}function S(r){return this instanceof S?(this.v=r,this):new S(r)}function at(r,t,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=e.apply(r,t||[]),o,i=[];return o={},a("next"),a("throw"),a("return"),o[Symbol.asyncIterator]=function(){return this},o;function a(_){n[_]&&(o[_]=function(m){return new Promise(function(w,v){i.push([_,m,w,v])>1||u(_,m)})})}function u(_,m){try{p(n[_](m))}catch(w){d(i[0][3],w)}}function p(_){_.value instanceof S?Promise.resolve(_.value.v).then(c,f):d(i[0][2],_)}function c(_){u("next",_)}function f(_){u("throw",_)}function d(_,m){_(m),i.shift(),i.length&&u(i[0][0],i[0][1])}}function st(r){var t,e;return t={},n("next"),n("throw",function(o){throw o}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(o,i){t[o]=r[o]?function(a){return(e=!e)?{value:S(r[o](a)),done:!1}:i?i(a):a}:i}}function ct(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=r[Symbol.asyncIterator],e;return t?t.call(r):(r=typeof C=="function"?C(r):r[Symbol.iterator](),e={},n("next"),n("throw"),n("return"),e[Symbol.asyncIterator]=function(){return this},e);function n(i){e[i]=r[i]&&function(a){return new Promise(function(u,p){a=r[i](a),o(u,p,a.done,a.value)})}}function o(i,a,u,p){Promise.resolve(p).then(function(c){i({value:c,done:u})},a)}}function ut(r,t){return Object.defineProperty?Object.defineProperty(r,"raw",{value:t}):r.raw=t,r}var G=Object.create?function(r,t){Object.defineProperty(r,"default",{enumerable:!0,value:t})}:function(r,t){r.default=t};function lt(r){if(r&&r.__esModule)return r;var t={};if(r!=null)for(var e in r)e!=="default"&&Object.prototype.hasOwnProperty.call(r,e)&&T(t,r,e);return G(t,r),t}function pt(r){return r&&r.__esModule?r:{default:r}}function ft(r,t,e,n){if(e==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?r!==t||!n:!t.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e==="m"?n:e==="a"?n.call(r):n?n.value:t.get(r)}function _t(r,t,e,n,o){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?r!==t||!o:!t.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?o.call(r,e):o?o.value=e:t.set(r,e),e}function ht(r,t){if(t===null||typeof t!="object"&&typeof t!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof r=="function"?t===r:r.has(t)}/**
2
2
  * @greymass/eosio-resources v0.7.0
3
3
  * https://github.com/greymass/eosio-resources
4
4
  *
@@ -32,4 +32,4 @@
32
32
  *
33
33
  * YOU ACKNOWLEDGE THAT THIS SOFTWARE IS NOT DESIGNED, LICENSED OR INTENDED FOR USE
34
34
  * IN THE DESIGN, CONSTRUCTION, OPERATION OR MAINTENANCE OF ANY MILITARY FACILITY.
35
- */class h extends a.AU{constructor(){super(...arguments),this.default_block_cpu_limit=a.zM.from(2e5),this.default_block_net_limit=a.zM.from(1048576e3)}get allocated(){return 1-Number(this.weight_ratio)/Number(this.target_weight_ratio)/100}get reserved(){return Number(this.utilization)/Number(this.weight)}get symbol(){return this.min_price.symbol}cast(){return{adjusted_utilization:Number(this.adjusted_utilization),decay_secs:Number(this.decay_secs.value),exponent:Number(this.exponent),utilization:Number(this.utilization),utilization_timestamp:Number(this.utilization_timestamp.value),weight:Number(this.weight),weight_ratio:Number(this.weight_ratio)}}utilization_increase(t,e){const{weight:n}=this,o=a.pB.from(e),i=new(j())(n.value.mul(new(j())(o.value)))/Math.pow(10,15);return Math.ceil(i)}price_function(t){const{exponent:e,weight:n}=this.cast(),o=this.max_price.value,i=this.min_price.value;let s=i;const u=e-1;return u<=0?o:(s+=(o-i)*Math.pow(t/n,u),s)}price_integral_delta(t,e){const{exponent:n,weight:o}=this.cast(),i=this.max_price.value,s=this.min_price.value,u=(i-s)/n,p=t/o,c=e/o;return s*c-s*p+u*Math.pow(c,n)-u*Math.pow(p,n)}fee(t,e){const{utilization:n,weight:o}=this.cast();let i=n;const s=i+t;let u=0;return i<e&&(u+=this.price_function(e)*Math.min(t,e-i)/o,i=e),i<s&&(u+=this.price_integral_delta(i,s)),u}determine_adjusted_utilization(t){const{decay_secs:e,utilization:n,utilization_timestamp:o}=this.cast();let{adjusted_utilization:i}=this.cast();if(n<i){const s=t&&t.timestamp?t.timestamp:new Date,u=a.AQ.from(s).toMilliseconds()/1e3,p=i-n;let c=p*Math.exp(-(u-o)/e);c=Math.min(Math.max(c,0),p),i=n+c}return i}}l([a.AU.field("uint8")],h.prototype,"version",void 0),l([a.AU.field("int64")],h.prototype,"weight",void 0),l([a.AU.field("int64")],h.prototype,"weight_ratio",void 0),l([a.AU.field("int64")],h.prototype,"assumed_stake_weight",void 0),l([a.AU.field("int64")],h.prototype,"initial_weight_ratio",void 0),l([a.AU.field("int64")],h.prototype,"target_weight_ratio",void 0),l([a.AU.field("time_point_sec")],h.prototype,"initial_timestamp",void 0),l([a.AU.field("time_point_sec")],h.prototype,"target_timestamp",void 0),l([a.AU.field("float64")],h.prototype,"exponent",void 0),l([a.AU.field("uint32")],h.prototype,"decay_secs",void 0),l([a.AU.field("asset")],h.prototype,"min_price",void 0),l([a.AU.field("asset")],h.prototype,"max_price",void 0),l([a.AU.field("int64")],h.prototype,"utilization",void 0),l([a.AU.field("int64")],h.prototype,"adjusted_utilization",void 0),l([a.AU.field("time_point_sec")],h.prototype,"utilization_timestamp",void 0);let R=class extends h{constructor(){super(...arguments),this.per_day=t=>this.us_per_day(t),this.frac=(t,e)=>this.frac_by_us(t,e),this.frac_by_ms=(t,e)=>this.frac_by_us(t,e*1e3),this.price_per=(t,e=1e3,n)=>this.price_per_us(t,e,n),this.price_per_ms=(t,e=1,n)=>this.price_per_us(t,e*1e3,n)}ms_per_day(t){return this.us_per_day(t)/1e3}us_per_day(t){const e=t&&t.virtual_block_cpu_limit?t.virtual_block_cpu_limit:this.default_block_cpu_limit;return Number(e)*2*60*60*24}weight_to_us(t,e){return Math.ceil(e*Number(t)/A)}us_to_weight(t,e){return Math.floor(e/Number(t)*A)}frac_by_us(t,e){const{weight:n}=this.cast(),o=this.us_to_weight(t.cpu,e)/n;return Math.floor(o*Math.pow(10,15))}price_per_us(t,e=1e3,n){const o=a.pB.from(this.frac(t,e)),i=this.utilization_increase(t.cpu,o),s=this.determine_adjusted_utilization(n),u=this.fee(i,s),p=Math.pow(10,4);return Math.ceil(u*p)/p}};R=l([a.AU.type("powerupstateresourcecpu")],R);let T=class extends h{constructor(){super(...arguments),this.per_day=t=>this.bytes_per_day(t),this.frac=(t,e)=>this.frac_by_bytes(t,e),this.frac_by_kb=(t,e)=>this.frac_by_bytes(t,e*1e3),this.price_per=(t,e=1e3,n)=>this.price_per_byte(t,e,n),this.price_per_kb=(t,e=1,n)=>this.price_per_byte(t,e*1e3,n)}kb_per_day(t){return this.bytes_per_day(t)/1e3}bytes_per_day(t){const e=t&&t.virtual_block_net_limit?t.virtual_block_net_limit:this.default_block_net_limit;return Number(e)*2*60*60*24}weight_to_bytes(t,e){return Math.ceil(e*Number(t)/A)}bytes_to_weight(t,e){return Math.floor(e/Number(t)*A)}frac_by_bytes(t,e){const{weight:n}=this.cast(),o=this.bytes_to_weight(t.net,e)/n;return Math.floor(o*Math.pow(10,15))}price_per_byte(t,e=1e3,n){const o=a.pB.from(this.frac(t,e)),i=this.utilization_increase(t.net,o),s=this.determine_adjusted_utilization(n),u=this.fee(i,s),p=Math.pow(10,4);return Math.ceil(u*p)/p}};T=l([a.AU.type("powerupstateresourcenet")],T);let w=class extends a.AU{};l([a.AU.field("uint8")],w.prototype,"version",void 0),l([a.AU.field(T)],w.prototype,"net",void 0),l([a.AU.field(R)],w.prototype,"cpu",void 0),l([a.AU.field("uint32")],w.prototype,"powerup_days",void 0),l([a.AU.field("asset")],w.prototype,"min_powerup_fee",void 0),w=l([a.AU.type("powerupstate")],w);class V{constructor(t){this.parent=t}async get_state(){return(await this.parent.api.v1.chain.get_table_rows({code:"eosio",scope:"",table:"powup.state",type:w})).rows[0]}}let O=class extends a.AU{};l([a.AU.field("asset")],O.prototype,"balance",void 0),l([a.AU.field("float64")],O.prototype,"weight",void 0),O=l([a.AU.type("connector")],O);let P=class extends a.AU{};l([a.AU.field("asset")],P.prototype,"supply",void 0),l([a.AU.field(O)],P.prototype,"base",void 0),l([a.AU.field(O)],P.prototype,"quote",void 0),P=l([a.AU.type("exchange_state")],P);let B=class extends P{price_per(t){const e=this.base.balance.units.toNumber(),n=this.quote.balance.value;return this.get_input(e,n,t)}price_per_kb(t){return this.price_per(t*1e3)}get_input(t,e,n){const o=e*n/(t-n);return o<0?0:o}};B=l([a.AU.type("ramstate")],B);class q{constructor(t){this.parent=t}async get_state(){return(await this.parent.api.v1.chain.get_table_rows({code:"eosio",scope:"eosio",table:"rammarket",type:B})).rows[0]}}let b=class extends a.AU{get reserved(){return Number(this.total_lent.units)/Number(this.total_lendable.units)}get symbol(){return this.total_lent.symbol}get precision(){return this.total_lent.symbol.precision}get value(){const t=10**this.total_unlent.symbol.precision;return Number(this.total_lent.units.adding(this.total_unlent.units).dividing(this.total_rex.units.dividing(t)))/t}price_per(t,e=1e3){const n=a.xR.fromUnits(1e4,this.symbol),i=Number(n.units)/(this.total_rent.value/this.total_unlent.value)*(Number(t.cpu)/A);return Number(n.units)/i*e/Math.pow(10,this.precision)}};l([a.AU.field("uint8")],b.prototype,"version",void 0),l([a.AU.field("asset")],b.prototype,"total_lent",void 0),l([a.AU.field("asset")],b.prototype,"total_unlent",void 0),l([a.AU.field("asset")],b.prototype,"total_rent",void 0),l([a.AU.field("asset")],b.prototype,"total_lendable",void 0),l([a.AU.field("asset")],b.prototype,"total_rex",void 0),l([a.AU.field("asset")],b.prototype,"namebid_proceeds",void 0),l([a.AU.field("uint64")],b.prototype,"loan_num",void 0),b=l([a.AU.type("rexstate")],b);class K{constructor(t){this.parent=t}async get_state(){return(await this.parent.api.v1.chain.get_table_rows({code:"eosio",scope:"eosio",table:"rexpool",type:b})).rows[0]}}const A=new(j())(1e3*1e3);class k{constructor(t){if(this.sampleAccount="b1",this.symbol="4,EOS",this.v1={powerup:new V(this),ram:new q(this),rex:new K(this)},t.sampleAccount&&(this.sampleAccount=t.sampleAccount),t.symbol&&(this.symbol=t.symbol),t.api)this.api=t.api;else if(t.url)this.api=new a.lP({provider:new a.c6(t.url,t)});else throw new Error("Missing url or api client")}async getSampledUsage(){const t=await this.api.v1.chain.get_account(this.sampleAccount),e=a.pB.from(t.cpu_limit.max.value.mul(A)),n=a.pB.from(t.net_limit.max.value.mul(A)),o=a.pB.from(t.cpu_weight.value),i=a.pB.from(t.net_weight.value);return{account:t,cpu:F(e.value,o.value),net:F(n.value,i.value)}}}k.__className="Resources";function F(r,t){let e=r.div(t);const n=new(j())(0),o=new(j())(1);return r.mod(t).gt(n)&&(e=e.sub(o)),a.pB.from(e)}},35717:function(N){typeof Object.create=="function"?N.exports=function(d,a){a&&(d.super_=a,d.prototype=Object.create(a.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}))}:N.exports=function(d,a){if(a){d.super_=a;var S=function(){};S.prototype=a.prototype,d.prototype=new S,d.prototype.constructor=d}}}}]);
35
+ */class h extends s.AU{constructor(){super(...arguments),this.default_block_cpu_limit=s.zM.from(2e5),this.default_block_net_limit=s.zM.from(1048576e3)}get allocated(){return 1-Number(this.weight_ratio)/Number(this.target_weight_ratio)/100}get reserved(){return Number(this.utilization)/Number(this.weight)}get symbol(){return this.min_price.symbol}cast(){return{adjusted_utilization:Number(this.adjusted_utilization),decay_secs:Number(this.decay_secs.value),exponent:Number(this.exponent),utilization:Number(this.utilization),utilization_timestamp:Number(this.utilization_timestamp.value),weight:Number(this.weight),weight_ratio:Number(this.weight_ratio)}}utilization_increase(t,e){const{weight:n}=this,o=s.pB.from(e),i=new(O())(n.value.mul(new(O())(o.value)))/Math.pow(10,15);return Math.ceil(i)}price_function(t){const{exponent:e,weight:n}=this.cast(),o=this.max_price.value,i=this.min_price.value;let a=i;const u=e-1;return u<=0?o:(a+=(o-i)*Math.pow(t/n,u),a)}price_integral_delta(t,e){const{exponent:n,weight:o}=this.cast(),i=this.max_price.value,a=this.min_price.value,u=(i-a)/n,p=t/o,c=e/o;return a*c-a*p+u*Math.pow(c,n)-u*Math.pow(p,n)}fee(t,e){const{utilization:n,weight:o}=this.cast();let i=n;const a=i+t;let u=0;return i<e&&(u+=this.price_function(e)*Math.min(t,e-i)/o,i=e),i<a&&(u+=this.price_integral_delta(i,a)),u}determine_adjusted_utilization(t){const{decay_secs:e,utilization:n,utilization_timestamp:o}=this.cast();let{adjusted_utilization:i}=this.cast();if(n<i){const a=t&&t.timestamp?t.timestamp:new Date,u=s.AQ.from(a).toMilliseconds()/1e3,p=i-n;let c=p*Math.exp(-(u-o)/e);c=Math.min(Math.max(c,0),p),i=n+c}return i}}l([s.AU.field("uint8")],h.prototype,"version",void 0),l([s.AU.field("int64")],h.prototype,"weight",void 0),l([s.AU.field("int64")],h.prototype,"weight_ratio",void 0),l([s.AU.field("int64")],h.prototype,"assumed_stake_weight",void 0),l([s.AU.field("int64")],h.prototype,"initial_weight_ratio",void 0),l([s.AU.field("int64")],h.prototype,"target_weight_ratio",void 0),l([s.AU.field("time_point_sec")],h.prototype,"initial_timestamp",void 0),l([s.AU.field("time_point_sec")],h.prototype,"target_timestamp",void 0),l([s.AU.field("float64")],h.prototype,"exponent",void 0),l([s.AU.field("uint32")],h.prototype,"decay_secs",void 0),l([s.AU.field("asset")],h.prototype,"min_price",void 0),l([s.AU.field("asset")],h.prototype,"max_price",void 0),l([s.AU.field("int64")],h.prototype,"utilization",void 0),l([s.AU.field("int64")],h.prototype,"adjusted_utilization",void 0),l([s.AU.field("time_point_sec")],h.prototype,"utilization_timestamp",void 0);let N=class extends h{constructor(){super(...arguments),this.per_day=t=>this.us_per_day(t),this.frac=(t,e)=>this.frac_by_us(t,e),this.frac_by_ms=(t,e)=>this.frac_by_us(t,e*1e3),this.price_per=(t,e=1e3,n)=>this.price_per_us(t,e,n),this.price_per_ms=(t,e=1,n)=>this.price_per_us(t,e*1e3,n)}ms_per_day(t){return this.us_per_day(t)/1e3}us_per_day(t){const e=t&&t.virtual_block_cpu_limit?t.virtual_block_cpu_limit:this.default_block_cpu_limit;return Number(e)*2*60*60*24}weight_to_us(t,e){return Math.ceil(e*Number(t)/g)}us_to_weight(t,e){return Math.floor(e/Number(t)*g)}frac_by_us(t,e){const{weight:n}=this.cast(),o=this.us_to_weight(t.cpu,e)/n;return Math.floor(o*Math.pow(10,15))}price_per_us(t,e=1e3,n){const o=s.pB.from(this.frac(t,e)),i=this.utilization_increase(t.cpu,o),a=this.determine_adjusted_utilization(n),u=this.fee(i,a),p=Math.pow(10,4);return Math.ceil(u*p)/p}};N=l([s.AU.type("powerupstateresourcecpu")],N);let z=class extends h{constructor(){super(...arguments),this.per_day=t=>this.bytes_per_day(t),this.frac=(t,e)=>this.frac_by_bytes(t,e),this.frac_by_kb=(t,e)=>this.frac_by_bytes(t,e*1e3),this.price_per=(t,e=1e3,n)=>this.price_per_byte(t,e,n),this.price_per_kb=(t,e=1,n)=>this.price_per_byte(t,e*1e3,n)}kb_per_day(t){return this.bytes_per_day(t)/1e3}bytes_per_day(t){const e=t&&t.virtual_block_net_limit?t.virtual_block_net_limit:this.default_block_net_limit;return Number(e)*2*60*60*24}weight_to_bytes(t,e){return Math.ceil(e*Number(t)/g)}bytes_to_weight(t,e){return Math.floor(e/Number(t)*g)}frac_by_bytes(t,e){const{weight:n}=this.cast(),o=this.bytes_to_weight(t.net,e)/n;return Math.floor(o*Math.pow(10,15))}price_per_byte(t,e=1e3,n){const o=s.pB.from(this.frac(t,e)),i=this.utilization_increase(t.net,o),a=this.determine_adjusted_utilization(n),u=this.fee(i,a),p=Math.pow(10,4);return Math.ceil(u*p)/p}};z=l([s.AU.type("powerupstateresourcenet")],z);let b=class extends s.AU{};l([s.AU.field("uint8")],b.prototype,"version",void 0),l([s.AU.field(z)],b.prototype,"net",void 0),l([s.AU.field(N)],b.prototype,"cpu",void 0),l([s.AU.field("uint32")],b.prototype,"powerup_days",void 0),l([s.AU.field("asset")],b.prototype,"min_powerup_fee",void 0),b=l([s.AU.type("powerupstate")],b);class X{constructor(t){this.parent=t}async get_state(){return(await this.parent.api.v1.chain.get_table_rows({code:"eosio",scope:"",table:"powup.state",type:b})).rows[0]}}let U=class extends s.AU{};l([s.AU.field("asset")],U.prototype,"balance",void 0),l([s.AU.field("float64")],U.prototype,"weight",void 0),U=l([s.AU.type("connector")],U);let P=class extends s.AU{};l([s.AU.field("asset")],P.prototype,"supply",void 0),l([s.AU.field(U)],P.prototype,"base",void 0),l([s.AU.field(U)],P.prototype,"quote",void 0),P=l([s.AU.type("exchange_state")],P);let E=class extends P{price_per(t){const e=this.base.balance.units.toNumber(),n=this.quote.balance.value;return this.get_input(e,n,t)}price_per_kb(t){return this.price_per(t*1e3)}get_input(t,e,n){const o=e*n/(t-n);return o<0?0:o}};E=l([s.AU.type("ramstate")],E);class V{constructor(t){this.parent=t}async get_state(){return(await this.parent.api.v1.chain.get_table_rows({code:"eosio",scope:"eosio",table:"rammarket",type:E})).rows[0]}}let y=class extends s.AU{get reserved(){return Number(this.total_lent.units)/Number(this.total_lendable.units)}get symbol(){return this.total_lent.symbol}get precision(){return this.total_lent.symbol.precision}get value(){const t=10**this.total_unlent.symbol.precision;return Number(this.total_lent.units.adding(this.total_unlent.units).dividing(this.total_rex.units.dividing(t)))/t}price_per(t,e=1e3){const n=s.xR.fromUnits(1e4,this.symbol),i=Number(n.units)/(this.total_rent.value/this.total_unlent.value)*(Number(t.cpu)/g);return Number(n.units)/i*e/Math.pow(10,this.precision)}};l([s.AU.field("uint8")],y.prototype,"version",void 0),l([s.AU.field("asset")],y.prototype,"total_lent",void 0),l([s.AU.field("asset")],y.prototype,"total_unlent",void 0),l([s.AU.field("asset")],y.prototype,"total_rent",void 0),l([s.AU.field("asset")],y.prototype,"total_lendable",void 0),l([s.AU.field("asset")],y.prototype,"total_rex",void 0),l([s.AU.field("asset")],y.prototype,"namebid_proceeds",void 0),l([s.AU.field("uint64")],y.prototype,"loan_num",void 0),y=l([s.AU.type("rexstate")],y);class q{constructor(t){this.parent=t}async get_state(){return(await this.parent.api.v1.chain.get_table_rows({code:"eosio",scope:"eosio",table:"rexpool",type:y})).rows[0]}}const g=new(O())(1e3*1e3);class B{constructor(t){if(this.sampleAccount="b1",this.symbol="4,EOS",this.v1={powerup:new X(this),ram:new V(this),rex:new q(this)},t.sampleAccount&&(this.sampleAccount=t.sampleAccount),t.symbol&&(this.symbol=t.symbol),t.api)this.api=t.api;else if(t.url)this.api=new s.lP({provider:new s.c6(t.url,t)});else throw new Error("Missing url or api client")}async getSampledUsage(){const t=await this.api.v1.chain.get_account(this.sampleAccount),e=s.pB.from(t.cpu_limit.max.value.mul(g)),n=s.pB.from(t.net_limit.max.value.mul(g)),o=s.pB.from(t.cpu_weight.value),i=s.pB.from(t.net_weight.value);return{account:t,cpu:D(e.value,o.value),net:D(n.value,i.value)}}}B.__className="Resources";function D(r,t){let e=r.div(t);const n=new(O())(0),o=new(O())(1);return r.mod(t).gt(n)&&(e=e.sub(o)),s.pB.from(e)}}}]);
@@ -0,0 +1,58 @@
1
+ "use strict";(self.webpackChunkedge_currency_accountbased=self.webpackChunkedge_currency_accountbased||[]).push([[17],{69282:function(x,k,p){var y=p(34155);function O(o){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?O=function(r){return typeof r}:O=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},O(o)}function T(o,e){if(!(o instanceof e))throw new TypeError("Cannot call a class as a function")}var P=p(62136),v=P.codes,J=v.ERR_AMBIGUOUS_ARGUMENT,q=v.ERR_INVALID_ARG_TYPE,H=v.ERR_INVALID_ARG_VALUE,W=v.ERR_INVALID_RETURN_VALUE,B=v.ERR_MISSING_ARGS,F=p(25961),Q=p(89539),V=Q.inspect,w=p(89539).types,C=w.isPromise,i=w.isRegExp,f=Object.assign?Object.assign:p(8091).assign,h=Object.is?Object.is:p(20609),A=new Map,M,Z,rt,K,ft;function _(){var o=p(19158);M=o.isDeepEqual,Z=o.isDeepStrictEqual}var X=/[\x00-\x08\x0b\x0c\x0e-\x1f]/g,st=null,vt=function(e){return st[e.charCodeAt(0)]},ht=!1,D=x.exports=l,gt={};function it(o){throw o.message instanceof Error?o.message:new F(o)}function u(o,e,r,c,E){var m=arguments.length,L;if(m===0)L="Failed";else if(m===1)r=o,o=void 0;else{if(ht===!1){ht=!0;var lt=y.emitWarning?y.emitWarning:console.warn.bind(console);lt("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094")}m===2&&(c="!=")}if(r instanceof Error)throw r;var at={actual:o,expected:e,operator:c===void 0?"fail":c,stackStartFn:E||u};r!==void 0&&(at.message=r);var ot=new F(at);throw L&&(ot.message=L,ot.generatedMessage=!0),ot}D.fail=u,D.AssertionError=F;function a(o,e,r,c){if(!r){var E=!1;if(e===0)E=!0,c="No value argument passed to `assert.ok()`";else if(c instanceof Error)throw c;var m=new F({actual:r,expected:!0,message:c,operator:"==",stackStartFn:o});throw m.generatedMessage=E,m}}function l(){for(var o=arguments.length,e=new Array(o),r=0;r<o;r++)e[r]=arguments[r];a.apply(void 0,[l,e.length].concat(e))}D.ok=l,D.equal=function o(e,r,c){if(arguments.length<2)throw new B("actual","expected");e!=r&&it({actual:e,expected:r,message:c,operator:"==",stackStartFn:o})},D.notEqual=function o(e,r,c){if(arguments.length<2)throw new B("actual","expected");e==r&&it({actual:e,expected:r,message:c,operator:"!=",stackStartFn:o})},D.deepEqual=function o(e,r,c){if(arguments.length<2)throw new B("actual","expected");M===void 0&&_(),M(e,r)||it({actual:e,expected:r,message:c,operator:"deepEqual",stackStartFn:o})},D.notDeepEqual=function o(e,r,c){if(arguments.length<2)throw new B("actual","expected");M===void 0&&_(),M(e,r)&&it({actual:e,expected:r,message:c,operator:"notDeepEqual",stackStartFn:o})},D.deepStrictEqual=function o(e,r,c){if(arguments.length<2)throw new B("actual","expected");M===void 0&&_(),Z(e,r)||it({actual:e,expected:r,message:c,operator:"deepStrictEqual",stackStartFn:o})},D.notDeepStrictEqual=g;function g(o,e,r){if(arguments.length<2)throw new B("actual","expected");M===void 0&&_(),Z(o,e)&&it({actual:o,expected:e,message:r,operator:"notDeepStrictEqual",stackStartFn:g})}D.strictEqual=function o(e,r,c){if(arguments.length<2)throw new B("actual","expected");h(e,r)||it({actual:e,expected:r,message:c,operator:"strictEqual",stackStartFn:o})},D.notStrictEqual=function o(e,r,c){if(arguments.length<2)throw new B("actual","expected");h(e,r)&&it({actual:e,expected:r,message:c,operator:"notStrictEqual",stackStartFn:o})};var N=function o(e,r,c){var E=this;T(this,o),r.forEach(function(m){m in e&&(c!==void 0&&typeof c[m]=="string"&&i(e[m])&&e[m].test(c[m])?E[m]=c[m]:E[m]=e[m])})};function U(o,e,r,c,E,m){if(!(r in o)||!Z(o[r],e[r])){if(!c){var L=new N(o,E),lt=new N(e,E,o),at=new F({actual:L,expected:lt,operator:"deepStrictEqual",stackStartFn:m});throw at.actual=o,at.expected=e,at.operator=m.name,at}it({actual:o,expected:e,message:c,operator:m.name,stackStartFn:m})}}function et(o,e,r,c){if(typeof e!="function"){if(i(e))return e.test(o);if(arguments.length===2)throw new q("expected",["Function","RegExp"],e);if(O(o)!=="object"||o===null){var E=new F({actual:o,expected:e,message:r,operator:"deepStrictEqual",stackStartFn:c});throw E.operator=c.name,E}var m=Object.keys(e);if(e instanceof Error)m.push("name","message");else if(m.length===0)throw new H("error",e,"may not be an empty object");return M===void 0&&_(),m.forEach(function(L){typeof o[L]=="string"&&i(e[L])&&e[L].test(o[L])||U(o,e,L,r,m,c)}),!0}return e.prototype!==void 0&&o instanceof e?!0:Error.isPrototypeOf(e)?!1:e.call({},o)===!0}function z(o){if(typeof o!="function")throw new q("fn","Function",o);try{o()}catch(e){return e}return gt}function tt(o){return C(o)||o!==null&&O(o)==="object"&&typeof o.then=="function"&&typeof o.catch=="function"}function G(o){return Promise.resolve().then(function(){var e;if(typeof o=="function"){if(e=o(),!tt(e))throw new W("instance of Promise","promiseFn",e)}else if(tt(o))e=o;else throw new q("promiseFn",["Function","Promise"],o);return Promise.resolve().then(function(){return e}).then(function(){return gt}).catch(function(r){return r})})}function Y(o,e,r,c){if(typeof r=="string"){if(arguments.length===4)throw new q("error",["Object","Error","Function","RegExp"],r);if(O(e)==="object"&&e!==null){if(e.message===r)throw new J("error/message",'The error message "'.concat(e.message,'" is identical to the message.'))}else if(e===r)throw new J("error/message",'The error "'.concat(e,'" is identical to the message.'));c=r,r=void 0}else if(r!=null&&O(r)!=="object"&&typeof r!="function")throw new q("error",["Object","Error","Function","RegExp"],r);if(e===gt){var E="";r&&r.name&&(E+=" (".concat(r.name,")")),E+=c?": ".concat(c):".";var m=o.name==="rejects"?"rejection":"exception";it({actual:void 0,expected:r,operator:o.name,message:"Missing expected ".concat(m).concat(E),stackStartFn:o})}if(r&&!et(e,r,c,o))throw e}function S(o,e,r,c){if(e!==gt){if(typeof r=="string"&&(c=r,r=void 0),!r||et(e,r)){var E=c?": ".concat(c):".",m=o.name==="doesNotReject"?"rejection":"exception";it({actual:e,expected:r,operator:o.name,message:"Got unwanted ".concat(m).concat(E,`
2
+ `)+'Actual message: "'.concat(e&&e.message,'"'),stackStartFn:o})}throw e}}D.throws=function o(e){for(var r=arguments.length,c=new Array(r>1?r-1:0),E=1;E<r;E++)c[E-1]=arguments[E];Y.apply(void 0,[o,z(e)].concat(c))},D.rejects=function o(e){for(var r=arguments.length,c=new Array(r>1?r-1:0),E=1;E<r;E++)c[E-1]=arguments[E];return G(e).then(function(m){return Y.apply(void 0,[o,m].concat(c))})},D.doesNotThrow=function o(e){for(var r=arguments.length,c=new Array(r>1?r-1:0),E=1;E<r;E++)c[E-1]=arguments[E];S.apply(void 0,[o,z(e)].concat(c))},D.doesNotReject=function o(e){for(var r=arguments.length,c=new Array(r>1?r-1:0),E=1;E<r;E++)c[E-1]=arguments[E];return G(e).then(function(m){return S.apply(void 0,[o,m].concat(c))})},D.ifError=function o(e){if(e!=null){var r="ifError got unwanted exception: ";O(e)==="object"&&typeof e.message=="string"?e.message.length===0&&e.constructor?r+=e.constructor.name:r+=e.message:r+=V(e);var c=new F({actual:e,expected:null,operator:"ifError",message:r,stackStartFn:o}),E=e.stack;if(typeof E=="string"){var m=E.split(`
3
+ `);m.shift();for(var L=c.stack.split(`
4
+ `),lt=0;lt<m.length;lt++){var at=L.indexOf(m[lt]);if(at!==-1){L=L.slice(0,at);break}}c.stack="".concat(L.join(`
5
+ `),`
6
+ `).concat(m.join(`
7
+ `))}throw c}};function nt(){for(var o=arguments.length,e=new Array(o),r=0;r<o;r++)e[r]=arguments[r];a.apply(void 0,[nt,e.length].concat(e))}D.strict=f(nt,D,{equal:D.strictEqual,deepEqual:D.deepStrictEqual,notEqual:D.notStrictEqual,notDeepEqual:D.notDeepStrictEqual}),D.strict.strict=D.strict},25961:function(x,k,p){var y=p(34155);function O(u){for(var a=1;a<arguments.length;a++){var l=arguments[a]!=null?arguments[a]:{},g=Object.keys(l);typeof Object.getOwnPropertySymbols=="function"&&(g=g.concat(Object.getOwnPropertySymbols(l).filter(function(N){return Object.getOwnPropertyDescriptor(l,N).enumerable}))),g.forEach(function(N){T(u,N,l[N])})}return u}function T(u,a,l){return a in u?Object.defineProperty(u,a,{value:l,enumerable:!0,configurable:!0,writable:!0}):u[a]=l,u}function P(u,a){if(!(u instanceof a))throw new TypeError("Cannot call a class as a function")}function v(u,a){for(var l=0;l<a.length;l++){var g=a[l];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(u,g.key,g)}}function J(u,a,l){return a&&v(u.prototype,a),l&&v(u,l),u}function q(u,a){return a&&(i(a)==="object"||typeof a=="function")?a:H(u)}function H(u){if(u===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u}function W(u,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(a&&a.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),a&&w(u,a)}function B(u){var a=typeof Map=="function"?new Map:void 0;return B=function(g){if(g===null||!V(g))return g;if(typeof g!="function")throw new TypeError("Super expression must either be null or a function");if(typeof a<"u"){if(a.has(g))return a.get(g);a.set(g,N)}function N(){return Q(g,arguments,C(this).constructor)}return N.prototype=Object.create(g.prototype,{constructor:{value:N,enumerable:!1,writable:!0,configurable:!0}}),w(N,g)},B(u)}function F(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function Q(u,a,l){return F()?Q=Reflect.construct:Q=function(N,U,et){var z=[null];z.push.apply(z,U);var tt=Function.bind.apply(N,z),G=new tt;return et&&w(G,et.prototype),G},Q.apply(null,arguments)}function V(u){return Function.toString.call(u).indexOf("[native code]")!==-1}function w(u,a){return w=Object.setPrototypeOf||function(g,N){return g.__proto__=N,g},w(u,a)}function C(u){return C=Object.setPrototypeOf?Object.getPrototypeOf:function(l){return l.__proto__||Object.getPrototypeOf(l)},C(u)}function i(u){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?i=function(l){return typeof l}:i=function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},i(u)}var f=p(89539),h=f.inspect,A=p(62136),M=A.codes.ERR_INVALID_ARG_TYPE;function Z(u,a,l){return(l===void 0||l>u.length)&&(l=u.length),u.substring(l-a.length,l)===a}function rt(u,a){if(a=Math.floor(a),u.length==0||a==0)return"";var l=u.length*a;for(a=Math.floor(Math.log(a)/Math.log(2));a;)u+=u,a--;return u+=u.substring(0,l-u.length),u}var K="",ft="",_="",X="",st={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:"},vt=10;function ht(u){var a=Object.keys(u),l=Object.create(Object.getPrototypeOf(u));return a.forEach(function(g){l[g]=u[g]}),Object.defineProperty(l,"message",{value:u.message}),l}function D(u){return h(u,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function gt(u,a,l){var g="",N="",U=0,et="",z=!1,tt=D(u),G=tt.split(`
8
+ `),Y=D(a).split(`
9
+ `),S=0,nt="";if(l==="strictEqual"&&i(u)==="object"&&i(a)==="object"&&u!==null&&a!==null&&(l="strictEqualObject"),G.length===1&&Y.length===1&&G[0]!==Y[0]){var o=G[0].length+Y[0].length;if(o<=vt){if((i(u)!=="object"||u===null)&&(i(a)!=="object"||a===null)&&(u!==0||a!==0))return"".concat(st[l],`
10
+
11
+ `)+"".concat(G[0]," !== ").concat(Y[0],`
12
+ `)}else if(l!=="strictEqualObject"){var e=y.stderr&&y.stderr.isTTY?y.stderr.columns:80;if(o<e){for(;G[0][S]===Y[0][S];)S++;S>2&&(nt=`
13
+ `.concat(rt(" ",S),"^"),S=0)}}}for(var r=G[G.length-1],c=Y[Y.length-1];r===c&&(S++<2?et=`
14
+ `.concat(r).concat(et):g=r,G.pop(),Y.pop(),!(G.length===0||Y.length===0));)r=G[G.length-1],c=Y[Y.length-1];var E=Math.max(G.length,Y.length);if(E===0){var m=tt.split(`
15
+ `);if(m.length>30)for(m[26]="".concat(K,"...").concat(X);m.length>27;)m.pop();return"".concat(st.notIdentical,`
16
+
17
+ `).concat(m.join(`
18
+ `),`
19
+ `)}S>3&&(et=`
20
+ `.concat(K,"...").concat(X).concat(et),z=!0),g!==""&&(et=`
21
+ `.concat(g).concat(et),g="");var L=0,lt=st[l]+`
22
+ `.concat(ft,"+ actual").concat(X," ").concat(_,"- expected").concat(X),at=" ".concat(K,"...").concat(X," Lines skipped");for(S=0;S<E;S++){var ot=S-U;if(G.length<S+1)ot>1&&S>2&&(ot>4?(N+=`
23
+ `.concat(K,"...").concat(X),z=!0):ot>3&&(N+=`
24
+ `.concat(Y[S-2]),L++),N+=`
25
+ `.concat(Y[S-1]),L++),U=S,g+=`
26
+ `.concat(_,"-").concat(X," ").concat(Y[S]),L++;else if(Y.length<S+1)ot>1&&S>2&&(ot>4?(N+=`
27
+ `.concat(K,"...").concat(X),z=!0):ot>3&&(N+=`
28
+ `.concat(G[S-2]),L++),N+=`
29
+ `.concat(G[S-1]),L++),U=S,N+=`
30
+ `.concat(ft,"+").concat(X," ").concat(G[S]),L++;else{var yt=Y[S],pt=G[S],Et=pt!==yt&&(!Z(pt,",")||pt.slice(0,-1)!==yt);Et&&Z(yt,",")&&yt.slice(0,-1)===pt&&(Et=!1,pt+=","),Et?(ot>1&&S>2&&(ot>4?(N+=`
31
+ `.concat(K,"...").concat(X),z=!0):ot>3&&(N+=`
32
+ `.concat(G[S-2]),L++),N+=`
33
+ `.concat(G[S-1]),L++),U=S,N+=`
34
+ `.concat(ft,"+").concat(X," ").concat(pt),g+=`
35
+ `.concat(_,"-").concat(X," ").concat(yt),L+=2):(N+=g,g="",(ot===1||S===0)&&(N+=`
36
+ `.concat(pt),L++))}if(L>20&&S<E-2)return"".concat(lt).concat(at,`
37
+ `).concat(N,`
38
+ `).concat(K,"...").concat(X).concat(g,`
39
+ `)+"".concat(K,"...").concat(X)}return"".concat(lt).concat(z?at:"",`
40
+ `).concat(N).concat(g).concat(et).concat(nt)}var it=function(u){W(a,u);function a(l){var g;if(P(this,a),i(l)!=="object"||l===null)throw new M("options","Object",l);var N=l.message,U=l.operator,et=l.stackStartFn,z=l.actual,tt=l.expected,G=Error.stackTraceLimit;if(Error.stackTraceLimit=0,N!=null)g=q(this,C(a).call(this,String(N)));else if(y.stderr&&y.stderr.isTTY&&(y.stderr&&y.stderr.getColorDepth&&y.stderr.getColorDepth()!==1?(K="\x1B[34m",ft="\x1B[32m",X="\x1B[39m",_="\x1B[31m"):(K="",ft="",X="",_="")),i(z)==="object"&&z!==null&&i(tt)==="object"&&tt!==null&&"stack"in z&&z instanceof Error&&"stack"in tt&&tt instanceof Error&&(z=ht(z),tt=ht(tt)),U==="deepStrictEqual"||U==="strictEqual")g=q(this,C(a).call(this,gt(z,tt,U)));else if(U==="notDeepStrictEqual"||U==="notStrictEqual"){var Y=st[U],S=D(z).split(`
41
+ `);if(U==="notStrictEqual"&&i(z)==="object"&&z!==null&&(Y=st.notStrictEqualObject),S.length>30)for(S[26]="".concat(K,"...").concat(X);S.length>27;)S.pop();S.length===1?g=q(this,C(a).call(this,"".concat(Y," ").concat(S[0]))):g=q(this,C(a).call(this,"".concat(Y,`
42
+
43
+ `).concat(S.join(`
44
+ `),`
45
+ `)))}else{var nt=D(z),o="",e=st[U];U==="notDeepEqual"||U==="notEqual"?(nt="".concat(st[U],`
46
+
47
+ `).concat(nt),nt.length>1024&&(nt="".concat(nt.slice(0,1021),"..."))):(o="".concat(D(tt)),nt.length>512&&(nt="".concat(nt.slice(0,509),"...")),o.length>512&&(o="".concat(o.slice(0,509),"...")),U==="deepEqual"||U==="equal"?nt="".concat(e,`
48
+
49
+ `).concat(nt,`
50
+
51
+ should equal
52
+
53
+ `):o=" ".concat(U," ").concat(o)),g=q(this,C(a).call(this,"".concat(nt).concat(o)))}return Error.stackTraceLimit=G,g.generatedMessage=!N,Object.defineProperty(H(g),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),g.code="ERR_ASSERTION",g.actual=z,g.expected=tt,g.operator=U,Error.captureStackTrace&&Error.captureStackTrace(H(g),et),g.stack,g.name="AssertionError",q(g)}return J(a,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:h.custom,value:function(g,N){return h(this,O({},N,{customInspect:!1,depth:0}))}}]),a}(B(Error));x.exports=it},62136:function(x,k,p){function y(i){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?y=function(h){return typeof h}:y=function(h){return h&&typeof Symbol=="function"&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h},y(i)}function O(i,f){if(!(i instanceof f))throw new TypeError("Cannot call a class as a function")}function T(i,f){return f&&(y(f)==="object"||typeof f=="function")?f:P(i)}function P(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function v(i){return v=Object.setPrototypeOf?Object.getPrototypeOf:function(h){return h.__proto__||Object.getPrototypeOf(h)},v(i)}function J(i,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(f&&f.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),f&&q(i,f)}function q(i,f){return q=Object.setPrototypeOf||function(A,M){return A.__proto__=M,A},q(i,f)}var H={},W,B;function F(i,f,h){h||(h=Error);function A(Z,rt,K){return typeof f=="string"?f:f(Z,rt,K)}var M=function(Z){J(rt,Z);function rt(K,ft,_){var X;return O(this,rt),X=T(this,v(rt).call(this,A(K,ft,_))),X.code=i,X}return rt}(h);H[i]=M}function Q(i,f){if(Array.isArray(i)){var h=i.length;return i=i.map(function(A){return String(A)}),h>2?"one of ".concat(f," ").concat(i.slice(0,h-1).join(", "),", or ")+i[h-1]:h===2?"one of ".concat(f," ").concat(i[0]," or ").concat(i[1]):"of ".concat(f," ").concat(i[0])}else return"of ".concat(f," ").concat(String(i))}function V(i,f,h){return i.substr(!h||h<0?0:+h,f.length)===f}function w(i,f,h){return(h===void 0||h>i.length)&&(h=i.length),i.substring(h-f.length,h)===f}function C(i,f,h){return typeof h!="number"&&(h=0),h+f.length>i.length?!1:i.indexOf(f,h)!==-1}F("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),F("ERR_INVALID_ARG_TYPE",function(i,f,h){W===void 0&&(W=p(69282)),W(typeof i=="string","'name' must be a string");var A;typeof f=="string"&&V(f,"not ")?(A="must not be",f=f.replace(/^not /,"")):A="must be";var M;if(w(i," argument"))M="The ".concat(i," ").concat(A," ").concat(Q(f,"type"));else{var Z=C(i,".")?"property":"argument";M='The "'.concat(i,'" ').concat(Z," ").concat(A," ").concat(Q(f,"type"))}return M+=". Received type ".concat(y(h)),M},TypeError),F("ERR_INVALID_ARG_VALUE",function(i,f){var h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";B===void 0&&(B=p(89539));var A=B.inspect(f);return A.length>128&&(A="".concat(A.slice(0,128),"...")),"The argument '".concat(i,"' ").concat(h,". Received ").concat(A)},TypeError,RangeError),F("ERR_INVALID_RETURN_VALUE",function(i,f,h){var A;return h&&h.constructor&&h.constructor.name?A="instance of ".concat(h.constructor.name):A="type ".concat(y(h)),"Expected ".concat(i,' to be returned from the "').concat(f,'"')+" function but got ".concat(A,".")},TypeError),F("ERR_MISSING_ARGS",function(){for(var i=arguments.length,f=new Array(i),h=0;h<i;h++)f[h]=arguments[h];W===void 0&&(W=p(69282)),W(f.length>0,"At least one arg needs to be specified");var A="The ",M=f.length;switch(f=f.map(function(Z){return'"'.concat(Z,'"')}),M){case 1:A+="".concat(f[0]," argument");break;case 2:A+="".concat(f[0]," and ").concat(f[1]," arguments");break;default:A+=f.slice(0,M-1).join(", "),A+=", and ".concat(f[M-1]," arguments");break}return"".concat(A," must be specified")},TypeError),x.exports.codes=H},19158:function(x,k,p){function y(t,n){return P(t)||T(t,n)||O()}function O(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function T(t,n){var s=[],d=!0,b=!1,R=void 0;try{for(var j=t[Symbol.iterator](),$;!(d=($=j.next()).done)&&(s.push($.value),!(n&&s.length===n));d=!0);}catch(I){b=!0,R=I}finally{try{!d&&j.return!=null&&j.return()}finally{if(b)throw R}}return s}function P(t){if(Array.isArray(t))return t}function v(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?v=function(s){return typeof s}:v=function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},v(t)}var J=/a/g.flags!==void 0,q=function(n){var s=[];return n.forEach(function(d){return s.push(d)}),s},H=function(n){var s=[];return n.forEach(function(d,b){return s.push([b,d])}),s},W=Object.is?Object.is:p(20609),B=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},F=Number.isNaN?Number.isNaN:p(20360);function Q(t){return t.call.bind(t)}var V=Q(Object.prototype.hasOwnProperty),w=Q(Object.prototype.propertyIsEnumerable),C=Q(Object.prototype.toString),i=p(89539).types,f=i.isAnyArrayBuffer,h=i.isArrayBufferView,A=i.isDate,M=i.isMap,Z=i.isRegExp,rt=i.isSet,K=i.isNativeError,ft=i.isBoxedPrimitive,_=i.isNumberObject,X=i.isStringObject,st=i.isBooleanObject,vt=i.isBigIntObject,ht=i.isSymbolObject,D=i.isFloat32Array,gt=i.isFloat64Array;function it(t){if(t.length===0||t.length>10)return!0;for(var n=0;n<t.length;n++){var s=t.charCodeAt(n);if(s<48||s>57)return!0}return t.length===10&&t>=Math.pow(2,32)}function u(t){return Object.keys(t).filter(it).concat(B(t).filter(Object.prototype.propertyIsEnumerable.bind(t)))}/*!
54
+ * The buffer module from node.js, for the browser.
55
+ *
56
+ * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
57
+ * @license MIT
58
+ */function a(t,n){if(t===n)return 0;for(var s=t.length,d=n.length,b=0,R=Math.min(s,d);b<R;++b)if(t[b]!==n[b]){s=t[b],d=n[b];break}return s<d?-1:d<s?1:0}var l=void 0,g=!0,N=!1,U=0,et=1,z=2,tt=3;function G(t,n){return J?t.source===n.source&&t.flags===n.flags:RegExp.prototype.toString.call(t)===RegExp.prototype.toString.call(n)}function Y(t,n){if(t.byteLength!==n.byteLength)return!1;for(var s=0;s<t.byteLength;s++)if(t[s]!==n[s])return!1;return!0}function S(t,n){return t.byteLength!==n.byteLength?!1:a(new Uint8Array(t.buffer,t.byteOffset,t.byteLength),new Uint8Array(n.buffer,n.byteOffset,n.byteLength))===0}function nt(t,n){return t.byteLength===n.byteLength&&a(new Uint8Array(t),new Uint8Array(n))===0}function o(t,n){return _(t)?_(n)&&W(Number.prototype.valueOf.call(t),Number.prototype.valueOf.call(n)):X(t)?X(n)&&String.prototype.valueOf.call(t)===String.prototype.valueOf.call(n):st(t)?st(n)&&Boolean.prototype.valueOf.call(t)===Boolean.prototype.valueOf.call(n):vt(t)?vt(n)&&BigInt.prototype.valueOf.call(t)===BigInt.prototype.valueOf.call(n):ht(n)&&Symbol.prototype.valueOf.call(t)===Symbol.prototype.valueOf.call(n)}function e(t,n,s,d){if(t===n)return t!==0?!0:s?W(t,n):!0;if(s){if(v(t)!=="object")return typeof t=="number"&&F(t)&&F(n);if(v(n)!=="object"||t===null||n===null||Object.getPrototypeOf(t)!==Object.getPrototypeOf(n))return!1}else{if(t===null||v(t)!=="object")return n===null||v(n)!=="object"?t==n:!1;if(n===null||v(n)!=="object")return!1}var b=C(t),R=C(n);if(b!==R)return!1;if(Array.isArray(t)){if(t.length!==n.length)return!1;var j=u(t,l),$=u(n,l);return j.length!==$.length?!1:c(t,n,s,d,et,j)}if(b==="[object Object]"&&(!M(t)&&M(n)||!rt(t)&&rt(n)))return!1;if(A(t)){if(!A(n)||Date.prototype.getTime.call(t)!==Date.prototype.getTime.call(n))return!1}else if(Z(t)){if(!Z(n)||!G(t,n))return!1}else if(K(t)||t instanceof Error){if(t.message!==n.message||t.name!==n.name)return!1}else if(h(t)){if(!s&&(D(t)||gt(t))){if(!Y(t,n))return!1}else if(!S(t,n))return!1;var I=u(t,l),ut=u(n,l);return I.length!==ut.length?!1:c(t,n,s,d,U,I)}else{if(rt(t))return!rt(n)||t.size!==n.size?!1:c(t,n,s,d,z);if(M(t))return!M(n)||t.size!==n.size?!1:c(t,n,s,d,tt);if(f(t)){if(!nt(t,n))return!1}else if(ft(t)&&!o(t,n))return!1}return c(t,n,s,d,U)}function r(t,n){return n.filter(function(s){return w(t,s)})}function c(t,n,s,d,b,R){if(arguments.length===5){R=Object.keys(t);var j=Object.keys(n);if(R.length!==j.length)return!1}for(var $=0;$<R.length;$++)if(!V(n,R[$]))return!1;if(s&&arguments.length===5){var I=B(t);if(I.length!==0){var ut=0;for($=0;$<I.length;$++){var ct=I[$];if(w(t,ct)){if(!w(n,ct))return!1;R.push(ct),ut++}else if(w(n,ct))return!1}var mt=B(n);if(I.length!==mt.length&&r(n,mt).length!==ut)return!1}else{var dt=B(n);if(dt.length!==0&&r(n,dt).length!==0)return!1}}if(R.length===0&&(b===U||b===et&&t.length===0||t.size===0))return!0;if(d===void 0)d={val1:new Map,val2:new Map,position:0};else{var Ot=d.val1.get(t);if(Ot!==void 0){var bt=d.val2.get(n);if(bt!==void 0)return Ot===bt}d.position++}d.val1.set(t,d.position),d.val2.set(n,d.position);var St=pt(t,n,s,R,d,b);return d.val1.delete(t),d.val2.delete(n),St}function E(t,n,s,d){for(var b=q(t),R=0;R<b.length;R++){var j=b[R];if(e(n,j,s,d))return t.delete(j),!0}return!1}function m(t){switch(v(t)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":t=+t;case"number":if(F(t))return!1}return!0}function L(t,n,s){var d=m(s);return d!=null?d:n.has(d)&&!t.has(d)}function lt(t,n,s,d,b){var R=m(s);if(R!=null)return R;var j=n.get(R);return j===void 0&&!n.has(R)||!e(d,j,!1,b)?!1:!t.has(R)&&e(d,j,!1,b)}function at(t,n,s,d){for(var b=null,R=q(t),j=0;j<R.length;j++){var $=R[j];if(v($)==="object"&&$!==null)b===null&&(b=new Set),b.add($);else if(!n.has($)){if(s||!L(t,n,$))return!1;b===null&&(b=new Set),b.add($)}}if(b!==null){for(var I=q(n),ut=0;ut<I.length;ut++){var ct=I[ut];if(v(ct)==="object"&&ct!==null){if(!E(b,ct,s,d))return!1}else if(!s&&!t.has(ct)&&!E(b,ct,s,d))return!1}return b.size===0}return!0}function ot(t,n,s,d,b,R){for(var j=q(t),$=0;$<j.length;$++){var I=j[$];if(e(s,I,b,R)&&e(d,n.get(I),b,R))return t.delete(I),!0}return!1}function yt(t,n,s,d){for(var b=null,R=H(t),j=0;j<R.length;j++){var $=y(R[j],2),I=$[0],ut=$[1];if(v(I)==="object"&&I!==null)b===null&&(b=new Set),b.add(I);else{var ct=n.get(I);if(ct===void 0&&!n.has(I)||!e(ut,ct,s,d)){if(s||!lt(t,n,I,ut,d))return!1;b===null&&(b=new Set),b.add(I)}}}if(b!==null){for(var mt=H(n),dt=0;dt<mt.length;dt++){var Ot=y(mt[dt],2),I=Ot[0],bt=Ot[1];if(v(I)==="object"&&I!==null){if(!ot(b,t,I,bt,s,d))return!1}else if(!s&&(!t.has(I)||!e(t.get(I),bt,!1,d))&&!ot(b,t,I,bt,!1,d))return!1}return b.size===0}return!0}function pt(t,n,s,d,b,R){var j=0;if(R===z){if(!at(t,n,s,b))return!1}else if(R===tt){if(!yt(t,n,s,b))return!1}else if(R===et)for(;j<t.length;j++)if(V(t,j)){if(!V(n,j)||!e(t[j],n[j],s,b))return!1}else{if(V(n,j))return!1;for(var $=Object.keys(t);j<$.length;j++){var I=$[j];if(!V(n,I)||!e(t[I],n[I],s,b))return!1}return $.length===Object.keys(n).length}for(j=0;j<d.length;j++){var ut=d[j];if(!e(t[ut],n[ut],s,b))return!1}return!0}function Et(t,n){return e(t,n,N)}function wt(t,n){return e(t,n,g)}x.exports={isDeepEqual:Et,isDeepStrictEqual:wt}},4289:function(x,k,p){var y=p(82215),O=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",T=Object.prototype.toString,P=Array.prototype.concat,v=Object.defineProperty,J=function(F){return typeof F=="function"&&T.call(F)==="[object Function]"},q=p(31044)(),H=v&&q,W=function(F,Q,V,w){Q in F&&(!J(w)||!w())||(H?v(F,Q,{configurable:!0,enumerable:!1,value:V,writable:!0}):F[Q]=V)},B=function(F,Q){var V=arguments.length>2?arguments[2]:{},w=y(Q);O&&(w=P.call(w,Object.getOwnPropertySymbols(Q)));for(var C=0;C<w.length;C+=1)W(F,w[C],Q[w[C]],V[w[C]])};B.supportsDescriptors=!!H,x.exports=B},8091:function(x){function k(y,O){if(y==null)throw new TypeError("Cannot convert first argument to object");for(var T=Object(y),P=1;P<arguments.length;P++){var v=arguments[P];if(v!=null)for(var J=Object.keys(Object(v)),q=0,H=J.length;q<H;q++){var W=J[q],B=Object.getOwnPropertyDescriptor(v,W);B!==void 0&&B.enumerable&&(T[W]=v[W])}}return T}function p(){Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:k})}x.exports={assign:k,polyfill:p}},31044:function(x,k,p){var y=p(40210),O=y("%Object.defineProperty%",!0),T=function(){if(O)try{return O({},"a",{value:1}),!0}catch{return!1}return!1};T.hasArrayLengthDefineBug=function(){if(!T())return null;try{return O([],"length",{value:1}).length!==1}catch{return!0}},x.exports=T},98611:function(x){x.exports=function(p){return p!==p}},20360:function(x,k,p){var y=p(55559),O=p(4289),T=p(98611),P=p(29415),v=p(23194),J=y(P(),Number);O(J,{getPolyfill:P,implementation:T,shim:v}),x.exports=J},29415:function(x,k,p){var y=p(98611);x.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:y}},23194:function(x,k,p){var y=p(4289),O=p(29415);x.exports=function(){var P=O();return y(Number,{isNaN:P},{isNaN:function(){return Number.isNaN!==P}}),P}},24244:function(x){var k=function(p){return p!==p};x.exports=function(y,O){return y===0&&O===0?1/y===1/O:!!(y===O||k(y)&&k(O))}},20609:function(x,k,p){var y=p(4289),O=p(55559),T=p(24244),P=p(75624),v=p(52281),J=O(P(),Object);y(J,{getPolyfill:P,implementation:T,shim:v}),x.exports=J},75624:function(x,k,p){var y=p(24244);x.exports=function(){return typeof Object.is=="function"?Object.is:y}},52281:function(x,k,p){var y=p(75624),O=p(4289);x.exports=function(){var P=y();return O(Object,{is:P},{is:function(){return Object.is!==P}}),P}},18987:function(x,k,p){var y;if(!Object.keys){var O=Object.prototype.hasOwnProperty,T=Object.prototype.toString,P=p(21414),v=Object.prototype.propertyIsEnumerable,J=!v.call({toString:null},"toString"),q=v.call(function(){},"prototype"),H=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],W=function(V){var w=V.constructor;return w&&w.prototype===V},B={$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},F=function(){if(typeof window>"u")return!1;for(var V in window)try{if(!B["$"+V]&&O.call(window,V)&&window[V]!==null&&typeof window[V]=="object")try{W(window[V])}catch{return!0}}catch{return!0}return!1}(),Q=function(V){if(typeof window>"u"||!F)return W(V);try{return W(V)}catch{return!1}};y=function(w){var C=w!==null&&typeof w=="object",i=T.call(w)==="[object Function]",f=P(w),h=C&&T.call(w)==="[object String]",A=[];if(!C&&!i&&!f)throw new TypeError("Object.keys called on a non-object");var M=q&&i;if(h&&w.length>0&&!O.call(w,0))for(var Z=0;Z<w.length;++Z)A.push(String(Z));if(f&&w.length>0)for(var rt=0;rt<w.length;++rt)A.push(String(rt));else for(var K in w)!(M&&K==="prototype")&&O.call(w,K)&&A.push(String(K));if(J)for(var ft=Q(w),_=0;_<H.length;++_)!(ft&&H[_]==="constructor")&&O.call(w,H[_])&&A.push(H[_]);return A}}x.exports=y},82215:function(x,k,p){var y=Array.prototype.slice,O=p(21414),T=Object.keys,P=T?function(q){return T(q)}:p(18987),v=Object.keys;P.shim=function(){if(Object.keys){var q=function(){var H=Object.keys(arguments);return H&&H.length===arguments.length}(1,2);q||(Object.keys=function(W){return O(W)?v(y.call(W)):v(W)})}else Object.keys=P;return Object.keys||P},x.exports=P},21414:function(x){var k=Object.prototype.toString;x.exports=function(y){var O=k.call(y),T=O==="[object Arguments]";return T||(T=O!=="[object Array]"&&y!==null&&typeof y=="object"&&typeof y.length=="number"&&y.length>=0&&k.call(y.callee)==="[object Function]"),T}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkedge_currency_accountbased=self.webpackChunkedge_currency_accountbased||[]).push([[190],{88190:function(wr,Ne,Ie){Ie.r(Ne),Ie.d(Ne,{code:function(){return dr},decode:function(){return hr},encode:function(){return lr},name:function(){return fr}});const nn=["string","number","bigint","symbol"],tn=["Function","Generator","AsyncGenerator","GeneratorFunction","AsyncGeneratorFunction","AsyncFunction","Observable","Array","Buffer","Object","RegExp","Date","Error","Map","Set","WeakMap","WeakSet","ArrayBuffer","SharedArrayBuffer","DataView","Promise","URL","HTMLElement","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];function rn(e){if(e===null)return"null";if(e===void 0)return"undefined";if(e===!0||e===!1)return"boolean";const n=typeof e;if(nn.includes(n))return n;if(n==="function")return"Function";if(Array.isArray(e))return"Array";if(on(e))return"Buffer";const t=sn(e);return t||"Object"}function on(e){return e&&e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer.call(null,e)}function sn(e){const n=Object.prototype.toString.call(e).slice(8,-1);if(tn.includes(n))return n}class s{constructor(n,t,r){this.major=n,this.majorEncoded=n<<5,this.name=t,this.terminal=r}toString(){return`Type[${this.major}].${this.name}`}compare(n){return this.major<n.major?-1:this.major>n.major?1:0}}s.uint=new s(0,"uint",!0),s.negint=new s(1,"negint",!0),s.bytes=new s(2,"bytes",!0),s.string=new s(3,"string",!0),s.array=new s(4,"array",!1),s.map=new s(5,"map",!1),s.tag=new s(6,"tag",!1),s.float=new s(7,"float",!0),s.false=new s(7,"false",!0),s.true=new s(7,"true",!0),s.null=new s(7,"null",!0),s.undefined=new s(7,"undefined",!0),s.break=new s(7,"break",!0);class u{constructor(n,t,r){this.type=n,this.value=t,this.encodedLength=r,this.encodedBytes=void 0,this.byteValue=void 0}toString(){return`Token[${this.type}].${this.value}`}}const P=globalThis.process&&!globalThis.process.browser&&globalThis.Buffer&&typeof globalThis.Buffer.isBuffer=="function",cn=new TextDecoder,an=new TextEncoder;function ee(e){return P&&globalThis.Buffer.isBuffer(e)}function Ce(e){return e instanceof Uint8Array?ee(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e:Uint8Array.from(e)}const un=P?(e,n,t)=>t-n>64?globalThis.Buffer.from(e.subarray(n,t)).toString("utf8"):ze(e,n,t):(e,n,t)=>t-n>64?cn.decode(e.subarray(n,t)):ze(e,n,t),fn=P?e=>e.length>64?globalThis.Buffer.from(e):$e(e):e=>e.length>64?an.encode(e):$e(e),N=e=>Uint8Array.from(e),he=P?(e,n,t)=>ee(e)?new Uint8Array(e.subarray(n,t)):e.slice(n,t):(e,n,t)=>e.slice(n,t),dn=P?(e,n)=>(e=e.map(t=>t instanceof Uint8Array?t:globalThis.Buffer.from(t)),Ce(globalThis.Buffer.concat(e,n))):(e,n)=>{const t=new Uint8Array(n);let r=0;for(let o of e)r+o.length>t.length&&(o=o.subarray(0,t.length-r)),t.set(o,r),r+=o.length;return t},ln=P?e=>globalThis.Buffer.allocUnsafe(e):e=>new Uint8Array(e),pr=null,gr=null;function mr(e){if(e instanceof Uint8Array&&e.constructor.name==="Uint8Array")return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")}function hn(e,n){if(ee(e)&&ee(n))return e.compare(n);for(let t=0;t<e.length;t++)if(e[t]!==n[t])return e[t]<n[t]?-1:1;return 0}function $e(e,n=1/0){let t;const r=e.length;let o=null;const i=[];for(let a=0;a<r;++a){if(t=e.charCodeAt(a),t>55295&&t<57344){if(!o){if(t>56319){(n-=3)>-1&&i.push(239,191,189);continue}else if(a+1===r){(n-=3)>-1&&i.push(239,191,189);continue}o=t;continue}if(t<56320){(n-=3)>-1&&i.push(239,191,189),o=t;continue}t=(o-55296<<10|t-56320)+65536}else o&&(n-=3)>-1&&i.push(239,191,189);if(o=null,t<128){if((n-=1)<0)break;i.push(t)}else if(t<2048){if((n-=2)<0)break;i.push(t>>6|192,t&63|128)}else if(t<65536){if((n-=3)<0)break;i.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((n-=4)<0)break;i.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return i}function ze(e,n,t){const r=[];for(;n<t;){const o=e[n];let i=null,a=o>239?4:o>223?3:o>191?2:1;if(n+a<=t){let f,h,m,y;switch(a){case 1:o<128&&(i=o);break;case 2:f=e[n+1],(f&192)===128&&(y=(o&31)<<6|f&63,y>127&&(i=y));break;case 3:f=e[n+1],h=e[n+2],(f&192)===128&&(h&192)===128&&(y=(o&15)<<12|(f&63)<<6|h&63,y>2047&&(y<55296||y>57343)&&(i=y));break;case 4:f=e[n+1],h=e[n+2],m=e[n+3],(f&192)===128&&(h&192)===128&&(m&192)===128&&(y=(o&15)<<18|(f&63)<<12|(h&63)<<6|m&63,y>65535&&y<1114112&&(i=y))}}i===null?(i=65533,a=1):i>65535&&(i-=65536,r.push(i>>>10&1023|55296),i=56320|i&1023),r.push(i),n+=a}return yn(r)}const Me=4096;function yn(e){const n=e.length;if(n<=Me)return String.fromCharCode.apply(String,e);let t="",r=0;for(;r<n;)t+=String.fromCharCode.apply(String,e.slice(r,r+=Me));return t}const wn=256;class Oe{constructor(n=wn){this.chunkSize=n,this.cursor=0,this.maxCursor=-1,this.chunks=[],this._initReuseChunk=null}reset(){this.cursor=0,this.maxCursor=-1,this.chunks.length&&(this.chunks=[]),this._initReuseChunk!==null&&(this.chunks.push(this._initReuseChunk),this.maxCursor=this._initReuseChunk.length-1)}push(n){let t=this.chunks[this.chunks.length-1];if(this.cursor+n.length<=this.maxCursor+1){const o=t.length-(this.maxCursor-this.cursor)-1;t.set(n,o)}else{if(t){const o=t.length-(this.maxCursor-this.cursor)-1;o<t.length&&(this.chunks[this.chunks.length-1]=t.subarray(0,o),this.maxCursor=this.cursor-1)}n.length<64&&n.length<this.chunkSize?(t=ln(this.chunkSize),this.chunks.push(t),this.maxCursor+=t.length,this._initReuseChunk===null&&(this._initReuseChunk=t),t.set(n,0)):(this.chunks.push(n),this.maxCursor+=n.length)}this.cursor+=n.length}toBytes(n=!1){let t;if(this.chunks.length===1){const r=this.chunks[0];n&&this.cursor>r.length/2?(t=this.cursor===r.length?r:r.subarray(0,this.cursor),this._initReuseChunk=null,this.chunks=[]):t=he(r,0,this.cursor)}else t=dn(this.chunks,this.cursor);return n&&this.reset(),t}}const d="CBOR decode error:",De="CBOR encode error:",H=[];H[23]=1,H[24]=2,H[25]=3,H[26]=5,H[27]=9;function q(e,n,t){if(e.length-n<t)throw new Error(`${d} not enough data for type`)}const g=[24,256,65536,4294967296,BigInt("18446744073709551616")];function D(e,n,t){q(e,n,1);const r=e[n];if(t.strict===!0&&r<g[0])throw new Error(`${d} integer encoded in more bytes than necessary (strict decode)`);return r}function F(e,n,t){q(e,n,2);const r=e[n]<<8|e[n+1];if(t.strict===!0&&r<g[1])throw new Error(`${d} integer encoded in more bytes than necessary (strict decode)`);return r}function R(e,n,t){q(e,n,4);const r=e[n]*16777216+(e[n+1]<<16)+(e[n+2]<<8)+e[n+3];if(t.strict===!0&&r<g[2])throw new Error(`${d} integer encoded in more bytes than necessary (strict decode)`);return r}function L(e,n,t){q(e,n,8);const r=e[n]*16777216+(e[n+1]<<16)+(e[n+2]<<8)+e[n+3],o=e[n+4]*16777216+(e[n+5]<<16)+(e[n+6]<<8)+e[n+7],i=(BigInt(r)<<BigInt(32))+BigInt(o);if(t.strict===!0&&i<g[3])throw new Error(`${d} integer encoded in more bytes than necessary (strict decode)`);if(i<=Number.MAX_SAFE_INTEGER)return Number(i);if(t.allowBigInt===!0)return i;throw new Error(`${d} integers outside of the safe integer range are not supported`)}function pn(e,n,t,r){return new u(s.uint,D(e,n+1,r),2)}function gn(e,n,t,r){return new u(s.uint,F(e,n+1,r),3)}function mn(e,n,t,r){return new u(s.uint,R(e,n+1,r),5)}function bn(e,n,t,r){return new u(s.uint,L(e,n+1,r),9)}function V(e,n){return E(e,0,n.value)}function E(e,n,t){if(t<g[0]){const r=Number(t);e.push([n|r])}else if(t<g[1]){const r=Number(t);e.push([n|24,r])}else if(t<g[2]){const r=Number(t);e.push([n|25,r>>>8,r&255])}else if(t<g[3]){const r=Number(t);e.push([n|26,r>>>24&255,r>>>16&255,r>>>8&255,r&255])}else{const r=BigInt(t);if(r<g[4]){const o=[n|27,0,0,0,0,0,0,0];let i=Number(r&BigInt(4294967295)),a=Number(r>>BigInt(32)&BigInt(4294967295));o[8]=i&255,i=i>>8,o[7]=i&255,i=i>>8,o[6]=i&255,i=i>>8,o[5]=i&255,o[4]=a&255,a=a>>8,o[3]=a&255,a=a>>8,o[2]=a&255,a=a>>8,o[1]=a&255,e.push(o)}else throw new Error(`${d} encountered BigInt larger than allowable range`)}}V.encodedSize=function(n){return E.encodedSize(n.value)},E.encodedSize=function(n){return n<g[0]?1:n<g[1]?2:n<g[2]?3:n<g[3]?5:9},V.compareTokens=function(n,t){return n.value<t.value?-1:n.value>t.value?1:0};function En(e,n,t,r){return new u(s.negint,-1-D(e,n+1,r),2)}function vn(e,n,t,r){return new u(s.negint,-1-F(e,n+1,r),3)}function An(e,n,t,r){return new u(s.negint,-1-R(e,n+1,r),5)}const ye=BigInt(-1),Fe=BigInt(1);function _n(e,n,t,r){const o=L(e,n+1,r);if(typeof o!="bigint"){const i=-1-o;if(i>=Number.MIN_SAFE_INTEGER)return new u(s.negint,i,9)}if(r.allowBigInt!==!0)throw new Error(`${d} integers outside of the safe integer range are not supported`);return new u(s.negint,ye-BigInt(o),9)}function we(e,n){const t=n.value,r=typeof t=="bigint"?t*ye-Fe:t*-1-1;E(e,n.type.majorEncoded,r)}we.encodedSize=function(n){const t=n.value,r=typeof t=="bigint"?t*ye-Fe:t*-1-1;return r<g[0]?1:r<g[1]?2:r<g[2]?3:r<g[3]?5:9},we.compareTokens=function(n,t){return n.value<t.value?1:n.value>t.value?-1:0};function Q(e,n,t,r){q(e,n,t+r);const o=he(e,n+t,n+t+r);return new u(s.bytes,o,t+r)}function kn(e,n,t,r){return Q(e,n,1,t)}function Sn(e,n,t,r){return Q(e,n,2,D(e,n+1,r))}function xn(e,n,t,r){return Q(e,n,3,F(e,n+1,r))}function Bn(e,n,t,r){return Q(e,n,5,R(e,n+1,r))}function Un(e,n,t,r){const o=L(e,n+1,r);if(typeof o=="bigint")throw new Error(`${d} 64-bit integer bytes lengths not supported`);return Q(e,n,9,o)}function ne(e){return e.encodedBytes===void 0&&(e.encodedBytes=e.type===s.string?fn(e.value):e.value),e.encodedBytes}function te(e,n){const t=ne(n);E(e,n.type.majorEncoded,t.length),e.push(t)}te.encodedSize=function(n){const t=ne(n);return E.encodedSize(t.length)+t.length},te.compareTokens=function(n,t){return Tn(ne(n),ne(t))};function Tn(e,n){return e.length<n.length?-1:e.length>n.length?1:hn(e,n)}function W(e,n,t,r,o){const i=t+r;q(e,n,i);const a=new u(s.string,un(e,n+t,n+i),i);return o.retainStringBytes===!0&&(a.byteValue=he(e,n+t,n+i)),a}function Nn(e,n,t,r){return W(e,n,1,t,r)}function In(e,n,t,r){return W(e,n,2,D(e,n+1,r),r)}function Cn(e,n,t,r){return W(e,n,3,F(e,n+1,r),r)}function $n(e,n,t,r){return W(e,n,5,R(e,n+1,r),r)}function zn(e,n,t,r){const o=L(e,n+1,r);if(typeof o=="bigint")throw new Error(`${d} 64-bit integer string lengths not supported`);return W(e,n,9,o,r)}const Mn=te;function G(e,n,t,r){return new u(s.array,r,t)}function On(e,n,t,r){return G(e,n,1,t)}function Dn(e,n,t,r){return G(e,n,2,D(e,n+1,r))}function Fn(e,n,t,r){return G(e,n,3,F(e,n+1,r))}function Rn(e,n,t,r){return G(e,n,5,R(e,n+1,r))}function Ln(e,n,t,r){const o=L(e,n+1,r);if(typeof o=="bigint")throw new Error(`${d} 64-bit integer array lengths not supported`);return G(e,n,9,o)}function Vn(e,n,t,r){if(r.allowIndefinite===!1)throw new Error(`${d} indefinite length items not allowed`);return G(e,n,1,1/0)}function pe(e,n){E(e,s.array.majorEncoded,n.value)}pe.compareTokens=V.compareTokens,pe.encodedSize=function(n){return E.encodedSize(n.value)};function J(e,n,t,r){return new u(s.map,r,t)}function jn(e,n,t,r){return J(e,n,1,t)}function Pn(e,n,t,r){return J(e,n,2,D(e,n+1,r))}function qn(e,n,t,r){return J(e,n,3,F(e,n+1,r))}function Gn(e,n,t,r){return J(e,n,5,R(e,n+1,r))}function Jn(e,n,t,r){const o=L(e,n+1,r);if(typeof o=="bigint")throw new Error(`${d} 64-bit integer map lengths not supported`);return J(e,n,9,o)}function Kn(e,n,t,r){if(r.allowIndefinite===!1)throw new Error(`${d} indefinite length items not allowed`);return J(e,n,1,1/0)}function ge(e,n){E(e,s.map.majorEncoded,n.value)}ge.compareTokens=V.compareTokens,ge.encodedSize=function(n){return E.encodedSize(n.value)};function Hn(e,n,t,r){return new u(s.tag,t,1)}function Qn(e,n,t,r){return new u(s.tag,D(e,n+1,r),2)}function Wn(e,n,t,r){return new u(s.tag,F(e,n+1,r),3)}function Xn(e,n,t,r){return new u(s.tag,R(e,n+1,r),5)}function Zn(e,n,t,r){return new u(s.tag,L(e,n+1,r),9)}function me(e,n){E(e,s.tag.majorEncoded,n.value)}me.compareTokens=V.compareTokens,me.encodedSize=function(n){return E.encodedSize(n.value)};const Yn=20,et=21,nt=22,tt=23;function rt(e,n,t,r){if(r.allowUndefined===!1)throw new Error(`${d} undefined values are not supported`);return r.coerceUndefinedToNull===!0?new u(s.null,null,1):new u(s.undefined,void 0,1)}function ot(e,n,t,r){if(r.allowIndefinite===!1)throw new Error(`${d} indefinite length items not allowed`);return new u(s.break,void 0,1)}function be(e,n,t){if(t){if(t.allowNaN===!1&&Number.isNaN(e))throw new Error(`${d} NaN values are not supported`);if(t.allowInfinity===!1&&(e===1/0||e===-1/0))throw new Error(`${d} Infinity values are not supported`)}return new u(s.float,e,n)}function it(e,n,t,r){return be(ve(e,n+1),3,r)}function st(e,n,t,r){return be(Ae(e,n+1),5,r)}function ct(e,n,t,r){return be(je(e,n+1),9,r)}function Ee(e,n,t){const r=n.value;if(r===!1)e.push([s.float.majorEncoded|Yn]);else if(r===!0)e.push([s.float.majorEncoded|et]);else if(r===null)e.push([s.float.majorEncoded|nt]);else if(r===void 0)e.push([s.float.majorEncoded|tt]);else{let o,i=!1;(!t||t.float64!==!0)&&(Le(r),o=ve(_,1),r===o||Number.isNaN(r)?(_[0]=249,e.push(_.slice(0,3)),i=!0):(Ve(r),o=Ae(_,1),r===o&&(_[0]=250,e.push(_.slice(0,5)),i=!0))),i||(at(r),o=je(_,1),_[0]=251,e.push(_.slice(0,9)))}}Ee.encodedSize=function(n,t){const r=n.value;if(r===!1||r===!0||r===null||r===void 0)return 1;if(!t||t.float64!==!0){Le(r);let o=ve(_,1);if(r===o||Number.isNaN(r))return 3;if(Ve(r),o=Ae(_,1),r===o)return 5}return 9};const Re=new ArrayBuffer(9),v=new DataView(Re,1),_=new Uint8Array(Re,0);function Le(e){if(e===1/0)v.setUint16(0,31744,!1);else if(e===-1/0)v.setUint16(0,64512,!1);else if(Number.isNaN(e))v.setUint16(0,32256,!1);else{v.setFloat32(0,e);const n=v.getUint32(0),t=(n&2139095040)>>23,r=n&8388607;if(t===255)v.setUint16(0,31744,!1);else if(t===0)v.setUint16(0,(e&2147483648)>>16|r>>13,!1);else{const o=t-127;o<-24?v.setUint16(0,0):o<-14?v.setUint16(0,(n&2147483648)>>16|1<<24+o,!1):v.setUint16(0,(n&2147483648)>>16|o+15<<10|r>>13,!1)}}}function ve(e,n){if(e.length-n<2)throw new Error(`${d} not enough data for float16`);const t=(e[n]<<8)+e[n+1];if(t===31744)return 1/0;if(t===64512)return-1/0;if(t===32256)return NaN;const r=t>>10&31,o=t&1023;let i;return r===0?i=o*2**-24:r!==31?i=(o+1024)*2**(r-25):i=o===0?1/0:NaN,t&32768?-i:i}function Ve(e){v.setFloat32(0,e,!1)}function Ae(e,n){if(e.length-n<4)throw new Error(`${d} not enough data for float32`);const t=(e.byteOffset||0)+n;return new DataView(e.buffer,t,4).getFloat32(0,!1)}function at(e){v.setFloat64(0,e,!1)}function je(e,n){if(e.length-n<8)throw new Error(`${d} not enough data for float64`);const t=(e.byteOffset||0)+n;return new DataView(e.buffer,t,8).getFloat64(0,!1)}Ee.compareTokens=V.compareTokens;function l(e,n,t){throw new Error(`${d} encountered invalid minor (${t}) for major ${e[n]>>>5}`)}function re(e){return()=>{throw new Error(`${d} ${e}`)}}const c=[];for(let e=0;e<=23;e++)c[e]=l;c[24]=pn,c[25]=gn,c[26]=mn,c[27]=bn,c[28]=l,c[29]=l,c[30]=l,c[31]=l;for(let e=32;e<=55;e++)c[e]=l;c[56]=En,c[57]=vn,c[58]=An,c[59]=_n,c[60]=l,c[61]=l,c[62]=l,c[63]=l;for(let e=64;e<=87;e++)c[e]=kn;c[88]=Sn,c[89]=xn,c[90]=Bn,c[91]=Un,c[92]=l,c[93]=l,c[94]=l,c[95]=re("indefinite length bytes/strings are not supported");for(let e=96;e<=119;e++)c[e]=Nn;c[120]=In,c[121]=Cn,c[122]=$n,c[123]=zn,c[124]=l,c[125]=l,c[126]=l,c[127]=re("indefinite length bytes/strings are not supported");for(let e=128;e<=151;e++)c[e]=On;c[152]=Dn,c[153]=Fn,c[154]=Rn,c[155]=Ln,c[156]=l,c[157]=l,c[158]=l,c[159]=Vn;for(let e=160;e<=183;e++)c[e]=jn;c[184]=Pn,c[185]=qn,c[186]=Gn,c[187]=Jn,c[188]=l,c[189]=l,c[190]=l,c[191]=Kn;for(let e=192;e<=215;e++)c[e]=Hn;c[216]=Qn,c[217]=Wn,c[218]=Xn,c[219]=Zn,c[220]=l,c[221]=l,c[222]=l,c[223]=l;for(let e=224;e<=243;e++)c[e]=re("simple values are not supported");c[244]=l,c[245]=l,c[246]=l,c[247]=rt,c[248]=re("simple values are not supported"),c[249]=it,c[250]=st,c[251]=ct,c[252]=l,c[253]=l,c[254]=l,c[255]=ot;const x=[];for(let e=0;e<24;e++)x[e]=new u(s.uint,e,1);for(let e=-1;e>=-24;e--)x[31-e]=new u(s.negint,e,1);x[64]=new u(s.bytes,new Uint8Array(0),1),x[96]=new u(s.string,"",1),x[128]=new u(s.array,0,1),x[160]=new u(s.map,0,1),x[244]=new u(s.false,!1,1),x[245]=new u(s.true,!0,1),x[246]=new u(s.null,null,1);function ut(e){switch(e.type){case s.false:return N([244]);case s.true:return N([245]);case s.null:return N([246]);case s.bytes:return e.value.length?void 0:N([64]);case s.string:return e.value===""?N([96]):void 0;case s.array:return e.value===0?N([128]):void 0;case s.map:return e.value===0?N([160]):void 0;case s.uint:return e.value<24?N([Number(e.value)]):void 0;case s.negint:if(e.value>=-24)return N([31-Number(e.value)])}}const ft={float64:!1,mapSorter:ht,quickEncodeToken:ut};function dt(){const e=[];return e[s.uint.major]=V,e[s.negint.major]=we,e[s.bytes.major]=te,e[s.string.major]=Mn,e[s.array.major]=pe,e[s.map.major]=ge,e[s.tag.major]=me,e[s.float.major]=Ee,e}const Pe=dt(),_e=new Oe;class oe{constructor(n,t){this.obj=n,this.parent=t}includes(n){let t=this;do if(t.obj===n)return!0;while(t=t.parent);return!1}static createCheck(n,t){if(n&&n.includes(t))throw new Error(`${De} object contains circular references`);return new oe(t,n)}}const $={null:new u(s.null,null),undefined:new u(s.undefined,void 0),true:new u(s.true,!0),false:new u(s.false,!1),emptyArray:new u(s.array,0),emptyMap:new u(s.map,0)},z={number(e,n,t,r){return!Number.isInteger(e)||!Number.isSafeInteger(e)?new u(s.float,e):e>=0?new u(s.uint,e):new u(s.negint,e)},bigint(e,n,t,r){return e>=BigInt(0)?new u(s.uint,e):new u(s.negint,e)},Uint8Array(e,n,t,r){return new u(s.bytes,e)},string(e,n,t,r){return new u(s.string,e)},boolean(e,n,t,r){return e?$.true:$.false},null(e,n,t,r){return $.null},undefined(e,n,t,r){return $.undefined},ArrayBuffer(e,n,t,r){return new u(s.bytes,new Uint8Array(e))},DataView(e,n,t,r){return new u(s.bytes,new Uint8Array(e.buffer,e.byteOffset,e.byteLength))},Array(e,n,t,r){if(!e.length)return t.addBreakTokens===!0?[$.emptyArray,new u(s.break)]:$.emptyArray;r=oe.createCheck(r,e);const o=[];let i=0;for(const a of e)o[i++]=ie(a,t,r);return t.addBreakTokens?[new u(s.array,e.length),o,new u(s.break)]:[new u(s.array,e.length),o]},Object(e,n,t,r){const o=n!=="Object",i=o?e.keys():Object.keys(e),a=o?e.size:i.length;if(!a)return t.addBreakTokens===!0?[$.emptyMap,new u(s.break)]:$.emptyMap;r=oe.createCheck(r,e);const f=[];let h=0;for(const m of i)f[h++]=[ie(m,t,r),ie(o?e.get(m):e[m],t,r)];return lt(f,t),t.addBreakTokens?[new u(s.map,a),f,new u(s.break)]:[new u(s.map,a),f]}};z.Map=z.Object,z.Buffer=z.Uint8Array;for(const e of"Uint8Clamped Uint16 Uint32 Int8 Int16 Int32 BigUint64 BigInt64 Float32 Float64".split(" "))z[`${e}Array`]=z.DataView;function ie(e,n={},t){const r=rn(e),o=n&&n.typeEncoders&&n.typeEncoders[r]||z[r];if(typeof o=="function"){const a=o(e,r,n,t);if(a!=null)return a}const i=z[r];if(!i)throw new Error(`${De} unsupported type: ${r}`);return i(e,r,n,t)}function lt(e,n){n.mapSorter&&e.sort(n.mapSorter)}function ht(e,n){const t=Array.isArray(e[0])?e[0][0]:e[0],r=Array.isArray(n[0])?n[0][0]:n[0];if(t.type!==r.type)return t.type.compare(r.type);const o=t.type.major,i=Pe[o].compareTokens(t,r);return i===0&&console.warn("WARNING: complex key types used, CBOR key sorting guarantees are gone"),i}function qe(e,n,t,r){if(Array.isArray(n))for(const o of n)qe(e,o,t,r);else t[n.type.major](e,n,r)}function yt(e,n,t){const r=ie(e,t);if(!Array.isArray(r)&&t.quickEncodeToken){const o=t.quickEncodeToken(r);if(o)return o;const i=n[r.type.major];if(i.encodedSize){const a=i.encodedSize(r,t),f=new Oe(a);if(i(f,r,t),f.chunks.length!==1)throw new Error(`Unexpected error: pre-calculated length for ${r} was wrong`);return Ce(f.chunks[0])}}return _e.reset(),qe(_e,r,n,t),_e.toBytes(!0)}function wt(e,n){return n=Object.assign({},ft,n),yt(e,Pe,n)}const pt={strict:!1,allowIndefinite:!0,allowUndefined:!0,allowBigInt:!0};class gt{constructor(n,t={}){this.pos=0,this.data=n,this.options=t}done(){return this.pos>=this.data.length}next(){const n=this.data[this.pos];let t=x[n];if(t===void 0){const r=c[n];if(!r)throw new Error(`${d} no decoder for major type ${n>>>5} (byte 0x${n.toString(16).padStart(2,"0")})`);const o=n&31;t=r(this.data,this.pos,o,this.options)}return this.pos+=t.encodedLength,t}}const X=Symbol.for("DONE"),se=Symbol.for("BREAK");function mt(e,n,t){const r=[];for(let o=0;o<e.value;o++){const i=Z(n,t);if(i===se){if(e.value===1/0)break;throw new Error(`${d} got unexpected break to lengthed array`)}if(i===X)throw new Error(`${d} found array but not enough entries (got ${o}, expected ${e.value})`);r[o]=i}return r}function bt(e,n,t){const r=t.useMaps===!0,o=r?void 0:{},i=r?new Map:void 0;for(let a=0;a<e.value;a++){const f=Z(n,t);if(f===se){if(e.value===1/0)break;throw new Error(`${d} got unexpected break to lengthed map`)}if(f===X)throw new Error(`${d} found map but not enough entries (got ${a} [no key], expected ${e.value})`);if(r!==!0&&typeof f!="string")throw new Error(`${d} non-string keys not supported (got ${typeof f})`);if(t.rejectDuplicateMapKeys===!0&&(r&&i.has(f)||!r&&f in o))throw new Error(`${d} found repeat map key "${f}"`);const h=Z(n,t);if(h===X)throw new Error(`${d} found map but not enough entries (got ${a} [no value], expected ${e.value})`);r?i.set(f,h):o[f]=h}return r?i:o}function Z(e,n){if(e.done())return X;const t=e.next();if(t.type===s.break)return se;if(t.type.terminal)return t.value;if(t.type===s.array)return mt(t,e,n);if(t.type===s.map)return bt(t,e,n);if(t.type===s.tag){if(n.tags&&typeof n.tags[t.value]=="function"){const r=Z(e,n);return n.tags[t.value](r)}throw new Error(`${d} tag not supported (${t.value})`)}throw new Error("unsupported")}function Et(e,n){if(!(e instanceof Uint8Array))throw new Error(`${d} data to decode must be a Uint8Array`);n=Object.assign({},pt,n);const t=n.tokenizer||new gt(e,n),r=Z(t,n);if(r===X)throw new Error(`${d} did not find any content to decode`);if(r===se)throw new Error(`${d} got unexpected break`);if(!t.done())throw new Error(`${d} too many terminals, data makes no sense`);return r}var vt=Je,Ge=128,At=127,_t=~At,kt=Math.pow(2,31);function Je(e,n,t){n=n||[],t=t||0;for(var r=t;e>=kt;)n[t++]=e&255|Ge,e/=128;for(;e&_t;)n[t++]=e&255|Ge,e>>>=7;return n[t]=e|0,Je.bytes=t-r+1,n}var St=ke,xt=128,Ke=127;function ke(e,r){var t=0,r=r||0,o=0,i=r,a,f=e.length;do{if(i>=f)throw ke.bytes=0,new RangeError("Could not decode varint");a=e[i++],t+=o<28?(a&Ke)<<o:(a&Ke)*Math.pow(2,o),o+=7}while(a>=xt);return ke.bytes=i-r,t}var Bt=Math.pow(2,7),Ut=Math.pow(2,14),Tt=Math.pow(2,21),Nt=Math.pow(2,28),It=Math.pow(2,35),Ct=Math.pow(2,42),$t=Math.pow(2,49),zt=Math.pow(2,56),Mt=Math.pow(2,63),Ot=function(e){return e<Bt?1:e<Ut?2:e<Tt?3:e<Nt?4:e<It?5:e<Ct?6:e<$t?7:e<zt?8:e<Mt?9:10},Dt={encode:vt,decode:St,encodingLength:Ot},Ft=Dt,ce=Ft;const Se=(e,n=0)=>[ce.decode(e,n),ce.decode.bytes],ae=(e,n,t=0)=>(ce.encode(e,n,t),n),ue=e=>ce.encodingLength(e),Rt=new Uint8Array(0),br=e=>e.reduce((n,t)=>n+t.toString(16).padStart(2,"0"),""),Er=e=>{const n=e.match(/../g);return n?new Uint8Array(n.map(t=>parseInt(t,16))):Rt},Lt=(e,n)=>{if(e===n)return!0;if(e.byteLength!==n.byteLength)return!1;for(let t=0;t<e.byteLength;t++)if(e[t]!==n[t])return!1;return!0},xe=e=>{if(e instanceof Uint8Array&&e.constructor.name==="Uint8Array")return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")},vr=e=>e instanceof ArrayBuffer||ArrayBuffer.isView(e),Ar=e=>new TextEncoder().encode(e),_r=e=>new TextDecoder().decode(e),Vt=(e,n)=>{const t=n.byteLength,r=ue(e),o=r+ue(t),i=new Uint8Array(o+t);return ae(e,i,0),ae(t,i,r),i.set(n,o),new Be(e,t,n,i)},jt=e=>{const n=xe(e),[t,r]=Se(n),[o,i]=Se(n.subarray(r)),a=n.subarray(r+i);if(a.byteLength!==o)throw new Error("Incorrect length");return new Be(t,o,a,n)},Pt=(e,n)=>{if(e===n)return!0;{const t=n;return e.code===t.code&&e.size===t.size&&t.bytes instanceof Uint8Array&&Lt(e.bytes,t.bytes)}};class Be{constructor(n,t,r,o){this.code=n,this.size=t,this.digest=r,this.bytes=o}}function qt(e,n){if(e.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),r=0;r<t.length;r++)t[r]=255;for(var o=0;o<e.length;o++){var i=e.charAt(o),a=i.charCodeAt(0);if(t[a]!==255)throw new TypeError(i+" is ambiguous");t[a]=o}var f=e.length,h=e.charAt(0),m=Math.log(f)/Math.log(256),y=Math.log(256)/Math.log(f);function K(w){if(w instanceof Uint8Array||(ArrayBuffer.isView(w)?w=new Uint8Array(w.buffer,w.byteOffset,w.byteLength):Array.isArray(w)&&(w=Uint8Array.from(w))),!(w instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(w.length===0)return"";for(var b=0,j=0,k=0,B=w.length;k!==B&&w[k]===0;)k++,b++;for(var U=(B-k)*y+1>>>0,A=new Uint8Array(U);k!==B;){for(var T=w[k],O=0,S=U-1;(T!==0||O<j)&&S!==-1;S--,O++)T+=256*A[S]>>>0,A[S]=T%f>>>0,T=T/f>>>0;if(T!==0)throw new Error("Non-zero carry");j=O,k++}for(var C=U-j;C!==U&&A[C]===0;)C++;for(var le=h.repeat(b);C<U;++C)le+=e.charAt(A[C]);return le}function de(w){if(typeof w!="string")throw new TypeError("Expected String");if(w.length===0)return new Uint8Array;var b=0;if(w[b]!==" "){for(var j=0,k=0;w[b]===h;)j++,b++;for(var B=(w.length-b)*m+1>>>0,U=new Uint8Array(B);w[b];){var A=t[w.charCodeAt(b)];if(A===255)return;for(var T=0,O=B-1;(A!==0||T<k)&&O!==-1;O--,T++)A+=f*U[O]>>>0,U[O]=A%256>>>0,A=A/256>>>0;if(A!==0)throw new Error("Non-zero carry");k=T,b++}if(w[b]!==" "){for(var S=B-k;S!==B&&U[S]===0;)S++;for(var C=new Uint8Array(j+(B-S)),le=j;S!==B;)C[le++]=U[S++];return C}}}function yr(w){var b=de(w);if(b)return b;throw new Error(`Non-${n} character`)}return{encode:K,decodeUnsafe:de,decode:yr}}var Gt=qt,Jt=Gt,Kt=Jt;class Ht{constructor(n,t,r){this.name=n,this.prefix=t,this.baseEncode=r}encode(n){if(n instanceof Uint8Array)return`${this.prefix}${this.baseEncode(n)}`;throw Error("Unknown type, must be binary type")}}class Qt{constructor(n,t,r){if(this.name=n,this.prefix=t,t.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=r}decode(n){if(typeof n=="string"){if(n.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(n)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(n.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(n){return He(this,n)}}class Wt{constructor(n){this.decoders=n}or(n){return He(this,n)}decode(n){const t=n[0],r=this.decoders[t];if(r)return r.decode(n);throw RangeError(`Unable to decode multibase string ${JSON.stringify(n)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const He=(e,n)=>new Wt({...e.decoders||{[e.prefix]:e},...n.decoders||{[n.prefix]:n}});class Xt{constructor(n,t,r,o){this.name=n,this.prefix=t,this.baseEncode=r,this.baseDecode=o,this.encoder=new Ht(n,t,r),this.decoder=new Qt(n,t,o)}encode(n){return this.encoder.encode(n)}decode(n){return this.decoder.decode(n)}}const Qe=({name:e,prefix:n,encode:t,decode:r})=>new Xt(e,n,t,r),We=({prefix:e,name:n,alphabet:t})=>{const{encode:r,decode:o}=Kt(t,n);return Qe({prefix:e,name:n,encode:r,decode:i=>xe(o(i))})},Zt=(e,n,t,r)=>{const o={};for(let y=0;y<n.length;++y)o[n[y]]=y;let i=e.length;for(;e[i-1]==="=";)--i;const a=new Uint8Array(i*t/8|0);let f=0,h=0,m=0;for(let y=0;y<i;++y){const K=o[e[y]];if(K===void 0)throw new SyntaxError(`Non-${r} character`);h=h<<t|K,f+=t,f>=8&&(f-=8,a[m++]=255&h>>f)}if(f>=t||255&h<<8-f)throw new SyntaxError("Unexpected end of data");return a},Yt=(e,n,t)=>{const r=n[n.length-1]==="=",o=(1<<t)-1;let i="",a=0,f=0;for(let h=0;h<e.length;++h)for(f=f<<8|e[h],a+=8;a>t;)a-=t,i+=n[o&f>>a];if(a&&(i+=n[o&f<<t-a]),r)for(;i.length*t&7;)i+="=";return i},I=({name:e,prefix:n,bitsPerChar:t,alphabet:r})=>Qe({prefix:n,name:e,encode(o){return Yt(o,r,t)},decode(o){return Zt(o,r,t,e)}}),M=We({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),kr=We({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),fe=I({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),Sr=I({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),xr=I({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),Br=I({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),Ur=I({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),Tr=I({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),Nr=I({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),Ir=I({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),Cr=I({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),Ue=(e,n)=>{const{bytes:t,version:r}=e;switch(r){case 0:return nr(t,Te(e),n||M.encoder);default:return tr(t,Te(e),n||fe.encoder)}},$r=e=>({"/":Ue(e)}),zr=e=>p.parse(e["/"]),Xe=new WeakMap,Te=e=>{const n=Xe.get(e);if(n==null){const t=new Map;return Xe.set(e,t),t}return n};class p{constructor(n,t,r,o){this.code=t,this.version=n,this.multihash=r,this.bytes=o,this["/"]=o}get asCID(){return this}get byteOffset(){return this.bytes.byteOffset}get byteLength(){return this.bytes.byteLength}toV0(){switch(this.version){case 0:return this;case 1:{const{code:n,multihash:t}=this;if(n!==Y)throw new Error("Cannot convert a non dag-pb CID to CIDv0");if(t.code!==rr)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");return p.createV0(t)}default:throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`)}}toV1(){switch(this.version){case 0:{const{code:n,digest:t}=this.multihash,r=Vt(n,t);return p.createV1(this.code,r)}case 1:return this;default:throw Error(`Can not convert CID version ${this.version} to version 1. This is a bug please report`)}}equals(n){return p.equals(this,n)}static equals(n,t){const r=t;return r&&n.code===r.code&&n.version===r.version&&Pt(n.multihash,r.multihash)}toString(n){return Ue(this,n)}toJSON(){return{"/":Ue(this)}}link(){return this}get[Symbol.toStringTag](){return"CID"}[Symbol.for("nodejs.util.inspect.custom")](){return`CID(${this.toString()})`}static asCID(n){if(n==null)return null;const t=n;if(t instanceof p)return t;if(t["/"]!=null&&t["/"]===t.bytes||t.asCID===t){const{version:r,code:o,multihash:i,bytes:a}=t;return new p(r,o,i,a||Ze(r,o,i.bytes))}else if(t[or]===!0){const{version:r,multihash:o,code:i}=t,a=jt(o);return p.create(r,i,a)}else return null}static create(n,t,r){if(typeof t!="number")throw new Error("String codecs are no longer supported");if(!(r.bytes instanceof Uint8Array))throw new Error("Invalid digest");switch(n){case 0:{if(t!==Y)throw new Error(`Version 0 CID must use dag-pb (code: ${Y}) block encoding`);return new p(n,t,r,r.bytes)}case 1:{const o=Ze(n,t,r.bytes);return new p(n,t,r,o)}default:throw new Error("Invalid version")}}static createV0(n){return p.create(0,Y,n)}static createV1(n,t){return p.create(1,n,t)}static decode(n){const[t,r]=p.decodeFirst(n);if(r.length)throw new Error("Incorrect length");return t}static decodeFirst(n){const t=p.inspectBytes(n),r=t.size-t.multihashSize,o=xe(n.subarray(r,r+t.multihashSize));if(o.byteLength!==t.multihashSize)throw new Error("Incorrect length");const i=o.subarray(t.multihashSize-t.digestSize),a=new Be(t.multihashCode,t.digestSize,i,o);return[t.version===0?p.createV0(a):p.createV1(t.codec,a),n.subarray(t.size)]}static inspectBytes(n){let t=0;const r=()=>{const[K,de]=Se(n.subarray(t));return t+=de,K};let o=r(),i=Y;if(o===18?(o=0,t=0):i=r(),o!==0&&o!==1)throw new RangeError(`Invalid CID version ${o}`);const a=t,f=r(),h=r(),m=t+h,y=m-a;return{version:o,codec:i,multihashCode:f,digestSize:h,multihashSize:y,size:m}}static parse(n,t){const[r,o]=er(n,t),i=p.decode(o);if(i.version===0&&n[0]!=="Q")throw Error("Version 0 CID string must not include multibase prefix");return Te(i).set(r,n),i}}const er=(e,n)=>{switch(e[0]){case"Q":{const t=n||M;return[M.prefix,t.decode(`${M.prefix}${e}`)]}case M.prefix:{const t=n||M;return[M.prefix,t.decode(e)]}case fe.prefix:{const t=n||fe;return[fe.prefix,t.decode(e)]}default:{if(n==null)throw Error("To parse non base32 or base58btc encoded CID multibase decoder must be provided");return[e[0],n.decode(e)]}}},nr=(e,n,t)=>{const{prefix:r}=t;if(r!==M.prefix)throw Error(`Cannot string encode V0 in ${t.name} encoding`);const o=n.get(r);if(o==null){const i=t.encode(e).slice(1);return n.set(r,i),i}else return o},tr=(e,n,t)=>{const{prefix:r}=t,o=n.get(r);if(o==null){const i=t.encode(e);return n.set(r,i),i}else return o},Y=112,rr=18,Ze=(e,n,t)=>{const r=ue(e),o=r+ue(n),i=new Uint8Array(o+t.byteLength);return ae(e,i,0),ae(n,i,r),i.set(t,o),i},or=Symbol.for("@ipld/js-cid/CID"),Ye=42;function ir(e){if(e.asCID!==e&&e["/"]!==e.bytes)return null;const n=p.asCID(e);if(!n)return null;const t=new Uint8Array(n.bytes.byteLength+1);return t.set(n.bytes,1),[new u(s.tag,Ye),new u(s.bytes,t)]}function sr(){throw new Error("`undefined` is not supported by the IPLD Data Model and cannot be encoded")}function cr(e){if(Number.isNaN(e))throw new Error("`NaN` is not supported by the IPLD Data Model and cannot be encoded");if(e===1/0||e===-1/0)throw new Error("`Infinity` and `-Infinity` is not supported by the IPLD Data Model and cannot be encoded");return null}const ar={float64:!0,typeEncoders:{Object:ir,undefined:sr,number:cr}};function ur(e){if(e[0]!==0)throw new Error("Invalid CID for CBOR tag 42; expected leading 0x00");return p.decode(e.subarray(1))}const en={allowIndefinite:!1,coerceUndefinedToNull:!0,allowNaN:!1,allowInfinity:!1,allowBigInt:!0,strict:!0,useMaps:!1,rejectDuplicateMapKeys:!0,tags:[]};en.tags[Ye]=ur;const fr="dag-cbor",dr=113,lr=e=>wt(e,ar),hr=e=>Et(e,en)}}]);