@ethersphere/bee-js 3.2.0 → 3.3.2-pre.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 (193) hide show
  1. package/dist/cjs/bee-debug.js +615 -0
  2. package/dist/cjs/bee.js +922 -0
  3. package/dist/cjs/chunk/bmt.js +55 -0
  4. package/dist/cjs/chunk/cac.js +56 -0
  5. package/dist/cjs/chunk/serialize.js +19 -0
  6. package/dist/cjs/chunk/signer.js +137 -0
  7. package/dist/cjs/chunk/soc.js +172 -0
  8. package/dist/cjs/chunk/span.js +29 -0
  9. package/dist/cjs/feed/index.js +184 -0
  10. package/dist/cjs/feed/json.js +41 -0
  11. package/dist/cjs/feed/topic.js +25 -0
  12. package/dist/cjs/feed/type.js +15 -0
  13. package/dist/cjs/index.js +35 -0
  14. package/dist/cjs/modules/bytes.js +74 -0
  15. package/dist/cjs/modules/bzz.js +131 -0
  16. package/dist/cjs/modules/chunk.js +58 -0
  17. package/dist/cjs/modules/debug/balance.js +77 -0
  18. package/dist/cjs/modules/debug/chequebook.js +167 -0
  19. package/dist/cjs/modules/debug/chunk.js +51 -0
  20. package/dist/cjs/modules/debug/connectivity.js +75 -0
  21. package/dist/cjs/modules/debug/settlements.js +45 -0
  22. package/dist/cjs/modules/debug/stamps.js +89 -0
  23. package/dist/cjs/modules/debug/states.js +47 -0
  24. package/dist/cjs/modules/debug/status.js +153 -0
  25. package/dist/cjs/modules/debug/tag.js +30 -0
  26. package/dist/cjs/modules/debug/transactions.js +81 -0
  27. package/dist/cjs/modules/feed.js +76 -0
  28. package/dist/cjs/modules/pinning.js +84 -0
  29. package/dist/cjs/modules/pss.js +55 -0
  30. package/dist/cjs/modules/soc.js +40 -0
  31. package/dist/cjs/modules/status.js +26 -0
  32. package/dist/cjs/modules/stewardship.js +41 -0
  33. package/dist/cjs/modules/tag.js +96 -0
  34. package/dist/cjs/package.json +8 -0
  35. package/dist/cjs/types/debug.js +9 -0
  36. package/dist/cjs/types/index.js +46 -0
  37. package/dist/cjs/types/ky-options.js +8 -0
  38. package/dist/cjs/types/ky-universal/common.js +8 -0
  39. package/dist/cjs/types/ky-universal/hooks.js +8 -0
  40. package/dist/cjs/types/ky-universal/retry.js +8 -0
  41. package/dist/cjs/utils/bytes.js +107 -0
  42. package/dist/cjs/utils/collection.browser.js +36 -0
  43. package/dist/cjs/utils/collection.js +70 -0
  44. package/dist/cjs/utils/collection.node.js +115 -0
  45. package/dist/cjs/utils/data.browser.js +78 -0
  46. package/dist/cjs/utils/data.js +60 -0
  47. package/dist/cjs/utils/error.js +50 -0
  48. package/dist/cjs/utils/eth.js +211 -0
  49. package/dist/cjs/utils/expose.js +44 -0
  50. package/dist/cjs/utils/file.js +49 -0
  51. package/dist/cjs/utils/hash.js +21 -0
  52. package/dist/cjs/utils/headers.js +59 -0
  53. package/dist/cjs/utils/hex.js +150 -0
  54. package/dist/cjs/utils/http.js +166 -0
  55. package/dist/cjs/utils/merge.js +34 -0
  56. package/dist/cjs/utils/pss.js +18 -0
  57. package/dist/cjs/utils/stamps.js +17 -0
  58. package/dist/cjs/utils/stream.js +146 -0
  59. package/dist/cjs/utils/tar.js +25 -0
  60. package/dist/cjs/utils/type.js +327 -0
  61. package/dist/cjs/utils/uint64.js +29 -0
  62. package/dist/cjs/utils/url.js +56 -0
  63. package/dist/index.browser.min.js +1 -1
  64. package/dist/index.browser.min.js.LICENSE.txt +12 -11
  65. package/dist/index.browser.min.js.map +1 -1
  66. package/dist/mjs/bee-debug.js +609 -0
  67. package/dist/mjs/bee.js +944 -0
  68. package/dist/mjs/chunk/bmt.js +56 -0
  69. package/dist/mjs/chunk/cac.js +52 -0
  70. package/dist/mjs/chunk/serialize.js +15 -0
  71. package/dist/mjs/chunk/signer.js +131 -0
  72. package/dist/mjs/chunk/soc.js +139 -0
  73. package/dist/mjs/chunk/span.js +28 -0
  74. package/dist/mjs/feed/index.js +145 -0
  75. package/dist/mjs/feed/json.js +27 -0
  76. package/dist/mjs/feed/topic.js +21 -0
  77. package/dist/mjs/feed/type.js +10 -0
  78. package/dist/mjs/index.js +7 -0
  79. package/dist/mjs/modules/bytes.js +59 -0
  80. package/dist/mjs/modules/bzz.js +122 -0
  81. package/dist/mjs/modules/chunk.js +45 -0
  82. package/dist/mjs/modules/debug/balance.js +57 -0
  83. package/dist/mjs/modules/debug/chequebook.js +150 -0
  84. package/dist/mjs/modules/debug/chunk.js +35 -0
  85. package/dist/mjs/modules/debug/connectivity.js +45 -0
  86. package/dist/mjs/modules/debug/settlements.js +29 -0
  87. package/dist/mjs/modules/debug/stamps.js +64 -0
  88. package/dist/mjs/modules/debug/states.js +31 -0
  89. package/dist/mjs/modules/debug/status.js +134 -0
  90. package/dist/mjs/modules/debug/tag.js +16 -0
  91. package/dist/mjs/modules/debug/transactions.js +63 -0
  92. package/dist/mjs/modules/feed.js +67 -0
  93. package/dist/mjs/modules/pinning.js +66 -0
  94. package/dist/mjs/modules/pss.js +40 -0
  95. package/dist/mjs/modules/soc.js +31 -0
  96. package/dist/mjs/modules/status.js +12 -0
  97. package/dist/mjs/modules/stewardship.js +24 -0
  98. package/dist/mjs/modules/tag.js +77 -0
  99. package/dist/mjs/package.json +8 -0
  100. package/dist/mjs/types/debug.js +7 -0
  101. package/dist/mjs/types/index.js +37 -0
  102. package/dist/mjs/types/ky-options.js +7 -0
  103. package/dist/mjs/types/ky-universal/common.js +7 -0
  104. package/dist/mjs/types/ky-universal/hooks.js +7 -0
  105. package/dist/mjs/types/ky-universal/retry.js +7 -0
  106. package/dist/mjs/utils/bytes.js +101 -0
  107. package/dist/mjs/utils/collection.browser.js +19 -0
  108. package/dist/mjs/utils/collection.js +64 -0
  109. package/dist/mjs/utils/collection.node.js +74 -0
  110. package/dist/mjs/utils/data.browser.js +73 -0
  111. package/dist/mjs/utils/data.js +43 -0
  112. package/dist/mjs/utils/error.js +56 -0
  113. package/dist/mjs/utils/eth.js +199 -0
  114. package/dist/mjs/utils/expose.js +9 -0
  115. package/dist/mjs/utils/file.js +36 -0
  116. package/dist/mjs/utils/hash.js +17 -0
  117. package/dist/mjs/utils/headers.js +58 -0
  118. package/dist/mjs/utils/hex.js +154 -0
  119. package/dist/mjs/utils/http.js +155 -0
  120. package/dist/mjs/utils/merge.js +36 -0
  121. package/dist/mjs/utils/pss.js +16 -0
  122. package/dist/mjs/utils/stamps.js +17 -0
  123. package/dist/mjs/utils/stream.js +156 -0
  124. package/dist/mjs/utils/tar.js +21 -0
  125. package/dist/mjs/utils/type.js +336 -0
  126. package/dist/mjs/utils/uint64.js +23 -0
  127. package/dist/mjs/utils/url.js +57 -0
  128. package/dist/{src → types}/bee-debug.d.ts +47 -1
  129. package/dist/{src → types}/bee.d.ts +0 -0
  130. package/dist/{src → types}/chunk/bmt.d.ts +0 -0
  131. package/dist/{src → types}/chunk/cac.d.ts +0 -0
  132. package/dist/{src → types}/chunk/serialize.d.ts +0 -0
  133. package/dist/{src → types}/chunk/signer.d.ts +0 -0
  134. package/dist/{src → types}/chunk/soc.d.ts +0 -0
  135. package/dist/{src → types}/chunk/span.d.ts +0 -0
  136. package/dist/{src → types}/feed/index.d.ts +0 -0
  137. package/dist/{src → types}/feed/json.d.ts +0 -0
  138. package/dist/{src → types}/feed/topic.d.ts +0 -0
  139. package/dist/{src → types}/feed/type.d.ts +0 -0
  140. package/dist/{src → types}/index.d.ts +0 -0
  141. package/dist/{src → types}/modules/bytes.d.ts +0 -0
  142. package/dist/{src → types}/modules/bzz.d.ts +0 -0
  143. package/dist/{src → types}/modules/chunk.d.ts +0 -0
  144. package/dist/{src → types}/modules/debug/balance.d.ts +0 -0
  145. package/dist/{src → types}/modules/debug/chequebook.d.ts +0 -0
  146. package/dist/{src → types}/modules/debug/chunk.d.ts +0 -0
  147. package/dist/{src → types}/modules/debug/connectivity.d.ts +0 -0
  148. package/dist/{src → types}/modules/debug/settlements.d.ts +0 -0
  149. package/dist/{src → types}/modules/debug/stamps.d.ts +0 -0
  150. package/dist/{src → types}/modules/debug/states.d.ts +0 -0
  151. package/dist/types/modules/debug/status.d.ts +72 -0
  152. package/dist/{src → types}/modules/debug/tag.d.ts +0 -0
  153. package/dist/{src → types}/modules/debug/transactions.d.ts +0 -0
  154. package/dist/{src → types}/modules/feed.d.ts +0 -0
  155. package/dist/{src → types}/modules/pinning.d.ts +0 -0
  156. package/dist/{src → types}/modules/pss.d.ts +0 -0
  157. package/dist/{src → types}/modules/soc.d.ts +0 -0
  158. package/dist/{src → types}/modules/status.d.ts +0 -0
  159. package/dist/{src → types}/modules/stewardship.d.ts +0 -0
  160. package/dist/{src → types}/modules/tag.d.ts +0 -0
  161. package/dist/{src → types}/types/debug.d.ts +8 -0
  162. package/dist/{src → types}/types/index.d.ts +3 -2
  163. package/dist/types/types/ky-options.d.ts +221 -0
  164. package/dist/types/types/ky-universal/common.d.ts +13 -0
  165. package/dist/types/types/ky-universal/hooks.d.ts +92 -0
  166. package/dist/types/types/ky-universal/retry.d.ts +38 -0
  167. package/dist/{src → types}/utils/bytes.d.ts +0 -0
  168. package/dist/types/utils/collection.browser.d.ts +15 -0
  169. package/dist/{src → types}/utils/collection.d.ts +0 -14
  170. package/dist/types/utils/collection.node.d.ts +15 -0
  171. package/dist/{src → types}/utils/data.browser.d.ts +0 -0
  172. package/dist/{src → types}/utils/data.d.ts +0 -0
  173. package/dist/{src → types}/utils/error.d.ts +0 -0
  174. package/dist/{src → types}/utils/eth.d.ts +0 -0
  175. package/dist/{src → types}/utils/expose.d.ts +2 -1
  176. package/dist/{src → types}/utils/file.d.ts +0 -0
  177. package/dist/{src → types}/utils/hash.d.ts +0 -0
  178. package/dist/{src → types}/utils/headers.d.ts +0 -0
  179. package/dist/{src → types}/utils/hex.d.ts +0 -0
  180. package/dist/{src → types}/utils/http.d.ts +0 -0
  181. package/dist/{src → types}/utils/merge.d.ts +0 -0
  182. package/dist/{src → types}/utils/pss.d.ts +0 -0
  183. package/dist/{src → types}/utils/stamps.d.ts +0 -0
  184. package/dist/{src → types}/utils/stream.d.ts +11 -8
  185. package/dist/{src → types}/utils/tar.d.ts +0 -0
  186. package/dist/{src → types}/utils/type.d.ts +0 -0
  187. package/dist/{src → types}/utils/uint64.d.ts +0 -0
  188. package/dist/{src → types}/utils/url.d.ts +0 -0
  189. package/package.json +55 -36
  190. package/dist/index.min.js +0 -3
  191. package/dist/index.min.js.LICENSE.txt +0 -50
  192. package/dist/index.min.js.map +0 -1
  193. package/dist/src/modules/debug/status.d.ts +0 -24
package/dist/index.min.js DELETED
@@ -1,3 +0,0 @@
1
- /*! For license information please see index.min.js.LICENSE.txt */
2
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.BeeJs=t():e.BeeJs=t()}(this,(function(){return(()=>{var e={6123:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5397);class i extends n.EventTarget{constructor(){throw super(),new TypeError("AbortSignal cannot be constructed directly")}get aborted(){const e=o.get(this);if("boolean"!=typeof e)throw new TypeError("Expected 'this' to be an 'AbortSignal' object, but got "+(null===this?"null":typeof this));return e}}n.defineEventAttribute(i.prototype,"abort");const o=new WeakMap;Object.defineProperties(i.prototype,{aborted:{enumerable:!0}}),"function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag&&Object.defineProperty(i.prototype,Symbol.toStringTag,{configurable:!0,value:"AbortSignal"});class a{constructor(){s.set(this,function(){const e=Object.create(i.prototype);return n.EventTarget.call(e),o.set(e,!1),e}())}get signal(){return u(this)}abort(){var e;e=u(this),!1===o.get(e)&&(o.set(e,!0),e.dispatchEvent({type:"abort"}))}}const s=new WeakMap;function u(e){const t=s.get(e);if(null==t)throw new TypeError("Expected 'this' to be an 'AbortController' object, but got "+(null===e?"null":typeof e));return t}Object.defineProperties(a.prototype,{signal:{enumerable:!0},abort:{enumerable:!0}}),"function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag&&Object.defineProperty(a.prototype,Symbol.toStringTag,{configurable:!0,value:"AbortController"}),t.AbortController=a,t.AbortSignal=i,t.default=a,e.exports=a,e.exports.AbortController=e.exports.default=a,e.exports.AbortSignal=i},9919:function(e,t,r){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var a;"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{a="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(4300).Buffer}catch(R){}function s(e,t){var r=e.charCodeAt(t);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function u(e,t,r){var n=s(e,r);return r-1>=t&&(n|=s(e,r-1)<<4),n}function c(e,t,r,n){for(var i=0,o=Math.min(e.length,r),a=t;a<o;a++){var s=e.charCodeAt(a)-48;i*=n,i+=s>=49?s-49+10:s>=17?s-17+10:s}return i}o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,r):(this._parseBase(e,t,i),"le"===r&&this._initArray(this.toArray(),t,r)))},o.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,a,s=0;if("be"===r)for(i=e.length-1,o=0;i>=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i<e.length;i+=3)a=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,o=0,a=0;if("be"===r)for(n=e.length-1;n>=t;n-=2)i=u(e,t,n)<<o,this.words[a]|=67108863&i,o>=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(n=(e.length-t)%2==0?t+1:t;n<e.length;n+=2)i=u(e,t,n)<<o,this.words[a]|=67108863&i,o>=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this.strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,a=o%n,s=Math.min(o,o-a)+r,u=0,f=r;f<s;f+=n)u=c(e,f,f+n,t),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==a){var d=1;for(u=c(e,f,e.length,t),f=0;f<a;f++)d*=t;this.imuln(d),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},o.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},o.prototype.clone=function(){var e=new o(null);return this.copy(e),e},o.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var f=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var c=1;c<n;c++){for(var f=u>>>26,d=67108863&u,l=Math.min(c,t.length-1),h=Math.max(0,c-e.length+1);h<=l;h++){var p=c-h|0;f+=(a=(i=0|e.words[p])*(o=0|t.words[h])+d)/67108864|0,d=67108863&a}r.words[c]=0|d,u=0|f}return 0!==u?r.words[c]=0|u:r.length--,r.strip()}o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,a=0;a<this.length;a++){var s=this.words[a],u=(16777215&(s<<i|o)).toString(16);r=0!==(o=s>>>24-i&16777215)||a!==this.length-1?f[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var c=d[e],h=l[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var b=p.modn(h).toString(e);r=(p=p.idivn(h)).isZero()?b+r:f[c-b.length]+b+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return n(void 0!==a),this.toArrayLike(a,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var a,s,u="le"===t,c=new e(o),f=this.clone();if(u){for(s=0;!f.isZero();s++)a=f.andln(255),f.iushrn(8),c[s]=a;for(;s<o;s++)c[s]=0}else{for(s=0;s<o-i;s++)c[s]=0;for(s=0;!f.isZero();s++)a=f.andln(255),f.iushrn(8),c[o-s-1]=a}return c},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},o.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},o.prototype.ior=function(e){return n(0==(this.negative|e.negative)),this.iuor(e)},o.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this.strip()},o.prototype.iand=function(e){return n(0==(this.negative|e.negative)),this.iuand(e)},o.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this.strip()},o.prototype.ixor=function(e){return n(0==(this.negative|e.negative)),this.iuxor(e)},o.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this.strip()},o.prototype.iadd=function(e){var t,r,n;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o<n.length;o++)t=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&t,i=t>>>26;for(;0!==i&&o<r.length;o++)t=(0|r.words[o])+i,this.words[o]=67108863&t,i=t>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,a=0;a<n.length;a++)o=(t=(0|r.words[a])-(0|n.words[a])+o)>>26,this.words[a]=67108863&t;for(;0!==o&&a<r.length;a++)o=(t=(0|r.words[a])+o)>>26,this.words[a]=67108863&t;if(0===o&&a<r.length&&r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this.length=Math.max(this.length,a),r!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(e){return this.clone().isub(e)};var p=function(e,t,r){var n,i,o,a=e.words,s=t.words,u=r.words,c=0,f=0|a[0],d=8191&f,l=f>>>13,h=0|a[1],p=8191&h,b=h>>>13,y=0|a[2],m=8191&y,g=y>>>13,_=0|a[3],v=8191&_,w=_>>>13,S=0|a[4],E=8191&S,T=S>>>13,R=0|a[5],M=8191&R,P=R>>>13,A=0|a[6],k=8191&A,O=A>>>13,x=0|a[7],C=8191&x,j=x>>>13,B=0|a[8],q=8191&B,I=B>>>13,N=0|a[9],L=8191&N,z=N>>>13,D=0|s[0],F=8191&D,W=D>>>13,H=0|s[1],U=8191&H,$=H>>>13,G=0|s[2],V=8191&G,K=G>>>13,Y=0|s[3],X=8191&Y,J=Y>>>13,Z=0|s[4],Q=8191&Z,ee=Z>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],ue=8191&se,ce=se>>>13,fe=0|s[8],de=8191&fe,le=fe>>>13,he=0|s[9],pe=8191&he,be=he>>>13;r.negative=e.negative^t.negative,r.length=19;var ye=(c+(n=Math.imul(d,F))|0)+((8191&(i=(i=Math.imul(d,W))+Math.imul(l,F)|0))<<13)|0;c=((o=Math.imul(l,W))+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(p,F),i=(i=Math.imul(p,W))+Math.imul(b,F)|0,o=Math.imul(b,W);var me=(c+(n=n+Math.imul(d,U)|0)|0)+((8191&(i=(i=i+Math.imul(d,$)|0)+Math.imul(l,U)|0))<<13)|0;c=((o=o+Math.imul(l,$)|0)+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(m,F),i=(i=Math.imul(m,W))+Math.imul(g,F)|0,o=Math.imul(g,W),n=n+Math.imul(p,U)|0,i=(i=i+Math.imul(p,$)|0)+Math.imul(b,U)|0,o=o+Math.imul(b,$)|0;var ge=(c+(n=n+Math.imul(d,V)|0)|0)+((8191&(i=(i=i+Math.imul(d,K)|0)+Math.imul(l,V)|0))<<13)|0;c=((o=o+Math.imul(l,K)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(v,F),i=(i=Math.imul(v,W))+Math.imul(w,F)|0,o=Math.imul(w,W),n=n+Math.imul(m,U)|0,i=(i=i+Math.imul(m,$)|0)+Math.imul(g,U)|0,o=o+Math.imul(g,$)|0,n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,K)|0;var _e=(c+(n=n+Math.imul(d,X)|0)|0)+((8191&(i=(i=i+Math.imul(d,J)|0)+Math.imul(l,X)|0))<<13)|0;c=((o=o+Math.imul(l,J)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(E,F),i=(i=Math.imul(E,W))+Math.imul(T,F)|0,o=Math.imul(T,W),n=n+Math.imul(v,U)|0,i=(i=i+Math.imul(v,$)|0)+Math.imul(w,U)|0,o=o+Math.imul(w,$)|0,n=n+Math.imul(m,V)|0,i=(i=i+Math.imul(m,K)|0)+Math.imul(g,V)|0,o=o+Math.imul(g,K)|0,n=n+Math.imul(p,X)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(b,X)|0,o=o+Math.imul(b,J)|0;var ve=(c+(n=n+Math.imul(d,Q)|0)|0)+((8191&(i=(i=i+Math.imul(d,ee)|0)+Math.imul(l,Q)|0))<<13)|0;c=((o=o+Math.imul(l,ee)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(M,F),i=(i=Math.imul(M,W))+Math.imul(P,F)|0,o=Math.imul(P,W),n=n+Math.imul(E,U)|0,i=(i=i+Math.imul(E,$)|0)+Math.imul(T,U)|0,o=o+Math.imul(T,$)|0,n=n+Math.imul(v,V)|0,i=(i=i+Math.imul(v,K)|0)+Math.imul(w,V)|0,o=o+Math.imul(w,K)|0,n=n+Math.imul(m,X)|0,i=(i=i+Math.imul(m,J)|0)+Math.imul(g,X)|0,o=o+Math.imul(g,J)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,ee)|0;var we=(c+(n=n+Math.imul(d,re)|0)|0)+((8191&(i=(i=i+Math.imul(d,ne)|0)+Math.imul(l,re)|0))<<13)|0;c=((o=o+Math.imul(l,ne)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(k,F),i=(i=Math.imul(k,W))+Math.imul(O,F)|0,o=Math.imul(O,W),n=n+Math.imul(M,U)|0,i=(i=i+Math.imul(M,$)|0)+Math.imul(P,U)|0,o=o+Math.imul(P,$)|0,n=n+Math.imul(E,V)|0,i=(i=i+Math.imul(E,K)|0)+Math.imul(T,V)|0,o=o+Math.imul(T,K)|0,n=n+Math.imul(v,X)|0,i=(i=i+Math.imul(v,J)|0)+Math.imul(w,X)|0,o=o+Math.imul(w,J)|0,n=n+Math.imul(m,Q)|0,i=(i=i+Math.imul(m,ee)|0)+Math.imul(g,Q)|0,o=o+Math.imul(g,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(b,re)|0,o=o+Math.imul(b,ne)|0;var Se=(c+(n=n+Math.imul(d,oe)|0)|0)+((8191&(i=(i=i+Math.imul(d,ae)|0)+Math.imul(l,oe)|0))<<13)|0;c=((o=o+Math.imul(l,ae)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(C,F),i=(i=Math.imul(C,W))+Math.imul(j,F)|0,o=Math.imul(j,W),n=n+Math.imul(k,U)|0,i=(i=i+Math.imul(k,$)|0)+Math.imul(O,U)|0,o=o+Math.imul(O,$)|0,n=n+Math.imul(M,V)|0,i=(i=i+Math.imul(M,K)|0)+Math.imul(P,V)|0,o=o+Math.imul(P,K)|0,n=n+Math.imul(E,X)|0,i=(i=i+Math.imul(E,J)|0)+Math.imul(T,X)|0,o=o+Math.imul(T,J)|0,n=n+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,ee)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,ee)|0,n=n+Math.imul(m,re)|0,i=(i=i+Math.imul(m,ne)|0)+Math.imul(g,re)|0,o=o+Math.imul(g,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(b,oe)|0,o=o+Math.imul(b,ae)|0;var Ee=(c+(n=n+Math.imul(d,ue)|0)|0)+((8191&(i=(i=i+Math.imul(d,ce)|0)+Math.imul(l,ue)|0))<<13)|0;c=((o=o+Math.imul(l,ce)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(q,F),i=(i=Math.imul(q,W))+Math.imul(I,F)|0,o=Math.imul(I,W),n=n+Math.imul(C,U)|0,i=(i=i+Math.imul(C,$)|0)+Math.imul(j,U)|0,o=o+Math.imul(j,$)|0,n=n+Math.imul(k,V)|0,i=(i=i+Math.imul(k,K)|0)+Math.imul(O,V)|0,o=o+Math.imul(O,K)|0,n=n+Math.imul(M,X)|0,i=(i=i+Math.imul(M,J)|0)+Math.imul(P,X)|0,o=o+Math.imul(P,J)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,ee)|0,n=n+Math.imul(v,re)|0,i=(i=i+Math.imul(v,ne)|0)+Math.imul(w,re)|0,o=o+Math.imul(w,ne)|0,n=n+Math.imul(m,oe)|0,i=(i=i+Math.imul(m,ae)|0)+Math.imul(g,oe)|0,o=o+Math.imul(g,ae)|0,n=n+Math.imul(p,ue)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(b,ue)|0,o=o+Math.imul(b,ce)|0;var Te=(c+(n=n+Math.imul(d,de)|0)|0)+((8191&(i=(i=i+Math.imul(d,le)|0)+Math.imul(l,de)|0))<<13)|0;c=((o=o+Math.imul(l,le)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(L,F),i=(i=Math.imul(L,W))+Math.imul(z,F)|0,o=Math.imul(z,W),n=n+Math.imul(q,U)|0,i=(i=i+Math.imul(q,$)|0)+Math.imul(I,U)|0,o=o+Math.imul(I,$)|0,n=n+Math.imul(C,V)|0,i=(i=i+Math.imul(C,K)|0)+Math.imul(j,V)|0,o=o+Math.imul(j,K)|0,n=n+Math.imul(k,X)|0,i=(i=i+Math.imul(k,J)|0)+Math.imul(O,X)|0,o=o+Math.imul(O,J)|0,n=n+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(P,Q)|0,o=o+Math.imul(P,ee)|0,n=n+Math.imul(E,re)|0,i=(i=i+Math.imul(E,ne)|0)+Math.imul(T,re)|0,o=o+Math.imul(T,ne)|0,n=n+Math.imul(v,oe)|0,i=(i=i+Math.imul(v,ae)|0)+Math.imul(w,oe)|0,o=o+Math.imul(w,ae)|0,n=n+Math.imul(m,ue)|0,i=(i=i+Math.imul(m,ce)|0)+Math.imul(g,ue)|0,o=o+Math.imul(g,ce)|0,n=n+Math.imul(p,de)|0,i=(i=i+Math.imul(p,le)|0)+Math.imul(b,de)|0,o=o+Math.imul(b,le)|0;var Re=(c+(n=n+Math.imul(d,pe)|0)|0)+((8191&(i=(i=i+Math.imul(d,be)|0)+Math.imul(l,pe)|0))<<13)|0;c=((o=o+Math.imul(l,be)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(L,U),i=(i=Math.imul(L,$))+Math.imul(z,U)|0,o=Math.imul(z,$),n=n+Math.imul(q,V)|0,i=(i=i+Math.imul(q,K)|0)+Math.imul(I,V)|0,o=o+Math.imul(I,K)|0,n=n+Math.imul(C,X)|0,i=(i=i+Math.imul(C,J)|0)+Math.imul(j,X)|0,o=o+Math.imul(j,J)|0,n=n+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(O,Q)|0,o=o+Math.imul(O,ee)|0,n=n+Math.imul(M,re)|0,i=(i=i+Math.imul(M,ne)|0)+Math.imul(P,re)|0,o=o+Math.imul(P,ne)|0,n=n+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(T,oe)|0,o=o+Math.imul(T,ae)|0,n=n+Math.imul(v,ue)|0,i=(i=i+Math.imul(v,ce)|0)+Math.imul(w,ue)|0,o=o+Math.imul(w,ce)|0,n=n+Math.imul(m,de)|0,i=(i=i+Math.imul(m,le)|0)+Math.imul(g,de)|0,o=o+Math.imul(g,le)|0;var Me=(c+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,be)|0)+Math.imul(b,pe)|0))<<13)|0;c=((o=o+Math.imul(b,be)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(L,V),i=(i=Math.imul(L,K))+Math.imul(z,V)|0,o=Math.imul(z,K),n=n+Math.imul(q,X)|0,i=(i=i+Math.imul(q,J)|0)+Math.imul(I,X)|0,o=o+Math.imul(I,J)|0,n=n+Math.imul(C,Q)|0,i=(i=i+Math.imul(C,ee)|0)+Math.imul(j,Q)|0,o=o+Math.imul(j,ee)|0,n=n+Math.imul(k,re)|0,i=(i=i+Math.imul(k,ne)|0)+Math.imul(O,re)|0,o=o+Math.imul(O,ne)|0,n=n+Math.imul(M,oe)|0,i=(i=i+Math.imul(M,ae)|0)+Math.imul(P,oe)|0,o=o+Math.imul(P,ae)|0,n=n+Math.imul(E,ue)|0,i=(i=i+Math.imul(E,ce)|0)+Math.imul(T,ue)|0,o=o+Math.imul(T,ce)|0,n=n+Math.imul(v,de)|0,i=(i=i+Math.imul(v,le)|0)+Math.imul(w,de)|0,o=o+Math.imul(w,le)|0;var Pe=(c+(n=n+Math.imul(m,pe)|0)|0)+((8191&(i=(i=i+Math.imul(m,be)|0)+Math.imul(g,pe)|0))<<13)|0;c=((o=o+Math.imul(g,be)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(L,X),i=(i=Math.imul(L,J))+Math.imul(z,X)|0,o=Math.imul(z,J),n=n+Math.imul(q,Q)|0,i=(i=i+Math.imul(q,ee)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,ee)|0,n=n+Math.imul(C,re)|0,i=(i=i+Math.imul(C,ne)|0)+Math.imul(j,re)|0,o=o+Math.imul(j,ne)|0,n=n+Math.imul(k,oe)|0,i=(i=i+Math.imul(k,ae)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,ae)|0,n=n+Math.imul(M,ue)|0,i=(i=i+Math.imul(M,ce)|0)+Math.imul(P,ue)|0,o=o+Math.imul(P,ce)|0,n=n+Math.imul(E,de)|0,i=(i=i+Math.imul(E,le)|0)+Math.imul(T,de)|0,o=o+Math.imul(T,le)|0;var Ae=(c+(n=n+Math.imul(v,pe)|0)|0)+((8191&(i=(i=i+Math.imul(v,be)|0)+Math.imul(w,pe)|0))<<13)|0;c=((o=o+Math.imul(w,be)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(L,Q),i=(i=Math.imul(L,ee))+Math.imul(z,Q)|0,o=Math.imul(z,ee),n=n+Math.imul(q,re)|0,i=(i=i+Math.imul(q,ne)|0)+Math.imul(I,re)|0,o=o+Math.imul(I,ne)|0,n=n+Math.imul(C,oe)|0,i=(i=i+Math.imul(C,ae)|0)+Math.imul(j,oe)|0,o=o+Math.imul(j,ae)|0,n=n+Math.imul(k,ue)|0,i=(i=i+Math.imul(k,ce)|0)+Math.imul(O,ue)|0,o=o+Math.imul(O,ce)|0,n=n+Math.imul(M,de)|0,i=(i=i+Math.imul(M,le)|0)+Math.imul(P,de)|0,o=o+Math.imul(P,le)|0;var ke=(c+(n=n+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,be)|0)+Math.imul(T,pe)|0))<<13)|0;c=((o=o+Math.imul(T,be)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(L,re),i=(i=Math.imul(L,ne))+Math.imul(z,re)|0,o=Math.imul(z,ne),n=n+Math.imul(q,oe)|0,i=(i=i+Math.imul(q,ae)|0)+Math.imul(I,oe)|0,o=o+Math.imul(I,ae)|0,n=n+Math.imul(C,ue)|0,i=(i=i+Math.imul(C,ce)|0)+Math.imul(j,ue)|0,o=o+Math.imul(j,ce)|0,n=n+Math.imul(k,de)|0,i=(i=i+Math.imul(k,le)|0)+Math.imul(O,de)|0,o=o+Math.imul(O,le)|0;var Oe=(c+(n=n+Math.imul(M,pe)|0)|0)+((8191&(i=(i=i+Math.imul(M,be)|0)+Math.imul(P,pe)|0))<<13)|0;c=((o=o+Math.imul(P,be)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(L,oe),i=(i=Math.imul(L,ae))+Math.imul(z,oe)|0,o=Math.imul(z,ae),n=n+Math.imul(q,ue)|0,i=(i=i+Math.imul(q,ce)|0)+Math.imul(I,ue)|0,o=o+Math.imul(I,ce)|0,n=n+Math.imul(C,de)|0,i=(i=i+Math.imul(C,le)|0)+Math.imul(j,de)|0,o=o+Math.imul(j,le)|0;var xe=(c+(n=n+Math.imul(k,pe)|0)|0)+((8191&(i=(i=i+Math.imul(k,be)|0)+Math.imul(O,pe)|0))<<13)|0;c=((o=o+Math.imul(O,be)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(L,ue),i=(i=Math.imul(L,ce))+Math.imul(z,ue)|0,o=Math.imul(z,ce),n=n+Math.imul(q,de)|0,i=(i=i+Math.imul(q,le)|0)+Math.imul(I,de)|0,o=o+Math.imul(I,le)|0;var Ce=(c+(n=n+Math.imul(C,pe)|0)|0)+((8191&(i=(i=i+Math.imul(C,be)|0)+Math.imul(j,pe)|0))<<13)|0;c=((o=o+Math.imul(j,be)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(L,de),i=(i=Math.imul(L,le))+Math.imul(z,de)|0,o=Math.imul(z,le);var je=(c+(n=n+Math.imul(q,pe)|0)|0)+((8191&(i=(i=i+Math.imul(q,be)|0)+Math.imul(I,pe)|0))<<13)|0;c=((o=o+Math.imul(I,be)|0)+(i>>>13)|0)+(je>>>26)|0,je&=67108863;var Be=(c+(n=Math.imul(L,pe))|0)+((8191&(i=(i=Math.imul(L,be))+Math.imul(z,pe)|0))<<13)|0;return c=((o=Math.imul(z,be))+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863,u[0]=ye,u[1]=me,u[2]=ge,u[3]=_e,u[4]=ve,u[5]=we,u[6]=Se,u[7]=Ee,u[8]=Te,u[9]=Re,u[10]=Me,u[11]=Pe,u[12]=Ae,u[13]=ke,u[14]=Oe,u[15]=xe,u[16]=Ce,u[17]=je,u[18]=Be,0!==c&&(u[19]=c,r.length++),r};function b(e,t,r){return(new y).mulp(e,t,r)}function y(e,t){this.x=e,this.y=t}Math.imul||(p=h),o.prototype.mulTo=function(e,t){var r,n=this.length+e.length;return r=10===this.length&&10===e.length?p(this,e,t):n<63?h(this,e,t):n<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var a=i;i=0;for(var s=67108863&n,u=Math.min(o,t.length-1),c=Math.max(0,o-e.length+1);c<=u;c++){var f=o-c,d=(0|e.words[f])*(0|t.words[c]),l=67108863&d;s=67108863&(l=l+s|0),i+=(a=(a=a+(d/67108864|0)|0)+(l>>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,e,t):b(this,e,t),r},y.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n<e;n++)t[n]=this.revBin(n,r,e);return t},y.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var n=0,i=0;i<t;i++)n|=(1&e)<<t-i-1,e>>=1;return n},y.prototype.permute=function(e,t,r,n,i,o){for(var a=0;a<o;a++)n[a]=t[e[a]],i[a]=r[e[a]]},y.prototype.transform=function(e,t,r,n,i,o){this.permute(o,e,t,r,n,i);for(var a=1;a<i;a<<=1)for(var s=a<<1,u=Math.cos(2*Math.PI/s),c=Math.sin(2*Math.PI/s),f=0;f<i;f+=s)for(var d=u,l=c,h=0;h<a;h++){var p=r[f+h],b=n[f+h],y=r[f+h+a],m=n[f+h+a],g=d*y-l*m;m=d*m+l*y,y=g,r[f+h]=p+y,n[f+h]=b+m,r[f+h+a]=p-y,n[f+h+a]=b-m,h!==s&&(g=u*d-c*l,l=u*l+c*d,d=g)}},y.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},y.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=e[n];e[n]=e[r-n-1],e[r-n-1]=i,i=t[n],t[n]=-t[r-n-1],t[r-n-1]=-i}},y.prototype.normalize13b=function(e,t){for(var r=0,n=0;n<t/2;n++){var i=8192*Math.round(e[2*n+1]/t)+Math.round(e[2*n]/t)+r;e[n]=67108863&i,r=i<67108864?0:i/67108864|0}return e},y.prototype.convert13b=function(e,t,r,i){for(var o=0,a=0;a<t;a++)o+=0|e[a],r[2*a]=8191&o,o>>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*t;a<i;++a)r[a]=0;n(0===o),n(0==(-8192&o))},y.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},y.prototype.mulp=function(e,t,r){var n=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(n),o=this.stub(n),a=new Array(n),s=new Array(n),u=new Array(n),c=new Array(n),f=new Array(n),d=new Array(n),l=r.words;l.length=n,this.convert13b(e.words,e.length,a,n),this.convert13b(t.words,t.length,c,n),this.transform(a,o,s,u,n,i),this.transform(c,o,f,d,n,i);for(var h=0;h<n;h++){var p=s[h]*f[h]-u[h]*d[h];u[h]=s[h]*d[h]+u[h]*f[h],s[h]=p}return this.conjugate(s,u,n),this.transform(s,u,l,o,n,i),this.conjugate(l,o,n),this.normalize13b(l,n),r.negative=e.negative^t.negative,r.length=e.length+t.length,r.strip()},o.prototype.mul=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},o.prototype.mulf=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),b(this,e,t)},o.prototype.imul=function(e){return this.clone().mulTo(e,this)},o.prototype.imuln=function(e){n("number"==typeof e),n(e<67108864);for(var t=0,r=0;r<this.length;r++){var i=(0|this.words[r])*e,o=(67108863&i)+(67108863&t);t>>=26,t+=i/67108864|0,t+=o>>>26,this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var n=r/26|0,i=r%26;t[r]=(e.words[n]&1<<i)>>>i}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n<t.length&&0===t[n];n++,r=r.sqr());if(++n<t.length)for(var i=r.sqr();n<t.length;n++,i=i.sqr())0!==t[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t<this.length;t++){var s=this.words[t]&o,u=(0|this.words[t])-s<<r;this.words[t]=u|a,a=s>>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this.strip()},o.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},o.prototype.iushrn=function(e,t,r){var i;n("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<<o,u=r;if(i-=a,i=Math.max(0,i),u){for(var c=0;c<a;c++)u.words[c]=this.words[c];u.length=a}if(0===a);else if(this.length>a)for(this.length-=a,c=0;c<this.length;c++)this.words[c]=this.words[c+a];else this.words[0]=0,this.length=1;var f=0;for(c=this.length-1;c>=0&&(0!==f||c>=i);c--){var d=0|this.words[c];this.words[c]=f<<26-o|d>>>o,f=d&s}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;return!(this.length<=r)&&!!(this.words[r]&i)},o.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this.strip()},o.prototype.maskn=function(e){return this.clone().imaskn(e)},o.prototype.iaddn=function(e){return n("number"==typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},o.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},o.prototype.addn=function(e){return this.clone().iaddn(e)},o.prototype.subn=function(e){return this.clone().isubn(e)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(e,t,r){var i,o,a=e.length+r;this._expand(a);var s=0;for(i=0;i<e.length;i++){o=(0|this.words[i+r])+s;var u=(0|e.words[i])*t;s=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)s=(o=(0|this.words[i+r])+s)>>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i<this.length;i++)s=(o=-(0|this.words[i])+s)>>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,a=0|i.words[i.length-1];0!==(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,u=n.length-i.length;if("mod"!==t){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c<s.length;c++)s.words[c]=0}var f=n.clone()._ishlnsubmul(i,1,u);0===f.negative&&(n=f,s&&(s.words[u]=1));for(var d=u-1;d>=0;d--){var l=67108864*(0|n.words[i.length+d])+(0|n.words[i.length+d-1]);for(l=Math.min(l/a|0,67108863),n._ishlnsubmul(i,l,d);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(i,1,d),n.isZero()||(n.negative^=1);s&&(s.words[d]=l)}return s&&s.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,a,s},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},o.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var f=r.clone(),d=t.clone();!t.isZero();){for(var l=0,h=1;0==(t.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(t.iushrn(l);l-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(f),a.isub(d)),i.iushrn(1),a.iushrn(1);for(var p=0,b=1;0==(r.words[0]&b)&&p<26;++p,b<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(f),u.isub(d)),s.iushrn(1),u.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),a.isub(u)):(r.isub(t),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:r.iushln(c)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,a=new o(1),s=new o(0),u=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,f=1;0==(t.words[0]&f)&&c<26;++c,f<<=1);if(c>0)for(t.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var d=0,l=1;0==(r.words[0]&l)&&d<26;++d,l<<=1);if(d>0)for(r.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s)):(r.isub(t),s.isub(a))}return(i=0===t.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,a=r;0!==o&&a<this.length;a++){var s=0|this.words[a];o=(s+=o)>>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},o.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},o.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){n<i?t=-1:n>i&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new E(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var m={k256:null,p224:null,p192:null,p25519:null};function g(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function _(){g.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function v(){g.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){g.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){g.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function T(e){E.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}g.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},g.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},g.prototype.split=function(e,t){e.iushrn(this.n,0,t)},g.prototype.imulK=function(e){return e.imul(this.k)},i(_,g),_.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i<n;i++)t.words[i]=e.words[i];if(t.length=n,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&r,i=10;i<e.length;i++){var a=0|e.words[i];e.words[i-10]=(a&r)<<4|o>>>22,o=a}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},_.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var n=0|e.words[r];t+=977*n,e.words[r]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(v,g),i(w,g),i(S,g),S.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=19*(0|e.words[r])+t,i=67108863&n;n>>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(m[e])return m[e];var t;if("k256"===e)t=new _;else if("p224"===e)t=new v;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new S}return m[e]=t,t},E.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},E.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},E.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},E.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},E.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},E.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},E.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},E.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},E.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},E.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},E.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},E.prototype.isqr=function(e){return this.imul(e,e.clone())},E.prototype.sqr=function(e){return this.mul(e,e)},E.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,c).cmp(u);)f.redIAdd(u);for(var d=this.pow(f,i),l=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),p=a;0!==h.cmp(s);){for(var b=h,y=0;0!==b.cmp(s);y++)b=b.redSqr();n(y<p);var m=this.pow(d,new o(1).iushln(p-y-1));l=l.redMul(m),d=m.redSqr(),h=h.redMul(d),p=y}return l},E.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},E.prototype.pow=function(e,t){if(t.isZero())return new o(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=e;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],e);var i=r[0],a=0,s=0,u=t.bitLength()%26;for(0===u&&(u=26),n=t.length-1;n>=0;n--){for(var c=t.words[n],f=u-1;f>=0;f--){var d=c>>f&1;i!==r[0]&&(i=this.sqr(i)),0!==d||0!==a?(a<<=1,a|=d,(4===++s||0===n&&0===f)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}u=26}return i},E.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},E.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new T(e)},i(T,E),T.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},T.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},T.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},T.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},T.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},7056:(e,t,r)=>{var n;function i(e){this.rand=e}if(e.exports=function(e){return n||(n=new i(null)),n.generate(e)},e.exports.Rand=i,i.prototype.generate=function(e){return this._rand(e)},i.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),r=0;r<t.length;r++)t[r]=this.rand.getByte();return t},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?i.prototype._rand=function(e){var t=new Uint8Array(e);return self.crypto.getRandomValues(t),t}:self.msCrypto&&self.msCrypto.getRandomValues?i.prototype._rand=function(e){var t=new Uint8Array(e);return self.msCrypto.getRandomValues(t),t}:"object"==typeof window&&(i.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var o=r(6113);if("function"!=typeof o.randomBytes)throw new Error("Not supported");i.prototype._rand=function(e){return o.randomBytes(e)}}catch(a){}},9749:e=>{"use strict";e.exports={mask:(e,t,r,n,i)=>{for(var o=0;o<i;o++)r[n+o]=e[o]^t[3&o]},unmask:(e,t)=>{const r=e.length;for(var n=0;n<r;n++)e[n]^=t[3&n]}}},8469:(e,t,r)=>{"use strict";try{e.exports=r(1363)("/")}catch(n){e.exports=r(9749)}},660:(e,t,r)=>{"use strict";e.exports=r(3005)},4793:e=>{"use strict";e.exports=function(e){if(!/^data:/i.test(e))throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")');const t=(e=e.replace(/\r?\n/g,"")).indexOf(",");if(-1===t||t<=4)throw new TypeError("malformed data: URI");const r=e.substring(5,t).split(";");let n="",i=!1;const o=r[0]||"text/plain";let a=o;for(let f=1;f<r.length;f++)"base64"===r[f]?i=!0:(a+=`;${r[f]}`,0===r[f].indexOf("charset=")&&(n=r[f].substring(8)));r[0]||n.length||(a+=";charset=US-ASCII",n="US-ASCII");const s=i?"base64":"ascii",u=unescape(e.substring(t+1)),c=Buffer.from(u,s);return c.type=o,c.typeFull=a,c.charset=n,c}},236:(e,t,r)=>{"use strict";var n=t;n.version=r(8597).i8,n.utils=r(1560),n.rand=r(7056),n.curve=r(5533),n.curves=r(5914),n.ec=r(3090),n.eddsa=r(4082)},4861:(e,t,r)=>{"use strict";var n=r(9919),i=r(1560),o=i.getNAF,a=i.getJSF,s=i.assert;function u(e,t){this.type=e,this.p=new n(t.p,16),this.red=t.prime?n.red(t.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=t.n&&new n(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function c(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=u,u.prototype.point=function(){throw new Error("Not implemented")},u.prototype.validate=function(){throw new Error("Not implemented")},u.prototype._fixedNafMul=function(e,t){s(e.precomputed);var r=e._getDoubles(),n=o(t,1,this._bitLength),i=(1<<r.step+1)-(r.step%2==0?2:1);i/=3;var a,u,c=[];for(a=0;a<n.length;a+=r.step){u=0;for(var f=a+r.step-1;f>=a;f--)u=(u<<1)+n[f];c.push(u)}for(var d=this.jpoint(null,null,null),l=this.jpoint(null,null,null),h=i;h>0;h--){for(a=0;a<c.length;a++)(u=c[a])===h?l=l.mixedAdd(r.points[a]):u===-h&&(l=l.mixedAdd(r.points[a].neg()));d=d.add(l)}return d.toP()},u.prototype._wnafMul=function(e,t){var r=4,n=e._getNAFPoints(r);r=n.wnd;for(var i=n.points,a=o(t,r,this._bitLength),u=this.jpoint(null,null,null),c=a.length-1;c>=0;c--){for(var f=0;c>=0&&0===a[c];c--)f++;if(c>=0&&f++,u=u.dblp(f),c<0)break;var d=a[c];s(0!==d),u="affine"===e.type?d>0?u.mixedAdd(i[d-1>>1]):u.mixedAdd(i[-d-1>>1].neg()):d>0?u.add(i[d-1>>1]):u.add(i[-d-1>>1].neg())}return"affine"===e.type?u.toP():u},u.prototype._wnafMulAdd=function(e,t,r,n,i){var s,u,c,f=this._wnafT1,d=this._wnafT2,l=this._wnafT3,h=0;for(s=0;s<n;s++){var p=(c=t[s])._getNAFPoints(e);f[s]=p.wnd,d[s]=p.points}for(s=n-1;s>=1;s-=2){var b=s-1,y=s;if(1===f[b]&&1===f[y]){var m=[t[b],null,null,t[y]];0===t[b].y.cmp(t[y].y)?(m[1]=t[b].add(t[y]),m[2]=t[b].toJ().mixedAdd(t[y].neg())):0===t[b].y.cmp(t[y].y.redNeg())?(m[1]=t[b].toJ().mixedAdd(t[y]),m[2]=t[b].add(t[y].neg())):(m[1]=t[b].toJ().mixedAdd(t[y]),m[2]=t[b].toJ().mixedAdd(t[y].neg()));var g=[-3,-1,-5,-7,0,7,5,1,3],_=a(r[b],r[y]);for(h=Math.max(_[0].length,h),l[b]=new Array(h),l[y]=new Array(h),u=0;u<h;u++){var v=0|_[0][u],w=0|_[1][u];l[b][u]=g[3*(v+1)+(w+1)],l[y][u]=0,d[b]=m}}else l[b]=o(r[b],f[b],this._bitLength),l[y]=o(r[y],f[y],this._bitLength),h=Math.max(l[b].length,h),h=Math.max(l[y].length,h)}var S=this.jpoint(null,null,null),E=this._wnafT4;for(s=h;s>=0;s--){for(var T=0;s>=0;){var R=!0;for(u=0;u<n;u++)E[u]=0|l[u][s],0!==E[u]&&(R=!1);if(!R)break;T++,s--}if(s>=0&&T++,S=S.dblp(T),s<0)break;for(u=0;u<n;u++){var M=E[u];0!==M&&(M>0?c=d[u][M-1>>1]:M<0&&(c=d[u][-M-1>>1].neg()),S="affine"===c.type?S.mixedAdd(c):S.add(c))}}for(s=0;s<n;s++)d[s]=null;return i?S:S.toP()},u.BasePoint=c,c.prototype.eq=function(){throw new Error("Not implemented")},c.prototype.validate=function(){return this.curve.validate(this)},u.prototype.decodePoint=function(e,t){e=i.toArray(e,t);var r=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1==2*r)return 6===e[0]?s(e[e.length-1]%2==0):7===e[0]&&s(e[e.length-1]%2==1),this.point(e.slice(1,1+r),e.slice(1+r,1+2*r));if((2===e[0]||3===e[0])&&e.length-1===r)return this.pointFromX(e.slice(1,1+r),3===e[0]);throw new Error("Unknown point format")},c.prototype.encodeCompressed=function(e){return this.encode(e,!0)},c.prototype._encode=function(e){var t=this.curve.p.byteLength(),r=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",t))},c.prototype.encode=function(e,t){return i.encode(this._encode(t),e)},c.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},c.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},c.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i<t;i+=e){for(var o=0;o<e;o++)n=n.dbl();r.push(n)}return{step:e,points:r}},c.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],r=(1<<e)-1,n=1===r?null:this.dbl(),i=1;i<r;i++)t[i]=t[i-1].add(n);return{wnd:e,points:t}},c.prototype._getBeta=function(){return null},c.prototype.dblp=function(e){for(var t=this,r=0;r<e;r++)t=t.dbl();return t}},5649:(e,t,r)=>{"use strict";var n=r(1560),i=r(9919),o=r(7577),a=r(4861),s=n.assert;function u(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,a.call(this,"edwards",e),this.a=new i(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new i(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new i(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),s(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}function c(e,t,r,n,o){a.BasePoint.call(this,e,"projective"),null===t&&null===r&&null===n?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new i(t,16),this.y=new i(r,16),this.z=n?new i(n,16):this.curve.one,this.t=o&&new i(o,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}o(u,a),e.exports=u,u.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},u.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},u.prototype.jpoint=function(e,t,r,n){return this.point(e,t,r,n)},u.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=this.c2.redSub(this.a.redMul(r)),o=this.one.redSub(this.c2.redMul(this.d).redMul(r)),a=n.redMul(o.redInvm()),s=a.redSqrt();if(0!==s.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");var u=s.fromRed().isOdd();return(t&&!u||!t&&u)&&(s=s.redNeg()),this.point(e,s)},u.prototype.pointFromY=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=r.redSub(this.c2),o=r.redMul(this.d).redMul(this.c2).redSub(this.a),a=n.redMul(o.redInvm());if(0===a.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var s=a.redSqrt();if(0!==s.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");return s.fromRed().isOdd()!==t&&(s=s.redNeg()),this.point(s,e)},u.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),r=e.y.redSqr(),n=t.redMul(this.a).redAdd(r),i=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(r)));return 0===n.cmp(i)},o(c,a.BasePoint),u.prototype.pointFromJSON=function(e){return c.fromJSON(this,e)},u.prototype.point=function(e,t,r,n){return new c(this,e,t,r,n)},c.fromJSON=function(e,t){return new c(e,t[0],t[1],t[2])},c.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},c.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},c.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),o=n.redAdd(t),a=o.redSub(r),s=n.redSub(t),u=i.redMul(a),c=o.redMul(s),f=i.redMul(s),d=a.redMul(o);return this.curve.point(u,c,d,f)},c.prototype._projDbl=function(){var e,t,r,n,i,o,a=this.x.redAdd(this.y).redSqr(),s=this.x.redSqr(),u=this.y.redSqr();if(this.curve.twisted){var c=(n=this.curve._mulA(s)).redAdd(u);this.zOne?(e=a.redSub(s).redSub(u).redMul(c.redSub(this.curve.two)),t=c.redMul(n.redSub(u)),r=c.redSqr().redSub(c).redSub(c)):(i=this.z.redSqr(),o=c.redSub(i).redISub(i),e=a.redSub(s).redISub(u).redMul(o),t=c.redMul(n.redSub(u)),r=c.redMul(o))}else n=s.redAdd(u),i=this.curve._mulC(this.z).redSqr(),o=n.redSub(i).redSub(i),e=this.curve._mulC(a.redISub(n)).redMul(o),t=this.curve._mulC(n).redMul(s.redISub(u)),r=n.redMul(o);return this.curve.point(e,t,r)},c.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},c.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),n=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),o=r.redSub(t),a=i.redSub(n),s=i.redAdd(n),u=r.redAdd(t),c=o.redMul(a),f=s.redMul(u),d=o.redMul(u),l=a.redMul(s);return this.curve.point(c,f,l,d)},c.prototype._projAdd=function(e){var t,r,n=this.z.redMul(e.z),i=n.redSqr(),o=this.x.redMul(e.x),a=this.y.redMul(e.y),s=this.curve.d.redMul(o).redMul(a),u=i.redSub(s),c=i.redAdd(s),f=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(o).redISub(a),d=n.redMul(u).redMul(f);return this.curve.twisted?(t=n.redMul(c).redMul(a.redSub(this.curve._mulA(o))),r=u.redMul(c)):(t=n.redMul(c).redMul(a.redSub(o)),r=this.curve._mulC(u).redMul(c)),this.curve.point(d,t,r)},c.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},c.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},c.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},c.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},c.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},c.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()},c.prototype.getY=function(){return this.normalize(),this.y.fromRed()},c.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},c.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var r=e.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(n),0===this.x.cmp(t))return!0}},c.prototype.toP=c.prototype.normalize,c.prototype.mixedAdd=c.prototype.add},5533:(e,t,r)=>{"use strict";var n=t;n.base=r(4861),n.short=r(8707),n.mont=r(7474),n.edwards=r(5649)},7474:(e,t,r)=>{"use strict";var n=r(9919),i=r(7577),o=r(4861),a=r(1560);function s(e){o.call(this,"mont",e),this.a=new n(e.a,16).toRed(this.red),this.b=new n(e.b,16).toRed(this.red),this.i4=new n(4).toRed(this.red).redInvm(),this.two=new n(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function u(e,t,r){o.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(t,16),this.z=new n(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}i(s,o),e.exports=s,s.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),n=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t);return 0===n.redSqrt().redSqr().cmp(n)},i(u,o.BasePoint),s.prototype.decodePoint=function(e,t){return this.point(a.toArray(e,t),1)},s.prototype.point=function(e,t){return new u(this,e,t)},s.prototype.pointFromJSON=function(e){return u.fromJSON(this,e)},u.prototype.precompute=function(){},u.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},u.fromJSON=function(e,t){return new u(e,t[0],t[1]||e.one)},u.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},u.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),r=e.redSub(t),n=e.redMul(t),i=r.redMul(t.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},u.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=e.x.redAdd(e.z),o=e.x.redSub(e.z).redMul(r),a=i.redMul(n),s=t.z.redMul(o.redAdd(a).redSqr()),u=t.x.redMul(o.redISub(a).redSqr());return this.curve.point(s,u)},u.prototype.mul=function(e){for(var t=e.clone(),r=this,n=this.curve.point(null,null),i=[];0!==t.cmpn(0);t.iushrn(1))i.push(t.andln(1));for(var o=i.length-1;o>=0;o--)0===i[o]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},u.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},u.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},8707:(e,t,r)=>{"use strict";var n=r(1560),i=r(9919),o=r(7577),a=r(4861),s=n.assert;function u(e){a.call(this,"short",e),this.a=new i(e.a,16).toRed(this.red),this.b=new i(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function c(e,t,r,n){a.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(t,16),this.y=new i(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function f(e,t,r,n){a.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i(0)):(this.x=new i(t,16),this.y=new i(r,16),this.z=new i(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}o(u,a),e.exports=u,u.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new i(e.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);t=(t=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(e.lambda)r=new i(e.lambda,16);else{var o=this._getEndoRoots(this.n);0===this.g.mul(o[0]).x.cmp(this.g.x.redMul(t))?r=o[0]:(r=o[1],s(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:r,basis:e.basis?e.basis.map((function(e){return{a:new i(e.a,16),b:new i(e.b,16)}})):this._getEndoBasis(r)}}},u.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:i.mont(e),r=new i(2).toRed(t).redInvm(),n=r.redNeg(),o=new i(3).toRed(t).redNeg().redSqrt().redMul(r);return[n.redAdd(o).fromRed(),n.redSub(o).fromRed()]},u.prototype._getEndoBasis=function(e){for(var t,r,n,o,a,s,u,c,f,d=this.n.ushrn(Math.floor(this.n.bitLength()/2)),l=e,h=this.n.clone(),p=new i(1),b=new i(0),y=new i(0),m=new i(1),g=0;0!==l.cmpn(0);){var _=h.div(l);c=h.sub(_.mul(l)),f=y.sub(_.mul(p));var v=m.sub(_.mul(b));if(!n&&c.cmp(d)<0)t=u.neg(),r=p,n=c.neg(),o=f;else if(n&&2==++g)break;u=c,h=l,l=c,y=p,p=f,m=b,b=v}a=c.neg(),s=f;var w=n.sqr().add(o.sqr());return a.sqr().add(s.sqr()).cmp(w)>=0&&(a=t,s=r),n.negative&&(n=n.neg(),o=o.neg()),a.negative&&(a=a.neg(),s=s.neg()),[{a:n,b:o},{a:a,b:s}]},u.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),o=r.b.neg().mul(e).divRound(this.n),a=i.mul(r.a),s=o.mul(n.a),u=i.mul(r.b),c=o.mul(n.b);return{k1:e.sub(a).sub(s),k2:u.add(c).neg()}},u.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var o=n.fromRed().isOdd();return(t&&!o||!t&&o)&&(n=n.redNeg()),this.point(e,n)},u.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},u.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o<e.length;o++){var a=this._endoSplit(t[o]),s=e[o],u=s._getBeta();a.k1.negative&&(a.k1.ineg(),s=s.neg(!0)),a.k2.negative&&(a.k2.ineg(),u=u.neg(!0)),n[2*o]=s,n[2*o+1]=u,i[2*o]=a.k1,i[2*o+1]=a.k2}for(var c=this._wnafMulAdd(1,n,i,2*o,r),f=0;f<2*o;f++)n[f]=null,i[f]=null;return c},o(c,a.BasePoint),u.prototype.point=function(e,t,r){return new c(this,e,t,r)},u.prototype.pointFromJSON=function(e,t){return c.fromJSON(this,e,t)},c.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var r=this.curve,n=function(e){return r.point(e.x.redMul(r.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(n)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(n)}}}return t}},c.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},c.fromJSON=function(e,t,r){"string"==typeof t&&(t=JSON.parse(t));var n=e.point(t[0],t[1],r);if(!t[2])return n;function i(t){return e.point(t[0],t[1],r)}var o=t[2];return n.precomputed={beta:null,doubles:o.doubles&&{step:o.doubles.step,points:[n].concat(o.doubles.points.map(i))},naf:o.naf&&{wnd:o.naf.wnd,points:[n].concat(o.naf.points.map(i))}},n},c.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},c.prototype.isInfinity=function(){return this.inf},c.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},c.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)},c.prototype.getX=function(){return this.x.fromRed()},c.prototype.getY=function(){return this.y.fromRed()},c.prototype.mul=function(e){return e=new i(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},c.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},c.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},c.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},c.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},c.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(f,a.BasePoint),u.prototype.jpoint=function(e,t,r){return new f(this,e,t,r)},f.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},f.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},f.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),o=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(r.redMul(this.z)),s=n.redSub(i),u=o.redSub(a);if(0===s.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=s.redSqr(),f=c.redMul(s),d=n.redMul(c),l=u.redSqr().redIAdd(f).redISub(d).redISub(d),h=u.redMul(d.redISub(l)).redISub(o.redMul(f)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(l,h,p)},f.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,o=e.y.redMul(t).redMul(this.z),a=r.redSub(n),s=i.redSub(o);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=a.redSqr(),c=u.redMul(a),f=r.redMul(u),d=s.redSqr().redIAdd(c).redISub(f).redISub(f),l=s.redMul(f.redISub(d)).redISub(i.redMul(c)),h=this.z.redMul(a);return this.curve.jpoint(d,l,h)},f.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var r=this;for(t=0;t<e;t++)r=r.dbl();return r}var n=this.curve.a,i=this.curve.tinv,o=this.x,a=this.y,s=this.z,u=s.redSqr().redSqr(),c=a.redAdd(a);for(t=0;t<e;t++){var f=o.redSqr(),d=c.redSqr(),l=d.redSqr(),h=f.redAdd(f).redIAdd(f).redIAdd(n.redMul(u)),p=o.redMul(d),b=h.redSqr().redISub(p.redAdd(p)),y=p.redISub(b),m=h.redMul(y);m=m.redIAdd(m).redISub(l);var g=c.redMul(s);t+1<e&&(u=u.redMul(l)),o=b,s=g,c=m}return this.curve.jpoint(o,c.redMul(i),s)},f.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},f.prototype._zeroDbl=function(){var e,t,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),a=this.x.redAdd(i).redSqr().redISub(n).redISub(o);a=a.redIAdd(a);var s=n.redAdd(n).redIAdd(n),u=s.redSqr().redISub(a).redISub(a),c=o.redIAdd(o);c=(c=c.redIAdd(c)).redIAdd(c),e=u,t=s.redMul(a.redISub(u)).redISub(c),r=this.y.redAdd(this.y)}else{var f=this.x.redSqr(),d=this.y.redSqr(),l=d.redSqr(),h=this.x.redAdd(d).redSqr().redISub(f).redISub(l);h=h.redIAdd(h);var p=f.redAdd(f).redIAdd(f),b=p.redSqr(),y=l.redIAdd(l);y=(y=y.redIAdd(y)).redIAdd(y),e=b.redISub(h).redISub(h),t=p.redMul(h.redISub(e)).redISub(y),r=(r=this.y.redMul(this.z)).redIAdd(r)}return this.curve.jpoint(e,t,r)},f.prototype._threeDbl=function(){var e,t,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),a=this.x.redAdd(i).redSqr().redISub(n).redISub(o);a=a.redIAdd(a);var s=n.redAdd(n).redIAdd(n).redIAdd(this.curve.a),u=s.redSqr().redISub(a).redISub(a);e=u;var c=o.redIAdd(o);c=(c=c.redIAdd(c)).redIAdd(c),t=s.redMul(a.redISub(u)).redISub(c),r=this.y.redAdd(this.y)}else{var f=this.z.redSqr(),d=this.y.redSqr(),l=this.x.redMul(d),h=this.x.redSub(f).redMul(this.x.redAdd(f));h=h.redAdd(h).redIAdd(h);var p=l.redIAdd(l),b=(p=p.redIAdd(p)).redAdd(p);e=h.redSqr().redISub(b),r=this.y.redAdd(this.z).redSqr().redISub(d).redISub(f);var y=d.redSqr();y=(y=(y=y.redIAdd(y)).redIAdd(y)).redIAdd(y),t=h.redMul(p.redISub(e)).redISub(y)}return this.curve.jpoint(e,t,r)},f.prototype._dbl=function(){var e=this.curve.a,t=this.x,r=this.y,n=this.z,i=n.redSqr().redSqr(),o=t.redSqr(),a=r.redSqr(),s=o.redAdd(o).redIAdd(o).redIAdd(e.redMul(i)),u=t.redAdd(t),c=(u=u.redIAdd(u)).redMul(a),f=s.redSqr().redISub(c.redAdd(c)),d=c.redISub(f),l=a.redSqr();l=(l=(l=l.redIAdd(l)).redIAdd(l)).redIAdd(l);var h=s.redMul(d).redISub(l),p=r.redAdd(r).redMul(n);return this.curve.jpoint(f,h,p)},f.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr(),n=t.redSqr(),i=e.redAdd(e).redIAdd(e),o=i.redSqr(),a=this.x.redAdd(t).redSqr().redISub(e).redISub(n),s=(a=(a=(a=a.redIAdd(a)).redAdd(a).redIAdd(a)).redISub(o)).redSqr(),u=n.redIAdd(n);u=(u=(u=u.redIAdd(u)).redIAdd(u)).redIAdd(u);var c=i.redIAdd(a).redSqr().redISub(o).redISub(s).redISub(u),f=t.redMul(c);f=(f=f.redIAdd(f)).redIAdd(f);var d=this.x.redMul(s).redISub(f);d=(d=d.redIAdd(d)).redIAdd(d);var l=this.y.redMul(c.redMul(u.redISub(c)).redISub(a.redMul(s)));l=(l=(l=l.redIAdd(l)).redIAdd(l)).redIAdd(l);var h=this.z.redAdd(a).redSqr().redISub(r).redISub(s);return this.curve.jpoint(d,l,h)},f.prototype.mul=function(e,t){return e=new i(e,t),this.curve._wnafMul(this,e)},f.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),r=e.z.redSqr();if(0!==this.x.redMul(r).redISub(e.x.redMul(t)).cmpn(0))return!1;var n=t.redMul(this.z),i=r.redMul(e.z);return 0===this.y.redMul(i).redISub(e.y.redMul(n)).cmpn(0)},f.prototype.eqXToP=function(e){var t=this.z.redSqr(),r=e.toRed(this.curve.red).redMul(t);if(0===this.x.cmp(r))return!0;for(var n=e.clone(),i=this.curve.redN.redMul(t);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},f.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},f.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},5914:(e,t,r)=>{"use strict";var n,i=t,o=r(6204),a=r(5533),s=r(1560).assert;function u(e){"short"===e.type?this.curve=new a.short(e):"edwards"===e.type?this.curve=new a.edwards(e):this.curve=new a.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function c(e,t){Object.defineProperty(i,e,{configurable:!0,enumerable:!0,get:function(){var r=new u(t);return Object.defineProperty(i,e,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=u,c("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),c("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),c("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),c("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:o.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),c("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:o.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),c("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),c("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=r(2970)}catch(f){n=void 0}c("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})},3090:(e,t,r)=>{"use strict";var n=r(9919),i=r(4859),o=r(1560),a=r(5914),s=r(7056),u=o.assert,c=r(4858),f=r(3539);function d(e){if(!(this instanceof d))return new d(e);"string"==typeof e&&(u(Object.prototype.hasOwnProperty.call(a,e),"Unknown curve "+e),e=a[e]),e instanceof a.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}e.exports=d,d.prototype.keyPair=function(e){return new c(this,e)},d.prototype.keyFromPrivate=function(e,t){return c.fromPrivate(this,e,t)},d.prototype.keyFromPublic=function(e,t){return c.fromPublic(this,e,t)},d.prototype.genKeyPair=function(e){e||(e={});for(var t=new i({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||s(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),o=this.n.sub(new n(2));;){var a=new n(t.generate(r));if(!(a.cmp(o)>0))return a.iaddn(1),this.keyFromPrivate(a)}},d.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},d.prototype.sign=function(e,t,r,o){"object"==typeof r&&(o=r,r=null),o||(o={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new n(e,16));for(var a=this.n.byteLength(),s=t.getPrivate().toArray("be",a),u=e.toArray("be",a),c=new i({hash:this.hash,entropy:s,nonce:u,pers:o.pers,persEnc:o.persEnc||"utf8"}),d=this.n.sub(new n(1)),l=0;;l++){var h=o.k?o.k(l):new n(c.generate(this.n.byteLength()));if(!((h=this._truncateToN(h,!0)).cmpn(1)<=0||h.cmp(d)>=0)){var p=this.g.mul(h);if(!p.isInfinity()){var b=p.getX(),y=b.umod(this.n);if(0!==y.cmpn(0)){var m=h.invm(this.n).mul(y.mul(t.getPrivate()).iadd(e));if(0!==(m=m.umod(this.n)).cmpn(0)){var g=(p.getY().isOdd()?1:0)|(0!==b.cmp(y)?2:0);return o.canonical&&m.cmp(this.nh)>0&&(m=this.n.sub(m),g^=1),new f({r:y,s:m,recoveryParam:g})}}}}}},d.prototype.verify=function(e,t,r,i){e=this._truncateToN(new n(e,16)),r=this.keyFromPublic(r,i);var o=(t=new f(t,"hex")).r,a=t.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var s,u=a.invm(this.n),c=u.mul(e).umod(this.n),d=u.mul(o).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(c,r.getPublic(),d)).isInfinity()&&s.eqXToP(o):!(s=this.g.mulAdd(c,r.getPublic(),d)).isInfinity()&&0===s.getX().umod(this.n).cmp(o)},d.prototype.recoverPubKey=function(e,t,r,i){u((3&r)===r,"The recovery param is more than two bits"),t=new f(t,i);var o=this.n,a=new n(e),s=t.r,c=t.s,d=1&r,l=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&l)throw new Error("Unable to find sencond key candinate");s=l?this.curve.pointFromX(s.add(this.curve.n),d):this.curve.pointFromX(s,d);var h=t.r.invm(o),p=o.sub(a).mul(h).umod(o),b=c.mul(h).umod(o);return this.g.mulAdd(p,s,b)},d.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new f(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,t,i)}catch(e){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")}},4858:(e,t,r)=>{"use strict";var n=r(9919),i=r(1560).assert;function o(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}e.exports=o,o.fromPublic=function(e,t,r){return t instanceof o?t:new o(e,{pub:t,pubEnc:r})},o.fromPrivate=function(e,t,r){return t instanceof o?t:new o(e,{priv:t,privEnc:r})},o.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},o.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},o.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},o.prototype._importPrivate=function(e,t){this.priv=new n(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},o.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?i(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||i(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},o.prototype.derive=function(e){return e.validate()||i(e.validate(),"public point not validated"),e.mul(this.priv).getX()},o.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},o.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},o.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},3539:(e,t,r)=>{"use strict";var n=r(9919),i=r(1560),o=i.assert;function a(e,t){if(e instanceof a)return e;this._importDER(e,t)||(o(e.r&&e.s,"Signature without r or s"),this.r=new n(e.r,16),this.s=new n(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function s(){this.place=0}function u(e,t){var r=e[t.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var i=0,o=0,a=t.place;o<n;o++,a++)i<<=8,i|=e[a],i>>>=0;return!(i<=127)&&(t.place=a,i)}function c(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t<r;)t++;return 0===t?e:e.slice(t)}function f(e,t){if(t<128)e.push(t);else{var r=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}e.exports=a,a.prototype._importDER=function(e,t){e=i.toArray(e,t);var r=new s;if(48!==e[r.place++])return!1;var o=u(e,r);if(!1===o)return!1;if(o+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var a=u(e,r);if(!1===a)return!1;var c=e.slice(r.place,a+r.place);if(r.place+=a,2!==e[r.place++])return!1;var f=u(e,r);if(!1===f)return!1;if(e.length!==f+r.place)return!1;var d=e.slice(r.place,f+r.place);if(0===c[0]){if(!(128&c[1]))return!1;c=c.slice(1)}if(0===d[0]){if(!(128&d[1]))return!1;d=d.slice(1)}return this.r=new n(c),this.s=new n(d),this.recoveryParam=null,!0},a.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=c(t),r=c(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];f(n,t.length),(n=n.concat(t)).push(2),f(n,r.length);var o=n.concat(r),a=[48];return f(a,o.length),a=a.concat(o),i.encode(a,e)}},4082:(e,t,r)=>{"use strict";var n=r(6204),i=r(5914),o=r(1560),a=o.assert,s=o.parseBytes,u=r(6958),c=r(6018);function f(e){if(a("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof f))return new f(e);e=i[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=n.sha512}e.exports=f,f.prototype.sign=function(e,t){e=s(e);var r=this.keyFromSecret(t),n=this.hashInt(r.messagePrefix(),e),i=this.g.mul(n),o=this.encodePoint(i),a=this.hashInt(o,r.pubBytes(),e).mul(r.priv()),u=n.add(a).umod(this.curve.n);return this.makeSignature({R:i,S:u,Rencoded:o})},f.prototype.verify=function(e,t,r){e=s(e),t=this.makeSignature(t);var n=this.keyFromPublic(r),i=this.hashInt(t.Rencoded(),n.pubBytes(),e),o=this.g.mul(t.S());return t.R().add(n.pub().mul(i)).eq(o)},f.prototype.hashInt=function(){for(var e=this.hash(),t=0;t<arguments.length;t++)e.update(arguments[t]);return o.intFromLE(e.digest()).umod(this.curve.n)},f.prototype.keyFromPublic=function(e){return u.fromPublic(this,e)},f.prototype.keyFromSecret=function(e){return u.fromSecret(this,e)},f.prototype.makeSignature=function(e){return e instanceof c?e:new c(this,e)},f.prototype.encodePoint=function(e){var t=e.getY().toArray("le",this.encodingLength);return t[this.encodingLength-1]|=e.getX().isOdd()?128:0,t},f.prototype.decodePoint=function(e){var t=(e=o.parseBytes(e)).length-1,r=e.slice(0,t).concat(-129&e[t]),n=0!=(128&e[t]),i=o.intFromLE(r);return this.curve.pointFromY(i,n)},f.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)},f.prototype.decodeInt=function(e){return o.intFromLE(e)},f.prototype.isPoint=function(e){return e instanceof this.pointClass}},6958:(e,t,r)=>{"use strict";var n=r(1560),i=n.assert,o=n.parseBytes,a=n.cachedProperty;function s(e,t){this.eddsa=e,this._secret=o(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=o(t.pub)}s.fromPublic=function(e,t){return t instanceof s?t:new s(e,{pub:t})},s.fromSecret=function(e,t){return t instanceof s?t:new s(e,{secret:t})},s.prototype.secret=function(){return this._secret},a(s,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),a(s,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),a(s,"privBytes",(function(){var e=this.eddsa,t=this.hash(),r=e.encodingLength-1,n=t.slice(0,e.encodingLength);return n[0]&=248,n[r]&=127,n[r]|=64,n})),a(s,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),a(s,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),a(s,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),s.prototype.sign=function(e){return i(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},s.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},s.prototype.getSecret=function(e){return i(this._secret,"KeyPair is public only"),n.encode(this.secret(),e)},s.prototype.getPublic=function(e){return n.encode(this.pubBytes(),e)},e.exports=s},6018:(e,t,r)=>{"use strict";var n=r(9919),i=r(1560),o=i.assert,a=i.cachedProperty,s=i.parseBytes;function u(e,t){this.eddsa=e,"object"!=typeof t&&(t=s(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),o(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof n&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}a(u,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),a(u,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),a(u,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),a(u,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),u.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},u.prototype.toHex=function(){return i.encode(this.toBytes(),"hex").toUpperCase()},e.exports=u},2970:e=>{e.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},1560:(e,t,r)=>{"use strict";var n=t,i=r(9919),o=r(6794),a=r(7705);n.assert=o,n.toArray=a.toArray,n.zero2=a.zero2,n.toHex=a.toHex,n.encode=a.encode,n.getNAF=function(e,t,r){var n=new Array(Math.max(e.bitLength(),r)+1);n.fill(0);for(var i=1<<t+1,o=e.clone(),a=0;a<n.length;a++){var s,u=o.andln(i-1);o.isOdd()?(s=u>(i>>1)-1?(i>>1)-u:u,o.isubn(s)):s=0,n[a]=s,o.iushrn(1)}return n},n.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n,i=0,o=0;e.cmpn(-i)>0||t.cmpn(-o)>0;){var a,s,u=e.andln(3)+i&3,c=t.andln(3)+o&3;3===u&&(u=-1),3===c&&(c=-1),a=0==(1&u)?0:3!==(n=e.andln(7)+i&7)&&5!==n||2!==c?u:-u,r[0].push(a),s=0==(1&c)?0:3!==(n=t.andln(7)+o&7)&&5!==n||2!==u?c:-c,r[1].push(s),2*i===a+1&&(i=1-i),2*o===s+1&&(o=1-o),e.iushrn(1),t.iushrn(1)}return r},n.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function(e){return"string"==typeof e?n.toArray(e,"hex"):e},n.intFromLE=function(e){return new i(e,"hex","le")}},5397:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=new WeakMap,n=new WeakMap;function i(e){const t=r.get(e);return console.assert(null!=t,"'this' is expected an Event object, but got",e),t}function o(e){null==e.passiveListener?e.event.cancelable&&(e.canceled=!0,"function"==typeof e.event.preventDefault&&e.event.preventDefault()):"undefined"!=typeof console&&"function"==typeof console.error&&console.error("Unable to preventDefault inside passive event listener invocation.",e.passiveListener)}function a(e,t){r.set(this,{eventTarget:e,event:t,eventPhase:2,currentTarget:e,canceled:!1,stopped:!1,immediateStopped:!1,passiveListener:null,timeStamp:t.timeStamp||Date.now()}),Object.defineProperty(this,"isTrusted",{value:!1,enumerable:!0});const n=Object.keys(t);for(let r=0;r<n.length;++r){const e=n[r];e in this||Object.defineProperty(this,e,s(e))}}function s(e){return{get(){return i(this).event[e]},set(t){i(this).event[e]=t},configurable:!0,enumerable:!0}}function u(e){return{value(){const t=i(this).event;return t[e].apply(t,arguments)},configurable:!0,enumerable:!0}}function c(e){if(null==e||e===Object.prototype)return a;let t=n.get(e);return null==t&&(t=function(e,t){const r=Object.keys(t);if(0===r.length)return e;function n(t,r){e.call(this,t,r)}n.prototype=Object.create(e.prototype,{constructor:{value:n,configurable:!0,writable:!0}});for(let i=0;i<r.length;++i){const o=r[i];if(!(o in e.prototype)){const e="function"==typeof Object.getOwnPropertyDescriptor(t,o).value;Object.defineProperty(n.prototype,o,e?u(o):s(o))}}return n}(c(Object.getPrototypeOf(e)),e),n.set(e,t)),t}function f(e){return i(e).immediateStopped}function d(e,t){i(e).passiveListener=t}a.prototype={get type(){return i(this).event.type},get target(){return i(this).eventTarget},get currentTarget(){return i(this).currentTarget},composedPath(){const e=i(this).currentTarget;return null==e?[]:[e]},get NONE(){return 0},get CAPTURING_PHASE(){return 1},get AT_TARGET(){return 2},get BUBBLING_PHASE(){return 3},get eventPhase(){return i(this).eventPhase},stopPropagation(){const e=i(this);e.stopped=!0,"function"==typeof e.event.stopPropagation&&e.event.stopPropagation()},stopImmediatePropagation(){const e=i(this);e.stopped=!0,e.immediateStopped=!0,"function"==typeof e.event.stopImmediatePropagation&&e.event.stopImmediatePropagation()},get bubbles(){return Boolean(i(this).event.bubbles)},get cancelable(){return Boolean(i(this).event.cancelable)},preventDefault(){o(i(this))},get defaultPrevented(){return i(this).canceled},get composed(){return Boolean(i(this).event.composed)},get timeStamp(){return i(this).timeStamp},get srcElement(){return i(this).eventTarget},get cancelBubble(){return i(this).stopped},set cancelBubble(e){if(!e)return;const t=i(this);t.stopped=!0,"boolean"==typeof t.event.cancelBubble&&(t.event.cancelBubble=!0)},get returnValue(){return!i(this).canceled},set returnValue(e){e||o(i(this))},initEvent(){}},Object.defineProperty(a.prototype,"constructor",{value:a,configurable:!0,writable:!0}),"undefined"!=typeof window&&void 0!==window.Event&&(Object.setPrototypeOf(a.prototype,window.Event.prototype),n.set(window.Event.prototype,a));const l=new WeakMap;function h(e){return null!==e&&"object"==typeof e}function p(e){const t=l.get(e);if(null==t)throw new TypeError("'this' is expected an EventTarget object, but got another value.");return t}function b(e,t){Object.defineProperty(e,`on${t}`,function(e){return{get(){let t=p(this).get(e);for(;null!=t;){if(3===t.listenerType)return t.listener;t=t.next}return null},set(t){"function"==typeof t||h(t)||(t=null);const r=p(this);let n=null,i=r.get(e);for(;null!=i;)3===i.listenerType?null!==n?n.next=i.next:null!==i.next?r.set(e,i.next):r.delete(e):n=i,i=i.next;if(null!==t){const i={listener:t,listenerType:3,passive:!1,once:!1,next:null};null===n?r.set(e,i):n.next=i}},configurable:!0,enumerable:!0}}(t))}function y(e){function t(){m.call(this)}t.prototype=Object.create(m.prototype,{constructor:{value:t,configurable:!0,writable:!0}});for(let r=0;r<e.length;++r)b(t.prototype,e[r]);return t}function m(){if(!(this instanceof m)){if(1===arguments.length&&Array.isArray(arguments[0]))return y(arguments[0]);if(arguments.length>0){const e=new Array(arguments.length);for(let t=0;t<arguments.length;++t)e[t]=arguments[t];return y(e)}throw new TypeError("Cannot call a class as a function")}l.set(this,new Map)}m.prototype={addEventListener(e,t,r){if(null==t)return;if("function"!=typeof t&&!h(t))throw new TypeError("'listener' should be a function or an object.");const n=p(this),i=h(r),o=(i?Boolean(r.capture):Boolean(r))?1:2,a={listener:t,listenerType:o,passive:i&&Boolean(r.passive),once:i&&Boolean(r.once),next:null};let s=n.get(e);if(void 0===s)return void n.set(e,a);let u=null;for(;null!=s;){if(s.listener===t&&s.listenerType===o)return;u=s,s=s.next}u.next=a},removeEventListener(e,t,r){if(null==t)return;const n=p(this),i=(h(r)?Boolean(r.capture):Boolean(r))?1:2;let o=null,a=n.get(e);for(;null!=a;){if(a.listener===t&&a.listenerType===i)return void(null!==o?o.next=a.next:null!==a.next?n.set(e,a.next):n.delete(e));o=a,a=a.next}},dispatchEvent(e){if(null==e||"string"!=typeof e.type)throw new TypeError('"event.type" should be a string.');const t=p(this),r=e.type;let n=t.get(r);if(null==n)return!0;const o=function(e,t){return new(c(Object.getPrototypeOf(t)))(e,t)}(this,e);let a=null;for(;null!=n;){if(n.once?null!==a?a.next=n.next:null!==n.next?t.set(r,n.next):t.delete(r):a=n,d(o,n.passive?n.listener:null),"function"==typeof n.listener)try{n.listener.call(this,o)}catch(s){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(s)}else 3!==n.listenerType&&"function"==typeof n.listener.handleEvent&&n.listener.handleEvent(o);if(f(o))break;n=n.next}return d(o,null),function(e,t){i(e).eventPhase=t}(o,0),function(e,t){i(e).currentTarget=t}(o,null),!o.defaultPrevented}},Object.defineProperty(m.prototype,"constructor",{value:m,configurable:!0,writable:!0}),"undefined"!=typeof window&&void 0!==window.EventTarget&&Object.setPrototypeOf(m.prototype,window.EventTarget.prototype),t.defineEventAttribute=b,t.EventTarget=m,t.default=m,e.exports=m,e.exports.EventTarget=e.exports.default=m,e.exports.defineEventAttribute=b},3005:(e,t,r)=>{const{Readable:n}=r(2781),i=new WeakMap;class o{constructor(e=[],t={}){let r=0;const n=e.map((e=>{let t;return t=e instanceof Buffer?e:ArrayBuffer.isView(e)?Buffer.from(e.buffer,e.byteOffset,e.byteLength):e instanceof ArrayBuffer?Buffer.from(e):e instanceof o?e:Buffer.from("string"==typeof e?e:String(e)),r+=t.length||t.size||0,t})),a=void 0===t.type?"":String(t.type).toLowerCase();i.set(this,{type:/[^\u0020-\u007E]/.test(a)?"":a,size:r,parts:n})}get size(){return i.get(this).size}get type(){return i.get(this).type}async text(){return Buffer.from(await this.arrayBuffer()).toString()}async arrayBuffer(){const e=new Uint8Array(this.size);let t=0;for await(const r of this.stream())e.set(r,t),t+=r.length;return e.buffer}stream(){return n.from(async function*(e){for(const t of e)"stream"in t?yield*t.stream():yield t}(i.get(this).parts))}slice(e=0,t=this.size,r=""){const{size:n}=this;let a=e<0?Math.max(n+e,0):Math.min(e,n),s=t<0?Math.max(n+t,0):Math.min(t,n);const u=Math.max(s-a,0),c=i.get(this).parts.values(),f=[];let d=0;for(const i of c){const e=ArrayBuffer.isView(i)?i.byteLength:i.size;if(a&&e<=a)a-=e,s-=e;else{const t=i.slice(a,Math.min(e,s));if(f.push(t),d+=ArrayBuffer.isView(t)?t.byteLength:t.size,a=0,d>=u)break}}const l=new o([],{type:String(r).toLowerCase()});return Object.assign(i.get(l),{size:u,parts:f}),l}get[Symbol.toStringTag](){return"Blob"}static[Symbol.hasInstance](e){return e&&"object"==typeof e&&"function"==typeof e.stream&&0===e.stream.length&&"function"==typeof e.constructor&&/^(Blob|File)$/.test(e[Symbol.toStringTag])}}Object.defineProperties(o.prototype,{size:{enumerable:!0},type:{enumerable:!0},slice:{enumerable:!0}}),e.exports=o},6204:(e,t,r)=>{var n=t;n.utils=r(6414),n.common=r(2238),n.sha=r(4538),n.ripemd=r(2185),n.hmac=r(6316),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},2238:(e,t,r)=>{"use strict";var n=r(6414),i=r(6794);function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=o,o.prototype.update=function(e,t){if(e=n.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-r,this.endian);for(var i=0;i<e.length;i+=this._delta32)this._update(e,i,i+this._delta32)}return this},o.prototype.digest=function(e){return this.update(this._pad()),i(null===this.pending),this._digest(e)},o.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,r=t-(e+this.padLength)%t,n=new Array(r+this.padLength);n[0]=128;for(var i=1;i<r;i++)n[i]=0;if(e<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)n[i++]=0;n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=e>>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;o<this.padLength;o++)n[i++]=0;return n}},6316:(e,t,r)=>{"use strict";var n=r(6414),i=r(6794);function o(e,t,r){if(!(this instanceof o))return new o(e,t,r);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(t,r))}e.exports=o,o.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t<this.blockSize;t++)e.push(0);for(t=0;t<e.length;t++)e[t]^=54;for(this.inner=(new this.Hash).update(e),t=0;t<e.length;t++)e[t]^=106;this.outer=(new this.Hash).update(e)},o.prototype.update=function(e,t){return this.inner.update(e,t),this},o.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)}},2185:(e,t,r)=>{"use strict";var n=r(6414),i=r(2238),o=n.rotl32,a=n.sum32,s=n.sum32_3,u=n.sum32_4,c=i.BlockHash;function f(){if(!(this instanceof f))return new f;c.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function d(e,t,r,n){return e<=15?t^r^n:e<=31?t&r|~t&n:e<=47?(t|~r)^n:e<=63?t&n|r&~n:t^(r|~n)}function l(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function h(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}n.inherits(f,c),t.ripemd160=f,f.blockSize=512,f.outSize=160,f.hmacStrength=192,f.padLength=64,f.prototype._update=function(e,t){for(var r=this.h[0],n=this.h[1],i=this.h[2],c=this.h[3],f=this.h[4],g=r,_=n,v=i,w=c,S=f,E=0;E<80;E++){var T=a(o(u(r,d(E,n,i,c),e[p[E]+t],l(E)),y[E]),f);r=f,f=c,c=o(i,10),i=n,n=T,T=a(o(u(g,d(79-E,_,v,w),e[b[E]+t],h(E)),m[E]),S),g=S,S=w,w=o(v,10),v=_,_=T}T=s(this.h[1],i,w),this.h[1]=s(this.h[2],c,S),this.h[2]=s(this.h[3],f,g),this.h[3]=s(this.h[4],r,_),this.h[4]=s(this.h[0],n,v),this.h[0]=T},f.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"little"):n.split32(this.h,"little")};var p=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],b=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],y=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],m=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},4538:(e,t,r)=>{"use strict";t.sha1=r(6854),t.sha224=r(9104),t.sha256=r(7284),t.sha384=r(8909),t.sha512=r(1260)},6854:(e,t,r)=>{"use strict";var n=r(6414),i=r(2238),o=r(2181),a=n.rotl32,s=n.sum32,u=n.sum32_5,c=o.ft_1,f=i.BlockHash,d=[1518500249,1859775393,2400959708,3395469782];function l(){if(!(this instanceof l))return new l;f.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(l,f),e.exports=l,l.blockSize=512,l.outSize=160,l.hmacStrength=80,l.padLength=64,l.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n<r.length;n++)r[n]=a(r[n-3]^r[n-8]^r[n-14]^r[n-16],1);var i=this.h[0],o=this.h[1],f=this.h[2],l=this.h[3],h=this.h[4];for(n=0;n<r.length;n++){var p=~~(n/20),b=u(a(i,5),c(p,o,f,l),h,r[n],d[p]);h=l,l=f,f=a(o,30),o=i,i=b}this.h[0]=s(this.h[0],i),this.h[1]=s(this.h[1],o),this.h[2]=s(this.h[2],f),this.h[3]=s(this.h[3],l),this.h[4]=s(this.h[4],h)},l.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},9104:(e,t,r)=>{"use strict";var n=r(6414),i=r(7284);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}n.inherits(o,i),e.exports=o,o.blockSize=512,o.outSize=224,o.hmacStrength=192,o.padLength=64,o.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,7),"big"):n.split32(this.h.slice(0,7),"big")}},7284:(e,t,r)=>{"use strict";var n=r(6414),i=r(2238),o=r(2181),a=r(6794),s=n.sum32,u=n.sum32_4,c=n.sum32_5,f=o.ch32,d=o.maj32,l=o.s0_256,h=o.s1_256,p=o.g0_256,b=o.g1_256,y=i.BlockHash,m=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function g(){if(!(this instanceof g))return new g;y.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=m,this.W=new Array(64)}n.inherits(g,y),e.exports=g,g.blockSize=512,g.outSize=256,g.hmacStrength=192,g.padLength=64,g.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n<r.length;n++)r[n]=u(b(r[n-2]),r[n-7],p(r[n-15]),r[n-16]);var i=this.h[0],o=this.h[1],y=this.h[2],m=this.h[3],g=this.h[4],_=this.h[5],v=this.h[6],w=this.h[7];for(a(this.k.length===r.length),n=0;n<r.length;n++){var S=c(w,h(g),f(g,_,v),this.k[n],r[n]),E=s(l(i),d(i,o,y));w=v,v=_,_=g,g=s(m,S),m=y,y=o,o=i,i=s(S,E)}this.h[0]=s(this.h[0],i),this.h[1]=s(this.h[1],o),this.h[2]=s(this.h[2],y),this.h[3]=s(this.h[3],m),this.h[4]=s(this.h[4],g),this.h[5]=s(this.h[5],_),this.h[6]=s(this.h[6],v),this.h[7]=s(this.h[7],w)},g.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},8909:(e,t,r)=>{"use strict";var n=r(6414),i=r(1260);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(o,i),e.exports=o,o.blockSize=1024,o.outSize=384,o.hmacStrength=192,o.padLength=128,o.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")}},1260:(e,t,r)=>{"use strict";var n=r(6414),i=r(2238),o=r(6794),a=n.rotr64_hi,s=n.rotr64_lo,u=n.shr64_hi,c=n.shr64_lo,f=n.sum64,d=n.sum64_hi,l=n.sum64_lo,h=n.sum64_4_hi,p=n.sum64_4_lo,b=n.sum64_5_hi,y=n.sum64_5_lo,m=i.BlockHash,g=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function _(){if(!(this instanceof _))return new _;m.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=g,this.W=new Array(160)}function v(e,t,r,n,i){var o=e&r^~e&i;return o<0&&(o+=4294967296),o}function w(e,t,r,n,i,o){var a=t&n^~t&o;return a<0&&(a+=4294967296),a}function S(e,t,r,n,i){var o=e&r^e&i^r&i;return o<0&&(o+=4294967296),o}function E(e,t,r,n,i,o){var a=t&n^t&o^n&o;return a<0&&(a+=4294967296),a}function T(e,t){var r=a(e,t,28)^a(t,e,2)^a(t,e,7);return r<0&&(r+=4294967296),r}function R(e,t){var r=s(e,t,28)^s(t,e,2)^s(t,e,7);return r<0&&(r+=4294967296),r}function M(e,t){var r=a(e,t,14)^a(e,t,18)^a(t,e,9);return r<0&&(r+=4294967296),r}function P(e,t){var r=s(e,t,14)^s(e,t,18)^s(t,e,9);return r<0&&(r+=4294967296),r}function A(e,t){var r=a(e,t,1)^a(e,t,8)^u(e,t,7);return r<0&&(r+=4294967296),r}function k(e,t){var r=s(e,t,1)^s(e,t,8)^c(e,t,7);return r<0&&(r+=4294967296),r}function O(e,t){var r=a(e,t,19)^a(t,e,29)^u(e,t,6);return r<0&&(r+=4294967296),r}function x(e,t){var r=s(e,t,19)^s(t,e,29)^c(e,t,6);return r<0&&(r+=4294967296),r}n.inherits(_,m),e.exports=_,_.blockSize=1024,_.outSize=512,_.hmacStrength=192,_.padLength=128,_.prototype._prepareBlock=function(e,t){for(var r=this.W,n=0;n<32;n++)r[n]=e[t+n];for(;n<r.length;n+=2){var i=O(r[n-4],r[n-3]),o=x(r[n-4],r[n-3]),a=r[n-14],s=r[n-13],u=A(r[n-30],r[n-29]),c=k(r[n-30],r[n-29]),f=r[n-32],d=r[n-31];r[n]=h(i,o,a,s,u,c,f,d),r[n+1]=p(i,o,a,s,u,c,f,d)}},_.prototype._update=function(e,t){this._prepareBlock(e,t);var r=this.W,n=this.h[0],i=this.h[1],a=this.h[2],s=this.h[3],u=this.h[4],c=this.h[5],h=this.h[6],p=this.h[7],m=this.h[8],g=this.h[9],_=this.h[10],A=this.h[11],k=this.h[12],O=this.h[13],x=this.h[14],C=this.h[15];o(this.k.length===r.length);for(var j=0;j<r.length;j+=2){var B=x,q=C,I=M(m,g),N=P(m,g),L=v(m,g,_,A,k),z=w(m,g,_,A,k,O),D=this.k[j],F=this.k[j+1],W=r[j],H=r[j+1],U=b(B,q,I,N,L,z,D,F,W,H),$=y(B,q,I,N,L,z,D,F,W,H);B=T(n,i),q=R(n,i),I=S(n,i,a,s,u),N=E(n,i,a,s,u,c);var G=d(B,q,I,N),V=l(B,q,I,N);x=k,C=O,k=_,O=A,_=m,A=g,m=d(h,p,U,$),g=l(p,p,U,$),h=u,p=c,u=a,c=s,a=n,s=i,n=d(U,$,G,V),i=l(U,$,G,V)}f(this.h,0,n,i),f(this.h,2,a,s),f(this.h,4,u,c),f(this.h,6,h,p),f(this.h,8,m,g),f(this.h,10,_,A),f(this.h,12,k,O),f(this.h,14,x,C)},_.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},2181:(e,t,r)=>{"use strict";var n=r(6414).rotr32;function i(e,t,r){return e&t^~e&r}function o(e,t,r){return e&t^e&r^t&r}function a(e,t,r){return e^t^r}t.ft_1=function(e,t,r,n){return 0===e?i(t,r,n):1===e||3===e?a(t,r,n):2===e?o(t,r,n):void 0},t.ch32=i,t.maj32=o,t.p32=a,t.s0_256=function(e){return n(e,2)^n(e,13)^n(e,22)},t.s1_256=function(e){return n(e,6)^n(e,11)^n(e,25)},t.g0_256=function(e){return n(e,7)^n(e,18)^e>>>3},t.g1_256=function(e){return n(e,17)^n(e,19)^e>>>10}},6414:(e,t,r)=>{"use strict";var n=r(6794),i=r(7577);function o(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function a(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function s(e){return 1===e.length?"0"+e:e}function u(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=i,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),i=0;i<e.length;i+=2)r.push(parseInt(e[i]+e[i+1],16))}else for(var n=0,i=0;i<e.length;i++){var a=e.charCodeAt(i);a<128?r[n++]=a:a<2048?(r[n++]=a>>6|192,r[n++]=63&a|128):o(e,i)?(a=65536+((1023&a)<<10)+(1023&e.charCodeAt(++i)),r[n++]=a>>18|240,r[n++]=a>>12&63|128,r[n++]=a>>6&63|128,r[n++]=63&a|128):(r[n++]=a>>12|224,r[n++]=a>>6&63|128,r[n++]=63&a|128)}else for(i=0;i<e.length;i++)r[i]=0|e[i];return r},t.toHex=function(e){for(var t="",r=0;r<e.length;r++)t+=s(e[r].toString(16));return t},t.htonl=a,t.toHex32=function(e,t){for(var r="",n=0;n<e.length;n++){var i=e[n];"little"===t&&(i=a(i)),r+=u(i.toString(16))}return r},t.zero2=s,t.zero8=u,t.join32=function(e,t,r,i){var o=r-t;n(o%4==0);for(var a=new Array(o/4),s=0,u=t;s<a.length;s++,u+=4){var c;c="big"===i?e[u]<<24|e[u+1]<<16|e[u+2]<<8|e[u+3]:e[u+3]<<24|e[u+2]<<16|e[u+1]<<8|e[u],a[s]=c>>>0}return a},t.split32=function(e,t){for(var r=new Array(4*e.length),n=0,i=0;n<e.length;n++,i+=4){var o=e[n];"big"===t?(r[i]=o>>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<<t|e>>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,r){return e+t+r>>>0},t.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},t.sum32_5=function(e,t,r,n,i){return e+t+r+n+i>>>0},t.sum64=function(e,t,r,n){var i=e[t],o=n+e[t+1]>>>0,a=(o<n?1:0)+r+i;e[t]=a>>>0,e[t+1]=o},t.sum64_hi=function(e,t,r,n){return(t+n>>>0<t?1:0)+e+r>>>0},t.sum64_lo=function(e,t,r,n){return t+n>>>0},t.sum64_4_hi=function(e,t,r,n,i,o,a,s){var u=0,c=t;return u+=(c=c+n>>>0)<t?1:0,u+=(c=c+o>>>0)<o?1:0,e+r+i+a+(u+=(c=c+s>>>0)<s?1:0)>>>0},t.sum64_4_lo=function(e,t,r,n,i,o,a,s){return t+n+o+s>>>0},t.sum64_5_hi=function(e,t,r,n,i,o,a,s,u,c){var f=0,d=t;return f+=(d=d+n>>>0)<t?1:0,f+=(d=d+o>>>0)<o?1:0,f+=(d=d+s>>>0)<s?1:0,e+r+i+a+u+(f+=(d=d+c>>>0)<c?1:0)>>>0},t.sum64_5_lo=function(e,t,r,n,i,o,a,s,u,c){return t+n+o+s+c>>>0},t.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},t.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},t.shr64_hi=function(e,t,r){return e>>>r},t.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},4859:(e,t,r)=>{"use strict";var n=r(6204),i=r(7705),o=r(6794);function a(e){if(!(this instanceof a))return new a(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=i.toArray(e.entropy,e.entropyEnc||"hex"),r=i.toArray(e.nonce,e.nonceEnc||"hex"),n=i.toArray(e.pers,e.persEnc||"hex");o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}e.exports=a,a.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(n),this._reseed=1,this.reseedInterval=281474976710656},a.prototype._hmac=function(){return new n.hmac(this.hash,this.K)},a.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},a.prototype.reseed=function(e,t,r,n){"string"!=typeof t&&(n=r,r=t,t=null),e=i.toArray(e,t),r=i.toArray(r,n),o(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},a.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=i.toArray(r,n||"hex"),this._update(r));for(var o=[];o.length<e;)this.V=this._hmac().update(this.V).digest(),o=o.concat(this.V);var a=o.slice(0,e);return this._update(r),this._reseed++,i.encode(a,t)}},7577:(e,t,r)=>{try{var n=r(3837);if("function"!=typeof n.inherits)throw"";e.exports=n.inherits}catch(i){e.exports=r(5153)}},5153:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},8041:(e,t,r)=>{"use strict";e.exports=r(8321)},8086:(e,t,r)=>{var n;!function(){"use strict";var i="input is invalid type",o="object"==typeof window,a=o?window:{};a.JS_SHA3_NO_WINDOW&&(o=!1);var s=!o&&"object"==typeof self;!a.JS_SHA3_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node?a=r.g:s&&(a=self);var u=!a.JS_SHA3_NO_COMMON_JS&&e.exports,c=r.amdO,f=!a.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,d="0123456789abcdef".split(""),l=[4,1024,262144,67108864],h=[0,8,16,24],p=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],b=[224,256,384,512],y=[128,256],m=["hex","buffer","arrayBuffer","array","digest"],g={128:168,256:136};!a.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!f||!a.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"==typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});for(var _=function(e,t,r){return function(n){return new B(e,t,e).update(n)[r]()}},v=function(e,t,r){return function(n,i){return new B(e,t,i).update(n)[r]()}},w=function(e,t,r){return function(t,n,i,o){return M["cshake"+e].update(t,n,i,o)[r]()}},S=function(e,t,r){return function(t,n,i,o){return M["kmac"+e].update(t,n,i,o)[r]()}},E=function(e,t,r,n){for(var i=0;i<m.length;++i){var o=m[i];e[o]=t(r,n,o)}return e},T=function(e,t){var r=_(e,t,"hex");return r.create=function(){return new B(e,t,e)},r.update=function(e){return r.create().update(e)},E(r,_,e,t)},R=[{name:"keccak",padding:[1,256,65536,16777216],bits:b,createMethod:T},{name:"sha3",padding:[6,1536,393216,100663296],bits:b,createMethod:T},{name:"shake",padding:[31,7936,2031616,520093696],bits:y,createMethod:function(e,t){var r=v(e,t,"hex");return r.create=function(r){return new B(e,t,r)},r.update=function(e,t){return r.create(t).update(e)},E(r,v,e,t)}},{name:"cshake",padding:l,bits:y,createMethod:function(e,t){var r=g[e],n=w(e,0,"hex");return n.create=function(n,i,o){return i||o?new B(e,t,n).bytepad([i,o],r):M["shake"+e].create(n)},n.update=function(e,t,r,i){return n.create(t,r,i).update(e)},E(n,w,e,t)}},{name:"kmac",padding:l,bits:y,createMethod:function(e,t){var r=g[e],n=S(e,0,"hex");return n.create=function(n,i,o){return new q(e,t,i).bytepad(["KMAC",o],r).bytepad([n],r)},n.update=function(e,t,r,i){return n.create(e,r,i).update(t)},E(n,S,e,t)}}],M={},P=[],A=0;A<R.length;++A)for(var k=R[A],O=k.bits,x=0;x<O.length;++x){var C=k.name+"_"+O[x];if(P.push(C),M[C]=k.createMethod(O[x],k.padding),"sha3"!==k.name){var j=k.name+O[x];P.push(j),M[j]=M[C]}}function B(e,t,r){this.blocks=[],this.s=[],this.padding=t,this.outputBits=r,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(e<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}function q(e,t,r){B.call(this,e,t,r)}B.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called");var t,r=typeof e;if("string"!==r){if("object"!==r)throw new Error(i);if(null===e)throw new Error(i);if(f&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||f&&ArrayBuffer.isView(e)))throw new Error(i);t=!0}for(var n,o,a=this.blocks,s=this.byteCount,u=e.length,c=this.blockCount,d=0,l=this.s;d<u;){if(this.reset)for(this.reset=!1,a[0]=this.block,n=1;n<c+1;++n)a[n]=0;if(t)for(n=this.start;d<u&&n<s;++d)a[n>>2]|=e[d]<<h[3&n++];else for(n=this.start;d<u&&n<s;++d)(o=e.charCodeAt(d))<128?a[n>>2]|=o<<h[3&n++]:o<2048?(a[n>>2]|=(192|o>>6)<<h[3&n++],a[n>>2]|=(128|63&o)<<h[3&n++]):o<55296||o>=57344?(a[n>>2]|=(224|o>>12)<<h[3&n++],a[n>>2]|=(128|o>>6&63)<<h[3&n++],a[n>>2]|=(128|63&o)<<h[3&n++]):(o=65536+((1023&o)<<10|1023&e.charCodeAt(++d)),a[n>>2]|=(240|o>>18)<<h[3&n++],a[n>>2]|=(128|o>>12&63)<<h[3&n++],a[n>>2]|=(128|o>>6&63)<<h[3&n++],a[n>>2]|=(128|63&o)<<h[3&n++]);if(this.lastByteIndex=n,n>=s){for(this.start=n-s,this.block=a[c],n=0;n<c;++n)l[n]^=a[n];I(l),this.reset=!0}else this.start=n}return this},B.prototype.encode=function(e,t){var r=255&e,n=1,i=[r];for(r=255&(e>>=8);r>0;)i.unshift(r),r=255&(e>>=8),++n;return t?i.push(n):i.unshift(n),this.update(i),i.length},B.prototype.encodeString=function(e){var t,r=typeof e;if("string"!==r){if("object"!==r)throw new Error(i);if(null===e)throw new Error(i);if(f&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||f&&ArrayBuffer.isView(e)))throw new Error(i);t=!0}var n=0,o=e.length;if(t)n=o;else for(var a=0;a<e.length;++a){var s=e.charCodeAt(a);s<128?n+=1:s<2048?n+=2:s<55296||s>=57344?n+=3:(s=65536+((1023&s)<<10|1023&e.charCodeAt(++a)),n+=4)}return n+=this.encode(8*n),this.update(e),n},B.prototype.bytepad=function(e,t){for(var r=this.encode(t),n=0;n<e.length;++n)r+=this.encodeString(e[n]);var i=t-r%t,o=[];return o.length=i,this.update(o),this},B.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex,r=this.blockCount,n=this.s;if(e[t>>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t<r+1;++t)e[t]=0;for(e[r-1]|=2147483648,t=0;t<r;++t)n[t]^=e[t];I(n)}},B.prototype.toString=B.prototype.hex=function(){this.finalize();for(var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,a=0,s="";a<n;){for(o=0;o<t&&a<n;++o,++a)e=r[o],s+=d[e>>4&15]+d[15&e]+d[e>>12&15]+d[e>>8&15]+d[e>>20&15]+d[e>>16&15]+d[e>>28&15]+d[e>>24&15];a%t==0&&(I(r),o=0)}return i&&(e=r[o],s+=d[e>>4&15]+d[15&e],i>1&&(s+=d[e>>12&15]+d[e>>8&15]),i>2&&(s+=d[e>>20&15]+d[e>>16&15])),s},B.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,a=0,s=this.outputBits>>3;e=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(s);for(var u=new Uint32Array(e);a<n;){for(o=0;o<t&&a<n;++o,++a)u[a]=r[o];a%t==0&&I(r)}return i&&(u[o]=r[o],e=e.slice(0,s)),e},B.prototype.buffer=B.prototype.arrayBuffer,B.prototype.digest=B.prototype.array=function(){this.finalize();for(var e,t,r=this.blockCount,n=this.s,i=this.outputBlocks,o=this.extraBytes,a=0,s=0,u=[];s<i;){for(a=0;a<r&&s<i;++a,++s)e=s<<2,t=n[a],u[e]=255&t,u[e+1]=t>>8&255,u[e+2]=t>>16&255,u[e+3]=t>>24&255;s%r==0&&I(n)}return o&&(e=s<<2,t=n[a],u[e]=255&t,o>1&&(u[e+1]=t>>8&255),o>2&&(u[e+2]=t>>16&255)),u},q.prototype=new B,q.prototype.finalize=function(){return this.encode(this.outputBits,!0),B.prototype.finalize.call(this)};var I=function(e){var t,r,n,i,o,a,s,u,c,f,d,l,h,b,y,m,g,_,v,w,S,E,T,R,M,P,A,k,O,x,C,j,B,q,I,N,L,z,D,F,W,H,U,$,G,V,K,Y,X,J,Z,Q,ee,te,re,ne,ie,oe,ae,se,ue,ce,fe;for(n=0;n<48;n+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],a=e[2]^e[12]^e[22]^e[32]^e[42],s=e[3]^e[13]^e[23]^e[33]^e[43],u=e[4]^e[14]^e[24]^e[34]^e[44],c=e[5]^e[15]^e[25]^e[35]^e[45],f=e[6]^e[16]^e[26]^e[36]^e[46],d=e[7]^e[17]^e[27]^e[37]^e[47],t=(l=e[8]^e[18]^e[28]^e[38]^e[48])^(a<<1|s>>>31),r=(h=e[9]^e[19]^e[29]^e[39]^e[49])^(s<<1|a>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=i^(u<<1|c>>>31),r=o^(c<<1|u>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=a^(f<<1|d>>>31),r=s^(d<<1|f>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=u^(l<<1|h>>>31),r=c^(h<<1|l>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=f^(i<<1|o>>>31),r=d^(o<<1|i>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,b=e[0],y=e[1],V=e[11]<<4|e[10]>>>28,K=e[10]<<4|e[11]>>>28,k=e[20]<<3|e[21]>>>29,O=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,ue=e[30]<<9|e[31]>>>23,H=e[40]<<18|e[41]>>>14,U=e[41]<<18|e[40]>>>14,q=e[2]<<1|e[3]>>>31,I=e[3]<<1|e[2]>>>31,m=e[13]<<12|e[12]>>>20,g=e[12]<<12|e[13]>>>20,Y=e[22]<<10|e[23]>>>22,X=e[23]<<10|e[22]>>>22,x=e[33]<<13|e[32]>>>19,C=e[32]<<13|e[33]>>>19,ce=e[42]<<2|e[43]>>>30,fe=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,N=e[14]<<6|e[15]>>>26,L=e[15]<<6|e[14]>>>26,_=e[25]<<11|e[24]>>>21,v=e[24]<<11|e[25]>>>21,J=e[34]<<15|e[35]>>>17,Z=e[35]<<15|e[34]>>>17,j=e[45]<<29|e[44]>>>3,B=e[44]<<29|e[45]>>>3,R=e[6]<<28|e[7]>>>4,M=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,z=e[26]<<25|e[27]>>>7,D=e[27]<<25|e[26]>>>7,w=e[36]<<21|e[37]>>>11,S=e[37]<<21|e[36]>>>11,Q=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,$=e[8]<<27|e[9]>>>5,G=e[9]<<27|e[8]>>>5,P=e[18]<<20|e[19]>>>12,A=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,ae=e[28]<<7|e[29]>>>25,F=e[38]<<8|e[39]>>>24,W=e[39]<<8|e[38]>>>24,E=e[48]<<14|e[49]>>>18,T=e[49]<<14|e[48]>>>18,e[0]=b^~m&_,e[1]=y^~g&v,e[10]=R^~P&k,e[11]=M^~A&O,e[20]=q^~N&z,e[21]=I^~L&D,e[30]=$^~V&Y,e[31]=G^~K&X,e[40]=te^~ne&oe,e[41]=re^~ie&ae,e[2]=m^~_&w,e[3]=g^~v&S,e[12]=P^~k&x,e[13]=A^~O&C,e[22]=N^~z&F,e[23]=L^~D&W,e[32]=V^~Y&J,e[33]=K^~X&Z,e[42]=ne^~oe&se,e[43]=ie^~ae&ue,e[4]=_^~w&E,e[5]=v^~S&T,e[14]=k^~x&j,e[15]=O^~C&B,e[24]=z^~F&H,e[25]=D^~W&U,e[34]=Y^~J&Q,e[35]=X^~Z&ee,e[44]=oe^~se&ce,e[45]=ae^~ue&fe,e[6]=w^~E&b,e[7]=S^~T&y,e[16]=x^~j&R,e[17]=C^~B&M,e[26]=F^~H&q,e[27]=W^~U&I,e[36]=J^~Q&$,e[37]=Z^~ee&G,e[46]=se^~ce&te,e[47]=ue^~fe&re,e[8]=E^~b&m,e[9]=T^~y&g,e[18]=j^~R&P,e[19]=B^~M&A,e[28]=H^~q&N,e[29]=U^~I&L,e[38]=Q^~$&V,e[39]=ee^~G&K,e[48]=ce^~te&ne,e[49]=fe^~re&ie,e[0]^=p[n],e[1]^=p[n+1]};if(u)e.exports=M;else{for(A=0;A<P.length;++A)a[P[A]]=M[P[A]];c&&(void 0===(n=function(){return M}.call(t,r,t,e))||(e.exports=n))}}()},7567:(e,t,r)=>{"use strict";const n=r(5234),i=r(6123);if(r.g.fetch||(r.g.fetch=(e,t)=>n(e,{highWaterMark:1e7,...t})),r.g.Headers||(r.g.Headers=n.Headers),r.g.Request||(r.g.Request=n.Request),r.g.Response||(r.g.Response=n.Response),r.g.AbortController||(r.g.AbortController=i),!r.g.ReadableStream)try{r.g.ReadableStream=r(9902)}catch(o){}e.exports=r(1166)},1166:function(e,t,r){e.exports=function(){"use strict";const e={},t=e=>"undefined"!=typeof self&&self&&e in self?self:"undefined"!=typeof window&&window&&e in window?window:void 0!==r.g&&r.g&&e in r.g?r.g:"undefined"!=typeof globalThis&&globalThis?globalThis:void 0,n=["Headers","Request","Response","ReadableStream","fetch","AbortController","FormData"];for(const r of n)Object.defineProperty(e,r,{get(){const e=t(r),n=e&&e[r];return"function"==typeof n?n.bind(e):n}});const i=e=>null!==e&&"object"==typeof e,o="function"==typeof e.AbortController,a="function"==typeof e.ReadableStream,s="function"==typeof e.FormData,u=(t,r)=>{const n=new e.Headers(t||{}),i=r instanceof e.Headers,o=new e.Headers(r||{});for(const[e,a]of o)i&&"undefined"===a||void 0===a?n.delete(e):n.set(e,a);return n},c=(...e)=>{let t={},r={};for(const n of e){if(Array.isArray(n))Array.isArray(t)||(t=[]),t=[...t,...n];else if(i(n)){for(let[e,r]of Object.entries(n))i(r)&&e in t&&(r=c(t[e],r)),t={...t,[e]:r};i(n.headers)&&(r=u(r,n.headers))}t.headers=r}return t},f=["get","post","put","patch","head","delete"],d={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*"},l=["get","put","head","delete","options","trace"],h=[408,413,429,500,502,503,504],p=[413,429,503],b=Symbol("stop");class y extends Error{constructor(e){super(e.statusText||String(0===e.status||e.status?e.status:"Unknown response error")),this.name="HTTPError",this.response=e}}class m extends Error{constructor(e){super("Request timed out"),this.name="TimeoutError",this.request=e}}const g=e=>new Promise((t=>setTimeout(t,e))),_=(e,t,r)=>new Promise(((n,i)=>{const o=setTimeout((()=>{t&&t.abort(),i(new m(e))}),r.timeout);r.fetch(e).then(n).catch(i).then((()=>{clearTimeout(o)}))})),v=e=>f.includes(e)?e.toUpperCase():e,w={limit:2,methods:l,statusCodes:h,afterStatusCodes:p},S=(e={})=>{if("number"==typeof e)return{...w,limit:e};if(e.methods&&!Array.isArray(e.methods))throw new Error("retry.methods must be an array");if(e.statusCodes&&!Array.isArray(e.statusCodes))throw new Error("retry.statusCodes must be an array");return{...w,...e,afterStatusCodes:p}},E=2147483647;class T{constructor(t,r={}){if(this._retryCount=0,this._input=t,this._options={credentials:this._input.credentials||"same-origin",...r,headers:u(this._input.headers,r.headers),hooks:c({beforeRequest:[],beforeRetry:[],afterResponse:[]},r.hooks),method:v(r.method||this._input.method),prefixUrl:String(r.prefixUrl||""),retry:S(r.retry),throwHttpErrors:!1!==r.throwHttpErrors,timeout:void 0===r.timeout?1e4:r.timeout,fetch:r.fetch||e.fetch},"string"!=typeof this._input&&!(this._input instanceof URL||this._input instanceof e.Request))throw new TypeError("`input` must be a string, URL, or Request");if(this._options.prefixUrl&&"string"==typeof this._input){if(this._input.startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");this._options.prefixUrl.endsWith("/")||(this._options.prefixUrl+="/"),this._input=this._options.prefixUrl+this._input}if(o&&(this.abortController=new e.AbortController,this._options.signal&&this._options.signal.addEventListener("abort",(()=>{this.abortController.abort()})),this._options.signal=this.abortController.signal),this.request=new e.Request(this._input,this._options),this._options.searchParams){const t="?"+new URLSearchParams(this._options.searchParams).toString(),r=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,t);!(s&&this._options.body instanceof e.FormData||this._options.body instanceof URLSearchParams)||this._options.headers&&this._options.headers["content-type"]||this.request.headers.delete("content-type"),this.request=new e.Request(new e.Request(r,this.request),this._options)}void 0!==this._options.json&&(this._options.body=JSON.stringify(this._options.json),this.request.headers.set("content-type","application/json"),this.request=new e.Request(this.request,{body:this._options.body}));const n=async()=>{if(this._options.timeout>E)throw new RangeError(`The \`timeout\` option cannot be greater than ${E}`);await g(1);let t=await this._fetch();for(const r of this._options.hooks.afterResponse){const n=await r(this.request,this._options,this._decorateResponse(t.clone()));n instanceof e.Response&&(t=n)}if(this._decorateResponse(t),!t.ok&&this._options.throwHttpErrors)throw new y(t);if(this._options.onDownloadProgress){if("function"!=typeof this._options.onDownloadProgress)throw new TypeError("The `onDownloadProgress` option must be a function");if(!a)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");return this._stream(t.clone(),this._options.onDownloadProgress)}return t},i=this._options.retry.methods.includes(this.request.method.toLowerCase())?this._retry(n):n();for(const[e,o]of Object.entries(d))i[e]=async()=>{this.request.headers.set("accept",this.request.headers.get("accept")||o);const t=(await i).clone();if("json"===e){if(204===t.status)return"";if(r.parseJson)return r.parseJson(await t.text())}return t[e]()};return i}_calculateRetryDelay(e){if(this._retryCount++,this._retryCount<this._options.retry.limit&&!(e instanceof m)){if(e instanceof y){if(!this._options.retry.statusCodes.includes(e.response.status))return 0;const t=e.response.headers.get("Retry-After");if(t&&this._options.retry.afterStatusCodes.includes(e.response.status)){let e=Number(t);return Number.isNaN(e)?e=Date.parse(t)-Date.now():e*=1e3,void 0!==this._options.retry.maxRetryAfter&&e>this._options.retry.maxRetryAfter?0:e}if(413===e.response.status)return 0}return.3*2**(this._retryCount-1)*1e3}return 0}_decorateResponse(e){return this._options.parseJson&&(e.json=async()=>this._options.parseJson(await e.text())),e}async _retry(e){try{return await e()}catch(t){const r=Math.min(this._calculateRetryDelay(t),E);if(0!==r&&this._retryCount>0){await g(r);for(const e of this._options.hooks.beforeRetry)if(await e({request:this.request,options:this._options,error:t,retryCount:this._retryCount})===b)return;return this._retry(e)}if(this._options.throwHttpErrors)throw t}}async _fetch(){for(const e of this._options.hooks.beforeRequest){const t=await e(this.request,this._options);if(t instanceof Request){this.request=t;break}if(t instanceof Response)return t}return!1===this._options.timeout?this._options.fetch(this.request.clone()):_(this.request.clone(),this.abortController,this._options)}_stream(t,r){const n=Number(t.headers.get("content-length"))||0;let i=0;return new e.Response(new e.ReadableStream({start(e){const o=t.body.getReader();async function a(){const{done:t,value:s}=await o.read();t?e.close():(r&&(i+=s.byteLength,r({percent:0===n?0:i/n,transferredBytes:i,totalBytes:n},s)),e.enqueue(s),a())}r&&r({percent:0,transferredBytes:0,totalBytes:n},new Uint8Array),a()}}))}}const R=(...e)=>{for(const t of e)if((!i(t)||Array.isArray(t))&&void 0!==t)throw new TypeError("The `options` argument must be an object");return c({},...e)},M=e=>{const t=(t,r)=>new T(t,R(e,r));for(const r of f)t[r]=(t,n)=>new T(t,R(e,n,{method:r}));return t.HTTPError=y,t.TimeoutError=m,t.create=e=>M(R(e)),t.extend=t=>M(R(e,t)),t.stop=b,t};return M()}()},6794:e=>{function t(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=t,t.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)}},7705:(e,t)=>{"use strict";var r=t;function n(e){return 1===e.length?"0"+e:e}function i(e){for(var t="",r=0;r<e.length;r++)t+=n(e[r].toString(16));return t}r.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"!=typeof e){for(var n=0;n<e.length;n++)r[n]=0|e[n];return r}if("hex"===t){(e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e);for(n=0;n<e.length;n+=2)r.push(parseInt(e[n]+e[n+1],16))}else for(n=0;n<e.length;n++){var i=e.charCodeAt(n),o=i>>8,a=255&i;o?r.push(o,a):r.push(a)}return r},r.zero2=n,r.toHex=i,r.encode=function(e,t){return"hex"===t?i(e):e}},1363:(e,t,r)=>{var n=r(7147),i=r(1017),o=r(2037),a=require,s=process.config&&process.config.variables||{},u=!!process.env.PREBUILDS_ONLY,c=process.versions.modules,f=!(!process.versions||!process.versions.electron)||!!process.env.ELECTRON_RUN_AS_NODE||"undefined"!=typeof window&&window.process&&"renderer"===window.process.type?"electron":"node",d=o.arch(),l=o.platform(),h=process.env.LIBC||(function(e){return"linux"===e&&n.existsSync("/etc/alpine-release")}(l)?"musl":"glibc"),p=process.env.ARM_VERSION||("arm64"===d?"8":s.arm_version)||"",b=(process.versions.uv||"").split(".")[0];function y(e){return a(y.path(e))}function m(e){try{return n.readdirSync(e)}catch(t){return[]}}function g(e,t){var r=m(e).filter(t);return r[0]&&i.join(e,r[0])}function _(e){return/\.node$/.test(e)}function v(e){var t=e.split("-");if(2===t.length){var r=t[0],n=t[1].split("+");if(r&&n.length&&n.every(Boolean))return{name:e,platform:r,architectures:n}}}function w(e,t){return function(r){return null!=r&&(r.platform===e&&r.architectures.includes(t))}}function S(e,t){return e.architectures.length-t.architectures.length}function E(e){var t=e.split("."),r={file:e,specificity:0};if("node"===t.pop()){for(var n=0;n<t.length;n++){var i=t[n];if("node"===i||"electron"===i||"node-webkit"===i)r.runtime=i;else if("napi"===i)r.napi=!0;else if("abi"===i.slice(0,3))r.abi=i.slice(3);else if("uv"===i.slice(0,2))r.uv=i.slice(2);else if("armv"===i.slice(0,4))r.armv=i.slice(4);else{if("glibc"!==i&&"musl"!==i)continue;r.libc=i}r.specificity++}return r}}function T(e,t){return function(r){return null!=r&&(!(r.runtime!==e&&!function(e){return"node"===e.runtime&&e.napi}(r))&&(!(r.abi!==t&&!r.napi)&&((!r.uv||r.uv===b)&&((!r.armv||r.armv===p)&&(!r.libc||r.libc===h)))))}}function R(e){return function(t,r){return t.runtime!==r.runtime?t.runtime===e?-1:1:t.abi!==r.abi?t.abi?-1:1:t.specificity!==r.specificity?t.specificity>r.specificity?-1:1:0}}e.exports=y,y.path=function(e){e=i.resolve(e||".");try{var t=a(i.join(e,"package.json")).name.toUpperCase().replace(/-/g,"_");process.env[t+"_PREBUILD"]&&(e=process.env[t+"_PREBUILD"])}catch(P){}if(!u){var r=g(i.join(e,"build/Release"),_);if(r)return r;var n=g(i.join(e,"build/Debug"),_);if(n)return n}var o=M(e);if(o)return o;var s=M(i.dirname(process.execPath));if(s)return s;var y=["platform="+l,"arch="+d,"runtime="+f,"abi="+c,"uv="+b,p?"armv="+p:"","libc="+h,"node="+process.versions.node,process.versions.electron?"electron="+process.versions.electron:"","webpack=true"].filter(Boolean).join(" ");throw new Error("No native build was found for "+y+"\n loaded from: "+e+"\n");function M(e){var t=m(i.join(e,"prebuilds")).map(v).filter(w(l,d)).sort(S)[0];if(t){var r=i.join(e,"prebuilds",t.name),n=m(r).map(E).filter(T(f,c)).sort(R(f))[0];return n?i.join(r,n.file):void 0}}},y.parseTags=E,y.matchTags=T,y.compareTags=R,y.parseTuple=v,y.matchTuple=w,y.compareTuples=S},9249:e=>{"use strict";const t={};function r(e,r,n){n||(n=Error);class i extends n{constructor(e,t,n){super(function(e,t,n){return"string"==typeof r?r:r(e,t,n)}(e,t,n))}}i.prototype.name=n.name,i.prototype.code=e,t[e]=i}function n(e,t){if(Array.isArray(e)){const r=e.length;return e=e.map((e=>String(e))),r>2?`one of ${t} ${e.slice(0,r-1).join(", ")}, or `+e[r-1]:2===r?`one of ${t} ${e[0]} or ${e[1]}`:`of ${t} ${e[0]}`}return`of ${t} ${String(e)}`}r("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),r("ERR_INVALID_ARG_TYPE",(function(e,t,r){let i;var o,a;let s;if("string"==typeof t&&(o="not ",t.substr(!a||a<0?0:+a,o.length)===o)?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))s=`The ${e} ${i} ${n(t,"type")}`;else{const r=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}(e,".")?"property":"argument";s=`The "${e}" ${r} ${i} ${n(t,"type")}`}return s+=". Received type "+typeof r,s}),TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.q=t},3653:(e,t,r)=>{"use strict";var n=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=c;var i=r(8817),o=r(2248);r(7577)(c,i);for(var a=n(o.prototype),s=0;s<a.length;s++){var u=a[s];c.prototype[u]||(c.prototype[u]=o.prototype[u])}function c(e){if(!(this instanceof c))return new c(e);i.call(this,e),o.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",f)))}function f(){this._writableState.ended||process.nextTick(d,this)}function d(e){e.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(c.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})},8210:(e,t,r)=>{"use strict";e.exports=i;var n=r(5500);function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}r(7577)(i,n),i.prototype._transform=function(e,t,r){r(null,e)}},8817:(e,t,r)=>{"use strict";var n;e.exports=T,T.ReadableState=E;r(2361).EventEmitter;var i=function(e,t){return e.listeners(t).length},o=r(8125),a=r(4300).Buffer,s=r.g.Uint8Array||function(){};var u,c=r(3837);u=c&&c.debuglog?c.debuglog("stream"):function(){};var f,d,l,h=r(2923),p=r(1735),b=r(9604).getHighWaterMark,y=r(9249).q,m=y.ERR_INVALID_ARG_TYPE,g=y.ERR_STREAM_PUSH_AFTER_EOF,_=y.ERR_METHOD_NOT_IMPLEMENTED,v=y.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(7577)(T,o);var w=p.errorOrDestroy,S=["error","close","destroy","pause","resume"];function E(e,t,i){n=n||r(3653),e=e||{},"boolean"!=typeof i&&(i=t instanceof n),this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=b(this,e,"readableHighWaterMark",i),this.buffer=new h,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(f||(f=r(1907).s),this.decoder=new f(e.encoding),this.encoding=e.encoding)}function T(e){if(n=n||r(3653),!(this instanceof T))return new T(e);var t=this instanceof n;this._readableState=new E(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),o.call(this)}function R(e,t,r,n,i){u("readableAddChunk",t);var o,c=e._readableState;if(null===t)c.reading=!1,function(e,t){if(u("onEofChunk"),t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?k(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,O(e)))}(e,c);else if(i||(o=function(e,t){var r;n=t,a.isBuffer(n)||n instanceof s||"string"==typeof t||void 0===t||e.objectMode||(r=new m("chunk",["string","Buffer","Uint8Array"],t));var n;return r}(c,t)),o)w(e,o);else if(c.objectMode||t&&t.length>0)if("string"==typeof t||c.objectMode||Object.getPrototypeOf(t)===a.prototype||(t=function(e){return a.from(e)}(t)),n)c.endEmitted?w(e,new v):M(e,c,t,!0);else if(c.ended)w(e,new g);else{if(c.destroyed)return!1;c.reading=!1,c.decoder&&!r?(t=c.decoder.write(t),c.objectMode||0!==t.length?M(e,c,t,!1):x(e,c)):M(e,c,t,!1)}else n||(c.reading=!1,x(e,c));return!c.ended&&(c.length<c.highWaterMark||0===c.length)}function M(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&k(e)),x(e,t)}Object.defineProperty(T.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),T.prototype.destroy=p.destroy,T.prototype._undestroy=p.undestroy,T.prototype._destroy=function(e,t){t(e)},T.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=a.from(e,t),t=""),r=!0),R(this,e,t,!1,r)},T.prototype.unshift=function(e){return R(this,e,null,!0,!1)},T.prototype.isPaused=function(){return!1===this._readableState.flowing},T.prototype.setEncoding=function(e){f||(f=r(1907).s);var t=new f(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i="";null!==n;)i+=t.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var P=1073741824;function A(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=P?e=P:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function k(e){var t=e._readableState;u("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(u("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(O,e))}function O(e){var t=e._readableState;u("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,I(e)}function x(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(C,e,t))}function C(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(u("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function j(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function B(e){u("readable nexttick read 0"),e.read(0)}function q(e,t){u("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),I(e),t.flowing&&!t.reading&&e.read(0)}function I(e){var t=e._readableState;for(u("flow",t.flowing);t.flowing&&null!==e.read(););}function N(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function L(e){var t=e._readableState;u("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(z,t,e))}function z(e,t){if(u("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function D(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}T.prototype.read=function(e){u("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return u("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?L(this):k(this),null;if(0===(e=A(e,t))&&t.ended)return 0===t.length&&L(this),null;var n,i=t.needReadable;return u("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&u("length less than watermark",i=!0),t.ended||t.reading?u("reading or ended",i=!1):i&&(u("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=A(r,t))),null===(n=e>0?N(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&L(this)),null!==n&&this.emit("data",n),n},T.prototype._read=function(e){w(this,new _("_read()"))},T.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e)}n.pipesCount+=1,u("pipe count=%d opts=%j",n.pipesCount,t);var o=(!t||!1!==t.end)&&e!==process.stdout&&e!==process.stderr?s:b;function a(t,i){u("onunpipe"),t===r&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,u("cleanup"),e.removeListener("close",h),e.removeListener("finish",p),e.removeListener("drain",c),e.removeListener("error",l),e.removeListener("unpipe",a),r.removeListener("end",s),r.removeListener("end",b),r.removeListener("data",d),f=!0,!n.awaitDrain||e._writableState&&!e._writableState.needDrain||c())}function s(){u("onend"),e.end()}n.endEmitted?process.nextTick(o):r.once("end",o),e.on("unpipe",a);var c=function(e){return function(){var t=e._readableState;u("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&i(e,"data")&&(t.flowing=!0,I(e))}}(r);e.on("drain",c);var f=!1;function d(t){u("ondata");var i=e.write(t);u("dest.write",i),!1===i&&((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==D(n.pipes,e))&&!f&&(u("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function l(t){u("onerror",t),b(),e.removeListener("error",l),0===i(e,"error")&&w(e,t)}function h(){e.removeListener("finish",p),b()}function p(){u("onfinish"),e.removeListener("close",h),b()}function b(){u("unpipe"),r.unpipe(e)}return r.on("data",d),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",l),e.once("close",h),e.once("finish",p),e.emit("pipe",r),n.flowing||(u("pipe resume"),r.resume()),e},T.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var a=D(t.pipes,e);return-1===a||(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},T.prototype.on=function(e,t){var r=o.prototype.on.call(this,e,t),n=this._readableState;return"data"===e?(n.readableListening=this.listenerCount("readable")>0,!1!==n.flowing&&this.resume()):"readable"===e&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,u("on readable",n.length,n.reading),n.length?k(this):n.reading||process.nextTick(B,this))),r},T.prototype.addListener=T.prototype.on,T.prototype.removeListener=function(e,t){var r=o.prototype.removeListener.call(this,e,t);return"readable"===e&&process.nextTick(j,this),r},T.prototype.removeAllListeners=function(e){var t=o.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||process.nextTick(j,this),t},T.prototype.resume=function(){var e=this._readableState;return e.flowing||(u("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick(q,e,t))}(this,e)),e.paused=!1,this},T.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},T.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(u("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(u("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o<S.length;o++)e.on(S[o],this.emit.bind(this,S[o]));return this._read=function(t){u("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"==typeof Symbol&&(T.prototype[Symbol.asyncIterator]=function(){return void 0===d&&(d=r(4258)),d(this)}),Object.defineProperty(T.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(T.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(T.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),T._fromList=N,Object.defineProperty(T.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(T.from=function(e,t){return void 0===l&&(l=r(7582)),l(T,e,t)})},5500:(e,t,r)=>{"use strict";e.exports=f;var n=r(9249).q,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,a=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r(3653);function c(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function f(e){if(!(this instanceof f))return new f(e);u.call(this,e),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",d)}function d(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?l(this,null,null):this._flush((function(t,r){l(e,t,r)}))}function l(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new s;if(e._transformState.transforming)throw new a;return e.push(null)}r(7577)(f,u),f.prototype.push=function(e,t){return this._transformState.needTransform=!1,u.prototype.push.call(this,e,t)},f.prototype._transform=function(e,t,r){r(new i("_transform()"))},f.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},f.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},f.prototype._destroy=function(e,t){u.prototype._destroy.call(this,e,(function(e){t(e)}))}},2248:(e,t,r)=>{"use strict";function n(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree.next=e}(t,e)}}var i;e.exports=T,T.WritableState=E;var o={deprecate:r(733)},a=r(8125),s=r(4300).Buffer,u=r.g.Uint8Array||function(){};var c,f=r(1735),d=r(9604).getHighWaterMark,l=r(9249).q,h=l.ERR_INVALID_ARG_TYPE,p=l.ERR_METHOD_NOT_IMPLEMENTED,b=l.ERR_MULTIPLE_CALLBACK,y=l.ERR_STREAM_CANNOT_PIPE,m=l.ERR_STREAM_DESTROYED,g=l.ERR_STREAM_NULL_VALUES,_=l.ERR_STREAM_WRITE_AFTER_END,v=l.ERR_UNKNOWN_ENCODING,w=f.errorOrDestroy;function S(){}function E(e,t,o){i=i||r(3653),e=e||{},"boolean"!=typeof o&&(o=t instanceof i),this.objectMode=!!e.objectMode,o&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=d(this,e,"writableHighWaterMark",o),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===e.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if("function"!=typeof i)throw new b;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,i){--t.pendingcb,r?(process.nextTick(i,n),process.nextTick(O,e,t),e._writableState.errorEmitted=!0,w(e,n)):(i(n),e._writableState.errorEmitted=!0,w(e,n),O(e,t))}(e,r,n,t,i);else{var o=A(r)||e.destroyed;o||r.corked||r.bufferProcessing||!r.bufferedRequest||P(e,r),n?process.nextTick(M,e,r,o,i):M(e,r,o,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new n(this)}function T(e){var t=this instanceof(i=i||r(3653));if(!t&&!c.call(T,this))return new T(e);this._writableState=new E(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),a.call(this)}function R(e,t,r,n,i,o,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new m("write")):r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function M(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),O(e,t)}function P(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var i=t.bufferedRequestCount,o=new Array(i),a=t.corkedRequestsFree;a.entry=r;for(var s=0,u=!0;r;)o[s]=r,r.isBuf||(u=!1),r=r.next,s+=1;o.allBuffers=u,R(e,t,!0,t.length,o,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new n(t),t.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,f=r.encoding,d=r.callback;if(R(e,t,!1,t.objectMode?1:c.length,c,f,d),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function A(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function k(e,t){e._final((function(r){t.pendingcb--,r&&w(e,r),t.prefinished=!0,e.emit("prefinish"),O(e,t)}))}function O(e,t){var r=A(t);if(r&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,process.nextTick(k,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return r}r(7577)(T,a),E.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(E.prototype,"buffer",{get:o.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(c=Function.prototype[Symbol.hasInstance],Object.defineProperty(T,Symbol.hasInstance,{value:function(e){return!!c.call(this,e)||this===T&&(e&&e._writableState instanceof E)}})):c=function(e){return e instanceof this},T.prototype.pipe=function(){w(this,new y)},T.prototype.write=function(e,t,r){var n,i=this._writableState,o=!1,a=!i.objectMode&&(n=e,s.isBuffer(n)||n instanceof u);return a&&!s.isBuffer(e)&&(e=function(e){return s.from(e)}(e)),"function"==typeof t&&(r=t,t=null),a?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof r&&(r=S),i.ending?function(e,t){var r=new _;w(e,r),process.nextTick(t,r)}(this,r):(a||function(e,t,r,n){var i;return null===r?i=new g:"string"==typeof r||t.objectMode||(i=new h("chunk",["string","Buffer"],r)),!i||(w(e,i),process.nextTick(n,i),!1)}(this,i,e,r))&&(i.pendingcb++,o=function(e,t,r,n,i,o){if(!r){var a=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=s.from(t,r));return t}(t,n,i);n!==a&&(r=!0,i="buffer",n=a)}var u=t.objectMode?1:n.length;t.length+=u;var c=t.length<t.highWaterMark;c||(t.needDrain=!0);if(t.writing||t.corked){var f=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},f?f.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else R(e,t,!1,u,n,i,o);return c}(this,i,a,e,t,r)),o},T.prototype.cork=function(){this._writableState.corked++},T.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||P(this,e))},T.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new v(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(T.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(T.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),T.prototype._write=function(e,t,r){r(new p("_write()"))},T.prototype._writev=null,T.prototype.end=function(e,t,r){var n=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||function(e,t,r){t.ending=!0,O(e,t),r&&(t.finished?process.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,n,r),this},Object.defineProperty(T.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(T.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),T.prototype.destroy=f.destroy,T.prototype._undestroy=f.undestroy,T.prototype._destroy=function(e,t){t(e)}},4258:(e,t,r)=>{"use strict";var n;function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var o=r(6591),a=Symbol("lastResolve"),s=Symbol("lastReject"),u=Symbol("error"),c=Symbol("ended"),f=Symbol("lastPromise"),d=Symbol("handlePromise"),l=Symbol("stream");function h(e,t){return{value:e,done:t}}function p(e){var t=e[a];if(null!==t){var r=e[l].read();null!==r&&(e[f]=null,e[a]=null,e[s]=null,t(h(r,!1)))}}function b(e){process.nextTick(p,e)}var y=Object.getPrototypeOf((function(){})),m=Object.setPrototypeOf((i(n={get stream(){return this[l]},next:function(){var e=this,t=this[u];if(null!==t)return Promise.reject(t);if(this[c])return Promise.resolve(h(void 0,!0));if(this[l].destroyed)return new Promise((function(t,r){process.nextTick((function(){e[u]?r(e[u]):t(h(void 0,!0))}))}));var r,n=this[f];if(n)r=new Promise(function(e,t){return function(r,n){e.then((function(){t[c]?r(h(void 0,!0)):t[d](r,n)}),n)}}(n,this));else{var i=this[l].read();if(null!==i)return Promise.resolve(h(i,!1));r=new Promise(this[d])}return this[f]=r,r}},Symbol.asyncIterator,(function(){return this})),i(n,"return",(function(){var e=this;return new Promise((function(t,r){e[l].destroy(null,(function(e){e?r(e):t(h(void 0,!0))}))}))})),n),y);e.exports=function(e){var t,r=Object.create(m,(i(t={},l,{value:e,writable:!0}),i(t,a,{value:null,writable:!0}),i(t,s,{value:null,writable:!0}),i(t,u,{value:null,writable:!0}),i(t,c,{value:e._readableState.endEmitted,writable:!0}),i(t,d,{value:function(e,t){var n=r[l].read();n?(r[f]=null,r[a]=null,r[s]=null,e(h(n,!1))):(r[a]=e,r[s]=t)},writable:!0}),t));return r[f]=null,o(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[s];return null!==t&&(r[f]=null,r[a]=null,r[s]=null,t(e)),void(r[u]=e)}var n=r[a];null!==n&&(r[f]=null,r[a]=null,r[s]=null,n(h(void 0,!0))),r[c]=!0})),e.on("readable",b.bind(null,r)),r}},2923:(e,t,r)=>{"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var a=r(4300).Buffer,s=r(3837).inspect,u=s&&s.custom||"inspect";e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t,r,c;return t=e,r=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return a.alloc(0);for(var t,r,n,i=a.allocUnsafe(e>>>0),o=this.head,s=0;o;)t=o.data,r=i,n=s,a.prototype.copy.call(t,r,n),s+=o.data.length,o=o.next;return i}},{key:"consume",value:function(e,t){var r;return e<this.head.data.length?(r=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):r=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,r=1,n=t.data;for(e-=n.length;t=t.next;){var i=t.data,o=e>i.length?i.length:e;if(o===i.length?n+=i:n+=i.slice(0,e),0==(e-=o)){o===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=a.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,o=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,o),0==(e-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,t}},{key:u,value:function(e,t){return s(this,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){i(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},t,{depth:0,customInspect:!1}))}}],r&&o(t.prototype,r),c&&o(t,c),e}()},1735:e=>{"use strict";function t(e,t){n(e,t),r(e)}function r(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function n(e,t){e.emit("error",t)}e.exports={destroy:function(e,i){var o=this,a=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return a||s?(i?i(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(n,this,e)):process.nextTick(n,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!i&&e?o._writableState?o._writableState.errorEmitted?process.nextTick(r,o):(o._writableState.errorEmitted=!0,process.nextTick(t,o,e)):process.nextTick(t,o,e):i?(process.nextTick(r,o),i(e)):process.nextTick(r,o)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}}},6591:(e,t,r)=>{"use strict";var n=r(9249).q.ERR_STREAM_PREMATURE_CLOSE;function i(){}e.exports=function e(t,r,o){if("function"==typeof r)return e(t,null,r);r||(r={}),o=function(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];e.apply(this,n)}}}(o||i);var a=r.readable||!1!==r.readable&&t.readable,s=r.writable||!1!==r.writable&&t.writable,u=function(){t.writable||f()},c=t._writableState&&t._writableState.finished,f=function(){s=!1,c=!0,a||o.call(t)},d=t._readableState&&t._readableState.endEmitted,l=function(){a=!1,d=!0,s||o.call(t)},h=function(e){o.call(t,e)},p=function(){var e;return a&&!d?(t._readableState&&t._readableState.ended||(e=new n),o.call(t,e)):s&&!c?(t._writableState&&t._writableState.ended||(e=new n),o.call(t,e)):void 0},b=function(){t.req.on("finish",f)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(t)?s&&!t._writableState&&(t.on("end",u),t.on("close",u)):(t.on("complete",f),t.on("abort",p),t.req?b():t.on("request",b)),t.on("end",l),t.on("finish",f),!1!==r.error&&t.on("error",h),t.on("close",p),function(){t.removeListener("complete",f),t.removeListener("abort",p),t.removeListener("request",b),t.req&&t.req.removeListener("finish",f),t.removeListener("end",u),t.removeListener("close",u),t.removeListener("finish",f),t.removeListener("end",l),t.removeListener("error",h),t.removeListener("close",p)}}},7582:(e,t,r)=>{"use strict";function n(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(c){return void r(c)}s.done?t(u):Promise.resolve(u).then(n,i)}function i(e){return function(){var t=this,r=arguments;return new Promise((function(i,o){var a=e.apply(t,r);function s(e){n(a,i,o,s,u,"next",e)}function u(e){n(a,i,o,s,u,"throw",e)}s(void 0)}))}}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var s=r(9249).q.ERR_INVALID_ARG_TYPE;e.exports=function(e,t,r){var n;if(t&&"function"==typeof t.next)n=t;else if(t&&t[Symbol.asyncIterator])n=t[Symbol.asyncIterator]();else{if(!t||!t[Symbol.iterator])throw new s("iterable",["Iterable"],t);n=t[Symbol.iterator]()}var u=new e(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({objectMode:!0},r)),c=!1;function f(){return d.apply(this,arguments)}function d(){return(d=i((function*(){try{var e=yield n.next(),t=e.value;e.done?u.push(null):u.push(yield t)?f():c=!1}catch(r){u.destroy(r)}}))).apply(this,arguments)}return u._read=function(){c||(c=!0,f())},u}},5879:(e,t,r)=>{"use strict";var n;var i=r(9249).q,o=i.ERR_MISSING_ARGS,a=i.ERR_STREAM_DESTROYED;function s(e){if(e)throw e}function u(e,t,i,o){o=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(o);var s=!1;e.on("close",(function(){s=!0})),void 0===n&&(n=r(6591)),n(e,{readable:t,writable:i},(function(e){if(e)return o(e);s=!0,o()}));var u=!1;return function(t){if(!s&&!u)return u=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(e)?e.abort():"function"==typeof e.destroy?e.destroy():void o(t||new a("pipe"))}}function c(e){e()}function f(e,t){return e.pipe(t)}function d(e){return e.length?"function"!=typeof e[e.length-1]?s:e.pop():s}e.exports=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n,i=d(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new o("streams");var a=t.map((function(e,r){var o=r<t.length-1;return u(e,o,r>0,(function(e){n||(n=e),e&&a.forEach(c),o||(a.forEach(c),i(n))}))}));return t.reduce(f)}},9604:(e,t,r)=>{"use strict";var n=r(9249).q.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,r,i){var o=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,i,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new n(i?r:"highWaterMark",o);return Math.floor(o)}return e.objectMode?16:16384}}},8125:(e,t,r)=>{e.exports=r(2781)},7897:(e,t,r)=>{var n=r(2781);"disable"===process.env.READABLE_STREAM&&n?(e.exports=n.Readable,Object.assign(e.exports,n),e.exports.Stream=n):((t=e.exports=r(8817)).Stream=n||t,t.Readable=t,t.Writable=r(2248),t.Duplex=r(3653),t.Transform=r(5500),t.PassThrough=r(8210),t.finished=r(6591),t.pipeline=r(5879))},1907:(e,t,r)=>{"use strict";var n=r(3094).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=c,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=f,this.end=d,t=3;break;default:return this.write=l,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function f(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function d(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function l(e){return e.toString(this.encoding)}function h(e){return e&&e.length?this.write(e):""}t.s=o,o.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},o.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},o.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var i=a(t[n]);if(i>=0)return i>0&&(e.lastNeed=i-1),i;if(--n<r||-2===i)return 0;if((i=a(t[n]))>=0)return i>0&&(e.lastNeed=i-2),i;if(--n<r||-2===i)return 0;if((i=a(t[n]))>=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},3094:(e,t,r)=>{var n=r(4300),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},116:(e,t,r)=>{!function(){"use strict";var t,n=r(7096);t=[{field:"fileName",length:100},{field:"fileMode",length:8},{field:"uid",length:8},{field:"gid",length:8},{field:"fileSize",length:12},{field:"mtime",length:12},{field:"checksum",length:8},{field:"type",length:1},{field:"linkName",length:100},{field:"ustar",length:8},{field:"owner",length:32},{field:"group",length:32},{field:"majorNumber",length:8},{field:"minorNumber",length:8},{field:"filenamePrefix",length:155},{field:"padding",length:12}],e.exports.structure=t,e.exports.format=function(e,r){var i=n.clean(512),o=0;return t.forEach((function(t){var r,n,a=e[t.field]||"";for(r=0,n=a.length;r<n;r+=1)i[o]=a.charCodeAt(r),o+=1;o+=t.length-r})),"function"==typeof r?r(i,o):i}}()},1117:(e,t,r)=>{!function(){"use strict";var t,n=r(116),i=r(7096),o=512;function a(e){this.written=0,t=(e||20)*o,this.out=i.clean(t)}a.prototype.append=function(e,r,a,s){var u,c,f,d,l,h,p;if("string"==typeof r)r=i.stringToUint8(r);else if(r.constructor!==Uint8Array.prototype.constructor)throw"Invalid input type. You gave me: "+r.constructor.toString().match(/function\s*([$A-Za-z_][0-9A-Za-z_]*)\s*\(/)[1];return"function"==typeof a&&(s=a,a={}),f=(a=a||{}).mode||4095&parseInt("777",8),d=a.mtime||Math.floor(+new Date/1e3),l=a.uid||0,h=a.gid||0,u={fileName:e,fileMode:i.pad(f,7),uid:i.pad(l,7),gid:i.pad(h,7),fileSize:i.pad(r.length,11),mtime:i.pad(d,11),checksum:" ",type:"0",ustar:"ustar ",owner:a.owner||"",group:a.group||""},c=0,Object.keys(u).forEach((function(e){var t,r,n=u[e];for(t=0,r=n.length;t<r;t+=1)c+=n.charCodeAt(t)})),u.checksum=i.pad(c,6)+"\0 ",p=n.format(u),this.out.set(p,this.written),this.written+=p.length,this.written+r.length>this.out.length&&(this.out=i.extend(this.out,this.written,r.length,t)),this.out.set(r,this.written),this.written+=r.length+(o-(r.length%o||o)),this.out.length-this.written<1024&&(this.out=i.extend(this.out,this.written,1024,t)),"function"==typeof s&&s(this.out),this.out},a.prototype.clear=function(){this.written=0,this.out=i.clean(t)},a.utils=i,a.stringToUint8=i.stringToUint8,a.uint8ToBase64=i.uint8ToBase64,a.base64ToUint8=i.base64ToUint8,e.exports=a}()},7096:e=>{!function(){"use strict";var t=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9","+","/"];function r(e){var t,r=new Uint8Array(e);for(t=0;t<e;t+=1)r[t]=0;return r}e.exports.clean=r,e.exports.pad=function(e,t,r){return e=e.toString(r||8),"000000000000".substr(e.length+12-t)+e},e.exports.extend=function(e,t,n,i){var o=r((parseInt((t+n)/i)+1)*i);return o.set(e),o},e.exports.stringToUint8=function(e,t,n){var i,o;for(t=t||r(e.length),n=n||0,i=0,o=e.length;i<o;i+=1)t[n]=e.charCodeAt(i),n+=1;return t},e.exports.uint8ToBase64=function(e){var r,n,i,o,a=e.length%3,s="";for(r=0,i=e.length-a;r<i;r+=3)n=(e[r]<<16)+(e[r+1]<<8)+e[r+2],s+=t[(o=n)>>18&63]+t[o>>12&63]+t[o>>6&63]+t[63&o];switch(s.length%4){case 1:s+="=";break;case 2:s+="=="}return s},e.exports.base64ToUint8=function(e){for(var n,i=e.match(/^([^=]+)/)[1],o=e.match(/(=*)$/)[1].length,a=0,s=i.length,u=0,c=r(.75*i.length+o);a<s;)n=0,n|=t.indexOf(i.charAt(a)||"A")<<18,a+=1,n|=t.indexOf(i.charAt(a)||"A")<<12,a+=1,n|=t.indexOf(i.charAt(a)||"A")<<6,a+=1,n|=t.indexOf(i.charAt(a)||"A"),a+=1,c[u]=n>>16&255,c[u+=1]=n>>8&255,c[u+=1]=255&n,u+=1;return c}}()},1636:e=>{"use strict";e.exports=function(e){const t=e.length;let r=0;for(;r<t;)if(0==(128&e[r]))r++;else if(192==(224&e[r])){if(r+1===t||128!=(192&e[r+1])||192==(254&e[r]))return!1;r+=2}else if(224==(240&e[r])){if(r+2>=t||128!=(192&e[r+1])||128!=(192&e[r+2])||224===e[r]&&128==(224&e[r+1])||237===e[r]&&160==(224&e[r+1]))return!1;r+=3}else{if(240!=(248&e[r]))return!1;if(r+3>=t||128!=(192&e[r+1])||128!=(192&e[r+2])||128!=(192&e[r+3])||240===e[r]&&128==(240&e[r+1])||244===e[r]&&e[r+1]>143||e[r]>244)return!1;r+=4}return!0}},5398:(e,t,r)=>{"use strict";try{e.exports=r(1363)("/")}catch(n){e.exports=r(1636)}},733:(e,t,r)=>{e.exports=r(3837).deprecate},8321:(e,t,r)=>{"use strict";const n=r(5580);n.createWebSocketStream=r(9810),n.Server=r(5930),n.Receiver=r(9983),n.Sender=r(6305),e.exports=n},9981:(e,t,r)=>{"use strict";const{EMPTY_BUFFER:n}=r(26);function i(e,t){if(0===e.length)return n;if(1===e.length)return e[0];const r=Buffer.allocUnsafe(t);let i=0;for(let n=0;n<e.length;n++){const t=e[n];r.set(t,i),i+=t.length}return i<t?r.slice(0,i):r}function o(e,t,r,n,i){for(let o=0;o<i;o++)r[n+o]=e[o]^t[3&o]}function a(e,t){const r=e.length;for(let n=0;n<r;n++)e[n]^=t[3&n]}function s(e){return e.byteLength===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}function u(e){if(u.readOnly=!0,Buffer.isBuffer(e))return e;let t;return e instanceof ArrayBuffer?t=Buffer.from(e):ArrayBuffer.isView(e)?t=Buffer.from(e.buffer,e.byteOffset,e.byteLength):(t=Buffer.from(e),u.readOnly=!1),t}try{const t=r(8469),n=t.BufferUtil||t;e.exports={concat:i,mask(e,t,r,i,a){a<48?o(e,t,r,i,a):n.mask(e,t,r,i,a)},toArrayBuffer:s,toBuffer:u,unmask(e,t){e.length<32?a(e,t):n.unmask(e,t)}}}catch(c){e.exports={concat:i,mask:o,toArrayBuffer:s,toBuffer:u,unmask:a}}},26:e=>{"use strict";e.exports={BINARY_TYPES:["nodebuffer","arraybuffer","fragments"],GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),EMPTY_BUFFER:Buffer.alloc(0),NOOP:()=>{}}},8966:e=>{"use strict";class t{constructor(e,t){this.target=t,this.type=e}}class r extends t{constructor(e,t){super("message",t),this.data=e}}class n extends t{constructor(e,t,r){super("close",r),this.wasClean=r._closeFrameReceived&&r._closeFrameSent,this.reason=t,this.code=e}}class i extends t{constructor(e){super("open",e)}}class o extends t{constructor(e,t){super("error",t),this.message=e.message,this.error=e}}const a={addEventListener(e,t,a){if("function"!=typeof t)return;function s(e){t.call(this,new r(e,this))}function u(e,r){t.call(this,new n(e,r,this))}function c(e){t.call(this,new o(e,this))}function f(){t.call(this,new i(this))}const d=a&&a.once?"once":"on";"message"===e?(s._listener=t,this[d](e,s)):"close"===e?(u._listener=t,this[d](e,u)):"error"===e?(c._listener=t,this[d](e,c)):"open"===e?(f._listener=t,this[d](e,f)):this[d](e,t)},removeEventListener(e,t){const r=this.listeners(e);for(let n=0;n<r.length;n++)r[n]!==t&&r[n]._listener!==t||this.removeListener(e,r[n])}};e.exports=a},146:e=>{"use strict";const t=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function r(e,t,r){void 0===e[t]?e[t]=[r]:e[t].push(r)}e.exports={format:function(e){return Object.keys(e).map((t=>{let r=e[t];return Array.isArray(r)||(r=[r]),r.map((e=>[t].concat(Object.keys(e).map((t=>{let r=e[t];return Array.isArray(r)||(r=[r]),r.map((e=>!0===e?t:`${t}=${e}`)).join("; ")}))).join("; "))).join(", ")})).join(", ")},parse:function(e){const n=Object.create(null);if(void 0===e||""===e)return n;let i,o,a=Object.create(null),s=!1,u=!1,c=!1,f=-1,d=-1,l=0;for(;l<e.length;l++){const h=e.charCodeAt(l);if(void 0===i)if(-1===d&&1===t[h])-1===f&&(f=l);else if(32===h||9===h)-1===d&&-1!==f&&(d=l);else{if(59!==h&&44!==h)throw new SyntaxError(`Unexpected character at index ${l}`);{if(-1===f)throw new SyntaxError(`Unexpected character at index ${l}`);-1===d&&(d=l);const t=e.slice(f,d);44===h?(r(n,t,a),a=Object.create(null)):i=t,f=d=-1}}else if(void 0===o)if(-1===d&&1===t[h])-1===f&&(f=l);else if(32===h||9===h)-1===d&&-1!==f&&(d=l);else if(59===h||44===h){if(-1===f)throw new SyntaxError(`Unexpected character at index ${l}`);-1===d&&(d=l),r(a,e.slice(f,d),!0),44===h&&(r(n,i,a),a=Object.create(null),i=void 0),f=d=-1}else{if(61!==h||-1===f||-1!==d)throw new SyntaxError(`Unexpected character at index ${l}`);o=e.slice(f,l),f=d=-1}else if(u){if(1!==t[h])throw new SyntaxError(`Unexpected character at index ${l}`);-1===f?f=l:s||(s=!0),u=!1}else if(c)if(1===t[h])-1===f&&(f=l);else if(34===h&&-1!==f)c=!1,d=l;else{if(92!==h)throw new SyntaxError(`Unexpected character at index ${l}`);u=!0}else if(34===h&&61===e.charCodeAt(l-1))c=!0;else if(-1===d&&1===t[h])-1===f&&(f=l);else if(-1===f||32!==h&&9!==h){if(59!==h&&44!==h)throw new SyntaxError(`Unexpected character at index ${l}`);{if(-1===f)throw new SyntaxError(`Unexpected character at index ${l}`);-1===d&&(d=l);let t=e.slice(f,d);s&&(t=t.replace(/\\/g,""),s=!1),r(a,o,t),44===h&&(r(n,i,a),a=Object.create(null),i=void 0),o=void 0,f=d=-1}}else-1===d&&(d=l)}if(-1===f||c)throw new SyntaxError("Unexpected end of input");-1===d&&(d=l);const h=e.slice(f,d);return void 0===i?r(n,h,a):(void 0===o?r(a,h,!0):r(a,o,s?h.replace(/\\/g,""):h),r(n,i,a)),n}}},7469:e=>{"use strict";const t=Symbol("kDone"),r=Symbol("kRun");e.exports=class{constructor(e){this[t]=()=>{this.pending--,this[r]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[r]()}[r](){if(this.pending!==this.concurrency&&this.jobs.length){const e=this.jobs.shift();this.pending++,e(this[t])}}}},3187:(e,t,r)=>{"use strict";const n=r(9796),i=r(9981),o=r(7469),{kStatusCode:a,NOOP:s}=r(26),u=Buffer.from([0,0,255,255]),c=Symbol("permessage-deflate"),f=Symbol("total-length"),d=Symbol("callback"),l=Symbol("buffers"),h=Symbol("error");let p;function b(e){this[l].push(e),this[f]+=e.length}function y(e){this[f]+=e.length,this[c]._maxPayload<1||this[f]<=this[c]._maxPayload?this[l].push(e):(this[h]=new RangeError("Max payload size exceeded"),this[h].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[h][a]=1009,this.removeListener("data",y),this.reset())}function m(e){this[c]._inflate=null,e[a]=1007,this[d](e)}e.exports=class{constructor(e,t,r){if(this._maxPayload=0|r,this._options=e||{},this._threshold=void 0!==this._options.threshold?this._options.threshold:1024,this._isServer=!!t,this._deflate=null,this._inflate=null,this.params=null,!p){const e=void 0!==this._options.concurrencyLimit?this._options.concurrencyLimit:10;p=new o(e)}}static get extensionName(){return"permessage-deflate"}offer(){const e={};return this._options.serverNoContextTakeover&&(e.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(e.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(e.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?e.client_max_window_bits=this._options.clientMaxWindowBits:null==this._options.clientMaxWindowBits&&(e.client_max_window_bits=!0),e}accept(e){return e=this.normalizeParams(e),this.params=this._isServer?this.acceptAsServer(e):this.acceptAsClient(e),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){const e=this._deflate[d];this._deflate.close(),this._deflate=null,e&&e(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(e){const t=this._options,r=e.find((e=>!(!1===t.serverNoContextTakeover&&e.server_no_context_takeover||e.server_max_window_bits&&(!1===t.serverMaxWindowBits||"number"==typeof t.serverMaxWindowBits&&t.serverMaxWindowBits>e.server_max_window_bits)||"number"==typeof t.clientMaxWindowBits&&!e.client_max_window_bits)));if(!r)throw new Error("None of the extension offers can be accepted");return t.serverNoContextTakeover&&(r.server_no_context_takeover=!0),t.clientNoContextTakeover&&(r.client_no_context_takeover=!0),"number"==typeof t.serverMaxWindowBits&&(r.server_max_window_bits=t.serverMaxWindowBits),"number"==typeof t.clientMaxWindowBits?r.client_max_window_bits=t.clientMaxWindowBits:!0!==r.client_max_window_bits&&!1!==t.clientMaxWindowBits||delete r.client_max_window_bits,r}acceptAsClient(e){const t=e[0];if(!1===this._options.clientNoContextTakeover&&t.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(t.client_max_window_bits){if(!1===this._options.clientMaxWindowBits||"number"==typeof this._options.clientMaxWindowBits&&t.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"')}else"number"==typeof this._options.clientMaxWindowBits&&(t.client_max_window_bits=this._options.clientMaxWindowBits);return t}normalizeParams(e){return e.forEach((e=>{Object.keys(e).forEach((t=>{let r=e[t];if(r.length>1)throw new Error(`Parameter "${t}" must have only a single value`);if(r=r[0],"client_max_window_bits"===t){if(!0!==r){const e=+r;if(!Number.isInteger(e)||e<8||e>15)throw new TypeError(`Invalid value for parameter "${t}": ${r}`);r=e}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${t}": ${r}`)}else if("server_max_window_bits"===t){const e=+r;if(!Number.isInteger(e)||e<8||e>15)throw new TypeError(`Invalid value for parameter "${t}": ${r}`);r=e}else{if("client_no_context_takeover"!==t&&"server_no_context_takeover"!==t)throw new Error(`Unknown parameter "${t}"`);if(!0!==r)throw new TypeError(`Invalid value for parameter "${t}": ${r}`)}e[t]=r}))})),e}decompress(e,t,r){p.add((n=>{this._decompress(e,t,((e,t)=>{n(),r(e,t)}))}))}compress(e,t,r){p.add((n=>{this._compress(e,t,((e,t)=>{n(),r(e,t)}))}))}_decompress(e,t,r){const o=this._isServer?"client":"server";if(!this._inflate){const e=`${o}_max_window_bits`,t="number"!=typeof this.params[e]?n.Z_DEFAULT_WINDOWBITS:this.params[e];this._inflate=n.createInflateRaw({...this._options.zlibInflateOptions,windowBits:t}),this._inflate[c]=this,this._inflate[f]=0,this._inflate[l]=[],this._inflate.on("error",m),this._inflate.on("data",y)}this._inflate[d]=r,this._inflate.write(e),t&&this._inflate.write(u),this._inflate.flush((()=>{const e=this._inflate[h];if(e)return this._inflate.close(),this._inflate=null,void r(e);const n=i.concat(this._inflate[l],this._inflate[f]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[f]=0,this._inflate[l]=[],t&&this.params[`${o}_no_context_takeover`]&&this._inflate.reset()),r(null,n)}))}_compress(e,t,r){const o=this._isServer?"server":"client";if(!this._deflate){const e=`${o}_max_window_bits`,t="number"!=typeof this.params[e]?n.Z_DEFAULT_WINDOWBITS:this.params[e];this._deflate=n.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:t}),this._deflate[f]=0,this._deflate[l]=[],this._deflate.on("error",s),this._deflate.on("data",b)}this._deflate[d]=r,this._deflate.write(e),this._deflate.flush(n.Z_SYNC_FLUSH,(()=>{if(!this._deflate)return;let e=i.concat(this._deflate[l],this._deflate[f]);t&&(e=e.slice(0,e.length-4)),this._deflate[d]=null,this._deflate[f]=0,this._deflate[l]=[],t&&this.params[`${o}_no_context_takeover`]&&this._deflate.reset(),r(null,e)}))}}},9983:(e,t,r)=>{"use strict";const{Writable:n}=r(2781),i=r(3187),{BINARY_TYPES:o,EMPTY_BUFFER:a,kStatusCode:s,kWebSocket:u}=r(26),{concat:c,toArrayBuffer:f,unmask:d}=r(9981),{isValidStatusCode:l,isValidUTF8:h}=r(9046);function p(e,t,r,n,i){const o=new e(r?`Invalid WebSocket frame: ${t}`:t);return Error.captureStackTrace(o,p),o.code=i,o[s]=n,o}e.exports=class extends n{constructor(e,t,r,n){super(),this._binaryType=e||o[0],this[u]=void 0,this._extensions=t||{},this._isServer=!!r,this._maxPayload=0|n,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._state=0,this._loop=!1}_write(e,t,r){if(8===this._opcode&&0==this._state)return r();this._bufferedBytes+=e.length,this._buffers.push(e),this.startLoop(r)}consume(e){if(this._bufferedBytes-=e,e===this._buffers[0].length)return this._buffers.shift();if(e<this._buffers[0].length){const t=this._buffers[0];return this._buffers[0]=t.slice(e),t.slice(0,e)}const t=Buffer.allocUnsafe(e);do{const r=this._buffers[0],n=t.length-e;e>=r.length?t.set(this._buffers.shift(),n):(t.set(new Uint8Array(r.buffer,r.byteOffset,e),n),this._buffers[0]=r.slice(e)),e-=r.length}while(e>0);return t}startLoop(e){let t;this._loop=!0;do{switch(this._state){case 0:t=this.getInfo();break;case 1:t=this.getPayloadLength16();break;case 2:t=this.getPayloadLength64();break;case 3:this.getMask();break;case 4:t=this.getData(e);break;default:return void(this._loop=!1)}}while(this._loop);e(t)}getInfo(){if(this._bufferedBytes<2)return void(this._loop=!1);const e=this.consume(2);if(0!=(48&e[0]))return this._loop=!1,p(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");const t=64==(64&e[0]);if(t&&!this._extensions[i.extensionName])return this._loop=!1,p(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");if(this._fin=128==(128&e[0]),this._opcode=15&e[0],this._payloadLength=127&e[1],0===this._opcode){if(t)return this._loop=!1,p(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");if(!this._fragmented)return this._loop=!1,p(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");this._opcode=this._fragmented}else if(1===this._opcode||2===this._opcode){if(this._fragmented)return this._loop=!1,p(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");this._compressed=t}else{if(!(this._opcode>7&&this._opcode<11))return this._loop=!1,p(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");if(!this._fin)return this._loop=!1,p(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");if(t)return this._loop=!1,p(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");if(this._payloadLength>125)return this._loop=!1,p(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH")}if(this._fin||this._fragmented||(this._fragmented=this._opcode),this._masked=128==(128&e[1]),this._isServer){if(!this._masked)return this._loop=!1,p(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK")}else if(this._masked)return this._loop=!1,p(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");if(126===this._payloadLength)this._state=1;else{if(127!==this._payloadLength)return this.haveLength();this._state=2}}getPayloadLength16(){if(!(this._bufferedBytes<2))return this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength();this._loop=!1}getPayloadLength64(){if(this._bufferedBytes<8)return void(this._loop=!1);const e=this.consume(8),t=e.readUInt32BE(0);return t>Math.pow(2,21)-1?(this._loop=!1,p(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH")):(this._payloadLength=t*Math.pow(2,32)+e.readUInt32BE(4),this.haveLength())}haveLength(){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0))return this._loop=!1,p(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");this._masked?this._state=3:this._state=4}getMask(){this._bufferedBytes<4?this._loop=!1:(this._mask=this.consume(4),this._state=4)}getData(e){let t=a;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength)return void(this._loop=!1);t=this.consume(this._payloadLength),this._masked&&d(t,this._mask)}return this._opcode>7?this.controlMessage(t):this._compressed?(this._state=5,void this.decompress(t,e)):(t.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(t)),this.dataMessage())}decompress(e,t){this._extensions[i.extensionName].decompress(e,this._fin,((e,r)=>{if(e)return t(e);if(r.length){if(this._messageLength+=r.length,this._messageLength>this._maxPayload&&this._maxPayload>0)return t(p(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH"));this._fragments.push(r)}const n=this.dataMessage();if(n)return t(n);this.startLoop(t)}))}dataMessage(){if(this._fin){const e=this._messageLength,t=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],2===this._opcode){let r;r="nodebuffer"===this._binaryType?c(t,e):"arraybuffer"===this._binaryType?f(c(t,e)):t,this.emit("message",r)}else{const r=c(t,e);if(!h(r))return this._loop=!1,p(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");this.emit("message",r.toString())}}this._state=0}controlMessage(e){if(8===this._opcode)if(this._loop=!1,0===e.length)this.emit("conclude",1005,""),this.end();else{if(1===e.length)return p(RangeError,"invalid payload length 1",!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");{const t=e.readUInt16BE(0);if(!l(t))return p(RangeError,`invalid status code ${t}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");const r=e.slice(2);if(!h(r))return p(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");this.emit("conclude",t,r.toString()),this.end()}}else 9===this._opcode?this.emit("ping",e):this.emit("pong",e);this._state=0}}},6305:(e,t,r)=>{"use strict";const{randomFillSync:n}=r(6113),i=r(3187),{EMPTY_BUFFER:o}=r(26),{isValidStatusCode:a}=r(9046),{mask:s,toBuffer:u}=r(9981),c=Buffer.alloc(4);class f{constructor(e,t){this._extensions=t||{},this._socket=e,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._deflating=!1,this._queue=[]}static frame(e,t){const r=t.mask&&t.readOnly;let i=t.mask?6:2,o=e.length;e.length>=65536?(i+=8,o=127):e.length>125&&(i+=2,o=126);const a=Buffer.allocUnsafe(r?e.length+i:i);return a[0]=t.fin?128|t.opcode:t.opcode,t.rsv1&&(a[0]|=64),a[1]=o,126===o?a.writeUInt16BE(e.length,2):127===o&&(a.writeUInt32BE(0,2),a.writeUInt32BE(e.length,6)),t.mask?(n(c,0,4),a[1]|=128,a[i-4]=c[0],a[i-3]=c[1],a[i-2]=c[2],a[i-1]=c[3],r?(s(e,c,a,i,e.length),[a]):(s(e,c,e,0,e.length),[a,e])):[a,e]}close(e,t,r,n){let i;if(void 0===e)i=o;else{if("number"!=typeof e||!a(e))throw new TypeError("First argument must be a valid error code number");if(void 0===t||""===t)i=Buffer.allocUnsafe(2),i.writeUInt16BE(e,0);else{const r=Buffer.byteLength(t);if(r>123)throw new RangeError("The message must not be greater than 123 bytes");i=Buffer.allocUnsafe(2+r),i.writeUInt16BE(e,0),i.write(t,2)}}this._deflating?this.enqueue([this.doClose,i,r,n]):this.doClose(i,r,n)}doClose(e,t,r){this.sendFrame(f.frame(e,{fin:!0,rsv1:!1,opcode:8,mask:t,readOnly:!1}),r)}ping(e,t,r){const n=u(e);if(n.length>125)throw new RangeError("The data size must not be greater than 125 bytes");this._deflating?this.enqueue([this.doPing,n,t,u.readOnly,r]):this.doPing(n,t,u.readOnly,r)}doPing(e,t,r,n){this.sendFrame(f.frame(e,{fin:!0,rsv1:!1,opcode:9,mask:t,readOnly:r}),n)}pong(e,t,r){const n=u(e);if(n.length>125)throw new RangeError("The data size must not be greater than 125 bytes");this._deflating?this.enqueue([this.doPong,n,t,u.readOnly,r]):this.doPong(n,t,u.readOnly,r)}doPong(e,t,r,n){this.sendFrame(f.frame(e,{fin:!0,rsv1:!1,opcode:10,mask:t,readOnly:r}),n)}send(e,t,r){const n=u(e),o=this._extensions[i.extensionName];let a=t.binary?2:1,s=t.compress;if(this._firstFragment?(this._firstFragment=!1,s&&o&&(s=n.length>=o._threshold),this._compress=s):(s=!1,a=0),t.fin&&(this._firstFragment=!0),o){const e={fin:t.fin,rsv1:s,opcode:a,mask:t.mask,readOnly:u.readOnly};this._deflating?this.enqueue([this.dispatch,n,this._compress,e,r]):this.dispatch(n,this._compress,e,r)}else this.sendFrame(f.frame(n,{fin:t.fin,rsv1:!1,opcode:a,mask:t.mask,readOnly:u.readOnly}),r)}dispatch(e,t,r,n){if(!t)return void this.sendFrame(f.frame(e,r),n);const o=this._extensions[i.extensionName];this._bufferedBytes+=e.length,this._deflating=!0,o.compress(e,r.fin,((t,i)=>{if(this._socket.destroyed){const e=new Error("The socket was closed while data was being compressed");"function"==typeof n&&n(e);for(let t=0;t<this._queue.length;t++){const r=this._queue[t][4];"function"==typeof r&&r(e)}}else this._bufferedBytes-=e.length,this._deflating=!1,r.readOnly=!1,this.sendFrame(f.frame(i,r),n),this.dequeue()}))}dequeue(){for(;!this._deflating&&this._queue.length;){const e=this._queue.shift();this._bufferedBytes-=e[1].length,Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[1].length,this._queue.push(e)}sendFrame(e,t){2===e.length?(this._socket.cork(),this._socket.write(e[0]),this._socket.write(e[1],t),this._socket.uncork()):this._socket.write(e[0],t)}}e.exports=f},9810:(e,t,r)=>{"use strict";const{Duplex:n}=r(2781);function i(e){e.emit("close")}function o(){!this.destroyed&&this._writableState.finished&&this.destroy()}function a(e){this.removeListener("error",a),this.destroy(),0===this.listenerCount("error")&&this.emit("error",e)}e.exports=function(e,t){let r=!0,s=!0;function u(){r&&e._socket.resume()}e.readyState===e.CONNECTING?e.once("open",(function(){e._receiver.removeAllListeners("drain"),e._receiver.on("drain",u)})):(e._receiver.removeAllListeners("drain"),e._receiver.on("drain",u));const c=new n({...t,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return e.on("message",(function(t){c.push(t)||(r=!1,e._socket.pause())})),e.once("error",(function(e){c.destroyed||(s=!1,c.destroy(e))})),e.once("close",(function(){c.destroyed||c.push(null)})),c._destroy=function(t,r){if(e.readyState===e.CLOSED)return r(t),void process.nextTick(i,c);let n=!1;e.once("error",(function(e){n=!0,r(e)})),e.once("close",(function(){n||r(t),process.nextTick(i,c)})),s&&e.terminate()},c._final=function(t){e.readyState!==e.CONNECTING?null!==e._socket&&(e._socket._writableState.finished?(t(),c._readableState.endEmitted&&c.destroy()):(e._socket.once("finish",(function(){t()})),e.close())):e.once("open",(function(){c._final(t)}))},c._read=function(){e.readyState!==e.OPEN||r||(r=!0,e._receiver._writableState.needDrain||e._socket.resume())},c._write=function(t,r,n){e.readyState!==e.CONNECTING?e.send(t,n):e.once("open",(function(){c._write(t,r,n)}))},c.on("end",o),c.on("error",a),c}},9046:(e,t,r)=>{"use strict";function n(e){return e>=1e3&&e<=1014&&1004!==e&&1005!==e&&1006!==e||e>=3e3&&e<=4999}function i(e){const t=e.length;let r=0;for(;r<t;)if(0==(128&e[r]))r++;else if(192==(224&e[r])){if(r+1===t||128!=(192&e[r+1])||192==(254&e[r]))return!1;r+=2}else if(224==(240&e[r])){if(r+2>=t||128!=(192&e[r+1])||128!=(192&e[r+2])||224===e[r]&&128==(224&e[r+1])||237===e[r]&&160==(224&e[r+1]))return!1;r+=3}else{if(240!=(248&e[r]))return!1;if(r+3>=t||128!=(192&e[r+1])||128!=(192&e[r+2])||128!=(192&e[r+3])||240===e[r]&&128==(240&e[r+1])||244===e[r]&&e[r+1]>143||e[r]>244)return!1;r+=4}return!0}try{let t=r(5398);"object"==typeof t&&(t=t.Validation.isValidUTF8),e.exports={isValidStatusCode:n,isValidUTF8:e=>e.length<150?i(e):t(e)}}catch(o){e.exports={isValidStatusCode:n,isValidUTF8:i}}},5930:(e,t,r)=>{"use strict";const n=r(2361),{createHash:i}=r(6113),{createServer:o,STATUS_CODES:a}=r(3685),s=r(3187),u=r(5580),{format:c,parse:f}=r(146),{GUID:d,kWebSocket:l}=r(26),h=/^[+/0-9A-Za-z]{22}==$/;function p(e){e.emit("close")}function b(){this.destroy()}function y(e,t,r,n){e.writable&&(r=r||a[t],n={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(r),...n},e.write(`HTTP/1.1 ${t} ${a[t]}\r\n`+Object.keys(n).map((e=>`${e}: ${n[e]}`)).join("\r\n")+"\r\n\r\n"+r)),e.removeListener("error",b),e.destroy()}function m(e){return e.trim()}e.exports=class extends n{constructor(e,t){if(super(),null==(e={maxPayload:104857600,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,...e}).port&&!e.server&&!e.noServer)throw new TypeError('One of the "port", "server", or "noServer" options must be specified');if(null!=e.port?(this._server=o(((e,t)=>{const r=a[426];t.writeHead(426,{"Content-Length":r.length,"Content-Type":"text/plain"}),t.end(r)})),this._server.listen(e.port,e.host,e.backlog,t)):e.server&&(this._server=e.server),this._server){const e=this.emit.bind(this,"connection");this._removeListeners=function(e,t){for(const r of Object.keys(t))e.on(r,t[r]);return function(){for(const r of Object.keys(t))e.removeListener(r,t[r])}}(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(t,r,n)=>{this.handleUpgrade(t,r,n,e)}})}!0===e.perMessageDeflate&&(e.perMessageDeflate={}),e.clientTracking&&(this.clients=new Set),this.options=e}address(){if(this.options.noServer)throw new Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(e){if(e&&this.once("close",e),this.clients)for(const r of this.clients)r.terminate();const t=this._server;t&&(this._removeListeners(),this._removeListeners=this._server=null,null!=this.options.port)?t.close((()=>this.emit("close"))):process.nextTick(p,this)}shouldHandle(e){if(this.options.path){const t=e.url.indexOf("?");if((-1!==t?e.url.slice(0,t):e.url)!==this.options.path)return!1}return!0}handleUpgrade(e,t,r,n){t.on("error",b);const i=void 0!==e.headers["sec-websocket-key"]&&e.headers["sec-websocket-key"].trim(),o=+e.headers["sec-websocket-version"],a={};if("GET"!==e.method||"websocket"!==e.headers.upgrade.toLowerCase()||!i||!h.test(i)||8!==o&&13!==o||!this.shouldHandle(e))return y(t,400);if(this.options.perMessageDeflate){const r=new s(this.options.perMessageDeflate,!0,this.options.maxPayload);try{const t=f(e.headers["sec-websocket-extensions"]);t[s.extensionName]&&(r.accept(t[s.extensionName]),a[s.extensionName]=r)}catch(u){return y(t,400)}}if(this.options.verifyClient){const s={origin:e.headers[""+(8===o?"sec-websocket-origin":"origin")],secure:!(!e.socket.authorized&&!e.socket.encrypted),req:e};if(2===this.options.verifyClient.length)return void this.options.verifyClient(s,((o,s,u,c)=>{if(!o)return y(t,s||401,u,c);this.completeUpgrade(i,a,e,t,r,n)}));if(!this.options.verifyClient(s))return y(t,401)}this.completeUpgrade(i,a,e,t,r,n)}completeUpgrade(e,t,r,n,o,a){if(!n.readable||!n.writable)return n.destroy();if(n[l])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");const f=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${i("sha1").update(e+d).digest("base64")}`],h=new u(null);let p=r.headers["sec-websocket-protocol"];if(p&&(p=p.split(",").map(m),p=this.options.handleProtocols?this.options.handleProtocols(p,r):p[0],p&&(f.push(`Sec-WebSocket-Protocol: ${p}`),h._protocol=p)),t[s.extensionName]){const e=t[s.extensionName].params,r=c({[s.extensionName]:[e]});f.push(`Sec-WebSocket-Extensions: ${r}`),h._extensions=t}this.emit("headers",f,r),n.write(f.concat("\r\n").join("\r\n")),n.removeListener("error",b),h.setSocket(n,o,this.options.maxPayload),this.clients&&(this.clients.add(h),h.on("close",(()=>this.clients.delete(h)))),a(h,r)}}},5580:(e,t,r)=>{"use strict";const n=r(2361),i=r(5687),o=r(3685),a=r(1808),s=r(4404),{randomBytes:u,createHash:c}=r(6113),{URL:f}=r(7310),d=r(3187),l=r(9983),h=r(6305),{BINARY_TYPES:p,EMPTY_BUFFER:b,GUID:y,kStatusCode:m,kWebSocket:g,NOOP:_}=r(26),{addEventListener:v,removeEventListener:w}=r(8966),{format:S,parse:E}=r(146),{toBuffer:T}=r(9981),R=["CONNECTING","OPEN","CLOSING","CLOSED"],M=[8,13];class P extends n{constructor(e,t,r){super(),this._binaryType=p[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage="",this._closeTimer=null,this._extensions={},this._protocol="",this._readyState=P.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,null!==e?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,Array.isArray(t)?t=t.join(", "):"object"==typeof t&&null!==t&&(r=t,t=void 0),A(this,e,t,r)):this._isServer=!0}get binaryType(){return this._binaryType}set binaryType(e){p.includes(e)&&(this._binaryType=e,this._receiver&&(this._receiver._binaryType=e))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(e,t,r){const n=new l(this.binaryType,this._extensions,this._isServer,r);this._sender=new h(e,this._extensions),this._receiver=n,this._socket=e,n[g]=this,e[g]=this,n.on("conclude",j),n.on("drain",B),n.on("error",q),n.on("message",N),n.on("ping",L),n.on("pong",z),e.setTimeout(0),e.setNoDelay(),t.length>0&&e.unshift(t),e.on("close",D),e.on("data",F),e.on("end",W),e.on("error",H),this._readyState=P.OPEN,this.emit("open")}emitClose(){if(!this._socket)return this._readyState=P.CLOSED,void this.emit("close",this._closeCode,this._closeMessage);this._extensions[d.extensionName]&&this._extensions[d.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=P.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(e,t){if(this.readyState!==P.CLOSED){if(this.readyState===P.CONNECTING){const e="WebSocket was closed before the connection was established";return x(this,this._req,e)}this.readyState!==P.CLOSING?(this._readyState=P.CLOSING,this._sender.close(e,t,!this._isServer,(e=>{e||(this._closeFrameSent=!0,this._closeFrameReceived&&this._socket.end())})),this._closeTimer=setTimeout(this._socket.destroy.bind(this._socket),3e4)):this._closeFrameSent&&this._closeFrameReceived&&this._socket.end()}}ping(e,t,r){if(this.readyState===P.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");"function"==typeof e?(r=e,e=t=void 0):"function"==typeof t&&(r=t,t=void 0),"number"==typeof e&&(e=e.toString()),this.readyState===P.OPEN?(void 0===t&&(t=!this._isServer),this._sender.ping(e||b,t,r)):C(this,e,r)}pong(e,t,r){if(this.readyState===P.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");"function"==typeof e?(r=e,e=t=void 0):"function"==typeof t&&(r=t,t=void 0),"number"==typeof e&&(e=e.toString()),this.readyState===P.OPEN?(void 0===t&&(t=!this._isServer),this._sender.pong(e||b,t,r)):C(this,e,r)}send(e,t,r){if(this.readyState===P.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if("function"==typeof t&&(r=t,t={}),"number"==typeof e&&(e=e.toString()),this.readyState!==P.OPEN)return void C(this,e,r);const n={binary:"string"!=typeof e,mask:!this._isServer,compress:!0,fin:!0,...t};this._extensions[d.extensionName]||(n.compress=!1),this._sender.send(e||b,n,r)}terminate(){if(this.readyState!==P.CLOSED){if(this.readyState===P.CONNECTING){const e="WebSocket was closed before the connection was established";return x(this,this._req,e)}this._socket&&(this._readyState=P.CLOSING,this._socket.destroy())}}}function A(e,t,r,n){const a={protocolVersion:M[1],maxPayload:104857600,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...n,createConnection:void 0,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:void 0,host:void 0,path:void 0,port:void 0};if(!M.includes(a.protocolVersion))throw new RangeError(`Unsupported protocol version: ${a.protocolVersion} (supported versions: ${M.join(", ")})`);let s;t instanceof f?(s=t,e._url=t.href):(s=new f(t),e._url=t);const l="ws+unix:"===s.protocol;if(!(s.host||l&&s.pathname))throw new Error(`Invalid URL: ${e.url}`);const h="wss:"===s.protocol||"https:"===s.protocol,p=h?443:80,b=u(16).toString("base64"),m=h?i.get:o.get;let g;if(a.createConnection=h?O:k,a.defaultPort=a.defaultPort||p,a.port=s.port||p,a.host=s.hostname.startsWith("[")?s.hostname.slice(1,-1):s.hostname,a.headers={"Sec-WebSocket-Version":a.protocolVersion,"Sec-WebSocket-Key":b,Connection:"Upgrade",Upgrade:"websocket",...a.headers},a.path=s.pathname+s.search,a.timeout=a.handshakeTimeout,a.perMessageDeflate&&(g=new d(!0!==a.perMessageDeflate?a.perMessageDeflate:{},!1,a.maxPayload),a.headers["Sec-WebSocket-Extensions"]=S({[d.extensionName]:g.offer()})),r&&(a.headers["Sec-WebSocket-Protocol"]=r),a.origin&&(a.protocolVersion<13?a.headers["Sec-WebSocket-Origin"]=a.origin:a.headers.Origin=a.origin),(s.username||s.password)&&(a.auth=`${s.username}:${s.password}`),l){const e=a.path.split(":");a.socketPath=e[0],a.path=e[1]}let _=e._req=m(a);a.timeout&&_.on("timeout",(()=>{x(e,_,"Opening handshake has timed out")})),_.on("error",(t=>{null===_||_.aborted||(_=e._req=null,e._readyState=P.CLOSING,e.emit("error",t),e.emitClose())})),_.on("response",(i=>{const o=i.headers.location,s=i.statusCode;if(o&&a.followRedirects&&s>=300&&s<400){if(++e._redirects>a.maxRedirects)return void x(e,_,"Maximum redirects exceeded");_.abort();const i=new f(o,t);A(e,i,r,n)}else e.emit("unexpected-response",_,i)||x(e,_,`Unexpected server response: ${i.statusCode}`)})),_.on("upgrade",((t,n,i)=>{if(e.emit("upgrade",t),e.readyState!==P.CONNECTING)return;_=e._req=null;const o=c("sha1").update(b+y).digest("base64");if(t.headers["sec-websocket-accept"]!==o)return void x(e,n,"Invalid Sec-WebSocket-Accept header");const s=t.headers["sec-websocket-protocol"],u=(r||"").split(/, */);let f;if(!r&&s?f="Server sent a subprotocol but none was requested":r&&!s?f="Server sent no subprotocol":s&&!u.includes(s)&&(f="Server sent an invalid subprotocol"),f)x(e,n,f);else{if(s&&(e._protocol=s),g)try{const r=E(t.headers["sec-websocket-extensions"]);r[d.extensionName]&&(g.accept(r[d.extensionName]),e._extensions[d.extensionName]=g)}catch(l){return void x(e,n,"Invalid Sec-WebSocket-Extensions header")}e.setSocket(n,i,a.maxPayload)}}))}function k(e){return e.path=e.socketPath,a.connect(e)}function O(e){return e.path=void 0,e.servername||""===e.servername||(e.servername=a.isIP(e.host)?"":e.host),s.connect(e)}function x(e,t,r){e._readyState=P.CLOSING;const n=new Error(r);Error.captureStackTrace(n,x),t.setHeader?(t.abort(),t.socket&&!t.socket.destroyed&&t.socket.destroy(),t.once("abort",e.emitClose.bind(e)),e.emit("error",n)):(t.destroy(n),t.once("error",e.emit.bind(e,"error")),t.once("close",e.emitClose.bind(e)))}function C(e,t,r){if(t){const r=T(t).length;e._socket?e._sender._bufferedBytes+=r:e._bufferedAmount+=r}if(r){r(new Error(`WebSocket is not open: readyState ${e.readyState} (${R[e.readyState]})`))}}function j(e,t){const r=this[g];r._socket.removeListener("data",F),r._socket.resume(),r._closeFrameReceived=!0,r._closeMessage=t,r._closeCode=e,1005===e?r.close():r.close(e,t)}function B(){this[g]._socket.resume()}function q(e){const t=this[g];t._socket.removeListener("data",F),t._socket.resume(),t.close(e[m]),t.emit("error",e)}function I(){this[g].emitClose()}function N(e){this[g].emit("message",e)}function L(e){const t=this[g];t.pong(e,!t._isServer,_),t.emit("ping",e)}function z(e){this[g].emit("pong",e)}function D(){const e=this[g];this.removeListener("close",D),this.removeListener("end",W),e._readyState=P.CLOSING,e._socket.read(),e._receiver.end(),this.removeListener("data",F),this[g]=void 0,clearTimeout(e._closeTimer),e._receiver._writableState.finished||e._receiver._writableState.errorEmitted?e.emitClose():(e._receiver.on("error",I),e._receiver.on("finish",I))}function F(e){this[g]._receiver.write(e)||this.pause()}function W(){const e=this[g];e._readyState=P.CLOSING,e._receiver.end(),this.end()}function H(){const e=this[g];this.removeListener("error",H),this.on("error",_),e&&(e._readyState=P.CLOSING,this.destroy())}R.forEach(((e,t)=>{const r={enumerable:!0,value:t};Object.defineProperty(P.prototype,e,r),Object.defineProperty(P,e,r)})),["binaryType","bufferedAmount","extensions","protocol","readyState","url"].forEach((e=>{Object.defineProperty(P.prototype,e,{enumerable:!0})})),["open","error","close","message"].forEach((e=>{Object.defineProperty(P.prototype,`on${e}`,{configurable:!0,enumerable:!0,get(){const t=this.listeners(e);for(let e=0;e<t.length;e++)if(t[e]._listener)return t[e]._listener},set(t){const r=this.listeners(e);for(let n=0;n<r.length;n++)r[n]._listener&&this.removeListener(e,r[n]);this.addEventListener(e,t)}})})),P.prototype.addEventListener=v,P.prototype.removeEventListener=w,e.exports=P},6457:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BeeDebug=void 0;var n=g(r(4369)),i=g(r(4995)),o=g(r(5689)),a=g(r(4955)),s=g(r(2038)),u=g(r(614)),c=g(r(569)),f=r(9470),d=r(1376),l=r(3792),h=r(1713),p=g(r(6344)),b=g(r(7894)),y=r(8384);function m(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(m=function(e){return e?r:t})(e)}function g(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=m(t);if(r&&r.has(e))return r.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}function _(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}t.BeeDebug=class{constructor(e,t){var r;_(this,"url",void 0),_(this,"ky",void 0),(0,d.assertBeeUrl)(e),this.url=(0,d.stripLastSlash)(e);const n={prefixUrl:this.url,timeout:null!==(r=null==t?void 0:t.timeout)&&void 0!==r&&r,retry:null==t?void 0:t.retry,fetch:null==t?void 0:t.fetch,hooks:{beforeRequest:[],afterResponse:[]}};null!=t&&t.defaultHeaders&&(n.headers=t.defaultHeaders),null!=t&&t.onRequest&&n.hooks.beforeRequest.push((0,y.wrapRequestClosure)(t.onRequest)),null!=t&&t.onResponse&&n.hooks.afterResponse.push((0,y.wrapResponseClosure)(t.onResponse)),this.ky=(0,y.makeDefaultKy)(n)}async getNodeAddresses(e){return(0,l.assertRequestOptions)(e),n.getNodeAddresses(this.getKy(e))}async getBlocklist(e){return(0,l.assertRequestOptions)(e),n.getBlocklist(this.getKy(e))}async retrieveExtendedTag(e,t){if((0,l.assertRequestOptions)(t),(0,l.isTag)(e))e=e.uid;else{if("number"!=typeof e)throw new TypeError("tagUid has to be either Tag or a number (UID)!");(0,l.assertNonNegativeInteger)(e,"UID")}return p.retrieveExtendedTag(this.getKy(t),e)}async getPeers(e){return(0,l.assertRequestOptions)(e),n.getPeers(this.getKy(e))}async removePeer(e,t){return(0,l.assertRequestOptions)(t),(0,l.assertAddress)(e),n.removePeer(this.getKy(t),e)}async getTopology(e){return(0,l.assertRequestOptions)(e),n.getTopology(this.getKy(e))}async pingPeer(e,t){return(0,l.assertRequestOptions)(t),(0,l.assertAddress)(e),n.pingPeer(this.getKy(t),e)}async getAllBalances(e){return(0,l.assertRequestOptions)(e),i.getAllBalances(this.getKy(e))}async getPeerBalance(e,t){return(0,l.assertRequestOptions)(t),(0,l.assertAddress)(e),i.getPeerBalance(this.getKy(t),e)}async getPastDueConsumptionBalances(e){return(0,l.assertRequestOptions)(e),i.getPastDueConsumptionBalances(this.getKy(e))}async getPastDueConsumptionPeerBalance(e,t){return(0,l.assertRequestOptions)(t),(0,l.assertAddress)(e),i.getPastDueConsumptionPeerBalance(this.getKy(t),e)}async getChequebookAddress(e){return(0,l.assertRequestOptions)(e),o.getChequebookAddress(this.getKy(e))}async getChequebookBalance(e){return(0,l.assertRequestOptions)(e),o.getChequebookBalance(this.getKy(e))}async getLastCheques(e){return(0,l.assertRequestOptions)(e),o.getLastCheques(this.getKy(e))}async getLastChequesForPeer(e,t){return(0,l.assertRequestOptions)(t),(0,l.assertAddress)(e),o.getLastChequesForPeer(this.getKy(t),e)}async getLastCashoutAction(e,t){return(0,l.assertRequestOptions)(t),(0,l.assertAddress)(e),o.getLastCashoutAction(this.getKy(t),e)}async cashoutLastCheque(e,t){return(0,l.assertCashoutOptions)(t),(0,l.assertAddress)(e),o.cashoutLastCheque(this.getKy(t),e,t)}async depositTokens(e,t,r){return(0,l.assertRequestOptions)(r),(0,l.assertNonNegativeInteger)(e),t&&(0,l.assertNonNegativeInteger)(t),o.depositTokens(this.getKy(r),e,t)}async withdrawTokens(e,t,r){return(0,l.assertRequestOptions)(r),(0,l.assertNonNegativeInteger)(e),t&&(0,l.assertNonNegativeInteger)(t),o.withdrawTokens(this.getKy(r),e,t)}async getSettlements(e,t){return(0,l.assertRequestOptions)(t),(0,l.assertAddress)(e),a.getSettlements(this.getKy(t),e)}async getAllSettlements(e){return(0,l.assertRequestOptions)(e),a.getAllSettlements(this.getKy(e))}async getHealth(e){return(0,l.assertRequestOptions)(e),s.getHealth(this.getKy(e))}async getNodeInfo(e){return(0,l.assertRequestOptions)(e),s.getNodeInfo(this.getKy(e))}async isSupportedVersion(e){return(0,l.assertRequestOptions)(e),s.isSupportedVersion(this.getKy(e))}async getReserveState(e){return(0,l.assertRequestOptions)(e),c.getReserveState(this.getKy(e))}async getChainState(e){return(0,l.assertRequestOptions)(e),c.getChainState(this.getKy(e))}async createPostageBatch(e,t,r){if((0,l.assertRequestOptions)(r),(0,l.assertNonNegativeInteger)(e),(0,l.assertNonNegativeInteger)(t),t<h.STAMPS_DEPTH_MIN)throw new f.BeeArgumentError(`Depth has to be at least ${h.STAMPS_DEPTH_MIN}`,t);if(t>h.STAMPS_DEPTH_MAX)throw new f.BeeArgumentError(`Depth has to be at most ${h.STAMPS_DEPTH_MAX}`,t);return null!=r&&r.gasPrice&&(0,l.assertNonNegativeInteger)(r.gasPrice),void 0!==(null==r?void 0:r.immutableFlag)&&(0,l.assertBoolean)(r.immutableFlag),b.createPostageBatch(this.getKy(r),e,t,r)}async topUpBatch(e,t,r){(0,l.assertRequestOptions)(r),(0,l.assertNonNegativeInteger)(t,"Amount"),(0,l.assertBatchId)(e),await b.topUpBatch(this.getKy(r),e,t)}async diluteBatch(e,t,r){(0,l.assertRequestOptions)(r),(0,l.assertNonNegativeInteger)(t,"Depth"),(0,l.assertBatchId)(e),await b.diluteBatch(this.getKy(r),e,t)}async getPostageBatch(e,t){return(0,l.assertRequestOptions)(t),(0,l.assertBatchId)(e),b.getPostageBatch(this.getKy(t),e)}async getPostageBatchBuckets(e,t){return(0,l.assertRequestOptions)(t),(0,l.assertBatchId)(e),b.getPostageBatchBuckets(this.getKy(t),e)}async getAllPostageBatch(e){return(0,l.assertRequestOptions)(e),b.getAllPostageBatches(this.getKy(e))}async getAllPendingTransactions(e){return(0,l.assertRequestOptions)(e),u.getAllTransactions(this.getKy(e))}async getPendingTransaction(e,t){return(0,l.assertRequestOptions)(t),(0,l.assertTransactionHash)(e),u.getTransaction(this.getKy(t),e)}async rebroadcastPendingTransaction(e,t){return(0,l.assertRequestOptions)(t),(0,l.assertTransactionHash)(e),u.rebroadcastTransaction(this.getKy(t),e)}async cancelPendingTransaction(e,t,r){return(0,l.assertRequestOptions)(r),(0,l.assertTransactionHash)(e),t&&(0,l.assertNonNegativeInteger)(t),u.cancelTransaction(this.getKy(r),e,t)}getKy(e){return e?this.ky.extend(e):this.ky}}},3604:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Bee=void 0;var n=O(r(9068)),i=O(r(3920)),o=O(r(8211)),a=O(r(7922)),s=O(r(5660)),u=O(r(3521)),c=O(r(148)),f=O(r(9364)),d=r(9470),l=r(5120),h=r(2607),p=r(5897),b=r(4466),y=r(3259),m=r(4302),g=r(6894),_=r(8873),v=r(1376),w=r(264),S=r(1834),E=r(3792),T=r(4161),R=r(6688),M=r(1713),P=r(8384),A=r(3504);function k(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(k=function(e){return e?r:t})(e)}function O(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=k(t);if(r&&r.has(e))return r.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}function x(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}t.Bee=class{constructor(e,t){var r;x(this,"url",void 0),x(this,"signer",void 0),x(this,"ky",void 0),(0,v.assertBeeUrl)(e),this.url=(0,v.stripLastSlash)(e),null!=t&&t.signer&&(this.signer=(0,b.makeSigner)(t.signer));const n={prefixUrl:this.url,timeout:null!==(r=null==t?void 0:t.timeout)&&void 0!==r&&r,retry:null==t?void 0:t.retry,fetch:null==t?void 0:t.fetch,hooks:{beforeRequest:[],afterResponse:[]}};null!=t&&t.defaultHeaders&&(n.headers=t.defaultHeaders),null!=t&&t.onRequest&&n.hooks.beforeRequest.push((0,P.wrapRequestClosure)(t.onRequest)),null!=t&&t.onResponse&&n.hooks.afterResponse.push((0,P.wrapResponseClosure)(t.onResponse)),this.ky=(0,P.makeDefaultKy)(n)}async uploadData(e,t,r){return(0,E.assertBatchId)(e),(0,E.assertData)(t),r&&(0,E.assertUploadOptions)(r),s.upload(this.getKy(r),t,e,r)}async downloadData(e,t){return(0,E.assertRequestOptions)(t),(0,E.assertReference)(e),s.download(this.getKy(t),e)}async downloadReadableData(e,t){return(0,E.assertRequestOptions)(t),(0,E.assertReference)(e),s.downloadReadable(this.getKy(t),e)}async uploadChunk(e,t,r){if((0,E.assertBatchId)(e),!(t instanceof Uint8Array))throw new TypeError("Data has to be Uint8Array instance!");if(t.length<M.SPAN_SIZE)throw new d.BeeArgumentError(`Chunk has to have size of at least ${M.SPAN_SIZE}.`,t);if(t.length>M.CHUNK_SIZE+M.SPAN_SIZE)throw new d.BeeArgumentError(`Chunk has to have size of at most ${M.CHUNK_SIZE}.`,t);return r&&(0,E.assertUploadOptions)(r),u.upload(this.getKy(r),t,e,r)}async downloadChunk(e,t){return(0,E.assertRequestOptions)(t),(0,E.assertReference)(e),u.download(this.getKy(t),e)}async uploadFile(e,t,r,i){if((0,E.assertBatchId)(e),(0,E.assertFileData)(t),i&&(0,E.assertFileUploadOptions)(i),r&&"string"!=typeof r)throw new TypeError("name has to be string or undefined!");if((0,h.isFile)(t)){const o=await(0,h.fileArrayBuffer)(t),a=null!=r?r:t.name,s={contentType:t.type,...i};return n.uploadFile(this.getKy(i),o,e,a,s)}if((0,A.isReadable)(t)&&null!=i&&i.tag&&!i.size){const o=await n.uploadFile(this.getKy(i),t,e,r,i);return await this.updateTag(i.tag,o.reference),o}return n.uploadFile(this.getKy(i),t,e,r,i)}async downloadFile(e,t="",r){return(0,E.assertRequestOptions)(r),(0,E.assertReference)(e),n.downloadFile(this.getKy(r),e,t)}async downloadReadableFile(e,t="",r){return(0,E.assertRequestOptions)(r),(0,E.assertReference)(e),n.downloadFileReadable(this.getKy(r),e,t)}async uploadFiles(e,t,r){(0,E.assertBatchId)(e),r&&(0,E.assertCollectionUploadOptions)(r);const i=await(0,R.makeCollectionFromFileList)(t);return n.uploadCollection(this.getKy(r),i,e,r)}async uploadCollection(e,t,r){return(0,E.assertBatchId)(e),(0,R.assertCollection)(t),r&&(0,E.assertCollectionUploadOptions)(r),n.uploadCollection(this.ky,t,e,r)}async uploadFilesFromDirectory(e,t,r){(0,E.assertBatchId)(e),r&&(0,E.assertCollectionUploadOptions)(r);const i=await(0,R.makeCollectionFromFS)(t);return n.uploadCollection(this.getKy(r),i,e,r)}async createTag(e){return(0,E.assertRequestOptions)(e),o.createTag(this.getKy(e))}async getAllTags(e){return(0,E.assertRequestOptions)(e),(0,E.assertAllTagsOptions)(e),o.getAllTags(this.getKy(e),null==e?void 0:e.offset,null==e?void 0:e.limit)}async retrieveTag(e,t){return(0,E.assertRequestOptions)(t),e=(0,E.makeTagUid)(e),o.retrieveTag(this.getKy(t),e)}async deleteTag(e,t){return(0,E.assertRequestOptions)(t),e=(0,E.makeTagUid)(e),o.deleteTag(this.getKy(t),e)}async updateTag(e,t,r){return(0,E.assertReference)(t),(0,E.assertRequestOptions)(r),e=(0,E.makeTagUid)(e),o.updateTag(this.getKy(r),e,t)}async pin(e,t){return(0,E.assertRequestOptions)(t),(0,E.assertReference)(e),a.pin(this.getKy(t),e)}async unpin(e,t){return(0,E.assertRequestOptions)(t),(0,E.assertReference)(e),a.unpin(this.getKy(t),e)}async getAllPins(e){return(0,E.assertRequestOptions)(e),a.getAllPins(this.getKy(e))}async getPin(e,t){return(0,E.assertRequestOptions)(t),(0,E.assertReference)(e),a.getPin(this.getKy(t),e)}async reuploadPinnedData(e,t){(0,E.assertRequestOptions)(t),(0,E.assertReference)(e),await i.reupload(this.getKy(t),e)}async isReferenceRetrievable(e,t){return(0,E.assertRequestOptions)(t),(0,E.assertReference)(e),i.isRetrievable(this.getKy(t),e)}async pssSend(e,t,r,n,i,o){if((0,E.assertRequestOptions)(o),(0,E.assertData)(n),(0,E.assertBatchId)(e),(0,E.assertAddressPrefix)(r),"string"!=typeof t)throw new TypeError("topic has to be an string!");return i?((0,E.assertPublicKey)(i),c.send(this.getKy(o),t,r,n,e,i)):c.send(this.getKy(o),t,r,n,e)}pssSubscribe(e,t){if((0,E.assertPssMessageHandler)(t),"string"!=typeof e)throw new TypeError("topic has to be an string!");const r=c.subscribe(this.url,e);let n=!1;const i={topic:e,cancel:()=>{!1===n&&(n=!0,r.terminate?r.terminate():r.close())}};return r.onmessage=async e=>{const r=await(0,l.prepareWebsocketData)(e.data);r.length>0&&t.onMessage((0,S.wrapBytesWithHelpers)(r),i)},r.onerror=e=>{n||t.onError(new d.BeeError(e.message),i)},i}async pssReceive(e,t=0){if("string"!=typeof e)throw new TypeError("topic has to be an string!");if("number"!=typeof t)throw new TypeError("timeoutMsc parameter has to be a number!");return new Promise(((r,n)=>{let i;const o=this.pssSubscribe(e,{onError:e=>{clearTimeout(i),o.cancel(),n(e.message)},onMessage:e=>{clearTimeout(i),o.cancel(),r(e)}});t>0&&(i=setTimeout((()=>{o.cancel(),n(new d.BeeError("pssReceive timeout"))}),t))}))}async createFeedManifest(e,t,r,n,i){(0,E.assertRequestOptions)(i),(0,y.assertFeedType)(t),(0,E.assertBatchId)(e);const o=(0,g.makeTopic)(r),a=(0,w.makeHexEthAddress)(n);return(0,_.createFeedManifest)(this.getKy(i),a,o,e,{type:t})}makeFeedReader(e,t,r,n){(0,E.assertRequestOptions)(n),(0,y.assertFeedType)(e);const i=(0,g.makeTopic)(t),o=(0,w.makeHexEthAddress)(r);return(0,p.makeFeedReader)(this.getKy(n),e,i,o)}makeFeedWriter(e,t,r,n){(0,E.assertRequestOptions)(n),(0,y.assertFeedType)(e);const i=(0,g.makeTopic)(t),o=this.resolveSigner(r);return(0,p.makeFeedWriter)(this.getKy(n),e,i,o)}async setJsonFeed(e,t,r,n){var i;(0,E.assertRequestOptions)(n,"JsonFeedOptions"),(0,E.assertBatchId)(e);const o=this.makeFeedTopic(t),a=null!==(i=null==n?void 0:n.type)&&void 0!==i?i:y.DEFAULT_FEED_TYPE,s=this.makeFeedWriter(a,o,null==n?void 0:n.signer,n);return(0,T.setJsonData)(this,s,e,r,n)}async getJsonFeed(e,t){var r;(0,E.assertRequestOptions)(t,"JsonFeedOptions");const n=this.makeFeedTopic(e),i=null!==(r=null==t?void 0:t.type)&&void 0!==r?r:y.DEFAULT_FEED_TYPE;if(null!=t&&t.signer&&null!=t&&t.address)throw new d.BeeError('Both options "signer" and "address" can not be specified at one time!');let o;if(null!=t&&t.address)o=(0,w.makeEthAddress)(null==t?void 0:t.address);else try{o=this.resolveSigner(null==t?void 0:t.signer).address}catch(s){throw s instanceof d.BeeError?new d.BeeError("Either address, signer or default signer has to be specified!"):s}const a=this.makeFeedReader(i,n,o,t);return(0,T.getJsonData)(this,a)}makeFeedTopic(e){return(0,g.makeTopicFromString)(e)}makeSOCReader(e,t){(0,E.assertRequestOptions)(t);const r=(0,w.makeEthAddress)(e);return{download:m.downloadSingleOwnerChunk.bind(null,this.getKy(t),r)}}makeSOCWriter(e,t){(0,E.assertRequestOptions)(t);const r=this.resolveSigner(e);return{...this.makeSOCReader(r.address,t),upload:m.uploadSingleOwnerChunkData.bind(null,this.getKy(t),r)}}async checkConnection(e){return(0,E.assertRequestOptions)(e,"PostageBatchOptions"),f.checkConnection(this.getKy(e))}async isConnected(e){(0,E.assertRequestOptions)(e,"PostageBatchOptions");try{await f.checkConnection(this.getKy(e))}catch(t){return!1}return!0}resolveSigner(e){if(e)return(0,b.makeSigner)(e);if(this.signer)return this.signer;throw new d.BeeError("You have to pass Signer as property to either the method call or constructor! Non found.")}getKy(e){return e?this.ky.extend(e):this.ky}}},4003:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bmtHash=function(e){const t=e.slice(0,8),r=function(e){if(e.length>a)throw new i.BeeArgumentError("invalid data length",e);let t=new Uint8Array([...e,...new Uint8Array(a-e.length)]);for(;32!==t.length;){const e=new Uint8Array(t.length/2);for(let r=0;r<t.length;r+=64){const i=n.keccak256.array(t.slice(r,r+64));e.set(i,r/2)}t=e}return t}(e.slice(8)),s=new Uint8Array([...t,...r]);return(0,o.keccak256Hash)(s)};var n=r(8086),i=r(9470),o=r(9769);const a=4096},6969:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.makeContentAddressedChunk=function(e){const t=(0,s.makeSpan)(e.length);(0,o.assertFlexBytes)(e,1,u);const r=(0,a.serializeBytes)(t,e);return{data:r,span:()=>t,payload:()=>(0,o.flexBytesAtOffset)(r,c,1,u),address:()=>(0,i.bmtHash)(r)}},t.isValidChunkData=f,t.assertValidChunkData=function(e,t){if(!f(e,t))throw new n.BeeError("Address of content address chunk does not match given data!")},t.MAX_PAYLOAD_SIZE=t.MIN_PAYLOAD_SIZE=void 0;var n=r(9470),i=r(4003),o=r(1834),a=r(6695),s=r(1933);t.MIN_PAYLOAD_SIZE=1;const u=4096;t.MAX_PAYLOAD_SIZE=u;const c=0+s.SPAN_SIZE;function f(e,t){if(!(e instanceof Uint8Array))return!1;const r=(0,i.bmtHash)(e);return(0,o.bytesEqual)(r,t)}},6695:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeBytes=function(...e){const t=e.reduce(((e,t)=>e+t.length),0),r=new Uint8Array(t);let n=0;return e.forEach((e=>{r.set(e,n),n+=e.length})),r}},4466:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultSign=d,t.recoverAddress=function(e,t){const r=new n.ec("secp256k1"),i={r:e.slice(0,32),s:e.slice(32,64)},o=e[64]-27,a=f(t);return l(r.recoverPubKey(a,i,o))},t.makePrivateKeySigner=h,t.assertSigner=p,t.makeSigner=function(e){if("string"==typeof e){const t=(0,s.makeHexString)(e,64);return h((0,s.hexToBytes)(t))}if(e instanceof Uint8Array)return(0,o.assertBytes)(e,32),h(e);return p(e),e},t.sign=async function(e,t){const r=await e.sign((0,o.wrapBytesWithHelpers)(t));if("string"==typeof r){const e=(0,s.makeHexString)(r,u.SIGNATURE_HEX_LENGTH);return(0,s.hexToBytes)(e)}if(r instanceof Uint8Array)return(0,o.assertBytes)(r,u.SIGNATURE_BYTES_LENGTH),r;throw new TypeError("Invalid output of sign function!")};var n=r(236),i=r(9470),o=r(1834),a=r(9769),s=r(7151),u=r(1713),c=r(3792);function f(e){const t=`Ethereum Signed Message:\n${e.length}`,r=(new TextEncoder).encode(t);return(0,a.keccak256Hash)(r,e)}function d(e,t){const r=new n.ec("secp256k1"),o=r.keyFromPrivate(t),a=f(e),s=r.sign(a,o,{canonical:!0,pers:void 0});if(null===s.recoveryParam)throw new i.BeeError("signDigest recovery param was null");return new Uint8Array([...s.r.toArray("be",32),...s.s.toArray("be",32),s.recoveryParam+27])}function l(e){const t=e.encode("array",!1);return(0,a.keccak256Hash)(t.slice(1)).slice(12)}function h(e){return{sign:t=>d(t,e),address:l(new n.ec("secp256k1").keyFromPrivate(e).getPublic())}}function p(e){if(!(0,c.isStrictlyObject)(e))throw new TypeError("Signer must be an object!");const t=e;if(!(0,o.isBytes)(t.address,20))throw new TypeError("Signer's address must be Uint8Array with 20 bytes!");if("function"!=typeof t.sign)throw new TypeError("Signer sign property needs to be function!")}},4302:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.makeSingleOwnerChunkFromData=g,t.makeSOCAddress=_,t.makeSingleOwnerChunk=v,t.uploadSingleOwnerChunk=w,t.uploadSingleOwnerChunkData=async function(e,t,r,n,i,o){(0,p.assertAddress)(r);const a=(0,f.makeContentAddressedChunk)(i),s=await v(a,n,t);return w(e,s,r,o)},t.downloadSingleOwnerChunk=async function(e,t,r){const n=_(r,t);return g(await h.download(e,(0,d.bytesToHex)(n)),n)};var n=r(1834),i=r(4003),o=r(4466),a=r(9769),s=r(1933),u=r(6695),c=r(9470),f=r(6969),d=r(7151),l=y(r(6866)),h=y(r(3521)),p=r(3792);function b(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(b=function(e){return e?r:t})(e)}function y(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=b(t);if(r&&r.has(e))return r.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}const m=97+s.SPAN_SIZE;function g(e,t){const r=function(e){const t=e.slice(97),r=(0,i.bmtHash)(t),s=(0,n.bytesAtOffset)(e,32,65),u=(0,n.bytesAtOffset)(e,0,32),c=(0,a.keccak256Hash)(u,r);return(0,o.recoverAddress)(s,c)}(e),u=(0,n.bytesAtOffset)(e,0,32),d=(0,a.keccak256Hash)(u,r);if(!(0,n.bytesEqual)(t,d))throw new c.BeeError("SOC Data does not match given address!");return{data:e,identifier:()=>u,signature:()=>(0,n.bytesAtOffset)(e,32,65),span:()=>(0,n.bytesAtOffset)(e,97,s.SPAN_SIZE),payload:()=>(0,n.flexBytesAtOffset)(e,m,f.MIN_PAYLOAD_SIZE,f.MAX_PAYLOAD_SIZE),address:()=>d,owner:()=>r}}function _(e,t){return(0,a.keccak256Hash)(e,t)}async function v(e,t,r){const n=e.address();(0,f.assertValidChunkData)(e.data,n);const i=(0,a.keccak256Hash)(t,n),s=await(0,o.sign)(r,i),c=(0,u.serializeBytes)(t,s,e.span(),e.payload()),d=_(t,r.address);return{data:c,identifier:()=>t,signature:()=>s,span:()=>e.span(),payload:()=>e.payload(),address:()=>d,owner:()=>r.address}}async function w(e,t,r,n){const i=(0,d.bytesToHex)(t.owner()),o=(0,d.bytesToHex)(t.identifier()),a=(0,d.bytesToHex)(t.signature()),s=(0,u.serializeBytes)(t.span(),t.payload());return l.upload(e,i,o,a,s,r,n)}},1933:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.makeSpan=function(e){if(e<=0)throw new n.BeeArgumentError("invalid length for span",e);if(e>4294967295)throw new n.BeeArgumentError("invalid length (> MAX_SPAN_LENGTH)",e);const t=new Uint8Array(8),r=new DataView(t.buffer),i=4294967295&e;return r.setUint32(0,i,!0),t},t.SPAN_SIZE=void 0;var n=r(9470);t.SPAN_SIZE=8},5897:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEpoch=y,t.makeSequentialFeedIdentifier=g,t.makeFeedIndexBytes=_,t.makeFeedIdentifier=v,t.uploadFeedUpdate=w,t.findNextIndex=S,t.updateFeed=E,t.verifyChunkReference=R,t.downloadFeedUpdate=async function(e,t,r,i){const a=v(r,i),s=(0,n.keccak256Hash)(a,t),c=(0,f.bytesToHex)(s),h=await l.download(e,c),p=(0,o.makeSingleOwnerChunkFromData)(h,s).payload(),b=(0,u.bytesAtOffset)(p,0,8),y=(0,d.readUint64BigEndian)(b),m=T(8,p);return{timestamp:y,reference:m}},t.makeFeedReader=M,t.makeFeedWriter=function(e,t,r,n){return{...M(e,t,r,(0,h.makeHexEthAddress)(n.address)),upload:async(i,o,a)=>{(0,p.assertAddress)(i);const u=function(e){if("string"==typeof e)try{const t=(0,f.makeHexString)(e,s.REFERENCE_HEX_LENGTH);return(0,f.hexToBytes)(t)}catch(t){if(!(t instanceof TypeError))throw t;const r=(0,f.makeHexString)(e,s.ENCRYPTED_REFERENCE_HEX_LENGTH);return(0,f.hexToBytes)(r)}else if(e instanceof Uint8Array)return R(e);throw new TypeError("invalid chunk reference")}(o);return E(e,n,r,u,i,{...a,type:t})}}};var n=r(9769),i=r(6695),o=r(4302),a=r(8873),s=r(1713),u=r(1834),c=r(9470),f=r(7151),d=r(7359),l=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=b(t);if(r&&r.has(e))return r.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(3521)),h=r(264),p=r(3792);function b(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(b=function(e){return e?r:t})(e)}function y(e){return"object"==typeof e&&null!==e&&"time"in e&&"level"in e}function m(e,t){return(0,n.keccak256Hash)((0,f.hexToBytes)(e),t)}function g(e,t){return m(e,(0,d.writeUint64BigEndian)(t))}function _(e){const t=(0,f.makeHexString)(e,16);return(0,f.hexToBytes)(t)}function v(e,t){if("number"==typeof t)return g(e,t);if("string"==typeof t){return m(e,_(t))}if(y(t))throw new TypeError("epoch is not yet implemented");return m(e,t)}async function w(e,t,r,n,a,s,u){var c;const f=v(r,n),l=null!==(c=null==u?void 0:u.at)&&void 0!==c?c:Date.now()/1e3,h=(0,d.writeUint64BigEndian)(l),p=(0,i.serializeBytes)(h,a);return(0,o.uploadSingleOwnerChunkData)(e,t,s,f,p,u)}async function S(e,t,r,n){try{const i=await(0,a.fetchFeedUpdate)(e,t,r,n);return(0,f.makeHexString)(i.feedIndexNext,16)}catch(i){if(i instanceof c.BeeResponseError&&404===i.status)return(0,f.bytesToHex)((0,u.makeBytes)(8));throw i}}async function E(e,t,r,n,i,o){const a=(0,h.makeHexEthAddress)(t.address);return w(e,t,r,await S(e,a,r,o),n,i,o)}function T(e,t){try{return(0,u.bytesAtOffset)(t,e,64)}catch(r){return(0,u.bytesAtOffset)(t,e,32)}}function R(e){return T(0,e)}function M(e,t,r,n){return{type:t,owner:n,topic:r,download:async i=>(0,a.fetchFeedUpdate)(e,n,r,{...i,type:t})}}},4161:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getJsonData=async function(e,t){const r=await t.download();return(await e.downloadData(r.reference)).json()},t.setJsonData=async function(e,t,r,i,o){const a=function(e){try{const t=JSON.stringify(e);return(new TextEncoder).encode(t)}catch(t){throw(0,n.isError)(t)&&(t.message=`JsonFeed: ${t.message}`),t}}(i),{reference:s}=await e.uploadData(r,a,o);return t.upload(r,s)};var n=r(3792)},6894:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.makeTopic=function(e){if("string"==typeof e)return(0,o.makeHexString)(e,a.TOPIC_HEX_LENGTH);if(e instanceof Uint8Array)return(0,i.assertBytes)(e,a.TOPIC_BYTES_LENGTH),(0,o.bytesToHex)(e,a.TOPIC_HEX_LENGTH);throw new TypeError("invalid topic")},t.makeTopicFromString=function(e){if("string"!=typeof e)throw new TypeError("topic has to be string!");return(0,o.bytesToHex)((0,n.keccak256Hash)(e),a.TOPIC_HEX_LENGTH)};var n=r(9769),i=r(1834),o=r(7151),a=r(1713)},3259:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isFeedType=n,t.assertFeedType=function(e){if(!n(e))throw new TypeError("invalid feed type")},t.DEFAULT_FEED_TYPE=void 0;const r=["sequence","epoch"];function n(e){return"string"==typeof e&&r.includes(e)}t.DEFAULT_FEED_TYPE="sequence"},8809:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={Bee:!0,BeeDebug:!0,Utils:!0,SUPPORTED_BEE_VERSION:!0,SUPPORTED_BEE_VERSION_EXACT:!0};Object.defineProperty(t,"Bee",{enumerable:!0,get:function(){return i.Bee}}),Object.defineProperty(t,"BeeDebug",{enumerable:!0,get:function(){return o.BeeDebug}}),Object.defineProperty(t,"SUPPORTED_BEE_VERSION",{enumerable:!0,get:function(){return c.SUPPORTED_BEE_VERSION}}),Object.defineProperty(t,"SUPPORTED_BEE_VERSION_EXACT",{enumerable:!0,get:function(){return c.SUPPORTED_BEE_VERSION_EXACT}}),t.Utils=void 0;var i=r(3604),o=r(6457),a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=f(t);if(r&&r.has(e))return r.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(5085));t.Utils=a;var s=r(1713);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in t&&t[e]===s[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))}));var u=r(9470);Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in t&&t[e]===u[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}}))}));var c=r(2038);function f(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(f=function(e){return e?r:t})(e)}},5660:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.upload=async function(e,t,r,a){const c=await(0,o.http)(e,{path:u,method:"post",responseType:"json",body:await(0,n.prepareData)(t),headers:{"content-type":"application/octet-stream",...(0,i.extractUploadHeaders)(r,a)}});return{reference:c.data.reference,tagUid:(0,s.makeTagUid)(c.headers.get("swarm-tag"))}},t.download=async function(e,t){const r=await(0,o.http)(e,{responseType:"arraybuffer",path:`bytes/${t}`});return(0,a.wrapBytesWithHelpers)(new Uint8Array(r.data))},t.downloadReadable=async function(e,t){return(await(0,o.http)(e,{responseType:"stream",path:`bytes/${t}`})).data};var n=r(5120),i=r(7551),o=r(8384),a=r(1834),s=r(3792);const u="bytes"},9068:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uploadFile=async function(e,t,r,n,a){var s;!(0,c.isReadable)(t)||null!==(s=a)&&void 0!==s&&s.contentType||(a||(a={}),a.contentType="application/octet-stream");const u=await(0,i.http)(e,{method:"post",path:d,body:await(0,o.prepareData)(t),headers:{...l(r,a)},searchParams:{name:n},responseType:"json"});return{reference:u.data.reference,tagUid:(0,f.makeTagUid)(u.headers.get("swarm-tag"))}},t.downloadFile=async function(e,t,r=""){const o=await(0,i.http)(e,{method:"GET",responseType:"arraybuffer",path:`bzz/${t}/${r}`});return{...(0,n.readFileHeaders)(o.headers),data:(0,u.wrapBytesWithHelpers)(new Uint8Array(o.data))}},t.downloadFileReadable=async function(e,t,r=""){const o=await(0,i.http)(e,{method:"GET",responseType:"stream",path:`bzz/${t}/${r}`});return{...(0,n.readFileHeaders)(o.headers),data:o.data}},t.uploadCollection=async function(e,t,r,n){(0,s.assertCollection)(t);const o=(0,a.makeTar)(t),u=await(0,i.http)(e,{method:"post",path:d,body:o,responseType:"json",headers:{"content-type":"application/x-tar","swarm-collection":"true",...h(r,n)}});return{reference:u.data.reference,tagUid:(0,f.makeTagUid)(u.headers.get("swarm-tag"))}};var n=r(7551),i=r(8384),o=r(5120),a=r(5696),s=r(6688),u=r(1834),c=r(3504),f=r(3792);const d="bzz";function l(e,t){const r=(0,n.extractUploadHeaders)(e,t);return null!=t&&t.size&&(r["content-length"]=String(t.size)),null!=t&&t.contentType&&(r["content-type"]=t.contentType),r}function h(e,t){const r=(0,n.extractUploadHeaders)(e,t);return null!=t&&t.indexDocument&&(r["swarm-index-document"]=t.indexDocument),null!=t&&t.errorDocument&&(r["swarm-error-document"]=t.errorDocument),r}},3521:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.upload=async function(e,t,r,o){return(await(0,i.http)(e,{method:"post",path:"chunks",body:t,headers:{"content-type":"application/octet-stream",...(0,n.extractUploadHeaders)(r,o)},responseType:"json"})).data.reference},t.download=async function(e,t){const r=await(0,i.http)(e,{responseType:"arraybuffer",path:`chunks/${t}`});return(0,o.wrapBytesWithHelpers)(new Uint8Array(r.data))};var n=r(7551),i=r(8384),o=r(1834)},4995:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAllBalances=async function(e){return(await(0,n.http)(e,{path:i,responseType:"json"})).data},t.getPeerBalance=async function(e,t){return(await(0,n.http)(e,{path:`balances/${t}`,responseType:"json"})).data},t.getPastDueConsumptionBalances=async function(e){return(await(0,n.http)(e,{path:o,responseType:"json"})).data},t.getPastDueConsumptionPeerBalance=async function(e,t){return(await(0,n.http)(e,{path:`consumed/${t}`,responseType:"json"})).data};var n=r(8384);const i="balances",o="consumed"},5689:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getChequebookAddress=async function(e){return(await(0,n.http)(e,{path:"chequebook/address",responseType:"json"})).data},t.getChequebookBalance=async function(e){return(await(0,n.http)(e,{path:"chequebook/balance",responseType:"json"})).data},t.getLastCashoutAction=async function(e,t){return(await(0,n.http)(e,{path:`chequebook/cashout/${t}`,responseType:"json"})).data},t.cashoutLastCheque=async function(e,t,r){const i={};null!=r&&r.gasPrice&&(i["gas-price"]=r.gasPrice.toString());null!=r&&r.gasLimit&&(i["gas-limit"]=r.gasLimit.toString());return(await(0,n.http)(e,{method:"post",path:`chequebook/cashout/${t}`,responseType:"json",headers:i})).data.transactionHash},t.getLastChequesForPeer=async function(e,t){return(await(0,n.http)(e,{path:`chequebook/cheque/${t}`,responseType:"json"})).data},t.getLastCheques=async function(e){return(await(0,n.http)(e,{path:"chequebook/cheque",responseType:"json"})).data},t.depositTokens=async function(e,t,r){const i={};r&&(i["gas-price"]=r.toString());return(await(0,n.http)(e,{method:"post",path:"chequebook/deposit",responseType:"json",searchParams:{amount:t.toString(10)},headers:i})).data.transactionHash},t.withdrawTokens=async function(e,t,r){const i={};r&&(i["gas-price"]=r.toString());return(await(0,n.http)(e,{method:"post",path:"chequebook/withdraw",responseType:"json",searchParams:{amount:t.toString(10)},headers:i})).data.transactionHash};var n=r(8384)},4369:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getNodeAddresses=async function(e){return(await(0,n.http)(e,{path:"addresses",responseType:"json"})).data},t.getPeers=async function(e){return(await(0,n.http)(e,{path:"peers",responseType:"json"})).data.peers||[]},t.getBlocklist=async function(e){return(await(0,n.http)(e,{path:"blocklist",responseType:"json"})).data.peers||[]},t.removePeer=async function(e,t){return(await(0,n.http)(e,{path:`peers/${t}`,responseType:"json",method:"DELETE"})).data},t.getTopology=async function(e){return(await(0,n.http)(e,{path:"topology",responseType:"json"})).data},t.pingPeer=async function(e,t){return(await(0,n.http)(e,{path:`pingpong/${t}`,responseType:"json",method:"POST"})).data};var n=r(8384)},4955:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSettlements=async function(e,t){return(await(0,n.http)(e,{path:`settlements/${t}`,responseType:"json"})).data},t.getAllSettlements=async function(e){return(await(0,n.http)(e,{path:i,responseType:"json"})).data};var n=r(8384);const i="settlements"},7894:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAllPostageBatches=async function(e){return(await(0,n.http)(e,{method:"get",path:"stamps",responseType:"json"})).data.stamps||[]},t.getPostageBatch=async function(e,t){return(await(0,n.http)(e,{method:"get",path:`stamps/${t}`,responseType:"json"})).data},t.getPostageBatchBuckets=async function(e,t){return(await(0,n.http)(e,{method:"get",path:`stamps/${t}/buckets`,responseType:"json"})).data},t.createPostageBatch=async function(e,t,r,i){const o={};null!=i&&i.gasPrice&&(o["gas-price"]=i.gasPrice.toString());void 0!==(null==i?void 0:i.immutableFlag)&&(o.immutable=String(i.immutableFlag));return(await(0,n.http)(e,{method:"post",path:`stamps/${t}/${r}`,responseType:"json",searchParams:{label:null==i?void 0:i.label},headers:o})).data.batchID},t.topUpBatch=async function(e,t,r){return(await(0,n.http)(e,{method:"patch",path:`stamps/topup/${t}/${r}`,responseType:"json"})).data.batchID},t.diluteBatch=async function(e,t,r){return(await(0,n.http)(e,{method:"patch",path:`stamps/dilute/${t}/${r}`,responseType:"json"})).data.batchID};var n=r(8384)},569:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getReserveState=async function(e){return(await(0,n.http)(e,{method:"get",path:"reservestate",responseType:"json"})).data},t.getChainState=async function(e){return(await(0,n.http)(e,{method:"get",path:"chainstate",responseType:"json"})).data};var n=r(8384)},2038:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getHealth=s,t.getNodeInfo=async function(e){return(await(0,n.http)(e,{method:"get",path:"node",responseType:"json"})).data},t.isSupportedVersion=async function(e){const{version:t}=await s(e);return t===o},t.SUPPORTED_BEE_VERSION=t.SUPPORTED_BEE_VERSION_EXACT=void 0;var n=r(8384),i=r(4147);const o=i.engines.bee;t.SUPPORTED_BEE_VERSION_EXACT=o;const a=i.engines.bee.substr(0,i.engines.bee.indexOf("-"));t.SUPPORTED_BEE_VERSION=a;async function s(e){return(await(0,n.http)(e,{method:"get",path:"health",responseType:"json"})).data}},6344:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.retrieveExtendedTag=async function(e,t){return(await(0,n.http)(e,{path:`tags/${t}`,responseType:"json"})).data};var n=r(8384)},614:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAllTransactions=async function(e){return(await(0,n.http)(e,{path:i,responseType:"json"})).data.pendingTransactions},t.getTransaction=async function(e,t){return(await(0,n.http)(e,{path:`transactions/${t}`,responseType:"json"})).data},t.rebroadcastTransaction=async function(e,t){return(await(0,n.http)(e,{method:"post",path:`transactions/${t}`,responseType:"json"})).data.transactionHash},t.cancelTransaction=async function(e,t,r){return(await(0,n.http)(e,{method:"delete",headers:{"gas-price":r},path:`transactions/${t}`,responseType:"json"})).data.transactionHash};var n=r(8384);const i="transactions"},8873:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createFeedManifest=async function(e,t,r,o,a){return(await(0,n.http)(e,{method:"post",responseType:"json",path:`feeds/${t}/${r}`,searchParams:(0,n.filterHeaders)(a),headers:(0,i.extractUploadHeaders)(o)})).data.reference},t.fetchFeedUpdate=async function(e,t,r,i){const o=await(0,n.http)(e,{responseType:"json",path:`feeds/${t}/${r}`,searchParams:(0,n.filterHeaders)(i)});return{...o.data,...a(o.headers)}};var n=r(8384),i=r(7551),o=r(9470);function a(e){const t=e.get("swarm-feed-index"),r=e.get("swarm-feed-index-next");if(!t)throw new o.BeeError("Response did not contain expected swarm-feed-index!");if(!r)throw new o.BeeError("Response did not contain expected swarm-feed-index-next!");return{feedIndex:t,feedIndexNext:r}}},7922:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pin=async function(e,t){await(0,n.http)(e,{method:"post",responseType:"json",path:`pins/${t}`})},t.unpin=async function(e,t){await(0,n.http)(e,{method:"delete",responseType:"json",path:`pins/${t}`})},t.getPin=async function(e,t){return(await(0,n.http)(e,{method:"get",responseType:"json",path:`pins/${t}`})).data},t.getAllPins=async function(e){const t=(await(0,n.http)(e,{method:"get",responseType:"json",path:"pins"})).data.references;if(null===t)return[];return t};var n=r(8384)},148:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.send=async function(e,t,r,n,i,u){await(0,a.http)(e,{method:"post",path:`pss/send/${t}/${r}`,body:await(0,o.prepareData)(n),responseType:"json",searchParams:{recipient:u},headers:(0,s.extractUploadHeaders)(i)})},t.subscribe=function(e,t){const r=e.replace(/^http/i,"ws");return new i.default(`${r}/pss/subscribe/${t}`)};var n,i=(n=r(8041))&&n.__esModule?n:{default:n},o=r(5120),a=r(8384),s=r(7551)},6866:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.upload=async function(e,t,r,o,a,s,u){return(await(0,i.http)(e,{method:"post",path:`soc/${t}/${r}`,body:a,headers:{"content-type":"application/octet-stream",...(0,n.extractUploadHeaders)(s,u)},responseType:"json",searchParams:{sig:o}})).data.reference};var n=r(7551),i=r(8384)},9364:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkConnection=async function(e){await(0,n.http)(e,{path:""})};var n=r(8384)},3920:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reupload=async function(e,t){await(0,n.http)(e,{method:"put",path:`stewardship/${t}`})},t.isRetrievable=async function(e,t){return(await(0,n.http)(e,{method:"get",responseType:"json",path:`stewardship/${t}`})).data.isRetrievable};var n=r(8384)},8211:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createTag=async function(e){return(await(0,n.http)(e,{method:"post",path:i,responseType:"json"})).data},t.retrieveTag=async function(e,t){return(await(0,n.http)(e,{path:`tags/${t}`,responseType:"json"})).data},t.getAllTags=async function(e,t,r){return(await(0,n.http)(e,{path:"tags",searchParams:{offset:t,limit:r},responseType:"json"})).data.tags},t.deleteTag=async function(e,t){await(0,n.http)(e,{method:"delete",path:`tags/${t}`})},t.updateTag=async function(e,t,r){await(0,n.http)(e,{method:"patch",path:`tags/${t}`,json:{reference:r}})};var n=r(8384);const i="tags"},2387:(e,t)=>{"use strict";let r;Object.defineProperty(t,"__esModule",{value:!0}),t.BeeModes=void 0,t.BeeModes=r,function(e){e.FULL="full",e.LIGHT="light",e.DEV="dev"}(r||(t.BeeModes=r={}))},1713:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={SPAN_SIZE:!0,SECTION_SIZE:!0,BRANCHES:!0,CHUNK_SIZE:!0,ADDRESS_HEX_LENGTH:!0,PSS_TARGET_HEX_LENGTH_MAX:!0,PUBKEY_HEX_LENGTH:!0,BATCH_ID_HEX_LENGTH:!0,REFERENCE_HEX_LENGTH:!0,ENCRYPTED_REFERENCE_HEX_LENGTH:!0,REFERENCE_BYTES_LENGTH:!0,ENCRYPTED_REFERENCE_BYTES_LENGTH:!0,STAMPS_DEPTH_MIN:!0,STAMPS_DEPTH_MAX:!0,TAGS_LIMIT_MIN:!0,TAGS_LIMIT_MAX:!0,TOPIC_BYTES_LENGTH:!0,TOPIC_HEX_LENGTH:!0,SIGNATURE_HEX_LENGTH:!0,SIGNATURE_BYTES_LENGTH:!0};t.SIGNATURE_BYTES_LENGTH=t.SIGNATURE_HEX_LENGTH=t.TOPIC_HEX_LENGTH=t.TOPIC_BYTES_LENGTH=t.TAGS_LIMIT_MAX=t.TAGS_LIMIT_MIN=t.STAMPS_DEPTH_MAX=t.STAMPS_DEPTH_MIN=t.ENCRYPTED_REFERENCE_BYTES_LENGTH=t.REFERENCE_BYTES_LENGTH=t.ENCRYPTED_REFERENCE_HEX_LENGTH=t.REFERENCE_HEX_LENGTH=t.BATCH_ID_HEX_LENGTH=t.PUBKEY_HEX_LENGTH=t.PSS_TARGET_HEX_LENGTH_MAX=t.ADDRESS_HEX_LENGTH=t.CHUNK_SIZE=t.BRANCHES=t.SECTION_SIZE=t.SPAN_SIZE=void 0;var i=r(2387);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in t&&t[e]===i[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}}))}));t.SPAN_SIZE=8;t.SECTION_SIZE=32;t.BRANCHES=128;t.CHUNK_SIZE=4096;t.ADDRESS_HEX_LENGTH=64;t.PSS_TARGET_HEX_LENGTH_MAX=6;t.PUBKEY_HEX_LENGTH=66;t.BATCH_ID_HEX_LENGTH=64;t.REFERENCE_HEX_LENGTH=64;t.ENCRYPTED_REFERENCE_HEX_LENGTH=128;t.REFERENCE_BYTES_LENGTH=32;t.ENCRYPTED_REFERENCE_BYTES_LENGTH=64;t.STAMPS_DEPTH_MIN=17;t.STAMPS_DEPTH_MAX=255;t.TAGS_LIMIT_MIN=1;t.TAGS_LIMIT_MAX=1e3;t.TOPIC_BYTES_LENGTH=32;t.TOPIC_HEX_LENGTH=64;t.SIGNATURE_HEX_LENGTH=130;t.SIGNATURE_BYTES_LENGTH=65},1834:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isBytes=i,t.assertBytes=o,t.isFlexBytes=a,t.assertFlexBytes=function(e,t,r){if(!a(e,t,r))throw new TypeError(`Parameter is not valid FlexBytes of min: ${t}, max: ${r}, length: ${e.length}`)},t.bytesAtOffset=function(e,t,r){const n=e.slice(t,t+r);return o(n,r),n},t.flexBytesAtOffset=function(e,t,r,n){return e.slice(t)},t.bytesEqual=function(e,t){return e.length===t.length&&e.every(((e,r)=>e===t[r]))},t.makeBytes=function(e){return new Uint8Array(e)},t.wrapBytesWithHelpers=function(e){return Object.assign(e,{text:()=>new TextDecoder("utf-8").decode(e),json:()=>JSON.parse(new TextDecoder("utf-8").decode(e)),hex:()=>(0,n.bytesToHex)(e)})};var n=r(7151);function i(e,t){return e instanceof Uint8Array&&e.length===t}function o(e,t){if(!i(e,t))throw new TypeError(`Parameter is not valid Bytes of length: ${t} !== ${e.length}`)}function a(e,t,r){return e instanceof Uint8Array&&e.length>=t&&e.length<=r}},6688:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isCollection=c,t.assertCollection=function(e){if(!c(e))throw new o.BeeArgumentError("invalid collection",e)},t.makeCollectionFromFS=async function(e){if("string"!=typeof e)throw new TypeError("dir has to be string!");if(""===e)throw new TypeError("dir must not be empty string!");return f(e,"")},t.makeCollectionFromFileList=async function(e){const t=[];for(let r=0;r<e.length;r++){const n=e[r];n&&t.push({path:d(n),data:new Uint8Array(await(0,a.fileArrayBuffer)(n))})}return t},t.getCollectionSize=function(e){let t=0;for(let r=0;r<e.length;r++){const n=e[r];n&&(t+=n.size)}return t},t.getFolderSize=async function e(t){if("string"!=typeof t)throw new TypeError("dir has to be string!");if(""===t)throw new TypeError("dir must not be empty string!");const r=await n.default.promises.opendir(t);let o=0;for await(const a of r)if(a.isFile()){const e=await n.default.promises.stat(i.default.join(t,a.name));o+=e.size}else a.isDirectory()&&(o+=await e(i.default.join(t,a.name)));return o};var n=u(r(7147)),i=u(r(1017)),o=r(9470),a=r(2607),s=r(3792);function u(e){return e&&e.__esModule?e:{default:e}}function c(e){return!!Array.isArray(e)&&e.every((e=>"object"==typeof e&&e.data&&e.path&&(0,s.isUint8Array)(e.data)))}async function f(e,t){const r=i.default.join(e,t),o=await n.default.promises.opendir(r);let a=[];for await(const s of o){const r=i.default.join(e,t,s.name),o=i.default.join(t,s.name);s.isFile()?a.push({path:o,data:new Uint8Array(await n.default.promises.readFile(r))}):s.isDirectory()&&(a=[...await f(e,o),...a])}return a}function d(e){if(e.webkitRelativePath&&""!==e.webkitRelativePath)return e.webkitRelativePath.replace(/.*?\//i,"");if(e.name)return e.name;throw new TypeError("file is not valid File object")}},5120:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.prepareData=async function(e){if("string"==typeof e)return new i.default([e],{type:"text/plain"});if(e instanceof Uint8Array||e instanceof ArrayBuffer)return new i.default([e],{type:"application/octet-stream"});if(e instanceof i.default||(0,o.isNodeReadable)(e))return e;if((0,o.isReadableStream)(e))return(0,o.readableWebToNode)(e);throw new TypeError("unknown data type")},t.prepareWebsocketData=async function(e){if("string"==typeof e)return(new TextEncoder).encode(e);if(e instanceof Buffer)return new Uint8Array(e);if(e instanceof ArrayBuffer)return new Uint8Array(e);if(e instanceof i.default)return new Uint8Array(await new Response(e).arrayBuffer());if(t=e,Array.isArray(t)&&t.length>0&&t.every((e=>e instanceof Buffer)))return new Uint8Array(Buffer.concat(e));var t;throw new TypeError("unknown websocket data type")};var n,i=(n=r(660))&&n.__esModule?n:{default:n},o=r(3504)},9470:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BeeNotAJsonError=t.BeeResponseError=t.BeeRequestError=t.BeeArgumentError=t.BeeError=void 0;class r extends Error{constructor(e){super(e)}}t.BeeError=r;t.BeeArgumentError=class extends r{constructor(e,t){super(e),this.value=t}};t.BeeRequestError=class extends r{constructor(e,t){super(e),this.requestOptions=t}};t.BeeResponseError=class extends r{constructor(e,t,r,n,i){super(i),this.status=e,this.response=t,this.responseBody=r,this.requestOptions=n}};t.BeeNotAJsonError=class extends r{constructor(){super("Received response is not valid JSON.")}}},264:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.makeEthAddress=a,t.makeHexEthAddress=s,t.isHexEthAddress=u,t.toLittleEndian=c,t.fromLittleEndian=function(e,t=2){return c(e,t)},t.ethToSwarmAddress=function(e,t=1){(function(e){if(!u(e))throw new TypeError("invalid ETH address")})(e),function(e){if(Number.isInteger(e&&e>0&&e<Number.MAX_SAFE_INTEGER))throw new TypeError("swarm network id must be positive integer")}(t);const r=`${(0,i.makeHexString)(e)}${c(t,16)}`;(0,i.assertHexString)(r);return(0,n.sha3_256)((0,i.hexToBytes)(r))},t.makeEthereumWalletSigner=async function(e,t){let r;if("object"!=typeof e||null===e)throw new TypeError("We need JsonRPC provider object!");if(e.request)r=e.request;else{if(!e.sendAsync)throw new Error("Incompatible interface of given provider!");r=e.sendAsync}t||(t=(await r({method:"eth_requestAccounts"}))[0]);const n=a(t),i=s(t);return{address:n,sign:async e=>await r({jsonrpc:"2.0",method:"personal_sign",params:["0x"+e.hex(),"0x"+i]})}};var n=r(8086),i=r(7151),o=r(1834);function a(e){if("string"==typeof e){const t=(0,i.makeHexString)(e,40),r=(0,i.hexToBytes)(t);return(0,o.assertBytes)(r,20),r}if(e instanceof Uint8Array)return(0,o.assertBytes)(e,20),e;throw new TypeError("Invalid EthAddress")}function s(e){try{return(0,i.makeHexString)(e,40)}catch(t){throw t instanceof TypeError&&(t.message=`Invalid HexEthAddress: ${t.message}`),t}}function u(e){return function(e){return"string"==typeof e&&(/^(0x|0X)?[0-9a-f]{40}$/.test(e)||/^(0x|0X)?[0-9A-F]{40}$/.test(e))}(e)||function(e){try{const t=(0,i.makeHexString)(e,40),r=(0,n.keccak256)(t.toLowerCase());for(let e=0;e<40;e+=1)if(parseInt(r[e],16)>7&&t[e].toUpperCase()!==t[e]||parseInt(r[e],16)<=7&&t[e].toLowerCase()!==t[e])return!1;return!0}catch(t){if(t instanceof TypeError)return!1;throw t}}(e)}function c(e,t=2){var r;if(!(Number.isInteger(t)&&t>=2&&t%2==0))throw new TypeError("minimal padding for conversion needs to be positive even integer");let n;if("string"==typeof e)n=(0,i.makeHexString)(e);else{if("number"!=typeof e)throw new TypeError("incorrect input type");n=(0,i.intToHex)(e)}n=n.padStart(t,"0"),n.length%2!=0&&(n=n.padStart(n.length+1,"0"));const o=null===(r=n.match(/../g))||void 0===r?void 0:r.reverse().join("");if(o)return o;throw new Error("failed to convert")}},5085:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getCollectionSize",{enumerable:!0,get:function(){return n.getCollectionSize}}),Object.defineProperty(t,"getFolderSize",{enumerable:!0,get:function(){return n.getFolderSize}}),Object.defineProperty(t,"Bytes",{enumerable:!0,get:function(){return i.Bytes}}),Object.defineProperty(t,"FlexBytes",{enumerable:!0,get:function(){return i.FlexBytes}}),Object.defineProperty(t,"isBytes",{enumerable:!0,get:function(){return i.isBytes}}),Object.defineProperty(t,"assertBytes",{enumerable:!0,get:function(){return i.assertBytes}}),Object.defineProperty(t,"isFlexBytes",{enumerable:!0,get:function(){return i.isFlexBytes}}),Object.defineProperty(t,"assertFlexBytes",{enumerable:!0,get:function(){return i.assertFlexBytes}}),Object.defineProperty(t,"bytesAtOffset",{enumerable:!0,get:function(){return i.bytesAtOffset}}),Object.defineProperty(t,"flexBytesAtOffset",{enumerable:!0,get:function(){return i.flexBytesAtOffset}}),Object.defineProperty(t,"bytesEqual",{enumerable:!0,get:function(){return i.bytesEqual}}),Object.defineProperty(t,"HexString",{enumerable:!0,get:function(){return o.HexString}}),Object.defineProperty(t,"PrefixedHexString",{enumerable:!0,get:function(){return o.PrefixedHexString}}),Object.defineProperty(t,"makeHexString",{enumerable:!0,get:function(){return o.makeHexString}}),Object.defineProperty(t,"hexToBytes",{enumerable:!0,get:function(){return o.hexToBytes}}),Object.defineProperty(t,"bytesToHex",{enumerable:!0,get:function(){return o.bytesToHex}}),Object.defineProperty(t,"intToHex",{enumerable:!0,get:function(){return o.intToHex}}),Object.defineProperty(t,"isHexString",{enumerable:!0,get:function(){return o.isHexString}}),Object.defineProperty(t,"assertHexString",{enumerable:!0,get:function(){return o.assertHexString}}),Object.defineProperty(t,"assertPrefixedHexString",{enumerable:!0,get:function(){return o.assertPrefixedHexString}}),Object.defineProperty(t,"EthAddress",{enumerable:!0,get:function(){return a.EthAddress}}),Object.defineProperty(t,"makeEthAddress",{enumerable:!0,get:function(){return a.makeEthAddress}}),Object.defineProperty(t,"makeHexEthAddress",{enumerable:!0,get:function(){return a.makeHexEthAddress}}),Object.defineProperty(t,"isHexEthAddress",{enumerable:!0,get:function(){return a.isHexEthAddress}}),Object.defineProperty(t,"ethToSwarmAddress",{enumerable:!0,get:function(){return a.ethToSwarmAddress}}),Object.defineProperty(t,"toLittleEndian",{enumerable:!0,get:function(){return a.toLittleEndian}}),Object.defineProperty(t,"fromLittleEndian",{enumerable:!0,get:function(){return a.fromLittleEndian}}),Object.defineProperty(t,"makeEthereumWalletSigner",{enumerable:!0,get:function(){return a.makeEthereumWalletSigner}}),Object.defineProperty(t,"readableWebToNode",{enumerable:!0,get:function(){return s.readableWebToNode}}),Object.defineProperty(t,"readableNodeToWeb",{enumerable:!0,get:function(){return s.readableNodeToWeb}}),Object.defineProperty(t,"isReadableStream",{enumerable:!0,get:function(){return s.isReadableStream}}),Object.defineProperty(t,"isNodeReadable",{enumerable:!0,get:function(){return s.isNodeReadable}}),Object.defineProperty(t,"normalizeToReadableStream",{enumerable:!0,get:function(){return s.normalizeToReadableStream}}),Object.defineProperty(t,"isReadable",{enumerable:!0,get:function(){return s.isReadable}}),Object.defineProperty(t,"keccak256Hash",{enumerable:!0,get:function(){return u.keccak256Hash}}),Object.defineProperty(t,"makeMaxTarget",{enumerable:!0,get:function(){return c.makeMaxTarget}}),Object.defineProperty(t,"getStampUsage",{enumerable:!0,get:function(){return f.getStampUsage}});var n=r(6688),i=r(1834),o=r(7151),a=r(264),s=r(3504),u=r(9769),c=r(349),f=r(2520)},2607:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isFile=function(e){if("function"==typeof File)return e instanceof File;const t=e;return"object"==typeof t&&"string"==typeof t.name&&("function"==typeof t.stream||"function"==typeof t.arrayBuffer)},t.fileArrayBuffer=async function(e){if(e.arrayBuffer)return e.arrayBuffer();return new Promise((t=>{const r=new FileReader;r.onload=()=>t(r.result),r.readAsArrayBuffer(e)}))}},9769:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.keccak256Hash=function(...e){const t=n.keccak256.create();return e.forEach((e=>t.update(e))),Uint8Array.from(t.digest())};var n=r(8086)},7551:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.readFileHeaders=function(e){const t=function(e){if(!e)throw new n.BeeError("missing content-disposition header");const t=e.match(/filename\*?=['"]?(?:UTF-\d['"]*)?([^;\r\n"']*)['"]?;?/i);if(t&&t.length>0)return t[1];throw new n.BeeError("invalid content-disposition header")}(e.get("content-disposition")),r=function(e){if(!e)return;return parseInt(e,10)}(e.get("swarm-tag-uid")),i=e.get("content-type")||void 0;return{name:t,tagUid:r,contentType:i}},t.extractUploadHeaders=function(e,t){if(!e)throw new n.BeeError("Postage BatchID has to be specified!");const r={"swarm-postage-batch-id":e};null!=t&&t.pin&&(r["swarm-pin"]=String(t.pin));null!=t&&t.encrypt&&(r["swarm-encrypt"]=String(t.encrypt));null!=t&&t.tag&&(r["swarm-tag"]=String(t.tag));"boolean"==typeof(null==t?void 0:t.deferred)&&(r["swarm-deferred-upload"]=t.deferred.toString());return r};var n=r(9470)},7151:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.makeHexString=function(e,t){if("number"==typeof e)return o(e,t);if(e instanceof Uint8Array)return i(e,t);if("string"==typeof e){if(s(e)){const r=e.slice(2);if(t&&r.length!==t)throw new TypeError(`Length mismatch for valid hex string. Expecting length ${t}: ${r}`);return r}return u(e,t),e}throw new TypeError("Not HexString compatible type!")},t.hexToBytes=function(e){u(e);const t=(0,n.makeBytes)(e.length/2);for(let r=0;r<t.length;r++){const n=e.substr(2*r,2);t[r]=parseInt(n,16)}return t},t.bytesToHex=i,t.intToHex=o,t.isHexString=a,t.isPrefixedHexString=s,t.assertHexString=u,t.assertPrefixedHexString=function(e,t="value"){if(!s(e))throw new TypeError(`${t} not valid prefixed hex string: ${e}`)};var n=r(1834);function i(e,t){const r=Array.from(e,(e=>e.toString(16).padStart(2,"0"))).join("");if(t&&r.length!==t)throw new TypeError(`Resulting HexString does not have expected length ${t}: ${r}`);return r}function o(e,t){if(!Number.isInteger(e))throw new TypeError("the value provided is not integer");if(e>Number.MAX_SAFE_INTEGER)throw new TypeError("the value provided exceeds safe integer");if(e<0)throw new TypeError("the value provided is a negative integer");const r=e.toString(16);if(t&&r.length!==t)throw new TypeError(`Resulting HexString does not have expected length ${t}: ${r}`);return r}function a(e,t){return"string"==typeof e&&/^[0-9a-f]+$/i.test(e)&&(!t||e.length===t)}function s(e){return"string"==typeof e&&/^0x[0-9a-f]+$/i.test(e)}function u(e,t,r="value"){if(!a(e,t)){if(s(e))throw new TypeError(`${r} not valid non prefixed hex string (has 0x prefix): ${e}`);throw new TypeError(`${r} not valid hex string${t?` of length ${t}`:""}: ${e}`)}}},8384:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wrapRequestClosure=function(e){return async t=>{await e(l(t))}},t.wrapResponseClosure=function(e){return async(t,r,n)=>{await e({headers:d(n.headers),status:n.status,statusText:n.statusText,request:l(t)})}},t.filterHeaders=h,t.http=async function(e,t){try{const{path:n,responseType:o,...s}=t,u=await e(n,{...s,searchParams:h(s.searchParams)});switch(o){case"stream":if(!u.body)throw new i.BeeError("Response was expected to get data but did not get any!");u.data=(0,a.normalizeToReadableStream)(u.body);break;case"arraybuffer":u.data=await u.arrayBuffer();break;case"json":try{u.data=await u.json()}catch(r){throw new i.BeeNotAJsonError}}return u}catch(r){if(r instanceof i.BeeNotAJsonError)throw r;if(function(e){return(0,c.isObject)(e)&&void 0!==e.response}(r)){let e;const n=await r.response.text();try{e=JSON.parse(n).message}catch(r){}throw e?new i.BeeResponseError(r.response.status,r.response,n,t,`${r.response.statusText}: ${e}`):new i.BeeResponseError(r.response.status,r.response,n,t,r.response.statusText)}throw function(e){return(0,c.isObject)(e)&&void 0!==e.request}(r)?new i.BeeRequestError(r.message,t):new i.BeeError(r.message)}},t.makeDefaultKy=function(e){return o.default.create((0,s.deepMerge)(f,e))};var n,i=r(9470),o=(n=r(7567))&&n.__esModule?n:{default:n},a=r(3504),s=r(6021),u=r(4147),c=r(3792);const f={headers:{accept:"application/json, text/plain, */*","user-agent":`bee-js/${u.version}`}};function d(e){return[...e.entries()].reduce(((e,[t,r])=>(e[t]=r,e)),{})}function l(e){return{url:e.url,method:e.method.toUpperCase(),headers:d(e.headers)}}function h(e){if(void 0===e)return;(0,c.isStrictlyObject)(e);const t=e;for(const r in t)void 0===t[r]&&delete t[r];return 0!==Object.keys(t).length?t:void 0}},6021:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deepMerge=function e(...t){let r={};for(const i of t)if(Array.isArray(i))Array.isArray(r)||(r=[]),r=[...r,...i];else if((0,n.isObject)(i))for(let[t,o]of Object.entries(i))(0,n.isObject)(o)&&t in r&&(o=e(r[t],o)),r={...r,[t]:o};return r};var n=r(3792)},349:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.makeMaxTarget=function(e){if("string"!=typeof e)throw new TypeError("target has to be an string!");return e.slice(0,n.PSS_TARGET_HEX_LENGTH_MAX)};var n=r(1713)},2520:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getStampUsage=function({utilization:e,depth:t,bucketDepth:r}){return e/Math.pow(2,t-r)}},3504:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isReadable=function(e){return s(e)||u(e)},t.isReadableStream=s,t.isNodeReadable=u,t.readableNodeToWeb=c,t.readableWebToNode=function(e,t){return new f(e,t)},t.normalizeToReadableStream=function(e){if(u(e))return c(e);if(s(e))return e;throw new TypeError("Passed stream is not Node Readable nor ReadableStream!")};var n=r(3792),i=r(3790),o=r(7897);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(e){if(!(0,n.isStrictlyObject)(e))return!1;const t=e;return"function"==typeof t.getReader&&void 0!==t.locked&&"function"==typeof t.cancel&&"function"==typeof t.pipeTo&&"function"==typeof t.pipeThrough}function u(e){if(!(0,n.isStrictlyObject)(e))return!1;const t=e;return!("function"!=typeof t.pipe||!t.readable||"function"!=typeof t._read)}function c(e){return new i.ReadableStream({start(t){e.pause(),e.on("data",(r=>{Buffer.isBuffer(r)?t.enqueue(new Uint8Array(r.buffer)):t.enqueue(r),e.pause()})),e.on("end",(()=>t.close())),e.on("error",(e=>t.error(e)))},pull(){e.resume()},cancel(){e.pause()}})}class f extends o.Readable{constructor(e,t){super(t),a(this,"_webStream",void 0),a(this,"_reader",void 0),a(this,"_reading",void 0),this._webStream=e,this._reader=e.getReader(),this._reading=!1}_read(){if(this._reading)return;this._reading=!0;const e=()=>{this._reader.read().then((t=>{if(!t.done)return this.push(t.value)?e():void(this._reading=!1);this.push(null)}))};e()}}},5696:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.makeTar=function(e){const t=new i.default;for(const r of e){const e=o(r.path);t.append(e,r.data)}return t.out};var n,i=(n=r(1117))&&n.__esModule?n:{default:n};function o(e){const t=(new TextEncoder).encode(e);return{length:t.length,charCodeAt:e=>t[e]}}},3792:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isUint8Array=function(e){return e instanceof Uint8Array},t.isInteger=u,t.isObject=c,t.isStrictlyObject=f,t.isError=function(e){return e instanceof Error},t.assertStrictlyObject=d,t.assertBoolean=l,t.assertInteger=h,t.assertNonNegativeInteger=p,t.assertReference=function(e){try{(0,a.assertHexString)(e,n.REFERENCE_HEX_LENGTH)}catch(t){(0,a.assertHexString)(e,n.ENCRYPTED_REFERENCE_HEX_LENGTH)}},t.assertAddress=function(e){(0,a.assertHexString)(e,n.ADDRESS_HEX_LENGTH,"Address")},t.assertBatchId=function(e){(0,a.assertHexString)(e,n.BATCH_ID_HEX_LENGTH,"BatchId")},t.assertRequestOptions=b,t.assertUploadOptions=y,t.assertFileUploadOptions=function(e){y(e,"FileUploadOptions");const t=e;if(t.size){if("number"!=typeof t.size)throw new TypeError("tag property in FileUploadOptions has to be number or undefined!");p(t.size,"options.size")}if(t.contentType&&"string"!=typeof t.contentType)throw new TypeError("contentType property in FileUploadOptions has to be string or undefined!")},t.assertCollectionUploadOptions=function(e){y(e,"CollectionUploadOptions");const t=e;if(t.indexDocument&&"string"!=typeof t.indexDocument)throw new TypeError("indexDocument property in CollectionUploadOptions has to be string or undefined!");if(t.errorDocument&&"string"!=typeof t.errorDocument)throw new TypeError("errorDocument property in CollectionUploadOptions has to be string or undefined!")},t.isTag=m,t.assertTag=function(e){if(!f(e))throw new TypeError("Tag is not an object!");const t=e,r=["total","processed","synced","uid"];for(const n of r){if(!t[n])throw new TypeError(`Tag's property '${n}' has to be specified!`);if("number"!=typeof t[n])throw new TypeError(`Tag's property '${n}' has to be number!`)}if(!t.startedAt)throw new TypeError("Tag's property 'startedAt' has to be specified!");if("string"!=typeof t.startedAt)throw new TypeError("Tag's property 'startedAt' has to be string!")},t.assertAddressPrefix=function(e){if((0,a.assertHexString)(e,void 0,"AddressPrefix"),e.length>n.PSS_TARGET_HEX_LENGTH_MAX)throw new i.BeeArgumentError(`AddressPrefix must have length of ${n.PSS_TARGET_HEX_LENGTH_MAX} at most! Got string with ${e.length}`,e)},t.assertPssMessageHandler=function(e){if(!f(e))throw new TypeError("PssMessageHandler has to be object!");const t=e;if("function"!=typeof t.onMessage)throw new TypeError("onMessage property of PssMessageHandler has to be function!");if("function"!=typeof t.onError)throw new TypeError("onError property of PssMessageHandler has to be function!")},t.assertPublicKey=function(e){(0,a.assertHexString)(e,n.PUBKEY_HEX_LENGTH,"PublicKey")},t.assertPostageBatchOptions=function(e){if(void 0===e)return;d(e);const t=e;b(t,"PostageBatchOptions"),null!=t&&t.gasPrice&&p(t.gasPrice);void 0!==(null==t?void 0:t.immutableFlag)&&l(t.immutableFlag)},t.assertCashoutOptions=function(e){if(void 0===e)return;d(e);const t=e;b(t,"PostageBatchOptions"),null!=t&&t.gasLimit&&p(t.gasLimit);null!=t&&t.gasPrice&&p(t.gasPrice)},t.assertData=function(e){if("string"!=typeof e&&!(e instanceof Uint8Array))throw new TypeError("Data must be either string or Uint8Array!")},t.assertFileData=function(e){if(!("string"==typeof e||e instanceof Uint8Array||(0,o.isFile)(e)||(0,s.isReadable)(e)))throw new TypeError("Data must be either string, Readable, Uint8Array or File!")},t.assertAllTagsOptions=function(e){if(void 0!==e&&!f(e))throw new TypeError("options has to be an object or undefined!");b(e,"AllTagsOptions");const t=e;if(void 0!==(null==t?void 0:t.limit)){if("number"!=typeof t.limit)throw new TypeError("AllTagsOptions.limit has to be a number or undefined!");if(t.limit<n.TAGS_LIMIT_MIN)throw new i.BeeArgumentError(`AllTagsOptions.limit has to be at least ${n.TAGS_LIMIT_MIN}`,t.limit);if(t.limit>n.TAGS_LIMIT_MAX)throw new i.BeeArgumentError(`AllTagsOptions.limit has to be at most ${n.TAGS_LIMIT_MAX}`,t.limit)}void 0!==(null==t?void 0:t.offset)&&p(t.offset,"AllTagsOptions.offset")},t.makeTagUid=function(e){if(null==e)throw new TypeError("TagUid was expected but got undefined or null instead!");if(m(e))return e.uid;if("number"==typeof e)return p(e,"UID"),e;if("string"==typeof e){const t=parseInt(e);if(isNaN(t))throw new TypeError("Passed tagUid string is not valid integer!");if(t<0)throw new TypeError(`TagUid was expected to be positive non-negative integer! Got ${t}`);return t}throw new TypeError("tagUid has to be either Tag or a number (UID)!")},t.assertTransactionHash=function(e){if("string"!=typeof e)throw new TypeError("TransactionHash has to be a string!");if((0,a.assertPrefixedHexString)(e,"TransactionHash"),66!==e.length)throw new TypeError("TransactionHash has to be prefixed hex string with total length 66 (prefix including)")};var n=r(1713),i=r(9470),o=r(2607),a=r(7151),s=r(3504);function u(e){return"string"==typeof e&&/^-?(0|[1-9][0-9]*)$/g.test(e)||"number"==typeof e&&e>Number.MIN_SAFE_INTEGER&&e<Number.MAX_SAFE_INTEGER&&Number.isInteger(e)}function c(e){return null!==e&&"object"==typeof e}function f(e){return c(e)&&!Array.isArray(e)}function d(e,t="value"){if(!f(e))throw new TypeError(`${t} has to be an object that is not null nor array!`)}function l(e,t="value"){if(!0!==e&&!1!==e)throw new TypeError(`${t} is not boolean`)}function h(e,t="value"){if(!u(e))throw new TypeError(`${t} is not integer`)}function p(e,t="Value"){if(h(e,t),Number(e)<0)throw new i.BeeArgumentError(`${t} has to be bigger or equal to zero`,e)}function b(e,t="RequestOptions"){if(void 0===e)return;if(!f(e))throw new TypeError(`${t} has to be an object!`);const r=e;if(r.retry&&p(r.retry,`${t}.retry`),r.timeout&&p(r.timeout,`${t}.timeout`),r.fetch&&"function"!=typeof r.fetch)throw new TypeError(`${t}.fetch has to be a function or undefined!`)}function y(e,t="UploadOptions"){if(!f(e))throw new TypeError(`${t} has to be an object!`);b(e,t);const r=e;if(r.pin&&"boolean"!=typeof r.pin)throw new TypeError(`options.pin property in ${t} has to be boolean or undefined!`);if(r.encrypt&&"boolean"!=typeof r.encrypt)throw new TypeError(`options.encrypt property in ${t} has to be boolean or undefined!`);if(r.tag){if("number"!=typeof r.tag)throw new TypeError(`options.tag property in ${t} has to be number or undefined!`);p(r.tag,"options.tag")}}function m(e){if(!f(e))return!1;const t=e;return!(!["total","processed","synced","uid"].every((e=>"number"==typeof t[e]))||!t.startedAt||"string"!=typeof t.startedAt)}},7359:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.writeUint64LittleEndian=function(e,t=(0,n.makeBytes)(8)){const r=new DataView(t.buffer),i=4294967295&e;return r.setUint32(0,i,true),r.setUint32(4,0,true),t},t.writeUint64BigEndian=function(e,t=(0,n.makeBytes)(8)){const r=new DataView(t.buffer),i=4294967295&e;return r.setUint32(0,0),r.setUint32(4,i),t},t.readUint64BigEndian=function(e){return new DataView(e.buffer).getUint32(4)};var n=r(1834)},1376:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isValidBeeUrl=o,t.assertBeeUrl=function(e){if(!o(e))throw new n.BeeArgumentError("URL is not valid!",e)},t.stripLastSlash=function(e){if(e.endsWith("/"))return e.slice(0,-1);return e};var n=r(9470),i=r(3792);function o(e){try{if("string"!=typeof e)return!1;const t=new URL(e);return"http:"===t.protocol||"https:"===t.protocol}catch(t){if(t instanceof TypeError||function(e){return(0,i.isObject)(e)&&"string"==typeof e.code}(t)&&"ERR_INVALID_URL"===t.code)return!1;throw t}}},4300:e=>{"use strict";e.exports=require("buffer")},6113:e=>{"use strict";e.exports=require("crypto")},2361:e=>{"use strict";e.exports=require("events")},7147:e=>{"use strict";e.exports=require("fs")},3685:e=>{"use strict";e.exports=require("http")},5687:e=>{"use strict";e.exports=require("https")},1808:e=>{"use strict";e.exports=require("net")},2037:e=>{"use strict";e.exports=require("os")},1017:e=>{"use strict";e.exports=require("path")},2781:e=>{"use strict";e.exports=require("stream")},4404:e=>{"use strict";e.exports=require("tls")},7310:e=>{"use strict";e.exports=require("url")},3837:e=>{"use strict";e.exports=require("util")},9796:e=>{"use strict";e.exports=require("zlib")},5234:(e,t,r)=>{"use strict";t=e.exports=F;const n=r(3685),i=r(5687),o=r(9796),a=r(2781),s=r(4793),u=r(3837),c=r(3005),f=r(6113),d=r(7310);class l extends Error{constructor(e,t){super(e),Error.captureStackTrace(this,this.constructor),this.type=t}get name(){return this.constructor.name}get[Symbol.toStringTag](){return this.constructor.name}}class h extends l{constructor(e,t,r){super(e,t),r&&(this.code=this.errno=r.code,this.erroredSysCall=r.syscall)}}const p=Symbol.toStringTag,b=e=>"object"==typeof e&&"function"==typeof e.append&&"function"==typeof e.delete&&"function"==typeof e.get&&"function"==typeof e.getAll&&"function"==typeof e.has&&"function"==typeof e.set&&"function"==typeof e.sort&&"URLSearchParams"===e[p],y=e=>"object"==typeof e&&"function"==typeof e.arrayBuffer&&"string"==typeof e.type&&"function"==typeof e.stream&&"function"==typeof e.constructor&&/^(Blob|File)$/.test(e[p]);function m(e){return"object"==typeof e&&"function"==typeof e.append&&"function"==typeof e.set&&"function"==typeof e.get&&"function"==typeof e.getAll&&"function"==typeof e.delete&&"function"==typeof e.keys&&"function"==typeof e.values&&"function"==typeof e.entries&&"function"==typeof e.constructor&&"FormData"===e[p]}const g="\r\n",_="-".repeat(2),v=Buffer.byteLength(g),w=e=>`${_}${e}${_}${g.repeat(2)}`;function S(e,t,r){let n="";return n+=`${_}${e}\r\n`,n+=`Content-Disposition: form-data; name="${t}"`,y(r)&&(n+=`; filename="${r.name}"\r\n`,n+=`Content-Type: ${r.type||"application/octet-stream"}`),`${n}${g.repeat(2)}`}const E=Symbol("Body internals");class T{constructor(e,{size:t=0}={}){let r=null;null===e?e=null:b(e)?e=Buffer.from(e.toString()):y(e)||Buffer.isBuffer(e)||(u.types.isAnyArrayBuffer(e)?e=Buffer.from(e):ArrayBuffer.isView(e)?e=Buffer.from(e.buffer,e.byteOffset,e.byteLength):e instanceof a||(m(e)?(r=`NodeFetchFormDataBoundary${f.randomBytes(8).toString("hex")}`,e=a.Readable.from(async function*(e,t){for(const[r,n]of e)yield S(t,r,n),y(n)?yield*n.stream():yield n,yield g;yield w(t)}(e,r))):e=Buffer.from(String(e)))),this[E]={body:e,boundary:r,disturbed:!1,error:null},this.size=t,e instanceof a&&e.on("error",(e=>{const t=e instanceof l?e:new h(`Invalid response body while trying to fetch ${this.url}: ${e.message}`,"system",e);this[E].error=t}))}get body(){return this[E].body}get bodyUsed(){return this[E].disturbed}async arrayBuffer(){const{buffer:e,byteOffset:t,byteLength:r}=await R(this);return e.slice(t,t+r)}async blob(){const e=this.headers&&this.headers.get("content-type")||this[E].body&&this[E].body.type||"",t=await this.buffer();return new c([t],{type:e})}async json(){const e=await R(this);return JSON.parse(e.toString())}async text(){return(await R(this)).toString()}buffer(){return R(this)}}async function R(e){if(e[E].disturbed)throw new TypeError(`body used already for: ${e.url}`);if(e[E].disturbed=!0,e[E].error)throw e[E].error;let{body:t}=e;if(null===t)return Buffer.alloc(0);if(y(t)&&(t=t.stream()),Buffer.isBuffer(t))return t;if(!(t instanceof a))return Buffer.alloc(0);const r=[];let n=0;try{for await(const i of t){if(e.size>0&&n+i.length>e.size){const r=new h(`content size at ${e.url} over limit: ${e.size}`,"max-size");throw t.destroy(r),r}n+=i.length,r.push(i)}}catch(i){throw i instanceof l?i:new h(`Invalid response body while trying to fetch ${e.url}: ${i.message}`,"system",i)}if(!0!==t.readableEnded&&!0!==t._readableState.ended)throw new h(`Premature close of server response while trying to fetch ${e.url}`);try{return r.every((e=>"string"==typeof e))?Buffer.from(r.join("")):Buffer.concat(r,n)}catch(i){throw new h(`Could not create Buffer from response body for ${e.url}: ${i.message}`,"system",i)}}Object.defineProperties(T.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0}});const M=(e,t)=>{let r,n,{body:i}=e;if(e.bodyUsed)throw new Error("cannot clone body after it is used");return i instanceof a&&"function"!=typeof i.getBoundary&&(r=new a.PassThrough({highWaterMark:t}),n=new a.PassThrough({highWaterMark:t}),i.pipe(r),i.pipe(n),e[E].body=r,i=n),i},P=(e,t)=>null===e?null:"string"==typeof e?"text/plain;charset=UTF-8":b(e)?"application/x-www-form-urlencoded;charset=UTF-8":y(e)?e.type||null:Buffer.isBuffer(e)||u.types.isAnyArrayBuffer(e)||ArrayBuffer.isView(e)?null:e&&"function"==typeof e.getBoundary?`multipart/form-data;boundary=${e.getBoundary()}`:m(e)?`multipart/form-data; boundary=${t[E].boundary}`:e instanceof a?null:"text/plain;charset=UTF-8",A=e=>{const{body:t}=e;return null===t?0:y(t)?t.size:Buffer.isBuffer(t)?t.length:t&&"function"==typeof t.getLengthSync?t.hasKnownLength&&t.hasKnownLength()?t.getLengthSync():null:m(t)?function(e,t){let r=0;for(const[n,i]of e)r+=Buffer.byteLength(S(t,n,i)),y(i)?r+=i.size:r+=Buffer.byteLength(String(i)),r+=v;return r+=Buffer.byteLength(w(t)),r}(e[E].boundary):null},k="function"==typeof n.validateHeaderName?n.validateHeaderName:e=>{if(!/^[\^`\-\w!#$%&'*+.|~]+$/.test(e)){const t=new TypeError(`Header name must be a valid HTTP token [${e}]`);throw Object.defineProperty(t,"code",{value:"ERR_INVALID_HTTP_TOKEN"}),t}},O="function"==typeof n.validateHeaderValue?n.validateHeaderValue:(e,t)=>{if(/[^\t\u0020-\u007E\u0080-\u00FF]/.test(t)){const t=new TypeError(`Invalid character in header content ["${e}"]`);throw Object.defineProperty(t,"code",{value:"ERR_INVALID_CHAR"}),t}};class x extends URLSearchParams{constructor(e){let t=[];if(e instanceof x){const r=e.raw();for(const[e,n]of Object.entries(r))t.push(...n.map((t=>[e,t])))}else if(null==e);else{if("object"!=typeof e||u.types.isBoxedPrimitive(e))throw new TypeError("Failed to construct 'Headers': The provided value is not of type '(sequence<sequence<ByteString>> or record<ByteString, ByteString>)");{const r=e[Symbol.iterator];if(null==r)t.push(...Object.entries(e));else{if("function"!=typeof r)throw new TypeError("Header pairs must be iterable");t=[...e].map((e=>{if("object"!=typeof e||u.types.isBoxedPrimitive(e))throw new TypeError("Each header pair must be an iterable object");return[...e]})).map((e=>{if(2!==e.length)throw new TypeError("Each header pair must be a name/value tuple");return[...e]}))}}}return t=t.length>0?t.map((([e,t])=>(k(e),O(e,String(t)),[String(e).toLowerCase(),String(t)]))):void 0,super(t),new Proxy(this,{get(e,t,r){switch(t){case"append":case"set":return(e,n)=>(k(e),O(e,String(n)),URLSearchParams.prototype[t].call(r,String(e).toLowerCase(),String(n)));case"delete":case"has":case"getAll":return e=>(k(e),URLSearchParams.prototype[t].call(r,String(e).toLowerCase()));case"keys":return()=>(e.sort(),new Set(URLSearchParams.prototype.keys.call(e)).keys());default:return Reflect.get(e,t,r)}}})}get[Symbol.toStringTag](){return this.constructor.name}toString(){return Object.prototype.toString.call(this)}get(e){const t=this.getAll(e);if(0===t.length)return null;let r=t.join(", ");return/^content-encoding$/i.test(e)&&(r=r.toLowerCase()),r}forEach(e){for(const t of this.keys())e(this.get(t),t)}*values(){for(const e of this.keys())yield this.get(e)}*entries(){for(const e of this.keys())yield[e,this.get(e)]}[Symbol.iterator](){return this.entries()}raw(){return[...this.keys()].reduce(((e,t)=>(e[t]=this.getAll(t),e)),{})}[Symbol.for("nodejs.util.inspect.custom")](){return[...this.keys()].reduce(((e,t)=>{const r=this.getAll(t);return e[t]="host"===t?r[0]:r.length>1?r:r[0],e}),{})}}Object.defineProperties(x.prototype,["get","entries","forEach","values"].reduce(((e,t)=>(e[t]={enumerable:!0},e)),{}));const C=new Set([301,302,303,307,308]),j=e=>C.has(e),B=Symbol("Response internals");class q extends T{constructor(e=null,t={}){super(e,t);const r=t.status||200,n=new x(t.headers);if(null!==e&&!n.has("Content-Type")){const t=P(e);t&&n.append("Content-Type",t)}this[B]={url:t.url,status:r,statusText:t.statusText||"",headers:n,counter:t.counter,highWaterMark:t.highWaterMark}}get url(){return this[B].url||""}get status(){return this[B].status}get ok(){return this[B].status>=200&&this[B].status<300}get redirected(){return this[B].counter>0}get statusText(){return this[B].statusText}get headers(){return this[B].headers}get highWaterMark(){return this[B].highWaterMark}clone(){return new q(M(this,this.highWaterMark),{url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected,size:this.size})}static redirect(e,t=302){if(!j(t))throw new RangeError('Failed to execute "redirect" on "response": Invalid status code');return new q(null,{headers:{location:new URL(e).toString()},status:t})}get[Symbol.toStringTag](){return"Response"}}Object.defineProperties(q.prototype,{url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}});const I=Symbol("Request internals"),N=e=>"object"==typeof e&&"object"==typeof e[I];class L extends T{constructor(e,t={}){let r;N(e)?r=new URL(e.url):(r=new URL(e),e={});let n=t.method||e.method||"GET";if(n=n.toUpperCase(),(null!=t.body||N(e))&&null!==e.body&&("GET"===n||"HEAD"===n))throw new TypeError("Request with GET/HEAD method cannot have body");const i=t.body?t.body:N(e)&&null!==e.body?M(e):null;super(i,{size:t.size||e.size||0});const o=new x(t.headers||e.headers||{});if(null!==i&&!o.has("Content-Type")){const e=P(i,this);e&&o.append("Content-Type",e)}let a=N(e)?e.signal:null;if("signal"in t&&(a=t.signal),null!==a&&("object"!=typeof(s=a)||"AbortSignal"!==s[p]))throw new TypeError("Expected signal to be an instanceof AbortSignal");var s;this[I]={method:n,redirect:t.redirect||e.redirect||"follow",headers:o,parsedURL:r,signal:a},this.follow=void 0===t.follow?void 0===e.follow?20:e.follow:t.follow,this.compress=void 0===t.compress?void 0===e.compress||e.compress:t.compress,this.counter=t.counter||e.counter||0,this.agent=t.agent||e.agent,this.highWaterMark=t.highWaterMark||e.highWaterMark||16384,this.insecureHTTPParser=t.insecureHTTPParser||e.insecureHTTPParser||!1}get method(){return this[I].method}get url(){return d.format(this[I].parsedURL)}get headers(){return this[I].headers}get redirect(){return this[I].redirect}get signal(){return this[I].signal}clone(){return new L(this)}get[Symbol.toStringTag](){return"Request"}}Object.defineProperties(L.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0}});class z extends l{constructor(e,t="aborted"){super(e,t)}}const D=new Set(["data:","http:","https:"]);async function F(e,t){return new Promise(((r,u)=>{const c=new L(e,t),f=(e=>{const{parsedURL:t}=e[I],r=new x(e[I].headers);r.has("Accept")||r.set("Accept","*/*");let n=null;if(null===e.body&&/^(post|put)$/i.test(e.method)&&(n="0"),null!==e.body){const t=A(e);"number"!=typeof t||Number.isNaN(t)||(n=String(t))}n&&r.set("Content-Length",n),r.has("User-Agent")||r.set("User-Agent","node-fetch"),e.compress&&!r.has("Accept-Encoding")&&r.set("Accept-Encoding","gzip,deflate,br");let{agent:i}=e;"function"==typeof i&&(i=i(t)),r.has("Connection")||i||r.set("Connection","close");const o=(e=>{if(e.search)return e.search;const t=e.href.length-1,r=e.hash||("#"===e.href[t]?"#":"");return"?"===e.href[t-r.length]?"?":""})(t);return{path:t.pathname+o,pathname:t.pathname,hostname:t.hostname,protocol:t.protocol,port:t.port,hash:t.hash,search:t.search,query:t.query,href:t.href,method:e.method,headers:r[Symbol.for("nodejs.util.inspect.custom")](),insecureHTTPParser:e.insecureHTTPParser,agent:i}})(c);if(!D.has(f.protocol))throw new TypeError(`node-fetch cannot load ${e}. URL scheme "${f.protocol.replace(/:$/,"")}" is not supported.`);if("data:"===f.protocol){const e=s(c.url),t=new q(e,{headers:{"Content-Type":e.typeFull}});return void r(t)}const d=("https:"===f.protocol?i:n).request,{signal:l}=c;let p=null;const b=()=>{const e=new z("The operation was aborted.");u(e),c.body&&c.body instanceof a.Readable&&c.body.destroy(e),p&&p.body&&p.body.emit("error",e)};if(l&&l.aborted)return void b();const m=()=>{b(),_()},g=d(f);l&&l.addEventListener("abort",m);const _=()=>{g.abort(),l&&l.removeEventListener("abort",m)};g.on("error",(e=>{u(new h(`request to ${c.url} failed, reason: ${e.message}`,"system",e)),_()})),g.on("response",(e=>{g.setTimeout(0);const n=function(e=[]){return new x(e.reduce(((e,t,r,n)=>(r%2==0&&e.push(n.slice(r,r+2)),e)),[]).filter((([e,t])=>{try{return k(e),O(e,String(t)),!0}catch{return!1}})))}(e.rawHeaders);if(j(e.statusCode)){const i=n.get("Location"),o=null===i?null:new URL(i,c.url);switch(c.redirect){case"error":return u(new h(`uri requested responds with a redirect, redirect mode is set to error: ${c.url}`,"no-redirect")),void _();case"manual":if(null!==o)try{n.set("Location",o)}catch(b){u(b)}break;case"follow":{if(null===o)break;if(c.counter>=c.follow)return u(new h(`maximum redirect reached at: ${c.url}`,"max-redirect")),void _();const n={headers:new x(c.headers),follow:c.follow,counter:c.counter+1,agent:c.agent,compress:c.compress,method:c.method,body:c.body,signal:c.signal,size:c.size};return 303!==e.statusCode&&c.body&&t.body instanceof a.Readable?(u(new h("Cannot follow redirect with body being a readable stream","unsupported-redirect")),void _()):(303!==e.statusCode&&(301!==e.statusCode&&302!==e.statusCode||"POST"!==c.method)||(n.method="GET",n.body=void 0,n.headers.delete("content-length")),r(F(new L(o,n))),void _())}}}e.once("end",(()=>{l&&l.removeEventListener("abort",m)}));let i=a.pipeline(e,new a.PassThrough,(e=>{u(e)}));process.version<"v12.10"&&e.on("aborted",m);const s={url:c.url,status:e.statusCode,statusText:e.statusMessage,headers:n,size:c.size,counter:c.counter,highWaterMark:c.highWaterMark},f=n.get("Content-Encoding");if(!c.compress||"HEAD"===c.method||null===f||204===e.statusCode||304===e.statusCode)return p=new q(i,s),void r(p);const d={flush:o.Z_SYNC_FLUSH,finishFlush:o.Z_SYNC_FLUSH};if("gzip"===f||"x-gzip"===f)return i=a.pipeline(i,o.createGunzip(d),(e=>{u(e)})),p=new q(i,s),void r(p);if("deflate"!==f&&"x-deflate"!==f){if("br"===f)return i=a.pipeline(i,o.createBrotliDecompress(),(e=>{u(e)})),p=new q(i,s),void r(p);p=new q(i,s),r(p)}else{a.pipeline(e,new a.PassThrough,(e=>{u(e)})).once("data",(e=>{i=8==(15&e[0])?a.pipeline(i,o.createInflate(),(e=>{u(e)})):a.pipeline(i,o.createInflateRaw(),(e=>{u(e)})),p=new q(i,s),r(p)}))}})),((e,{body:t})=>{null===t?e.end():y(t)?t.stream().pipe(e):Buffer.isBuffer(t)?(e.write(t),e.end()):t.pipe(e)})(g,c)}))}t.AbortError=z,t.FetchError=h,t.Headers=x,t.Request=L,t.Response=q,t.default=F,t.isRedirect=j},9902:(e,t,r)=>{"use strict";r.r(t),r.d(t,{ByteLengthQueuingStrategy:()=>Or,CountQueuingStrategy:()=>Br,ReadableByteStreamController:()=>me,ReadableStream:()=>gr,ReadableStreamBYOBReader:()=>Ve,ReadableStreamBYOBRequest:()=>ye,ReadableStreamDefaultController:()=>Qt,ReadableStreamDefaultReader:()=>Q,TransformStream:()=>Dr,TransformStreamDefaultController:()=>$r,WritableStream:()=>st,WritableStreamDefaultController:()=>At,WritableStreamDefaultWriter:()=>vt});const n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol:e=>`Symbol(${e})`;function i(){}const o="undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void 0;function a(e){return"object"==typeof e&&null!==e||"function"==typeof e}const s=i,u=Promise,c=Promise.prototype.then,f=Promise.resolve.bind(u),d=Promise.reject.bind(u);function l(e){return new u(e)}function h(e){return f(e)}function p(e){return d(e)}function b(e,t,r){return c.call(e,t,r)}function y(e,t,r){b(b(e,t,r),void 0,s)}function m(e,t){y(e,t)}function g(e,t){y(e,void 0,t)}function _(e,t,r){return b(e,t,r)}function v(e){b(e,void 0,s)}const w=(()=>{const e=o&&o.queueMicrotask;if("function"==typeof e)return e;const t=h(void 0);return e=>b(t,e)})();function S(e,t,r){if("function"!=typeof e)throw new TypeError("Argument is not a function");return Function.prototype.apply.call(e,t,r)}function E(e,t,r){try{return h(S(e,t,r))}catch(n){return p(n)}}class T{constructor(){this._cursor=0,this._size=0,this._front={_elements:[],_next:void 0},this._back=this._front,this._cursor=0,this._size=0}get length(){return this._size}push(e){const t=this._back;let r=t;16383===t._elements.length&&(r={_elements:[],_next:void 0}),t._elements.push(e),r!==t&&(this._back=r,t._next=r),++this._size}shift(){const e=this._front;let t=e;const r=this._cursor;let n=r+1;const i=e._elements,o=i[r];return 16384===n&&(t=e._next,n=0),--this._size,this._cursor=n,e!==t&&(this._front=t),i[r]=void 0,o}forEach(e){let t=this._cursor,r=this._front,n=r._elements;for(;!(t===n.length&&void 0===r._next||t===n.length&&(r=r._next,n=r._elements,t=0,0===n.length));)e(n[t]),++t}peek(){const e=this._front,t=this._cursor;return e._elements[t]}}function R(e,t){e._ownerReadableStream=t,t._reader=e,"readable"===t._state?k(e):"closed"===t._state?function(e){k(e),C(e)}(e):O(e,t._storedError)}function M(e,t){return Tr(e._ownerReadableStream,t)}function P(e){"readable"===e._ownerReadableStream._state?x(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):function(e,t){O(e,t)}(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")),e._ownerReadableStream._reader=void 0,e._ownerReadableStream=void 0}function A(e){return new TypeError("Cannot "+e+" a stream using a released reader")}function k(e){e._closedPromise=l(((t,r)=>{e._closedPromise_resolve=t,e._closedPromise_reject=r}))}function O(e,t){k(e),x(e,t)}function x(e,t){void 0!==e._closedPromise_reject&&(v(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0)}function C(e){void 0!==e._closedPromise_resolve&&(e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0)}const j=n("[[AbortSteps]]"),B=n("[[ErrorSteps]]"),q=n("[[CancelSteps]]"),I=n("[[PullSteps]]"),N=Number.isFinite||function(e){return"number"==typeof e&&isFinite(e)},L=Math.trunc||function(e){return e<0?Math.ceil(e):Math.floor(e)};function z(e,t){if(void 0!==e&&("object"!=typeof(r=e)&&"function"!=typeof r))throw new TypeError(`${t} is not an object.`);var r}function D(e,t){if("function"!=typeof e)throw new TypeError(`${t} is not a function.`)}function F(e,t){if(!function(e){return"object"==typeof e&&null!==e||"function"==typeof e}(e))throw new TypeError(`${t} is not an object.`)}function W(e,t,r){if(void 0===e)throw new TypeError(`Parameter ${t} is required in '${r}'.`)}function H(e,t,r){if(void 0===e)throw new TypeError(`${t} is required in '${r}'.`)}function U(e){return Number(e)}function $(e){return 0===e?0:e}function G(e,t){const r=Number.MAX_SAFE_INTEGER;let n=Number(e);if(n=$(n),!N(n))throw new TypeError(`${t} is not a finite number`);if(n=function(e){return $(L(e))}(n),n<0||n>r)throw new TypeError(`${t} is outside the accepted range of 0 to ${r}, inclusive`);return N(n)&&0!==n?n:0}function V(e,t){if(!Sr(e))throw new TypeError(`${t} is not a ReadableStream.`)}function K(e){return new Q(e)}function Y(e,t){e._reader._readRequests.push(t)}function X(e,t,r){const n=e._reader._readRequests.shift();r?n._closeSteps():n._chunkSteps(t)}function J(e){return e._reader._readRequests.length}function Z(e){const t=e._reader;return void 0!==t&&!!ee(t)}class Q{constructor(e){if(W(e,1,"ReadableStreamDefaultReader"),V(e,"First parameter"),Er(e))throw new TypeError("This stream has already been locked for exclusive reading by another reader");R(this,e),this._readRequests=new T}get closed(){return ee(this)?this._closedPromise:p(re("closed"))}cancel(e){return ee(this)?void 0===this._ownerReadableStream?p(A("cancel")):M(this,e):p(re("cancel"))}read(){if(!ee(this))return p(re("read"));if(void 0===this._ownerReadableStream)return p(A("read from"));let e,t;const r=l(((r,n)=>{e=r,t=n}));return te(this,{_chunkSteps:t=>e({value:t,done:!1}),_closeSteps:()=>e({value:void 0,done:!0}),_errorSteps:e=>t(e)}),r}releaseLock(){if(!ee(this))throw re("releaseLock");if(void 0!==this._ownerReadableStream){if(this._readRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");P(this)}}}function ee(e){return!!a(e)&&(!!Object.prototype.hasOwnProperty.call(e,"_readRequests")&&e instanceof Q)}function te(e,t){const r=e._ownerReadableStream;r._disturbed=!0,"closed"===r._state?t._closeSteps():"errored"===r._state?t._errorSteps(r._storedError):r._readableStreamController[I](t)}function re(e){return new TypeError(`ReadableStreamDefaultReader.prototype.${e} can only be used on a ReadableStreamDefaultReader`)}Object.defineProperties(Q.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),"symbol"==typeof n.toStringTag&&Object.defineProperty(Q.prototype,n.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0});const ne=Object.getPrototypeOf(Object.getPrototypeOf((async function*(){})).prototype);class ie{constructor(e,t){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=e,this._preventCancel=t}next(){const e=()=>this._nextSteps();return this._ongoingPromise=this._ongoingPromise?_(this._ongoingPromise,e,e):e(),this._ongoingPromise}return(e){const t=()=>this._returnSteps(e);return this._ongoingPromise?_(this._ongoingPromise,t,t):t()}_nextSteps(){if(this._isFinished)return Promise.resolve({value:void 0,done:!0});const e=this._reader;if(void 0===e._ownerReadableStream)return p(A("iterate"));let t,r;const n=l(((e,n)=>{t=e,r=n}));return te(e,{_chunkSteps:e=>{this._ongoingPromise=void 0,w((()=>t({value:e,done:!1})))},_closeSteps:()=>{this._ongoingPromise=void 0,this._isFinished=!0,P(e),t({value:void 0,done:!0})},_errorSteps:t=>{this._ongoingPromise=void 0,this._isFinished=!0,P(e),r(t)}}),n}_returnSteps(e){if(this._isFinished)return Promise.resolve({value:e,done:!0});this._isFinished=!0;const t=this._reader;if(void 0===t._ownerReadableStream)return p(A("finish iterating"));if(!this._preventCancel){const r=M(t,e);return P(t),_(r,(()=>({value:e,done:!0})))}return P(t),h({value:e,done:!0})}}const oe={next(){return ae(this)?this._asyncIteratorImpl.next():p(se("next"))},return(e){return ae(this)?this._asyncIteratorImpl.return(e):p(se("return"))}};function ae(e){if(!a(e))return!1;if(!Object.prototype.hasOwnProperty.call(e,"_asyncIteratorImpl"))return!1;try{return e._asyncIteratorImpl instanceof ie}catch(t){return!1}}function se(e){return new TypeError(`ReadableStreamAsyncIterator.${e} can only be used on a ReadableSteamAsyncIterator`)}void 0!==ne&&Object.setPrototypeOf(oe,ne);const ue=Number.isNaN||function(e){return e!=e};function ce(e){return e.slice()}function fe(e,t,r,n,i){new Uint8Array(e).set(new Uint8Array(r,n,i),t)}function de(e,t,r){if(e.slice)return e.slice(t,r);const n=r-t,i=new ArrayBuffer(n);return fe(i,0,e,t,n),i}function le(e){const t=de(e.buffer,e.byteOffset,e.byteOffset+e.byteLength);return new Uint8Array(t)}function he(e){const t=e._queue.shift();return e._queueTotalSize-=t.size,e._queueTotalSize<0&&(e._queueTotalSize=0),t.value}function pe(e,t,r){if("number"!=typeof(n=r)||ue(n)||n<0||r===1/0)throw new RangeError("Size must be a finite, non-NaN, non-negative number.");var n;e._queue.push({value:t,size:r}),e._queueTotalSize+=r}function be(e){e._queue=new T,e._queueTotalSize=0}class ye{constructor(){throw new TypeError("Illegal constructor")}get view(){if(!_e(this))throw Fe("view");return this._view}respond(e){if(!_e(this))throw Fe("respond");if(W(e,1,"respond"),e=G(e,"First parameter"),void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");this._view.buffer,Le(this._associatedReadableByteStreamController,e)}respondWithNewView(e){if(!_e(this))throw Fe("respondWithNewView");if(W(e,1,"respondWithNewView"),!ArrayBuffer.isView(e))throw new TypeError("You can only respond with array buffer views");if(void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");e.buffer,ze(this._associatedReadableByteStreamController,e)}}Object.defineProperties(ye.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),"symbol"==typeof n.toStringTag&&Object.defineProperty(ye.prototype,n.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});class me{constructor(){throw new TypeError("Illegal constructor")}get byobRequest(){if(!ge(this))throw We("byobRequest");return Ie(this)}get desiredSize(){if(!ge(this))throw We("desiredSize");return Ne(this)}close(){if(!ge(this))throw We("close");if(this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");const e=this._controlledReadableByteStream._state;if("readable"!==e)throw new TypeError(`The stream (in ${e} state) is not in the readable state and cannot be closed`);je(this)}enqueue(e){if(!ge(this))throw We("enqueue");if(W(e,1,"enqueue"),!ArrayBuffer.isView(e))throw new TypeError("chunk must be an array buffer view");if(0===e.byteLength)throw new TypeError("chunk must have non-zero byteLength");if(0===e.buffer.byteLength)throw new TypeError("chunk's buffer must have non-zero byteLength");if(this._closeRequested)throw new TypeError("stream is closed or draining");const t=this._controlledReadableByteStream._state;if("readable"!==t)throw new TypeError(`The stream (in ${t} state) is not in the readable state and cannot be enqueued to`);Be(this,e)}error(e){if(!ge(this))throw We("error");qe(this,e)}[q](e){we(this),be(this);const t=this._cancelAlgorithm(e);return Ce(this),t}[I](e){const t=this._controlledReadableByteStream;if(this._queueTotalSize>0){const t=this._queue.shift();this._queueTotalSize-=t.byteLength,Pe(this);const r=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);return void e._chunkSteps(r)}const r=this._autoAllocateChunkSize;if(void 0!==r){let t;try{t=new ArrayBuffer(r)}catch(n){return void e._errorSteps(n)}const i={buffer:t,bufferByteLength:r,byteOffset:0,byteLength:r,bytesFilled:0,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(i)}Y(t,e),ve(this)}}function ge(e){return!!a(e)&&(!!Object.prototype.hasOwnProperty.call(e,"_controlledReadableByteStream")&&e instanceof me)}function _e(e){return!!a(e)&&(!!Object.prototype.hasOwnProperty.call(e,"_associatedReadableByteStreamController")&&e instanceof ye)}function ve(e){const t=function(e){const t=e._controlledReadableByteStream;if("readable"!==t._state)return!1;if(e._closeRequested)return!1;if(!e._started)return!1;if(Z(t)&&J(t)>0)return!0;if(Ge(t)&&$e(t)>0)return!0;if(Ne(e)>0)return!0;return!1}(e);if(!t)return;if(e._pulling)return void(e._pullAgain=!0);e._pulling=!0;y(e._pullAlgorithm(),(()=>{e._pulling=!1,e._pullAgain&&(e._pullAgain=!1,ve(e))}),(t=>{qe(e,t)}))}function we(e){Ae(e),e._pendingPullIntos=new T}function Se(e,t){let r=!1;"closed"===e._state&&(r=!0);const n=Ee(t);"default"===t.readerType?X(e,n,r):function(e,t,r){const n=e._reader._readIntoRequests.shift();r?n._closeSteps(t):n._chunkSteps(t)}(e,n,r)}function Ee(e){const t=e.bytesFilled,r=e.elementSize;return new e.viewConstructor(e.buffer,e.byteOffset,t/r)}function Te(e,t,r,n){e._queue.push({buffer:t,byteOffset:r,byteLength:n}),e._queueTotalSize+=n}function Re(e,t){const r=t.elementSize,n=t.bytesFilled-t.bytesFilled%r,i=Math.min(e._queueTotalSize,t.byteLength-t.bytesFilled),o=t.bytesFilled+i,a=o-o%r;let s=i,u=!1;a>n&&(s=a-t.bytesFilled,u=!0);const c=e._queue;for(;s>0;){const r=c.peek(),n=Math.min(s,r.byteLength),i=t.byteOffset+t.bytesFilled;fe(t.buffer,i,r.buffer,r.byteOffset,n),r.byteLength===n?c.shift():(r.byteOffset+=n,r.byteLength-=n),e._queueTotalSize-=n,Me(e,n,t),s-=n}return u}function Me(e,t,r){r.bytesFilled+=t}function Pe(e){0===e._queueTotalSize&&e._closeRequested?(Ce(e),Rr(e._controlledReadableByteStream)):ve(e)}function Ae(e){null!==e._byobRequest&&(e._byobRequest._associatedReadableByteStreamController=void 0,e._byobRequest._view=null,e._byobRequest=null)}function ke(e){for(;e._pendingPullIntos.length>0;){if(0===e._queueTotalSize)return;const t=e._pendingPullIntos.peek();Re(e,t)&&(xe(e),Se(e._controlledReadableByteStream,t))}}function Oe(e,t){const r=e._pendingPullIntos.peek();Ae(e);"closed"===e._controlledReadableByteStream._state?function(e,t){const r=e._controlledReadableByteStream;if(Ge(r))for(;$e(r)>0;)Se(r,xe(e))}(e):function(e,t,r){if(Me(0,t,r),r.bytesFilled<r.elementSize)return;xe(e);const n=r.bytesFilled%r.elementSize;if(n>0){const t=r.byteOffset+r.bytesFilled,i=de(r.buffer,t-n,t);Te(e,i,0,i.byteLength)}r.bytesFilled-=n,Se(e._controlledReadableByteStream,r),ke(e)}(e,t,r),ve(e)}function xe(e){return e._pendingPullIntos.shift()}function Ce(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0}function je(e){const t=e._controlledReadableByteStream;if(!e._closeRequested&&"readable"===t._state)if(e._queueTotalSize>0)e._closeRequested=!0;else{if(e._pendingPullIntos.length>0){if(e._pendingPullIntos.peek().bytesFilled>0){const t=new TypeError("Insufficient bytes to fill elements in the given buffer");throw qe(e,t),t}}Ce(e),Rr(t)}}function Be(e,t){const r=e._controlledReadableByteStream;if(e._closeRequested||"readable"!==r._state)return;const n=t.buffer,i=t.byteOffset,o=t.byteLength,a=n;if(e._pendingPullIntos.length>0){const t=e._pendingPullIntos.peek();t.buffer,0,t.buffer=t.buffer}if(Ae(e),Z(r))if(0===J(r))Te(e,a,i,o);else{X(r,new Uint8Array(a,i,o),!1)}else Ge(r)?(Te(e,a,i,o),ke(e)):Te(e,a,i,o);ve(e)}function qe(e,t){const r=e._controlledReadableByteStream;"readable"===r._state&&(we(e),be(e),Ce(e),Mr(r,t))}function Ie(e){if(null===e._byobRequest&&e._pendingPullIntos.length>0){const t=e._pendingPullIntos.peek(),r=new Uint8Array(t.buffer,t.byteOffset+t.bytesFilled,t.byteLength-t.bytesFilled),n=Object.create(ye.prototype);!function(e,t,r){e._associatedReadableByteStreamController=t,e._view=r}(n,e,r),e._byobRequest=n}return e._byobRequest}function Ne(e){const t=e._controlledReadableByteStream._state;return"errored"===t?null:"closed"===t?0:e._strategyHWM-e._queueTotalSize}function Le(e,t){const r=e._pendingPullIntos.peek();if("closed"===e._controlledReadableByteStream._state){if(0!==t)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream")}else{if(0===t)throw new TypeError("bytesWritten must be greater than 0 when calling respond() on a readable stream");if(r.bytesFilled+t>r.byteLength)throw new RangeError("bytesWritten out of range")}r.buffer=r.buffer,Oe(e,t)}function ze(e,t){const r=e._pendingPullIntos.peek();if("closed"===e._controlledReadableByteStream._state){if(0!==t.byteLength)throw new TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream")}else if(0===t.byteLength)throw new TypeError("The view's length must be greater than 0 when calling respondWithNewView() on a readable stream");if(r.byteOffset+r.bytesFilled!==t.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(r.bufferByteLength!==t.buffer.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");if(r.bytesFilled+t.byteLength>r.byteLength)throw new RangeError("The region specified by view is larger than byobRequest");r.buffer=t.buffer,Oe(e,t.byteLength)}function De(e,t,r,n,i,o,a){t._controlledReadableByteStream=e,t._pullAgain=!1,t._pulling=!1,t._byobRequest=null,t._queue=t._queueTotalSize=void 0,be(t),t._closeRequested=!1,t._started=!1,t._strategyHWM=o,t._pullAlgorithm=n,t._cancelAlgorithm=i,t._autoAllocateChunkSize=a,t._pendingPullIntos=new T,e._readableStreamController=t;y(h(r()),(()=>{t._started=!0,ve(t)}),(e=>{qe(t,e)}))}function Fe(e){return new TypeError(`ReadableStreamBYOBRequest.prototype.${e} can only be used on a ReadableStreamBYOBRequest`)}function We(e){return new TypeError(`ReadableByteStreamController.prototype.${e} can only be used on a ReadableByteStreamController`)}function He(e){return new Ve(e)}function Ue(e,t){e._reader._readIntoRequests.push(t)}function $e(e){return e._reader._readIntoRequests.length}function Ge(e){const t=e._reader;return void 0!==t&&!!Ke(t)}Object.defineProperties(me.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),"symbol"==typeof n.toStringTag&&Object.defineProperty(me.prototype,n.toStringTag,{value:"ReadableByteStreamController",configurable:!0});class Ve{constructor(e){if(W(e,1,"ReadableStreamBYOBReader"),V(e,"First parameter"),Er(e))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!ge(e._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");R(this,e),this._readIntoRequests=new T}get closed(){return Ke(this)?this._closedPromise:p(Xe("closed"))}cancel(e){return Ke(this)?void 0===this._ownerReadableStream?p(A("cancel")):M(this,e):p(Xe("cancel"))}read(e){if(!Ke(this))return p(Xe("read"));if(!ArrayBuffer.isView(e))return p(new TypeError("view must be an array buffer view"));if(0===e.byteLength)return p(new TypeError("view must have non-zero byteLength"));if(0===e.buffer.byteLength)return p(new TypeError("view's buffer must have non-zero byteLength"));if(e.buffer,void 0===this._ownerReadableStream)return p(A("read from"));let t,r;const n=l(((e,n)=>{t=e,r=n}));return Ye(this,e,{_chunkSteps:e=>t({value:e,done:!1}),_closeSteps:e=>t({value:e,done:!0}),_errorSteps:e=>r(e)}),n}releaseLock(){if(!Ke(this))throw Xe("releaseLock");if(void 0!==this._ownerReadableStream){if(this._readIntoRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");P(this)}}}function Ke(e){return!!a(e)&&(!!Object.prototype.hasOwnProperty.call(e,"_readIntoRequests")&&e instanceof Ve)}function Ye(e,t,r){const n=e._ownerReadableStream;n._disturbed=!0,"errored"===n._state?r._errorSteps(n._storedError):function(e,t,r){const n=e._controlledReadableByteStream;let i=1;t.constructor!==DataView&&(i=t.constructor.BYTES_PER_ELEMENT);const o=t.constructor,a=t.buffer,s={buffer:a,bufferByteLength:a.byteLength,byteOffset:t.byteOffset,byteLength:t.byteLength,bytesFilled:0,elementSize:i,viewConstructor:o,readerType:"byob"};if(e._pendingPullIntos.length>0)return e._pendingPullIntos.push(s),void Ue(n,r);if("closed"!==n._state){if(e._queueTotalSize>0){if(Re(e,s)){const t=Ee(s);return Pe(e),void r._chunkSteps(t)}if(e._closeRequested){const t=new TypeError("Insufficient bytes to fill elements in the given buffer");return qe(e,t),void r._errorSteps(t)}}e._pendingPullIntos.push(s),Ue(n,r),ve(e)}else{const e=new o(s.buffer,s.byteOffset,0);r._closeSteps(e)}}(n._readableStreamController,t,r)}function Xe(e){return new TypeError(`ReadableStreamBYOBReader.prototype.${e} can only be used on a ReadableStreamBYOBReader`)}function Je(e,t){const{highWaterMark:r}=e;if(void 0===r)return t;if(ue(r)||r<0)throw new RangeError("Invalid highWaterMark");return r}function Ze(e){const{size:t}=e;return t||(()=>1)}function Qe(e,t){z(e,t);const r=null==e?void 0:e.highWaterMark,n=null==e?void 0:e.size;return{highWaterMark:void 0===r?void 0:U(r),size:void 0===n?void 0:et(n,`${t} has member 'size' that`)}}function et(e,t){return D(e,t),t=>U(e(t))}function tt(e,t,r){return D(e,r),r=>E(e,t,[r])}function rt(e,t,r){return D(e,r),()=>E(e,t,[])}function nt(e,t,r){return D(e,r),r=>S(e,t,[r])}function it(e,t,r){return D(e,r),(r,n)=>E(e,t,[r,n])}function ot(e,t){if(!ft(e))throw new TypeError(`${t} is not a WritableStream.`)}Object.defineProperties(Ve.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),"symbol"==typeof n.toStringTag&&Object.defineProperty(Ve.prototype,n.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});const at="function"==typeof AbortController;class st{constructor(e={},t={}){void 0===e?e=null:F(e,"First parameter");const r=Qe(t,"Second parameter"),n=function(e,t){z(e,t);const r=null==e?void 0:e.abort,n=null==e?void 0:e.close,i=null==e?void 0:e.start,o=null==e?void 0:e.type,a=null==e?void 0:e.write;return{abort:void 0===r?void 0:tt(r,e,`${t} has member 'abort' that`),close:void 0===n?void 0:rt(n,e,`${t} has member 'close' that`),start:void 0===i?void 0:nt(i,e,`${t} has member 'start' that`),write:void 0===a?void 0:it(a,e,`${t} has member 'write' that`),type:o}}(e,"First parameter");ct(this);if(void 0!==n.type)throw new RangeError("Invalid type is specified");const i=Ze(r);!function(e,t,r,n){const i=Object.create(At.prototype);let o=()=>{},a=()=>h(void 0),s=()=>h(void 0),u=()=>h(void 0);void 0!==t.start&&(o=()=>t.start(i));void 0!==t.write&&(a=e=>t.write(e,i));void 0!==t.close&&(s=()=>t.close());void 0!==t.abort&&(u=e=>t.abort(e));Ot(e,i,o,a,s,u,r,n)}(this,n,Je(r,1),i)}get locked(){if(!ft(this))throw Nt("locked");return dt(this)}abort(e){return ft(this)?dt(this)?p(new TypeError("Cannot abort a stream that already has a writer")):lt(this,e):p(Nt("abort"))}close(){return ft(this)?dt(this)?p(new TypeError("Cannot close a stream that already has a writer")):mt(this)?p(new TypeError("Cannot close an already-closing stream")):ht(this):p(Nt("close"))}getWriter(){if(!ft(this))throw Nt("getWriter");return ut(this)}}function ut(e){return new vt(e)}function ct(e){e._state="writable",e._storedError=void 0,e._writer=void 0,e._writableStreamController=void 0,e._writeRequests=new T,e._inFlightWriteRequest=void 0,e._closeRequest=void 0,e._inFlightCloseRequest=void 0,e._pendingAbortRequest=void 0,e._backpressure=!1}function ft(e){return!!a(e)&&(!!Object.prototype.hasOwnProperty.call(e,"_writableStreamController")&&e instanceof st)}function dt(e){return void 0!==e._writer}function lt(e,t){var r;if("closed"===e._state||"errored"===e._state)return h(void 0);e._writableStreamController._abortReason=t,null===(r=e._writableStreamController._abortController)||void 0===r||r.abort();const n=e._state;if("closed"===n||"errored"===n)return h(void 0);if(void 0!==e._pendingAbortRequest)return e._pendingAbortRequest._promise;let i=!1;"erroring"===n&&(i=!0,t=void 0);const o=l(((r,n)=>{e._pendingAbortRequest={_promise:void 0,_resolve:r,_reject:n,_reason:t,_wasAlreadyErroring:i}}));return e._pendingAbortRequest._promise=o,i||bt(e,t),o}function ht(e){const t=e._state;if("closed"===t||"errored"===t)return p(new TypeError(`The stream (in ${t} state) is not in the writable state and cannot be closed`));const r=l(((t,r)=>{const n={_resolve:t,_reject:r};e._closeRequest=n})),n=e._writer;var i;return void 0!==n&&e._backpressure&&"writable"===t&&Yt(n),pe(i=e._writableStreamController,Pt,0),jt(i),r}function pt(e,t){"writable"!==e._state?yt(e):bt(e,t)}function bt(e,t){const r=e._writableStreamController;e._state="erroring",e._storedError=t;const n=e._writer;void 0!==n&&Tt(n,t),!function(e){if(void 0===e._inFlightWriteRequest&&void 0===e._inFlightCloseRequest)return!1;return!0}(e)&&r._started&&yt(e)}function yt(e){e._state="errored",e._writableStreamController[B]();const t=e._storedError;if(e._writeRequests.forEach((e=>{e._reject(t)})),e._writeRequests=new T,void 0===e._pendingAbortRequest)return void gt(e);const r=e._pendingAbortRequest;if(e._pendingAbortRequest=void 0,r._wasAlreadyErroring)return r._reject(t),void gt(e);y(e._writableStreamController[j](r._reason),(()=>{r._resolve(),gt(e)}),(t=>{r._reject(t),gt(e)}))}function mt(e){return void 0!==e._closeRequest||void 0!==e._inFlightCloseRequest}function gt(e){void 0!==e._closeRequest&&(e._closeRequest._reject(e._storedError),e._closeRequest=void 0);const t=e._writer;void 0!==t&&Ht(t,e._storedError)}function _t(e,t){const r=e._writer;void 0!==r&&t!==e._backpressure&&(t?function(e){$t(e)}(r):Yt(r)),e._backpressure=t}Object.defineProperties(st.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),"symbol"==typeof n.toStringTag&&Object.defineProperty(st.prototype,n.toStringTag,{value:"WritableStream",configurable:!0});class vt{constructor(e){if(W(e,1,"WritableStreamDefaultWriter"),ot(e,"First parameter"),dt(e))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=e,e._writer=this;const t=e._state;if("writable"===t)!mt(e)&&e._backpressure?$t(this):Vt(this),Ft(this);else if("erroring"===t)Gt(this,e._storedError),Ft(this);else if("closed"===t)Vt(this),Ft(r=this),Ut(r);else{const t=e._storedError;Gt(this,t),Wt(this,t)}var r}get closed(){return wt(this)?this._closedPromise:p(zt("closed"))}get desiredSize(){if(!wt(this))throw zt("desiredSize");if(void 0===this._ownerWritableStream)throw Dt("desiredSize");return function(e){const t=e._ownerWritableStream,r=t._state;if("errored"===r||"erroring"===r)return null;if("closed"===r)return 0;return Ct(t._writableStreamController)}(this)}get ready(){return wt(this)?this._readyPromise:p(zt("ready"))}abort(e){return wt(this)?void 0===this._ownerWritableStream?p(Dt("abort")):function(e,t){return lt(e._ownerWritableStream,t)}(this,e):p(zt("abort"))}close(){if(!wt(this))return p(zt("close"));const e=this._ownerWritableStream;return void 0===e?p(Dt("close")):mt(e)?p(new TypeError("Cannot close an already-closing stream")):St(this)}releaseLock(){if(!wt(this))throw zt("releaseLock");void 0!==this._ownerWritableStream&&Rt(this)}write(e){return wt(this)?void 0===this._ownerWritableStream?p(Dt("write to")):Mt(this,e):p(zt("write"))}}function wt(e){return!!a(e)&&(!!Object.prototype.hasOwnProperty.call(e,"_ownerWritableStream")&&e instanceof vt)}function St(e){return ht(e._ownerWritableStream)}function Et(e,t){"pending"===e._closedPromiseState?Ht(e,t):function(e,t){Wt(e,t)}(e,t)}function Tt(e,t){"pending"===e._readyPromiseState?Kt(e,t):function(e,t){Gt(e,t)}(e,t)}function Rt(e){const t=e._ownerWritableStream,r=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");Tt(e,r),Et(e,r),t._writer=void 0,e._ownerWritableStream=void 0}function Mt(e,t){const r=e._ownerWritableStream,n=r._writableStreamController,i=function(e,t){try{return e._strategySizeAlgorithm(t)}catch(r){return Bt(e,r),1}}(n,t);if(r!==e._ownerWritableStream)return p(Dt("write to"));const o=r._state;if("errored"===o)return p(r._storedError);if(mt(r)||"closed"===o)return p(new TypeError("The stream is closing or closed and cannot be written to"));if("erroring"===o)return p(r._storedError);const a=function(e){return l(((t,r)=>{const n={_resolve:t,_reject:r};e._writeRequests.push(n)}))}(r);return function(e,t,r){try{pe(e,t,r)}catch(i){return void Bt(e,i)}const n=e._controlledWritableStream;if(!mt(n)&&"writable"===n._state){_t(n,qt(e))}jt(e)}(n,t,i),a}Object.defineProperties(vt.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),"symbol"==typeof n.toStringTag&&Object.defineProperty(vt.prototype,n.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});const Pt={};class At{constructor(){throw new TypeError("Illegal constructor")}get abortReason(){if(!kt(this))throw Lt("abortReason");return this._abortReason}get signal(){if(!kt(this))throw Lt("signal");if(void 0===this._abortController)throw new TypeError("WritableStreamDefaultController.prototype.signal is not supported");return this._abortController.signal}error(e){if(!kt(this))throw Lt("error");"writable"===this._controlledWritableStream._state&&It(this,e)}[j](e){const t=this._abortAlgorithm(e);return xt(this),t}[B](){be(this)}}function kt(e){return!!a(e)&&(!!Object.prototype.hasOwnProperty.call(e,"_controlledWritableStream")&&e instanceof At)}function Ot(e,t,r,n,i,o,a,s){t._controlledWritableStream=e,e._writableStreamController=t,t._queue=void 0,t._queueTotalSize=void 0,be(t),t._abortReason=void 0,t._abortController=function(){if(at)return new AbortController}(),t._started=!1,t._strategySizeAlgorithm=s,t._strategyHWM=a,t._writeAlgorithm=n,t._closeAlgorithm=i,t._abortAlgorithm=o;const u=qt(t);_t(e,u);y(h(r()),(()=>{t._started=!0,jt(t)}),(r=>{t._started=!0,pt(e,r)}))}function xt(e){e._writeAlgorithm=void 0,e._closeAlgorithm=void 0,e._abortAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function Ct(e){return e._strategyHWM-e._queueTotalSize}function jt(e){const t=e._controlledWritableStream;if(!e._started)return;if(void 0!==t._inFlightWriteRequest)return;if("erroring"===t._state)return void yt(t);if(0===e._queue.length)return;const r=e._queue.peek().value;r===Pt?function(e){const t=e._controlledWritableStream;(function(e){e._inFlightCloseRequest=e._closeRequest,e._closeRequest=void 0})(t),he(e);const r=e._closeAlgorithm();xt(e),y(r,(()=>{!function(e){e._inFlightCloseRequest._resolve(void 0),e._inFlightCloseRequest=void 0,"erroring"===e._state&&(e._storedError=void 0,void 0!==e._pendingAbortRequest&&(e._pendingAbortRequest._resolve(),e._pendingAbortRequest=void 0)),e._state="closed";const t=e._writer;void 0!==t&&Ut(t)}(t)}),(e=>{!function(e,t){e._inFlightCloseRequest._reject(t),e._inFlightCloseRequest=void 0,void 0!==e._pendingAbortRequest&&(e._pendingAbortRequest._reject(t),e._pendingAbortRequest=void 0),pt(e,t)}(t,e)}))}(e):function(e,t){const r=e._controlledWritableStream;!function(e){e._inFlightWriteRequest=e._writeRequests.shift()}(r);y(e._writeAlgorithm(t),(()=>{!function(e){e._inFlightWriteRequest._resolve(void 0),e._inFlightWriteRequest=void 0}(r);const t=r._state;if(he(e),!mt(r)&&"writable"===t){const t=qt(e);_t(r,t)}jt(e)}),(t=>{"writable"===r._state&&xt(e),function(e,t){e._inFlightWriteRequest._reject(t),e._inFlightWriteRequest=void 0,pt(e,t)}(r,t)}))}(e,r)}function Bt(e,t){"writable"===e._controlledWritableStream._state&&It(e,t)}function qt(e){return Ct(e)<=0}function It(e,t){const r=e._controlledWritableStream;xt(e),bt(r,t)}function Nt(e){return new TypeError(`WritableStream.prototype.${e} can only be used on a WritableStream`)}function Lt(e){return new TypeError(`WritableStreamDefaultController.prototype.${e} can only be used on a WritableStreamDefaultController`)}function zt(e){return new TypeError(`WritableStreamDefaultWriter.prototype.${e} can only be used on a WritableStreamDefaultWriter`)}function Dt(e){return new TypeError("Cannot "+e+" a stream using a released writer")}function Ft(e){e._closedPromise=l(((t,r)=>{e._closedPromise_resolve=t,e._closedPromise_reject=r,e._closedPromiseState="pending"}))}function Wt(e,t){Ft(e),Ht(e,t)}function Ht(e,t){void 0!==e._closedPromise_reject&&(v(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="rejected")}function Ut(e){void 0!==e._closedPromise_resolve&&(e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="resolved")}function $t(e){e._readyPromise=l(((t,r)=>{e._readyPromise_resolve=t,e._readyPromise_reject=r})),e._readyPromiseState="pending"}function Gt(e,t){$t(e),Kt(e,t)}function Vt(e){$t(e),Yt(e)}function Kt(e,t){void 0!==e._readyPromise_reject&&(v(e._readyPromise),e._readyPromise_reject(t),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="rejected")}function Yt(e){void 0!==e._readyPromise_resolve&&(e._readyPromise_resolve(void 0),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="fulfilled")}Object.defineProperties(At.prototype,{error:{enumerable:!0}}),"symbol"==typeof n.toStringTag&&Object.defineProperty(At.prototype,n.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});const Xt="undefined"!=typeof DOMException?DOMException:void 0;const Jt=function(e){if("function"!=typeof e&&"object"!=typeof e)return!1;try{return new e,!0}catch(t){return!1}}(Xt)?Xt:function(){const e=function(e,t){this.message=e||"",this.name=t||"Error",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)};return e.prototype=Object.create(Error.prototype),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,configurable:!0}),e}();function Zt(e,t,r,n,o,a){const s=K(e),u=ut(t);e._disturbed=!0;let c=!1,f=h(void 0);return l(((d,_)=>{let w;if(void 0!==a){if(w=()=>{const r=new Jt("Aborted","AbortError"),i=[];n||i.push((()=>"writable"===t._state?lt(t,r):h(void 0))),o||i.push((()=>"readable"===e._state?Tr(e,r):h(void 0))),A((()=>Promise.all(i.map((e=>e())))),!0,r)},a.aborted)return void w();a.addEventListener("abort",w)}var S,E,T;if(M(e,s._closedPromise,(e=>{n?k(!0,e):A((()=>lt(t,e)),!0,e)})),M(t,u._closedPromise,(t=>{o?k(!0,t):A((()=>Tr(e,t)),!0,t)})),S=e,E=s._closedPromise,T=()=>{r?k():A((()=>function(e){const t=e._ownerWritableStream,r=t._state;return mt(t)||"closed"===r?h(void 0):"errored"===r?p(t._storedError):St(e)}(u)))},"closed"===S._state?T():m(E,T),mt(t)||"closed"===t._state){const t=new TypeError("the destination writable stream closed before all data could be piped to it");o?k(!0,t):A((()=>Tr(e,t)),!0,t)}function R(){const e=f;return b(f,(()=>e!==f?R():void 0))}function M(e,t,r){"errored"===e._state?r(e._storedError):g(t,r)}function A(e,r,n){function i(){y(e(),(()=>O(r,n)),(e=>O(!0,e)))}c||(c=!0,"writable"!==t._state||mt(t)?i():m(R(),i))}function k(e,r){c||(c=!0,"writable"!==t._state||mt(t)?O(e,r):m(R(),(()=>O(e,r))))}function O(e,t){Rt(u),P(s),void 0!==a&&a.removeEventListener("abort",w),e?_(t):d(void 0)}v(l(((e,t)=>{!function r(n){n?e():b(c?h(!0):b(u._readyPromise,(()=>l(((e,t)=>{te(s,{_chunkSteps:t=>{f=b(Mt(u,t),void 0,i),e(!1)},_closeSteps:()=>e(!0),_errorSteps:t})})))),r,t)}(!1)})))}))}class Qt{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!er(this))throw fr("desiredSize");return sr(this)}close(){if(!er(this))throw fr("close");if(!ur(this))throw new TypeError("The stream is not in a state that permits close");ir(this)}enqueue(e){if(!er(this))throw fr("enqueue");if(!ur(this))throw new TypeError("The stream is not in a state that permits enqueue");return or(this,e)}error(e){if(!er(this))throw fr("error");ar(this,e)}[q](e){be(this);const t=this._cancelAlgorithm(e);return nr(this),t}[I](e){const t=this._controlledReadableStream;if(this._queue.length>0){const r=he(this);this._closeRequested&&0===this._queue.length?(nr(this),Rr(t)):tr(this),e._chunkSteps(r)}else Y(t,e),tr(this)}}function er(e){return!!a(e)&&(!!Object.prototype.hasOwnProperty.call(e,"_controlledReadableStream")&&e instanceof Qt)}function tr(e){if(!rr(e))return;if(e._pulling)return void(e._pullAgain=!0);e._pulling=!0;y(e._pullAlgorithm(),(()=>{e._pulling=!1,e._pullAgain&&(e._pullAgain=!1,tr(e))}),(t=>{ar(e,t)}))}function rr(e){const t=e._controlledReadableStream;if(!ur(e))return!1;if(!e._started)return!1;if(Er(t)&&J(t)>0)return!0;return sr(e)>0}function nr(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function ir(e){if(!ur(e))return;const t=e._controlledReadableStream;e._closeRequested=!0,0===e._queue.length&&(nr(e),Rr(t))}function or(e,t){if(!ur(e))return;const r=e._controlledReadableStream;if(Er(r)&&J(r)>0)X(r,t,!1);else{let r;try{r=e._strategySizeAlgorithm(t)}catch(n){throw ar(e,n),n}try{pe(e,t,r)}catch(i){throw ar(e,i),i}}tr(e)}function ar(e,t){const r=e._controlledReadableStream;"readable"===r._state&&(be(e),nr(e),Mr(r,t))}function sr(e){const t=e._controlledReadableStream._state;return"errored"===t?null:"closed"===t?0:e._strategyHWM-e._queueTotalSize}function ur(e){const t=e._controlledReadableStream._state;return!e._closeRequested&&"readable"===t}function cr(e,t,r,n,i,o,a){t._controlledReadableStream=e,t._queue=void 0,t._queueTotalSize=void 0,be(t),t._started=!1,t._closeRequested=!1,t._pullAgain=!1,t._pulling=!1,t._strategySizeAlgorithm=a,t._strategyHWM=o,t._pullAlgorithm=n,t._cancelAlgorithm=i,e._readableStreamController=t;y(h(r()),(()=>{t._started=!0,tr(t)}),(e=>{ar(t,e)}))}function fr(e){return new TypeError(`ReadableStreamDefaultController.prototype.${e} can only be used on a ReadableStreamDefaultController`)}function dr(e,t){return ge(e._readableStreamController)?function(e){let t,r,n,i,o,a=K(e),s=!1,u=!1,c=!1;const f=l((e=>{o=e}));function d(e){g(e._closedPromise,(t=>{e===a&&(qe(n._readableStreamController,t),qe(i._readableStreamController,t),u&&c||o(void 0))}))}function p(){Ke(a)&&(P(a),a=K(e),d(a));te(a,{_chunkSteps:t=>{w((()=>{s=!1;const r=t;let a=t;if(!u&&!c)try{a=le(t)}catch(f){return qe(n._readableStreamController,f),qe(i._readableStreamController,f),void o(Tr(e,f))}u||Be(n._readableStreamController,r),c||Be(i._readableStreamController,a)}))},_closeSteps:()=>{s=!1,u||je(n._readableStreamController),c||je(i._readableStreamController),n._readableStreamController._pendingPullIntos.length>0&&Le(n._readableStreamController,0),i._readableStreamController._pendingPullIntos.length>0&&Le(i._readableStreamController,0),u&&c||o(void 0)},_errorSteps:()=>{s=!1}})}function b(t,r){ee(a)&&(P(a),a=He(e),d(a));const f=r?i:n,l=r?n:i;Ye(a,t,{_chunkSteps:t=>{w((()=>{s=!1;const n=r?c:u;if(r?u:c)n||ze(f._readableStreamController,t);else{let r;try{r=le(t)}catch(i){return qe(f._readableStreamController,i),qe(l._readableStreamController,i),void o(Tr(e,i))}n||ze(f._readableStreamController,t),Be(l._readableStreamController,r)}}))},_closeSteps:e=>{s=!1;const t=r?c:u,n=r?u:c;t||je(f._readableStreamController),n||je(l._readableStreamController),void 0!==e&&(t||ze(f._readableStreamController,e),!n&&l._readableStreamController._pendingPullIntos.length>0&&Le(l._readableStreamController,0)),t&&n||o(void 0)},_errorSteps:()=>{s=!1}})}function y(){if(s)return h(void 0);s=!0;const e=Ie(n._readableStreamController);return null===e?p():b(e._view,!1),h(void 0)}function m(){if(s)return h(void 0);s=!0;const e=Ie(i._readableStreamController);return null===e?p():b(e._view,!0),h(void 0)}function _(n){if(u=!0,t=n,c){const n=ce([t,r]),i=Tr(e,n);o(i)}return f}function v(n){if(c=!0,r=n,u){const n=ce([t,r]),i=Tr(e,n);o(i)}return f}function S(){}return n=vr(S,y,_),i=vr(S,m,v),d(a),[n,i]}(e):function(e,t){const r=K(e);let n,i,o,a,s,u=!1,c=!1,f=!1;const d=l((e=>{s=e}));function p(){if(u)return h(void 0);u=!0;return te(r,{_chunkSteps:e=>{w((()=>{u=!1;const t=e,r=e;c||or(o._readableStreamController,t),f||or(a._readableStreamController,r)}))},_closeSteps:()=>{u=!1,c||ir(o._readableStreamController),f||ir(a._readableStreamController),c&&f||s(void 0)},_errorSteps:()=>{u=!1}}),h(void 0)}function b(t){if(c=!0,n=t,f){const t=ce([n,i]),r=Tr(e,t);s(r)}return d}function y(t){if(f=!0,i=t,c){const t=ce([n,i]),r=Tr(e,t);s(r)}return d}function m(){}return o=_r(m,p,b),a=_r(m,p,y),g(r._closedPromise,(e=>{ar(o._readableStreamController,e),ar(a._readableStreamController,e),c&&f||s(void 0)})),[o,a]}(e)}function lr(e,t,r){return D(e,r),r=>E(e,t,[r])}function hr(e,t,r){return D(e,r),r=>E(e,t,[r])}function pr(e,t,r){return D(e,r),r=>S(e,t,[r])}function br(e,t){if("bytes"!==(e=`${e}`))throw new TypeError(`${t} '${e}' is not a valid enumeration value for ReadableStreamType`);return e}function yr(e,t){if("byob"!==(e=`${e}`))throw new TypeError(`${t} '${e}' is not a valid enumeration value for ReadableStreamReaderMode`);return e}function mr(e,t){z(e,t);const r=null==e?void 0:e.preventAbort,n=null==e?void 0:e.preventCancel,i=null==e?void 0:e.preventClose,o=null==e?void 0:e.signal;return void 0!==o&&function(e,t){if(!function(e){if("object"!=typeof e||null===e)return!1;try{return"boolean"==typeof e.aborted}catch(t){return!1}}(e))throw new TypeError(`${t} is not an AbortSignal.`)}(o,`${t} has member 'signal' that`),{preventAbort:Boolean(r),preventCancel:Boolean(n),preventClose:Boolean(i),signal:o}}Object.defineProperties(Qt.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),"symbol"==typeof n.toStringTag&&Object.defineProperty(Qt.prototype,n.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});class gr{constructor(e={},t={}){void 0===e?e=null:F(e,"First parameter");const r=Qe(t,"Second parameter"),n=function(e,t){z(e,t);const r=e,n=null==r?void 0:r.autoAllocateChunkSize,i=null==r?void 0:r.cancel,o=null==r?void 0:r.pull,a=null==r?void 0:r.start,s=null==r?void 0:r.type;return{autoAllocateChunkSize:void 0===n?void 0:G(n,`${t} has member 'autoAllocateChunkSize' that`),cancel:void 0===i?void 0:lr(i,r,`${t} has member 'cancel' that`),pull:void 0===o?void 0:hr(o,r,`${t} has member 'pull' that`),start:void 0===a?void 0:pr(a,r,`${t} has member 'start' that`),type:void 0===s?void 0:br(s,`${t} has member 'type' that`)}}(e,"First parameter");if(wr(this),"bytes"===n.type){if(void 0!==r.size)throw new RangeError("The strategy for a byte stream cannot have a size function");!function(e,t,r){const n=Object.create(me.prototype);let i=()=>{},o=()=>h(void 0),a=()=>h(void 0);void 0!==t.start&&(i=()=>t.start(n)),void 0!==t.pull&&(o=()=>t.pull(n)),void 0!==t.cancel&&(a=e=>t.cancel(e));const s=t.autoAllocateChunkSize;if(0===s)throw new TypeError("autoAllocateChunkSize must be greater than 0");De(e,n,i,o,a,r,s)}(this,n,Je(r,0))}else{const e=Ze(r);!function(e,t,r,n){const i=Object.create(Qt.prototype);let o=()=>{},a=()=>h(void 0),s=()=>h(void 0);void 0!==t.start&&(o=()=>t.start(i)),void 0!==t.pull&&(a=()=>t.pull(i)),void 0!==t.cancel&&(s=e=>t.cancel(e)),cr(e,i,o,a,s,r,n)}(this,n,Je(r,1),e)}}get locked(){if(!Sr(this))throw Pr("locked");return Er(this)}cancel(e){return Sr(this)?Er(this)?p(new TypeError("Cannot cancel a stream that already has a reader")):Tr(this,e):p(Pr("cancel"))}getReader(e){if(!Sr(this))throw Pr("getReader");return void 0===function(e,t){z(e,t);const r=null==e?void 0:e.mode;return{mode:void 0===r?void 0:yr(r,`${t} has member 'mode' that`)}}(e,"First parameter").mode?K(this):He(this)}pipeThrough(e,t={}){if(!Sr(this))throw Pr("pipeThrough");W(e,1,"pipeThrough");const r=function(e,t){z(e,t);const r=null==e?void 0:e.readable;H(r,"readable","ReadableWritablePair"),V(r,`${t} has member 'readable' that`);const n=null==e?void 0:e.writable;return H(n,"writable","ReadableWritablePair"),ot(n,`${t} has member 'writable' that`),{readable:r,writable:n}}(e,"First parameter"),n=mr(t,"Second parameter");if(Er(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(dt(r.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");return v(Zt(this,r.writable,n.preventClose,n.preventAbort,n.preventCancel,n.signal)),r.readable}pipeTo(e,t={}){if(!Sr(this))return p(Pr("pipeTo"));if(void 0===e)return p("Parameter 1 is required in 'pipeTo'.");if(!ft(e))return p(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));let r;try{r=mr(t,"Second parameter")}catch(n){return p(n)}return Er(this)?p(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):dt(e)?p(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):Zt(this,e,r.preventClose,r.preventAbort,r.preventCancel,r.signal)}tee(){if(!Sr(this))throw Pr("tee");return ce(dr(this))}values(e){if(!Sr(this))throw Pr("values");return function(e,t){const r=K(e),n=new ie(r,t),i=Object.create(oe);return i._asyncIteratorImpl=n,i}(this,function(e,t){z(e,t);const r=null==e?void 0:e.preventCancel;return{preventCancel:Boolean(r)}}(e,"First parameter").preventCancel)}}function _r(e,t,r,n=1,i=(()=>1)){const o=Object.create(gr.prototype);wr(o);return cr(o,Object.create(Qt.prototype),e,t,r,n,i),o}function vr(e,t,r){const n=Object.create(gr.prototype);wr(n);return De(n,Object.create(me.prototype),e,t,r,0,void 0),n}function wr(e){e._state="readable",e._reader=void 0,e._storedError=void 0,e._disturbed=!1}function Sr(e){return!!a(e)&&(!!Object.prototype.hasOwnProperty.call(e,"_readableStreamController")&&e instanceof gr)}function Er(e){return void 0!==e._reader}function Tr(e,t){if(e._disturbed=!0,"closed"===e._state)return h(void 0);if("errored"===e._state)return p(e._storedError);Rr(e);const r=e._reader;void 0!==r&&Ke(r)&&(r._readIntoRequests.forEach((e=>{e._closeSteps(void 0)})),r._readIntoRequests=new T);return _(e._readableStreamController[q](t),i)}function Rr(e){e._state="closed";const t=e._reader;void 0!==t&&(C(t),ee(t)&&(t._readRequests.forEach((e=>{e._closeSteps()})),t._readRequests=new T))}function Mr(e,t){e._state="errored",e._storedError=t;const r=e._reader;void 0!==r&&(x(r,t),ee(r)?(r._readRequests.forEach((e=>{e._errorSteps(t)})),r._readRequests=new T):(r._readIntoRequests.forEach((e=>{e._errorSteps(t)})),r._readIntoRequests=new T))}function Pr(e){return new TypeError(`ReadableStream.prototype.${e} can only be used on a ReadableStream`)}function Ar(e,t){z(e,t);const r=null==e?void 0:e.highWaterMark;return H(r,"highWaterMark","QueuingStrategyInit"),{highWaterMark:U(r)}}Object.defineProperties(gr.prototype,{cancel:{enumerable:!0},getReader:{enumerable:!0},pipeThrough:{enumerable:!0},pipeTo:{enumerable:!0},tee:{enumerable:!0},values:{enumerable:!0},locked:{enumerable:!0}}),"symbol"==typeof n.toStringTag&&Object.defineProperty(gr.prototype,n.toStringTag,{value:"ReadableStream",configurable:!0}),"symbol"==typeof n.asyncIterator&&Object.defineProperty(gr.prototype,n.asyncIterator,{value:gr.prototype.values,writable:!0,configurable:!0});const kr=e=>e.byteLength;Object.defineProperty(kr,"name",{value:"size",configurable:!0});class Or{constructor(e){W(e,1,"ByteLengthQueuingStrategy"),e=Ar(e,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=e.highWaterMark}get highWaterMark(){if(!Cr(this))throw xr("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark}get size(){if(!Cr(this))throw xr("size");return kr}}function xr(e){return new TypeError(`ByteLengthQueuingStrategy.prototype.${e} can only be used on a ByteLengthQueuingStrategy`)}function Cr(e){return!!a(e)&&(!!Object.prototype.hasOwnProperty.call(e,"_byteLengthQueuingStrategyHighWaterMark")&&e instanceof Or)}Object.defineProperties(Or.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),"symbol"==typeof n.toStringTag&&Object.defineProperty(Or.prototype,n.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});const jr=()=>1;Object.defineProperty(jr,"name",{value:"size",configurable:!0});class Br{constructor(e){W(e,1,"CountQueuingStrategy"),e=Ar(e,"First parameter"),this._countQueuingStrategyHighWaterMark=e.highWaterMark}get highWaterMark(){if(!Ir(this))throw qr("highWaterMark");return this._countQueuingStrategyHighWaterMark}get size(){if(!Ir(this))throw qr("size");return jr}}function qr(e){return new TypeError(`CountQueuingStrategy.prototype.${e} can only be used on a CountQueuingStrategy`)}function Ir(e){return!!a(e)&&(!!Object.prototype.hasOwnProperty.call(e,"_countQueuingStrategyHighWaterMark")&&e instanceof Br)}function Nr(e,t,r){return D(e,r),r=>E(e,t,[r])}function Lr(e,t,r){return D(e,r),r=>S(e,t,[r])}function zr(e,t,r){return D(e,r),(r,n)=>E(e,t,[r,n])}Object.defineProperties(Br.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),"symbol"==typeof n.toStringTag&&Object.defineProperty(Br.prototype,n.toStringTag,{value:"CountQueuingStrategy",configurable:!0});class Dr{constructor(e={},t={},r={}){void 0===e&&(e=null);const n=Qe(t,"Second parameter"),i=Qe(r,"Third parameter"),o=function(e,t){z(e,t);const r=null==e?void 0:e.flush,n=null==e?void 0:e.readableType,i=null==e?void 0:e.start,o=null==e?void 0:e.transform,a=null==e?void 0:e.writableType;return{flush:void 0===r?void 0:Nr(r,e,`${t} has member 'flush' that`),readableType:n,start:void 0===i?void 0:Lr(i,e,`${t} has member 'start' that`),transform:void 0===o?void 0:zr(o,e,`${t} has member 'transform' that`),writableType:a}}(e,"First parameter");if(void 0!==o.readableType)throw new RangeError("Invalid readableType specified");if(void 0!==o.writableType)throw new RangeError("Invalid writableType specified");const a=Je(i,0),s=Ze(i),u=Je(n,1),c=Ze(n);let f;!function(e,t,r,n,i,o){function a(){return t}function s(t){return function(e,t){const r=e._transformStreamController;if(e._backpressure){return _(e._backpressureChangePromise,(()=>{const n=e._writable;if("erroring"===n._state)throw n._storedError;return Yr(r,t)}))}return Yr(r,t)}(e,t)}function u(t){return function(e,t){return Wr(e,t),h(void 0)}(e,t)}function c(){return function(e){const t=e._readable,r=e._transformStreamController,n=r._flushAlgorithm();return Vr(r),_(n,(()=>{if("errored"===t._state)throw t._storedError;ir(t._readableStreamController)}),(r=>{throw Wr(e,r),t._storedError}))}(e)}function f(){return function(e){return Ur(e,!1),e._backpressureChangePromise}(e)}function d(t){return Hr(e,t),h(void 0)}e._writable=function(e,t,r,n,i=1,o=(()=>1)){const a=Object.create(st.prototype);return ct(a),Ot(a,Object.create(At.prototype),e,t,r,n,i,o),a}(a,s,c,u,r,n),e._readable=_r(a,f,d,i,o),e._backpressure=void 0,e._backpressureChangePromise=void 0,e._backpressureChangePromise_resolve=void 0,Ur(e,!0),e._transformStreamController=void 0}(this,l((e=>{f=e})),u,c,a,s),function(e,t){const r=Object.create($r.prototype);let n=e=>{try{return Kr(r,e),h(void 0)}catch(t){return p(t)}},i=()=>h(void 0);void 0!==t.transform&&(n=e=>t.transform(e,r));void 0!==t.flush&&(i=()=>t.flush(r));!function(e,t,r,n){t._controlledTransformStream=e,e._transformStreamController=t,t._transformAlgorithm=r,t._flushAlgorithm=n}(e,r,n,i)}(this,o),void 0!==o.start?f(o.start(this._transformStreamController)):f(void 0)}get readable(){if(!Fr(this))throw Jr("readable");return this._readable}get writable(){if(!Fr(this))throw Jr("writable");return this._writable}}function Fr(e){return!!a(e)&&(!!Object.prototype.hasOwnProperty.call(e,"_transformStreamController")&&e instanceof Dr)}function Wr(e,t){ar(e._readable._readableStreamController,t),Hr(e,t)}function Hr(e,t){Vr(e._transformStreamController),Bt(e._writable._writableStreamController,t),e._backpressure&&Ur(e,!1)}function Ur(e,t){void 0!==e._backpressureChangePromise&&e._backpressureChangePromise_resolve(),e._backpressureChangePromise=l((t=>{e._backpressureChangePromise_resolve=t})),e._backpressure=t}Object.defineProperties(Dr.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),"symbol"==typeof n.toStringTag&&Object.defineProperty(Dr.prototype,n.toStringTag,{value:"TransformStream",configurable:!0});class $r{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!Gr(this))throw Xr("desiredSize");return sr(this._controlledTransformStream._readable._readableStreamController)}enqueue(e){if(!Gr(this))throw Xr("enqueue");Kr(this,e)}error(e){if(!Gr(this))throw Xr("error");var t;t=e,Wr(this._controlledTransformStream,t)}terminate(){if(!Gr(this))throw Xr("terminate");!function(e){const t=e._controlledTransformStream;ir(t._readable._readableStreamController);const r=new TypeError("TransformStream terminated");Hr(t,r)}(this)}}function Gr(e){return!!a(e)&&(!!Object.prototype.hasOwnProperty.call(e,"_controlledTransformStream")&&e instanceof $r)}function Vr(e){e._transformAlgorithm=void 0,e._flushAlgorithm=void 0}function Kr(e,t){const r=e._controlledTransformStream,n=r._readable._readableStreamController;if(!ur(n))throw new TypeError("Readable side is not in a state that permits enqueue");try{or(n,t)}catch(o){throw Hr(r,o),r._readable._storedError}const i=function(e){return!rr(e)}(n);i!==r._backpressure&&Ur(r,!0)}function Yr(e,t){return _(e._transformAlgorithm(t),void 0,(t=>{throw Wr(e._controlledTransformStream,t),t}))}function Xr(e){return new TypeError(`TransformStreamDefaultController.prototype.${e} can only be used on a TransformStreamDefaultController`)}function Jr(e){return new TypeError(`TransformStream.prototype.${e} can only be used on a TransformStream`)}Object.defineProperties($r.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),"symbol"==typeof n.toStringTag&&Object.defineProperty($r.prototype,n.toStringTag,{value:"TransformStreamDefaultController",configurable:!0})},3790:(e,t,r)=>{"use strict";r.r(t),r.d(t,{ByteLengthQueuingStrategy:()=>Cr,CountQueuingStrategy:()=>Ir,ReadableByteStreamController:()=>ge,ReadableStream:()=>vr,ReadableStreamBYOBReader:()=>Ke,ReadableStreamBYOBRequest:()=>me,ReadableStreamDefaultController:()=>tr,ReadableStreamDefaultReader:()=>te,TransformStream:()=>Wr,TransformStreamDefaultController:()=>Vr,WritableStream:()=>ut,WritableStreamDefaultController:()=>kt,WritableStreamDefaultWriter:()=>wt});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol:function(e){return"Symbol("+e+")"};function i(){}var o="undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void 0;function a(e){return"object"==typeof e&&null!==e||"function"==typeof e}var s=i,u=Promise,c=Promise.prototype.then,f=Promise.resolve.bind(u),d=Promise.reject.bind(u);function l(e){return new u(e)}function h(e){return f(e)}function p(e){return d(e)}function b(e,t,r){return c.call(e,t,r)}function y(e,t,r){b(b(e,t,r),void 0,s)}function m(e,t){y(e,t)}function g(e,t){y(e,void 0,t)}function _(e,t,r){return b(e,t,r)}function v(e){b(e,void 0,s)}var w=function(){var e=o&&o.queueMicrotask;if("function"==typeof e)return e;var t=h(void 0);return function(e){return b(t,e)}}();function S(e,t,r){if("function"!=typeof e)throw new TypeError("Argument is not a function");return Function.prototype.apply.call(e,t,r)}function E(e,t,r){try{return h(S(e,t,r))}catch(n){return p(n)}}var T=function(){function e(){this._cursor=0,this._size=0,this._front={_elements:[],_next:void 0},this._back=this._front,this._cursor=0,this._size=0}return Object.defineProperty(e.prototype,"length",{get:function(){return this._size},enumerable:!1,configurable:!0}),e.prototype.push=function(e){var t=this._back,r=t;16383===t._elements.length&&(r={_elements:[],_next:void 0}),t._elements.push(e),r!==t&&(this._back=r,t._next=r),++this._size},e.prototype.shift=function(){var e=this._front,t=e,r=this._cursor,n=r+1,i=e._elements,o=i[r];return 16384===n&&(t=e._next,n=0),--this._size,this._cursor=n,e!==t&&(this._front=t),i[r]=void 0,o},e.prototype.forEach=function(e){for(var t=this._cursor,r=this._front,n=r._elements;!(t===n.length&&void 0===r._next||t===n.length&&(t=0,0===(n=(r=r._next)._elements).length));)e(n[t]),++t},e.prototype.peek=function(){var e=this._front,t=this._cursor;return e._elements[t]},e}();function R(e,t){e._ownerReadableStream=t,t._reader=e,"readable"===t._state?k(e):"closed"===t._state?function(e){k(e),C(e)}(e):O(e,t._storedError)}function M(e,t){return Mr(e._ownerReadableStream,t)}function P(e){"readable"===e._ownerReadableStream._state?x(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):function(e,t){O(e,t)}(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")),e._ownerReadableStream._reader=void 0,e._ownerReadableStream=void 0}function A(e){return new TypeError("Cannot "+e+" a stream using a released reader")}function k(e){e._closedPromise=l((function(t,r){e._closedPromise_resolve=t,e._closedPromise_reject=r}))}function O(e,t){k(e),x(e,t)}function x(e,t){void 0!==e._closedPromise_reject&&(v(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0)}function C(e){void 0!==e._closedPromise_resolve&&(e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0)}var j=n("[[AbortSteps]]"),B=n("[[ErrorSteps]]"),q=n("[[CancelSteps]]"),I=n("[[PullSteps]]"),N=Number.isFinite||function(e){return"number"==typeof e&&isFinite(e)},L=Math.trunc||function(e){return e<0?Math.ceil(e):Math.floor(e)};function z(e,t){if(void 0!==e&&("object"!=typeof(r=e)&&"function"!=typeof r))throw new TypeError(t+" is not an object.");var r}function D(e,t){if("function"!=typeof e)throw new TypeError(t+" is not a function.")}function F(e,t){if(!function(e){return"object"==typeof e&&null!==e||"function"==typeof e}(e))throw new TypeError(t+" is not an object.")}function W(e,t,r){if(void 0===e)throw new TypeError("Parameter "+t+" is required in '"+r+"'.")}function H(e,t,r){if(void 0===e)throw new TypeError(t+" is required in '"+r+"'.")}function U(e){return Number(e)}function $(e){return 0===e?0:e}function G(e,t){var r=Number.MAX_SAFE_INTEGER,n=Number(e);if(n=$(n),!N(n))throw new TypeError(t+" is not a finite number");if((n=function(e){return $(L(e))}(n))<0||n>r)throw new TypeError(t+" is outside the accepted range of 0 to "+r+", inclusive");return N(n)&&0!==n?n:0}function V(e,t){if(!Tr(e))throw new TypeError(t+" is not a ReadableStream.")}function K(e){return new te(e)}function Y(e,t){e._reader._readRequests.push(t)}function X(e,t,r){var n=e._reader._readRequests.shift();r?n._closeSteps():n._chunkSteps(t)}function J(e){return e._reader._readRequests.length}function Z(e){var t=e._reader;return void 0!==t&&!!re(t)}var Q,ee,te=function(){function e(e){if(W(e,1,"ReadableStreamDefaultReader"),V(e,"First parameter"),Rr(e))throw new TypeError("This stream has already been locked for exclusive reading by another reader");R(this,e),this._readRequests=new T}return Object.defineProperty(e.prototype,"closed",{get:function(){return re(this)?this._closedPromise:p(ie("closed"))},enumerable:!1,configurable:!0}),e.prototype.cancel=function(e){return void 0===e&&(e=void 0),re(this)?void 0===this._ownerReadableStream?p(A("cancel")):M(this,e):p(ie("cancel"))},e.prototype.read=function(){if(!re(this))return p(ie("read"));if(void 0===this._ownerReadableStream)return p(A("read from"));var e,t,r=l((function(r,n){e=r,t=n}));return ne(this,{_chunkSteps:function(t){return e({value:t,done:!1})},_closeSteps:function(){return e({value:void 0,done:!0})},_errorSteps:function(e){return t(e)}}),r},e.prototype.releaseLock=function(){if(!re(this))throw ie("releaseLock");if(void 0!==this._ownerReadableStream){if(this._readRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");P(this)}},e}();function re(e){return!!a(e)&&(!!Object.prototype.hasOwnProperty.call(e,"_readRequests")&&e instanceof te)}function ne(e,t){var r=e._ownerReadableStream;r._disturbed=!0,"closed"===r._state?t._closeSteps():"errored"===r._state?t._errorSteps(r._storedError):r._readableStreamController[I](t)}function ie(e){return new TypeError("ReadableStreamDefaultReader.prototype."+e+" can only be used on a ReadableStreamDefaultReader")}Object.defineProperties(te.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),"symbol"==typeof n.toStringTag&&Object.defineProperty(te.prototype,n.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0}),"symbol"==typeof n.asyncIterator&&((Q={})[n.asyncIterator]=function(){return this},ee=Q,Object.defineProperty(ee,n.asyncIterator,{enumerable:!1}));var oe=function(){function e(e,t){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=e,this._preventCancel=t}return e.prototype.next=function(){var e=this,t=function(){return e._nextSteps()};return this._ongoingPromise=this._ongoingPromise?_(this._ongoingPromise,t,t):t(),this._ongoingPromise},e.prototype.return=function(e){var t=this,r=function(){return t._returnSteps(e)};return this._ongoingPromise?_(this._ongoingPromise,r,r):r()},e.prototype._nextSteps=function(){var e=this;if(this._isFinished)return Promise.resolve({value:void 0,done:!0});var t,r,n=this._reader;if(void 0===n._ownerReadableStream)return p(A("iterate"));var i=l((function(e,n){t=e,r=n}));return ne(n,{_chunkSteps:function(r){e._ongoingPromise=void 0,w((function(){return t({value:r,done:!1})}))},_closeSteps:function(){e._ongoingPromise=void 0,e._isFinished=!0,P(n),t({value:void 0,done:!0})},_errorSteps:function(t){e._ongoingPromise=void 0,e._isFinished=!0,P(n),r(t)}}),i},e.prototype._returnSteps=function(e){if(this._isFinished)return Promise.resolve({value:e,done:!0});this._isFinished=!0;var t=this._reader;if(void 0===t._ownerReadableStream)return p(A("finish iterating"));if(!this._preventCancel){var r=M(t,e);return P(t),_(r,(function(){return{value:e,done:!0}}))}return P(t),h({value:e,done:!0})},e}(),ae={next:function(){return se(this)?this._asyncIteratorImpl.next():p(ue("next"))},return:function(e){return se(this)?this._asyncIteratorImpl.return(e):p(ue("return"))}};function se(e){if(!a(e))return!1;if(!Object.prototype.hasOwnProperty.call(e,"_asyncIteratorImpl"))return!1;try{return e._asyncIteratorImpl instanceof oe}catch(Q){return!1}}function ue(e){return new TypeError("ReadableStreamAsyncIterator."+e+" can only be used on a ReadableSteamAsyncIterator")}void 0!==ee&&Object.setPrototypeOf(ae,ee);var ce=Number.isNaN||function(e){return e!=e};function fe(e){return e.slice()}function de(e,t,r,n,i){new Uint8Array(e).set(new Uint8Array(r,n,i),t)}function le(e,t,r){if(e.slice)return e.slice(t,r);var n=r-t,i=new ArrayBuffer(n);return de(i,0,e,t,n),i}function he(e){var t=le(e.buffer,e.byteOffset,e.byteOffset+e.byteLength);return new Uint8Array(t)}function pe(e){var t=e._queue.shift();return e._queueTotalSize-=t.size,e._queueTotalSize<0&&(e._queueTotalSize=0),t.value}function be(e,t,r){if("number"!=typeof(n=r)||ce(n)||n<0||r===1/0)throw new RangeError("Size must be a finite, non-NaN, non-negative number.");var n;e._queue.push({value:t,size:r}),e._queueTotalSize+=r}function ye(e){e._queue=new T,e._queueTotalSize=0}var me=function(){function e(){throw new TypeError("Illegal constructor")}return Object.defineProperty(e.prototype,"view",{get:function(){if(!ve(this))throw We("view");return this._view},enumerable:!1,configurable:!0}),e.prototype.respond=function(e){if(!ve(this))throw We("respond");if(W(e,1,"respond"),e=G(e,"First parameter"),void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");this._view.buffer,ze(this._associatedReadableByteStreamController,e)},e.prototype.respondWithNewView=function(e){if(!ve(this))throw We("respondWithNewView");if(W(e,1,"respondWithNewView"),!ArrayBuffer.isView(e))throw new TypeError("You can only respond with array buffer views");if(void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");e.buffer,De(this._associatedReadableByteStreamController,e)},e}();Object.defineProperties(me.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),"symbol"==typeof n.toStringTag&&Object.defineProperty(me.prototype,n.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});var ge=function(){function e(){throw new TypeError("Illegal constructor")}return Object.defineProperty(e.prototype,"byobRequest",{get:function(){if(!_e(this))throw He("byobRequest");return Ne(this)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!_e(this))throw He("desiredSize");return Le(this)},enumerable:!1,configurable:!0}),e.prototype.close=function(){if(!_e(this))throw He("close");if(this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");var e=this._controlledReadableByteStream._state;if("readable"!==e)throw new TypeError("The stream (in "+e+" state) is not in the readable state and cannot be closed");Be(this)},e.prototype.enqueue=function(e){if(!_e(this))throw He("enqueue");if(W(e,1,"enqueue"),!ArrayBuffer.isView(e))throw new TypeError("chunk must be an array buffer view");if(0===e.byteLength)throw new TypeError("chunk must have non-zero byteLength");if(0===e.buffer.byteLength)throw new TypeError("chunk's buffer must have non-zero byteLength");if(this._closeRequested)throw new TypeError("stream is closed or draining");var t=this._controlledReadableByteStream._state;if("readable"!==t)throw new TypeError("The stream (in "+t+" state) is not in the readable state and cannot be enqueued to");qe(this,e)},e.prototype.error=function(e){if(void 0===e&&(e=void 0),!_e(this))throw He("error");Ie(this,e)},e.prototype[q]=function(e){Se(this),ye(this);var t=this._cancelAlgorithm(e);return je(this),t},e.prototype[I]=function(e){var t=this._controlledReadableByteStream;if(this._queueTotalSize>0){var r=this._queue.shift();this._queueTotalSize-=r.byteLength,Ae(this);var n=new Uint8Array(r.buffer,r.byteOffset,r.byteLength);e._chunkSteps(n)}else{var i=this._autoAllocateChunkSize;if(void 0!==i){var o=void 0;try{o=new ArrayBuffer(i)}catch(s){return void e._errorSteps(s)}var a={buffer:o,bufferByteLength:i,byteOffset:0,byteLength:i,bytesFilled:0,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(a)}Y(t,e),we(this)}},e}();function _e(e){return!!a(e)&&(!!Object.prototype.hasOwnProperty.call(e,"_controlledReadableByteStream")&&e instanceof ge)}function ve(e){return!!a(e)&&(!!Object.prototype.hasOwnProperty.call(e,"_associatedReadableByteStreamController")&&e instanceof me)}function we(e){var t=function(e){var t=e._controlledReadableByteStream;if("readable"!==t._state)return!1;if(e._closeRequested)return!1;if(!e._started)return!1;if(Z(t)&&J(t)>0)return!0;if(Ve(t)&&Ge(t)>0)return!0;if(Le(e)>0)return!0;return!1}(e);t&&(e._pulling?e._pullAgain=!0:(e._pulling=!0,y(e._pullAlgorithm(),(function(){e._pulling=!1,e._pullAgain&&(e._pullAgain=!1,we(e))}),(function(t){Ie(e,t)}))))}function Se(e){ke(e),e._pendingPullIntos=new T}function Ee(e,t){var r=!1;"closed"===e._state&&(r=!0);var n=Te(t);"default"===t.readerType?X(e,n,r):function(e,t,r){var n=e._reader._readIntoRequests.shift();r?n._closeSteps(t):n._chunkSteps(t)}(e,n,r)}function Te(e){var t=e.bytesFilled,r=e.elementSize;return new e.viewConstructor(e.buffer,e.byteOffset,t/r)}function Re(e,t,r,n){e._queue.push({buffer:t,byteOffset:r,byteLength:n}),e._queueTotalSize+=n}function Me(e,t){var r=t.elementSize,n=t.bytesFilled-t.bytesFilled%r,i=Math.min(e._queueTotalSize,t.byteLength-t.bytesFilled),o=t.bytesFilled+i,a=o-o%r,s=i,u=!1;a>n&&(s=a-t.bytesFilled,u=!0);for(var c=e._queue;s>0;){var f=c.peek(),d=Math.min(s,f.byteLength),l=t.byteOffset+t.bytesFilled;de(t.buffer,l,f.buffer,f.byteOffset,d),f.byteLength===d?c.shift():(f.byteOffset+=d,f.byteLength-=d),e._queueTotalSize-=d,Pe(e,d,t),s-=d}return u}function Pe(e,t,r){r.bytesFilled+=t}function Ae(e){0===e._queueTotalSize&&e._closeRequested?(je(e),Pr(e._controlledReadableByteStream)):we(e)}function ke(e){null!==e._byobRequest&&(e._byobRequest._associatedReadableByteStreamController=void 0,e._byobRequest._view=null,e._byobRequest=null)}function Oe(e){for(;e._pendingPullIntos.length>0;){if(0===e._queueTotalSize)return;var t=e._pendingPullIntos.peek();Me(e,t)&&(Ce(e),Ee(e._controlledReadableByteStream,t))}}function xe(e,t){var r=e._pendingPullIntos.peek();ke(e),"closed"===e._controlledReadableByteStream._state?function(e,t){var r=e._controlledReadableByteStream;if(Ve(r))for(;Ge(r)>0;)Ee(r,Ce(e))}(e):function(e,t,r){if(Pe(0,t,r),!(r.bytesFilled<r.elementSize)){Ce(e);var n=r.bytesFilled%r.elementSize;if(n>0){var i=r.byteOffset+r.bytesFilled,o=le(r.buffer,i-n,i);Re(e,o,0,o.byteLength)}r.bytesFilled-=n,Ee(e._controlledReadableByteStream,r),Oe(e)}}(e,t,r),we(e)}function Ce(e){return e._pendingPullIntos.shift()}function je(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0}function Be(e){var t=e._controlledReadableByteStream;if(!e._closeRequested&&"readable"===t._state)if(e._queueTotalSize>0)e._closeRequested=!0;else{if(e._pendingPullIntos.length>0)if(e._pendingPullIntos.peek().bytesFilled>0){var r=new TypeError("Insufficient bytes to fill elements in the given buffer");throw Ie(e,r),r}je(e),Pr(t)}}function qe(e,t){var r=e._controlledReadableByteStream;if(!e._closeRequested&&"readable"===r._state){var n=t.buffer,i=t.byteOffset,o=t.byteLength,a=n;if(e._pendingPullIntos.length>0){var s=e._pendingPullIntos.peek();s.buffer,0,s.buffer=s.buffer}if(ke(e),Z(r))if(0===J(r))Re(e,a,i,o);else X(r,new Uint8Array(a,i,o),!1);else Ve(r)?(Re(e,a,i,o),Oe(e)):Re(e,a,i,o);we(e)}}function Ie(e,t){var r=e._controlledReadableByteStream;"readable"===r._state&&(Se(e),ye(e),je(e),Ar(r,t))}function Ne(e){if(null===e._byobRequest&&e._pendingPullIntos.length>0){var t=e._pendingPullIntos.peek(),r=new Uint8Array(t.buffer,t.byteOffset+t.bytesFilled,t.byteLength-t.bytesFilled),n=Object.create(me.prototype);!function(e,t,r){e._associatedReadableByteStreamController=t,e._view=r}(n,e,r),e._byobRequest=n}return e._byobRequest}function Le(e){var t=e._controlledReadableByteStream._state;return"errored"===t?null:"closed"===t?0:e._strategyHWM-e._queueTotalSize}function ze(e,t){var r=e._pendingPullIntos.peek();if("closed"===e._controlledReadableByteStream._state){if(0!==t)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream")}else{if(0===t)throw new TypeError("bytesWritten must be greater than 0 when calling respond() on a readable stream");if(r.bytesFilled+t>r.byteLength)throw new RangeError("bytesWritten out of range")}r.buffer=r.buffer,xe(e,t)}function De(e,t){var r=e._pendingPullIntos.peek();if("closed"===e._controlledReadableByteStream._state){if(0!==t.byteLength)throw new TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream")}else if(0===t.byteLength)throw new TypeError("The view's length must be greater than 0 when calling respondWithNewView() on a readable stream");if(r.byteOffset+r.bytesFilled!==t.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(r.bufferByteLength!==t.buffer.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");if(r.bytesFilled+t.byteLength>r.byteLength)throw new RangeError("The region specified by view is larger than byobRequest");r.buffer=t.buffer,xe(e,t.byteLength)}function Fe(e,t,r,n,i,o,a){t._controlledReadableByteStream=e,t._pullAgain=!1,t._pulling=!1,t._byobRequest=null,t._queue=t._queueTotalSize=void 0,ye(t),t._closeRequested=!1,t._started=!1,t._strategyHWM=o,t._pullAlgorithm=n,t._cancelAlgorithm=i,t._autoAllocateChunkSize=a,t._pendingPullIntos=new T,e._readableStreamController=t,y(h(r()),(function(){t._started=!0,we(t)}),(function(e){Ie(t,e)}))}function We(e){return new TypeError("ReadableStreamBYOBRequest.prototype."+e+" can only be used on a ReadableStreamBYOBRequest")}function He(e){return new TypeError("ReadableByteStreamController.prototype."+e+" can only be used on a ReadableByteStreamController")}function Ue(e){return new Ke(e)}function $e(e,t){e._reader._readIntoRequests.push(t)}function Ge(e){return e._reader._readIntoRequests.length}function Ve(e){var t=e._reader;return void 0!==t&&!!Ye(t)}Object.defineProperties(ge.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),"symbol"==typeof n.toStringTag&&Object.defineProperty(ge.prototype,n.toStringTag,{value:"ReadableByteStreamController",configurable:!0});var Ke=function(){function e(e){if(W(e,1,"ReadableStreamBYOBReader"),V(e,"First parameter"),Rr(e))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!_e(e._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");R(this,e),this._readIntoRequests=new T}return Object.defineProperty(e.prototype,"closed",{get:function(){return Ye(this)?this._closedPromise:p(Je("closed"))},enumerable:!1,configurable:!0}),e.prototype.cancel=function(e){return void 0===e&&(e=void 0),Ye(this)?void 0===this._ownerReadableStream?p(A("cancel")):M(this,e):p(Je("cancel"))},e.prototype.read=function(e){if(!Ye(this))return p(Je("read"));if(!ArrayBuffer.isView(e))return p(new TypeError("view must be an array buffer view"));if(0===e.byteLength)return p(new TypeError("view must have non-zero byteLength"));if(0===e.buffer.byteLength)return p(new TypeError("view's buffer must have non-zero byteLength"));if(e.buffer,void 0===this._ownerReadableStream)return p(A("read from"));var t,r,n=l((function(e,n){t=e,r=n}));return Xe(this,e,{_chunkSteps:function(e){return t({value:e,done:!1})},_closeSteps:function(e){return t({value:e,done:!0})},_errorSteps:function(e){return r(e)}}),n},e.prototype.releaseLock=function(){if(!Ye(this))throw Je("releaseLock");if(void 0!==this._ownerReadableStream){if(this._readIntoRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");P(this)}},e}();function Ye(e){return!!a(e)&&(!!Object.prototype.hasOwnProperty.call(e,"_readIntoRequests")&&e instanceof Ke)}function Xe(e,t,r){var n=e._ownerReadableStream;n._disturbed=!0,"errored"===n._state?r._errorSteps(n._storedError):function(e,t,r){var n=e._controlledReadableByteStream,i=1;t.constructor!==DataView&&(i=t.constructor.BYTES_PER_ELEMENT);var o=t.constructor,a=t.buffer,s={buffer:a,bufferByteLength:a.byteLength,byteOffset:t.byteOffset,byteLength:t.byteLength,bytesFilled:0,elementSize:i,viewConstructor:o,readerType:"byob"};if(e._pendingPullIntos.length>0)return e._pendingPullIntos.push(s),void $e(n,r);if("closed"!==n._state){if(e._queueTotalSize>0){if(Me(e,s)){var u=Te(s);return Ae(e),void r._chunkSteps(u)}if(e._closeRequested){var c=new TypeError("Insufficient bytes to fill elements in the given buffer");return Ie(e,c),void r._errorSteps(c)}}e._pendingPullIntos.push(s),$e(n,r),we(e)}else{var f=new o(s.buffer,s.byteOffset,0);r._closeSteps(f)}}(n._readableStreamController,t,r)}function Je(e){return new TypeError("ReadableStreamBYOBReader.prototype."+e+" can only be used on a ReadableStreamBYOBReader")}function Ze(e,t){var r=e.highWaterMark;if(void 0===r)return t;if(ce(r)||r<0)throw new RangeError("Invalid highWaterMark");return r}function Qe(e){var t=e.size;return t||function(){return 1}}function et(e,t){z(e,t);var r=null==e?void 0:e.highWaterMark,n=null==e?void 0:e.size;return{highWaterMark:void 0===r?void 0:U(r),size:void 0===n?void 0:tt(n,t+" has member 'size' that")}}function tt(e,t){return D(e,t),function(t){return U(e(t))}}function rt(e,t,r){return D(e,r),function(r){return E(e,t,[r])}}function nt(e,t,r){return D(e,r),function(){return E(e,t,[])}}function it(e,t,r){return D(e,r),function(r){return S(e,t,[r])}}function ot(e,t,r){return D(e,r),function(r,n){return E(e,t,[r,n])}}function at(e,t){if(!dt(e))throw new TypeError(t+" is not a WritableStream.")}Object.defineProperties(Ke.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),"symbol"==typeof n.toStringTag&&Object.defineProperty(Ke.prototype,n.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});var st="function"==typeof AbortController;var ut=function(){function e(e,t){void 0===e&&(e={}),void 0===t&&(t={}),void 0===e?e=null:F(e,"First parameter");var r=et(t,"Second parameter"),n=function(e,t){z(e,t);var r=null==e?void 0:e.abort,n=null==e?void 0:e.close,i=null==e?void 0:e.start,o=null==e?void 0:e.type,a=null==e?void 0:e.write;return{abort:void 0===r?void 0:rt(r,e,t+" has member 'abort' that"),close:void 0===n?void 0:nt(n,e,t+" has member 'close' that"),start:void 0===i?void 0:it(i,e,t+" has member 'start' that"),write:void 0===a?void 0:ot(a,e,t+" has member 'write' that"),type:o}}(e,"First parameter");if(ft(this),void 0!==n.type)throw new RangeError("Invalid type is specified");var i=Qe(r);!function(e,t,r,n){var i=Object.create(kt.prototype),o=function(){},a=function(){return h(void 0)},s=function(){return h(void 0)},u=function(){return h(void 0)};void 0!==t.start&&(o=function(){return t.start(i)});void 0!==t.write&&(a=function(e){return t.write(e,i)});void 0!==t.close&&(s=function(){return t.close()});void 0!==t.abort&&(u=function(e){return t.abort(e)});xt(e,i,o,a,s,u,r,n)}(this,n,Ze(r,1),i)}return Object.defineProperty(e.prototype,"locked",{get:function(){if(!dt(this))throw Lt("locked");return lt(this)},enumerable:!1,configurable:!0}),e.prototype.abort=function(e){return void 0===e&&(e=void 0),dt(this)?lt(this)?p(new TypeError("Cannot abort a stream that already has a writer")):ht(this,e):p(Lt("abort"))},e.prototype.close=function(){return dt(this)?lt(this)?p(new TypeError("Cannot close a stream that already has a writer")):gt(this)?p(new TypeError("Cannot close an already-closing stream")):pt(this):p(Lt("close"))},e.prototype.getWriter=function(){if(!dt(this))throw Lt("getWriter");return ct(this)},e}();function ct(e){return new wt(e)}function ft(e){e._state="writable",e._storedError=void 0,e._writer=void 0,e._writableStreamController=void 0,e._writeRequests=new T,e._inFlightWriteRequest=void 0,e._closeRequest=void 0,e._inFlightCloseRequest=void 0,e._pendingAbortRequest=void 0,e._backpressure=!1}function dt(e){return!!a(e)&&(!!Object.prototype.hasOwnProperty.call(e,"_writableStreamController")&&e instanceof ut)}function lt(e){return void 0!==e._writer}function ht(e,t){var r;if("closed"===e._state||"errored"===e._state)return h(void 0);e._writableStreamController._abortReason=t,null===(r=e._writableStreamController._abortController)||void 0===r||r.abort();var n=e._state;if("closed"===n||"errored"===n)return h(void 0);if(void 0!==e._pendingAbortRequest)return e._pendingAbortRequest._promise;var i=!1;"erroring"===n&&(i=!0,t=void 0);var o=l((function(r,n){e._pendingAbortRequest={_promise:void 0,_resolve:r,_reject:n,_reason:t,_wasAlreadyErroring:i}}));return e._pendingAbortRequest._promise=o,i||yt(e,t),o}function pt(e){var t=e._state;if("closed"===t||"errored"===t)return p(new TypeError("The stream (in "+t+" state) is not in the writable state and cannot be closed"));var r,n=l((function(t,r){var n={_resolve:t,_reject:r};e._closeRequest=n})),i=e._writer;return void 0!==i&&e._backpressure&&"writable"===t&&Xt(i),be(r=e._writableStreamController,At,0),Bt(r),n}function bt(e,t){"writable"!==e._state?mt(e):yt(e,t)}function yt(e,t){var r=e._writableStreamController;e._state="erroring",e._storedError=t;var n=e._writer;void 0!==n&&Rt(n,t),!function(e){if(void 0===e._inFlightWriteRequest&&void 0===e._inFlightCloseRequest)return!1;return!0}(e)&&r._started&&mt(e)}function mt(e){e._state="errored",e._writableStreamController[B]();var t=e._storedError;if(e._writeRequests.forEach((function(e){e._reject(t)})),e._writeRequests=new T,void 0!==e._pendingAbortRequest){var r=e._pendingAbortRequest;if(e._pendingAbortRequest=void 0,r._wasAlreadyErroring)return r._reject(t),void _t(e);y(e._writableStreamController[j](r._reason),(function(){r._resolve(),_t(e)}),(function(t){r._reject(t),_t(e)}))}else _t(e)}function gt(e){return void 0!==e._closeRequest||void 0!==e._inFlightCloseRequest}function _t(e){void 0!==e._closeRequest&&(e._closeRequest._reject(e._storedError),e._closeRequest=void 0);var t=e._writer;void 0!==t&&Ut(t,e._storedError)}function vt(e,t){var r=e._writer;void 0!==r&&t!==e._backpressure&&(t?function(e){Gt(e)}(r):Xt(r)),e._backpressure=t}Object.defineProperties(ut.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),"symbol"==typeof n.toStringTag&&Object.defineProperty(ut.prototype,n.toStringTag,{value:"WritableStream",configurable:!0});var wt=function(){function e(e){if(W(e,1,"WritableStreamDefaultWriter"),at(e,"First parameter"),lt(e))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=e,e._writer=this;var t,r=e._state;if("writable"===r)!gt(e)&&e._backpressure?Gt(this):Kt(this),Wt(this);else if("erroring"===r)Vt(this,e._storedError),Wt(this);else if("closed"===r)Kt(this),Wt(t=this),$t(t);else{var n=e._storedError;Vt(this,n),Ht(this,n)}}return Object.defineProperty(e.prototype,"closed",{get:function(){return St(this)?this._closedPromise:p(Dt("closed"))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!St(this))throw Dt("desiredSize");if(void 0===this._ownerWritableStream)throw Ft("desiredSize");return function(e){var t=e._ownerWritableStream,r=t._state;if("errored"===r||"erroring"===r)return null;if("closed"===r)return 0;return jt(t._writableStreamController)}(this)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ready",{get:function(){return St(this)?this._readyPromise:p(Dt("ready"))},enumerable:!1,configurable:!0}),e.prototype.abort=function(e){return void 0===e&&(e=void 0),St(this)?void 0===this._ownerWritableStream?p(Ft("abort")):function(e,t){return ht(e._ownerWritableStream,t)}(this,e):p(Dt("abort"))},e.prototype.close=function(){if(!St(this))return p(Dt("close"));var e=this._ownerWritableStream;return void 0===e?p(Ft("close")):gt(e)?p(new TypeError("Cannot close an already-closing stream")):Et(this)},e.prototype.releaseLock=function(){if(!St(this))throw Dt("releaseLock");void 0!==this._ownerWritableStream&&Mt(this)},e.prototype.write=function(e){return void 0===e&&(e=void 0),St(this)?void 0===this._ownerWritableStream?p(Ft("write to")):Pt(this,e):p(Dt("write"))},e}();function St(e){return!!a(e)&&(!!Object.prototype.hasOwnProperty.call(e,"_ownerWritableStream")&&e instanceof wt)}function Et(e){return pt(e._ownerWritableStream)}function Tt(e,t){"pending"===e._closedPromiseState?Ut(e,t):function(e,t){Ht(e,t)}(e,t)}function Rt(e,t){"pending"===e._readyPromiseState?Yt(e,t):function(e,t){Vt(e,t)}(e,t)}function Mt(e){var t=e._ownerWritableStream,r=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");Rt(e,r),Tt(e,r),t._writer=void 0,e._ownerWritableStream=void 0}function Pt(e,t){var r=e._ownerWritableStream,n=r._writableStreamController,i=function(e,t){try{return e._strategySizeAlgorithm(t)}catch(r){return qt(e,r),1}}(n,t);if(r!==e._ownerWritableStream)return p(Ft("write to"));var o=r._state;if("errored"===o)return p(r._storedError);if(gt(r)||"closed"===o)return p(new TypeError("The stream is closing or closed and cannot be written to"));if("erroring"===o)return p(r._storedError);var a=function(e){return l((function(t,r){var n={_resolve:t,_reject:r};e._writeRequests.push(n)}))}(r);return function(e,t,r){try{be(e,t,r)}catch(i){return void qt(e,i)}var n=e._controlledWritableStream;if(!gt(n)&&"writable"===n._state){vt(n,It(e))}Bt(e)}(n,t,i),a}Object.defineProperties(wt.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),"symbol"==typeof n.toStringTag&&Object.defineProperty(wt.prototype,n.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});var At={},kt=function(){function e(){throw new TypeError("Illegal constructor")}return Object.defineProperty(e.prototype,"abortReason",{get:function(){if(!Ot(this))throw zt("abortReason");return this._abortReason},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"signal",{get:function(){if(!Ot(this))throw zt("signal");if(void 0===this._abortController)throw new TypeError("WritableStreamDefaultController.prototype.signal is not supported");return this._abortController.signal},enumerable:!1,configurable:!0}),e.prototype.error=function(e){if(void 0===e&&(e=void 0),!Ot(this))throw zt("error");"writable"===this._controlledWritableStream._state&&Nt(this,e)},e.prototype[j]=function(e){var t=this._abortAlgorithm(e);return Ct(this),t},e.prototype[B]=function(){ye(this)},e}();function Ot(e){return!!a(e)&&(!!Object.prototype.hasOwnProperty.call(e,"_controlledWritableStream")&&e instanceof kt)}function xt(e,t,r,n,i,o,a,s){t._controlledWritableStream=e,e._writableStreamController=t,t._queue=void 0,t._queueTotalSize=void 0,ye(t),t._abortReason=void 0,t._abortController=function(){if(st)return new AbortController}(),t._started=!1,t._strategySizeAlgorithm=s,t._strategyHWM=a,t._writeAlgorithm=n,t._closeAlgorithm=i,t._abortAlgorithm=o;var u=It(t);vt(e,u),y(h(r()),(function(){t._started=!0,Bt(t)}),(function(r){t._started=!0,bt(e,r)}))}function Ct(e){e._writeAlgorithm=void 0,e._closeAlgorithm=void 0,e._abortAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function jt(e){return e._strategyHWM-e._queueTotalSize}function Bt(e){var t=e._controlledWritableStream;if(e._started&&void 0===t._inFlightWriteRequest)if("erroring"!==t._state){if(0!==e._queue.length){var r=e._queue.peek().value;r===At?function(e){var t=e._controlledWritableStream;(function(e){e._inFlightCloseRequest=e._closeRequest,e._closeRequest=void 0})(t),pe(e);var r=e._closeAlgorithm();Ct(e),y(r,(function(){!function(e){e._inFlightCloseRequest._resolve(void 0),e._inFlightCloseRequest=void 0,"erroring"===e._state&&(e._storedError=void 0,void 0!==e._pendingAbortRequest&&(e._pendingAbortRequest._resolve(),e._pendingAbortRequest=void 0)),e._state="closed";var t=e._writer;void 0!==t&&$t(t)}(t)}),(function(e){!function(e,t){e._inFlightCloseRequest._reject(t),e._inFlightCloseRequest=void 0,void 0!==e._pendingAbortRequest&&(e._pendingAbortRequest._reject(t),e._pendingAbortRequest=void 0),bt(e,t)}(t,e)}))}(e):function(e,t){var r=e._controlledWritableStream;(function(e){e._inFlightWriteRequest=e._writeRequests.shift()})(r),y(e._writeAlgorithm(t),(function(){!function(e){e._inFlightWriteRequest._resolve(void 0),e._inFlightWriteRequest=void 0}(r);var t=r._state;if(pe(e),!gt(r)&&"writable"===t){var n=It(e);vt(r,n)}Bt(e)}),(function(t){"writable"===r._state&&Ct(e),function(e,t){e._inFlightWriteRequest._reject(t),e._inFlightWriteRequest=void 0,bt(e,t)}(r,t)}))}(e,r)}}else mt(t)}function qt(e,t){"writable"===e._controlledWritableStream._state&&Nt(e,t)}function It(e){return jt(e)<=0}function Nt(e,t){var r=e._controlledWritableStream;Ct(e),yt(r,t)}function Lt(e){return new TypeError("WritableStream.prototype."+e+" can only be used on a WritableStream")}function zt(e){return new TypeError("WritableStreamDefaultController.prototype."+e+" can only be used on a WritableStreamDefaultController")}function Dt(e){return new TypeError("WritableStreamDefaultWriter.prototype."+e+" can only be used on a WritableStreamDefaultWriter")}function Ft(e){return new TypeError("Cannot "+e+" a stream using a released writer")}function Wt(e){e._closedPromise=l((function(t,r){e._closedPromise_resolve=t,e._closedPromise_reject=r,e._closedPromiseState="pending"}))}function Ht(e,t){Wt(e),Ut(e,t)}function Ut(e,t){void 0!==e._closedPromise_reject&&(v(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="rejected")}function $t(e){void 0!==e._closedPromise_resolve&&(e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="resolved")}function Gt(e){e._readyPromise=l((function(t,r){e._readyPromise_resolve=t,e._readyPromise_reject=r})),e._readyPromiseState="pending"}function Vt(e,t){Gt(e),Yt(e,t)}function Kt(e){Gt(e),Xt(e)}function Yt(e,t){void 0!==e._readyPromise_reject&&(v(e._readyPromise),e._readyPromise_reject(t),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="rejected")}function Xt(e){void 0!==e._readyPromise_resolve&&(e._readyPromise_resolve(void 0),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="fulfilled")}Object.defineProperties(kt.prototype,{error:{enumerable:!0}}),"symbol"==typeof n.toStringTag&&Object.defineProperty(kt.prototype,n.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});var Jt="undefined"!=typeof DOMException?DOMException:void 0;var Zt,Qt=function(e){if("function"!=typeof e&&"object"!=typeof e)return!1;try{return new e,!0}catch(Q){return!1}}(Jt)?Jt:((Zt=function(e,t){this.message=e||"",this.name=t||"Error",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}).prototype=Object.create(Error.prototype),Object.defineProperty(Zt.prototype,"constructor",{value:Zt,writable:!0,configurable:!0}),Zt);function er(e,t,r,n,o,a){var s=K(e),u=ct(t);e._disturbed=!0;var c=!1,f=h(void 0);return l((function(d,_){var w,S,E,T;if(void 0!==a){if(w=function(){var r=new Qt("Aborted","AbortError"),i=[];n||i.push((function(){return"writable"===t._state?ht(t,r):h(void 0)})),o||i.push((function(){return"readable"===e._state?Mr(e,r):h(void 0)})),k((function(){return Promise.all(i.map((function(e){return e()})))}),!0,r)},a.aborted)return void w();a.addEventListener("abort",w)}if(A(e,s._closedPromise,(function(e){n?O(!0,e):k((function(){return ht(t,e)}),!0,e)})),A(t,u._closedPromise,(function(t){o?O(!0,t):k((function(){return Mr(e,t)}),!0,t)})),S=e,E=s._closedPromise,T=function(){r?O():k((function(){return function(e){var t=e._ownerWritableStream,r=t._state;return gt(t)||"closed"===r?h(void 0):"errored"===r?p(t._storedError):Et(e)}(u)}))},"closed"===S._state?T():m(E,T),gt(t)||"closed"===t._state){var R=new TypeError("the destination writable stream closed before all data could be piped to it");o?O(!0,R):k((function(){return Mr(e,R)}),!0,R)}function M(){var e=f;return b(f,(function(){return e!==f?M():void 0}))}function A(e,t,r){"errored"===e._state?r(e._storedError):g(t,r)}function k(e,r,n){function i(){y(e(),(function(){return x(r,n)}),(function(e){return x(!0,e)}))}c||(c=!0,"writable"!==t._state||gt(t)?i():m(M(),i))}function O(e,r){c||(c=!0,"writable"!==t._state||gt(t)?x(e,r):m(M(),(function(){return x(e,r)})))}function x(e,t){Mt(u),P(s),void 0!==a&&a.removeEventListener("abort",w),e?_(t):d(void 0)}v(l((function(e,t){!function r(n){n?e():b(c?h(!0):b(u._readyPromise,(function(){return l((function(e,t){ne(s,{_chunkSteps:function(t){f=b(Pt(u,t),void 0,i),e(!1)},_closeSteps:function(){return e(!0)},_errorSteps:t})}))})),r,t)}(!1)})))}))}var tr=function(){function e(){throw new TypeError("Illegal constructor")}return Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!rr(this))throw lr("desiredSize");return cr(this)},enumerable:!1,configurable:!0}),e.prototype.close=function(){if(!rr(this))throw lr("close");if(!fr(this))throw new TypeError("The stream is not in a state that permits close");ar(this)},e.prototype.enqueue=function(e){if(void 0===e&&(e=void 0),!rr(this))throw lr("enqueue");if(!fr(this))throw new TypeError("The stream is not in a state that permits enqueue");return sr(this,e)},e.prototype.error=function(e){if(void 0===e&&(e=void 0),!rr(this))throw lr("error");ur(this,e)},e.prototype[q]=function(e){ye(this);var t=this._cancelAlgorithm(e);return or(this),t},e.prototype[I]=function(e){var t=this._controlledReadableStream;if(this._queue.length>0){var r=pe(this);this._closeRequested&&0===this._queue.length?(or(this),Pr(t)):nr(this),e._chunkSteps(r)}else Y(t,e),nr(this)},e}();function rr(e){return!!a(e)&&(!!Object.prototype.hasOwnProperty.call(e,"_controlledReadableStream")&&e instanceof tr)}function nr(e){ir(e)&&(e._pulling?e._pullAgain=!0:(e._pulling=!0,y(e._pullAlgorithm(),(function(){e._pulling=!1,e._pullAgain&&(e._pullAgain=!1,nr(e))}),(function(t){ur(e,t)}))))}function ir(e){var t=e._controlledReadableStream;return!!fr(e)&&(!!e._started&&(!!(Rr(t)&&J(t)>0)||cr(e)>0))}function or(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function ar(e){if(fr(e)){var t=e._controlledReadableStream;e._closeRequested=!0,0===e._queue.length&&(or(e),Pr(t))}}function sr(e,t){if(fr(e)){var r=e._controlledReadableStream;if(Rr(r)&&J(r)>0)X(r,t,!1);else{var n=void 0;try{n=e._strategySizeAlgorithm(t)}catch(i){throw ur(e,i),i}try{be(e,t,n)}catch(o){throw ur(e,o),o}}nr(e)}}function ur(e,t){var r=e._controlledReadableStream;"readable"===r._state&&(ye(e),or(e),Ar(r,t))}function cr(e){var t=e._controlledReadableStream._state;return"errored"===t?null:"closed"===t?0:e._strategyHWM-e._queueTotalSize}function fr(e){var t=e._controlledReadableStream._state;return!e._closeRequested&&"readable"===t}function dr(e,t,r,n,i,o,a){t._controlledReadableStream=e,t._queue=void 0,t._queueTotalSize=void 0,ye(t),t._started=!1,t._closeRequested=!1,t._pullAgain=!1,t._pulling=!1,t._strategySizeAlgorithm=a,t._strategyHWM=o,t._pullAlgorithm=n,t._cancelAlgorithm=i,e._readableStreamController=t,y(h(r()),(function(){t._started=!0,nr(t)}),(function(e){ur(t,e)}))}function lr(e){return new TypeError("ReadableStreamDefaultController.prototype."+e+" can only be used on a ReadableStreamDefaultController")}function hr(e,t){return _e(e._readableStreamController)?function(e){var t,r,n,i,o,a=K(e),s=!1,u=!1,c=!1,f=l((function(e){o=e}));function d(e){g(e._closedPromise,(function(t){e===a&&(Ie(n._readableStreamController,t),Ie(i._readableStreamController,t),u&&c||o(void 0))}))}function p(){Ye(a)&&(P(a),d(a=K(e))),ne(a,{_chunkSteps:function(t){w((function(){s=!1;var r=t,a=t;if(!u&&!c)try{a=he(t)}catch(f){return Ie(n._readableStreamController,f),Ie(i._readableStreamController,f),void o(Mr(e,f))}u||qe(n._readableStreamController,r),c||qe(i._readableStreamController,a)}))},_closeSteps:function(){s=!1,u||Be(n._readableStreamController),c||Be(i._readableStreamController),n._readableStreamController._pendingPullIntos.length>0&&ze(n._readableStreamController,0),i._readableStreamController._pendingPullIntos.length>0&&ze(i._readableStreamController,0),u&&c||o(void 0)},_errorSteps:function(){s=!1}})}function b(t,r){re(a)&&(P(a),d(a=Ue(e)));var f=r?i:n,l=r?n:i;Xe(a,t,{_chunkSteps:function(t){w((function(){s=!1;var n=r?c:u;if(r?u:c)n||De(f._readableStreamController,t);else{var i=void 0;try{i=he(t)}catch(a){return Ie(f._readableStreamController,a),Ie(l._readableStreamController,a),void o(Mr(e,a))}n||De(f._readableStreamController,t),qe(l._readableStreamController,i)}}))},_closeSteps:function(e){s=!1;var t=r?c:u,n=r?u:c;t||Be(f._readableStreamController),n||Be(l._readableStreamController),void 0!==e&&(t||De(f._readableStreamController,e),!n&&l._readableStreamController._pendingPullIntos.length>0&&ze(l._readableStreamController,0)),t&&n||o(void 0)},_errorSteps:function(){s=!1}})}function y(){if(s)return h(void 0);s=!0;var e=Ne(n._readableStreamController);return null===e?p():b(e._view,!1),h(void 0)}function m(){if(s)return h(void 0);s=!0;var e=Ne(i._readableStreamController);return null===e?p():b(e._view,!0),h(void 0)}function _(n){if(u=!0,t=n,c){var i=fe([t,r]),a=Mr(e,i);o(a)}return f}function v(n){if(c=!0,r=n,u){var i=fe([t,r]),a=Mr(e,i);o(a)}return f}function S(){}return n=Sr(S,y,_),i=Sr(S,m,v),d(a),[n,i]}(e):function(e,t){var r,n,i,o,a,s=K(e),u=!1,c=!1,f=!1,d=l((function(e){a=e}));function p(){return u||(u=!0,ne(s,{_chunkSteps:function(e){w((function(){u=!1;var t=e,r=e;c||sr(i._readableStreamController,t),f||sr(o._readableStreamController,r)}))},_closeSteps:function(){u=!1,c||ar(i._readableStreamController),f||ar(o._readableStreamController),c&&f||a(void 0)},_errorSteps:function(){u=!1}})),h(void 0)}function b(t){if(c=!0,r=t,f){var i=fe([r,n]),o=Mr(e,i);a(o)}return d}function y(t){if(f=!0,n=t,c){var i=fe([r,n]),o=Mr(e,i);a(o)}return d}function m(){}return i=wr(m,p,b),o=wr(m,p,y),g(s._closedPromise,(function(e){ur(i._readableStreamController,e),ur(o._readableStreamController,e),c&&f||a(void 0)})),[i,o]}(e)}function pr(e,t,r){return D(e,r),function(r){return E(e,t,[r])}}function br(e,t,r){return D(e,r),function(r){return E(e,t,[r])}}function yr(e,t,r){return D(e,r),function(r){return S(e,t,[r])}}function mr(e,t){if("bytes"!==(e=""+e))throw new TypeError(t+" '"+e+"' is not a valid enumeration value for ReadableStreamType");return e}function gr(e,t){if("byob"!==(e=""+e))throw new TypeError(t+" '"+e+"' is not a valid enumeration value for ReadableStreamReaderMode");return e}function _r(e,t){z(e,t);var r=null==e?void 0:e.preventAbort,n=null==e?void 0:e.preventCancel,i=null==e?void 0:e.preventClose,o=null==e?void 0:e.signal;return void 0!==o&&function(e,t){if(!function(e){if("object"!=typeof e||null===e)return!1;try{return"boolean"==typeof e.aborted}catch(Q){return!1}}(e))throw new TypeError(t+" is not an AbortSignal.")}(o,t+" has member 'signal' that"),{preventAbort:Boolean(r),preventCancel:Boolean(n),preventClose:Boolean(i),signal:o}}Object.defineProperties(tr.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),"symbol"==typeof n.toStringTag&&Object.defineProperty(tr.prototype,n.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});var vr=function(){function e(e,t){void 0===e&&(e={}),void 0===t&&(t={}),void 0===e?e=null:F(e,"First parameter");var r=et(t,"Second parameter"),n=function(e,t){z(e,t);var r=e,n=null==r?void 0:r.autoAllocateChunkSize,i=null==r?void 0:r.cancel,o=null==r?void 0:r.pull,a=null==r?void 0:r.start,s=null==r?void 0:r.type;return{autoAllocateChunkSize:void 0===n?void 0:G(n,t+" has member 'autoAllocateChunkSize' that"),cancel:void 0===i?void 0:pr(i,r,t+" has member 'cancel' that"),pull:void 0===o?void 0:br(o,r,t+" has member 'pull' that"),start:void 0===a?void 0:yr(a,r,t+" has member 'start' that"),type:void 0===s?void 0:mr(s,t+" has member 'type' that")}}(e,"First parameter");if(Er(this),"bytes"===n.type){if(void 0!==r.size)throw new RangeError("The strategy for a byte stream cannot have a size function");!function(e,t,r){var n=Object.create(ge.prototype),i=function(){},o=function(){return h(void 0)},a=function(){return h(void 0)};void 0!==t.start&&(i=function(){return t.start(n)}),void 0!==t.pull&&(o=function(){return t.pull(n)}),void 0!==t.cancel&&(a=function(e){return t.cancel(e)});var s=t.autoAllocateChunkSize;if(0===s)throw new TypeError("autoAllocateChunkSize must be greater than 0");Fe(e,n,i,o,a,r,s)}(this,n,Ze(r,0))}else{var i=Qe(r);!function(e,t,r,n){var i=Object.create(tr.prototype),o=function(){},a=function(){return h(void 0)},s=function(){return h(void 0)};void 0!==t.start&&(o=function(){return t.start(i)}),void 0!==t.pull&&(a=function(){return t.pull(i)}),void 0!==t.cancel&&(s=function(e){return t.cancel(e)}),dr(e,i,o,a,s,r,n)}(this,n,Ze(r,1),i)}}return Object.defineProperty(e.prototype,"locked",{get:function(){if(!Tr(this))throw kr("locked");return Rr(this)},enumerable:!1,configurable:!0}),e.prototype.cancel=function(e){return void 0===e&&(e=void 0),Tr(this)?Rr(this)?p(new TypeError("Cannot cancel a stream that already has a reader")):Mr(this,e):p(kr("cancel"))},e.prototype.getReader=function(e){if(void 0===e&&(e=void 0),!Tr(this))throw kr("getReader");return void 0===function(e,t){z(e,t);var r=null==e?void 0:e.mode;return{mode:void 0===r?void 0:gr(r,t+" has member 'mode' that")}}(e,"First parameter").mode?K(this):Ue(this)},e.prototype.pipeThrough=function(e,t){if(void 0===t&&(t={}),!Tr(this))throw kr("pipeThrough");W(e,1,"pipeThrough");var r=function(e,t){z(e,t);var r=null==e?void 0:e.readable;H(r,"readable","ReadableWritablePair"),V(r,t+" has member 'readable' that");var n=null==e?void 0:e.writable;return H(n,"writable","ReadableWritablePair"),at(n,t+" has member 'writable' that"),{readable:r,writable:n}}(e,"First parameter"),n=_r(t,"Second parameter");if(Rr(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(lt(r.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");return v(er(this,r.writable,n.preventClose,n.preventAbort,n.preventCancel,n.signal)),r.readable},e.prototype.pipeTo=function(e,t){if(void 0===t&&(t={}),!Tr(this))return p(kr("pipeTo"));if(void 0===e)return p("Parameter 1 is required in 'pipeTo'.");if(!dt(e))return p(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));var r;try{r=_r(t,"Second parameter")}catch(n){return p(n)}return Rr(this)?p(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):lt(e)?p(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):er(this,e,r.preventClose,r.preventAbort,r.preventCancel,r.signal)},e.prototype.tee=function(){if(!Tr(this))throw kr("tee");return fe(hr(this))},e.prototype.values=function(e){if(void 0===e&&(e=void 0),!Tr(this))throw kr("values");var t,r,n,i,o,a=function(e,t){z(e,t);var r=null==e?void 0:e.preventCancel;return{preventCancel:Boolean(r)}}(e,"First parameter");return t=this,r=a.preventCancel,n=K(t),i=new oe(n,r),(o=Object.create(ae))._asyncIteratorImpl=i,o},e}();function wr(e,t,r,n,i){void 0===n&&(n=1),void 0===i&&(i=function(){return 1});var o=Object.create(vr.prototype);return Er(o),dr(o,Object.create(tr.prototype),e,t,r,n,i),o}function Sr(e,t,r){var n=Object.create(vr.prototype);return Er(n),Fe(n,Object.create(ge.prototype),e,t,r,0,void 0),n}function Er(e){e._state="readable",e._reader=void 0,e._storedError=void 0,e._disturbed=!1}function Tr(e){return!!a(e)&&(!!Object.prototype.hasOwnProperty.call(e,"_readableStreamController")&&e instanceof vr)}function Rr(e){return void 0!==e._reader}function Mr(e,t){if(e._disturbed=!0,"closed"===e._state)return h(void 0);if("errored"===e._state)return p(e._storedError);Pr(e);var r=e._reader;return void 0!==r&&Ye(r)&&(r._readIntoRequests.forEach((function(e){e._closeSteps(void 0)})),r._readIntoRequests=new T),_(e._readableStreamController[q](t),i)}function Pr(e){e._state="closed";var t=e._reader;void 0!==t&&(C(t),re(t)&&(t._readRequests.forEach((function(e){e._closeSteps()})),t._readRequests=new T))}function Ar(e,t){e._state="errored",e._storedError=t;var r=e._reader;void 0!==r&&(x(r,t),re(r)?(r._readRequests.forEach((function(e){e._errorSteps(t)})),r._readRequests=new T):(r._readIntoRequests.forEach((function(e){e._errorSteps(t)})),r._readIntoRequests=new T))}function kr(e){return new TypeError("ReadableStream.prototype."+e+" can only be used on a ReadableStream")}function Or(e,t){z(e,t);var r=null==e?void 0:e.highWaterMark;return H(r,"highWaterMark","QueuingStrategyInit"),{highWaterMark:U(r)}}Object.defineProperties(vr.prototype,{cancel:{enumerable:!0},getReader:{enumerable:!0},pipeThrough:{enumerable:!0},pipeTo:{enumerable:!0},tee:{enumerable:!0},values:{enumerable:!0},locked:{enumerable:!0}}),"symbol"==typeof n.toStringTag&&Object.defineProperty(vr.prototype,n.toStringTag,{value:"ReadableStream",configurable:!0}),"symbol"==typeof n.asyncIterator&&Object.defineProperty(vr.prototype,n.asyncIterator,{value:vr.prototype.values,writable:!0,configurable:!0});var xr=function(e){return e.byteLength};Object.defineProperty(xr,"name",{value:"size",configurable:!0});var Cr=function(){function e(e){W(e,1,"ByteLengthQueuingStrategy"),e=Or(e,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=e.highWaterMark}return Object.defineProperty(e.prototype,"highWaterMark",{get:function(){if(!Br(this))throw jr("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){if(!Br(this))throw jr("size");return xr},enumerable:!1,configurable:!0}),e}();function jr(e){return new TypeError("ByteLengthQueuingStrategy.prototype."+e+" can only be used on a ByteLengthQueuingStrategy")}function Br(e){return!!a(e)&&(!!Object.prototype.hasOwnProperty.call(e,"_byteLengthQueuingStrategyHighWaterMark")&&e instanceof Cr)}Object.defineProperties(Cr.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),"symbol"==typeof n.toStringTag&&Object.defineProperty(Cr.prototype,n.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});var qr=function(){return 1};Object.defineProperty(qr,"name",{value:"size",configurable:!0});var Ir=function(){function e(e){W(e,1,"CountQueuingStrategy"),e=Or(e,"First parameter"),this._countQueuingStrategyHighWaterMark=e.highWaterMark}return Object.defineProperty(e.prototype,"highWaterMark",{get:function(){if(!Lr(this))throw Nr("highWaterMark");return this._countQueuingStrategyHighWaterMark},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){if(!Lr(this))throw Nr("size");return qr},enumerable:!1,configurable:!0}),e}();function Nr(e){return new TypeError("CountQueuingStrategy.prototype."+e+" can only be used on a CountQueuingStrategy")}function Lr(e){return!!a(e)&&(!!Object.prototype.hasOwnProperty.call(e,"_countQueuingStrategyHighWaterMark")&&e instanceof Ir)}function zr(e,t,r){return D(e,r),function(r){return E(e,t,[r])}}function Dr(e,t,r){return D(e,r),function(r){return S(e,t,[r])}}function Fr(e,t,r){return D(e,r),function(r,n){return E(e,t,[r,n])}}Object.defineProperties(Ir.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),"symbol"==typeof n.toStringTag&&Object.defineProperty(Ir.prototype,n.toStringTag,{value:"CountQueuingStrategy",configurable:!0});var Wr=function(){function e(e,t,r){void 0===e&&(e={}),void 0===t&&(t={}),void 0===r&&(r={}),void 0===e&&(e=null);var n=et(t,"Second parameter"),i=et(r,"Third parameter"),o=function(e,t){z(e,t);var r=null==e?void 0:e.flush,n=null==e?void 0:e.readableType,i=null==e?void 0:e.start,o=null==e?void 0:e.transform,a=null==e?void 0:e.writableType;return{flush:void 0===r?void 0:zr(r,e,t+" has member 'flush' that"),readableType:n,start:void 0===i?void 0:Dr(i,e,t+" has member 'start' that"),transform:void 0===o?void 0:Fr(o,e,t+" has member 'transform' that"),writableType:a}}(e,"First parameter");if(void 0!==o.readableType)throw new RangeError("Invalid readableType specified");if(void 0!==o.writableType)throw new RangeError("Invalid writableType specified");var a,s=Ze(i,0),u=Qe(i),c=Ze(n,1),f=Qe(n);!function(e,t,r,n,i,o){function a(){return t}function s(t){return function(e,t){var r=e._transformStreamController;if(e._backpressure){return _(e._backpressureChangePromise,(function(){var n=e._writable;if("erroring"===n._state)throw n._storedError;return Jr(r,t)}))}return Jr(r,t)}(e,t)}function u(t){return function(e,t){return Ur(e,t),h(void 0)}(e,t)}function c(){return function(e){var t=e._readable,r=e._transformStreamController,n=r._flushAlgorithm();return Yr(r),_(n,(function(){if("errored"===t._state)throw t._storedError;ar(t._readableStreamController)}),(function(r){throw Ur(e,r),t._storedError}))}(e)}function f(){return function(e){return Gr(e,!1),e._backpressureChangePromise}(e)}function d(t){return $r(e,t),h(void 0)}e._writable=function(e,t,r,n,i,o){void 0===i&&(i=1),void 0===o&&(o=function(){return 1});var a=Object.create(ut.prototype);return ft(a),xt(a,Object.create(kt.prototype),e,t,r,n,i,o),a}(a,s,c,u,r,n),e._readable=wr(a,f,d,i,o),e._backpressure=void 0,e._backpressureChangePromise=void 0,e._backpressureChangePromise_resolve=void 0,Gr(e,!0),e._transformStreamController=void 0}(this,l((function(e){a=e})),c,f,s,u),function(e,t){var r=Object.create(Vr.prototype),n=function(e){try{return Xr(r,e),h(void 0)}catch(t){return p(t)}},i=function(){return h(void 0)};void 0!==t.transform&&(n=function(e){return t.transform(e,r)});void 0!==t.flush&&(i=function(){return t.flush(r)});!function(e,t,r,n){t._controlledTransformStream=e,e._transformStreamController=t,t._transformAlgorithm=r,t._flushAlgorithm=n}(e,r,n,i)}(this,o),void 0!==o.start?a(o.start(this._transformStreamController)):a(void 0)}return Object.defineProperty(e.prototype,"readable",{get:function(){if(!Hr(this))throw Qr("readable");return this._readable},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"writable",{get:function(){if(!Hr(this))throw Qr("writable");return this._writable},enumerable:!1,configurable:!0}),e}();function Hr(e){return!!a(e)&&(!!Object.prototype.hasOwnProperty.call(e,"_transformStreamController")&&e instanceof Wr)}function Ur(e,t){ur(e._readable._readableStreamController,t),$r(e,t)}function $r(e,t){Yr(e._transformStreamController),qt(e._writable._writableStreamController,t),e._backpressure&&Gr(e,!1)}function Gr(e,t){void 0!==e._backpressureChangePromise&&e._backpressureChangePromise_resolve(),e._backpressureChangePromise=l((function(t){e._backpressureChangePromise_resolve=t})),e._backpressure=t}Object.defineProperties(Wr.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),"symbol"==typeof n.toStringTag&&Object.defineProperty(Wr.prototype,n.toStringTag,{value:"TransformStream",configurable:!0});var Vr=function(){function e(){throw new TypeError("Illegal constructor")}return Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!Kr(this))throw Zr("desiredSize");return cr(this._controlledTransformStream._readable._readableStreamController)},enumerable:!1,configurable:!0}),e.prototype.enqueue=function(e){if(void 0===e&&(e=void 0),!Kr(this))throw Zr("enqueue");Xr(this,e)},e.prototype.error=function(e){if(void 0===e&&(e=void 0),!Kr(this))throw Zr("error");var t;t=e,Ur(this._controlledTransformStream,t)},e.prototype.terminate=function(){if(!Kr(this))throw Zr("terminate");!function(e){var t=e._controlledTransformStream;ar(t._readable._readableStreamController);var r=new TypeError("TransformStream terminated");$r(t,r)}(this)},e}();function Kr(e){return!!a(e)&&(!!Object.prototype.hasOwnProperty.call(e,"_controlledTransformStream")&&e instanceof Vr)}function Yr(e){e._transformAlgorithm=void 0,e._flushAlgorithm=void 0}function Xr(e,t){var r=e._controlledTransformStream,n=r._readable._readableStreamController;if(!fr(n))throw new TypeError("Readable side is not in a state that permits enqueue");try{sr(n,t)}catch(o){throw $r(r,o),r._readable._storedError}var i=function(e){return!ir(e)}(n);i!==r._backpressure&&Gr(r,!0)}function Jr(e,t){return _(e._transformAlgorithm(t),void 0,(function(t){throw Ur(e._controlledTransformStream,t),t}))}function Zr(e){return new TypeError("TransformStreamDefaultController.prototype."+e+" can only be used on a TransformStreamDefaultController")}function Qr(e){return new TypeError("TransformStream.prototype."+e+" can only be used on a TransformStream")}Object.defineProperties(Vr.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),"symbol"==typeof n.toStringTag&&Object.defineProperty(Vr.prototype,n.toStringTag,{value:"TransformStreamDefaultController",configurable:!0})},8597:e=>{"use strict";e.exports={i8:"6.5.4"}},4147:e=>{"use strict";e.exports=JSON.parse('{"name":"@ethersphere/bee-js","version":"3.2.0","description":"Javascript client for Bee","keywords":["bee","swarm","decentralised","storage","ethereum","typescript","p2p","browser","node"],"homepage":"https://github.com/ethersphere/bee-js","bugs":{"url":"https://github.com/ethersphere/bee-js/issues/"},"license":"BSD-3-Clause","main":"dist/index.min.js","repository":{"type":"git","url":"https://github.com/ethersphere/bee-js.git"},"browser":{"./dist/index.min.js":"./dist/index.browser.min.js","data":"data.browser"},"files":["dist"],"types":"dist/src/index.d.ts","scripts":{"prepublishOnly":"rimraf dist && npm run compile:types && npm run compile:browser --env mode=production && npm run compile:node --env mode=production","compile:node":"webpack --progress --env target=node","compile:types":"tsc --emitDeclarationOnly --declaration","compile:browser":"webpack --progress --env target=web","mock-ci":"npm run lint:check && npm run check:types && npm run test","docs":"rimraf docs && typedoc","test":"npm run compile:browser && jest --verbose --selectProjects=node:unit node:integration dom:integration --config=jest.config.ts","test:integration:browser":"npm run compile:browser && jest --verbose --selectProjects=dom:integration --config=jest.config.ts","test:integration:node":"jest --verbose --selectProjects=node:integration --config=jest.config.ts","test:integration":"npm run compile:browser && jest --verbose --selectProjects=node:integration dom:integration --config=jest.config.ts","test:unit":"jest --verbose --selectProjects=node:unit --config=jest.config.ts ","test:node":"jest --verbose --selectProjects=node:unit node:integration --config=jest.config.ts","test:browser":"npm run test:integration:browser","check:types":"tsc --project tsconfig.test.json","lint":"eslint --fix \\"src/**/*.ts\\" \\"test/**/*.ts\\" && prettier --write \\"src/**/*.ts\\" \\"test/**/*.ts\\"","lint:check":"eslint \\"src/**/*.ts\\" \\"test/**/*.ts\\" && prettier --check \\"src/**/*.ts\\" \\"test/**/*.ts\\"","depcheck":"depcheck ."},"dependencies":{"@types/readable-stream":"^2.3.11","bufferutil":"^4.0.3","cross-blob":"^2.0.1","elliptic":"^6.5.4","isomorphic-ws":"^4.0.1","js-sha3":"^0.8.0","ky":"^0.25.1","ky-universal":"^0.8.2","readable-stream":"^3.6.0","tar-js":"^0.3.0","utf-8-validate":"^5.0.8","web-streams-polyfill":"^3.1.0","ws":"^7.5.0"},"devDependencies":{"@babel/core":"^7.14.6","@babel/plugin-proposal-class-properties":"^7.16.7","@babel/plugin-transform-runtime":"^7.14.5","@babel/preset-env":"^7.14.7","@babel/preset-typescript":"^7.14.5","@commitlint/cli":"^12.1.1","@commitlint/config-conventional":"^16.0.0","@fluffy-spoon/substitute":"^1.208.0","@jest/test-sequencer":"^27.0.5","@jest/types":"^27.0.2","@types/content-disposition":"^0.5.4","@types/debug":"^4.1.7","@types/elliptic":"^6.4.12","@types/expect-puppeteer":"^4.4.5","@types/glob":"^7.1.3","@types/jest":"^26.0.23","@types/jest-environment-puppeteer":"^4.4.1","@types/node":"^15.12.4","@types/puppeteer":"^5.4.3","@types/ws":"^7.4.5","@typescript-eslint/eslint-plugin":"^5.10.0","@typescript-eslint/parser":"^5.10.0","babel-jest":"^27.0.5","babel-loader":"^8.2.2","debug":"^4.3.1","depcheck":"^1.4.3","eslint":"^8.7.0","eslint-config-prettier":"^8.3.0","eslint-plugin-jest":"^25.7.0","eslint-plugin-prettier":"^4.0.0","eslint-plugin-unused-imports":"^2.0.0","glob":"^7.1.7","husky":"^6.0.0","jest":"^27.0.5","jest-puppeteer":"^5.0.4","nock":"^13.2.2","prettier":"^2.3.1","puppeteer":"^9.1.1","rimraf":"^3.0.2","terser-webpack-plugin":"^5.3.0","ts-node":"^10.0.0","typedoc":"^0.22.11","typedoc-plugin-markdown":"^3.11.12","typescript":"^4.5.4","webpack":"^5.65.0","webpack-bundle-analyzer":"^4.4.1","webpack-cli":"^4.9.2"},"engines":{"node":">=12.0.0","npm":">=6.0.0","bee":"1.4.1-238867f1"}}')}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}return r.amdO={},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),r(8809)})()}));
3
- //# sourceMappingURL=index.min.js.map