game_dig 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (719) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +0 -4
  3. data/CHANGELOG.md +13 -0
  4. data/README.md +88 -28
  5. data/Rakefile +3 -3
  6. data/cli/pry_nodo.rb +5 -0
  7. data/game_dig.gemspec +21 -14
  8. data/lib/custom_errors/cli_not_found.rb +4 -0
  9. data/lib/custom_errors/error.rb +4 -0
  10. data/lib/game_dig/helper.rb +51 -0
  11. data/lib/game_dig/node/gamedig-example.js +17 -0
  12. data/lib/game_dig/node/node_modules/.bin/fxparser +1 -0
  13. data/lib/game_dig/node/node_modules/.bin/gamedig +1 -0
  14. data/lib/game_dig/node/node_modules/.bin/seek-bunzip +1 -0
  15. data/lib/game_dig/node/node_modules/.bin/seek-table +1 -0
  16. data/lib/game_dig/node/node_modules/.yarn-integrity +73 -0
  17. data/lib/game_dig/node/node_modules/@sindresorhus/is/dist/index.d.ts +246 -0
  18. data/lib/game_dig/node/node_modules/@sindresorhus/is/dist/index.js +454 -0
  19. data/lib/game_dig/node/node_modules/@sindresorhus/is/dist/types.d.ts +32 -0
  20. data/lib/game_dig/node/node_modules/@sindresorhus/is/dist/types.js +2 -0
  21. data/lib/game_dig/node/node_modules/@sindresorhus/is/license +9 -0
  22. data/lib/game_dig/node/node_modules/@sindresorhus/is/package.json +76 -0
  23. data/lib/game_dig/node/node_modules/@sindresorhus/is/readme.md +698 -0
  24. data/lib/game_dig/node/node_modules/@szmarczak/http-timer/LICENSE +21 -0
  25. data/lib/game_dig/node/node_modules/@szmarczak/http-timer/README.md +93 -0
  26. data/lib/game_dig/node/node_modules/@szmarczak/http-timer/dist/source/index.d.ts +32 -0
  27. data/lib/game_dig/node/node_modules/@szmarczak/http-timer/dist/source/index.js +106 -0
  28. data/lib/game_dig/node/node_modules/@szmarczak/http-timer/package.json +89 -0
  29. data/lib/game_dig/node/node_modules/@types/http-cache-semantics/LICENSE +21 -0
  30. data/lib/game_dig/node/node_modules/@types/http-cache-semantics/README.md +15 -0
  31. data/lib/game_dig/node/node_modules/@types/http-cache-semantics/index.d.ts +165 -0
  32. data/lib/game_dig/node/node_modules/@types/http-cache-semantics/package.json +25 -0
  33. data/lib/game_dig/node/node_modules/any-promise/.jshintrc +4 -0
  34. data/lib/game_dig/node/node_modules/any-promise/.npmignore +7 -0
  35. data/lib/game_dig/node/node_modules/any-promise/LICENSE +19 -0
  36. data/lib/game_dig/node/node_modules/any-promise/README.md +161 -0
  37. data/lib/game_dig/node/node_modules/any-promise/implementation.d.ts +3 -0
  38. data/lib/game_dig/node/node_modules/any-promise/implementation.js +1 -0
  39. data/lib/game_dig/node/node_modules/any-promise/index.d.ts +73 -0
  40. data/lib/game_dig/node/node_modules/any-promise/index.js +1 -0
  41. data/lib/game_dig/node/node_modules/any-promise/loader.js +78 -0
  42. data/lib/game_dig/node/node_modules/any-promise/optional.js +6 -0
  43. data/lib/game_dig/node/node_modules/any-promise/package.json +45 -0
  44. data/lib/game_dig/node/node_modules/any-promise/register/bluebird.d.ts +1 -0
  45. data/lib/game_dig/node/node_modules/any-promise/register/bluebird.js +2 -0
  46. data/lib/game_dig/node/node_modules/any-promise/register/es6-promise.d.ts +1 -0
  47. data/lib/game_dig/node/node_modules/any-promise/register/es6-promise.js +2 -0
  48. data/lib/game_dig/node/node_modules/any-promise/register/lie.d.ts +1 -0
  49. data/lib/game_dig/node/node_modules/any-promise/register/lie.js +2 -0
  50. data/lib/game_dig/node/node_modules/any-promise/register/native-promise-only.d.ts +1 -0
  51. data/lib/game_dig/node/node_modules/any-promise/register/native-promise-only.js +2 -0
  52. data/lib/game_dig/node/node_modules/any-promise/register/pinkie.d.ts +1 -0
  53. data/lib/game_dig/node/node_modules/any-promise/register/pinkie.js +2 -0
  54. data/lib/game_dig/node/node_modules/any-promise/register/promise.d.ts +1 -0
  55. data/lib/game_dig/node/node_modules/any-promise/register/promise.js +2 -0
  56. data/lib/game_dig/node/node_modules/any-promise/register/q.d.ts +1 -0
  57. data/lib/game_dig/node/node_modules/any-promise/register/q.js +2 -0
  58. data/lib/game_dig/node/node_modules/any-promise/register/rsvp.d.ts +1 -0
  59. data/lib/game_dig/node/node_modules/any-promise/register/rsvp.js +2 -0
  60. data/lib/game_dig/node/node_modules/any-promise/register/vow.d.ts +1 -0
  61. data/lib/game_dig/node/node_modules/any-promise/register/vow.js +2 -0
  62. data/lib/game_dig/node/node_modules/any-promise/register/when.d.ts +1 -0
  63. data/lib/game_dig/node/node_modules/any-promise/register/when.js +2 -0
  64. data/lib/game_dig/node/node_modules/any-promise/register-shim.js +18 -0
  65. data/lib/game_dig/node/node_modules/any-promise/register.d.ts +17 -0
  66. data/lib/game_dig/node/node_modules/any-promise/register.js +94 -0
  67. data/lib/game_dig/node/node_modules/barse/.npmignore +2 -0
  68. data/lib/game_dig/node/node_modules/barse/.travis.yml +4 -0
  69. data/lib/game_dig/node/node_modules/barse/README.md +138 -0
  70. data/lib/game_dig/node/node_modules/barse/example/complete.js +34 -0
  71. data/lib/game_dig/node/node_modules/barse/example/next.js +21 -0
  72. data/lib/game_dig/node/node_modules/barse/index.js +282 -0
  73. data/lib/game_dig/node/node_modules/barse/node_modules/readable-stream/.npmignore +5 -0
  74. data/lib/game_dig/node/node_modules/barse/node_modules/readable-stream/LICENSE +18 -0
  75. data/lib/game_dig/node/node_modules/barse/node_modules/readable-stream/README.md +15 -0
  76. data/lib/game_dig/node/node_modules/barse/node_modules/readable-stream/duplex.js +1 -0
  77. data/lib/game_dig/node/node_modules/barse/node_modules/readable-stream/lib/_stream_duplex.js +89 -0
  78. data/lib/game_dig/node/node_modules/barse/node_modules/readable-stream/lib/_stream_passthrough.js +46 -0
  79. data/lib/game_dig/node/node_modules/barse/node_modules/readable-stream/lib/_stream_readable.js +982 -0
  80. data/lib/game_dig/node/node_modules/barse/node_modules/readable-stream/lib/_stream_transform.js +210 -0
  81. data/lib/game_dig/node/node_modules/barse/node_modules/readable-stream/lib/_stream_writable.js +386 -0
  82. data/lib/game_dig/node/node_modules/barse/node_modules/readable-stream/package.json +32 -0
  83. data/lib/game_dig/node/node_modules/barse/node_modules/readable-stream/passthrough.js +1 -0
  84. data/lib/game_dig/node/node_modules/barse/node_modules/readable-stream/readable.js +11 -0
  85. data/lib/game_dig/node/node_modules/barse/node_modules/readable-stream/transform.js +1 -0
  86. data/lib/game_dig/node/node_modules/barse/node_modules/readable-stream/writable.js +1 -0
  87. data/lib/game_dig/node/node_modules/barse/package.json +48 -0
  88. data/lib/game_dig/node/node_modules/barse/test/integration.js +37 -0
  89. data/lib/game_dig/node/node_modules/barse/test/loop.js +36 -0
  90. data/lib/game_dig/node/node_modules/barse/test/next.js +34 -0
  91. data/lib/game_dig/node/node_modules/barse/test/scope.js +18 -0
  92. data/lib/game_dig/node/node_modules/barse/test/string.js +33 -0
  93. data/lib/game_dig/node/node_modules/barse/test/vars.js +20 -0
  94. data/lib/game_dig/node/node_modules/cacheable-lookup/LICENSE +21 -0
  95. data/lib/game_dig/node/node_modules/cacheable-lookup/README.md +245 -0
  96. data/lib/game_dig/node/node_modules/cacheable-lookup/index.d.ts +144 -0
  97. data/lib/game_dig/node/node_modules/cacheable-lookup/package.json +61 -0
  98. data/lib/game_dig/node/node_modules/cacheable-lookup/source/index.js +452 -0
  99. data/lib/game_dig/node/node_modules/cacheable-request/README.md +335 -0
  100. data/lib/game_dig/node/node_modules/cacheable-request/dist/index.d.ts +17 -0
  101. data/lib/game_dig/node/node_modules/cacheable-request/dist/index.d.ts.map +1 -0
  102. data/lib/game_dig/node/node_modules/cacheable-request/dist/index.js +275 -0
  103. data/lib/game_dig/node/node_modules/cacheable-request/dist/index.js.map +1 -0
  104. data/lib/game_dig/node/node_modules/cacheable-request/dist/types.d.ts +106 -0
  105. data/lib/game_dig/node/node_modules/cacheable-request/dist/types.d.ts.map +1 -0
  106. data/lib/game_dig/node/node_modules/cacheable-request/dist/types.js +19 -0
  107. data/lib/game_dig/node/node_modules/cacheable-request/dist/types.js.map +1 -0
  108. data/lib/game_dig/node/node_modules/cacheable-request/node_modules/mimic-response/index.d.ts +29 -0
  109. data/lib/game_dig/node/node_modules/cacheable-request/node_modules/mimic-response/index.js +75 -0
  110. data/lib/game_dig/node/node_modules/cacheable-request/node_modules/mimic-response/license +9 -0
  111. data/lib/game_dig/node/node_modules/cacheable-request/node_modules/mimic-response/package.json +44 -0
  112. data/lib/game_dig/node/node_modules/cacheable-request/node_modules/mimic-response/readme.md +78 -0
  113. data/lib/game_dig/node/node_modules/cacheable-request/package.json +121 -0
  114. data/lib/game_dig/node/node_modules/commander/CHANGELOG.md +361 -0
  115. data/lib/game_dig/node/node_modules/commander/LICENSE +22 -0
  116. data/lib/game_dig/node/node_modules/commander/Readme.md +791 -0
  117. data/lib/game_dig/node/node_modules/commander/index.js +1881 -0
  118. data/lib/game_dig/node/node_modules/commander/package.json +51 -0
  119. data/lib/game_dig/node/node_modules/commander/typings/index.d.ts +410 -0
  120. data/lib/game_dig/node/node_modules/core-util-is/LICENSE +19 -0
  121. data/lib/game_dig/node/node_modules/core-util-is/README.md +3 -0
  122. data/lib/game_dig/node/node_modules/core-util-is/lib/util.js +107 -0
  123. data/lib/game_dig/node/node_modules/core-util-is/package.json +38 -0
  124. data/lib/game_dig/node/node_modules/decompress-response/index.d.ts +22 -0
  125. data/lib/game_dig/node/node_modules/decompress-response/index.js +58 -0
  126. data/lib/game_dig/node/node_modules/decompress-response/license +9 -0
  127. data/lib/game_dig/node/node_modules/decompress-response/package.json +56 -0
  128. data/lib/game_dig/node/node_modules/decompress-response/readme.md +48 -0
  129. data/lib/game_dig/node/node_modules/defer-to-connect/LICENSE +21 -0
  130. data/lib/game_dig/node/node_modules/defer-to-connect/README.md +38 -0
  131. data/lib/game_dig/node/node_modules/defer-to-connect/dist/source/index.d.ts +10 -0
  132. data/lib/game_dig/node/node_modules/defer-to-connect/dist/source/index.js +47 -0
  133. data/lib/game_dig/node/node_modules/defer-to-connect/package.json +71 -0
  134. data/lib/game_dig/node/node_modules/emitter-component/History.md +35 -0
  135. data/lib/game_dig/node/node_modules/emitter-component/Makefile +7 -0
  136. data/lib/game_dig/node/node_modules/emitter-component/Readme.md +70 -0
  137. data/lib/game_dig/node/node_modules/emitter-component/bower.json +21 -0
  138. data/lib/game_dig/node/node_modules/emitter-component/component.json +9 -0
  139. data/lib/game_dig/node/node_modules/emitter-component/index.js +164 -0
  140. data/lib/game_dig/node/node_modules/emitter-component/package.json +19 -0
  141. data/lib/game_dig/node/node_modules/emitter-component/test/emitter.js +195 -0
  142. data/lib/game_dig/node/node_modules/event-to-promise/LICENSE +14 -0
  143. data/lib/game_dig/node/node_modules/event-to-promise/README.md +180 -0
  144. data/lib/game_dig/node/node_modules/event-to-promise/index.js +106 -0
  145. data/lib/game_dig/node/node_modules/event-to-promise/package.json +35 -0
  146. data/lib/game_dig/node/node_modules/fast-xml-parser/CHANGELOG.md +671 -0
  147. data/lib/game_dig/node/node_modules/fast-xml-parser/LICENSE +21 -0
  148. data/lib/game_dig/node/node_modules/fast-xml-parser/README.md +223 -0
  149. data/lib/game_dig/node/node_modules/fast-xml-parser/lib/fxbuilder.min.js +2 -0
  150. data/lib/game_dig/node/node_modules/fast-xml-parser/lib/fxbuilder.min.js.map +1 -0
  151. data/lib/game_dig/node/node_modules/fast-xml-parser/lib/fxp.cjs +1 -0
  152. data/lib/game_dig/node/node_modules/fast-xml-parser/lib/fxp.d.cts +458 -0
  153. data/lib/game_dig/node/node_modules/fast-xml-parser/lib/fxp.min.js +2 -0
  154. data/lib/game_dig/node/node_modules/fast-xml-parser/lib/fxp.min.js.map +1 -0
  155. data/lib/game_dig/node/node_modules/fast-xml-parser/lib/fxparser.min.js +2 -0
  156. data/lib/game_dig/node/node_modules/fast-xml-parser/lib/fxparser.min.js.map +1 -0
  157. data/lib/game_dig/node/node_modules/fast-xml-parser/lib/fxvalidator.min.js +2 -0
  158. data/lib/game_dig/node/node_modules/fast-xml-parser/lib/fxvalidator.min.js.map +1 -0
  159. data/lib/game_dig/node/node_modules/fast-xml-parser/package.json +90 -0
  160. data/lib/game_dig/node/node_modules/fast-xml-parser/src/cli/cli.js +97 -0
  161. data/lib/game_dig/node/node_modules/fast-xml-parser/src/cli/man.js +17 -0
  162. data/lib/game_dig/node/node_modules/fast-xml-parser/src/cli/read.js +43 -0
  163. data/lib/game_dig/node/node_modules/fast-xml-parser/src/fxp.d.ts +445 -0
  164. data/lib/game_dig/node/node_modules/fast-xml-parser/src/fxp.js +14 -0
  165. data/lib/game_dig/node/node_modules/fast-xml-parser/src/ignoreAttributes.js +18 -0
  166. data/lib/game_dig/node/node_modules/fast-xml-parser/src/util.js +68 -0
  167. data/lib/game_dig/node/node_modules/fast-xml-parser/src/v6/CharsSymbol.js +16 -0
  168. data/lib/game_dig/node/node_modules/fast-xml-parser/src/v6/EntitiesParser.js +104 -0
  169. data/lib/game_dig/node/node_modules/fast-xml-parser/src/v6/OptionsBuilder.js +61 -0
  170. data/lib/game_dig/node/node_modules/fast-xml-parser/src/v6/OutputBuilders/BaseOutputBuilder.js +69 -0
  171. data/lib/game_dig/node/node_modules/fast-xml-parser/src/v6/OutputBuilders/JsArrBuilder.js +103 -0
  172. data/lib/game_dig/node/node_modules/fast-xml-parser/src/v6/OutputBuilders/JsMinArrBuilder.js +100 -0
  173. data/lib/game_dig/node/node_modules/fast-xml-parser/src/v6/OutputBuilders/JsObjBuilder.js +154 -0
  174. data/lib/game_dig/node/node_modules/fast-xml-parser/src/v6/OutputBuilders/ParserOptionsBuilder.js +94 -0
  175. data/lib/game_dig/node/node_modules/fast-xml-parser/src/v6/Report.js +0 -0
  176. data/lib/game_dig/node/node_modules/fast-xml-parser/src/v6/TagPath.js +81 -0
  177. data/lib/game_dig/node/node_modules/fast-xml-parser/src/v6/TagPathMatcher.js +13 -0
  178. data/lib/game_dig/node/node_modules/fast-xml-parser/src/v6/XMLParser.js +83 -0
  179. data/lib/game_dig/node/node_modules/fast-xml-parser/src/v6/Xml2JsParser.js +235 -0
  180. data/lib/game_dig/node/node_modules/fast-xml-parser/src/v6/XmlPartReader.js +210 -0
  181. data/lib/game_dig/node/node_modules/fast-xml-parser/src/v6/XmlSpecialTagsReader.js +111 -0
  182. data/lib/game_dig/node/node_modules/fast-xml-parser/src/v6/inputSource/BufferSource.js +116 -0
  183. data/lib/game_dig/node/node_modules/fast-xml-parser/src/v6/inputSource/StringSource.js +121 -0
  184. data/lib/game_dig/node/node_modules/fast-xml-parser/src/v6/valueParsers/EntitiesParser.js +105 -0
  185. data/lib/game_dig/node/node_modules/fast-xml-parser/src/v6/valueParsers/booleanParser.js +22 -0
  186. data/lib/game_dig/node/node_modules/fast-xml-parser/src/v6/valueParsers/booleanParserExt.js +19 -0
  187. data/lib/game_dig/node/node_modules/fast-xml-parser/src/v6/valueParsers/currency.js +38 -0
  188. data/lib/game_dig/node/node_modules/fast-xml-parser/src/v6/valueParsers/join.js +13 -0
  189. data/lib/game_dig/node/node_modules/fast-xml-parser/src/v6/valueParsers/number.js +14 -0
  190. data/lib/game_dig/node/node_modules/fast-xml-parser/src/v6/valueParsers/trim.js +6 -0
  191. data/lib/game_dig/node/node_modules/fast-xml-parser/src/validator.js +425 -0
  192. data/lib/game_dig/node/node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js +285 -0
  193. data/lib/game_dig/node/node_modules/fast-xml-parser/src/xmlbuilder/orderedJs2Xml.js +134 -0
  194. data/lib/game_dig/node/node_modules/fast-xml-parser/src/xmlbuilder/prettifyJs2Xml.js +0 -0
  195. data/lib/game_dig/node/node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js +369 -0
  196. data/lib/game_dig/node/node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js +46 -0
  197. data/lib/game_dig/node/node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js +606 -0
  198. data/lib/game_dig/node/node_modules/fast-xml-parser/src/xmlparser/XMLParser.js +71 -0
  199. data/lib/game_dig/node/node_modules/fast-xml-parser/src/xmlparser/node2json.js +119 -0
  200. data/lib/game_dig/node/node_modules/fast-xml-parser/src/xmlparser/xmlNode.js +40 -0
  201. data/lib/game_dig/node/node_modules/form-data-encoder/@type/FileLike.d.ts +23 -0
  202. data/lib/game_dig/node/node_modules/form-data-encoder/@type/FormDataEncoder.d.ts +169 -0
  203. data/lib/game_dig/node/node_modules/form-data-encoder/@type/FormDataLike.d.ts +40 -0
  204. data/lib/game_dig/node/node_modules/form-data-encoder/@type/index.d.ts +5 -0
  205. data/lib/game_dig/node/node_modules/form-data-encoder/@type/util/Headers.d.ts +8 -0
  206. data/lib/game_dig/node/node_modules/form-data-encoder/@type/util/createBoundary.d.ts +12 -0
  207. data/lib/game_dig/node/node_modules/form-data-encoder/@type/util/escapeName.d.ts +10 -0
  208. data/lib/game_dig/node/node_modules/form-data-encoder/@type/util/getStreamIterator.d.ts +6 -0
  209. data/lib/game_dig/node/node_modules/form-data-encoder/@type/util/isFile.d.ts +34 -0
  210. data/lib/game_dig/node/node_modules/form-data-encoder/@type/util/isFormData.d.ts +7 -0
  211. data/lib/game_dig/node/node_modules/form-data-encoder/@type/util/isFunction.d.ts +6 -0
  212. data/lib/game_dig/node/node_modules/form-data-encoder/@type/util/isPlainObject.d.ts +1 -0
  213. data/lib/game_dig/node/node_modules/form-data-encoder/@type/util/normalizeValue.d.ts +10 -0
  214. data/lib/game_dig/node/node_modules/form-data-encoder/@type/util/proxyHeaders.d.ts +2 -0
  215. data/lib/game_dig/node/node_modules/form-data-encoder/lib/FileLike.js +1 -0
  216. data/lib/game_dig/node/node_modules/form-data-encoder/lib/FormDataEncoder.js +134 -0
  217. data/lib/game_dig/node/node_modules/form-data-encoder/lib/FormDataLike.js +1 -0
  218. data/lib/game_dig/node/node_modules/form-data-encoder/lib/index.js +5 -0
  219. data/lib/game_dig/node/node_modules/form-data-encoder/lib/util/Headers.js +1 -0
  220. data/lib/game_dig/node/node_modules/form-data-encoder/lib/util/createBoundary.js +9 -0
  221. data/lib/game_dig/node/node_modules/form-data-encoder/lib/util/escapeName.js +4 -0
  222. data/lib/game_dig/node/node_modules/form-data-encoder/lib/util/getStreamIterator.js +21 -0
  223. data/lib/game_dig/node/node_modules/form-data-encoder/lib/util/isFile.js +8 -0
  224. data/lib/game_dig/node/node_modules/form-data-encoder/lib/util/isFormData.js +8 -0
  225. data/lib/game_dig/node/node_modules/form-data-encoder/lib/util/isFunction.js +1 -0
  226. data/lib/game_dig/node/node_modules/form-data-encoder/lib/util/isPlainObject.js +12 -0
  227. data/lib/game_dig/node/node_modules/form-data-encoder/lib/util/normalizeValue.js +8 -0
  228. data/lib/game_dig/node/node_modules/form-data-encoder/lib/util/proxyHeaders.js +14 -0
  229. data/lib/game_dig/node/node_modules/form-data-encoder/license +21 -0
  230. data/lib/game_dig/node/node_modules/form-data-encoder/package.json +70 -0
  231. data/lib/game_dig/node/node_modules/form-data-encoder/readme.md +368 -0
  232. data/lib/game_dig/node/node_modules/gamedig/GAMES_LIST.md +563 -0
  233. data/lib/game_dig/node/node_modules/gamedig/LICENSE +21 -0
  234. data/lib/game_dig/node/node_modules/gamedig/README.md +155 -0
  235. data/lib/game_dig/node/node_modules/gamedig/bin/gamedig.js +64 -0
  236. data/lib/game_dig/node/node_modules/gamedig/dist/index.cjs +18075 -0
  237. data/lib/game_dig/node/node_modules/gamedig/lib/DnsResolver.js +80 -0
  238. data/lib/game_dig/node/node_modules/gamedig/lib/GlobalUdpSocket.js +69 -0
  239. data/lib/game_dig/node/node_modules/gamedig/lib/HexUtil.js +20 -0
  240. data/lib/game_dig/node/node_modules/gamedig/lib/Logger.js +45 -0
  241. data/lib/game_dig/node/node_modules/gamedig/lib/Promises.js +18 -0
  242. data/lib/game_dig/node/node_modules/gamedig/lib/ProtocolResolver.js +7 -0
  243. data/lib/game_dig/node/node_modules/gamedig/lib/QueryRunner.js +122 -0
  244. data/lib/game_dig/node/node_modules/gamedig/lib/Results.js +36 -0
  245. data/lib/game_dig/node/node_modules/gamedig/lib/game-resolver.js +27 -0
  246. data/lib/game_dig/node/node_modules/gamedig/lib/gamedig.js +23 -0
  247. data/lib/game_dig/node/node_modules/gamedig/lib/games.js +3458 -0
  248. data/lib/game_dig/node/node_modules/gamedig/lib/index.js +5 -0
  249. data/lib/game_dig/node/node_modules/gamedig/lib/reader.js +172 -0
  250. data/lib/game_dig/node/node_modules/gamedig/node_modules/.bin/fxparser +1 -0
  251. data/lib/game_dig/node/node_modules/gamedig/node_modules/.bin/seek-bunzip +1 -0
  252. data/lib/game_dig/node/node_modules/gamedig/node_modules/.bin/seek-table +1 -0
  253. data/lib/game_dig/node/node_modules/gamedig/package.json +80 -0
  254. data/lib/game_dig/node/node_modules/gamedig/protocols/altvmp.js +63 -0
  255. data/lib/game_dig/node/node_modules/gamedig/protocols/armagetron.js +65 -0
  256. data/lib/game_dig/node/node_modules/gamedig/protocols/asa.js +18 -0
  257. data/lib/game_dig/node/node_modules/gamedig/protocols/ase.js +45 -0
  258. data/lib/game_dig/node/node_modules/gamedig/protocols/assettocorsa.js +41 -0
  259. data/lib/game_dig/node/node_modules/gamedig/protocols/battlefield.js +167 -0
  260. data/lib/game_dig/node/node_modules/gamedig/protocols/beammp.js +46 -0
  261. data/lib/game_dig/node/node_modules/gamedig/protocols/beammpmaster.js +17 -0
  262. data/lib/game_dig/node/node_modules/gamedig/protocols/brokeprotocol.js +13 -0
  263. data/lib/game_dig/node/node_modules/gamedig/protocols/brokeprotocolmaster.js +418 -0
  264. data/lib/game_dig/node/node_modules/gamedig/protocols/buildandshoot.js +42 -0
  265. data/lib/game_dig/node/node_modules/gamedig/protocols/core.js +369 -0
  266. data/lib/game_dig/node/node_modules/gamedig/protocols/cs2d.js +65 -0
  267. data/lib/game_dig/node/node_modules/gamedig/protocols/dayz.js +196 -0
  268. data/lib/game_dig/node/node_modules/gamedig/protocols/discord.js +29 -0
  269. data/lib/game_dig/node/node_modules/gamedig/protocols/doom3.js +149 -0
  270. data/lib/game_dig/node/node_modules/gamedig/protocols/eco.js +22 -0
  271. data/lib/game_dig/node/node_modules/gamedig/protocols/eldewrito.js +22 -0
  272. data/lib/game_dig/node/node_modules/gamedig/protocols/epic.js +153 -0
  273. data/lib/game_dig/node/node_modules/gamedig/protocols/factorio.js +24 -0
  274. data/lib/game_dig/node/node_modules/gamedig/protocols/farmingsimulator.js +69 -0
  275. data/lib/game_dig/node/node_modules/gamedig/protocols/ffow.js +38 -0
  276. data/lib/game_dig/node/node_modules/gamedig/protocols/fivem.js +35 -0
  277. data/lib/game_dig/node/node_modules/gamedig/protocols/gamespy1.js +182 -0
  278. data/lib/game_dig/node/node_modules/gamedig/protocols/gamespy2.js +142 -0
  279. data/lib/game_dig/node/node_modules/gamedig/protocols/gamespy3.js +198 -0
  280. data/lib/game_dig/node/node_modules/gamedig/protocols/geneshift.js +46 -0
  281. data/lib/game_dig/node/node_modules/gamedig/protocols/goldsrc.js +8 -0
  282. data/lib/game_dig/node/node_modules/gamedig/protocols/gtasao.js +8 -0
  283. data/lib/game_dig/node/node_modules/gamedig/protocols/hawakening.js +13 -0
  284. data/lib/game_dig/node/node_modules/gamedig/protocols/hawakeningmaster.js +718 -0
  285. data/lib/game_dig/node/node_modules/gamedig/protocols/hexen2.js +14 -0
  286. data/lib/game_dig/node/node_modules/gamedig/protocols/index.js +85 -0
  287. data/lib/game_dig/node/node_modules/gamedig/protocols/jc2mp.js +18 -0
  288. data/lib/game_dig/node/node_modules/gamedig/protocols/kspdmp.js +28 -0
  289. data/lib/game_dig/node/node_modules/gamedig/protocols/mafia2mp.js +42 -0
  290. data/lib/game_dig/node/node_modules/gamedig/protocols/mafia2online.js +9 -0
  291. data/lib/game_dig/node/node_modules/gamedig/protocols/minecraft.js +107 -0
  292. data/lib/game_dig/node/node_modules/gamedig/protocols/minecraftbedrock.js +73 -0
  293. data/lib/game_dig/node/node_modules/gamedig/protocols/minecraftvanilla.js +86 -0
  294. data/lib/game_dig/node/node_modules/gamedig/protocols/minetest.js +39 -0
  295. data/lib/game_dig/node/node_modules/gamedig/protocols/mumble.js +39 -0
  296. data/lib/game_dig/node/node_modules/gamedig/protocols/mumbleping.js +25 -0
  297. data/lib/game_dig/node/node_modules/gamedig/protocols/nadeo.js +85 -0
  298. data/lib/game_dig/node/node_modules/gamedig/protocols/openttd.js +164 -0
  299. data/lib/game_dig/node/node_modules/gamedig/protocols/palworld.js +32 -0
  300. data/lib/game_dig/node/node_modules/gamedig/protocols/quake1.js +14 -0
  301. data/lib/game_dig/node/node_modules/gamedig/protocols/quake2.js +90 -0
  302. data/lib/game_dig/node/node_modules/gamedig/protocols/quake3.js +28 -0
  303. data/lib/game_dig/node/node_modules/gamedig/protocols/ragemp.js +49 -0
  304. data/lib/game_dig/node/node_modules/gamedig/protocols/renegadex.js +232 -0
  305. data/lib/game_dig/node/node_modules/gamedig/protocols/renegadexmaster.js +21 -0
  306. data/lib/game_dig/node/node_modules/gamedig/protocols/renown.js +20 -0
  307. data/lib/game_dig/node/node_modules/gamedig/protocols/rfactor.js +69 -0
  308. data/lib/game_dig/node/node_modules/gamedig/protocols/samp.js +105 -0
  309. data/lib/game_dig/node/node_modules/gamedig/protocols/satisfactory.js +106 -0
  310. data/lib/game_dig/node/node_modules/gamedig/protocols/savage2.js +25 -0
  311. data/lib/game_dig/node/node_modules/gamedig/protocols/scpsl.js +54 -0
  312. data/lib/game_dig/node/node_modules/gamedig/protocols/sdtd.js +109 -0
  313. data/lib/game_dig/node/node_modules/gamedig/protocols/soldat.js +45 -0
  314. data/lib/game_dig/node/node_modules/gamedig/protocols/squad.js +20 -0
  315. data/lib/game_dig/node/node_modules/gamedig/protocols/starmade.js +67 -0
  316. data/lib/game_dig/node/node_modules/gamedig/protocols/starsiege.js +10 -0
  317. data/lib/game_dig/node/node_modules/gamedig/protocols/teamspeak2.js +72 -0
  318. data/lib/game_dig/node/node_modules/gamedig/protocols/teamspeak3.js +70 -0
  319. data/lib/game_dig/node/node_modules/gamedig/protocols/terraria.js +27 -0
  320. data/lib/game_dig/node/node_modules/gamedig/protocols/theisleevrima.js +19 -0
  321. data/lib/game_dig/node/node_modules/gamedig/protocols/toxikk.js +122 -0
  322. data/lib/game_dig/node/node_modules/gamedig/protocols/tribes1.js +153 -0
  323. data/lib/game_dig/node/node_modules/gamedig/protocols/tribes1master.js +80 -0
  324. data/lib/game_dig/node/node_modules/gamedig/protocols/unreal2.js +151 -0
  325. data/lib/game_dig/node/node_modules/gamedig/protocols/ut3.js +45 -0
  326. data/lib/game_dig/node/node_modules/gamedig/protocols/valve.js +472 -0
  327. data/lib/game_dig/node/node_modules/gamedig/protocols/vcmp.js +10 -0
  328. data/lib/game_dig/node/node_modules/gamedig/protocols/ventrilo.js +238 -0
  329. data/lib/game_dig/node/node_modules/gamedig/protocols/vintagestory.js +24 -0
  330. data/lib/game_dig/node/node_modules/gamedig/protocols/vintagestorymaster.js +17 -0
  331. data/lib/game_dig/node/node_modules/gamedig/protocols/warsow.js +13 -0
  332. data/lib/game_dig/node/node_modules/gamedig/protocols/xonotic.js +16 -0
  333. data/lib/game_dig/node/node_modules/gbxremote/.editorconfig +15 -0
  334. data/lib/game_dig/node/node_modules/gbxremote/.npmignore +5 -0
  335. data/lib/game_dig/node/node_modules/gbxremote/LICENSE +23 -0
  336. data/lib/game_dig/node/node_modules/gbxremote/README.md +196 -0
  337. data/lib/game_dig/node/node_modules/gbxremote/lib/client.js +214 -0
  338. data/lib/game_dig/node/node_modules/gbxremote/lib/gbxremote.js +18 -0
  339. data/lib/game_dig/node/node_modules/gbxremote/package.json +55 -0
  340. data/lib/game_dig/node/node_modules/get-stream/buffer-stream.js +52 -0
  341. data/lib/game_dig/node/node_modules/get-stream/index.d.ts +105 -0
  342. data/lib/game_dig/node/node_modules/get-stream/index.js +61 -0
  343. data/lib/game_dig/node/node_modules/get-stream/license +9 -0
  344. data/lib/game_dig/node/node_modules/get-stream/package.json +47 -0
  345. data/lib/game_dig/node/node_modules/get-stream/readme.md +124 -0
  346. data/lib/game_dig/node/node_modules/got/dist/source/as-promise/index.d.ts +3 -0
  347. data/lib/game_dig/node/node_modules/got/dist/source/as-promise/index.js +158 -0
  348. data/lib/game_dig/node/node_modules/got/dist/source/as-promise/types.d.ts +38 -0
  349. data/lib/game_dig/node/node_modules/got/dist/source/as-promise/types.js +17 -0
  350. data/lib/game_dig/node/node_modules/got/dist/source/core/calculate-retry-delay.d.ts +4 -0
  351. data/lib/game_dig/node/node_modules/got/dist/source/core/calculate-retry-delay.js +29 -0
  352. data/lib/game_dig/node/node_modules/got/dist/source/core/errors.d.ts +90 -0
  353. data/lib/game_dig/node/node_modules/got/dist/source/core/errors.js +178 -0
  354. data/lib/game_dig/node/node_modules/got/dist/source/core/index.d.ts +190 -0
  355. data/lib/game_dig/node/node_modules/got/dist/source/core/index.js +1126 -0
  356. data/lib/game_dig/node/node_modules/got/dist/source/core/options.d.ts +1253 -0
  357. data/lib/game_dig/node/node_modules/got/dist/source/core/options.js +1653 -0
  358. data/lib/game_dig/node/node_modules/got/dist/source/core/parse-link-header.d.ts +4 -0
  359. data/lib/game_dig/node/node_modules/got/dist/source/core/parse-link-header.js +33 -0
  360. data/lib/game_dig/node/node_modules/got/dist/source/core/response.d.ts +109 -0
  361. data/lib/game_dig/node/node_modules/got/dist/source/core/response.js +39 -0
  362. data/lib/game_dig/node/node_modules/got/dist/source/core/timed-out.d.ts +30 -0
  363. data/lib/game_dig/node/node_modules/got/dist/source/core/timed-out.js +138 -0
  364. data/lib/game_dig/node/node_modules/got/dist/source/core/utils/get-body-size.d.ts +3 -0
  365. data/lib/game_dig/node/node_modules/got/dist/source/core/utils/get-body-size.js +22 -0
  366. data/lib/game_dig/node/node_modules/got/dist/source/core/utils/is-client-request.d.ts +5 -0
  367. data/lib/game_dig/node/node_modules/got/dist/source/core/utils/is-client-request.js +4 -0
  368. data/lib/game_dig/node/node_modules/got/dist/source/core/utils/is-form-data.d.ts +8 -0
  369. data/lib/game_dig/node/node_modules/got/dist/source/core/utils/is-form-data.js +4 -0
  370. data/lib/game_dig/node/node_modules/got/dist/source/core/utils/is-unix-socket-url.d.ts +2 -0
  371. data/lib/game_dig/node/node_modules/got/dist/source/core/utils/is-unix-socket-url.js +4 -0
  372. data/lib/game_dig/node/node_modules/got/dist/source/core/utils/options-to-url.d.ts +13 -0
  373. data/lib/game_dig/node/node_modules/got/dist/source/core/utils/options-to-url.js +48 -0
  374. data/lib/game_dig/node/node_modules/got/dist/source/core/utils/proxy-events.d.ts +3 -0
  375. data/lib/game_dig/node/node_modules/got/dist/source/core/utils/proxy-events.js +15 -0
  376. data/lib/game_dig/node/node_modules/got/dist/source/core/utils/unhandle.d.ts +11 -0
  377. data/lib/game_dig/node/node_modules/got/dist/source/core/utils/unhandle.js +20 -0
  378. data/lib/game_dig/node/node_modules/got/dist/source/core/utils/url-to-options.d.ts +15 -0
  379. data/lib/game_dig/node/node_modules/got/dist/source/core/utils/url-to-options.js +22 -0
  380. data/lib/game_dig/node/node_modules/got/dist/source/core/utils/weakable-map.d.ts +8 -0
  381. data/lib/game_dig/node/node_modules/got/dist/source/core/utils/weakable-map.js +38 -0
  382. data/lib/game_dig/node/node_modules/got/dist/source/create.d.ts +3 -0
  383. data/lib/game_dig/node/node_modules/got/dist/source/create.js +187 -0
  384. data/lib/game_dig/node/node_modules/got/dist/source/index.d.ts +15 -0
  385. data/lib/game_dig/node/node_modules/got/dist/source/index.js +20 -0
  386. data/lib/game_dig/node/node_modules/got/dist/source/types.d.ts +262 -0
  387. data/lib/game_dig/node/node_modules/got/dist/source/types.js +1 -0
  388. data/lib/game_dig/node/node_modules/got/license +9 -0
  389. data/lib/game_dig/node/node_modules/got/package.json +155 -0
  390. data/lib/game_dig/node/node_modules/got/readme.md +527 -0
  391. data/lib/game_dig/node/node_modules/http-cache-semantics/LICENSE +9 -0
  392. data/lib/game_dig/node/node_modules/http-cache-semantics/README.md +268 -0
  393. data/lib/game_dig/node/node_modules/http-cache-semantics/index.js +928 -0
  394. data/lib/game_dig/node/node_modules/http-cache-semantics/package.json +22 -0
  395. data/lib/game_dig/node/node_modules/http2-wrapper/LICENSE +21 -0
  396. data/lib/game_dig/node/node_modules/http2-wrapper/README.md +459 -0
  397. data/lib/game_dig/node/node_modules/http2-wrapper/index.d.ts +141 -0
  398. data/lib/game_dig/node/node_modules/http2-wrapper/package.json +81 -0
  399. data/lib/game_dig/node/node_modules/http2-wrapper/source/agent.js +796 -0
  400. data/lib/game_dig/node/node_modules/http2-wrapper/source/auto.js +225 -0
  401. data/lib/game_dig/node/node_modules/http2-wrapper/source/client-request.js +563 -0
  402. data/lib/game_dig/node/node_modules/http2-wrapper/source/incoming-message.js +73 -0
  403. data/lib/game_dig/node/node_modules/http2-wrapper/source/index.js +50 -0
  404. data/lib/game_dig/node/node_modules/http2-wrapper/source/proxies/get-auth-headers.js +17 -0
  405. data/lib/game_dig/node/node_modules/http2-wrapper/source/proxies/h1-over-h2.js +90 -0
  406. data/lib/game_dig/node/node_modules/http2-wrapper/source/proxies/h2-over-h1.js +48 -0
  407. data/lib/game_dig/node/node_modules/http2-wrapper/source/proxies/h2-over-h2.js +32 -0
  408. data/lib/game_dig/node/node_modules/http2-wrapper/source/proxies/h2-over-hx.js +40 -0
  409. data/lib/game_dig/node/node_modules/http2-wrapper/source/proxies/initialize.js +21 -0
  410. data/lib/game_dig/node/node_modules/http2-wrapper/source/proxies/unexpected-status-code-error.js +11 -0
  411. data/lib/game_dig/node/node_modules/http2-wrapper/source/utils/calculate-server-name.js +29 -0
  412. data/lib/game_dig/node/node_modules/http2-wrapper/source/utils/check-type.js +20 -0
  413. data/lib/game_dig/node/node_modules/http2-wrapper/source/utils/delay-async-destroy.js +33 -0
  414. data/lib/game_dig/node/node_modules/http2-wrapper/source/utils/errors.js +51 -0
  415. data/lib/game_dig/node/node_modules/http2-wrapper/source/utils/is-request-pseudo-header.js +13 -0
  416. data/lib/game_dig/node/node_modules/http2-wrapper/source/utils/js-stream-socket.js +8 -0
  417. data/lib/game_dig/node/node_modules/http2-wrapper/source/utils/proxy-events.js +7 -0
  418. data/lib/game_dig/node/node_modules/http2-wrapper/source/utils/proxy-socket-handler.js +102 -0
  419. data/lib/game_dig/node/node_modules/http2-wrapper/source/utils/validate-header-name.js +11 -0
  420. data/lib/game_dig/node/node_modules/http2-wrapper/source/utils/validate-header-value.js +17 -0
  421. data/lib/game_dig/node/node_modules/iconv-lite/Changelog.md +236 -0
  422. data/lib/game_dig/node/node_modules/iconv-lite/LICENSE +21 -0
  423. data/lib/game_dig/node/node_modules/iconv-lite/README.md +138 -0
  424. data/lib/game_dig/node/node_modules/iconv-lite/encodings/dbcs-codec.js +532 -0
  425. data/lib/game_dig/node/node_modules/iconv-lite/encodings/dbcs-data.js +185 -0
  426. data/lib/game_dig/node/node_modules/iconv-lite/encodings/index.js +23 -0
  427. data/lib/game_dig/node/node_modules/iconv-lite/encodings/internal.js +218 -0
  428. data/lib/game_dig/node/node_modules/iconv-lite/encodings/sbcs-codec.js +75 -0
  429. data/lib/game_dig/node/node_modules/iconv-lite/encodings/sbcs-data-generated.js +451 -0
  430. data/lib/game_dig/node/node_modules/iconv-lite/encodings/sbcs-data.js +178 -0
  431. data/lib/game_dig/node/node_modules/iconv-lite/encodings/tables/big5-added.json +122 -0
  432. data/lib/game_dig/node/node_modules/iconv-lite/encodings/tables/cp936.json +264 -0
  433. data/lib/game_dig/node/node_modules/iconv-lite/encodings/tables/cp949.json +273 -0
  434. data/lib/game_dig/node/node_modules/iconv-lite/encodings/tables/cp950.json +177 -0
  435. data/lib/game_dig/node/node_modules/iconv-lite/encodings/tables/eucjp.json +182 -0
  436. data/lib/game_dig/node/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +1 -0
  437. data/lib/game_dig/node/node_modules/iconv-lite/encodings/tables/gbk-added.json +56 -0
  438. data/lib/game_dig/node/node_modules/iconv-lite/encodings/tables/shiftjis.json +125 -0
  439. data/lib/game_dig/node/node_modules/iconv-lite/encodings/utf16.js +187 -0
  440. data/lib/game_dig/node/node_modules/iconv-lite/encodings/utf32.js +307 -0
  441. data/lib/game_dig/node/node_modules/iconv-lite/encodings/utf7.js +283 -0
  442. data/lib/game_dig/node/node_modules/iconv-lite/lib/bom-handling.js +48 -0
  443. data/lib/game_dig/node/node_modules/iconv-lite/lib/helpers/merge-exports.js +13 -0
  444. data/lib/game_dig/node/node_modules/iconv-lite/lib/index.d.ts +41 -0
  445. data/lib/game_dig/node/node_modules/iconv-lite/lib/index.js +183 -0
  446. data/lib/game_dig/node/node_modules/iconv-lite/lib/streams.js +105 -0
  447. data/lib/game_dig/node/node_modules/iconv-lite/package.json +59 -0
  448. data/lib/game_dig/node/node_modules/inherits/LICENSE +16 -0
  449. data/lib/game_dig/node/node_modules/inherits/README.md +42 -0
  450. data/lib/game_dig/node/node_modules/inherits/inherits.js +9 -0
  451. data/lib/game_dig/node/node_modules/inherits/inherits_browser.js +27 -0
  452. data/lib/game_dig/node/node_modules/inherits/package.json +29 -0
  453. data/lib/game_dig/node/node_modules/isarray/README.md +54 -0
  454. data/lib/game_dig/node/node_modules/isarray/build/build.js +209 -0
  455. data/lib/game_dig/node/node_modules/isarray/component.json +19 -0
  456. data/lib/game_dig/node/node_modules/isarray/index.js +3 -0
  457. data/lib/game_dig/node/node_modules/isarray/package.json +25 -0
  458. data/lib/game_dig/node/node_modules/json-buffer/.travis.yml +3 -0
  459. data/lib/game_dig/node/node_modules/json-buffer/LICENSE +22 -0
  460. data/lib/game_dig/node/node_modules/json-buffer/README.md +24 -0
  461. data/lib/game_dig/node/node_modules/json-buffer/index.js +58 -0
  462. data/lib/game_dig/node/node_modules/json-buffer/package.json +34 -0
  463. data/lib/game_dig/node/node_modules/json-buffer/test/index.js +63 -0
  464. data/lib/game_dig/node/node_modules/keyv/README.md +429 -0
  465. data/lib/game_dig/node/node_modules/keyv/package.json +57 -0
  466. data/lib/game_dig/node/node_modules/keyv/src/index.d.ts +112 -0
  467. data/lib/game_dig/node/node_modules/keyv/src/index.js +259 -0
  468. data/lib/game_dig/node/node_modules/long/LICENSE +202 -0
  469. data/lib/game_dig/node/node_modules/long/README.md +286 -0
  470. data/lib/game_dig/node/node_modules/long/index.d.ts +2 -0
  471. data/lib/game_dig/node/node_modules/long/index.js +1581 -0
  472. data/lib/game_dig/node/node_modules/long/package.json +58 -0
  473. data/lib/game_dig/node/node_modules/long/types.d.ts +474 -0
  474. data/lib/game_dig/node/node_modules/long/umd/index.d.ts +3 -0
  475. data/lib/game_dig/node/node_modules/long/umd/index.js +1622 -0
  476. data/lib/game_dig/node/node_modules/long/umd/package.json +3 -0
  477. data/lib/game_dig/node/node_modules/long/umd/types.d.ts +474 -0
  478. data/lib/game_dig/node/node_modules/lowercase-keys/index.d.ts +14 -0
  479. data/lib/game_dig/node/node_modules/lowercase-keys/index.js +3 -0
  480. data/lib/game_dig/node/node_modules/lowercase-keys/license +9 -0
  481. data/lib/game_dig/node/node_modules/lowercase-keys/package.json +41 -0
  482. data/lib/game_dig/node/node_modules/lowercase-keys/readme.md +32 -0
  483. data/lib/game_dig/node/node_modules/mimic-response/index.d.ts +17 -0
  484. data/lib/game_dig/node/node_modules/mimic-response/index.js +77 -0
  485. data/lib/game_dig/node/node_modules/mimic-response/license +9 -0
  486. data/lib/game_dig/node/node_modules/mimic-response/package.json +42 -0
  487. data/lib/game_dig/node/node_modules/mimic-response/readme.md +78 -0
  488. data/lib/game_dig/node/node_modules/minimist/.eslintrc +29 -0
  489. data/lib/game_dig/node/node_modules/minimist/.github/FUNDING.yml +12 -0
  490. data/lib/game_dig/node/node_modules/minimist/.nycrc +14 -0
  491. data/lib/game_dig/node/node_modules/minimist/CHANGELOG.md +298 -0
  492. data/lib/game_dig/node/node_modules/minimist/LICENSE +18 -0
  493. data/lib/game_dig/node/node_modules/minimist/README.md +121 -0
  494. data/lib/game_dig/node/node_modules/minimist/example/parse.js +4 -0
  495. data/lib/game_dig/node/node_modules/minimist/index.js +263 -0
  496. data/lib/game_dig/node/node_modules/minimist/package.json +75 -0
  497. data/lib/game_dig/node/node_modules/minimist/test/all_bool.js +34 -0
  498. data/lib/game_dig/node/node_modules/minimist/test/bool.js +177 -0
  499. data/lib/game_dig/node/node_modules/minimist/test/dash.js +43 -0
  500. data/lib/game_dig/node/node_modules/minimist/test/default_bool.js +37 -0
  501. data/lib/game_dig/node/node_modules/minimist/test/dotted.js +24 -0
  502. data/lib/game_dig/node/node_modules/minimist/test/kv_short.js +32 -0
  503. data/lib/game_dig/node/node_modules/minimist/test/long.js +33 -0
  504. data/lib/game_dig/node/node_modules/minimist/test/num.js +38 -0
  505. data/lib/game_dig/node/node_modules/minimist/test/parse.js +209 -0
  506. data/lib/game_dig/node/node_modules/minimist/test/parse_modified.js +11 -0
  507. data/lib/game_dig/node/node_modules/minimist/test/proto.js +64 -0
  508. data/lib/game_dig/node/node_modules/minimist/test/short.js +69 -0
  509. data/lib/game_dig/node/node_modules/minimist/test/stop_early.js +17 -0
  510. data/lib/game_dig/node/node_modules/minimist/test/unknown.js +104 -0
  511. data/lib/game_dig/node/node_modules/minimist/test/whitespace.js +10 -0
  512. data/lib/game_dig/node/node_modules/net/LICENSE +19 -0
  513. data/lib/game_dig/node/node_modules/net/README.md +0 -0
  514. data/lib/game_dig/node/node_modules/net/index.js +28 -0
  515. data/lib/game_dig/node/node_modules/net/package.json +17 -0
  516. data/lib/game_dig/node/node_modules/net/test.js +6 -0
  517. data/lib/game_dig/node/node_modules/normalize-url/index.d.ts +342 -0
  518. data/lib/game_dig/node/node_modules/normalize-url/index.js +308 -0
  519. data/lib/game_dig/node/node_modules/normalize-url/license +9 -0
  520. data/lib/game_dig/node/node_modules/normalize-url/package.json +57 -0
  521. data/lib/game_dig/node/node_modules/normalize-url/readme.md +347 -0
  522. data/lib/game_dig/node/node_modules/p-cancelable/index.d.ts +168 -0
  523. data/lib/game_dig/node/node_modules/p-cancelable/index.js +110 -0
  524. data/lib/game_dig/node/node_modules/p-cancelable/license +9 -0
  525. data/lib/game_dig/node/node_modules/p-cancelable/package.json +50 -0
  526. data/lib/game_dig/node/node_modules/p-cancelable/readme.md +152 -0
  527. data/lib/game_dig/node/node_modules/process-nextick-args/index.js +45 -0
  528. data/lib/game_dig/node/node_modules/process-nextick-args/license.md +19 -0
  529. data/lib/game_dig/node/node_modules/process-nextick-args/package.json +25 -0
  530. data/lib/game_dig/node/node_modules/process-nextick-args/readme.md +18 -0
  531. data/lib/game_dig/node/node_modules/quick-lru/index.d.ts +97 -0
  532. data/lib/game_dig/node/node_modules/quick-lru/index.js +123 -0
  533. data/lib/game_dig/node/node_modules/quick-lru/license +9 -0
  534. data/lib/game_dig/node/node_modules/quick-lru/package.json +43 -0
  535. data/lib/game_dig/node/node_modules/quick-lru/readme.md +111 -0
  536. data/lib/game_dig/node/node_modules/readable-stream/.travis.yml +34 -0
  537. data/lib/game_dig/node/node_modules/readable-stream/CONTRIBUTING.md +38 -0
  538. data/lib/game_dig/node/node_modules/readable-stream/GOVERNANCE.md +136 -0
  539. data/lib/game_dig/node/node_modules/readable-stream/LICENSE +47 -0
  540. data/lib/game_dig/node/node_modules/readable-stream/README.md +58 -0
  541. data/lib/game_dig/node/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md +60 -0
  542. data/lib/game_dig/node/node_modules/readable-stream/duplex-browser.js +1 -0
  543. data/lib/game_dig/node/node_modules/readable-stream/duplex.js +1 -0
  544. data/lib/game_dig/node/node_modules/readable-stream/lib/_stream_duplex.js +131 -0
  545. data/lib/game_dig/node/node_modules/readable-stream/lib/_stream_passthrough.js +47 -0
  546. data/lib/game_dig/node/node_modules/readable-stream/lib/_stream_readable.js +1019 -0
  547. data/lib/game_dig/node/node_modules/readable-stream/lib/_stream_transform.js +214 -0
  548. data/lib/game_dig/node/node_modules/readable-stream/lib/_stream_writable.js +685 -0
  549. data/lib/game_dig/node/node_modules/readable-stream/lib/internal/streams/BufferList.js +78 -0
  550. data/lib/game_dig/node/node_modules/readable-stream/lib/internal/streams/destroy.js +84 -0
  551. data/lib/game_dig/node/node_modules/readable-stream/lib/internal/streams/stream-browser.js +1 -0
  552. data/lib/game_dig/node/node_modules/readable-stream/lib/internal/streams/stream.js +1 -0
  553. data/lib/game_dig/node/node_modules/readable-stream/node_modules/isarray/.npmignore +1 -0
  554. data/lib/game_dig/node/node_modules/readable-stream/node_modules/isarray/.travis.yml +4 -0
  555. data/lib/game_dig/node/node_modules/readable-stream/node_modules/isarray/Makefile +6 -0
  556. data/lib/game_dig/node/node_modules/readable-stream/node_modules/isarray/README.md +60 -0
  557. data/lib/game_dig/node/node_modules/readable-stream/node_modules/isarray/component.json +19 -0
  558. data/lib/game_dig/node/node_modules/readable-stream/node_modules/isarray/index.js +5 -0
  559. data/lib/game_dig/node/node_modules/readable-stream/node_modules/isarray/package.json +45 -0
  560. data/lib/game_dig/node/node_modules/readable-stream/node_modules/isarray/test.js +20 -0
  561. data/lib/game_dig/node/node_modules/readable-stream/node_modules/string_decoder/.travis.yml +50 -0
  562. data/lib/game_dig/node/node_modules/readable-stream/node_modules/string_decoder/LICENSE +48 -0
  563. data/lib/game_dig/node/node_modules/readable-stream/node_modules/string_decoder/README.md +47 -0
  564. data/lib/game_dig/node/node_modules/readable-stream/node_modules/string_decoder/lib/string_decoder.js +296 -0
  565. data/lib/game_dig/node/node_modules/readable-stream/node_modules/string_decoder/package.json +31 -0
  566. data/lib/game_dig/node/node_modules/readable-stream/package.json +52 -0
  567. data/lib/game_dig/node/node_modules/readable-stream/passthrough.js +1 -0
  568. data/lib/game_dig/node/node_modules/readable-stream/readable-browser.js +7 -0
  569. data/lib/game_dig/node/node_modules/readable-stream/readable.js +19 -0
  570. data/lib/game_dig/node/node_modules/readable-stream/transform.js +1 -0
  571. data/lib/game_dig/node/node_modules/readable-stream/writable-browser.js +1 -0
  572. data/lib/game_dig/node/node_modules/readable-stream/writable.js +8 -0
  573. data/lib/game_dig/node/node_modules/resolve-alpn/LICENSE +22 -0
  574. data/lib/game_dig/node/node_modules/resolve-alpn/README.md +60 -0
  575. data/lib/game_dig/node/node_modules/resolve-alpn/index.js +43 -0
  576. data/lib/game_dig/node/node_modules/resolve-alpn/package.json +34 -0
  577. data/lib/game_dig/node/node_modules/responselike/LICENSE +19 -0
  578. data/lib/game_dig/node/node_modules/responselike/README.md +77 -0
  579. data/lib/game_dig/node/node_modules/responselike/index.d.ts +86 -0
  580. data/lib/game_dig/node/node_modules/responselike/index.js +39 -0
  581. data/lib/game_dig/node/node_modules/responselike/license +10 -0
  582. data/lib/game_dig/node/node_modules/responselike/package.json +39 -0
  583. data/lib/game_dig/node/node_modules/responselike/readme.md +75 -0
  584. data/lib/game_dig/node/node_modules/safe-buffer/LICENSE +21 -0
  585. data/lib/game_dig/node/node_modules/safe-buffer/README.md +584 -0
  586. data/lib/game_dig/node/node_modules/safe-buffer/index.d.ts +187 -0
  587. data/lib/game_dig/node/node_modules/safe-buffer/index.js +62 -0
  588. data/lib/game_dig/node/node_modules/safe-buffer/package.json +37 -0
  589. data/lib/game_dig/node/node_modules/safer-buffer/LICENSE +21 -0
  590. data/lib/game_dig/node/node_modules/safer-buffer/Porting-Buffer.md +268 -0
  591. data/lib/game_dig/node/node_modules/safer-buffer/Readme.md +156 -0
  592. data/lib/game_dig/node/node_modules/safer-buffer/dangerous.js +58 -0
  593. data/lib/game_dig/node/node_modules/safer-buffer/package.json +34 -0
  594. data/lib/game_dig/node/node_modules/safer-buffer/safer.js +77 -0
  595. data/lib/game_dig/node/node_modules/safer-buffer/tests.js +406 -0
  596. data/lib/game_dig/node/node_modules/sax/LICENSE +41 -0
  597. data/lib/game_dig/node/node_modules/sax/README.md +225 -0
  598. data/lib/game_dig/node/node_modules/sax/lib/sax.js +1565 -0
  599. data/lib/game_dig/node/node_modules/sax/package.json +25 -0
  600. data/lib/game_dig/node/node_modules/seek-bzip/LICENSE +26 -0
  601. data/lib/game_dig/node/node_modules/seek-bzip/README.md +185 -0
  602. data/lib/game_dig/node/node_modules/seek-bzip/bin/seek-bunzip +129 -0
  603. data/lib/game_dig/node/node_modules/seek-bzip/bin/seek-bzip-table +71 -0
  604. data/lib/game_dig/node/node_modules/seek-bzip/lib/bitreader.js +94 -0
  605. data/lib/game_dig/node/node_modules/seek-bzip/lib/crc32.js +104 -0
  606. data/lib/game_dig/node/node_modules/seek-bzip/lib/index.js +605 -0
  607. data/lib/game_dig/node/node_modules/seek-bzip/lib/stream.js +42 -0
  608. data/lib/game_dig/node/node_modules/seek-bzip/package.json +34 -0
  609. data/lib/game_dig/node/node_modules/stream/.npmignore +3 -0
  610. data/lib/game_dig/node/node_modules/stream/Makefile +11 -0
  611. data/lib/game_dig/node/node_modules/stream/README.md +59 -0
  612. data/lib/game_dig/node/node_modules/stream/component.json +19 -0
  613. data/lib/game_dig/node/node_modules/stream/index.js +115 -0
  614. data/lib/game_dig/node/node_modules/stream/package.json +25 -0
  615. data/lib/game_dig/node/node_modules/stream/test.html +173 -0
  616. data/lib/game_dig/node/node_modules/string-to-stream/LICENSE +20 -0
  617. data/lib/game_dig/node/node_modules/string-to-stream/README.md +34 -0
  618. data/lib/game_dig/node/node_modules/string-to-stream/index.js +23 -0
  619. data/lib/game_dig/node/node_modules/string-to-stream/package.json +53 -0
  620. data/lib/game_dig/node/node_modules/string_decoder/.npmignore +2 -0
  621. data/lib/game_dig/node/node_modules/string_decoder/LICENSE +20 -0
  622. data/lib/game_dig/node/node_modules/string_decoder/README.md +7 -0
  623. data/lib/game_dig/node/node_modules/string_decoder/index.js +221 -0
  624. data/lib/game_dig/node/node_modules/string_decoder/package.json +25 -0
  625. data/lib/game_dig/node/node_modules/strnum/.github/SECURITY.md +5 -0
  626. data/lib/game_dig/node/node_modules/strnum/.vscode/launch.json +25 -0
  627. data/lib/game_dig/node/node_modules/strnum/CHANGELOG.md +33 -0
  628. data/lib/game_dig/node/node_modules/strnum/LICENSE +21 -0
  629. data/lib/game_dig/node/node_modules/strnum/README.md +97 -0
  630. data/lib/game_dig/node/node_modules/strnum/algo.stflow +84 -0
  631. data/lib/game_dig/node/node_modules/strnum/package.json +31 -0
  632. data/lib/game_dig/node/node_modules/strnum/strnum.js +129 -0
  633. data/lib/game_dig/node/node_modules/strnum/strnum.test.js +173 -0
  634. data/lib/game_dig/node/node_modules/strnum/test.js +9 -0
  635. data/lib/game_dig/node/node_modules/telnet-client/LICENSE +8 -0
  636. data/lib/game_dig/node/node_modules/telnet-client/README.md +363 -0
  637. data/lib/game_dig/node/node_modules/telnet-client/lib/index.d.ts +92 -0
  638. data/lib/game_dig/node/node_modules/telnet-client/lib/index.js +506 -0
  639. data/lib/game_dig/node/node_modules/telnet-client/lib/index.js.map +1 -0
  640. data/lib/game_dig/node/node_modules/telnet-client/lib/utils.d.ts +15 -0
  641. data/lib/game_dig/node/node_modules/telnet-client/lib/utils.js +34 -0
  642. data/lib/game_dig/node/node_modules/telnet-client/lib/utils.js.map +1 -0
  643. data/lib/game_dig/node/node_modules/telnet-client/package.json +103 -0
  644. data/lib/game_dig/node/node_modules/util-deprecate/History.md +16 -0
  645. data/lib/game_dig/node/node_modules/util-deprecate/LICENSE +24 -0
  646. data/lib/game_dig/node/node_modules/util-deprecate/README.md +53 -0
  647. data/lib/game_dig/node/node_modules/util-deprecate/browser.js +67 -0
  648. data/lib/game_dig/node/node_modules/util-deprecate/node.js +6 -0
  649. data/lib/game_dig/node/node_modules/util-deprecate/package.json +27 -0
  650. data/lib/game_dig/node/node_modules/varint/README.md +53 -0
  651. data/lib/game_dig/node/node_modules/varint/bench.js +57 -0
  652. data/lib/game_dig/node/node_modules/varint/decode.js +29 -0
  653. data/lib/game_dig/node/node_modules/varint/encode.js +30 -0
  654. data/lib/game_dig/node/node_modules/varint/index.js +5 -0
  655. data/lib/game_dig/node/node_modules/varint/length.js +25 -0
  656. data/lib/game_dig/node/node_modules/varint/package.json +24 -0
  657. data/lib/game_dig/node/node_modules/varint/test.js +156 -0
  658. data/lib/game_dig/node/node_modules/xmlbuilder/.npmignore +5 -0
  659. data/lib/game_dig/node/node_modules/xmlbuilder/CHANGELOG.md +395 -0
  660. data/lib/game_dig/node/node_modules/xmlbuilder/LICENSE +21 -0
  661. data/lib/game_dig/node/node_modules/xmlbuilder/README.md +85 -0
  662. data/lib/game_dig/node/node_modules/xmlbuilder/lib/Utility.js +139 -0
  663. data/lib/game_dig/node/node_modules/xmlbuilder/lib/XMLAttribute.js +31 -0
  664. data/lib/game_dig/node/node_modules/xmlbuilder/lib/XMLCData.js +32 -0
  665. data/lib/game_dig/node/node_modules/xmlbuilder/lib/XMLComment.js +32 -0
  666. data/lib/game_dig/node/node_modules/xmlbuilder/lib/XMLDTDAttList.js +50 -0
  667. data/lib/game_dig/node/node_modules/xmlbuilder/lib/XMLDTDElement.js +35 -0
  668. data/lib/game_dig/node/node_modules/xmlbuilder/lib/XMLDTDEntity.js +56 -0
  669. data/lib/game_dig/node/node_modules/xmlbuilder/lib/XMLDTDNotation.js +37 -0
  670. data/lib/game_dig/node/node_modules/xmlbuilder/lib/XMLDeclaration.js +40 -0
  671. data/lib/game_dig/node/node_modules/xmlbuilder/lib/XMLDocType.js +107 -0
  672. data/lib/game_dig/node/node_modules/xmlbuilder/lib/XMLDocument.js +48 -0
  673. data/lib/game_dig/node/node_modules/xmlbuilder/lib/XMLDocumentCB.js +402 -0
  674. data/lib/game_dig/node/node_modules/xmlbuilder/lib/XMLElement.js +111 -0
  675. data/lib/game_dig/node/node_modules/xmlbuilder/lib/XMLNode.js +432 -0
  676. data/lib/game_dig/node/node_modules/xmlbuilder/lib/XMLProcessingInstruction.js +35 -0
  677. data/lib/game_dig/node/node_modules/xmlbuilder/lib/XMLRaw.js +32 -0
  678. data/lib/game_dig/node/node_modules/xmlbuilder/lib/XMLStreamWriter.js +278 -0
  679. data/lib/game_dig/node/node_modules/xmlbuilder/lib/XMLStringWriter.js +302 -0
  680. data/lib/game_dig/node/node_modules/xmlbuilder/lib/XMLStringifier.js +192 -0
  681. data/lib/game_dig/node/node_modules/xmlbuilder/lib/XMLText.js +32 -0
  682. data/lib/game_dig/node/node_modules/xmlbuilder/lib/XMLWriterBase.js +68 -0
  683. data/lib/game_dig/node/node_modules/xmlbuilder/lib/index.js +53 -0
  684. data/lib/game_dig/node/node_modules/xmlbuilder/package.json +37 -0
  685. data/lib/game_dig/node/node_modules/xmlrpc/.idea/date_formatter.js +77 -0
  686. data/lib/game_dig/node/node_modules/xmlrpc/.npmignore +5 -0
  687. data/lib/game_dig/node/node_modules/xmlrpc/.travis.yml +6 -0
  688. data/lib/game_dig/node/node_modules/xmlrpc/HISTORY.md +129 -0
  689. data/lib/game_dig/node/node_modules/xmlrpc/LICENSE +23 -0
  690. data/lib/game_dig/node/node_modules/xmlrpc/README.md +235 -0
  691. data/lib/game_dig/node/node_modules/xmlrpc/lib/client.js +177 -0
  692. data/lib/game_dig/node/node_modules/xmlrpc/lib/cookies.js +111 -0
  693. data/lib/game_dig/node/node_modules/xmlrpc/lib/customtype.js +10 -0
  694. data/lib/game_dig/node/node_modules/xmlrpc/lib/date_formatter.js +188 -0
  695. data/lib/game_dig/node/node_modules/xmlrpc/lib/deserializer.js +324 -0
  696. data/lib/game_dig/node/node_modules/xmlrpc/lib/serializer.js +202 -0
  697. data/lib/game_dig/node/node_modules/xmlrpc/lib/server.js +78 -0
  698. data/lib/game_dig/node/node_modules/xmlrpc/lib/xmlrpc.js +65 -0
  699. data/lib/game_dig/node/node_modules/xmlrpc/package.json +35 -0
  700. data/lib/game_dig/node/node_modules/xmlrpc/tmp/client.js +28 -0
  701. data/lib/game_dig/node/node_modules/xmlrpc/tmp/server.crt +13 -0
  702. data/lib/game_dig/node/node_modules/xmlrpc/tmp/server.csr +11 -0
  703. data/lib/game_dig/node/node_modules/xmlrpc/tmp/server.js +10 -0
  704. data/lib/game_dig/node/node_modules/xmlrpc/tmp/server.key +15 -0
  705. data/lib/game_dig/node/node_modules/xmlrpc/tmp/server.key.org +18 -0
  706. data/lib/game_dig/node/package.json +8 -0
  707. data/lib/game_dig/node/yarn.lock +359 -0
  708. data/lib/game_dig/nodo.rb +54 -0
  709. data/lib/game_dig/query_result.rb +71 -0
  710. data/lib/game_dig/version.rb +1 -1
  711. data/lib/game_dig.rb +64 -55
  712. metadata +742 -16
  713. data/cli/pry_service.rb +0 -5
  714. data/lib/custom_errors/game_dig_cli_not_found.rb +0 -2
  715. data/lib/custom_errors/game_dig_error.rb +0 -2
  716. data/lib/game_dig/game_dig_helper.rb +0 -68
  717. data/lib/game_dig/service.rb +0 -38
  718. data/lib/node/gamedig-service.js +0 -46
  719. data/lib/node/package.json +0 -9
@@ -0,0 +1,1581 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2009 The Closure Library Authors
4
+ * Copyright 2020 Daniel Wirtz / The long.js Authors.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ *
18
+ * SPDX-License-Identifier: Apache-2.0
19
+ */
20
+
21
+ // WebAssembly optimizations to do native i64 multiplication and divide
22
+ var wasm = null;
23
+ try {
24
+ wasm = new WebAssembly.Instance(
25
+ new WebAssembly.Module(
26
+ new Uint8Array([
27
+ // \0asm
28
+ 0, 97, 115, 109,
29
+ // version 1
30
+ 1, 0, 0, 0,
31
+
32
+ // section "type"
33
+ 1, 13, 2,
34
+ // 0, () => i32
35
+ 96, 0, 1, 127,
36
+ // 1, (i32, i32, i32, i32) => i32
37
+ 96, 4, 127, 127, 127, 127, 1, 127,
38
+
39
+ // section "function"
40
+ 3, 7, 6,
41
+ // 0, type 0
42
+ 0,
43
+ // 1, type 1
44
+ 1,
45
+ // 2, type 1
46
+ 1,
47
+ // 3, type 1
48
+ 1,
49
+ // 4, type 1
50
+ 1,
51
+ // 5, type 1
52
+ 1,
53
+
54
+ // section "global"
55
+ 6, 6, 1,
56
+ // 0, "high", mutable i32
57
+ 127, 1, 65, 0, 11,
58
+
59
+ // section "export"
60
+ 7, 50, 6,
61
+ // 0, "mul"
62
+ 3, 109, 117, 108, 0, 1,
63
+ // 1, "div_s"
64
+ 5, 100, 105, 118, 95, 115, 0, 2,
65
+ // 2, "div_u"
66
+ 5, 100, 105, 118, 95, 117, 0, 3,
67
+ // 3, "rem_s"
68
+ 5, 114, 101, 109, 95, 115, 0, 4,
69
+ // 4, "rem_u"
70
+ 5, 114, 101, 109, 95, 117, 0, 5,
71
+ // 5, "get_high"
72
+ 8, 103, 101, 116, 95, 104, 105, 103, 104, 0, 0,
73
+
74
+ // section "code"
75
+ 10, 191, 1, 6,
76
+ // 0, "get_high"
77
+ 4, 0, 35, 0, 11,
78
+ // 1, "mul"
79
+ 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32,
80
+ 3, 173, 66, 32, 134, 132, 126, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4,
81
+ 167, 11,
82
+ // 2, "div_s"
83
+ 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32,
84
+ 3, 173, 66, 32, 134, 132, 127, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4,
85
+ 167, 11,
86
+ // 3, "div_u"
87
+ 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32,
88
+ 3, 173, 66, 32, 134, 132, 128, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4,
89
+ 167, 11,
90
+ // 4, "rem_s"
91
+ 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32,
92
+ 3, 173, 66, 32, 134, 132, 129, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4,
93
+ 167, 11,
94
+ // 5, "rem_u"
95
+ 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32,
96
+ 3, 173, 66, 32, 134, 132, 130, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4,
97
+ 167, 11,
98
+ ]),
99
+ ),
100
+ {},
101
+ ).exports;
102
+ } catch {
103
+ // no wasm support :(
104
+ }
105
+
106
+ /**
107
+ * Constructs a 64 bit two's-complement integer, given its low and high 32 bit values as *signed* integers.
108
+ * See the from* functions below for more convenient ways of constructing Longs.
109
+ * @exports Long
110
+ * @class A Long class for representing a 64 bit two's-complement integer value.
111
+ * @param {number} low The low (signed) 32 bits of the long
112
+ * @param {number} high The high (signed) 32 bits of the long
113
+ * @param {boolean=} unsigned Whether unsigned or not, defaults to signed
114
+ * @constructor
115
+ */
116
+ function Long(low, high, unsigned) {
117
+ /**
118
+ * The low 32 bits as a signed value.
119
+ * @type {number}
120
+ */
121
+ this.low = low | 0;
122
+
123
+ /**
124
+ * The high 32 bits as a signed value.
125
+ * @type {number}
126
+ */
127
+ this.high = high | 0;
128
+
129
+ /**
130
+ * Whether unsigned or not.
131
+ * @type {boolean}
132
+ */
133
+ this.unsigned = !!unsigned;
134
+ }
135
+
136
+ // The internal representation of a long is the two given signed, 32-bit values.
137
+ // We use 32-bit pieces because these are the size of integers on which
138
+ // Javascript performs bit-operations. For operations like addition and
139
+ // multiplication, we split each number into 16 bit pieces, which can easily be
140
+ // multiplied within Javascript's floating-point representation without overflow
141
+ // or change in sign.
142
+ //
143
+ // In the algorithms below, we frequently reduce the negative case to the
144
+ // positive case by negating the input(s) and then post-processing the result.
145
+ // Note that we must ALWAYS check specially whether those values are MIN_VALUE
146
+ // (-2^63) because -MIN_VALUE == MIN_VALUE (since 2^63 cannot be represented as
147
+ // a positive number, it overflows back into a negative). Not handling this
148
+ // case would often result in infinite recursion.
149
+ //
150
+ // Common constant values ZERO, ONE, NEG_ONE, etc. are defined below the from*
151
+ // methods on which they depend.
152
+
153
+ /**
154
+ * An indicator used to reliably determine if an object is a Long or not.
155
+ * @type {boolean}
156
+ * @const
157
+ * @private
158
+ */
159
+ Long.prototype.__isLong__;
160
+
161
+ Object.defineProperty(Long.prototype, "__isLong__", { value: true });
162
+
163
+ /**
164
+ * @function
165
+ * @param {*} obj Object
166
+ * @returns {boolean}
167
+ * @inner
168
+ */
169
+ function isLong(obj) {
170
+ return (obj && obj["__isLong__"]) === true;
171
+ }
172
+
173
+ /**
174
+ * @function
175
+ * @param {*} value number
176
+ * @returns {number}
177
+ * @inner
178
+ */
179
+ function ctz32(value) {
180
+ var c = Math.clz32(value & -value);
181
+ return value ? 31 - c : c;
182
+ }
183
+
184
+ /**
185
+ * Tests if the specified object is a Long.
186
+ * @function
187
+ * @param {*} obj Object
188
+ * @returns {boolean}
189
+ */
190
+ Long.isLong = isLong;
191
+
192
+ /**
193
+ * A cache of the Long representations of small integer values.
194
+ * @type {!Object}
195
+ * @inner
196
+ */
197
+ var INT_CACHE = {};
198
+
199
+ /**
200
+ * A cache of the Long representations of small unsigned integer values.
201
+ * @type {!Object}
202
+ * @inner
203
+ */
204
+ var UINT_CACHE = {};
205
+
206
+ /**
207
+ * @param {number} value
208
+ * @param {boolean=} unsigned
209
+ * @returns {!Long}
210
+ * @inner
211
+ */
212
+ function fromInt(value, unsigned) {
213
+ var obj, cachedObj, cache;
214
+ if (unsigned) {
215
+ value >>>= 0;
216
+ if ((cache = 0 <= value && value < 256)) {
217
+ cachedObj = UINT_CACHE[value];
218
+ if (cachedObj) return cachedObj;
219
+ }
220
+ obj = fromBits(value, 0, true);
221
+ if (cache) UINT_CACHE[value] = obj;
222
+ return obj;
223
+ } else {
224
+ value |= 0;
225
+ if ((cache = -128 <= value && value < 128)) {
226
+ cachedObj = INT_CACHE[value];
227
+ if (cachedObj) return cachedObj;
228
+ }
229
+ obj = fromBits(value, value < 0 ? -1 : 0, false);
230
+ if (cache) INT_CACHE[value] = obj;
231
+ return obj;
232
+ }
233
+ }
234
+
235
+ /**
236
+ * Returns a Long representing the given 32 bit integer value.
237
+ * @function
238
+ * @param {number} value The 32 bit integer in question
239
+ * @param {boolean=} unsigned Whether unsigned or not, defaults to signed
240
+ * @returns {!Long} The corresponding Long value
241
+ */
242
+ Long.fromInt = fromInt;
243
+
244
+ /**
245
+ * @param {number} value
246
+ * @param {boolean=} unsigned
247
+ * @returns {!Long}
248
+ * @inner
249
+ */
250
+ function fromNumber(value, unsigned) {
251
+ if (isNaN(value)) return unsigned ? UZERO : ZERO;
252
+ if (unsigned) {
253
+ if (value < 0) return UZERO;
254
+ if (value >= TWO_PWR_64_DBL) return MAX_UNSIGNED_VALUE;
255
+ } else {
256
+ if (value <= -TWO_PWR_63_DBL) return MIN_VALUE;
257
+ if (value + 1 >= TWO_PWR_63_DBL) return MAX_VALUE;
258
+ }
259
+ if (value < 0) return fromNumber(-value, unsigned).neg();
260
+ return fromBits(
261
+ value % TWO_PWR_32_DBL | 0,
262
+ (value / TWO_PWR_32_DBL) | 0,
263
+ unsigned,
264
+ );
265
+ }
266
+
267
+ /**
268
+ * Returns a Long representing the given value, provided that it is a finite number. Otherwise, zero is returned.
269
+ * @function
270
+ * @param {number} value The number in question
271
+ * @param {boolean=} unsigned Whether unsigned or not, defaults to signed
272
+ * @returns {!Long} The corresponding Long value
273
+ */
274
+ Long.fromNumber = fromNumber;
275
+
276
+ /**
277
+ * @param {number} lowBits
278
+ * @param {number} highBits
279
+ * @param {boolean=} unsigned
280
+ * @returns {!Long}
281
+ * @inner
282
+ */
283
+ function fromBits(lowBits, highBits, unsigned) {
284
+ return new Long(lowBits, highBits, unsigned);
285
+ }
286
+
287
+ /**
288
+ * Returns a Long representing the 64 bit integer that comes by concatenating the given low and high bits. Each is
289
+ * assumed to use 32 bits.
290
+ * @function
291
+ * @param {number} lowBits The low 32 bits
292
+ * @param {number} highBits The high 32 bits
293
+ * @param {boolean=} unsigned Whether unsigned or not, defaults to signed
294
+ * @returns {!Long} The corresponding Long value
295
+ */
296
+ Long.fromBits = fromBits;
297
+
298
+ /**
299
+ * @function
300
+ * @param {number} base
301
+ * @param {number} exponent
302
+ * @returns {number}
303
+ * @inner
304
+ */
305
+ var pow_dbl = Math.pow; // Used 4 times (4*8 to 15+4)
306
+
307
+ /**
308
+ * @param {string} str
309
+ * @param {(boolean|number)=} unsigned
310
+ * @param {number=} radix
311
+ * @returns {!Long}
312
+ * @inner
313
+ */
314
+ function fromString(str, unsigned, radix) {
315
+ if (str.length === 0) throw Error("empty string");
316
+ if (typeof unsigned === "number") {
317
+ // For goog.math.long compatibility
318
+ radix = unsigned;
319
+ unsigned = false;
320
+ } else {
321
+ unsigned = !!unsigned;
322
+ }
323
+ if (
324
+ str === "NaN" ||
325
+ str === "Infinity" ||
326
+ str === "+Infinity" ||
327
+ str === "-Infinity"
328
+ )
329
+ return unsigned ? UZERO : ZERO;
330
+ radix = radix || 10;
331
+ if (radix < 2 || 36 < radix) throw RangeError("radix");
332
+
333
+ var p;
334
+ if ((p = str.indexOf("-")) > 0) throw Error("interior hyphen");
335
+ else if (p === 0) {
336
+ return fromString(str.substring(1), unsigned, radix).neg();
337
+ }
338
+
339
+ // Do several (8) digits each time through the loop, so as to
340
+ // minimize the calls to the very expensive emulated div.
341
+ var radixToPower = fromNumber(pow_dbl(radix, 8));
342
+
343
+ var result = ZERO;
344
+ for (var i = 0; i < str.length; i += 8) {
345
+ var size = Math.min(8, str.length - i),
346
+ value = parseInt(str.substring(i, i + size), radix);
347
+ if (size < 8) {
348
+ var power = fromNumber(pow_dbl(radix, size));
349
+ result = result.mul(power).add(fromNumber(value));
350
+ } else {
351
+ result = result.mul(radixToPower);
352
+ result = result.add(fromNumber(value));
353
+ }
354
+ }
355
+ result.unsigned = unsigned;
356
+ return result;
357
+ }
358
+
359
+ /**
360
+ * Returns a Long representation of the given string, written using the specified radix.
361
+ * @function
362
+ * @param {string} str The textual representation of the Long
363
+ * @param {(boolean|number)=} unsigned Whether unsigned or not, defaults to signed
364
+ * @param {number=} radix The radix in which the text is written (2-36), defaults to 10
365
+ * @returns {!Long} The corresponding Long value
366
+ */
367
+ Long.fromString = fromString;
368
+
369
+ /**
370
+ * @function
371
+ * @param {!Long|number|string|!{low: number, high: number, unsigned: boolean}} val
372
+ * @param {boolean=} unsigned
373
+ * @returns {!Long}
374
+ * @inner
375
+ */
376
+ function fromValue(val, unsigned) {
377
+ if (typeof val === "number") return fromNumber(val, unsigned);
378
+ if (typeof val === "string") return fromString(val, unsigned);
379
+ // Throws for non-objects, converts non-instanceof Long:
380
+ return fromBits(
381
+ val.low,
382
+ val.high,
383
+ typeof unsigned === "boolean" ? unsigned : val.unsigned,
384
+ );
385
+ }
386
+
387
+ /**
388
+ * Converts the specified value to a Long using the appropriate from* function for its type.
389
+ * @function
390
+ * @param {!Long|number|bigint|string|!{low: number, high: number, unsigned: boolean}} val Value
391
+ * @param {boolean=} unsigned Whether unsigned or not, defaults to signed
392
+ * @returns {!Long}
393
+ */
394
+ Long.fromValue = fromValue;
395
+
396
+ // NOTE: the compiler should inline these constant values below and then remove these variables, so there should be
397
+ // no runtime penalty for these.
398
+
399
+ /**
400
+ * @type {number}
401
+ * @const
402
+ * @inner
403
+ */
404
+ var TWO_PWR_16_DBL = 1 << 16;
405
+
406
+ /**
407
+ * @type {number}
408
+ * @const
409
+ * @inner
410
+ */
411
+ var TWO_PWR_24_DBL = 1 << 24;
412
+
413
+ /**
414
+ * @type {number}
415
+ * @const
416
+ * @inner
417
+ */
418
+ var TWO_PWR_32_DBL = TWO_PWR_16_DBL * TWO_PWR_16_DBL;
419
+
420
+ /**
421
+ * @type {number}
422
+ * @const
423
+ * @inner
424
+ */
425
+ var TWO_PWR_64_DBL = TWO_PWR_32_DBL * TWO_PWR_32_DBL;
426
+
427
+ /**
428
+ * @type {number}
429
+ * @const
430
+ * @inner
431
+ */
432
+ var TWO_PWR_63_DBL = TWO_PWR_64_DBL / 2;
433
+
434
+ /**
435
+ * @type {!Long}
436
+ * @const
437
+ * @inner
438
+ */
439
+ var TWO_PWR_24 = fromInt(TWO_PWR_24_DBL);
440
+
441
+ /**
442
+ * @type {!Long}
443
+ * @inner
444
+ */
445
+ var ZERO = fromInt(0);
446
+
447
+ /**
448
+ * Signed zero.
449
+ * @type {!Long}
450
+ */
451
+ Long.ZERO = ZERO;
452
+
453
+ /**
454
+ * @type {!Long}
455
+ * @inner
456
+ */
457
+ var UZERO = fromInt(0, true);
458
+
459
+ /**
460
+ * Unsigned zero.
461
+ * @type {!Long}
462
+ */
463
+ Long.UZERO = UZERO;
464
+
465
+ /**
466
+ * @type {!Long}
467
+ * @inner
468
+ */
469
+ var ONE = fromInt(1);
470
+
471
+ /**
472
+ * Signed one.
473
+ * @type {!Long}
474
+ */
475
+ Long.ONE = ONE;
476
+
477
+ /**
478
+ * @type {!Long}
479
+ * @inner
480
+ */
481
+ var UONE = fromInt(1, true);
482
+
483
+ /**
484
+ * Unsigned one.
485
+ * @type {!Long}
486
+ */
487
+ Long.UONE = UONE;
488
+
489
+ /**
490
+ * @type {!Long}
491
+ * @inner
492
+ */
493
+ var NEG_ONE = fromInt(-1);
494
+
495
+ /**
496
+ * Signed negative one.
497
+ * @type {!Long}
498
+ */
499
+ Long.NEG_ONE = NEG_ONE;
500
+
501
+ /**
502
+ * @type {!Long}
503
+ * @inner
504
+ */
505
+ var MAX_VALUE = fromBits(0xffffffff | 0, 0x7fffffff | 0, false);
506
+
507
+ /**
508
+ * Maximum signed value.
509
+ * @type {!Long}
510
+ */
511
+ Long.MAX_VALUE = MAX_VALUE;
512
+
513
+ /**
514
+ * @type {!Long}
515
+ * @inner
516
+ */
517
+ var MAX_UNSIGNED_VALUE = fromBits(0xffffffff | 0, 0xffffffff | 0, true);
518
+
519
+ /**
520
+ * Maximum unsigned value.
521
+ * @type {!Long}
522
+ */
523
+ Long.MAX_UNSIGNED_VALUE = MAX_UNSIGNED_VALUE;
524
+
525
+ /**
526
+ * @type {!Long}
527
+ * @inner
528
+ */
529
+ var MIN_VALUE = fromBits(0, 0x80000000 | 0, false);
530
+
531
+ /**
532
+ * Minimum signed value.
533
+ * @type {!Long}
534
+ */
535
+ Long.MIN_VALUE = MIN_VALUE;
536
+
537
+ /**
538
+ * @alias Long.prototype
539
+ * @inner
540
+ */
541
+ var LongPrototype = Long.prototype;
542
+
543
+ /**
544
+ * Converts the Long to a 32 bit integer, assuming it is a 32 bit integer.
545
+ * @this {!Long}
546
+ * @returns {number}
547
+ */
548
+ LongPrototype.toInt = function toInt() {
549
+ return this.unsigned ? this.low >>> 0 : this.low;
550
+ };
551
+
552
+ /**
553
+ * Converts the Long to a the nearest floating-point representation of this value (double, 53 bit mantissa).
554
+ * @this {!Long}
555
+ * @returns {number}
556
+ */
557
+ LongPrototype.toNumber = function toNumber() {
558
+ if (this.unsigned)
559
+ return (this.high >>> 0) * TWO_PWR_32_DBL + (this.low >>> 0);
560
+ return this.high * TWO_PWR_32_DBL + (this.low >>> 0);
561
+ };
562
+
563
+ /**
564
+ * Converts the Long to a string written in the specified radix.
565
+ * @this {!Long}
566
+ * @param {number=} radix Radix (2-36), defaults to 10
567
+ * @returns {string}
568
+ * @override
569
+ * @throws {RangeError} If `radix` is out of range
570
+ */
571
+ LongPrototype.toString = function toString(radix) {
572
+ radix = radix || 10;
573
+ if (radix < 2 || 36 < radix) throw RangeError("radix");
574
+ if (this.isZero()) return "0";
575
+ if (this.isNegative()) {
576
+ // Unsigned Longs are never negative
577
+ if (this.eq(MIN_VALUE)) {
578
+ // We need to change the Long value before it can be negated, so we remove
579
+ // the bottom-most digit in this base and then recurse to do the rest.
580
+ var radixLong = fromNumber(radix),
581
+ div = this.div(radixLong),
582
+ rem1 = div.mul(radixLong).sub(this);
583
+ return div.toString(radix) + rem1.toInt().toString(radix);
584
+ } else return "-" + this.neg().toString(radix);
585
+ }
586
+
587
+ // Do several (6) digits each time through the loop, so as to
588
+ // minimize the calls to the very expensive emulated div.
589
+ var radixToPower = fromNumber(pow_dbl(radix, 6), this.unsigned),
590
+ rem = this;
591
+ var result = "";
592
+ while (true) {
593
+ var remDiv = rem.div(radixToPower),
594
+ intval = rem.sub(remDiv.mul(radixToPower)).toInt() >>> 0,
595
+ digits = intval.toString(radix);
596
+ rem = remDiv;
597
+ if (rem.isZero()) return digits + result;
598
+ else {
599
+ while (digits.length < 6) digits = "0" + digits;
600
+ result = "" + digits + result;
601
+ }
602
+ }
603
+ };
604
+
605
+ /**
606
+ * Gets the high 32 bits as a signed integer.
607
+ * @this {!Long}
608
+ * @returns {number} Signed high bits
609
+ */
610
+ LongPrototype.getHighBits = function getHighBits() {
611
+ return this.high;
612
+ };
613
+
614
+ /**
615
+ * Gets the high 32 bits as an unsigned integer.
616
+ * @this {!Long}
617
+ * @returns {number} Unsigned high bits
618
+ */
619
+ LongPrototype.getHighBitsUnsigned = function getHighBitsUnsigned() {
620
+ return this.high >>> 0;
621
+ };
622
+
623
+ /**
624
+ * Gets the low 32 bits as a signed integer.
625
+ * @this {!Long}
626
+ * @returns {number} Signed low bits
627
+ */
628
+ LongPrototype.getLowBits = function getLowBits() {
629
+ return this.low;
630
+ };
631
+
632
+ /**
633
+ * Gets the low 32 bits as an unsigned integer.
634
+ * @this {!Long}
635
+ * @returns {number} Unsigned low bits
636
+ */
637
+ LongPrototype.getLowBitsUnsigned = function getLowBitsUnsigned() {
638
+ return this.low >>> 0;
639
+ };
640
+
641
+ /**
642
+ * Gets the number of bits needed to represent the absolute value of this Long.
643
+ * @this {!Long}
644
+ * @returns {number}
645
+ */
646
+ LongPrototype.getNumBitsAbs = function getNumBitsAbs() {
647
+ if (this.isNegative())
648
+ // Unsigned Longs are never negative
649
+ return this.eq(MIN_VALUE) ? 64 : this.neg().getNumBitsAbs();
650
+ var val = this.high != 0 ? this.high : this.low;
651
+ for (var bit = 31; bit > 0; bit--) if ((val & (1 << bit)) != 0) break;
652
+ return this.high != 0 ? bit + 33 : bit + 1;
653
+ };
654
+
655
+ /**
656
+ * Tests if this Long can be safely represented as a JavaScript number.
657
+ * @this {!Long}
658
+ * @returns {boolean}
659
+ */
660
+ LongPrototype.isSafeInteger = function isSafeInteger() {
661
+ // 2^53-1 is the maximum safe value
662
+ var top11Bits = this.high >> 21;
663
+ // [0, 2^53-1]
664
+ if (!top11Bits) return true;
665
+ // > 2^53-1
666
+ if (this.unsigned) return false;
667
+ // [-2^53, -1] except -2^53
668
+ return top11Bits === -1 && !(this.low === 0 && this.high === -0x200000);
669
+ };
670
+
671
+ /**
672
+ * Tests if this Long's value equals zero.
673
+ * @this {!Long}
674
+ * @returns {boolean}
675
+ */
676
+ LongPrototype.isZero = function isZero() {
677
+ return this.high === 0 && this.low === 0;
678
+ };
679
+
680
+ /**
681
+ * Tests if this Long's value equals zero. This is an alias of {@link Long#isZero}.
682
+ * @returns {boolean}
683
+ */
684
+ LongPrototype.eqz = LongPrototype.isZero;
685
+
686
+ /**
687
+ * Tests if this Long's value is negative.
688
+ * @this {!Long}
689
+ * @returns {boolean}
690
+ */
691
+ LongPrototype.isNegative = function isNegative() {
692
+ return !this.unsigned && this.high < 0;
693
+ };
694
+
695
+ /**
696
+ * Tests if this Long's value is positive or zero.
697
+ * @this {!Long}
698
+ * @returns {boolean}
699
+ */
700
+ LongPrototype.isPositive = function isPositive() {
701
+ return this.unsigned || this.high >= 0;
702
+ };
703
+
704
+ /**
705
+ * Tests if this Long's value is odd.
706
+ * @this {!Long}
707
+ * @returns {boolean}
708
+ */
709
+ LongPrototype.isOdd = function isOdd() {
710
+ return (this.low & 1) === 1;
711
+ };
712
+
713
+ /**
714
+ * Tests if this Long's value is even.
715
+ * @this {!Long}
716
+ * @returns {boolean}
717
+ */
718
+ LongPrototype.isEven = function isEven() {
719
+ return (this.low & 1) === 0;
720
+ };
721
+
722
+ /**
723
+ * Tests if this Long's value equals the specified's.
724
+ * @this {!Long}
725
+ * @param {!Long|number|bigint|string} other Other value
726
+ * @returns {boolean}
727
+ */
728
+ LongPrototype.equals = function equals(other) {
729
+ if (!isLong(other)) other = fromValue(other);
730
+ if (
731
+ this.unsigned !== other.unsigned &&
732
+ this.high >>> 31 === 1 &&
733
+ other.high >>> 31 === 1
734
+ )
735
+ return false;
736
+ return this.high === other.high && this.low === other.low;
737
+ };
738
+
739
+ /**
740
+ * Tests if this Long's value equals the specified's. This is an alias of {@link Long#equals}.
741
+ * @function
742
+ * @param {!Long|number|bigint|string} other Other value
743
+ * @returns {boolean}
744
+ */
745
+ LongPrototype.eq = LongPrototype.equals;
746
+
747
+ /**
748
+ * Tests if this Long's value differs from the specified's.
749
+ * @this {!Long}
750
+ * @param {!Long|number|bigint|string} other Other value
751
+ * @returns {boolean}
752
+ */
753
+ LongPrototype.notEquals = function notEquals(other) {
754
+ return !this.eq(/* validates */ other);
755
+ };
756
+
757
+ /**
758
+ * Tests if this Long's value differs from the specified's. This is an alias of {@link Long#notEquals}.
759
+ * @function
760
+ * @param {!Long|number|bigint|string} other Other value
761
+ * @returns {boolean}
762
+ */
763
+ LongPrototype.neq = LongPrototype.notEquals;
764
+
765
+ /**
766
+ * Tests if this Long's value differs from the specified's. This is an alias of {@link Long#notEquals}.
767
+ * @function
768
+ * @param {!Long|number|bigint|string} other Other value
769
+ * @returns {boolean}
770
+ */
771
+ LongPrototype.ne = LongPrototype.notEquals;
772
+
773
+ /**
774
+ * Tests if this Long's value is less than the specified's.
775
+ * @this {!Long}
776
+ * @param {!Long|number|bigint|string} other Other value
777
+ * @returns {boolean}
778
+ */
779
+ LongPrototype.lessThan = function lessThan(other) {
780
+ return this.comp(/* validates */ other) < 0;
781
+ };
782
+
783
+ /**
784
+ * Tests if this Long's value is less than the specified's. This is an alias of {@link Long#lessThan}.
785
+ * @function
786
+ * @param {!Long|number|bigint|string} other Other value
787
+ * @returns {boolean}
788
+ */
789
+ LongPrototype.lt = LongPrototype.lessThan;
790
+
791
+ /**
792
+ * Tests if this Long's value is less than or equal the specified's.
793
+ * @this {!Long}
794
+ * @param {!Long|number|bigint|string} other Other value
795
+ * @returns {boolean}
796
+ */
797
+ LongPrototype.lessThanOrEqual = function lessThanOrEqual(other) {
798
+ return this.comp(/* validates */ other) <= 0;
799
+ };
800
+
801
+ /**
802
+ * Tests if this Long's value is less than or equal the specified's. This is an alias of {@link Long#lessThanOrEqual}.
803
+ * @function
804
+ * @param {!Long|number|bigint|string} other Other value
805
+ * @returns {boolean}
806
+ */
807
+ LongPrototype.lte = LongPrototype.lessThanOrEqual;
808
+
809
+ /**
810
+ * Tests if this Long's value is less than or equal the specified's. This is an alias of {@link Long#lessThanOrEqual}.
811
+ * @function
812
+ * @param {!Long|number|bigint|string} other Other value
813
+ * @returns {boolean}
814
+ */
815
+ LongPrototype.le = LongPrototype.lessThanOrEqual;
816
+
817
+ /**
818
+ * Tests if this Long's value is greater than the specified's.
819
+ * @this {!Long}
820
+ * @param {!Long|number|bigint|string} other Other value
821
+ * @returns {boolean}
822
+ */
823
+ LongPrototype.greaterThan = function greaterThan(other) {
824
+ return this.comp(/* validates */ other) > 0;
825
+ };
826
+
827
+ /**
828
+ * Tests if this Long's value is greater than the specified's. This is an alias of {@link Long#greaterThan}.
829
+ * @function
830
+ * @param {!Long|number|bigint|string} other Other value
831
+ * @returns {boolean}
832
+ */
833
+ LongPrototype.gt = LongPrototype.greaterThan;
834
+
835
+ /**
836
+ * Tests if this Long's value is greater than or equal the specified's.
837
+ * @this {!Long}
838
+ * @param {!Long|number|bigint|string} other Other value
839
+ * @returns {boolean}
840
+ */
841
+ LongPrototype.greaterThanOrEqual = function greaterThanOrEqual(other) {
842
+ return this.comp(/* validates */ other) >= 0;
843
+ };
844
+
845
+ /**
846
+ * Tests if this Long's value is greater than or equal the specified's. This is an alias of {@link Long#greaterThanOrEqual}.
847
+ * @function
848
+ * @param {!Long|number|bigint|string} other Other value
849
+ * @returns {boolean}
850
+ */
851
+ LongPrototype.gte = LongPrototype.greaterThanOrEqual;
852
+
853
+ /**
854
+ * Tests if this Long's value is greater than or equal the specified's. This is an alias of {@link Long#greaterThanOrEqual}.
855
+ * @function
856
+ * @param {!Long|number|bigint|string} other Other value
857
+ * @returns {boolean}
858
+ */
859
+ LongPrototype.ge = LongPrototype.greaterThanOrEqual;
860
+
861
+ /**
862
+ * Compares this Long's value with the specified's.
863
+ * @this {!Long}
864
+ * @param {!Long|number|bigint|string} other Other value
865
+ * @returns {number} 0 if they are the same, 1 if the this is greater and -1
866
+ * if the given one is greater
867
+ */
868
+ LongPrototype.compare = function compare(other) {
869
+ if (!isLong(other)) other = fromValue(other);
870
+ if (this.eq(other)) return 0;
871
+ var thisNeg = this.isNegative(),
872
+ otherNeg = other.isNegative();
873
+ if (thisNeg && !otherNeg) return -1;
874
+ if (!thisNeg && otherNeg) return 1;
875
+ // At this point the sign bits are the same
876
+ if (!this.unsigned) return this.sub(other).isNegative() ? -1 : 1;
877
+ // Both are positive if at least one is unsigned
878
+ return other.high >>> 0 > this.high >>> 0 ||
879
+ (other.high === this.high && other.low >>> 0 > this.low >>> 0)
880
+ ? -1
881
+ : 1;
882
+ };
883
+
884
+ /**
885
+ * Compares this Long's value with the specified's. This is an alias of {@link Long#compare}.
886
+ * @function
887
+ * @param {!Long|number|bigint|string} other Other value
888
+ * @returns {number} 0 if they are the same, 1 if the this is greater and -1
889
+ * if the given one is greater
890
+ */
891
+ LongPrototype.comp = LongPrototype.compare;
892
+
893
+ /**
894
+ * Negates this Long's value.
895
+ * @this {!Long}
896
+ * @returns {!Long} Negated Long
897
+ */
898
+ LongPrototype.negate = function negate() {
899
+ if (!this.unsigned && this.eq(MIN_VALUE)) return MIN_VALUE;
900
+ return this.not().add(ONE);
901
+ };
902
+
903
+ /**
904
+ * Negates this Long's value. This is an alias of {@link Long#negate}.
905
+ * @function
906
+ * @returns {!Long} Negated Long
907
+ */
908
+ LongPrototype.neg = LongPrototype.negate;
909
+
910
+ /**
911
+ * Returns the sum of this and the specified Long.
912
+ * @this {!Long}
913
+ * @param {!Long|number|bigint|string} addend Addend
914
+ * @returns {!Long} Sum
915
+ */
916
+ LongPrototype.add = function add(addend) {
917
+ if (!isLong(addend)) addend = fromValue(addend);
918
+
919
+ // Divide each number into 4 chunks of 16 bits, and then sum the chunks.
920
+
921
+ var a48 = this.high >>> 16;
922
+ var a32 = this.high & 0xffff;
923
+ var a16 = this.low >>> 16;
924
+ var a00 = this.low & 0xffff;
925
+
926
+ var b48 = addend.high >>> 16;
927
+ var b32 = addend.high & 0xffff;
928
+ var b16 = addend.low >>> 16;
929
+ var b00 = addend.low & 0xffff;
930
+
931
+ var c48 = 0,
932
+ c32 = 0,
933
+ c16 = 0,
934
+ c00 = 0;
935
+ c00 += a00 + b00;
936
+ c16 += c00 >>> 16;
937
+ c00 &= 0xffff;
938
+ c16 += a16 + b16;
939
+ c32 += c16 >>> 16;
940
+ c16 &= 0xffff;
941
+ c32 += a32 + b32;
942
+ c48 += c32 >>> 16;
943
+ c32 &= 0xffff;
944
+ c48 += a48 + b48;
945
+ c48 &= 0xffff;
946
+ return fromBits((c16 << 16) | c00, (c48 << 16) | c32, this.unsigned);
947
+ };
948
+
949
+ /**
950
+ * Returns the difference of this and the specified Long.
951
+ * @this {!Long}
952
+ * @param {!Long|number|bigint|string} subtrahend Subtrahend
953
+ * @returns {!Long} Difference
954
+ */
955
+ LongPrototype.subtract = function subtract(subtrahend) {
956
+ if (!isLong(subtrahend)) subtrahend = fromValue(subtrahend);
957
+ return this.add(subtrahend.neg());
958
+ };
959
+
960
+ /**
961
+ * Returns the difference of this and the specified Long. This is an alias of {@link Long#subtract}.
962
+ * @function
963
+ * @param {!Long|number|bigint|string} subtrahend Subtrahend
964
+ * @returns {!Long} Difference
965
+ */
966
+ LongPrototype.sub = LongPrototype.subtract;
967
+
968
+ /**
969
+ * Returns the product of this and the specified Long.
970
+ * @this {!Long}
971
+ * @param {!Long|number|bigint|string} multiplier Multiplier
972
+ * @returns {!Long} Product
973
+ */
974
+ LongPrototype.multiply = function multiply(multiplier) {
975
+ if (this.isZero()) return this;
976
+ if (!isLong(multiplier)) multiplier = fromValue(multiplier);
977
+
978
+ // use wasm support if present
979
+ if (wasm) {
980
+ var low = wasm["mul"](this.low, this.high, multiplier.low, multiplier.high);
981
+ return fromBits(low, wasm["get_high"](), this.unsigned);
982
+ }
983
+
984
+ if (multiplier.isZero()) return this.unsigned ? UZERO : ZERO;
985
+ if (this.eq(MIN_VALUE)) return multiplier.isOdd() ? MIN_VALUE : ZERO;
986
+ if (multiplier.eq(MIN_VALUE)) return this.isOdd() ? MIN_VALUE : ZERO;
987
+
988
+ if (this.isNegative()) {
989
+ if (multiplier.isNegative()) return this.neg().mul(multiplier.neg());
990
+ else return this.neg().mul(multiplier).neg();
991
+ } else if (multiplier.isNegative()) return this.mul(multiplier.neg()).neg();
992
+
993
+ // If both longs are small, use float multiplication
994
+ if (this.lt(TWO_PWR_24) && multiplier.lt(TWO_PWR_24))
995
+ return fromNumber(this.toNumber() * multiplier.toNumber(), this.unsigned);
996
+
997
+ // Divide each long into 4 chunks of 16 bits, and then add up 4x4 products.
998
+ // We can skip products that would overflow.
999
+
1000
+ var a48 = this.high >>> 16;
1001
+ var a32 = this.high & 0xffff;
1002
+ var a16 = this.low >>> 16;
1003
+ var a00 = this.low & 0xffff;
1004
+
1005
+ var b48 = multiplier.high >>> 16;
1006
+ var b32 = multiplier.high & 0xffff;
1007
+ var b16 = multiplier.low >>> 16;
1008
+ var b00 = multiplier.low & 0xffff;
1009
+
1010
+ var c48 = 0,
1011
+ c32 = 0,
1012
+ c16 = 0,
1013
+ c00 = 0;
1014
+ c00 += a00 * b00;
1015
+ c16 += c00 >>> 16;
1016
+ c00 &= 0xffff;
1017
+ c16 += a16 * b00;
1018
+ c32 += c16 >>> 16;
1019
+ c16 &= 0xffff;
1020
+ c16 += a00 * b16;
1021
+ c32 += c16 >>> 16;
1022
+ c16 &= 0xffff;
1023
+ c32 += a32 * b00;
1024
+ c48 += c32 >>> 16;
1025
+ c32 &= 0xffff;
1026
+ c32 += a16 * b16;
1027
+ c48 += c32 >>> 16;
1028
+ c32 &= 0xffff;
1029
+ c32 += a00 * b32;
1030
+ c48 += c32 >>> 16;
1031
+ c32 &= 0xffff;
1032
+ c48 += a48 * b00 + a32 * b16 + a16 * b32 + a00 * b48;
1033
+ c48 &= 0xffff;
1034
+ return fromBits((c16 << 16) | c00, (c48 << 16) | c32, this.unsigned);
1035
+ };
1036
+
1037
+ /**
1038
+ * Returns the product of this and the specified Long. This is an alias of {@link Long#multiply}.
1039
+ * @function
1040
+ * @param {!Long|number|bigint|string} multiplier Multiplier
1041
+ * @returns {!Long} Product
1042
+ */
1043
+ LongPrototype.mul = LongPrototype.multiply;
1044
+
1045
+ /**
1046
+ * Returns this Long divided by the specified. The result is signed if this Long is signed or
1047
+ * unsigned if this Long is unsigned.
1048
+ * @this {!Long}
1049
+ * @param {!Long|number|bigint|string} divisor Divisor
1050
+ * @returns {!Long} Quotient
1051
+ */
1052
+ LongPrototype.divide = function divide(divisor) {
1053
+ if (!isLong(divisor)) divisor = fromValue(divisor);
1054
+ if (divisor.isZero()) throw Error("division by zero");
1055
+
1056
+ // use wasm support if present
1057
+ if (wasm) {
1058
+ // guard against signed division overflow: the largest
1059
+ // negative number / -1 would be 1 larger than the largest
1060
+ // positive number, due to two's complement.
1061
+ if (
1062
+ !this.unsigned &&
1063
+ this.high === -0x80000000 &&
1064
+ divisor.low === -1 &&
1065
+ divisor.high === -1
1066
+ ) {
1067
+ // be consistent with non-wasm code path
1068
+ return this;
1069
+ }
1070
+ var low = (this.unsigned ? wasm["div_u"] : wasm["div_s"])(
1071
+ this.low,
1072
+ this.high,
1073
+ divisor.low,
1074
+ divisor.high,
1075
+ );
1076
+ return fromBits(low, wasm["get_high"](), this.unsigned);
1077
+ }
1078
+
1079
+ if (this.isZero()) return this.unsigned ? UZERO : ZERO;
1080
+ var approx, rem, res;
1081
+ if (!this.unsigned) {
1082
+ // This section is only relevant for signed longs and is derived from the
1083
+ // closure library as a whole.
1084
+ if (this.eq(MIN_VALUE)) {
1085
+ if (divisor.eq(ONE) || divisor.eq(NEG_ONE))
1086
+ return MIN_VALUE; // recall that -MIN_VALUE == MIN_VALUE
1087
+ else if (divisor.eq(MIN_VALUE)) return ONE;
1088
+ else {
1089
+ // At this point, we have |other| >= 2, so |this/other| < |MIN_VALUE|.
1090
+ var halfThis = this.shr(1);
1091
+ approx = halfThis.div(divisor).shl(1);
1092
+ if (approx.eq(ZERO)) {
1093
+ return divisor.isNegative() ? ONE : NEG_ONE;
1094
+ } else {
1095
+ rem = this.sub(divisor.mul(approx));
1096
+ res = approx.add(rem.div(divisor));
1097
+ return res;
1098
+ }
1099
+ }
1100
+ } else if (divisor.eq(MIN_VALUE)) return this.unsigned ? UZERO : ZERO;
1101
+ if (this.isNegative()) {
1102
+ if (divisor.isNegative()) return this.neg().div(divisor.neg());
1103
+ return this.neg().div(divisor).neg();
1104
+ } else if (divisor.isNegative()) return this.div(divisor.neg()).neg();
1105
+ res = ZERO;
1106
+ } else {
1107
+ // The algorithm below has not been made for unsigned longs. It's therefore
1108
+ // required to take special care of the MSB prior to running it.
1109
+ if (!divisor.unsigned) divisor = divisor.toUnsigned();
1110
+ if (divisor.gt(this)) return UZERO;
1111
+ if (divisor.gt(this.shru(1)))
1112
+ // 15 >>> 1 = 7 ; with divisor = 8 ; true
1113
+ return UONE;
1114
+ res = UZERO;
1115
+ }
1116
+
1117
+ // Repeat the following until the remainder is less than other: find a
1118
+ // floating-point that approximates remainder / other *from below*, add this
1119
+ // into the result, and subtract it from the remainder. It is critical that
1120
+ // the approximate value is less than or equal to the real value so that the
1121
+ // remainder never becomes negative.
1122
+ rem = this;
1123
+ while (rem.gte(divisor)) {
1124
+ // Approximate the result of division. This may be a little greater or
1125
+ // smaller than the actual value.
1126
+ approx = Math.max(1, Math.floor(rem.toNumber() / divisor.toNumber()));
1127
+
1128
+ // We will tweak the approximate result by changing it in the 48-th digit or
1129
+ // the smallest non-fractional digit, whichever is larger.
1130
+ var log2 = Math.ceil(Math.log(approx) / Math.LN2),
1131
+ delta = log2 <= 48 ? 1 : pow_dbl(2, log2 - 48),
1132
+ // Decrease the approximation until it is smaller than the remainder. Note
1133
+ // that if it is too large, the product overflows and is negative.
1134
+ approxRes = fromNumber(approx),
1135
+ approxRem = approxRes.mul(divisor);
1136
+ while (approxRem.isNegative() || approxRem.gt(rem)) {
1137
+ approx -= delta;
1138
+ approxRes = fromNumber(approx, this.unsigned);
1139
+ approxRem = approxRes.mul(divisor);
1140
+ }
1141
+
1142
+ // We know the answer can't be zero... and actually, zero would cause
1143
+ // infinite recursion since we would make no progress.
1144
+ if (approxRes.isZero()) approxRes = ONE;
1145
+
1146
+ res = res.add(approxRes);
1147
+ rem = rem.sub(approxRem);
1148
+ }
1149
+ return res;
1150
+ };
1151
+
1152
+ /**
1153
+ * Returns this Long divided by the specified. This is an alias of {@link Long#divide}.
1154
+ * @function
1155
+ * @param {!Long|number|bigint|string} divisor Divisor
1156
+ * @returns {!Long} Quotient
1157
+ */
1158
+ LongPrototype.div = LongPrototype.divide;
1159
+
1160
+ /**
1161
+ * Returns this Long modulo the specified.
1162
+ * @this {!Long}
1163
+ * @param {!Long|number|bigint|string} divisor Divisor
1164
+ * @returns {!Long} Remainder
1165
+ */
1166
+ LongPrototype.modulo = function modulo(divisor) {
1167
+ if (!isLong(divisor)) divisor = fromValue(divisor);
1168
+
1169
+ // use wasm support if present
1170
+ if (wasm) {
1171
+ var low = (this.unsigned ? wasm["rem_u"] : wasm["rem_s"])(
1172
+ this.low,
1173
+ this.high,
1174
+ divisor.low,
1175
+ divisor.high,
1176
+ );
1177
+ return fromBits(low, wasm["get_high"](), this.unsigned);
1178
+ }
1179
+
1180
+ return this.sub(this.div(divisor).mul(divisor));
1181
+ };
1182
+
1183
+ /**
1184
+ * Returns this Long modulo the specified. This is an alias of {@link Long#modulo}.
1185
+ * @function
1186
+ * @param {!Long|number|bigint|string} divisor Divisor
1187
+ * @returns {!Long} Remainder
1188
+ */
1189
+ LongPrototype.mod = LongPrototype.modulo;
1190
+
1191
+ /**
1192
+ * Returns this Long modulo the specified. This is an alias of {@link Long#modulo}.
1193
+ * @function
1194
+ * @param {!Long|number|bigint|string} divisor Divisor
1195
+ * @returns {!Long} Remainder
1196
+ */
1197
+ LongPrototype.rem = LongPrototype.modulo;
1198
+
1199
+ /**
1200
+ * Returns the bitwise NOT of this Long.
1201
+ * @this {!Long}
1202
+ * @returns {!Long}
1203
+ */
1204
+ LongPrototype.not = function not() {
1205
+ return fromBits(~this.low, ~this.high, this.unsigned);
1206
+ };
1207
+
1208
+ /**
1209
+ * Returns count leading zeros of this Long.
1210
+ * @this {!Long}
1211
+ * @returns {!number}
1212
+ */
1213
+ LongPrototype.countLeadingZeros = function countLeadingZeros() {
1214
+ return this.high ? Math.clz32(this.high) : Math.clz32(this.low) + 32;
1215
+ };
1216
+
1217
+ /**
1218
+ * Returns count leading zeros. This is an alias of {@link Long#countLeadingZeros}.
1219
+ * @function
1220
+ * @param {!Long}
1221
+ * @returns {!number}
1222
+ */
1223
+ LongPrototype.clz = LongPrototype.countLeadingZeros;
1224
+
1225
+ /**
1226
+ * Returns count trailing zeros of this Long.
1227
+ * @this {!Long}
1228
+ * @returns {!number}
1229
+ */
1230
+ LongPrototype.countTrailingZeros = function countTrailingZeros() {
1231
+ return this.low ? ctz32(this.low) : ctz32(this.high) + 32;
1232
+ };
1233
+
1234
+ /**
1235
+ * Returns count trailing zeros. This is an alias of {@link Long#countTrailingZeros}.
1236
+ * @function
1237
+ * @param {!Long}
1238
+ * @returns {!number}
1239
+ */
1240
+ LongPrototype.ctz = LongPrototype.countTrailingZeros;
1241
+
1242
+ /**
1243
+ * Returns the bitwise AND of this Long and the specified.
1244
+ * @this {!Long}
1245
+ * @param {!Long|number|bigint|string} other Other Long
1246
+ * @returns {!Long}
1247
+ */
1248
+ LongPrototype.and = function and(other) {
1249
+ if (!isLong(other)) other = fromValue(other);
1250
+ return fromBits(this.low & other.low, this.high & other.high, this.unsigned);
1251
+ };
1252
+
1253
+ /**
1254
+ * Returns the bitwise OR of this Long and the specified.
1255
+ * @this {!Long}
1256
+ * @param {!Long|number|bigint|string} other Other Long
1257
+ * @returns {!Long}
1258
+ */
1259
+ LongPrototype.or = function or(other) {
1260
+ if (!isLong(other)) other = fromValue(other);
1261
+ return fromBits(this.low | other.low, this.high | other.high, this.unsigned);
1262
+ };
1263
+
1264
+ /**
1265
+ * Returns the bitwise XOR of this Long and the given one.
1266
+ * @this {!Long}
1267
+ * @param {!Long|number|bigint|string} other Other Long
1268
+ * @returns {!Long}
1269
+ */
1270
+ LongPrototype.xor = function xor(other) {
1271
+ if (!isLong(other)) other = fromValue(other);
1272
+ return fromBits(this.low ^ other.low, this.high ^ other.high, this.unsigned);
1273
+ };
1274
+
1275
+ /**
1276
+ * Returns this Long with bits shifted to the left by the given amount.
1277
+ * @this {!Long}
1278
+ * @param {number|!Long} numBits Number of bits
1279
+ * @returns {!Long} Shifted Long
1280
+ */
1281
+ LongPrototype.shiftLeft = function shiftLeft(numBits) {
1282
+ if (isLong(numBits)) numBits = numBits.toInt();
1283
+ if ((numBits &= 63) === 0) return this;
1284
+ else if (numBits < 32)
1285
+ return fromBits(
1286
+ this.low << numBits,
1287
+ (this.high << numBits) | (this.low >>> (32 - numBits)),
1288
+ this.unsigned,
1289
+ );
1290
+ else return fromBits(0, this.low << (numBits - 32), this.unsigned);
1291
+ };
1292
+
1293
+ /**
1294
+ * Returns this Long with bits shifted to the left by the given amount. This is an alias of {@link Long#shiftLeft}.
1295
+ * @function
1296
+ * @param {number|!Long} numBits Number of bits
1297
+ * @returns {!Long} Shifted Long
1298
+ */
1299
+ LongPrototype.shl = LongPrototype.shiftLeft;
1300
+
1301
+ /**
1302
+ * Returns this Long with bits arithmetically shifted to the right by the given amount.
1303
+ * @this {!Long}
1304
+ * @param {number|!Long} numBits Number of bits
1305
+ * @returns {!Long} Shifted Long
1306
+ */
1307
+ LongPrototype.shiftRight = function shiftRight(numBits) {
1308
+ if (isLong(numBits)) numBits = numBits.toInt();
1309
+ if ((numBits &= 63) === 0) return this;
1310
+ else if (numBits < 32)
1311
+ return fromBits(
1312
+ (this.low >>> numBits) | (this.high << (32 - numBits)),
1313
+ this.high >> numBits,
1314
+ this.unsigned,
1315
+ );
1316
+ else
1317
+ return fromBits(
1318
+ this.high >> (numBits - 32),
1319
+ this.high >= 0 ? 0 : -1,
1320
+ this.unsigned,
1321
+ );
1322
+ };
1323
+
1324
+ /**
1325
+ * Returns this Long with bits arithmetically shifted to the right by the given amount. This is an alias of {@link Long#shiftRight}.
1326
+ * @function
1327
+ * @param {number|!Long} numBits Number of bits
1328
+ * @returns {!Long} Shifted Long
1329
+ */
1330
+ LongPrototype.shr = LongPrototype.shiftRight;
1331
+
1332
+ /**
1333
+ * Returns this Long with bits logically shifted to the right by the given amount.
1334
+ * @this {!Long}
1335
+ * @param {number|!Long} numBits Number of bits
1336
+ * @returns {!Long} Shifted Long
1337
+ */
1338
+ LongPrototype.shiftRightUnsigned = function shiftRightUnsigned(numBits) {
1339
+ if (isLong(numBits)) numBits = numBits.toInt();
1340
+ if ((numBits &= 63) === 0) return this;
1341
+ if (numBits < 32)
1342
+ return fromBits(
1343
+ (this.low >>> numBits) | (this.high << (32 - numBits)),
1344
+ this.high >>> numBits,
1345
+ this.unsigned,
1346
+ );
1347
+ if (numBits === 32) return fromBits(this.high, 0, this.unsigned);
1348
+ return fromBits(this.high >>> (numBits - 32), 0, this.unsigned);
1349
+ };
1350
+
1351
+ /**
1352
+ * Returns this Long with bits logically shifted to the right by the given amount. This is an alias of {@link Long#shiftRightUnsigned}.
1353
+ * @function
1354
+ * @param {number|!Long} numBits Number of bits
1355
+ * @returns {!Long} Shifted Long
1356
+ */
1357
+ LongPrototype.shru = LongPrototype.shiftRightUnsigned;
1358
+
1359
+ /**
1360
+ * Returns this Long with bits logically shifted to the right by the given amount. This is an alias of {@link Long#shiftRightUnsigned}.
1361
+ * @function
1362
+ * @param {number|!Long} numBits Number of bits
1363
+ * @returns {!Long} Shifted Long
1364
+ */
1365
+ LongPrototype.shr_u = LongPrototype.shiftRightUnsigned;
1366
+
1367
+ /**
1368
+ * Returns this Long with bits rotated to the left by the given amount.
1369
+ * @this {!Long}
1370
+ * @param {number|!Long} numBits Number of bits
1371
+ * @returns {!Long} Rotated Long
1372
+ */
1373
+ LongPrototype.rotateLeft = function rotateLeft(numBits) {
1374
+ var b;
1375
+ if (isLong(numBits)) numBits = numBits.toInt();
1376
+ if ((numBits &= 63) === 0) return this;
1377
+ if (numBits === 32) return fromBits(this.high, this.low, this.unsigned);
1378
+ if (numBits < 32) {
1379
+ b = 32 - numBits;
1380
+ return fromBits(
1381
+ (this.low << numBits) | (this.high >>> b),
1382
+ (this.high << numBits) | (this.low >>> b),
1383
+ this.unsigned,
1384
+ );
1385
+ }
1386
+ numBits -= 32;
1387
+ b = 32 - numBits;
1388
+ return fromBits(
1389
+ (this.high << numBits) | (this.low >>> b),
1390
+ (this.low << numBits) | (this.high >>> b),
1391
+ this.unsigned,
1392
+ );
1393
+ };
1394
+ /**
1395
+ * Returns this Long with bits rotated to the left by the given amount. This is an alias of {@link Long#rotateLeft}.
1396
+ * @function
1397
+ * @param {number|!Long} numBits Number of bits
1398
+ * @returns {!Long} Rotated Long
1399
+ */
1400
+ LongPrototype.rotl = LongPrototype.rotateLeft;
1401
+
1402
+ /**
1403
+ * Returns this Long with bits rotated to the right by the given amount.
1404
+ * @this {!Long}
1405
+ * @param {number|!Long} numBits Number of bits
1406
+ * @returns {!Long} Rotated Long
1407
+ */
1408
+ LongPrototype.rotateRight = function rotateRight(numBits) {
1409
+ var b;
1410
+ if (isLong(numBits)) numBits = numBits.toInt();
1411
+ if ((numBits &= 63) === 0) return this;
1412
+ if (numBits === 32) return fromBits(this.high, this.low, this.unsigned);
1413
+ if (numBits < 32) {
1414
+ b = 32 - numBits;
1415
+ return fromBits(
1416
+ (this.high << b) | (this.low >>> numBits),
1417
+ (this.low << b) | (this.high >>> numBits),
1418
+ this.unsigned,
1419
+ );
1420
+ }
1421
+ numBits -= 32;
1422
+ b = 32 - numBits;
1423
+ return fromBits(
1424
+ (this.low << b) | (this.high >>> numBits),
1425
+ (this.high << b) | (this.low >>> numBits),
1426
+ this.unsigned,
1427
+ );
1428
+ };
1429
+ /**
1430
+ * Returns this Long with bits rotated to the right by the given amount. This is an alias of {@link Long#rotateRight}.
1431
+ * @function
1432
+ * @param {number|!Long} numBits Number of bits
1433
+ * @returns {!Long} Rotated Long
1434
+ */
1435
+ LongPrototype.rotr = LongPrototype.rotateRight;
1436
+
1437
+ /**
1438
+ * Converts this Long to signed.
1439
+ * @this {!Long}
1440
+ * @returns {!Long} Signed long
1441
+ */
1442
+ LongPrototype.toSigned = function toSigned() {
1443
+ if (!this.unsigned) return this;
1444
+ return fromBits(this.low, this.high, false);
1445
+ };
1446
+
1447
+ /**
1448
+ * Converts this Long to unsigned.
1449
+ * @this {!Long}
1450
+ * @returns {!Long} Unsigned long
1451
+ */
1452
+ LongPrototype.toUnsigned = function toUnsigned() {
1453
+ if (this.unsigned) return this;
1454
+ return fromBits(this.low, this.high, true);
1455
+ };
1456
+
1457
+ /**
1458
+ * Converts this Long to its byte representation.
1459
+ * @param {boolean=} le Whether little or big endian, defaults to big endian
1460
+ * @this {!Long}
1461
+ * @returns {!Array.<number>} Byte representation
1462
+ */
1463
+ LongPrototype.toBytes = function toBytes(le) {
1464
+ return le ? this.toBytesLE() : this.toBytesBE();
1465
+ };
1466
+
1467
+ /**
1468
+ * Converts this Long to its little endian byte representation.
1469
+ * @this {!Long}
1470
+ * @returns {!Array.<number>} Little endian byte representation
1471
+ */
1472
+ LongPrototype.toBytesLE = function toBytesLE() {
1473
+ var hi = this.high,
1474
+ lo = this.low;
1475
+ return [
1476
+ lo & 0xff,
1477
+ (lo >>> 8) & 0xff,
1478
+ (lo >>> 16) & 0xff,
1479
+ lo >>> 24,
1480
+ hi & 0xff,
1481
+ (hi >>> 8) & 0xff,
1482
+ (hi >>> 16) & 0xff,
1483
+ hi >>> 24,
1484
+ ];
1485
+ };
1486
+
1487
+ /**
1488
+ * Converts this Long to its big endian byte representation.
1489
+ * @this {!Long}
1490
+ * @returns {!Array.<number>} Big endian byte representation
1491
+ */
1492
+ LongPrototype.toBytesBE = function toBytesBE() {
1493
+ var hi = this.high,
1494
+ lo = this.low;
1495
+ return [
1496
+ hi >>> 24,
1497
+ (hi >>> 16) & 0xff,
1498
+ (hi >>> 8) & 0xff,
1499
+ hi & 0xff,
1500
+ lo >>> 24,
1501
+ (lo >>> 16) & 0xff,
1502
+ (lo >>> 8) & 0xff,
1503
+ lo & 0xff,
1504
+ ];
1505
+ };
1506
+
1507
+ /**
1508
+ * Creates a Long from its byte representation.
1509
+ * @param {!Array.<number>} bytes Byte representation
1510
+ * @param {boolean=} unsigned Whether unsigned or not, defaults to signed
1511
+ * @param {boolean=} le Whether little or big endian, defaults to big endian
1512
+ * @returns {Long} The corresponding Long value
1513
+ */
1514
+ Long.fromBytes = function fromBytes(bytes, unsigned, le) {
1515
+ return le
1516
+ ? Long.fromBytesLE(bytes, unsigned)
1517
+ : Long.fromBytesBE(bytes, unsigned);
1518
+ };
1519
+
1520
+ /**
1521
+ * Creates a Long from its little endian byte representation.
1522
+ * @param {!Array.<number>} bytes Little endian byte representation
1523
+ * @param {boolean=} unsigned Whether unsigned or not, defaults to signed
1524
+ * @returns {Long} The corresponding Long value
1525
+ */
1526
+ Long.fromBytesLE = function fromBytesLE(bytes, unsigned) {
1527
+ return new Long(
1528
+ bytes[0] | (bytes[1] << 8) | (bytes[2] << 16) | (bytes[3] << 24),
1529
+ bytes[4] | (bytes[5] << 8) | (bytes[6] << 16) | (bytes[7] << 24),
1530
+ unsigned,
1531
+ );
1532
+ };
1533
+
1534
+ /**
1535
+ * Creates a Long from its big endian byte representation.
1536
+ * @param {!Array.<number>} bytes Big endian byte representation
1537
+ * @param {boolean=} unsigned Whether unsigned or not, defaults to signed
1538
+ * @returns {Long} The corresponding Long value
1539
+ */
1540
+ Long.fromBytesBE = function fromBytesBE(bytes, unsigned) {
1541
+ return new Long(
1542
+ (bytes[4] << 24) | (bytes[5] << 16) | (bytes[6] << 8) | bytes[7],
1543
+ (bytes[0] << 24) | (bytes[1] << 16) | (bytes[2] << 8) | bytes[3],
1544
+ unsigned,
1545
+ );
1546
+ };
1547
+
1548
+ // Support conversion to/from BigInt where available
1549
+ if (typeof BigInt === "function") {
1550
+ /**
1551
+ * Returns a Long representing the given big integer.
1552
+ * @function
1553
+ * @param {number} value The big integer value
1554
+ * @param {boolean=} unsigned Whether unsigned or not, defaults to signed
1555
+ * @returns {!Long} The corresponding Long value
1556
+ */
1557
+ Long.fromBigInt = function fromBigInt(value, unsigned) {
1558
+ var lowBits = Number(BigInt.asIntN(32, value));
1559
+ var highBits = Number(BigInt.asIntN(32, value >> BigInt(32)));
1560
+ return fromBits(lowBits, highBits, unsigned);
1561
+ };
1562
+
1563
+ // Override
1564
+ Long.fromValue = function fromValueWithBigInt(value, unsigned) {
1565
+ if (typeof value === "bigint") return Long.fromBigInt(value, unsigned);
1566
+ return fromValue(value, unsigned);
1567
+ };
1568
+
1569
+ /**
1570
+ * Converts the Long to its big integer representation.
1571
+ * @this {!Long}
1572
+ * @returns {bigint}
1573
+ */
1574
+ LongPrototype.toBigInt = function toBigInt() {
1575
+ var lowBigInt = BigInt(this.low >>> 0);
1576
+ var highBigInt = BigInt(this.unsigned ? this.high >>> 0 : this.high);
1577
+ return (highBigInt << BigInt(32)) | lowBigInt;
1578
+ };
1579
+ }
1580
+
1581
+ export default Long;