node-red-contrib-tak-registration 0.14.0 → 0.15.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 (447) hide show
  1. package/README.md +1 -1
  2. package/node_modules/@types/geojson/README.md +1 -1
  3. package/node_modules/@types/geojson/index.d.ts +36 -2
  4. package/node_modules/@types/geojson/package.json +2 -2
  5. package/node_modules/@types/node/README.md +2 -2
  6. package/node_modules/@types/node/assert.d.ts +14 -0
  7. package/node_modules/@types/node/async_hooks.d.ts +64 -2
  8. package/node_modules/@types/node/buffer.buffer.d.ts +117 -39
  9. package/node_modules/@types/node/buffer.d.ts +6 -13
  10. package/node_modules/@types/node/cluster.d.ts +1 -1
  11. package/node_modules/@types/node/constants.d.ts +14 -12
  12. package/node_modules/@types/node/crypto.d.ts +44 -10
  13. package/node_modules/@types/node/dgram.d.ts +10 -7
  14. package/node_modules/@types/node/diagnostics_channel.d.ts +20 -1
  15. package/node_modules/@types/node/fs/promises.d.ts +23 -26
  16. package/node_modules/@types/node/fs.d.ts +166 -125
  17. package/node_modules/@types/node/globals.d.ts +141 -338
  18. package/node_modules/@types/node/http.d.ts +25 -3
  19. package/node_modules/@types/node/http2.d.ts +3 -4
  20. package/node_modules/@types/node/https.d.ts +3 -1
  21. package/node_modules/@types/node/inspector.d.ts +36 -0
  22. package/node_modules/@types/node/module.d.ts +599 -236
  23. package/node_modules/@types/node/net.d.ts +44 -13
  24. package/node_modules/@types/node/package.json +9 -4
  25. package/node_modules/@types/node/perf_hooks.d.ts +5 -0
  26. package/node_modules/@types/node/process.d.ts +69 -2
  27. package/node_modules/@types/node/querystring.d.ts +2 -3
  28. package/node_modules/@types/node/readline.d.ts +6 -1
  29. package/node_modules/@types/node/sea.d.ts +1 -1
  30. package/node_modules/@types/node/sqlite.d.ts +291 -17
  31. package/node_modules/@types/node/stream/consumers.d.ts +32 -6
  32. package/node_modules/@types/node/stream/web.d.ts +9 -4
  33. package/node_modules/@types/node/stream.d.ts +936 -1000
  34. package/node_modules/@types/node/test.d.ts +169 -137
  35. package/node_modules/@types/node/timers/promises.d.ts +24 -13
  36. package/node_modules/@types/node/timers.d.ts +159 -112
  37. package/node_modules/@types/node/tls.d.ts +34 -1
  38. package/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +110 -35
  39. package/node_modules/@types/node/util.d.ts +323 -110
  40. package/node_modules/@types/node/v8.d.ts +81 -0
  41. package/node_modules/@types/node/vm.d.ts +21 -6
  42. package/node_modules/@types/node/worker_threads.d.ts +1 -0
  43. package/node_modules/@types/node/zlib.d.ts +167 -36
  44. package/node_modules/axios/CHANGELOG.md +124 -0
  45. package/node_modules/axios/README.md +38 -16
  46. package/node_modules/axios/dist/axios.js +44 -39
  47. package/node_modules/axios/dist/axios.js.map +1 -1
  48. package/node_modules/axios/dist/axios.min.js +2 -1
  49. package/node_modules/axios/dist/axios.min.js.map +1 -1
  50. package/node_modules/axios/dist/browser/axios.cjs +43 -39
  51. package/node_modules/axios/dist/browser/axios.cjs.map +1 -1
  52. package/node_modules/axios/dist/esm/axios.js +43 -39
  53. package/node_modules/axios/dist/esm/axios.js.map +1 -1
  54. package/node_modules/axios/dist/esm/axios.min.js +2 -1
  55. package/node_modules/axios/dist/esm/axios.min.js.map +1 -1
  56. package/node_modules/axios/dist/node/axios.cjs +74 -43
  57. package/node_modules/axios/dist/node/axios.cjs.map +1 -1
  58. package/node_modules/axios/index.d.cts +3 -2
  59. package/node_modules/axios/index.d.ts +5 -2
  60. package/node_modules/axios/lib/adapters/fetch.js +1 -1
  61. package/node_modules/axios/lib/adapters/http.js +1 -1
  62. package/node_modules/axios/lib/core/Axios.js +11 -2
  63. package/node_modules/axios/lib/core/AxiosHeaders.js +15 -3
  64. package/node_modules/axios/lib/core/buildFullPath.js +3 -2
  65. package/node_modules/axios/lib/env/data.js +1 -1
  66. package/node_modules/axios/lib/helpers/formDataToStream.js +4 -3
  67. package/node_modules/axios/lib/helpers/resolveConfig.js +1 -1
  68. package/node_modules/axios/lib/platform/node/index.js +26 -0
  69. package/node_modules/axios/lib/utils.js +12 -28
  70. package/node_modules/axios/package.json +3 -3
  71. package/node_modules/bignumber.js/CHANGELOG.md +82 -1
  72. package/node_modules/bignumber.js/LICENCE.md +1 -1
  73. package/node_modules/bignumber.js/README.md +6 -4
  74. package/node_modules/bignumber.js/bignumber.d.mts +6 -0
  75. package/node_modules/bignumber.js/bignumber.d.ts +3 -1829
  76. package/node_modules/bignumber.js/bignumber.js +3 -3
  77. package/node_modules/bignumber.js/bignumber.mjs +3 -3
  78. package/node_modules/bignumber.js/package.json +17 -7
  79. package/node_modules/bignumber.js/types.d.ts +1821 -0
  80. package/node_modules/call-bind-apply-helpers/.eslintrc +17 -0
  81. package/node_modules/call-bind-apply-helpers/.github/FUNDING.yml +12 -0
  82. package/node_modules/call-bind-apply-helpers/.nycrc +9 -0
  83. package/node_modules/call-bind-apply-helpers/CHANGELOG.md +30 -0
  84. package/node_modules/call-bind-apply-helpers/LICENSE +21 -0
  85. package/node_modules/call-bind-apply-helpers/README.md +62 -0
  86. package/node_modules/call-bind-apply-helpers/actualApply.d.ts +1 -0
  87. package/node_modules/call-bind-apply-helpers/actualApply.js +10 -0
  88. package/node_modules/call-bind-apply-helpers/applyBind.d.ts +19 -0
  89. package/node_modules/call-bind-apply-helpers/applyBind.js +10 -0
  90. package/node_modules/call-bind-apply-helpers/functionApply.d.ts +1 -0
  91. package/node_modules/call-bind-apply-helpers/functionApply.js +4 -0
  92. package/node_modules/call-bind-apply-helpers/functionCall.d.ts +1 -0
  93. package/node_modules/call-bind-apply-helpers/functionCall.js +4 -0
  94. package/node_modules/call-bind-apply-helpers/index.d.ts +64 -0
  95. package/node_modules/call-bind-apply-helpers/index.js +15 -0
  96. package/node_modules/call-bind-apply-helpers/package.json +85 -0
  97. package/node_modules/call-bind-apply-helpers/reflectApply.d.ts +3 -0
  98. package/node_modules/call-bind-apply-helpers/reflectApply.js +4 -0
  99. package/node_modules/call-bind-apply-helpers/test/index.js +63 -0
  100. package/node_modules/call-bind-apply-helpers/tsconfig.json +9 -0
  101. package/node_modules/dunder-proto/.eslintrc +5 -0
  102. package/node_modules/dunder-proto/.github/FUNDING.yml +12 -0
  103. package/node_modules/dunder-proto/.nycrc +13 -0
  104. package/node_modules/dunder-proto/CHANGELOG.md +24 -0
  105. package/node_modules/dunder-proto/LICENSE +21 -0
  106. package/node_modules/dunder-proto/README.md +54 -0
  107. package/node_modules/dunder-proto/get.d.ts +5 -0
  108. package/node_modules/dunder-proto/get.js +30 -0
  109. package/node_modules/dunder-proto/package.json +76 -0
  110. package/node_modules/dunder-proto/set.d.ts +5 -0
  111. package/node_modules/dunder-proto/set.js +35 -0
  112. package/node_modules/dunder-proto/test/get.js +34 -0
  113. package/node_modules/dunder-proto/test/index.js +4 -0
  114. package/node_modules/dunder-proto/test/set.js +50 -0
  115. package/node_modules/dunder-proto/tsconfig.json +9 -0
  116. package/node_modules/es-define-property/.eslintrc +13 -0
  117. package/node_modules/es-define-property/.github/FUNDING.yml +12 -0
  118. package/node_modules/es-define-property/.nycrc +9 -0
  119. package/node_modules/es-define-property/CHANGELOG.md +29 -0
  120. package/node_modules/es-define-property/LICENSE +21 -0
  121. package/node_modules/es-define-property/README.md +49 -0
  122. package/node_modules/es-define-property/index.d.ts +3 -0
  123. package/node_modules/es-define-property/index.js +14 -0
  124. package/node_modules/es-define-property/package.json +81 -0
  125. package/node_modules/es-define-property/test/index.js +56 -0
  126. package/node_modules/es-define-property/tsconfig.json +10 -0
  127. package/node_modules/es-errors/.eslintrc +5 -0
  128. package/node_modules/es-errors/.github/FUNDING.yml +12 -0
  129. package/node_modules/es-errors/CHANGELOG.md +40 -0
  130. package/node_modules/es-errors/LICENSE +21 -0
  131. package/node_modules/es-errors/README.md +55 -0
  132. package/node_modules/es-errors/eval.d.ts +3 -0
  133. package/node_modules/es-errors/eval.js +4 -0
  134. package/node_modules/es-errors/index.d.ts +3 -0
  135. package/node_modules/es-errors/index.js +4 -0
  136. package/node_modules/es-errors/package.json +80 -0
  137. package/node_modules/es-errors/range.d.ts +3 -0
  138. package/node_modules/es-errors/range.js +4 -0
  139. package/node_modules/es-errors/ref.d.ts +3 -0
  140. package/node_modules/es-errors/ref.js +4 -0
  141. package/node_modules/es-errors/syntax.d.ts +3 -0
  142. package/node_modules/es-errors/syntax.js +4 -0
  143. package/node_modules/es-errors/test/index.js +19 -0
  144. package/node_modules/es-errors/tsconfig.json +49 -0
  145. package/node_modules/es-errors/type.d.ts +3 -0
  146. package/node_modules/es-errors/type.js +4 -0
  147. package/node_modules/es-errors/uri.d.ts +3 -0
  148. package/node_modules/es-errors/uri.js +4 -0
  149. package/node_modules/es-object-atoms/.eslintrc +16 -0
  150. package/node_modules/es-object-atoms/.github/FUNDING.yml +12 -0
  151. package/node_modules/es-object-atoms/CHANGELOG.md +37 -0
  152. package/node_modules/es-object-atoms/LICENSE +21 -0
  153. package/node_modules/es-object-atoms/README.md +63 -0
  154. package/node_modules/es-object-atoms/RequireObjectCoercible.d.ts +3 -0
  155. package/node_modules/es-object-atoms/RequireObjectCoercible.js +11 -0
  156. package/node_modules/es-object-atoms/ToObject.d.ts +7 -0
  157. package/node_modules/es-object-atoms/ToObject.js +10 -0
  158. package/node_modules/es-object-atoms/index.d.ts +3 -0
  159. package/node_modules/es-object-atoms/index.js +4 -0
  160. package/node_modules/es-object-atoms/isObject.d.ts +3 -0
  161. package/node_modules/es-object-atoms/isObject.js +6 -0
  162. package/node_modules/es-object-atoms/package.json +80 -0
  163. package/node_modules/es-object-atoms/test/index.js +38 -0
  164. package/node_modules/es-object-atoms/tsconfig.json +6 -0
  165. package/node_modules/es-set-tostringtag/.eslintrc +13 -0
  166. package/node_modules/es-set-tostringtag/.nycrc +9 -0
  167. package/node_modules/es-set-tostringtag/CHANGELOG.md +67 -0
  168. package/node_modules/es-set-tostringtag/LICENSE +21 -0
  169. package/node_modules/es-set-tostringtag/README.md +53 -0
  170. package/node_modules/es-set-tostringtag/index.d.ts +10 -0
  171. package/node_modules/es-set-tostringtag/index.js +35 -0
  172. package/node_modules/es-set-tostringtag/package.json +78 -0
  173. package/node_modules/es-set-tostringtag/test/index.js +85 -0
  174. package/node_modules/es-set-tostringtag/tsconfig.json +9 -0
  175. package/node_modules/fast-xml-parser/CHANGELOG.md +63 -0
  176. package/node_modules/fast-xml-parser/README.md +37 -51
  177. package/node_modules/fast-xml-parser/lib/fxbuilder.min.js +2 -0
  178. package/node_modules/fast-xml-parser/lib/fxbuilder.min.js.map +1 -0
  179. package/node_modules/fast-xml-parser/lib/fxp.cjs +1 -0
  180. package/node_modules/fast-xml-parser/lib/fxp.d.cts +458 -0
  181. package/node_modules/fast-xml-parser/lib/fxp.min.js +2 -0
  182. package/node_modules/fast-xml-parser/lib/fxp.min.js.map +1 -0
  183. package/node_modules/fast-xml-parser/lib/fxparser.min.js +2 -0
  184. package/node_modules/fast-xml-parser/lib/fxparser.min.js.map +1 -0
  185. package/node_modules/fast-xml-parser/lib/fxvalidator.min.js +2 -0
  186. package/node_modules/fast-xml-parser/lib/fxvalidator.min.js.map +1 -0
  187. package/node_modules/fast-xml-parser/package.json +36 -18
  188. package/node_modules/fast-xml-parser/src/cli/cli.js +12 -12
  189. package/node_modules/fast-xml-parser/src/cli/man.js +6 -1
  190. package/node_modules/fast-xml-parser/src/cli/read.js +30 -79
  191. package/node_modules/fast-xml-parser/src/fxp.d.ts +28 -1
  192. package/node_modules/fast-xml-parser/src/fxp.js +11 -8
  193. package/node_modules/fast-xml-parser/src/ignoreAttributes.js +2 -4
  194. package/node_modules/fast-xml-parser/src/util.js +14 -18
  195. package/node_modules/fast-xml-parser/src/{v5 → v6}/CharsSymbol.js +1 -1
  196. package/node_modules/fast-xml-parser/src/{v5 → v6}/EntitiesParser.js +3 -6
  197. package/node_modules/fast-xml-parser/src/{v5 → v6}/OptionsBuilder.js +3 -6
  198. package/node_modules/fast-xml-parser/src/{v5 → v6}/OutputBuilders/BaseOutputBuilder.js +1 -3
  199. package/node_modules/fast-xml-parser/src/{v5 → v6}/OutputBuilders/JsArrBuilder.js +3 -3
  200. package/node_modules/fast-xml-parser/src/{v5 → v6}/OutputBuilders/JsMinArrBuilder.js +3 -5
  201. package/node_modules/fast-xml-parser/src/{v5 → v6}/OutputBuilders/JsObjBuilder.js +3 -5
  202. package/node_modules/fast-xml-parser/src/{v5 → v6}/OutputBuilders/ParserOptionsBuilder.js +6 -11
  203. package/node_modules/fast-xml-parser/src/{v5 → v6}/TagPath.js +1 -1
  204. package/node_modules/fast-xml-parser/src/{v5 → v6}/TagPathMatcher.js +3 -5
  205. package/node_modules/fast-xml-parser/src/{v5 → v6}/XMLParser.js +3 -5
  206. package/node_modules/fast-xml-parser/src/{v5 → v6}/Xml2JsParser.js +8 -10
  207. package/node_modules/fast-xml-parser/src/{v5 → v6}/XmlPartReader.js +4 -10
  208. package/node_modules/fast-xml-parser/src/{v5 → v6}/XmlSpecialTagsReader.js +5 -12
  209. package/node_modules/fast-xml-parser/src/{v5 → v6}/inputSource/BufferSource.js +1 -3
  210. package/node_modules/fast-xml-parser/src/{v5 → v6}/inputSource/StringSource.js +1 -3
  211. package/node_modules/fast-xml-parser/src/{v5 → v6}/valueParsers/EntitiesParser.js +3 -5
  212. package/node_modules/fast-xml-parser/src/{v5 → v6}/valueParsers/booleanParser.js +1 -2
  213. package/node_modules/fast-xml-parser/src/{v5 → v6}/valueParsers/booleanParserExt.js +1 -2
  214. package/node_modules/fast-xml-parser/src/{v5 → v6}/valueParsers/currency.js +1 -3
  215. package/node_modules/fast-xml-parser/src/{v5 → v6}/valueParsers/join.js +1 -2
  216. package/node_modules/fast-xml-parser/src/{v5 → v6}/valueParsers/number.js +2 -4
  217. package/node_modules/fast-xml-parser/src/{v5 → v6}/valueParsers/trim.js +1 -3
  218. package/node_modules/fast-xml-parser/src/validator.js +5 -5
  219. package/node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js +5 -4
  220. package/node_modules/fast-xml-parser/src/xmlbuilder/orderedJs2Xml.js +1 -2
  221. package/node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js +287 -71
  222. package/node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js +3 -5
  223. package/node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js +23 -23
  224. package/node_modules/fast-xml-parser/src/xmlparser/XMLParser.js +21 -8
  225. package/node_modules/fast-xml-parser/src/xmlparser/node2json.js +8 -2
  226. package/node_modules/fast-xml-parser/src/xmlparser/xmlNode.js +22 -7
  227. package/node_modules/form-data/lib/form_data.js +24 -22
  228. package/node_modules/form-data/package.json +17 -14
  229. package/node_modules/function-bind/.eslintrc +21 -0
  230. package/node_modules/function-bind/.github/FUNDING.yml +12 -0
  231. package/node_modules/function-bind/.github/SECURITY.md +3 -0
  232. package/node_modules/function-bind/.nycrc +13 -0
  233. package/node_modules/function-bind/CHANGELOG.md +136 -0
  234. package/node_modules/function-bind/LICENSE +20 -0
  235. package/node_modules/function-bind/README.md +46 -0
  236. package/node_modules/function-bind/implementation.js +84 -0
  237. package/node_modules/function-bind/index.js +5 -0
  238. package/node_modules/function-bind/package.json +87 -0
  239. package/node_modules/function-bind/test/.eslintrc +9 -0
  240. package/node_modules/function-bind/test/index.js +252 -0
  241. package/node_modules/get-intrinsic/.eslintrc +42 -0
  242. package/node_modules/get-intrinsic/.github/FUNDING.yml +12 -0
  243. package/node_modules/get-intrinsic/.nycrc +9 -0
  244. package/node_modules/get-intrinsic/CHANGELOG.md +186 -0
  245. package/node_modules/get-intrinsic/LICENSE +21 -0
  246. package/node_modules/get-intrinsic/README.md +71 -0
  247. package/node_modules/get-intrinsic/index.js +378 -0
  248. package/node_modules/get-intrinsic/package.json +97 -0
  249. package/node_modules/get-intrinsic/test/GetIntrinsic.js +274 -0
  250. package/node_modules/get-proto/.eslintrc +10 -0
  251. package/node_modules/get-proto/.github/FUNDING.yml +12 -0
  252. package/node_modules/get-proto/.nycrc +9 -0
  253. package/node_modules/get-proto/CHANGELOG.md +21 -0
  254. package/node_modules/get-proto/LICENSE +21 -0
  255. package/node_modules/get-proto/Object.getPrototypeOf.d.ts +5 -0
  256. package/node_modules/get-proto/Object.getPrototypeOf.js +6 -0
  257. package/node_modules/get-proto/README.md +50 -0
  258. package/node_modules/get-proto/Reflect.getPrototypeOf.d.ts +3 -0
  259. package/node_modules/get-proto/Reflect.getPrototypeOf.js +4 -0
  260. package/node_modules/get-proto/index.d.ts +5 -0
  261. package/node_modules/get-proto/index.js +27 -0
  262. package/node_modules/get-proto/package.json +81 -0
  263. package/node_modules/get-proto/test/index.js +68 -0
  264. package/node_modules/get-proto/tsconfig.json +9 -0
  265. package/node_modules/gopd/.eslintrc +16 -0
  266. package/node_modules/gopd/.github/FUNDING.yml +12 -0
  267. package/node_modules/gopd/CHANGELOG.md +45 -0
  268. package/node_modules/gopd/LICENSE +21 -0
  269. package/node_modules/gopd/README.md +40 -0
  270. package/node_modules/gopd/gOPD.d.ts +1 -0
  271. package/node_modules/gopd/gOPD.js +4 -0
  272. package/node_modules/gopd/index.d.ts +5 -0
  273. package/node_modules/gopd/index.js +15 -0
  274. package/node_modules/gopd/package.json +77 -0
  275. package/node_modules/gopd/test/index.js +36 -0
  276. package/node_modules/gopd/tsconfig.json +9 -0
  277. package/node_modules/has-symbols/.eslintrc +11 -0
  278. package/node_modules/has-symbols/.github/FUNDING.yml +12 -0
  279. package/node_modules/has-symbols/.nycrc +9 -0
  280. package/node_modules/has-symbols/CHANGELOG.md +91 -0
  281. package/node_modules/has-symbols/LICENSE +21 -0
  282. package/node_modules/has-symbols/README.md +46 -0
  283. package/node_modules/has-symbols/index.d.ts +3 -0
  284. package/node_modules/has-symbols/index.js +14 -0
  285. package/node_modules/has-symbols/package.json +111 -0
  286. package/node_modules/has-symbols/shams.d.ts +3 -0
  287. package/node_modules/has-symbols/shams.js +45 -0
  288. package/node_modules/has-symbols/test/index.js +22 -0
  289. package/node_modules/has-symbols/test/shams/core-js.js +29 -0
  290. package/node_modules/has-symbols/test/shams/get-own-property-symbols.js +29 -0
  291. package/node_modules/has-symbols/test/tests.js +58 -0
  292. package/node_modules/has-symbols/tsconfig.json +10 -0
  293. package/node_modules/has-tostringtag/.eslintrc +5 -0
  294. package/node_modules/has-tostringtag/.github/FUNDING.yml +12 -0
  295. package/node_modules/has-tostringtag/.nycrc +13 -0
  296. package/node_modules/has-tostringtag/CHANGELOG.md +42 -0
  297. package/node_modules/has-tostringtag/LICENSE +21 -0
  298. package/node_modules/has-tostringtag/README.md +46 -0
  299. package/node_modules/has-tostringtag/index.d.ts +3 -0
  300. package/node_modules/has-tostringtag/index.js +8 -0
  301. package/node_modules/has-tostringtag/package.json +108 -0
  302. package/node_modules/has-tostringtag/shams.d.ts +3 -0
  303. package/node_modules/has-tostringtag/shams.js +8 -0
  304. package/node_modules/has-tostringtag/test/index.js +21 -0
  305. package/node_modules/has-tostringtag/test/shams/core-js.js +31 -0
  306. package/node_modules/has-tostringtag/test/shams/get-own-property-symbols.js +30 -0
  307. package/node_modules/has-tostringtag/test/tests.js +15 -0
  308. package/node_modules/has-tostringtag/tsconfig.json +49 -0
  309. package/node_modules/hasown/.eslintrc +5 -0
  310. package/node_modules/hasown/.github/FUNDING.yml +12 -0
  311. package/node_modules/hasown/.nycrc +13 -0
  312. package/node_modules/hasown/CHANGELOG.md +40 -0
  313. package/node_modules/hasown/LICENSE +21 -0
  314. package/node_modules/hasown/README.md +40 -0
  315. package/node_modules/hasown/index.d.ts +3 -0
  316. package/node_modules/hasown/index.js +8 -0
  317. package/node_modules/hasown/package.json +92 -0
  318. package/node_modules/hasown/tsconfig.json +6 -0
  319. package/node_modules/long/README.md +93 -87
  320. package/node_modules/long/index.d.ts +2 -2
  321. package/node_modules/long/index.js +360 -246
  322. package/node_modules/long/package.json +12 -4
  323. package/node_modules/long/types.d.ts +474 -0
  324. package/node_modules/long/umd/index.d.ts +2 -456
  325. package/node_modules/long/umd/index.js +1585 -1395
  326. package/node_modules/long/umd/types.d.ts +474 -0
  327. package/node_modules/math-intrinsics/.eslintrc +16 -0
  328. package/node_modules/math-intrinsics/.github/FUNDING.yml +12 -0
  329. package/node_modules/math-intrinsics/CHANGELOG.md +24 -0
  330. package/node_modules/math-intrinsics/LICENSE +21 -0
  331. package/node_modules/math-intrinsics/README.md +50 -0
  332. package/node_modules/math-intrinsics/abs.d.ts +1 -0
  333. package/node_modules/math-intrinsics/abs.js +4 -0
  334. package/node_modules/math-intrinsics/constants/maxArrayLength.d.ts +3 -0
  335. package/node_modules/math-intrinsics/constants/maxArrayLength.js +4 -0
  336. package/node_modules/math-intrinsics/constants/maxSafeInteger.d.ts +3 -0
  337. package/node_modules/math-intrinsics/constants/maxSafeInteger.js +5 -0
  338. package/node_modules/math-intrinsics/constants/maxValue.d.ts +3 -0
  339. package/node_modules/math-intrinsics/constants/maxValue.js +5 -0
  340. package/node_modules/math-intrinsics/floor.d.ts +1 -0
  341. package/node_modules/math-intrinsics/floor.js +4 -0
  342. package/node_modules/math-intrinsics/isFinite.d.ts +3 -0
  343. package/node_modules/math-intrinsics/isFinite.js +12 -0
  344. package/node_modules/math-intrinsics/isInteger.d.ts +3 -0
  345. package/node_modules/math-intrinsics/isInteger.js +16 -0
  346. package/node_modules/math-intrinsics/isNaN.d.ts +1 -0
  347. package/node_modules/math-intrinsics/isNaN.js +6 -0
  348. package/node_modules/math-intrinsics/isNegativeZero.d.ts +3 -0
  349. package/node_modules/math-intrinsics/isNegativeZero.js +6 -0
  350. package/node_modules/math-intrinsics/max.d.ts +1 -0
  351. package/node_modules/math-intrinsics/max.js +4 -0
  352. package/node_modules/math-intrinsics/min.d.ts +1 -0
  353. package/node_modules/math-intrinsics/min.js +4 -0
  354. package/node_modules/math-intrinsics/mod.d.ts +3 -0
  355. package/node_modules/math-intrinsics/mod.js +9 -0
  356. package/node_modules/math-intrinsics/package.json +86 -0
  357. package/node_modules/math-intrinsics/pow.d.ts +1 -0
  358. package/node_modules/math-intrinsics/pow.js +4 -0
  359. package/node_modules/math-intrinsics/round.d.ts +1 -0
  360. package/node_modules/math-intrinsics/round.js +4 -0
  361. package/node_modules/math-intrinsics/sign.d.ts +3 -0
  362. package/node_modules/math-intrinsics/sign.js +11 -0
  363. package/node_modules/math-intrinsics/test/index.js +192 -0
  364. package/node_modules/math-intrinsics/tsconfig.json +3 -0
  365. package/node_modules/protobufjs/dist/light/protobuf.js +531 -80
  366. package/node_modules/protobufjs/dist/light/protobuf.js.map +1 -1
  367. package/node_modules/protobufjs/dist/light/protobuf.min.js +3 -3
  368. package/node_modules/protobufjs/dist/light/protobuf.min.js.map +1 -1
  369. package/node_modules/protobufjs/dist/minimal/protobuf.js +2 -2
  370. package/node_modules/protobufjs/dist/minimal/protobuf.min.js +2 -2
  371. package/node_modules/protobufjs/dist/protobuf.js +671 -144
  372. package/node_modules/protobufjs/dist/protobuf.js.map +1 -1
  373. package/node_modules/protobufjs/dist/protobuf.min.js +3 -3
  374. package/node_modules/protobufjs/dist/protobuf.min.js.map +1 -1
  375. package/node_modules/protobufjs/index.d.ts +71 -13
  376. package/node_modules/protobufjs/package.json +4 -2
  377. package/node_modules/protobufjs/src/decoder.js +8 -10
  378. package/node_modules/protobufjs/src/encoder.js +1 -1
  379. package/node_modules/protobufjs/src/enum.js +25 -0
  380. package/node_modules/protobufjs/src/field.js +104 -28
  381. package/node_modules/protobufjs/src/namespace.js +124 -13
  382. package/node_modules/protobufjs/src/object.js +139 -4
  383. package/node_modules/protobufjs/src/oneof.js +19 -0
  384. package/node_modules/protobufjs/src/parse.js +139 -63
  385. package/node_modules/protobufjs/src/root.js +52 -15
  386. package/node_modules/protobufjs/src/service.js +23 -1
  387. package/node_modules/protobufjs/src/type.js +29 -4
  388. package/node_modules/protobufjs/src/util.js +4 -1
  389. package/node_modules/strnum/.github/SECURITY.md +5 -0
  390. package/node_modules/strnum/CHANGELOG.md +33 -0
  391. package/node_modules/strnum/README.md +14 -3
  392. package/node_modules/strnum/algo.stflow +84 -0
  393. package/node_modules/strnum/package.json +9 -2
  394. package/node_modules/strnum/strnum.js +72 -67
  395. package/node_modules/strnum/strnum.test.js +29 -6
  396. package/node_modules/strnum/test.js +9 -0
  397. package/node_modules/undici-types/dispatcher.d.ts +1 -0
  398. package/node_modules/undici-types/package.json +1 -1
  399. package/node_modules/undici-types/readable.d.ts +5 -0
  400. package/node_modules/undici-types/webidl.d.ts +6 -0
  401. package/node_modules/uuid/README.md +12 -12
  402. package/node_modules/uuid/dist/cjs/types.d.ts +1 -1
  403. package/node_modules/uuid/dist/cjs/v1.d.ts +1 -1
  404. package/node_modules/uuid/dist/cjs/v1.js +1 -1
  405. package/node_modules/uuid/dist/cjs/v3.d.ts +1 -1
  406. package/node_modules/uuid/dist/cjs/v35.d.ts +1 -1
  407. package/node_modules/uuid/dist/cjs/v4.d.ts +1 -1
  408. package/node_modules/uuid/dist/cjs/v5.d.ts +1 -1
  409. package/node_modules/uuid/dist/cjs/v6.d.ts +1 -1
  410. package/node_modules/uuid/dist/cjs/v7.d.ts +1 -1
  411. package/node_modules/uuid/dist/cjs/v7.js +1 -1
  412. package/node_modules/uuid/dist/cjs-browser/types.d.ts +1 -1
  413. package/node_modules/uuid/dist/cjs-browser/v1.d.ts +1 -1
  414. package/node_modules/uuid/dist/cjs-browser/v1.js +1 -1
  415. package/node_modules/uuid/dist/cjs-browser/v3.d.ts +1 -1
  416. package/node_modules/uuid/dist/cjs-browser/v35.d.ts +1 -1
  417. package/node_modules/uuid/dist/cjs-browser/v4.d.ts +1 -1
  418. package/node_modules/uuid/dist/cjs-browser/v5.d.ts +1 -1
  419. package/node_modules/uuid/dist/cjs-browser/v6.d.ts +1 -1
  420. package/node_modules/uuid/dist/cjs-browser/v7.d.ts +1 -1
  421. package/node_modules/uuid/dist/cjs-browser/v7.js +1 -1
  422. package/node_modules/uuid/dist/esm/types.d.ts +1 -1
  423. package/node_modules/uuid/dist/esm/v1.d.ts +1 -1
  424. package/node_modules/uuid/dist/esm/v1.js +1 -1
  425. package/node_modules/uuid/dist/esm/v3.d.ts +1 -1
  426. package/node_modules/uuid/dist/esm/v35.d.ts +1 -1
  427. package/node_modules/uuid/dist/esm/v4.d.ts +1 -1
  428. package/node_modules/uuid/dist/esm/v5.d.ts +1 -1
  429. package/node_modules/uuid/dist/esm/v6.d.ts +1 -1
  430. package/node_modules/uuid/dist/esm/v7.d.ts +1 -1
  431. package/node_modules/uuid/dist/esm/v7.js +1 -1
  432. package/node_modules/uuid/dist/esm-browser/types.d.ts +1 -1
  433. package/node_modules/uuid/dist/esm-browser/v1.d.ts +1 -1
  434. package/node_modules/uuid/dist/esm-browser/v1.js +1 -1
  435. package/node_modules/uuid/dist/esm-browser/v3.d.ts +1 -1
  436. package/node_modules/uuid/dist/esm-browser/v35.d.ts +1 -1
  437. package/node_modules/uuid/dist/esm-browser/v4.d.ts +1 -1
  438. package/node_modules/uuid/dist/esm-browser/v5.d.ts +1 -1
  439. package/node_modules/uuid/dist/esm-browser/v6.d.ts +1 -1
  440. package/node_modules/uuid/dist/esm-browser/v7.d.ts +1 -1
  441. package/node_modules/uuid/dist/esm-browser/v7.js +1 -1
  442. package/node_modules/uuid/package.json +1 -1
  443. package/package.json +7 -7
  444. package/tak-registration.html +4 -4
  445. package/tak-registration.js +16 -7
  446. package/node_modules/axios/SECURITY.md +0 -6
  447. /package/node_modules/fast-xml-parser/src/{v5 → v6}/Report.js +0 -0
@@ -21,10 +21,85 @@
21
21
  // WebAssembly optimizations to do native i64 multiplication and divide
22
22
  var wasm = null;
23
23
  try {
24
- wasm = new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([
25
- 0, 97, 115, 109, 1, 0, 0, 0, 1, 13, 2, 96, 0, 1, 127, 96, 4, 127, 127, 127, 127, 1, 127, 3, 7, 6, 0, 1, 1, 1, 1, 1, 6, 6, 1, 127, 1, 65, 0, 11, 7, 50, 6, 3, 109, 117, 108, 0, 1, 5, 100, 105, 118, 95, 115, 0, 2, 5, 100, 105, 118, 95, 117, 0, 3, 5, 114, 101, 109, 95, 115, 0, 4, 5, 114, 101, 109, 95, 117, 0, 5, 8, 103, 101, 116, 95, 104, 105, 103, 104, 0, 0, 10, 191, 1, 6, 4, 0, 35, 0, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 126, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 127, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 128, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 129, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 130, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11
26
- ])), {}).exports;
27
- } catch (e) {
24
+ wasm = new WebAssembly.Instance(
25
+ new WebAssembly.Module(
26
+ new Uint8Array([
27
+ // \0asm
28
+ 0, 97, 115, 109,
29
+ // version 1
30
+ 1, 0, 0, 0,
31
+
32
+ // section "type"
33
+ 1, 13, 2,
34
+ // 0, () => i32
35
+ 96, 0, 1, 127,
36
+ // 1, (i32, i32, i32, i32) => i32
37
+ 96, 4, 127, 127, 127, 127, 1, 127,
38
+
39
+ // section "function"
40
+ 3, 7, 6,
41
+ // 0, type 0
42
+ 0,
43
+ // 1, type 1
44
+ 1,
45
+ // 2, type 1
46
+ 1,
47
+ // 3, type 1
48
+ 1,
49
+ // 4, type 1
50
+ 1,
51
+ // 5, type 1
52
+ 1,
53
+
54
+ // section "global"
55
+ 6, 6, 1,
56
+ // 0, "high", mutable i32
57
+ 127, 1, 65, 0, 11,
58
+
59
+ // section "export"
60
+ 7, 50, 6,
61
+ // 0, "mul"
62
+ 3, 109, 117, 108, 0, 1,
63
+ // 1, "div_s"
64
+ 5, 100, 105, 118, 95, 115, 0, 2,
65
+ // 2, "div_u"
66
+ 5, 100, 105, 118, 95, 117, 0, 3,
67
+ // 3, "rem_s"
68
+ 5, 114, 101, 109, 95, 115, 0, 4,
69
+ // 4, "rem_u"
70
+ 5, 114, 101, 109, 95, 117, 0, 5,
71
+ // 5, "get_high"
72
+ 8, 103, 101, 116, 95, 104, 105, 103, 104, 0, 0,
73
+
74
+ // section "code"
75
+ 10, 191, 1, 6,
76
+ // 0, "get_high"
77
+ 4, 0, 35, 0, 11,
78
+ // 1, "mul"
79
+ 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32,
80
+ 3, 173, 66, 32, 134, 132, 126, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4,
81
+ 167, 11,
82
+ // 2, "div_s"
83
+ 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32,
84
+ 3, 173, 66, 32, 134, 132, 127, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4,
85
+ 167, 11,
86
+ // 3, "div_u"
87
+ 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32,
88
+ 3, 173, 66, 32, 134, 132, 128, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4,
89
+ 167, 11,
90
+ // 4, "rem_s"
91
+ 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32,
92
+ 3, 173, 66, 32, 134, 132, 129, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4,
93
+ 167, 11,
94
+ // 5, "rem_u"
95
+ 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32,
96
+ 3, 173, 66, 32, 134, 132, 130, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4,
97
+ 167, 11,
98
+ ]),
99
+ ),
100
+ {},
101
+ ).exports;
102
+ } catch {
28
103
  // no wasm support :(
29
104
  }
30
105
 
@@ -39,7 +114,6 @@ try {
39
114
  * @constructor
40
115
  */
41
116
  function Long(low, high, unsigned) {
42
-
43
117
  /**
44
118
  * The low 32 bits as a signed value.
45
119
  * @type {number}
@@ -139,25 +213,21 @@ function fromInt(value, unsigned) {
139
213
  var obj, cachedObj, cache;
140
214
  if (unsigned) {
141
215
  value >>>= 0;
142
- if (cache = (0 <= value && value < 256)) {
216
+ if ((cache = 0 <= value && value < 256)) {
143
217
  cachedObj = UINT_CACHE[value];
144
- if (cachedObj)
145
- return cachedObj;
218
+ if (cachedObj) return cachedObj;
146
219
  }
147
220
  obj = fromBits(value, 0, true);
148
- if (cache)
149
- UINT_CACHE[value] = obj;
221
+ if (cache) UINT_CACHE[value] = obj;
150
222
  return obj;
151
223
  } else {
152
224
  value |= 0;
153
- if (cache = (-128 <= value && value < 128)) {
225
+ if ((cache = -128 <= value && value < 128)) {
154
226
  cachedObj = INT_CACHE[value];
155
- if (cachedObj)
156
- return cachedObj;
227
+ if (cachedObj) return cachedObj;
157
228
  }
158
229
  obj = fromBits(value, value < 0 ? -1 : 0, false);
159
- if (cache)
160
- INT_CACHE[value] = obj;
230
+ if (cache) INT_CACHE[value] = obj;
161
231
  return obj;
162
232
  }
163
233
  }
@@ -178,22 +248,20 @@ Long.fromInt = fromInt;
178
248
  * @inner
179
249
  */
180
250
  function fromNumber(value, unsigned) {
181
- if (isNaN(value))
182
- return unsigned ? UZERO : ZERO;
251
+ if (isNaN(value)) return unsigned ? UZERO : ZERO;
183
252
  if (unsigned) {
184
- if (value < 0)
185
- return UZERO;
186
- if (value >= TWO_PWR_64_DBL)
187
- return MAX_UNSIGNED_VALUE;
253
+ if (value < 0) return UZERO;
254
+ if (value >= TWO_PWR_64_DBL) return MAX_UNSIGNED_VALUE;
188
255
  } else {
189
- if (value <= -TWO_PWR_63_DBL)
190
- return MIN_VALUE;
191
- if (value + 1 >= TWO_PWR_63_DBL)
192
- return MAX_VALUE;
256
+ if (value <= -TWO_PWR_63_DBL) return MIN_VALUE;
257
+ if (value + 1 >= TWO_PWR_63_DBL) return MAX_VALUE;
193
258
  }
194
- if (value < 0)
195
- return fromNumber(-value, unsigned).neg();
196
- return fromBits((value % TWO_PWR_32_DBL) | 0, (value / TWO_PWR_32_DBL) | 0, unsigned);
259
+ if (value < 0) return fromNumber(-value, unsigned).neg();
260
+ return fromBits(
261
+ value % TWO_PWR_32_DBL | 0,
262
+ (value / TWO_PWR_32_DBL) | 0,
263
+ unsigned,
264
+ );
197
265
  }
198
266
 
199
267
  /**
@@ -244,24 +312,26 @@ var pow_dbl = Math.pow; // Used 4 times (4*8 to 15+4)
244
312
  * @inner
245
313
  */
246
314
  function fromString(str, unsigned, radix) {
247
- if (str.length === 0)
248
- throw Error('empty string');
249
- if (typeof unsigned === 'number') {
315
+ if (str.length === 0) throw Error("empty string");
316
+ if (typeof unsigned === "number") {
250
317
  // For goog.math.long compatibility
251
318
  radix = unsigned;
252
319
  unsigned = false;
253
320
  } else {
254
321
  unsigned = !!unsigned;
255
322
  }
256
- if (str === "NaN" || str === "Infinity" || str === "+Infinity" || str === "-Infinity")
323
+ if (
324
+ str === "NaN" ||
325
+ str === "Infinity" ||
326
+ str === "+Infinity" ||
327
+ str === "-Infinity"
328
+ )
257
329
  return unsigned ? UZERO : ZERO;
258
330
  radix = radix || 10;
259
- if (radix < 2 || 36 < radix)
260
- throw RangeError('radix');
331
+ if (radix < 2 || 36 < radix) throw RangeError("radix");
261
332
 
262
333
  var p;
263
- if ((p = str.indexOf('-')) > 0)
264
- throw Error('interior hyphen');
334
+ if ((p = str.indexOf("-")) > 0) throw Error("interior hyphen");
265
335
  else if (p === 0) {
266
336
  return fromString(str.substring(1), unsigned, radix).neg();
267
337
  }
@@ -304,18 +374,20 @@ Long.fromString = fromString;
304
374
  * @inner
305
375
  */
306
376
  function fromValue(val, unsigned) {
307
- if (typeof val === 'number')
308
- return fromNumber(val, unsigned);
309
- if (typeof val === 'string')
310
- return fromString(val, unsigned);
377
+ if (typeof val === "number") return fromNumber(val, unsigned);
378
+ if (typeof val === "string") return fromString(val, unsigned);
311
379
  // Throws for non-objects, converts non-instanceof Long:
312
- return fromBits(val.low, val.high, typeof unsigned === 'boolean' ? unsigned : val.unsigned);
380
+ return fromBits(
381
+ val.low,
382
+ val.high,
383
+ typeof unsigned === "boolean" ? unsigned : val.unsigned,
384
+ );
313
385
  }
314
386
 
315
387
  /**
316
388
  * Converts the specified value to a Long using the appropriate from* function for its type.
317
389
  * @function
318
- * @param {!Long|number|string|!{low: number, high: number, unsigned: boolean}} val Value
390
+ * @param {!Long|number|bigint|string|!{low: number, high: number, unsigned: boolean}} val Value
319
391
  * @param {boolean=} unsigned Whether unsigned or not, defaults to signed
320
392
  * @returns {!Long}
321
393
  */
@@ -430,7 +502,7 @@ Long.NEG_ONE = NEG_ONE;
430
502
  * @type {!Long}
431
503
  * @inner
432
504
  */
433
- var MAX_VALUE = fromBits(0xFFFFFFFF | 0, 0x7FFFFFFF | 0, false);
505
+ var MAX_VALUE = fromBits(0xffffffff | 0, 0x7fffffff | 0, false);
434
506
 
435
507
  /**
436
508
  * Maximum signed value.
@@ -442,7 +514,7 @@ Long.MAX_VALUE = MAX_VALUE;
442
514
  * @type {!Long}
443
515
  * @inner
444
516
  */
445
- var MAX_UNSIGNED_VALUE = fromBits(0xFFFFFFFF | 0, 0xFFFFFFFF | 0, true);
517
+ var MAX_UNSIGNED_VALUE = fromBits(0xffffffff | 0, 0xffffffff | 0, true);
446
518
 
447
519
  /**
448
520
  * Maximum unsigned value.
@@ -484,7 +556,7 @@ LongPrototype.toInt = function toInt() {
484
556
  */
485
557
  LongPrototype.toNumber = function toNumber() {
486
558
  if (this.unsigned)
487
- return ((this.high >>> 0) * TWO_PWR_32_DBL) + (this.low >>> 0);
559
+ return (this.high >>> 0) * TWO_PWR_32_DBL + (this.low >>> 0);
488
560
  return this.high * TWO_PWR_32_DBL + (this.low >>> 0);
489
561
  };
490
562
 
@@ -498,11 +570,10 @@ LongPrototype.toNumber = function toNumber() {
498
570
  */
499
571
  LongPrototype.toString = function toString(radix) {
500
572
  radix = radix || 10;
501
- if (radix < 2 || 36 < radix)
502
- throw RangeError('radix');
503
- if (this.isZero())
504
- return '0';
505
- if (this.isNegative()) { // Unsigned Longs are never negative
573
+ if (radix < 2 || 36 < radix) throw RangeError("radix");
574
+ if (this.isZero()) return "0";
575
+ if (this.isNegative()) {
576
+ // Unsigned Longs are never negative
506
577
  if (this.eq(MIN_VALUE)) {
507
578
  // We need to change the Long value before it can be negated, so we remove
508
579
  // the bottom-most digit in this base and then recurse to do the rest.
@@ -510,26 +581,23 @@ LongPrototype.toString = function toString(radix) {
510
581
  div = this.div(radixLong),
511
582
  rem1 = div.mul(radixLong).sub(this);
512
583
  return div.toString(radix) + rem1.toInt().toString(radix);
513
- } else
514
- return '-' + this.neg().toString(radix);
584
+ } else return "-" + this.neg().toString(radix);
515
585
  }
516
586
 
517
587
  // Do several (6) digits each time through the loop, so as to
518
588
  // minimize the calls to the very expensive emulated div.
519
589
  var radixToPower = fromNumber(pow_dbl(radix, 6), this.unsigned),
520
590
  rem = this;
521
- var result = '';
591
+ var result = "";
522
592
  while (true) {
523
593
  var remDiv = rem.div(radixToPower),
524
594
  intval = rem.sub(remDiv.mul(radixToPower)).toInt() >>> 0,
525
595
  digits = intval.toString(radix);
526
596
  rem = remDiv;
527
- if (rem.isZero())
528
- return digits + result;
597
+ if (rem.isZero()) return digits + result;
529
598
  else {
530
- while (digits.length < 6)
531
- digits = '0' + digits;
532
- result = '' + digits + result;
599
+ while (digits.length < 6) digits = "0" + digits;
600
+ result = "" + digits + result;
533
601
  }
534
602
  }
535
603
  };
@@ -576,15 +644,30 @@ LongPrototype.getLowBitsUnsigned = function getLowBitsUnsigned() {
576
644
  * @returns {number}
577
645
  */
578
646
  LongPrototype.getNumBitsAbs = function getNumBitsAbs() {
579
- if (this.isNegative()) // Unsigned Longs are never negative
647
+ if (this.isNegative())
648
+ // Unsigned Longs are never negative
580
649
  return this.eq(MIN_VALUE) ? 64 : this.neg().getNumBitsAbs();
581
650
  var val = this.high != 0 ? this.high : this.low;
582
- for (var bit = 31; bit > 0; bit--)
583
- if ((val & (1 << bit)) != 0)
584
- break;
651
+ for (var bit = 31; bit > 0; bit--) if ((val & (1 << bit)) != 0) break;
585
652
  return this.high != 0 ? bit + 33 : bit + 1;
586
653
  };
587
654
 
655
+ /**
656
+ * Tests if this Long can be safely represented as a JavaScript number.
657
+ * @this {!Long}
658
+ * @returns {boolean}
659
+ */
660
+ LongPrototype.isSafeInteger = function isSafeInteger() {
661
+ // 2^53-1 is the maximum safe value
662
+ var top11Bits = this.high >> 21;
663
+ // [0, 2^53-1]
664
+ if (!top11Bits) return true;
665
+ // > 2^53-1
666
+ if (this.unsigned) return false;
667
+ // [-2^53, -1] except -2^53
668
+ return top11Bits === -1 && !(this.low === 0 && this.high === -0x200000);
669
+ };
670
+
588
671
  /**
589
672
  * Tests if this Long's value equals zero.
590
673
  * @this {!Long}
@@ -639,13 +722,16 @@ LongPrototype.isEven = function isEven() {
639
722
  /**
640
723
  * Tests if this Long's value equals the specified's.
641
724
  * @this {!Long}
642
- * @param {!Long|number|string} other Other value
725
+ * @param {!Long|number|bigint|string} other Other value
643
726
  * @returns {boolean}
644
727
  */
645
728
  LongPrototype.equals = function equals(other) {
646
- if (!isLong(other))
647
- other = fromValue(other);
648
- if (this.unsigned !== other.unsigned && (this.high >>> 31) === 1 && (other.high >>> 31) === 1)
729
+ if (!isLong(other)) other = fromValue(other);
730
+ if (
731
+ this.unsigned !== other.unsigned &&
732
+ this.high >>> 31 === 1 &&
733
+ other.high >>> 31 === 1
734
+ )
649
735
  return false;
650
736
  return this.high === other.high && this.low === other.low;
651
737
  };
@@ -653,7 +739,7 @@ LongPrototype.equals = function equals(other) {
653
739
  /**
654
740
  * Tests if this Long's value equals the specified's. This is an alias of {@link Long#equals}.
655
741
  * @function
656
- * @param {!Long|number|string} other Other value
742
+ * @param {!Long|number|bigint|string} other Other value
657
743
  * @returns {boolean}
658
744
  */
659
745
  LongPrototype.eq = LongPrototype.equals;
@@ -661,7 +747,7 @@ LongPrototype.eq = LongPrototype.equals;
661
747
  /**
662
748
  * Tests if this Long's value differs from the specified's.
663
749
  * @this {!Long}
664
- * @param {!Long|number|string} other Other value
750
+ * @param {!Long|number|bigint|string} other Other value
665
751
  * @returns {boolean}
666
752
  */
667
753
  LongPrototype.notEquals = function notEquals(other) {
@@ -671,7 +757,7 @@ LongPrototype.notEquals = function notEquals(other) {
671
757
  /**
672
758
  * Tests if this Long's value differs from the specified's. This is an alias of {@link Long#notEquals}.
673
759
  * @function
674
- * @param {!Long|number|string} other Other value
760
+ * @param {!Long|number|bigint|string} other Other value
675
761
  * @returns {boolean}
676
762
  */
677
763
  LongPrototype.neq = LongPrototype.notEquals;
@@ -679,7 +765,7 @@ LongPrototype.neq = LongPrototype.notEquals;
679
765
  /**
680
766
  * Tests if this Long's value differs from the specified's. This is an alias of {@link Long#notEquals}.
681
767
  * @function
682
- * @param {!Long|number|string} other Other value
768
+ * @param {!Long|number|bigint|string} other Other value
683
769
  * @returns {boolean}
684
770
  */
685
771
  LongPrototype.ne = LongPrototype.notEquals;
@@ -687,7 +773,7 @@ LongPrototype.ne = LongPrototype.notEquals;
687
773
  /**
688
774
  * Tests if this Long's value is less than the specified's.
689
775
  * @this {!Long}
690
- * @param {!Long|number|string} other Other value
776
+ * @param {!Long|number|bigint|string} other Other value
691
777
  * @returns {boolean}
692
778
  */
693
779
  LongPrototype.lessThan = function lessThan(other) {
@@ -697,7 +783,7 @@ LongPrototype.lessThan = function lessThan(other) {
697
783
  /**
698
784
  * Tests if this Long's value is less than the specified's. This is an alias of {@link Long#lessThan}.
699
785
  * @function
700
- * @param {!Long|number|string} other Other value
786
+ * @param {!Long|number|bigint|string} other Other value
701
787
  * @returns {boolean}
702
788
  */
703
789
  LongPrototype.lt = LongPrototype.lessThan;
@@ -705,7 +791,7 @@ LongPrototype.lt = LongPrototype.lessThan;
705
791
  /**
706
792
  * Tests if this Long's value is less than or equal the specified's.
707
793
  * @this {!Long}
708
- * @param {!Long|number|string} other Other value
794
+ * @param {!Long|number|bigint|string} other Other value
709
795
  * @returns {boolean}
710
796
  */
711
797
  LongPrototype.lessThanOrEqual = function lessThanOrEqual(other) {
@@ -715,7 +801,7 @@ LongPrototype.lessThanOrEqual = function lessThanOrEqual(other) {
715
801
  /**
716
802
  * Tests if this Long's value is less than or equal the specified's. This is an alias of {@link Long#lessThanOrEqual}.
717
803
  * @function
718
- * @param {!Long|number|string} other Other value
804
+ * @param {!Long|number|bigint|string} other Other value
719
805
  * @returns {boolean}
720
806
  */
721
807
  LongPrototype.lte = LongPrototype.lessThanOrEqual;
@@ -723,7 +809,7 @@ LongPrototype.lte = LongPrototype.lessThanOrEqual;
723
809
  /**
724
810
  * Tests if this Long's value is less than or equal the specified's. This is an alias of {@link Long#lessThanOrEqual}.
725
811
  * @function
726
- * @param {!Long|number|string} other Other value
812
+ * @param {!Long|number|bigint|string} other Other value
727
813
  * @returns {boolean}
728
814
  */
729
815
  LongPrototype.le = LongPrototype.lessThanOrEqual;
@@ -731,7 +817,7 @@ LongPrototype.le = LongPrototype.lessThanOrEqual;
731
817
  /**
732
818
  * Tests if this Long's value is greater than the specified's.
733
819
  * @this {!Long}
734
- * @param {!Long|number|string} other Other value
820
+ * @param {!Long|number|bigint|string} other Other value
735
821
  * @returns {boolean}
736
822
  */
737
823
  LongPrototype.greaterThan = function greaterThan(other) {
@@ -741,7 +827,7 @@ LongPrototype.greaterThan = function greaterThan(other) {
741
827
  /**
742
828
  * Tests if this Long's value is greater than the specified's. This is an alias of {@link Long#greaterThan}.
743
829
  * @function
744
- * @param {!Long|number|string} other Other value
830
+ * @param {!Long|number|bigint|string} other Other value
745
831
  * @returns {boolean}
746
832
  */
747
833
  LongPrototype.gt = LongPrototype.greaterThan;
@@ -749,7 +835,7 @@ LongPrototype.gt = LongPrototype.greaterThan;
749
835
  /**
750
836
  * Tests if this Long's value is greater than or equal the specified's.
751
837
  * @this {!Long}
752
- * @param {!Long|number|string} other Other value
838
+ * @param {!Long|number|bigint|string} other Other value
753
839
  * @returns {boolean}
754
840
  */
755
841
  LongPrototype.greaterThanOrEqual = function greaterThanOrEqual(other) {
@@ -759,7 +845,7 @@ LongPrototype.greaterThanOrEqual = function greaterThanOrEqual(other) {
759
845
  /**
760
846
  * Tests if this Long's value is greater than or equal the specified's. This is an alias of {@link Long#greaterThanOrEqual}.
761
847
  * @function
762
- * @param {!Long|number|string} other Other value
848
+ * @param {!Long|number|bigint|string} other Other value
763
849
  * @returns {boolean}
764
850
  */
765
851
  LongPrototype.gte = LongPrototype.greaterThanOrEqual;
@@ -767,7 +853,7 @@ LongPrototype.gte = LongPrototype.greaterThanOrEqual;
767
853
  /**
768
854
  * Tests if this Long's value is greater than or equal the specified's. This is an alias of {@link Long#greaterThanOrEqual}.
769
855
  * @function
770
- * @param {!Long|number|string} other Other value
856
+ * @param {!Long|number|bigint|string} other Other value
771
857
  * @returns {boolean}
772
858
  */
773
859
  LongPrototype.ge = LongPrototype.greaterThanOrEqual;
@@ -775,32 +861,30 @@ LongPrototype.ge = LongPrototype.greaterThanOrEqual;
775
861
  /**
776
862
  * Compares this Long's value with the specified's.
777
863
  * @this {!Long}
778
- * @param {!Long|number|string} other Other value
864
+ * @param {!Long|number|bigint|string} other Other value
779
865
  * @returns {number} 0 if they are the same, 1 if the this is greater and -1
780
866
  * if the given one is greater
781
867
  */
782
868
  LongPrototype.compare = function compare(other) {
783
- if (!isLong(other))
784
- other = fromValue(other);
785
- if (this.eq(other))
786
- return 0;
869
+ if (!isLong(other)) other = fromValue(other);
870
+ if (this.eq(other)) return 0;
787
871
  var thisNeg = this.isNegative(),
788
872
  otherNeg = other.isNegative();
789
- if (thisNeg && !otherNeg)
790
- return -1;
791
- if (!thisNeg && otherNeg)
792
- return 1;
873
+ if (thisNeg && !otherNeg) return -1;
874
+ if (!thisNeg && otherNeg) return 1;
793
875
  // At this point the sign bits are the same
794
- if (!this.unsigned)
795
- return this.sub(other).isNegative() ? -1 : 1;
876
+ if (!this.unsigned) return this.sub(other).isNegative() ? -1 : 1;
796
877
  // Both are positive if at least one is unsigned
797
- return (other.high >>> 0) > (this.high >>> 0) || (other.high === this.high && (other.low >>> 0) > (this.low >>> 0)) ? -1 : 1;
878
+ return other.high >>> 0 > this.high >>> 0 ||
879
+ (other.high === this.high && other.low >>> 0 > this.low >>> 0)
880
+ ? -1
881
+ : 1;
798
882
  };
799
883
 
800
884
  /**
801
885
  * Compares this Long's value with the specified's. This is an alias of {@link Long#compare}.
802
886
  * @function
803
- * @param {!Long|number|string} other Other value
887
+ * @param {!Long|number|bigint|string} other Other value
804
888
  * @returns {number} 0 if they are the same, 1 if the this is greater and -1
805
889
  * if the given one is greater
806
890
  */
@@ -812,8 +896,7 @@ LongPrototype.comp = LongPrototype.compare;
812
896
  * @returns {!Long} Negated Long
813
897
  */
814
898
  LongPrototype.negate = function negate() {
815
- if (!this.unsigned && this.eq(MIN_VALUE))
816
- return MIN_VALUE;
899
+ if (!this.unsigned && this.eq(MIN_VALUE)) return MIN_VALUE;
817
900
  return this.not().add(ONE);
818
901
  };
819
902
 
@@ -827,56 +910,57 @@ LongPrototype.neg = LongPrototype.negate;
827
910
  /**
828
911
  * Returns the sum of this and the specified Long.
829
912
  * @this {!Long}
830
- * @param {!Long|number|string} addend Addend
913
+ * @param {!Long|number|bigint|string} addend Addend
831
914
  * @returns {!Long} Sum
832
915
  */
833
916
  LongPrototype.add = function add(addend) {
834
- if (!isLong(addend))
835
- addend = fromValue(addend);
917
+ if (!isLong(addend)) addend = fromValue(addend);
836
918
 
837
919
  // Divide each number into 4 chunks of 16 bits, and then sum the chunks.
838
920
 
839
921
  var a48 = this.high >>> 16;
840
- var a32 = this.high & 0xFFFF;
922
+ var a32 = this.high & 0xffff;
841
923
  var a16 = this.low >>> 16;
842
- var a00 = this.low & 0xFFFF;
924
+ var a00 = this.low & 0xffff;
843
925
 
844
926
  var b48 = addend.high >>> 16;
845
- var b32 = addend.high & 0xFFFF;
927
+ var b32 = addend.high & 0xffff;
846
928
  var b16 = addend.low >>> 16;
847
- var b00 = addend.low & 0xFFFF;
929
+ var b00 = addend.low & 0xffff;
848
930
 
849
- var c48 = 0, c32 = 0, c16 = 0, c00 = 0;
931
+ var c48 = 0,
932
+ c32 = 0,
933
+ c16 = 0,
934
+ c00 = 0;
850
935
  c00 += a00 + b00;
851
936
  c16 += c00 >>> 16;
852
- c00 &= 0xFFFF;
937
+ c00 &= 0xffff;
853
938
  c16 += a16 + b16;
854
939
  c32 += c16 >>> 16;
855
- c16 &= 0xFFFF;
940
+ c16 &= 0xffff;
856
941
  c32 += a32 + b32;
857
942
  c48 += c32 >>> 16;
858
- c32 &= 0xFFFF;
943
+ c32 &= 0xffff;
859
944
  c48 += a48 + b48;
860
- c48 &= 0xFFFF;
945
+ c48 &= 0xffff;
861
946
  return fromBits((c16 << 16) | c00, (c48 << 16) | c32, this.unsigned);
862
947
  };
863
948
 
864
949
  /**
865
950
  * Returns the difference of this and the specified Long.
866
951
  * @this {!Long}
867
- * @param {!Long|number|string} subtrahend Subtrahend
952
+ * @param {!Long|number|bigint|string} subtrahend Subtrahend
868
953
  * @returns {!Long} Difference
869
954
  */
870
955
  LongPrototype.subtract = function subtract(subtrahend) {
871
- if (!isLong(subtrahend))
872
- subtrahend = fromValue(subtrahend);
956
+ if (!isLong(subtrahend)) subtrahend = fromValue(subtrahend);
873
957
  return this.add(subtrahend.neg());
874
958
  };
875
959
 
876
960
  /**
877
961
  * Returns the difference of this and the specified Long. This is an alias of {@link Long#subtract}.
878
962
  * @function
879
- * @param {!Long|number|string} subtrahend Subtrahend
963
+ * @param {!Long|number|bigint|string} subtrahend Subtrahend
880
964
  * @returns {!Long} Difference
881
965
  */
882
966
  LongPrototype.sub = LongPrototype.subtract;
@@ -884,38 +968,27 @@ LongPrototype.sub = LongPrototype.subtract;
884
968
  /**
885
969
  * Returns the product of this and the specified Long.
886
970
  * @this {!Long}
887
- * @param {!Long|number|string} multiplier Multiplier
971
+ * @param {!Long|number|bigint|string} multiplier Multiplier
888
972
  * @returns {!Long} Product
889
973
  */
890
974
  LongPrototype.multiply = function multiply(multiplier) {
891
- if (this.isZero())
892
- return this;
893
- if (!isLong(multiplier))
894
- multiplier = fromValue(multiplier);
975
+ if (this.isZero()) return this;
976
+ if (!isLong(multiplier)) multiplier = fromValue(multiplier);
895
977
 
896
978
  // use wasm support if present
897
979
  if (wasm) {
898
- var low = wasm["mul"](this.low,
899
- this.high,
900
- multiplier.low,
901
- multiplier.high);
980
+ var low = wasm["mul"](this.low, this.high, multiplier.low, multiplier.high);
902
981
  return fromBits(low, wasm["get_high"](), this.unsigned);
903
982
  }
904
983
 
905
- if (multiplier.isZero())
906
- return this.unsigned ? UZERO : ZERO;
907
- if (this.eq(MIN_VALUE))
908
- return multiplier.isOdd() ? MIN_VALUE : ZERO;
909
- if (multiplier.eq(MIN_VALUE))
910
- return this.isOdd() ? MIN_VALUE : ZERO;
984
+ if (multiplier.isZero()) return this.unsigned ? UZERO : ZERO;
985
+ if (this.eq(MIN_VALUE)) return multiplier.isOdd() ? MIN_VALUE : ZERO;
986
+ if (multiplier.eq(MIN_VALUE)) return this.isOdd() ? MIN_VALUE : ZERO;
911
987
 
912
988
  if (this.isNegative()) {
913
- if (multiplier.isNegative())
914
- return this.neg().mul(multiplier.neg());
915
- else
916
- return this.neg().mul(multiplier).neg();
917
- } else if (multiplier.isNegative())
918
- return this.mul(multiplier.neg()).neg();
989
+ if (multiplier.isNegative()) return this.neg().mul(multiplier.neg());
990
+ else return this.neg().mul(multiplier).neg();
991
+ } else if (multiplier.isNegative()) return this.mul(multiplier.neg()).neg();
919
992
 
920
993
  // If both longs are small, use float multiplication
921
994
  if (this.lt(TWO_PWR_24) && multiplier.lt(TWO_PWR_24))
@@ -925,43 +998,46 @@ LongPrototype.multiply = function multiply(multiplier) {
925
998
  // We can skip products that would overflow.
926
999
 
927
1000
  var a48 = this.high >>> 16;
928
- var a32 = this.high & 0xFFFF;
1001
+ var a32 = this.high & 0xffff;
929
1002
  var a16 = this.low >>> 16;
930
- var a00 = this.low & 0xFFFF;
1003
+ var a00 = this.low & 0xffff;
931
1004
 
932
1005
  var b48 = multiplier.high >>> 16;
933
- var b32 = multiplier.high & 0xFFFF;
1006
+ var b32 = multiplier.high & 0xffff;
934
1007
  var b16 = multiplier.low >>> 16;
935
- var b00 = multiplier.low & 0xFFFF;
1008
+ var b00 = multiplier.low & 0xffff;
936
1009
 
937
- var c48 = 0, c32 = 0, c16 = 0, c00 = 0;
1010
+ var c48 = 0,
1011
+ c32 = 0,
1012
+ c16 = 0,
1013
+ c00 = 0;
938
1014
  c00 += a00 * b00;
939
1015
  c16 += c00 >>> 16;
940
- c00 &= 0xFFFF;
1016
+ c00 &= 0xffff;
941
1017
  c16 += a16 * b00;
942
1018
  c32 += c16 >>> 16;
943
- c16 &= 0xFFFF;
1019
+ c16 &= 0xffff;
944
1020
  c16 += a00 * b16;
945
1021
  c32 += c16 >>> 16;
946
- c16 &= 0xFFFF;
1022
+ c16 &= 0xffff;
947
1023
  c32 += a32 * b00;
948
1024
  c48 += c32 >>> 16;
949
- c32 &= 0xFFFF;
1025
+ c32 &= 0xffff;
950
1026
  c32 += a16 * b16;
951
1027
  c48 += c32 >>> 16;
952
- c32 &= 0xFFFF;
1028
+ c32 &= 0xffff;
953
1029
  c32 += a00 * b32;
954
1030
  c48 += c32 >>> 16;
955
- c32 &= 0xFFFF;
1031
+ c32 &= 0xffff;
956
1032
  c48 += a48 * b00 + a32 * b16 + a16 * b32 + a00 * b48;
957
- c48 &= 0xFFFF;
1033
+ c48 &= 0xffff;
958
1034
  return fromBits((c16 << 16) | c00, (c48 << 16) | c32, this.unsigned);
959
1035
  };
960
1036
 
961
1037
  /**
962
1038
  * Returns the product of this and the specified Long. This is an alias of {@link Long#multiply}.
963
1039
  * @function
964
- * @param {!Long|number|string} multiplier Multiplier
1040
+ * @param {!Long|number|bigint|string} multiplier Multiplier
965
1041
  * @returns {!Long} Product
966
1042
  */
967
1043
  LongPrototype.mul = LongPrototype.multiply;
@@ -970,23 +1046,24 @@ LongPrototype.mul = LongPrototype.multiply;
970
1046
  * Returns this Long divided by the specified. The result is signed if this Long is signed or
971
1047
  * unsigned if this Long is unsigned.
972
1048
  * @this {!Long}
973
- * @param {!Long|number|string} divisor Divisor
1049
+ * @param {!Long|number|bigint|string} divisor Divisor
974
1050
  * @returns {!Long} Quotient
975
1051
  */
976
1052
  LongPrototype.divide = function divide(divisor) {
977
- if (!isLong(divisor))
978
- divisor = fromValue(divisor);
979
- if (divisor.isZero())
980
- throw Error('division by zero');
1053
+ if (!isLong(divisor)) divisor = fromValue(divisor);
1054
+ if (divisor.isZero()) throw Error("division by zero");
981
1055
 
982
1056
  // use wasm support if present
983
1057
  if (wasm) {
984
1058
  // guard against signed division overflow: the largest
985
1059
  // negative number / -1 would be 1 larger than the largest
986
1060
  // positive number, due to two's complement.
987
- if (!this.unsigned &&
1061
+ if (
1062
+ !this.unsigned &&
988
1063
  this.high === -0x80000000 &&
989
- divisor.low === -1 && divisor.high === -1) {
1064
+ divisor.low === -1 &&
1065
+ divisor.high === -1
1066
+ ) {
990
1067
  // be consistent with non-wasm code path
991
1068
  return this;
992
1069
  }
@@ -994,22 +1071,20 @@ LongPrototype.divide = function divide(divisor) {
994
1071
  this.low,
995
1072
  this.high,
996
1073
  divisor.low,
997
- divisor.high
1074
+ divisor.high,
998
1075
  );
999
1076
  return fromBits(low, wasm["get_high"](), this.unsigned);
1000
1077
  }
1001
1078
 
1002
- if (this.isZero())
1003
- return this.unsigned ? UZERO : ZERO;
1079
+ if (this.isZero()) return this.unsigned ? UZERO : ZERO;
1004
1080
  var approx, rem, res;
1005
1081
  if (!this.unsigned) {
1006
1082
  // This section is only relevant for signed longs and is derived from the
1007
1083
  // closure library as a whole.
1008
1084
  if (this.eq(MIN_VALUE)) {
1009
1085
  if (divisor.eq(ONE) || divisor.eq(NEG_ONE))
1010
- return MIN_VALUE; // recall that -MIN_VALUE == MIN_VALUE
1011
- else if (divisor.eq(MIN_VALUE))
1012
- return ONE;
1086
+ return MIN_VALUE; // recall that -MIN_VALUE == MIN_VALUE
1087
+ else if (divisor.eq(MIN_VALUE)) return ONE;
1013
1088
  else {
1014
1089
  // At this point, we have |other| >= 2, so |this/other| < |MIN_VALUE|.
1015
1090
  var halfThis = this.shr(1);
@@ -1022,23 +1097,19 @@ LongPrototype.divide = function divide(divisor) {
1022
1097
  return res;
1023
1098
  }
1024
1099
  }
1025
- } else if (divisor.eq(MIN_VALUE))
1026
- return this.unsigned ? UZERO : ZERO;
1100
+ } else if (divisor.eq(MIN_VALUE)) return this.unsigned ? UZERO : ZERO;
1027
1101
  if (this.isNegative()) {
1028
- if (divisor.isNegative())
1029
- return this.neg().div(divisor.neg());
1102
+ if (divisor.isNegative()) return this.neg().div(divisor.neg());
1030
1103
  return this.neg().div(divisor).neg();
1031
- } else if (divisor.isNegative())
1032
- return this.div(divisor.neg()).neg();
1104
+ } else if (divisor.isNegative()) return this.div(divisor.neg()).neg();
1033
1105
  res = ZERO;
1034
1106
  } else {
1035
1107
  // The algorithm below has not been made for unsigned longs. It's therefore
1036
1108
  // required to take special care of the MSB prior to running it.
1037
- if (!divisor.unsigned)
1038
- divisor = divisor.toUnsigned();
1039
- if (divisor.gt(this))
1040
- return UZERO;
1041
- if (divisor.gt(this.shru(1))) // 15 >>> 1 = 7 ; with divisor = 8 ; true
1109
+ if (!divisor.unsigned) divisor = divisor.toUnsigned();
1110
+ if (divisor.gt(this)) return UZERO;
1111
+ if (divisor.gt(this.shru(1)))
1112
+ // 15 >>> 1 = 7 ; with divisor = 8 ; true
1042
1113
  return UONE;
1043
1114
  res = UZERO;
1044
1115
  }
@@ -1057,8 +1128,7 @@ LongPrototype.divide = function divide(divisor) {
1057
1128
  // We will tweak the approximate result by changing it in the 48-th digit or
1058
1129
  // the smallest non-fractional digit, whichever is larger.
1059
1130
  var log2 = Math.ceil(Math.log(approx) / Math.LN2),
1060
- delta = (log2 <= 48) ? 1 : pow_dbl(2, log2 - 48),
1061
-
1131
+ delta = log2 <= 48 ? 1 : pow_dbl(2, log2 - 48),
1062
1132
  // Decrease the approximation until it is smaller than the remainder. Note
1063
1133
  // that if it is too large, the product overflows and is negative.
1064
1134
  approxRes = fromNumber(approx),
@@ -1071,8 +1141,7 @@ LongPrototype.divide = function divide(divisor) {
1071
1141
 
1072
1142
  // We know the answer can't be zero... and actually, zero would cause
1073
1143
  // infinite recursion since we would make no progress.
1074
- if (approxRes.isZero())
1075
- approxRes = ONE;
1144
+ if (approxRes.isZero()) approxRes = ONE;
1076
1145
 
1077
1146
  res = res.add(approxRes);
1078
1147
  rem = rem.sub(approxRem);
@@ -1083,7 +1152,7 @@ LongPrototype.divide = function divide(divisor) {
1083
1152
  /**
1084
1153
  * Returns this Long divided by the specified. This is an alias of {@link Long#divide}.
1085
1154
  * @function
1086
- * @param {!Long|number|string} divisor Divisor
1155
+ * @param {!Long|number|bigint|string} divisor Divisor
1087
1156
  * @returns {!Long} Quotient
1088
1157
  */
1089
1158
  LongPrototype.div = LongPrototype.divide;
@@ -1091,12 +1160,11 @@ LongPrototype.div = LongPrototype.divide;
1091
1160
  /**
1092
1161
  * Returns this Long modulo the specified.
1093
1162
  * @this {!Long}
1094
- * @param {!Long|number|string} divisor Divisor
1163
+ * @param {!Long|number|bigint|string} divisor Divisor
1095
1164
  * @returns {!Long} Remainder
1096
1165
  */
1097
1166
  LongPrototype.modulo = function modulo(divisor) {
1098
- if (!isLong(divisor))
1099
- divisor = fromValue(divisor);
1167
+ if (!isLong(divisor)) divisor = fromValue(divisor);
1100
1168
 
1101
1169
  // use wasm support if present
1102
1170
  if (wasm) {
@@ -1104,7 +1172,7 @@ LongPrototype.modulo = function modulo(divisor) {
1104
1172
  this.low,
1105
1173
  this.high,
1106
1174
  divisor.low,
1107
- divisor.high
1175
+ divisor.high,
1108
1176
  );
1109
1177
  return fromBits(low, wasm["get_high"](), this.unsigned);
1110
1178
  }
@@ -1115,7 +1183,7 @@ LongPrototype.modulo = function modulo(divisor) {
1115
1183
  /**
1116
1184
  * Returns this Long modulo the specified. This is an alias of {@link Long#modulo}.
1117
1185
  * @function
1118
- * @param {!Long|number|string} divisor Divisor
1186
+ * @param {!Long|number|bigint|string} divisor Divisor
1119
1187
  * @returns {!Long} Remainder
1120
1188
  */
1121
1189
  LongPrototype.mod = LongPrototype.modulo;
@@ -1123,7 +1191,7 @@ LongPrototype.mod = LongPrototype.modulo;
1123
1191
  /**
1124
1192
  * Returns this Long modulo the specified. This is an alias of {@link Long#modulo}.
1125
1193
  * @function
1126
- * @param {!Long|number|string} divisor Divisor
1194
+ * @param {!Long|number|bigint|string} divisor Divisor
1127
1195
  * @returns {!Long} Remainder
1128
1196
  */
1129
1197
  LongPrototype.rem = LongPrototype.modulo;
@@ -1174,36 +1242,33 @@ LongPrototype.ctz = LongPrototype.countTrailingZeros;
1174
1242
  /**
1175
1243
  * Returns the bitwise AND of this Long and the specified.
1176
1244
  * @this {!Long}
1177
- * @param {!Long|number|string} other Other Long
1245
+ * @param {!Long|number|bigint|string} other Other Long
1178
1246
  * @returns {!Long}
1179
1247
  */
1180
1248
  LongPrototype.and = function and(other) {
1181
- if (!isLong(other))
1182
- other = fromValue(other);
1249
+ if (!isLong(other)) other = fromValue(other);
1183
1250
  return fromBits(this.low & other.low, this.high & other.high, this.unsigned);
1184
1251
  };
1185
1252
 
1186
1253
  /**
1187
1254
  * Returns the bitwise OR of this Long and the specified.
1188
1255
  * @this {!Long}
1189
- * @param {!Long|number|string} other Other Long
1256
+ * @param {!Long|number|bigint|string} other Other Long
1190
1257
  * @returns {!Long}
1191
1258
  */
1192
1259
  LongPrototype.or = function or(other) {
1193
- if (!isLong(other))
1194
- other = fromValue(other);
1260
+ if (!isLong(other)) other = fromValue(other);
1195
1261
  return fromBits(this.low | other.low, this.high | other.high, this.unsigned);
1196
1262
  };
1197
1263
 
1198
1264
  /**
1199
1265
  * Returns the bitwise XOR of this Long and the given one.
1200
1266
  * @this {!Long}
1201
- * @param {!Long|number|string} other Other Long
1267
+ * @param {!Long|number|bigint|string} other Other Long
1202
1268
  * @returns {!Long}
1203
1269
  */
1204
1270
  LongPrototype.xor = function xor(other) {
1205
- if (!isLong(other))
1206
- other = fromValue(other);
1271
+ if (!isLong(other)) other = fromValue(other);
1207
1272
  return fromBits(this.low ^ other.low, this.high ^ other.high, this.unsigned);
1208
1273
  };
1209
1274
 
@@ -1214,14 +1279,15 @@ LongPrototype.xor = function xor(other) {
1214
1279
  * @returns {!Long} Shifted Long
1215
1280
  */
1216
1281
  LongPrototype.shiftLeft = function shiftLeft(numBits) {
1217
- if (isLong(numBits))
1218
- numBits = numBits.toInt();
1219
- if ((numBits &= 63) === 0)
1220
- return this;
1282
+ if (isLong(numBits)) numBits = numBits.toInt();
1283
+ if ((numBits &= 63) === 0) return this;
1221
1284
  else if (numBits < 32)
1222
- return fromBits(this.low << numBits, (this.high << numBits) | (this.low >>> (32 - numBits)), this.unsigned);
1223
- else
1224
- return fromBits(0, this.low << (numBits - 32), this.unsigned);
1285
+ return fromBits(
1286
+ this.low << numBits,
1287
+ (this.high << numBits) | (this.low >>> (32 - numBits)),
1288
+ this.unsigned,
1289
+ );
1290
+ else return fromBits(0, this.low << (numBits - 32), this.unsigned);
1225
1291
  };
1226
1292
 
1227
1293
  /**
@@ -1239,14 +1305,20 @@ LongPrototype.shl = LongPrototype.shiftLeft;
1239
1305
  * @returns {!Long} Shifted Long
1240
1306
  */
1241
1307
  LongPrototype.shiftRight = function shiftRight(numBits) {
1242
- if (isLong(numBits))
1243
- numBits = numBits.toInt();
1244
- if ((numBits &= 63) === 0)
1245
- return this;
1308
+ if (isLong(numBits)) numBits = numBits.toInt();
1309
+ if ((numBits &= 63) === 0) return this;
1246
1310
  else if (numBits < 32)
1247
- return fromBits((this.low >>> numBits) | (this.high << (32 - numBits)), this.high >> numBits, this.unsigned);
1311
+ return fromBits(
1312
+ (this.low >>> numBits) | (this.high << (32 - numBits)),
1313
+ this.high >> numBits,
1314
+ this.unsigned,
1315
+ );
1248
1316
  else
1249
- return fromBits(this.high >> (numBits - 32), this.high >= 0 ? 0 : -1, this.unsigned);
1317
+ return fromBits(
1318
+ this.high >> (numBits - 32),
1319
+ this.high >= 0 ? 0 : -1,
1320
+ this.unsigned,
1321
+ );
1250
1322
  };
1251
1323
 
1252
1324
  /**
@@ -1266,7 +1338,12 @@ LongPrototype.shr = LongPrototype.shiftRight;
1266
1338
  LongPrototype.shiftRightUnsigned = function shiftRightUnsigned(numBits) {
1267
1339
  if (isLong(numBits)) numBits = numBits.toInt();
1268
1340
  if ((numBits &= 63) === 0) return this;
1269
- if (numBits < 32) return fromBits((this.low >>> numBits) | (this.high << (32 - numBits)), this.high >>> numBits, this.unsigned);
1341
+ if (numBits < 32)
1342
+ return fromBits(
1343
+ (this.low >>> numBits) | (this.high << (32 - numBits)),
1344
+ this.high >>> numBits,
1345
+ this.unsigned,
1346
+ );
1270
1347
  if (numBits === 32) return fromBits(this.high, 0, this.unsigned);
1271
1348
  return fromBits(this.high >>> (numBits - 32), 0, this.unsigned);
1272
1349
  };
@@ -1299,13 +1376,21 @@ LongPrototype.rotateLeft = function rotateLeft(numBits) {
1299
1376
  if ((numBits &= 63) === 0) return this;
1300
1377
  if (numBits === 32) return fromBits(this.high, this.low, this.unsigned);
1301
1378
  if (numBits < 32) {
1302
- b = (32 - numBits);
1303
- return fromBits(((this.low << numBits) | (this.high >>> b)), ((this.high << numBits) | (this.low >>> b)), this.unsigned);
1379
+ b = 32 - numBits;
1380
+ return fromBits(
1381
+ (this.low << numBits) | (this.high >>> b),
1382
+ (this.high << numBits) | (this.low >>> b),
1383
+ this.unsigned,
1384
+ );
1304
1385
  }
1305
1386
  numBits -= 32;
1306
- b = (32 - numBits);
1307
- return fromBits(((this.high << numBits) | (this.low >>> b)), ((this.low << numBits) | (this.high >>> b)), this.unsigned);
1308
- }
1387
+ b = 32 - numBits;
1388
+ return fromBits(
1389
+ (this.high << numBits) | (this.low >>> b),
1390
+ (this.low << numBits) | (this.high >>> b),
1391
+ this.unsigned,
1392
+ );
1393
+ };
1309
1394
  /**
1310
1395
  * Returns this Long with bits rotated to the left by the given amount. This is an alias of {@link Long#rotateLeft}.
1311
1396
  * @function
@@ -1326,13 +1411,21 @@ LongPrototype.rotateRight = function rotateRight(numBits) {
1326
1411
  if ((numBits &= 63) === 0) return this;
1327
1412
  if (numBits === 32) return fromBits(this.high, this.low, this.unsigned);
1328
1413
  if (numBits < 32) {
1329
- b = (32 - numBits);
1330
- return fromBits(((this.high << b) | (this.low >>> numBits)), ((this.low << b) | (this.high >>> numBits)), this.unsigned);
1414
+ b = 32 - numBits;
1415
+ return fromBits(
1416
+ (this.high << b) | (this.low >>> numBits),
1417
+ (this.low << b) | (this.high >>> numBits),
1418
+ this.unsigned,
1419
+ );
1331
1420
  }
1332
1421
  numBits -= 32;
1333
- b = (32 - numBits);
1334
- return fromBits(((this.low << b) | (this.high >>> numBits)), ((this.high << b) | (this.low >>> numBits)), this.unsigned);
1335
- }
1422
+ b = 32 - numBits;
1423
+ return fromBits(
1424
+ (this.low << b) | (this.high >>> numBits),
1425
+ (this.high << b) | (this.low >>> numBits),
1426
+ this.unsigned,
1427
+ );
1428
+ };
1336
1429
  /**
1337
1430
  * Returns this Long with bits rotated to the right by the given amount. This is an alias of {@link Long#rotateRight}.
1338
1431
  * @function
@@ -1347,8 +1440,7 @@ LongPrototype.rotr = LongPrototype.rotateRight;
1347
1440
  * @returns {!Long} Signed long
1348
1441
  */
1349
1442
  LongPrototype.toSigned = function toSigned() {
1350
- if (!this.unsigned)
1351
- return this;
1443
+ if (!this.unsigned) return this;
1352
1444
  return fromBits(this.low, this.high, false);
1353
1445
  };
1354
1446
 
@@ -1358,8 +1450,7 @@ LongPrototype.toSigned = function toSigned() {
1358
1450
  * @returns {!Long} Unsigned long
1359
1451
  */
1360
1452
  LongPrototype.toUnsigned = function toUnsigned() {
1361
- if (this.unsigned)
1362
- return this;
1453
+ if (this.unsigned) return this;
1363
1454
  return fromBits(this.low, this.high, true);
1364
1455
  };
1365
1456
 
@@ -1383,13 +1474,13 @@ LongPrototype.toBytesLE = function toBytesLE() {
1383
1474
  lo = this.low;
1384
1475
  return [
1385
1476
  lo & 0xff,
1386
- lo >>> 8 & 0xff,
1387
- lo >>> 16 & 0xff,
1477
+ (lo >>> 8) & 0xff,
1478
+ (lo >>> 16) & 0xff,
1388
1479
  lo >>> 24,
1389
1480
  hi & 0xff,
1390
- hi >>> 8 & 0xff,
1391
- hi >>> 16 & 0xff,
1392
- hi >>> 24
1481
+ (hi >>> 8) & 0xff,
1482
+ (hi >>> 16) & 0xff,
1483
+ hi >>> 24,
1393
1484
  ];
1394
1485
  };
1395
1486
 
@@ -1403,13 +1494,13 @@ LongPrototype.toBytesBE = function toBytesBE() {
1403
1494
  lo = this.low;
1404
1495
  return [
1405
1496
  hi >>> 24,
1406
- hi >>> 16 & 0xff,
1407
- hi >>> 8 & 0xff,
1497
+ (hi >>> 16) & 0xff,
1498
+ (hi >>> 8) & 0xff,
1408
1499
  hi & 0xff,
1409
1500
  lo >>> 24,
1410
- lo >>> 16 & 0xff,
1411
- lo >>> 8 & 0xff,
1412
- lo & 0xff
1501
+ (lo >>> 16) & 0xff,
1502
+ (lo >>> 8) & 0xff,
1503
+ lo & 0xff,
1413
1504
  ];
1414
1505
  };
1415
1506
 
@@ -1421,7 +1512,9 @@ LongPrototype.toBytesBE = function toBytesBE() {
1421
1512
  * @returns {Long} The corresponding Long value
1422
1513
  */
1423
1514
  Long.fromBytes = function fromBytes(bytes, unsigned, le) {
1424
- return le ? Long.fromBytesLE(bytes, unsigned) : Long.fromBytesBE(bytes, unsigned);
1515
+ return le
1516
+ ? Long.fromBytesLE(bytes, unsigned)
1517
+ : Long.fromBytesBE(bytes, unsigned);
1425
1518
  };
1426
1519
 
1427
1520
  /**
@@ -1432,15 +1525,9 @@ Long.fromBytes = function fromBytes(bytes, unsigned, le) {
1432
1525
  */
1433
1526
  Long.fromBytesLE = function fromBytesLE(bytes, unsigned) {
1434
1527
  return new Long(
1435
- bytes[0] |
1436
- bytes[1] << 8 |
1437
- bytes[2] << 16 |
1438
- bytes[3] << 24,
1439
- bytes[4] |
1440
- bytes[5] << 8 |
1441
- bytes[6] << 16 |
1442
- bytes[7] << 24,
1443
- unsigned
1528
+ bytes[0] | (bytes[1] << 8) | (bytes[2] << 16) | (bytes[3] << 24),
1529
+ bytes[4] | (bytes[5] << 8) | (bytes[6] << 16) | (bytes[7] << 24),
1530
+ unsigned,
1444
1531
  );
1445
1532
  };
1446
1533
 
@@ -1452,16 +1539,43 @@ Long.fromBytesLE = function fromBytesLE(bytes, unsigned) {
1452
1539
  */
1453
1540
  Long.fromBytesBE = function fromBytesBE(bytes, unsigned) {
1454
1541
  return new Long(
1455
- bytes[4] << 24 |
1456
- bytes[5] << 16 |
1457
- bytes[6] << 8 |
1458
- bytes[7],
1459
- bytes[0] << 24 |
1460
- bytes[1] << 16 |
1461
- bytes[2] << 8 |
1462
- bytes[3],
1463
- unsigned
1542
+ (bytes[4] << 24) | (bytes[5] << 16) | (bytes[6] << 8) | bytes[7],
1543
+ (bytes[0] << 24) | (bytes[1] << 16) | (bytes[2] << 8) | bytes[3],
1544
+ unsigned,
1464
1545
  );
1465
1546
  };
1466
1547
 
1548
+ // Support conversion to/from BigInt where available
1549
+ if (typeof BigInt === "function") {
1550
+ /**
1551
+ * Returns a Long representing the given big integer.
1552
+ * @function
1553
+ * @param {number} value The big integer value
1554
+ * @param {boolean=} unsigned Whether unsigned or not, defaults to signed
1555
+ * @returns {!Long} The corresponding Long value
1556
+ */
1557
+ Long.fromBigInt = function fromBigInt(value, unsigned) {
1558
+ var lowBits = Number(BigInt.asIntN(32, value));
1559
+ var highBits = Number(BigInt.asIntN(32, value >> BigInt(32)));
1560
+ return fromBits(lowBits, highBits, unsigned);
1561
+ };
1562
+
1563
+ // Override
1564
+ Long.fromValue = function fromValueWithBigInt(value, unsigned) {
1565
+ if (typeof value === "bigint") return Long.fromBigInt(value, unsigned);
1566
+ return fromValue(value, unsigned);
1567
+ };
1568
+
1569
+ /**
1570
+ * Converts the Long to its big integer representation.
1571
+ * @this {!Long}
1572
+ * @returns {bigint}
1573
+ */
1574
+ LongPrototype.toBigInt = function toBigInt() {
1575
+ var lowBigInt = BigInt(this.low >>> 0);
1576
+ var highBigInt = BigInt(this.unsigned ? this.high >>> 0 : this.high);
1577
+ return (highBigInt << BigInt(32)) | lowBigInt;
1578
+ };
1579
+ }
1580
+
1467
1581
  export default Long;