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