浏览代码

feat: rm node_modules

未来全栈 3 月之前
父节点
当前提交
4f3158469b
共有 100 个文件被更改,包括 0 次插入20138 次删除
  1. 0 16
      rag-server/node_modules/.bin/color-support
  2. 0 17
      rag-server/node_modules/.bin/color-support.cmd
  3. 0 28
      rag-server/node_modules/.bin/color-support.ps1
  4. 0 16
      rag-server/node_modules/.bin/mkdirp
  5. 0 17
      rag-server/node_modules/.bin/mkdirp.cmd
  6. 0 28
      rag-server/node_modules/.bin/mkdirp.ps1
  7. 0 16
      rag-server/node_modules/.bin/node-pre-gyp
  8. 0 17
      rag-server/node_modules/.bin/node-pre-gyp.cmd
  9. 0 28
      rag-server/node_modules/.bin/node-pre-gyp.ps1
  10. 0 16
      rag-server/node_modules/.bin/nopt
  11. 0 17
      rag-server/node_modules/.bin/nopt.cmd
  12. 0 28
      rag-server/node_modules/.bin/nopt.ps1
  13. 0 16
      rag-server/node_modules/.bin/resolve
  14. 0 17
      rag-server/node_modules/.bin/resolve.cmd
  15. 0 28
      rag-server/node_modules/.bin/resolve.ps1
  16. 0 16
      rag-server/node_modules/.bin/rimraf
  17. 0 17
      rag-server/node_modules/.bin/rimraf.cmd
  18. 0 28
      rag-server/node_modules/.bin/rimraf.ps1
  19. 0 16
      rag-server/node_modules/.bin/semver
  20. 0 17
      rag-server/node_modules/.bin/semver.cmd
  21. 0 28
      rag-server/node_modules/.bin/semver.ps1
  22. 0 16
      rag-server/node_modules/.bin/shjs
  23. 0 17
      rag-server/node_modules/.bin/shjs.cmd
  24. 0 28
      rag-server/node_modules/.bin/shjs.ps1
  25. 0 16
      rag-server/node_modules/.bin/tfjs-custom-module
  26. 0 17
      rag-server/node_modules/.bin/tfjs-custom-module.cmd
  27. 0 28
      rag-server/node_modules/.bin/tfjs-custom-module.ps1
  28. 0 1711
      rag-server/node_modules/.package-lock.json
  29. 0 74
      rag-server/node_modules/@mapbox/node-pre-gyp/.github/workflows/codeql.yml
  30. 0 510
      rag-server/node_modules/@mapbox/node-pre-gyp/CHANGELOG.md
  31. 0 27
      rag-server/node_modules/@mapbox/node-pre-gyp/LICENSE
  32. 0 742
      rag-server/node_modules/@mapbox/node-pre-gyp/README.md
  33. 0 4
      rag-server/node_modules/@mapbox/node-pre-gyp/bin/node-pre-gyp
  34. 0 2
      rag-server/node_modules/@mapbox/node-pre-gyp/bin/node-pre-gyp.cmd
  35. 0 10
      rag-server/node_modules/@mapbox/node-pre-gyp/contributing.md
  36. 0 51
      rag-server/node_modules/@mapbox/node-pre-gyp/lib/build.js
  37. 0 31
      rag-server/node_modules/@mapbox/node-pre-gyp/lib/clean.js
  38. 0 52
      rag-server/node_modules/@mapbox/node-pre-gyp/lib/configure.js
  39. 0 38
      rag-server/node_modules/@mapbox/node-pre-gyp/lib/info.js
  40. 0 235
      rag-server/node_modules/@mapbox/node-pre-gyp/lib/install.js
  41. 0 125
      rag-server/node_modules/@mapbox/node-pre-gyp/lib/main.js
  42. 0 309
      rag-server/node_modules/@mapbox/node-pre-gyp/lib/node-pre-gyp.js
  43. 0 73
      rag-server/node_modules/@mapbox/node-pre-gyp/lib/package.js
  44. 0 34
      rag-server/node_modules/@mapbox/node-pre-gyp/lib/pre-binding.js
  45. 0 81
      rag-server/node_modules/@mapbox/node-pre-gyp/lib/publish.js
  46. 0 20
      rag-server/node_modules/@mapbox/node-pre-gyp/lib/rebuild.js
  47. 0 19
      rag-server/node_modules/@mapbox/node-pre-gyp/lib/reinstall.js
  48. 0 32
      rag-server/node_modules/@mapbox/node-pre-gyp/lib/reveal.js
  49. 0 79
      rag-server/node_modules/@mapbox/node-pre-gyp/lib/testbinary.js
  50. 0 53
      rag-server/node_modules/@mapbox/node-pre-gyp/lib/testpackage.js
  51. 0 41
      rag-server/node_modules/@mapbox/node-pre-gyp/lib/unpublish.js
  52. 0 2602
      rag-server/node_modules/@mapbox/node-pre-gyp/lib/util/abi_crosswalk.json
  53. 0 93
      rag-server/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js
  54. 0 102
      rag-server/node_modules/@mapbox/node-pre-gyp/lib/util/handle_gyp_opts.js
  55. 0 205
      rag-server/node_modules/@mapbox/node-pre-gyp/lib/util/napi.js
  56. 0 26
      rag-server/node_modules/@mapbox/node-pre-gyp/lib/util/nw-pre-gyp/index.html
  57. 0 9
      rag-server/node_modules/@mapbox/node-pre-gyp/lib/util/nw-pre-gyp/package.json
  58. 0 163
      rag-server/node_modules/@mapbox/node-pre-gyp/lib/util/s3_setup.js
  59. 0 335
      rag-server/node_modules/@mapbox/node-pre-gyp/lib/util/versioning.js
  60. 0 22
      rag-server/node_modules/@mapbox/node-pre-gyp/node_modules/node-fetch/LICENSE.md
  61. 0 634
      rag-server/node_modules/@mapbox/node-pre-gyp/node_modules/node-fetch/README.md
  62. 0 25
      rag-server/node_modules/@mapbox/node-pre-gyp/node_modules/node-fetch/browser.js
  63. 0 1777
      rag-server/node_modules/@mapbox/node-pre-gyp/node_modules/node-fetch/lib/index.es.js
  64. 0 1787
      rag-server/node_modules/@mapbox/node-pre-gyp/node_modules/node-fetch/lib/index.js
  65. 0 1775
      rag-server/node_modules/@mapbox/node-pre-gyp/node_modules/node-fetch/lib/index.mjs
  66. 0 89
      rag-server/node_modules/@mapbox/node-pre-gyp/node_modules/node-fetch/package.json
  67. 0 62
      rag-server/node_modules/@mapbox/node-pre-gyp/package.json
  68. 0 1
      rag-server/node_modules/@tensorflow/tfjs-core/.bazelignore
  69. 0 1
      rag-server/node_modules/@tensorflow/tfjs-core/.bazelrc
  70. 0 2
      rag-server/node_modules/@tensorflow/tfjs-core/BUILD.bazel
  71. 0 41
      rag-server/node_modules/@tensorflow/tfjs-core/README.md
  72. 0 387
      rag-server/node_modules/@tensorflow/tfjs-core/benchmarks/index.html
  73. 0 137
      rag-server/node_modules/@tensorflow/tfjs-core/benchmarks/main.css
  74. 0 200
      rag-server/node_modules/@tensorflow/tfjs-core/benchmarks/modelConfig.js
  75. 0 39
      rag-server/node_modules/@tensorflow/tfjs-core/benchmarks/util.js
  76. 0 80
      rag-server/node_modules/@tensorflow/tfjs-core/cloudbuild.yml
  77. 0 46
      rag-server/node_modules/@tensorflow/tfjs-core/dist/backends/array_util.d.ts
  78. 0 87
      rag-server/node_modules/@tensorflow/tfjs-core/dist/backends/array_util.js
  79. 0 1
      rag-server/node_modules/@tensorflow/tfjs-core/dist/backends/array_util.js.map
  80. 0 17
      rag-server/node_modules/@tensorflow/tfjs-core/dist/backends/array_util_test.d.ts
  81. 0 0
      rag-server/node_modules/@tensorflow/tfjs-core/dist/backends/array_util_test.js.map
  82. 0 225
      rag-server/node_modules/@tensorflow/tfjs-core/dist/backends/backend.d.ts
  83. 0 518
      rag-server/node_modules/@tensorflow/tfjs-core/dist/backends/backend.js
  84. 0 0
      rag-server/node_modules/@tensorflow/tfjs-core/dist/backends/backend.js.map
  85. 0 1
      rag-server/node_modules/@tensorflow/tfjs-core/dist/backends/backend_test.d.ts
  86. 0 1
      rag-server/node_modules/@tensorflow/tfjs-core/dist/backends/backend_test.js.map
  87. 0 31
      rag-server/node_modules/@tensorflow/tfjs-core/dist/backends/backend_util.d.ts
  88. 0 84
      rag-server/node_modules/@tensorflow/tfjs-core/dist/backends/backend_util.js
  89. 0 0
      rag-server/node_modules/@tensorflow/tfjs-core/dist/backends/backend_util.js.map
  90. 0 96
      rag-server/node_modules/@tensorflow/tfjs-core/dist/backends/complex_util.d.ts
  91. 0 146
      rag-server/node_modules/@tensorflow/tfjs-core/dist/backends/complex_util.js
  92. 0 0
      rag-server/node_modules/@tensorflow/tfjs-core/dist/backends/complex_util.js.map
  93. 0 1
      rag-server/node_modules/@tensorflow/tfjs-core/dist/backends/complex_util_test.d.ts
  94. 0 0
      rag-server/node_modules/@tensorflow/tfjs-core/dist/backends/complex_util_test.js.map
  95. 0 204
      rag-server/node_modules/@tensorflow/tfjs-core/dist/backends/cpu/backend_cpu.d.ts
  96. 0 3149
      rag-server/node_modules/@tensorflow/tfjs-core/dist/backends/cpu/backend_cpu.js
  97. 0 0
      rag-server/node_modules/@tensorflow/tfjs-core/dist/backends/cpu/backend_cpu.js.map
  98. 0 17
      rag-server/node_modules/@tensorflow/tfjs-core/dist/backends/cpu/backend_cpu_test.d.ts
  99. 0 0
      rag-server/node_modules/@tensorflow/tfjs-core/dist/backends/cpu/backend_cpu_test.js.map
  100. 0 18
      rag-server/node_modules/@tensorflow/tfjs-core/dist/backends/cpu/backend_cpu_test_registry.d.ts

+ 0 - 16
rag-server/node_modules/.bin/color-support

@@ -1,16 +0,0 @@
-#!/bin/sh
-basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
-
-case `uname` in
-    *CYGWIN*|*MINGW*|*MSYS*)
-        if command -v cygpath > /dev/null 2>&1; then
-            basedir=`cygpath -w "$basedir"`
-        fi
-    ;;
-esac
-
-if [ -x "$basedir/node" ]; then
-  exec "$basedir/node"  "$basedir/../color-support/bin.js" "$@"
-else 
-  exec node  "$basedir/../color-support/bin.js" "$@"
-fi

+ 0 - 17
rag-server/node_modules/.bin/color-support.cmd

@@ -1,17 +0,0 @@
-@ECHO off
-GOTO start
-:find_dp0
-SET dp0=%~dp0
-EXIT /b
-:start
-SETLOCAL
-CALL :find_dp0
-
-IF EXIST "%dp0%\node.exe" (
-  SET "_prog=%dp0%\node.exe"
-) ELSE (
-  SET "_prog=node"
-  SET PATHEXT=%PATHEXT:;.JS;=;%
-)
-
-endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%"  "%dp0%\..\color-support\bin.js" %*

+ 0 - 28
rag-server/node_modules/.bin/color-support.ps1

@@ -1,28 +0,0 @@
-#!/usr/bin/env pwsh
-$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
-
-$exe=""
-if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
-  # Fix case when both the Windows and Linux builds of Node
-  # are installed in the same directory
-  $exe=".exe"
-}
-$ret=0
-if (Test-Path "$basedir/node$exe") {
-  # Support pipeline input
-  if ($MyInvocation.ExpectingInput) {
-    $input | & "$basedir/node$exe"  "$basedir/../color-support/bin.js" $args
-  } else {
-    & "$basedir/node$exe"  "$basedir/../color-support/bin.js" $args
-  }
-  $ret=$LASTEXITCODE
-} else {
-  # Support pipeline input
-  if ($MyInvocation.ExpectingInput) {
-    $input | & "node$exe"  "$basedir/../color-support/bin.js" $args
-  } else {
-    & "node$exe"  "$basedir/../color-support/bin.js" $args
-  }
-  $ret=$LASTEXITCODE
-}
-exit $ret

+ 0 - 16
rag-server/node_modules/.bin/mkdirp

@@ -1,16 +0,0 @@
-#!/bin/sh
-basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
-
-case `uname` in
-    *CYGWIN*|*MINGW*|*MSYS*)
-        if command -v cygpath > /dev/null 2>&1; then
-            basedir=`cygpath -w "$basedir"`
-        fi
-    ;;
-esac
-
-if [ -x "$basedir/node" ]; then
-  exec "$basedir/node"  "$basedir/../mkdirp/bin/cmd.js" "$@"
-else 
-  exec node  "$basedir/../mkdirp/bin/cmd.js" "$@"
-fi

+ 0 - 17
rag-server/node_modules/.bin/mkdirp.cmd

@@ -1,17 +0,0 @@
-@ECHO off
-GOTO start
-:find_dp0
-SET dp0=%~dp0
-EXIT /b
-:start
-SETLOCAL
-CALL :find_dp0
-
-IF EXIST "%dp0%\node.exe" (
-  SET "_prog=%dp0%\node.exe"
-) ELSE (
-  SET "_prog=node"
-  SET PATHEXT=%PATHEXT:;.JS;=;%
-)
-
-endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%"  "%dp0%\..\mkdirp\bin\cmd.js" %*

+ 0 - 28
rag-server/node_modules/.bin/mkdirp.ps1

@@ -1,28 +0,0 @@
-#!/usr/bin/env pwsh
-$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
-
-$exe=""
-if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
-  # Fix case when both the Windows and Linux builds of Node
-  # are installed in the same directory
-  $exe=".exe"
-}
-$ret=0
-if (Test-Path "$basedir/node$exe") {
-  # Support pipeline input
-  if ($MyInvocation.ExpectingInput) {
-    $input | & "$basedir/node$exe"  "$basedir/../mkdirp/bin/cmd.js" $args
-  } else {
-    & "$basedir/node$exe"  "$basedir/../mkdirp/bin/cmd.js" $args
-  }
-  $ret=$LASTEXITCODE
-} else {
-  # Support pipeline input
-  if ($MyInvocation.ExpectingInput) {
-    $input | & "node$exe"  "$basedir/../mkdirp/bin/cmd.js" $args
-  } else {
-    & "node$exe"  "$basedir/../mkdirp/bin/cmd.js" $args
-  }
-  $ret=$LASTEXITCODE
-}
-exit $ret

+ 0 - 16
rag-server/node_modules/.bin/node-pre-gyp

@@ -1,16 +0,0 @@
-#!/bin/sh
-basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
-
-case `uname` in
-    *CYGWIN*|*MINGW*|*MSYS*)
-        if command -v cygpath > /dev/null 2>&1; then
-            basedir=`cygpath -w "$basedir"`
-        fi
-    ;;
-esac
-
-if [ -x "$basedir/node" ]; then
-  exec "$basedir/node"  "$basedir/../@mapbox/node-pre-gyp/bin/node-pre-gyp" "$@"
-else 
-  exec node  "$basedir/../@mapbox/node-pre-gyp/bin/node-pre-gyp" "$@"
-fi

+ 0 - 17
rag-server/node_modules/.bin/node-pre-gyp.cmd

@@ -1,17 +0,0 @@
-@ECHO off
-GOTO start
-:find_dp0
-SET dp0=%~dp0
-EXIT /b
-:start
-SETLOCAL
-CALL :find_dp0
-
-IF EXIST "%dp0%\node.exe" (
-  SET "_prog=%dp0%\node.exe"
-) ELSE (
-  SET "_prog=node"
-  SET PATHEXT=%PATHEXT:;.JS;=;%
-)
-
-endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%"  "%dp0%\..\@mapbox\node-pre-gyp\bin\node-pre-gyp" %*

+ 0 - 28
rag-server/node_modules/.bin/node-pre-gyp.ps1

@@ -1,28 +0,0 @@
-#!/usr/bin/env pwsh
-$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
-
-$exe=""
-if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
-  # Fix case when both the Windows and Linux builds of Node
-  # are installed in the same directory
-  $exe=".exe"
-}
-$ret=0
-if (Test-Path "$basedir/node$exe") {
-  # Support pipeline input
-  if ($MyInvocation.ExpectingInput) {
-    $input | & "$basedir/node$exe"  "$basedir/../@mapbox/node-pre-gyp/bin/node-pre-gyp" $args
-  } else {
-    & "$basedir/node$exe"  "$basedir/../@mapbox/node-pre-gyp/bin/node-pre-gyp" $args
-  }
-  $ret=$LASTEXITCODE
-} else {
-  # Support pipeline input
-  if ($MyInvocation.ExpectingInput) {
-    $input | & "node$exe"  "$basedir/../@mapbox/node-pre-gyp/bin/node-pre-gyp" $args
-  } else {
-    & "node$exe"  "$basedir/../@mapbox/node-pre-gyp/bin/node-pre-gyp" $args
-  }
-  $ret=$LASTEXITCODE
-}
-exit $ret

+ 0 - 16
rag-server/node_modules/.bin/nopt

@@ -1,16 +0,0 @@
-#!/bin/sh
-basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
-
-case `uname` in
-    *CYGWIN*|*MINGW*|*MSYS*)
-        if command -v cygpath > /dev/null 2>&1; then
-            basedir=`cygpath -w "$basedir"`
-        fi
-    ;;
-esac
-
-if [ -x "$basedir/node" ]; then
-  exec "$basedir/node"  "$basedir/../nopt/bin/nopt.js" "$@"
-else 
-  exec node  "$basedir/../nopt/bin/nopt.js" "$@"
-fi

+ 0 - 17
rag-server/node_modules/.bin/nopt.cmd

@@ -1,17 +0,0 @@
-@ECHO off
-GOTO start
-:find_dp0
-SET dp0=%~dp0
-EXIT /b
-:start
-SETLOCAL
-CALL :find_dp0
-
-IF EXIST "%dp0%\node.exe" (
-  SET "_prog=%dp0%\node.exe"
-) ELSE (
-  SET "_prog=node"
-  SET PATHEXT=%PATHEXT:;.JS;=;%
-)
-
-endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%"  "%dp0%\..\nopt\bin\nopt.js" %*

+ 0 - 28
rag-server/node_modules/.bin/nopt.ps1

@@ -1,28 +0,0 @@
-#!/usr/bin/env pwsh
-$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
-
-$exe=""
-if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
-  # Fix case when both the Windows and Linux builds of Node
-  # are installed in the same directory
-  $exe=".exe"
-}
-$ret=0
-if (Test-Path "$basedir/node$exe") {
-  # Support pipeline input
-  if ($MyInvocation.ExpectingInput) {
-    $input | & "$basedir/node$exe"  "$basedir/../nopt/bin/nopt.js" $args
-  } else {
-    & "$basedir/node$exe"  "$basedir/../nopt/bin/nopt.js" $args
-  }
-  $ret=$LASTEXITCODE
-} else {
-  # Support pipeline input
-  if ($MyInvocation.ExpectingInput) {
-    $input | & "node$exe"  "$basedir/../nopt/bin/nopt.js" $args
-  } else {
-    & "node$exe"  "$basedir/../nopt/bin/nopt.js" $args
-  }
-  $ret=$LASTEXITCODE
-}
-exit $ret

+ 0 - 16
rag-server/node_modules/.bin/resolve

@@ -1,16 +0,0 @@
-#!/bin/sh
-basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
-
-case `uname` in
-    *CYGWIN*|*MINGW*|*MSYS*)
-        if command -v cygpath > /dev/null 2>&1; then
-            basedir=`cygpath -w "$basedir"`
-        fi
-    ;;
-esac
-
-if [ -x "$basedir/node" ]; then
-  exec "$basedir/node"  "$basedir/../resolve/bin/resolve" "$@"
-else 
-  exec node  "$basedir/../resolve/bin/resolve" "$@"
-fi

+ 0 - 17
rag-server/node_modules/.bin/resolve.cmd

@@ -1,17 +0,0 @@
-@ECHO off
-GOTO start
-:find_dp0
-SET dp0=%~dp0
-EXIT /b
-:start
-SETLOCAL
-CALL :find_dp0
-
-IF EXIST "%dp0%\node.exe" (
-  SET "_prog=%dp0%\node.exe"
-) ELSE (
-  SET "_prog=node"
-  SET PATHEXT=%PATHEXT:;.JS;=;%
-)
-
-endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%"  "%dp0%\..\resolve\bin\resolve" %*

+ 0 - 28
rag-server/node_modules/.bin/resolve.ps1

@@ -1,28 +0,0 @@
-#!/usr/bin/env pwsh
-$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
-
-$exe=""
-if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
-  # Fix case when both the Windows and Linux builds of Node
-  # are installed in the same directory
-  $exe=".exe"
-}
-$ret=0
-if (Test-Path "$basedir/node$exe") {
-  # Support pipeline input
-  if ($MyInvocation.ExpectingInput) {
-    $input | & "$basedir/node$exe"  "$basedir/../resolve/bin/resolve" $args
-  } else {
-    & "$basedir/node$exe"  "$basedir/../resolve/bin/resolve" $args
-  }
-  $ret=$LASTEXITCODE
-} else {
-  # Support pipeline input
-  if ($MyInvocation.ExpectingInput) {
-    $input | & "node$exe"  "$basedir/../resolve/bin/resolve" $args
-  } else {
-    & "node$exe"  "$basedir/../resolve/bin/resolve" $args
-  }
-  $ret=$LASTEXITCODE
-}
-exit $ret

+ 0 - 16
rag-server/node_modules/.bin/rimraf

@@ -1,16 +0,0 @@
-#!/bin/sh
-basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
-
-case `uname` in
-    *CYGWIN*|*MINGW*|*MSYS*)
-        if command -v cygpath > /dev/null 2>&1; then
-            basedir=`cygpath -w "$basedir"`
-        fi
-    ;;
-esac
-
-if [ -x "$basedir/node" ]; then
-  exec "$basedir/node"  "$basedir/../rimraf/bin.js" "$@"
-else 
-  exec node  "$basedir/../rimraf/bin.js" "$@"
-fi

+ 0 - 17
rag-server/node_modules/.bin/rimraf.cmd

@@ -1,17 +0,0 @@
-@ECHO off
-GOTO start
-:find_dp0
-SET dp0=%~dp0
-EXIT /b
-:start
-SETLOCAL
-CALL :find_dp0
-
-IF EXIST "%dp0%\node.exe" (
-  SET "_prog=%dp0%\node.exe"
-) ELSE (
-  SET "_prog=node"
-  SET PATHEXT=%PATHEXT:;.JS;=;%
-)
-
-endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%"  "%dp0%\..\rimraf\bin.js" %*

+ 0 - 28
rag-server/node_modules/.bin/rimraf.ps1

@@ -1,28 +0,0 @@
-#!/usr/bin/env pwsh
-$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
-
-$exe=""
-if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
-  # Fix case when both the Windows and Linux builds of Node
-  # are installed in the same directory
-  $exe=".exe"
-}
-$ret=0
-if (Test-Path "$basedir/node$exe") {
-  # Support pipeline input
-  if ($MyInvocation.ExpectingInput) {
-    $input | & "$basedir/node$exe"  "$basedir/../rimraf/bin.js" $args
-  } else {
-    & "$basedir/node$exe"  "$basedir/../rimraf/bin.js" $args
-  }
-  $ret=$LASTEXITCODE
-} else {
-  # Support pipeline input
-  if ($MyInvocation.ExpectingInput) {
-    $input | & "node$exe"  "$basedir/../rimraf/bin.js" $args
-  } else {
-    & "node$exe"  "$basedir/../rimraf/bin.js" $args
-  }
-  $ret=$LASTEXITCODE
-}
-exit $ret

+ 0 - 16
rag-server/node_modules/.bin/semver

@@ -1,16 +0,0 @@
-#!/bin/sh
-basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
-
-case `uname` in
-    *CYGWIN*|*MINGW*|*MSYS*)
-        if command -v cygpath > /dev/null 2>&1; then
-            basedir=`cygpath -w "$basedir"`
-        fi
-    ;;
-esac
-
-if [ -x "$basedir/node" ]; then
-  exec "$basedir/node"  "$basedir/../semver/bin/semver.js" "$@"
-else 
-  exec node  "$basedir/../semver/bin/semver.js" "$@"
-fi

+ 0 - 17
rag-server/node_modules/.bin/semver.cmd

@@ -1,17 +0,0 @@
-@ECHO off
-GOTO start
-:find_dp0
-SET dp0=%~dp0
-EXIT /b
-:start
-SETLOCAL
-CALL :find_dp0
-
-IF EXIST "%dp0%\node.exe" (
-  SET "_prog=%dp0%\node.exe"
-) ELSE (
-  SET "_prog=node"
-  SET PATHEXT=%PATHEXT:;.JS;=;%
-)
-
-endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%"  "%dp0%\..\semver\bin\semver.js" %*

+ 0 - 28
rag-server/node_modules/.bin/semver.ps1

@@ -1,28 +0,0 @@
-#!/usr/bin/env pwsh
-$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
-
-$exe=""
-if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
-  # Fix case when both the Windows and Linux builds of Node
-  # are installed in the same directory
-  $exe=".exe"
-}
-$ret=0
-if (Test-Path "$basedir/node$exe") {
-  # Support pipeline input
-  if ($MyInvocation.ExpectingInput) {
-    $input | & "$basedir/node$exe"  "$basedir/../semver/bin/semver.js" $args
-  } else {
-    & "$basedir/node$exe"  "$basedir/../semver/bin/semver.js" $args
-  }
-  $ret=$LASTEXITCODE
-} else {
-  # Support pipeline input
-  if ($MyInvocation.ExpectingInput) {
-    $input | & "node$exe"  "$basedir/../semver/bin/semver.js" $args
-  } else {
-    & "node$exe"  "$basedir/../semver/bin/semver.js" $args
-  }
-  $ret=$LASTEXITCODE
-}
-exit $ret

+ 0 - 16
rag-server/node_modules/.bin/shjs

@@ -1,16 +0,0 @@
-#!/bin/sh
-basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
-
-case `uname` in
-    *CYGWIN*|*MINGW*|*MSYS*)
-        if command -v cygpath > /dev/null 2>&1; then
-            basedir=`cygpath -w "$basedir"`
-        fi
-    ;;
-esac
-
-if [ -x "$basedir/node" ]; then
-  exec "$basedir/node"  "$basedir/../shelljs/bin/shjs" "$@"
-else 
-  exec node  "$basedir/../shelljs/bin/shjs" "$@"
-fi

+ 0 - 17
rag-server/node_modules/.bin/shjs.cmd

@@ -1,17 +0,0 @@
-@ECHO off
-GOTO start
-:find_dp0
-SET dp0=%~dp0
-EXIT /b
-:start
-SETLOCAL
-CALL :find_dp0
-
-IF EXIST "%dp0%\node.exe" (
-  SET "_prog=%dp0%\node.exe"
-) ELSE (
-  SET "_prog=node"
-  SET PATHEXT=%PATHEXT:;.JS;=;%
-)
-
-endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%"  "%dp0%\..\shelljs\bin\shjs" %*

+ 0 - 28
rag-server/node_modules/.bin/shjs.ps1

@@ -1,28 +0,0 @@
-#!/usr/bin/env pwsh
-$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
-
-$exe=""
-if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
-  # Fix case when both the Windows and Linux builds of Node
-  # are installed in the same directory
-  $exe=".exe"
-}
-$ret=0
-if (Test-Path "$basedir/node$exe") {
-  # Support pipeline input
-  if ($MyInvocation.ExpectingInput) {
-    $input | & "$basedir/node$exe"  "$basedir/../shelljs/bin/shjs" $args
-  } else {
-    & "$basedir/node$exe"  "$basedir/../shelljs/bin/shjs" $args
-  }
-  $ret=$LASTEXITCODE
-} else {
-  # Support pipeline input
-  if ($MyInvocation.ExpectingInput) {
-    $input | & "node$exe"  "$basedir/../shelljs/bin/shjs" $args
-  } else {
-    & "node$exe"  "$basedir/../shelljs/bin/shjs" $args
-  }
-  $ret=$LASTEXITCODE
-}
-exit $ret

+ 0 - 16
rag-server/node_modules/.bin/tfjs-custom-module

@@ -1,16 +0,0 @@
-#!/bin/sh
-basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
-
-case `uname` in
-    *CYGWIN*|*MINGW*|*MSYS*)
-        if command -v cygpath > /dev/null 2>&1; then
-            basedir=`cygpath -w "$basedir"`
-        fi
-    ;;
-esac
-
-if [ -x "$basedir/node" ]; then
-  exec "$basedir/node"  "$basedir/../@tensorflow/tfjs/dist/tools/custom_module/cli.js" "$@"
-else 
-  exec node  "$basedir/../@tensorflow/tfjs/dist/tools/custom_module/cli.js" "$@"
-fi

+ 0 - 17
rag-server/node_modules/.bin/tfjs-custom-module.cmd

@@ -1,17 +0,0 @@
-@ECHO off
-GOTO start
-:find_dp0
-SET dp0=%~dp0
-EXIT /b
-:start
-SETLOCAL
-CALL :find_dp0
-
-IF EXIST "%dp0%\node.exe" (
-  SET "_prog=%dp0%\node.exe"
-) ELSE (
-  SET "_prog=node"
-  SET PATHEXT=%PATHEXT:;.JS;=;%
-)
-
-endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%"  "%dp0%\..\@tensorflow\tfjs\dist\tools\custom_module\cli.js" %*

+ 0 - 28
rag-server/node_modules/.bin/tfjs-custom-module.ps1

@@ -1,28 +0,0 @@
-#!/usr/bin/env pwsh
-$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
-
-$exe=""
-if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
-  # Fix case when both the Windows and Linux builds of Node
-  # are installed in the same directory
-  $exe=".exe"
-}
-$ret=0
-if (Test-Path "$basedir/node$exe") {
-  # Support pipeline input
-  if ($MyInvocation.ExpectingInput) {
-    $input | & "$basedir/node$exe"  "$basedir/../@tensorflow/tfjs/dist/tools/custom_module/cli.js" $args
-  } else {
-    & "$basedir/node$exe"  "$basedir/../@tensorflow/tfjs/dist/tools/custom_module/cli.js" $args
-  }
-  $ret=$LASTEXITCODE
-} else {
-  # Support pipeline input
-  if ($MyInvocation.ExpectingInput) {
-    $input | & "node$exe"  "$basedir/../@tensorflow/tfjs/dist/tools/custom_module/cli.js" $args
-  } else {
-    & "node$exe"  "$basedir/../@tensorflow/tfjs/dist/tools/custom_module/cli.js" $args
-  }
-  $ret=$LASTEXITCODE
-}
-exit $ret

+ 0 - 1711
rag-server/node_modules/.package-lock.json

@@ -1,1711 +0,0 @@
-{
-  "name": "rag-server",
-  "version": "1.0.0",
-  "lockfileVersion": 3,
-  "requires": true,
-  "packages": {
-    "node_modules/@mapbox/node-pre-gyp": {
-      "version": "1.0.11",
-      "resolved": "https://registry.npmmirror.com/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.11.tgz",
-      "integrity": "sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ==",
-      "license": "BSD-3-Clause",
-      "dependencies": {
-        "detect-libc": "^2.0.0",
-        "https-proxy-agent": "^5.0.0",
-        "make-dir": "^3.1.0",
-        "node-fetch": "^2.6.7",
-        "nopt": "^5.0.0",
-        "npmlog": "^5.0.1",
-        "rimraf": "^3.0.2",
-        "semver": "^7.3.5",
-        "tar": "^6.1.11"
-      },
-      "bin": {
-        "node-pre-gyp": "bin/node-pre-gyp"
-      }
-    },
-    "node_modules/@mapbox/node-pre-gyp/node_modules/node-fetch": {
-      "version": "2.7.0",
-      "resolved": "https://registry.npmmirror.com/node-fetch/-/node-fetch-2.7.0.tgz",
-      "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==",
-      "license": "MIT",
-      "dependencies": {
-        "whatwg-url": "^5.0.0"
-      },
-      "engines": {
-        "node": "4.x || >=6.0.0"
-      },
-      "peerDependencies": {
-        "encoding": "^0.1.0"
-      },
-      "peerDependenciesMeta": {
-        "encoding": {
-          "optional": true
-        }
-      }
-    },
-    "node_modules/@tensorflow/tfjs": {
-      "version": "4.22.0",
-      "resolved": "https://registry.npmmirror.com/@tensorflow/tfjs/-/tfjs-4.22.0.tgz",
-      "integrity": "sha512-0TrIrXs6/b7FLhLVNmfh8Sah6JgjBPH4mZ8JGb7NU6WW+cx00qK5BcAZxw7NCzxj6N8MRAIfHq+oNbPUNG5VAg==",
-      "license": "Apache-2.0",
-      "dependencies": {
-        "@tensorflow/tfjs-backend-cpu": "4.22.0",
-        "@tensorflow/tfjs-backend-webgl": "4.22.0",
-        "@tensorflow/tfjs-converter": "4.22.0",
-        "@tensorflow/tfjs-core": "4.22.0",
-        "@tensorflow/tfjs-data": "4.22.0",
-        "@tensorflow/tfjs-layers": "4.22.0",
-        "argparse": "^1.0.10",
-        "chalk": "^4.1.0",
-        "core-js": "3.29.1",
-        "regenerator-runtime": "^0.13.5",
-        "yargs": "^16.0.3"
-      },
-      "bin": {
-        "tfjs-custom-module": "dist/tools/custom_module/cli.js"
-      }
-    },
-    "node_modules/@tensorflow/tfjs-core": {
-      "version": "1.7.0",
-      "resolved": "https://registry.npmmirror.com/@tensorflow/tfjs-core/-/tfjs-core-1.7.0.tgz",
-      "integrity": "sha512-uwQdiklNjqBnHPeseOdG0sGxrI3+d6lybaKu2+ou3ajVeKdPEwpWbgqA6iHjq1iylnOGkgkbbnQ6r2lwkiIIHw==",
-      "license": "Apache-2.0",
-      "dependencies": {
-        "@types/offscreencanvas": "~2019.3.0",
-        "@types/seedrandom": "2.4.27",
-        "@types/webgl-ext": "0.0.30",
-        "@types/webgl2": "0.0.4",
-        "node-fetch": "~2.1.2",
-        "seedrandom": "2.4.3"
-      },
-      "engines": {
-        "yarn": ">= 1.3.2"
-      }
-    },
-    "node_modules/@tensorflow/tfjs-node": {
-      "version": "4.22.0",
-      "resolved": "https://registry.npmmirror.com/@tensorflow/tfjs-node/-/tfjs-node-4.22.0.tgz",
-      "integrity": "sha512-uHrXeUlfgkMxTZqHkESSV7zSdKdV0LlsBeblqkuKU9nnfxB1pC6DtoyYVaLxznzZy7WQSegjcohxxCjAf6Dc7w==",
-      "hasInstallScript": true,
-      "license": "Apache-2.0",
-      "dependencies": {
-        "@mapbox/node-pre-gyp": "1.0.9",
-        "@tensorflow/tfjs": "4.22.0",
-        "adm-zip": "^0.5.2",
-        "google-protobuf": "^3.9.2",
-        "https-proxy-agent": "^2.2.1",
-        "progress": "^2.0.0",
-        "rimraf": "^2.6.2",
-        "tar": "^6.2.1"
-      },
-      "engines": {
-        "node": ">=8.11.0"
-      }
-    },
-    "node_modules/@tensorflow/tfjs-node/node_modules/@mapbox/node-pre-gyp": {
-      "version": "1.0.9",
-      "resolved": "https://registry.npmmirror.com/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.9.tgz",
-      "integrity": "sha512-aDF3S3rK9Q2gey/WAttUlISduDItz5BU3306M9Eyv6/oS40aMprnopshtlKTykxRNIBEZuRMaZAnbrQ4QtKGyw==",
-      "license": "BSD-3-Clause",
-      "dependencies": {
-        "detect-libc": "^2.0.0",
-        "https-proxy-agent": "^5.0.0",
-        "make-dir": "^3.1.0",
-        "node-fetch": "^2.6.7",
-        "nopt": "^5.0.0",
-        "npmlog": "^5.0.1",
-        "rimraf": "^3.0.2",
-        "semver": "^7.3.5",
-        "tar": "^6.1.11"
-      },
-      "bin": {
-        "node-pre-gyp": "bin/node-pre-gyp"
-      }
-    },
-    "node_modules/@tensorflow/tfjs-node/node_modules/@mapbox/node-pre-gyp/node_modules/https-proxy-agent": {
-      "version": "5.0.1",
-      "resolved": "https://registry.npmmirror.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz",
-      "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==",
-      "license": "MIT",
-      "dependencies": {
-        "agent-base": "6",
-        "debug": "4"
-      },
-      "engines": {
-        "node": ">= 6"
-      }
-    },
-    "node_modules/@tensorflow/tfjs-node/node_modules/@mapbox/node-pre-gyp/node_modules/rimraf": {
-      "version": "3.0.2",
-      "resolved": "https://registry.npmmirror.com/rimraf/-/rimraf-3.0.2.tgz",
-      "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
-      "deprecated": "Rimraf versions prior to v4 are no longer supported",
-      "license": "ISC",
-      "dependencies": {
-        "glob": "^7.1.3"
-      },
-      "bin": {
-        "rimraf": "bin.js"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/isaacs"
-      }
-    },
-    "node_modules/@tensorflow/tfjs-node/node_modules/https-proxy-agent": {
-      "version": "2.2.4",
-      "resolved": "https://registry.npmmirror.com/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz",
-      "integrity": "sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg==",
-      "license": "MIT",
-      "dependencies": {
-        "agent-base": "^4.3.0",
-        "debug": "^3.1.0"
-      },
-      "engines": {
-        "node": ">= 4.5.0"
-      }
-    },
-    "node_modules/@tensorflow/tfjs-node/node_modules/https-proxy-agent/node_modules/agent-base": {
-      "version": "4.3.0",
-      "resolved": "https://registry.npmmirror.com/agent-base/-/agent-base-4.3.0.tgz",
-      "integrity": "sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg==",
-      "license": "MIT",
-      "dependencies": {
-        "es6-promisify": "^5.0.0"
-      },
-      "engines": {
-        "node": ">= 4.0.0"
-      }
-    },
-    "node_modules/@tensorflow/tfjs-node/node_modules/https-proxy-agent/node_modules/debug": {
-      "version": "3.2.7",
-      "resolved": "https://registry.npmmirror.com/debug/-/debug-3.2.7.tgz",
-      "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
-      "license": "MIT",
-      "dependencies": {
-        "ms": "^2.1.1"
-      }
-    },
-    "node_modules/@tensorflow/tfjs-node/node_modules/node-fetch": {
-      "version": "2.7.0",
-      "resolved": "https://registry.npmmirror.com/node-fetch/-/node-fetch-2.7.0.tgz",
-      "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==",
-      "license": "MIT",
-      "dependencies": {
-        "whatwg-url": "^5.0.0"
-      },
-      "engines": {
-        "node": "4.x || >=6.0.0"
-      },
-      "peerDependencies": {
-        "encoding": "^0.1.0"
-      },
-      "peerDependenciesMeta": {
-        "encoding": {
-          "optional": true
-        }
-      }
-    },
-    "node_modules/@tensorflow/tfjs-node/node_modules/rimraf": {
-      "version": "2.7.1",
-      "resolved": "https://registry.npmmirror.com/rimraf/-/rimraf-2.7.1.tgz",
-      "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==",
-      "deprecated": "Rimraf versions prior to v4 are no longer supported",
-      "license": "ISC",
-      "dependencies": {
-        "glob": "^7.1.3"
-      },
-      "bin": {
-        "rimraf": "bin.js"
-      }
-    },
-    "node_modules/@tensorflow/tfjs/node_modules/@tensorflow/tfjs-backend-cpu": {
-      "version": "4.22.0",
-      "resolved": "https://registry.npmmirror.com/@tensorflow/tfjs-backend-cpu/-/tfjs-backend-cpu-4.22.0.tgz",
-      "integrity": "sha512-1u0FmuLGuRAi8D2c3cocHTASGXOmHc/4OvoVDENJayjYkS119fcTcQf4iHrtLthWyDIPy3JiPhRrZQC9EwnhLw==",
-      "license": "Apache-2.0",
-      "dependencies": {
-        "@types/seedrandom": "^2.4.28",
-        "seedrandom": "^3.0.5"
-      },
-      "engines": {
-        "yarn": ">= 1.3.2"
-      },
-      "peerDependencies": {
-        "@tensorflow/tfjs-core": "4.22.0"
-      }
-    },
-    "node_modules/@tensorflow/tfjs/node_modules/@tensorflow/tfjs-backend-webgl": {
-      "version": "4.22.0",
-      "resolved": "https://registry.npmmirror.com/@tensorflow/tfjs-backend-webgl/-/tfjs-backend-webgl-4.22.0.tgz",
-      "integrity": "sha512-H535XtZWnWgNwSzv538czjVlbJebDl5QTMOth4RXr2p/kJ1qSIXE0vZvEtO+5EC9b00SvhplECny2yDewQb/Yg==",
-      "license": "Apache-2.0",
-      "dependencies": {
-        "@tensorflow/tfjs-backend-cpu": "4.22.0",
-        "@types/offscreencanvas": "~2019.3.0",
-        "@types/seedrandom": "^2.4.28",
-        "seedrandom": "^3.0.5"
-      },
-      "engines": {
-        "yarn": ">= 1.3.2"
-      },
-      "peerDependencies": {
-        "@tensorflow/tfjs-core": "4.22.0"
-      }
-    },
-    "node_modules/@tensorflow/tfjs/node_modules/@tensorflow/tfjs-converter": {
-      "version": "4.22.0",
-      "resolved": "https://registry.npmmirror.com/@tensorflow/tfjs-converter/-/tfjs-converter-4.22.0.tgz",
-      "integrity": "sha512-PT43MGlnzIo+YfbsjM79Lxk9lOq6uUwZuCc8rrp0hfpLjF6Jv8jS84u2jFb+WpUeuF4K33ZDNx8CjiYrGQ2trQ==",
-      "license": "Apache-2.0",
-      "peerDependencies": {
-        "@tensorflow/tfjs-core": "4.22.0"
-      }
-    },
-    "node_modules/@tensorflow/tfjs/node_modules/@tensorflow/tfjs-core": {
-      "version": "4.22.0",
-      "resolved": "https://registry.npmmirror.com/@tensorflow/tfjs-core/-/tfjs-core-4.22.0.tgz",
-      "integrity": "sha512-LEkOyzbknKFoWUwfkr59vSB68DMJ4cjwwHgicXN0DUi3a0Vh1Er3JQqCI1Hl86GGZQvY8ezVrtDIvqR1ZFW55A==",
-      "license": "Apache-2.0",
-      "dependencies": {
-        "@types/long": "^4.0.1",
-        "@types/offscreencanvas": "~2019.7.0",
-        "@types/seedrandom": "^2.4.28",
-        "@webgpu/types": "0.1.38",
-        "long": "4.0.0",
-        "node-fetch": "~2.6.1",
-        "seedrandom": "^3.0.5"
-      },
-      "engines": {
-        "yarn": ">= 1.3.2"
-      }
-    },
-    "node_modules/@tensorflow/tfjs/node_modules/@tensorflow/tfjs-core/node_modules/@types/offscreencanvas": {
-      "version": "2019.7.3",
-      "resolved": "https://registry.npmmirror.com/@types/offscreencanvas/-/offscreencanvas-2019.7.3.tgz",
-      "integrity": "sha512-ieXiYmgSRXUDeOntE1InxjWyvEelZGP63M+cGuquuRLuIKKT1osnkXjxev9B7d1nXSug5vpunx+gNlbVxMlC9A==",
-      "license": "MIT"
-    },
-    "node_modules/@tensorflow/tfjs/node_modules/@tensorflow/tfjs-data": {
-      "version": "4.22.0",
-      "resolved": "https://registry.npmmirror.com/@tensorflow/tfjs-data/-/tfjs-data-4.22.0.tgz",
-      "integrity": "sha512-dYmF3LihQIGvtgJrt382hSRH4S0QuAp2w1hXJI2+kOaEqo5HnUPG0k5KA6va+S1yUhx7UBToUKCBHeLHFQRV4w==",
-      "license": "Apache-2.0",
-      "dependencies": {
-        "@types/node-fetch": "^2.1.2",
-        "node-fetch": "~2.6.1",
-        "string_decoder": "^1.3.0"
-      },
-      "peerDependencies": {
-        "@tensorflow/tfjs-core": "4.22.0",
-        "seedrandom": "^3.0.5"
-      }
-    },
-    "node_modules/@tensorflow/tfjs/node_modules/@tensorflow/tfjs-layers": {
-      "version": "4.22.0",
-      "resolved": "https://registry.npmmirror.com/@tensorflow/tfjs-layers/-/tfjs-layers-4.22.0.tgz",
-      "integrity": "sha512-lybPj4ZNj9iIAPUj7a8ZW1hg8KQGfqWLlCZDi9eM/oNKCCAgchiyzx8OrYoWmRrB+AM6VNEeIT+2gZKg5ReihA==",
-      "license": "Apache-2.0 AND MIT",
-      "peerDependencies": {
-        "@tensorflow/tfjs-core": "4.22.0"
-      }
-    },
-    "node_modules/@tensorflow/tfjs/node_modules/@types/seedrandom": {
-      "version": "2.4.34",
-      "resolved": "https://registry.npmmirror.com/@types/seedrandom/-/seedrandom-2.4.34.tgz",
-      "integrity": "sha512-ytDiArvrn/3Xk6/vtylys5tlY6eo7Ane0hvcx++TKo6RxQXuVfW0AF/oeWqAj9dN29SyhtawuXstgmPlwNcv/A==",
-      "license": "MIT"
-    },
-    "node_modules/@tensorflow/tfjs/node_modules/node-fetch": {
-      "version": "2.6.13",
-      "resolved": "https://registry.npmmirror.com/node-fetch/-/node-fetch-2.6.13.tgz",
-      "integrity": "sha512-StxNAxh15zr77QvvkmveSQ8uCQ4+v5FkvNTj0OESmiHu+VRi/gXArXtkWMElOsOUNLtUEvI4yS+rdtOHZTwlQA==",
-      "license": "MIT",
-      "dependencies": {
-        "whatwg-url": "^5.0.0"
-      },
-      "engines": {
-        "node": "4.x || >=6.0.0"
-      },
-      "peerDependencies": {
-        "encoding": "^0.1.0"
-      },
-      "peerDependenciesMeta": {
-        "encoding": {
-          "optional": true
-        }
-      }
-    },
-    "node_modules/@tensorflow/tfjs/node_modules/seedrandom": {
-      "version": "3.0.5",
-      "resolved": "https://registry.npmmirror.com/seedrandom/-/seedrandom-3.0.5.tgz",
-      "integrity": "sha512-8OwmbklUNzwezjGInmZ+2clQmExQPvomqjL7LFqOYqtmuxRgQYqOD3mHaU+MvZn5FLUeVxVfQjwLZW/n/JFuqg==",
-      "license": "MIT"
-    },
-    "node_modules/@types/long": {
-      "version": "4.0.2",
-      "resolved": "https://registry.npmmirror.com/@types/long/-/long-4.0.2.tgz",
-      "integrity": "sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA==",
-      "license": "MIT"
-    },
-    "node_modules/@types/node": {
-      "version": "22.10.2",
-      "resolved": "https://registry.npmmirror.com/@types/node/-/node-22.10.2.tgz",
-      "integrity": "sha512-Xxr6BBRCAOQixvonOye19wnzyDiUtTeqldOOmj3CkeblonbccA12PFwlufvRdrpjXxqnmUaeiU5EOA+7s5diUQ==",
-      "license": "MIT",
-      "dependencies": {
-        "undici-types": "~6.20.0"
-      }
-    },
-    "node_modules/@types/node-fetch": {
-      "version": "2.6.12",
-      "resolved": "https://registry.npmmirror.com/@types/node-fetch/-/node-fetch-2.6.12.tgz",
-      "integrity": "sha512-8nneRWKCg3rMtF69nLQJnOYUcbafYeFSjqkw3jCRLsqkWFlHaoQrr5mXmofFGOx3DKn7UfmBMyov8ySvLRVldA==",
-      "license": "MIT",
-      "dependencies": {
-        "@types/node": "*",
-        "form-data": "^4.0.0"
-      }
-    },
-    "node_modules/@types/offscreencanvas": {
-      "version": "2019.3.0",
-      "resolved": "https://registry.npmmirror.com/@types/offscreencanvas/-/offscreencanvas-2019.3.0.tgz",
-      "integrity": "sha512-esIJx9bQg+QYF0ra8GnvfianIY8qWB0GBx54PK5Eps6m+xTj86KLavHv6qDhzKcu5UUOgNfJ2pWaIIV7TRUd9Q==",
-      "license": "MIT"
-    },
-    "node_modules/@types/seedrandom": {
-      "version": "2.4.27",
-      "resolved": "https://registry.npmmirror.com/@types/seedrandom/-/seedrandom-2.4.27.tgz",
-      "integrity": "sha512-YvMLqFak/7rt//lPBtEHv3M4sRNA+HGxrhFZ+DQs9K2IkYJbNwVIb8avtJfhDiuaUBX/AW0jnjv48FV8h3u9bQ==",
-      "license": "MIT"
-    },
-    "node_modules/@types/webgl-ext": {
-      "version": "0.0.30",
-      "resolved": "https://registry.npmmirror.com/@types/webgl-ext/-/webgl-ext-0.0.30.tgz",
-      "integrity": "sha512-LKVgNmBxN0BbljJrVUwkxwRYqzsAEPcZOe6S2T6ZaBDIrFp0qu4FNlpc5sM1tGbXUYFgdVQIoeLk1Y1UoblyEg==",
-      "license": "MIT"
-    },
-    "node_modules/@types/webgl2": {
-      "version": "0.0.4",
-      "resolved": "https://registry.npmmirror.com/@types/webgl2/-/webgl2-0.0.4.tgz",
-      "integrity": "sha512-PACt1xdErJbMUOUweSrbVM7gSIYm1vTncW2hF6Os/EeWi6TXYAYMPp+8v6rzHmypE5gHrxaxZNXgMkJVIdZpHw==",
-      "license": "MIT"
-    },
-    "node_modules/@vladmandic/face-api": {
-      "version": "1.7.14",
-      "resolved": "https://registry.npmmirror.com/@vladmandic/face-api/-/face-api-1.7.14.tgz",
-      "integrity": "sha512-WTechvIQ+t7JS7ASQ2n1XaTCNSXQiqdTQmtWAuGrpClAIHIP18FVV66dPWDA8/0XIdotbWnzGjuS3WzybxVlJw==",
-      "license": "MIT",
-      "engines": {
-        "node": ">=14.0.0"
-      }
-    },
-    "node_modules/@webgpu/types": {
-      "version": "0.1.38",
-      "resolved": "https://registry.npmmirror.com/@webgpu/types/-/types-0.1.38.tgz",
-      "integrity": "sha512-7LrhVKz2PRh+DD7+S+PVaFd5HxaWQvoMqBbsV9fNJO1pjUs1P8bM2vQVNfk+3URTqbuTI7gkXi0rfsN0IadoBA==",
-      "license": "BSD-3-Clause"
-    },
-    "node_modules/abbrev": {
-      "version": "1.1.1",
-      "resolved": "https://registry.npmmirror.com/abbrev/-/abbrev-1.1.1.tgz",
-      "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",
-      "license": "ISC"
-    },
-    "node_modules/adm-zip": {
-      "version": "0.5.16",
-      "resolved": "https://registry.npmmirror.com/adm-zip/-/adm-zip-0.5.16.tgz",
-      "integrity": "sha512-TGw5yVi4saajsSEgz25grObGHEUaDrniwvA2qwSC060KfqGPdglhvPMA2lPIoxs3PQIItj2iag35fONcQqgUaQ==",
-      "license": "MIT",
-      "engines": {
-        "node": ">=12.0"
-      }
-    },
-    "node_modules/agent-base": {
-      "version": "6.0.2",
-      "resolved": "https://registry.npmmirror.com/agent-base/-/agent-base-6.0.2.tgz",
-      "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==",
-      "license": "MIT",
-      "dependencies": {
-        "debug": "4"
-      },
-      "engines": {
-        "node": ">= 6.0.0"
-      }
-    },
-    "node_modules/ansi-regex": {
-      "version": "5.0.1",
-      "resolved": "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-5.0.1.tgz",
-      "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
-      "license": "MIT",
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/ansi-styles": {
-      "version": "4.3.0",
-      "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz",
-      "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
-      "license": "MIT",
-      "dependencies": {
-        "color-convert": "^2.0.1"
-      },
-      "engines": {
-        "node": ">=8"
-      },
-      "funding": {
-        "url": "https://github.com/chalk/ansi-styles?sponsor=1"
-      }
-    },
-    "node_modules/aproba": {
-      "version": "2.0.0",
-      "resolved": "https://registry.npmmirror.com/aproba/-/aproba-2.0.0.tgz",
-      "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==",
-      "license": "ISC"
-    },
-    "node_modules/are-we-there-yet": {
-      "version": "2.0.0",
-      "resolved": "https://registry.npmmirror.com/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz",
-      "integrity": "sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==",
-      "deprecated": "This package is no longer supported.",
-      "license": "ISC",
-      "dependencies": {
-        "delegates": "^1.0.0",
-        "readable-stream": "^3.6.0"
-      },
-      "engines": {
-        "node": ">=10"
-      }
-    },
-    "node_modules/argparse": {
-      "version": "1.0.10",
-      "resolved": "https://registry.npmmirror.com/argparse/-/argparse-1.0.10.tgz",
-      "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
-      "license": "MIT",
-      "dependencies": {
-        "sprintf-js": "~1.0.2"
-      }
-    },
-    "node_modules/assert-options": {
-      "version": "0.8.2",
-      "resolved": "https://registry.npmmirror.com/assert-options/-/assert-options-0.8.2.tgz",
-      "integrity": "sha512-XaXoMxY0zuwAb0YuZjxIm8FeWvNq0aWNIbrzHhFjme8Smxw4JlPoyrAKQ6808k5UvQdhvnWqHZCphq5mXd4TDA==",
-      "license": "MIT",
-      "engines": {
-        "node": ">=10.0.0"
-      }
-    },
-    "node_modules/asynckit": {
-      "version": "0.4.0",
-      "resolved": "https://registry.npmmirror.com/asynckit/-/asynckit-0.4.0.tgz",
-      "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==",
-      "license": "MIT"
-    },
-    "node_modules/balanced-match": {
-      "version": "1.0.2",
-      "resolved": "https://registry.npmmirror.com/balanced-match/-/balanced-match-1.0.2.tgz",
-      "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
-      "license": "MIT"
-    },
-    "node_modules/brace-expansion": {
-      "version": "1.1.11",
-      "resolved": "https://registry.npmmirror.com/brace-expansion/-/brace-expansion-1.1.11.tgz",
-      "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
-      "license": "MIT",
-      "dependencies": {
-        "balanced-match": "^1.0.0",
-        "concat-map": "0.0.1"
-      }
-    },
-    "node_modules/canvas": {
-      "version": "2.11.2",
-      "resolved": "https://registry.npmmirror.com/canvas/-/canvas-2.11.2.tgz",
-      "integrity": "sha512-ItanGBMrmRV7Py2Z+Xhs7cT+FNt5K0vPL4p9EZ/UX/Mu7hFbkxSjKF2KVtPwX7UYWp7dRKnrTvReflgrItJbdw==",
-      "hasInstallScript": true,
-      "license": "MIT",
-      "dependencies": {
-        "@mapbox/node-pre-gyp": "^1.0.0",
-        "nan": "^2.17.0",
-        "simple-get": "^3.0.3"
-      },
-      "engines": {
-        "node": ">=6"
-      }
-    },
-    "node_modules/chalk": {
-      "version": "4.1.2",
-      "resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz",
-      "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
-      "license": "MIT",
-      "dependencies": {
-        "ansi-styles": "^4.1.0",
-        "supports-color": "^7.1.0"
-      },
-      "engines": {
-        "node": ">=10"
-      },
-      "funding": {
-        "url": "https://github.com/chalk/chalk?sponsor=1"
-      }
-    },
-    "node_modules/chownr": {
-      "version": "2.0.0",
-      "resolved": "https://registry.npmmirror.com/chownr/-/chownr-2.0.0.tgz",
-      "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==",
-      "license": "ISC",
-      "engines": {
-        "node": ">=10"
-      }
-    },
-    "node_modules/cliui": {
-      "version": "7.0.4",
-      "resolved": "https://registry.npmmirror.com/cliui/-/cliui-7.0.4.tgz",
-      "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==",
-      "license": "ISC",
-      "dependencies": {
-        "string-width": "^4.2.0",
-        "strip-ansi": "^6.0.0",
-        "wrap-ansi": "^7.0.0"
-      }
-    },
-    "node_modules/color-convert": {
-      "version": "2.0.1",
-      "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz",
-      "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
-      "license": "MIT",
-      "dependencies": {
-        "color-name": "~1.1.4"
-      },
-      "engines": {
-        "node": ">=7.0.0"
-      }
-    },
-    "node_modules/color-name": {
-      "version": "1.1.4",
-      "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz",
-      "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
-      "license": "MIT"
-    },
-    "node_modules/color-support": {
-      "version": "1.1.3",
-      "resolved": "https://registry.npmmirror.com/color-support/-/color-support-1.1.3.tgz",
-      "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==",
-      "license": "ISC",
-      "bin": {
-        "color-support": "bin.js"
-      }
-    },
-    "node_modules/combined-stream": {
-      "version": "1.0.8",
-      "resolved": "https://registry.npmmirror.com/combined-stream/-/combined-stream-1.0.8.tgz",
-      "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
-      "license": "MIT",
-      "dependencies": {
-        "delayed-stream": "~1.0.0"
-      },
-      "engines": {
-        "node": ">= 0.8"
-      }
-    },
-    "node_modules/concat-map": {
-      "version": "0.0.1",
-      "resolved": "https://registry.npmmirror.com/concat-map/-/concat-map-0.0.1.tgz",
-      "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
-      "license": "MIT"
-    },
-    "node_modules/console-control-strings": {
-      "version": "1.1.0",
-      "resolved": "https://registry.npmmirror.com/console-control-strings/-/console-control-strings-1.1.0.tgz",
-      "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==",
-      "license": "ISC"
-    },
-    "node_modules/core-js": {
-      "version": "3.29.1",
-      "resolved": "https://registry.npmmirror.com/core-js/-/core-js-3.29.1.tgz",
-      "integrity": "sha512-+jwgnhg6cQxKYIIjGtAHq2nwUOolo9eoFZ4sHfUH09BLXBgxnH4gA0zEd+t+BO2cNB8idaBtZFcFTRjQJRJmAw==",
-      "hasInstallScript": true,
-      "license": "MIT",
-      "funding": {
-        "type": "opencollective",
-        "url": "https://opencollective.com/core-js"
-      }
-    },
-    "node_modules/debug": {
-      "version": "4.4.0",
-      "resolved": "https://registry.npmmirror.com/debug/-/debug-4.4.0.tgz",
-      "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==",
-      "license": "MIT",
-      "dependencies": {
-        "ms": "^2.1.3"
-      },
-      "engines": {
-        "node": ">=6.0"
-      },
-      "peerDependenciesMeta": {
-        "supports-color": {
-          "optional": true
-        }
-      }
-    },
-    "node_modules/decompress-response": {
-      "version": "4.2.1",
-      "resolved": "https://registry.npmmirror.com/decompress-response/-/decompress-response-4.2.1.tgz",
-      "integrity": "sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw==",
-      "license": "MIT",
-      "dependencies": {
-        "mimic-response": "^2.0.0"
-      },
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/delayed-stream": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmmirror.com/delayed-stream/-/delayed-stream-1.0.0.tgz",
-      "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
-      "license": "MIT",
-      "engines": {
-        "node": ">=0.4.0"
-      }
-    },
-    "node_modules/delegates": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmmirror.com/delegates/-/delegates-1.0.0.tgz",
-      "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==",
-      "license": "MIT"
-    },
-    "node_modules/detect-libc": {
-      "version": "2.0.3",
-      "resolved": "https://registry.npmmirror.com/detect-libc/-/detect-libc-2.0.3.tgz",
-      "integrity": "sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==",
-      "license": "Apache-2.0",
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/emoji-regex": {
-      "version": "8.0.0",
-      "resolved": "https://registry.npmmirror.com/emoji-regex/-/emoji-regex-8.0.0.tgz",
-      "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
-      "license": "MIT"
-    },
-    "node_modules/es6-promise": {
-      "version": "4.2.8",
-      "resolved": "https://registry.npmmirror.com/es6-promise/-/es6-promise-4.2.8.tgz",
-      "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==",
-      "license": "MIT"
-    },
-    "node_modules/es6-promisify": {
-      "version": "5.0.0",
-      "resolved": "https://registry.npmmirror.com/es6-promisify/-/es6-promisify-5.0.0.tgz",
-      "integrity": "sha512-C+d6UdsYDk0lMebHNR4S2NybQMMngAOnOwYBQjTOiv0MkoJMP0Myw2mgpDLBcpfCmRLxyFqYhS/CfOENq4SJhQ==",
-      "license": "MIT",
-      "dependencies": {
-        "es6-promise": "^4.0.3"
-      }
-    },
-    "node_modules/escalade": {
-      "version": "3.2.0",
-      "resolved": "https://registry.npmmirror.com/escalade/-/escalade-3.2.0.tgz",
-      "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==",
-      "license": "MIT",
-      "engines": {
-        "node": ">=6"
-      }
-    },
-    "node_modules/face-api.js": {
-      "version": "0.22.2",
-      "resolved": "https://registry.npmmirror.com/face-api.js/-/face-api.js-0.22.2.tgz",
-      "integrity": "sha512-9Bbv/yaBRTKCXjiDqzryeKhYxmgSjJ7ukvOvEBy6krA0Ah/vNBlsf7iBNfJljWiPA8Tys1/MnB3lyP2Hfmsuyw==",
-      "license": "MIT",
-      "dependencies": {
-        "@tensorflow/tfjs-core": "1.7.0",
-        "tslib": "^1.11.1"
-      }
-    },
-    "node_modules/form-data": {
-      "version": "4.0.1",
-      "resolved": "https://registry.npmmirror.com/form-data/-/form-data-4.0.1.tgz",
-      "integrity": "sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==",
-      "license": "MIT",
-      "dependencies": {
-        "asynckit": "^0.4.0",
-        "combined-stream": "^1.0.8",
-        "mime-types": "^2.1.12"
-      },
-      "engines": {
-        "node": ">= 6"
-      }
-    },
-    "node_modules/fs-minipass": {
-      "version": "2.1.0",
-      "resolved": "https://registry.npmmirror.com/fs-minipass/-/fs-minipass-2.1.0.tgz",
-      "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==",
-      "license": "ISC",
-      "dependencies": {
-        "minipass": "^3.0.0"
-      },
-      "engines": {
-        "node": ">= 8"
-      }
-    },
-    "node_modules/fs-minipass/node_modules/minipass": {
-      "version": "3.3.6",
-      "resolved": "https://registry.npmmirror.com/minipass/-/minipass-3.3.6.tgz",
-      "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",
-      "license": "ISC",
-      "dependencies": {
-        "yallist": "^4.0.0"
-      },
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/fs.realpath": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmmirror.com/fs.realpath/-/fs.realpath-1.0.0.tgz",
-      "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==",
-      "license": "ISC"
-    },
-    "node_modules/function-bind": {
-      "version": "1.1.2",
-      "resolved": "https://registry.npmmirror.com/function-bind/-/function-bind-1.1.2.tgz",
-      "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
-      "license": "MIT",
-      "funding": {
-        "url": "https://github.com/sponsors/ljharb"
-      }
-    },
-    "node_modules/gauge": {
-      "version": "3.0.2",
-      "resolved": "https://registry.npmmirror.com/gauge/-/gauge-3.0.2.tgz",
-      "integrity": "sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==",
-      "deprecated": "This package is no longer supported.",
-      "license": "ISC",
-      "dependencies": {
-        "aproba": "^1.0.3 || ^2.0.0",
-        "color-support": "^1.1.2",
-        "console-control-strings": "^1.0.0",
-        "has-unicode": "^2.0.1",
-        "object-assign": "^4.1.1",
-        "signal-exit": "^3.0.0",
-        "string-width": "^4.2.3",
-        "strip-ansi": "^6.0.1",
-        "wide-align": "^1.1.2"
-      },
-      "engines": {
-        "node": ">=10"
-      }
-    },
-    "node_modules/get-caller-file": {
-      "version": "2.0.5",
-      "resolved": "https://registry.npmmirror.com/get-caller-file/-/get-caller-file-2.0.5.tgz",
-      "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
-      "license": "ISC",
-      "engines": {
-        "node": "6.* || 8.* || >= 10.*"
-      }
-    },
-    "node_modules/glob": {
-      "version": "7.2.3",
-      "resolved": "https://registry.npmmirror.com/glob/-/glob-7.2.3.tgz",
-      "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
-      "deprecated": "Glob versions prior to v9 are no longer supported",
-      "license": "ISC",
-      "dependencies": {
-        "fs.realpath": "^1.0.0",
-        "inflight": "^1.0.4",
-        "inherits": "2",
-        "minimatch": "^3.1.1",
-        "once": "^1.3.0",
-        "path-is-absolute": "^1.0.0"
-      },
-      "engines": {
-        "node": "*"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/isaacs"
-      }
-    },
-    "node_modules/google-protobuf": {
-      "version": "3.21.4",
-      "resolved": "https://registry.npmmirror.com/google-protobuf/-/google-protobuf-3.21.4.tgz",
-      "integrity": "sha512-MnG7N936zcKTco4Jd2PX2U96Kf9PxygAPKBug+74LHzmHXmceN16MmRcdgZv+DGef/S9YvQAfRsNCn4cjf9yyQ==",
-      "license": "(BSD-3-Clause AND Apache-2.0)"
-    },
-    "node_modules/has-flag": {
-      "version": "4.0.0",
-      "resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-4.0.0.tgz",
-      "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
-      "license": "MIT",
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/has-unicode": {
-      "version": "2.0.1",
-      "resolved": "https://registry.npmmirror.com/has-unicode/-/has-unicode-2.0.1.tgz",
-      "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==",
-      "license": "ISC"
-    },
-    "node_modules/hasown": {
-      "version": "2.0.2",
-      "resolved": "https://registry.npmmirror.com/hasown/-/hasown-2.0.2.tgz",
-      "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
-      "license": "MIT",
-      "dependencies": {
-        "function-bind": "^1.1.2"
-      },
-      "engines": {
-        "node": ">= 0.4"
-      }
-    },
-    "node_modules/https-proxy-agent": {
-      "version": "5.0.1",
-      "resolved": "https://registry.npmmirror.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz",
-      "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==",
-      "license": "MIT",
-      "dependencies": {
-        "agent-base": "6",
-        "debug": "4"
-      },
-      "engines": {
-        "node": ">= 6"
-      }
-    },
-    "node_modules/inflight": {
-      "version": "1.0.6",
-      "resolved": "https://registry.npmmirror.com/inflight/-/inflight-1.0.6.tgz",
-      "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
-      "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.",
-      "license": "ISC",
-      "dependencies": {
-        "once": "^1.3.0",
-        "wrappy": "1"
-      }
-    },
-    "node_modules/inherits": {
-      "version": "2.0.4",
-      "resolved": "https://registry.npmmirror.com/inherits/-/inherits-2.0.4.tgz",
-      "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
-      "license": "ISC"
-    },
-    "node_modules/interpret": {
-      "version": "1.4.0",
-      "resolved": "https://registry.npmmirror.com/interpret/-/interpret-1.4.0.tgz",
-      "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==",
-      "license": "MIT",
-      "engines": {
-        "node": ">= 0.10"
-      }
-    },
-    "node_modules/is-core-module": {
-      "version": "2.16.0",
-      "resolved": "https://registry.npmmirror.com/is-core-module/-/is-core-module-2.16.0.tgz",
-      "integrity": "sha512-urTSINYfAYgcbLb0yDQ6egFm6h3Mo1DcF9EkyXSRjjzdHbsulg01qhwWuXdOoUBuTkbQ80KDboXa0vFJ+BDH+g==",
-      "license": "MIT",
-      "dependencies": {
-        "hasown": "^2.0.2"
-      },
-      "engines": {
-        "node": ">= 0.4"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/ljharb"
-      }
-    },
-    "node_modules/is-fullwidth-code-point": {
-      "version": "3.0.0",
-      "resolved": "https://registry.npmmirror.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
-      "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
-      "license": "MIT",
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/long": {
-      "version": "4.0.0",
-      "resolved": "https://registry.npmmirror.com/long/-/long-4.0.0.tgz",
-      "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==",
-      "license": "Apache-2.0"
-    },
-    "node_modules/make-dir": {
-      "version": "3.1.0",
-      "resolved": "https://registry.npmmirror.com/make-dir/-/make-dir-3.1.0.tgz",
-      "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==",
-      "license": "MIT",
-      "dependencies": {
-        "semver": "^6.0.0"
-      },
-      "engines": {
-        "node": ">=8"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
-      }
-    },
-    "node_modules/make-dir/node_modules/semver": {
-      "version": "6.3.1",
-      "resolved": "https://registry.npmmirror.com/semver/-/semver-6.3.1.tgz",
-      "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
-      "license": "ISC",
-      "bin": {
-        "semver": "bin/semver.js"
-      }
-    },
-    "node_modules/mime-db": {
-      "version": "1.52.0",
-      "resolved": "https://registry.npmmirror.com/mime-db/-/mime-db-1.52.0.tgz",
-      "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
-      "license": "MIT",
-      "engines": {
-        "node": ">= 0.6"
-      }
-    },
-    "node_modules/mime-types": {
-      "version": "2.1.35",
-      "resolved": "https://registry.npmmirror.com/mime-types/-/mime-types-2.1.35.tgz",
-      "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
-      "license": "MIT",
-      "dependencies": {
-        "mime-db": "1.52.0"
-      },
-      "engines": {
-        "node": ">= 0.6"
-      }
-    },
-    "node_modules/mimic-response": {
-      "version": "2.1.0",
-      "resolved": "https://registry.npmmirror.com/mimic-response/-/mimic-response-2.1.0.tgz",
-      "integrity": "sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==",
-      "license": "MIT",
-      "engines": {
-        "node": ">=8"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
-      }
-    },
-    "node_modules/minimatch": {
-      "version": "3.1.2",
-      "resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-3.1.2.tgz",
-      "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
-      "license": "ISC",
-      "dependencies": {
-        "brace-expansion": "^1.1.7"
-      },
-      "engines": {
-        "node": "*"
-      }
-    },
-    "node_modules/minipass": {
-      "version": "5.0.0",
-      "resolved": "https://registry.npmmirror.com/minipass/-/minipass-5.0.0.tgz",
-      "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==",
-      "license": "ISC",
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/minizlib": {
-      "version": "2.1.2",
-      "resolved": "https://registry.npmmirror.com/minizlib/-/minizlib-2.1.2.tgz",
-      "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==",
-      "license": "MIT",
-      "dependencies": {
-        "minipass": "^3.0.0",
-        "yallist": "^4.0.0"
-      },
-      "engines": {
-        "node": ">= 8"
-      }
-    },
-    "node_modules/minizlib/node_modules/minipass": {
-      "version": "3.3.6",
-      "resolved": "https://registry.npmmirror.com/minipass/-/minipass-3.3.6.tgz",
-      "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",
-      "license": "ISC",
-      "dependencies": {
-        "yallist": "^4.0.0"
-      },
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/mkdirp": {
-      "version": "1.0.4",
-      "resolved": "https://registry.npmmirror.com/mkdirp/-/mkdirp-1.0.4.tgz",
-      "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==",
-      "license": "MIT",
-      "bin": {
-        "mkdirp": "bin/cmd.js"
-      },
-      "engines": {
-        "node": ">=10"
-      }
-    },
-    "node_modules/ms": {
-      "version": "2.1.3",
-      "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.3.tgz",
-      "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
-      "license": "MIT"
-    },
-    "node_modules/nan": {
-      "version": "2.22.0",
-      "resolved": "https://registry.npmmirror.com/nan/-/nan-2.22.0.tgz",
-      "integrity": "sha512-nbajikzWTMwsW+eSsNm3QwlOs7het9gGJU5dDZzRTQGk03vyBOauxgI4VakDzE0PtsGTmXPsXTbbjVhRwR5mpw==",
-      "license": "MIT"
-    },
-    "node_modules/node-fetch": {
-      "version": "2.1.2",
-      "resolved": "https://registry.npmmirror.com/node-fetch/-/node-fetch-2.1.2.tgz",
-      "integrity": "sha512-IHLHYskTc2arMYsHZH82PVX8CSKT5lzb7AXeyO06QnjGDKtkv+pv3mEki6S7reB/x1QPo+YPxQRNEVgR5V/w3Q==",
-      "license": "MIT",
-      "engines": {
-        "node": "4.x || >=6.0.0"
-      }
-    },
-    "node_modules/nopt": {
-      "version": "5.0.0",
-      "resolved": "https://registry.npmmirror.com/nopt/-/nopt-5.0.0.tgz",
-      "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==",
-      "license": "ISC",
-      "dependencies": {
-        "abbrev": "1"
-      },
-      "bin": {
-        "nopt": "bin/nopt.js"
-      },
-      "engines": {
-        "node": ">=6"
-      }
-    },
-    "node_modules/npmlog": {
-      "version": "5.0.1",
-      "resolved": "https://registry.npmmirror.com/npmlog/-/npmlog-5.0.1.tgz",
-      "integrity": "sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==",
-      "deprecated": "This package is no longer supported.",
-      "license": "ISC",
-      "dependencies": {
-        "are-we-there-yet": "^2.0.0",
-        "console-control-strings": "^1.1.0",
-        "gauge": "^3.0.0",
-        "set-blocking": "^2.0.0"
-      }
-    },
-    "node_modules/object-assign": {
-      "version": "4.1.1",
-      "resolved": "https://registry.npmmirror.com/object-assign/-/object-assign-4.1.1.tgz",
-      "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==",
-      "license": "MIT",
-      "engines": {
-        "node": ">=0.10.0"
-      }
-    },
-    "node_modules/once": {
-      "version": "1.4.0",
-      "resolved": "https://registry.npmmirror.com/once/-/once-1.4.0.tgz",
-      "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
-      "license": "ISC",
-      "dependencies": {
-        "wrappy": "1"
-      }
-    },
-    "node_modules/path-is-absolute": {
-      "version": "1.0.1",
-      "resolved": "https://registry.npmmirror.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
-      "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==",
-      "license": "MIT",
-      "engines": {
-        "node": ">=0.10.0"
-      }
-    },
-    "node_modules/path-parse": {
-      "version": "1.0.7",
-      "resolved": "https://registry.npmmirror.com/path-parse/-/path-parse-1.0.7.tgz",
-      "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
-      "license": "MIT"
-    },
-    "node_modules/pg": {
-      "version": "8.13.1",
-      "resolved": "https://registry.npmmirror.com/pg/-/pg-8.13.1.tgz",
-      "integrity": "sha512-OUir1A0rPNZlX//c7ksiu7crsGZTKSOXJPgtNiHGIlC9H0lO+NC6ZDYksSgBYY/thSWhnSRBv8w1lieNNGATNQ==",
-      "license": "MIT",
-      "dependencies": {
-        "pg-connection-string": "^2.7.0",
-        "pg-pool": "^3.7.0",
-        "pg-protocol": "^1.7.0",
-        "pg-types": "^2.1.0",
-        "pgpass": "1.x"
-      },
-      "engines": {
-        "node": ">= 8.0.0"
-      },
-      "optionalDependencies": {
-        "pg-cloudflare": "^1.1.1"
-      },
-      "peerDependencies": {
-        "pg-native": ">=3.0.1"
-      },
-      "peerDependenciesMeta": {
-        "pg-native": {
-          "optional": true
-        }
-      }
-    },
-    "node_modules/pg-cloudflare": {
-      "version": "1.1.1",
-      "resolved": "https://registry.npmmirror.com/pg-cloudflare/-/pg-cloudflare-1.1.1.tgz",
-      "integrity": "sha512-xWPagP/4B6BgFO+EKz3JONXv3YDgvkbVrGw2mTo3D6tVDQRh1e7cqVGvyR3BE+eQgAvx1XhW/iEASj4/jCWl3Q==",
-      "license": "MIT",
-      "optional": true
-    },
-    "node_modules/pg-connection-string": {
-      "version": "2.7.0",
-      "resolved": "https://registry.npmmirror.com/pg-connection-string/-/pg-connection-string-2.7.0.tgz",
-      "integrity": "sha512-PI2W9mv53rXJQEOb8xNR8lH7Hr+EKa6oJa38zsK0S/ky2er16ios1wLKhZyxzD7jUReiWokc9WK5nxSnC7W1TA==",
-      "license": "MIT"
-    },
-    "node_modules/pg-cursor": {
-      "version": "2.12.1",
-      "resolved": "https://registry.npmmirror.com/pg-cursor/-/pg-cursor-2.12.1.tgz",
-      "integrity": "sha512-V13tEaA9Oq1w+V6Q3UBIB/blxJrwbbr35/dY54r/86soBJ7xkP236bXaORUTVXUPt9B6Ql2BQu+uwQiuMfRVgg==",
-      "license": "MIT",
-      "peer": true,
-      "peerDependencies": {
-        "pg": "^8"
-      }
-    },
-    "node_modules/pg-int8": {
-      "version": "1.0.1",
-      "resolved": "https://registry.npmmirror.com/pg-int8/-/pg-int8-1.0.1.tgz",
-      "integrity": "sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==",
-      "license": "ISC",
-      "engines": {
-        "node": ">=4.0.0"
-      }
-    },
-    "node_modules/pg-minify": {
-      "version": "1.6.5",
-      "resolved": "https://registry.npmmirror.com/pg-minify/-/pg-minify-1.6.5.tgz",
-      "integrity": "sha512-u0UE8veaCnMfJmoklqneeBBopOAPG3/6DHqGVHYAhz8DkJXh9dnjPlz25fRxn4e+6XVzdOp7kau63Rp52fZ3WQ==",
-      "license": "MIT",
-      "engines": {
-        "node": ">=14.0.0"
-      }
-    },
-    "node_modules/pg-pool": {
-      "version": "3.7.0",
-      "resolved": "https://registry.npmmirror.com/pg-pool/-/pg-pool-3.7.0.tgz",
-      "integrity": "sha512-ZOBQForurqh4zZWjrgSwwAtzJ7QiRX0ovFkZr2klsen3Nm0aoh33Ls0fzfv3imeH/nw/O27cjdz5kzYJfeGp/g==",
-      "license": "MIT",
-      "peerDependencies": {
-        "pg": ">=8.0"
-      }
-    },
-    "node_modules/pg-promise": {
-      "version": "11.10.2",
-      "resolved": "https://registry.npmmirror.com/pg-promise/-/pg-promise-11.10.2.tgz",
-      "integrity": "sha512-wK4yjxZdfxBmAMcs40q6IsC1SOzdLilc1yNvJqlbOjtm2syayqLDCt1JQ9lhS6yNSgVlGOQZT88yb/SADJmEBw==",
-      "license": "MIT",
-      "dependencies": {
-        "assert-options": "0.8.2",
-        "pg": "8.13.1",
-        "pg-minify": "1.6.5",
-        "spex": "3.4.0"
-      },
-      "engines": {
-        "node": ">=14.0"
-      },
-      "peerDependencies": {
-        "pg-query-stream": "4.7.1"
-      }
-    },
-    "node_modules/pg-protocol": {
-      "version": "1.7.0",
-      "resolved": "https://registry.npmmirror.com/pg-protocol/-/pg-protocol-1.7.0.tgz",
-      "integrity": "sha512-hTK/mE36i8fDDhgDFjy6xNOG+LCorxLG3WO17tku+ij6sVHXh1jQUJ8hYAnRhNla4QVD2H8er/FOjc/+EgC6yQ==",
-      "license": "MIT"
-    },
-    "node_modules/pg-query-stream": {
-      "version": "4.7.1",
-      "resolved": "https://registry.npmmirror.com/pg-query-stream/-/pg-query-stream-4.7.1.tgz",
-      "integrity": "sha512-UMgsgn/pOIYsIifRySp59vwlpTpLADMK9HWJtq5ff0Z3MxBnPMGnCQeaQl5VuL+7ov4F96mSzIRIcz+Duo6OiQ==",
-      "license": "MIT",
-      "peer": true,
-      "dependencies": {
-        "pg-cursor": "^2.12.1"
-      },
-      "peerDependencies": {
-        "pg": "^8"
-      }
-    },
-    "node_modules/pg-types": {
-      "version": "2.2.0",
-      "resolved": "https://registry.npmmirror.com/pg-types/-/pg-types-2.2.0.tgz",
-      "integrity": "sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA==",
-      "license": "MIT",
-      "dependencies": {
-        "pg-int8": "1.0.1",
-        "postgres-array": "~2.0.0",
-        "postgres-bytea": "~1.0.0",
-        "postgres-date": "~1.0.4",
-        "postgres-interval": "^1.1.0"
-      },
-      "engines": {
-        "node": ">=4"
-      }
-    },
-    "node_modules/pgpass": {
-      "version": "1.0.5",
-      "resolved": "https://registry.npmmirror.com/pgpass/-/pgpass-1.0.5.tgz",
-      "integrity": "sha512-FdW9r/jQZhSeohs1Z3sI1yxFQNFvMcnmfuj4WBMUTxOrAyLMaTcE1aAMBiTlbMNaXvBCQuVi0R7hd8udDSP7ug==",
-      "license": "MIT",
-      "dependencies": {
-        "split2": "^4.1.0"
-      }
-    },
-    "node_modules/postgres-array": {
-      "version": "2.0.0",
-      "resolved": "https://registry.npmmirror.com/postgres-array/-/postgres-array-2.0.0.tgz",
-      "integrity": "sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA==",
-      "license": "MIT",
-      "engines": {
-        "node": ">=4"
-      }
-    },
-    "node_modules/postgres-bytea": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmmirror.com/postgres-bytea/-/postgres-bytea-1.0.0.tgz",
-      "integrity": "sha512-xy3pmLuQqRBZBXDULy7KbaitYqLcmxigw14Q5sj8QBVLqEwXfeybIKVWiqAXTlcvdvb0+xkOtDbfQMOf4lST1w==",
-      "license": "MIT",
-      "engines": {
-        "node": ">=0.10.0"
-      }
-    },
-    "node_modules/postgres-date": {
-      "version": "1.0.7",
-      "resolved": "https://registry.npmmirror.com/postgres-date/-/postgres-date-1.0.7.tgz",
-      "integrity": "sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q==",
-      "license": "MIT",
-      "engines": {
-        "node": ">=0.10.0"
-      }
-    },
-    "node_modules/postgres-interval": {
-      "version": "1.2.0",
-      "resolved": "https://registry.npmmirror.com/postgres-interval/-/postgres-interval-1.2.0.tgz",
-      "integrity": "sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ==",
-      "license": "MIT",
-      "dependencies": {
-        "xtend": "^4.0.0"
-      },
-      "engines": {
-        "node": ">=0.10.0"
-      }
-    },
-    "node_modules/progress": {
-      "version": "2.0.3",
-      "resolved": "https://registry.npmmirror.com/progress/-/progress-2.0.3.tgz",
-      "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==",
-      "license": "MIT",
-      "engines": {
-        "node": ">=0.4.0"
-      }
-    },
-    "node_modules/readable-stream": {
-      "version": "3.6.2",
-      "resolved": "https://registry.npmmirror.com/readable-stream/-/readable-stream-3.6.2.tgz",
-      "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",
-      "license": "MIT",
-      "dependencies": {
-        "inherits": "^2.0.3",
-        "string_decoder": "^1.1.1",
-        "util-deprecate": "^1.0.1"
-      },
-      "engines": {
-        "node": ">= 6"
-      }
-    },
-    "node_modules/rechoir": {
-      "version": "0.6.2",
-      "resolved": "https://registry.npmmirror.com/rechoir/-/rechoir-0.6.2.tgz",
-      "integrity": "sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==",
-      "dependencies": {
-        "resolve": "^1.1.6"
-      },
-      "engines": {
-        "node": ">= 0.10"
-      }
-    },
-    "node_modules/regenerator-runtime": {
-      "version": "0.13.11",
-      "resolved": "https://registry.npmmirror.com/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz",
-      "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==",
-      "license": "MIT"
-    },
-    "node_modules/require-directory": {
-      "version": "2.1.1",
-      "resolved": "https://registry.npmmirror.com/require-directory/-/require-directory-2.1.1.tgz",
-      "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==",
-      "license": "MIT",
-      "engines": {
-        "node": ">=0.10.0"
-      }
-    },
-    "node_modules/resolve": {
-      "version": "1.22.9",
-      "resolved": "https://registry.npmmirror.com/resolve/-/resolve-1.22.9.tgz",
-      "integrity": "sha512-QxrmX1DzraFIi9PxdG5VkRfRwIgjwyud+z/iBwfRRrVmHc+P9Q7u2lSSpQ6bjr2gy5lrqIiU9vb6iAeGf2400A==",
-      "license": "MIT",
-      "dependencies": {
-        "is-core-module": "^2.16.0",
-        "path-parse": "^1.0.7",
-        "supports-preserve-symlinks-flag": "^1.0.0"
-      },
-      "bin": {
-        "resolve": "bin/resolve"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/ljharb"
-      }
-    },
-    "node_modules/rimraf": {
-      "version": "3.0.2",
-      "resolved": "https://registry.npmmirror.com/rimraf/-/rimraf-3.0.2.tgz",
-      "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
-      "deprecated": "Rimraf versions prior to v4 are no longer supported",
-      "license": "ISC",
-      "dependencies": {
-        "glob": "^7.1.3"
-      },
-      "bin": {
-        "rimraf": "bin.js"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/isaacs"
-      }
-    },
-    "node_modules/safe-buffer": {
-      "version": "5.2.1",
-      "resolved": "https://registry.npmmirror.com/safe-buffer/-/safe-buffer-5.2.1.tgz",
-      "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
-      "funding": [
-        {
-          "type": "github",
-          "url": "https://github.com/sponsors/feross"
-        },
-        {
-          "type": "patreon",
-          "url": "https://www.patreon.com/feross"
-        },
-        {
-          "type": "consulting",
-          "url": "https://feross.org/support"
-        }
-      ],
-      "license": "MIT"
-    },
-    "node_modules/seedrandom": {
-      "version": "2.4.3",
-      "resolved": "https://registry.npmmirror.com/seedrandom/-/seedrandom-2.4.3.tgz",
-      "integrity": "sha512-2CkZ9Wn2dS4mMUWQaXLsOAfGD+irMlLEeSP3cMxpGbgyOOzJGFa+MWCOMTOCMyZinHRPxyOj/S/C57li/1to6Q==",
-      "license": "MIT"
-    },
-    "node_modules/semver": {
-      "version": "7.6.3",
-      "resolved": "https://registry.npmmirror.com/semver/-/semver-7.6.3.tgz",
-      "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==",
-      "license": "ISC",
-      "bin": {
-        "semver": "bin/semver.js"
-      },
-      "engines": {
-        "node": ">=10"
-      }
-    },
-    "node_modules/set-blocking": {
-      "version": "2.0.0",
-      "resolved": "https://registry.npmmirror.com/set-blocking/-/set-blocking-2.0.0.tgz",
-      "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==",
-      "license": "ISC"
-    },
-    "node_modules/shelljs": {
-      "version": "0.8.5",
-      "resolved": "https://registry.npmmirror.com/shelljs/-/shelljs-0.8.5.tgz",
-      "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==",
-      "license": "BSD-3-Clause",
-      "dependencies": {
-        "glob": "^7.0.0",
-        "interpret": "^1.0.0",
-        "rechoir": "^0.6.2"
-      },
-      "bin": {
-        "shjs": "bin/shjs"
-      },
-      "engines": {
-        "node": ">=4"
-      }
-    },
-    "node_modules/signal-exit": {
-      "version": "3.0.7",
-      "resolved": "https://registry.npmmirror.com/signal-exit/-/signal-exit-3.0.7.tgz",
-      "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==",
-      "license": "ISC"
-    },
-    "node_modules/simple-concat": {
-      "version": "1.0.1",
-      "resolved": "https://registry.npmmirror.com/simple-concat/-/simple-concat-1.0.1.tgz",
-      "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==",
-      "funding": [
-        {
-          "type": "github",
-          "url": "https://github.com/sponsors/feross"
-        },
-        {
-          "type": "patreon",
-          "url": "https://www.patreon.com/feross"
-        },
-        {
-          "type": "consulting",
-          "url": "https://feross.org/support"
-        }
-      ],
-      "license": "MIT"
-    },
-    "node_modules/simple-get": {
-      "version": "3.1.1",
-      "resolved": "https://registry.npmmirror.com/simple-get/-/simple-get-3.1.1.tgz",
-      "integrity": "sha512-CQ5LTKGfCpvE1K0n2us+kuMPbk/q0EKl82s4aheV9oXjFEz6W/Y7oQFVJuU6QG77hRT4Ghb5RURteF5vnWjupA==",
-      "license": "MIT",
-      "dependencies": {
-        "decompress-response": "^4.2.0",
-        "once": "^1.3.1",
-        "simple-concat": "^1.0.0"
-      }
-    },
-    "node_modules/spex": {
-      "version": "3.4.0",
-      "resolved": "https://registry.npmmirror.com/spex/-/spex-3.4.0.tgz",
-      "integrity": "sha512-8JeZJ7QlEBnSj1W1fKXgbB2KUPA8k4BxFMf6lZX/c1ZagU/1b9uZWZK0yD6yjfzqAIuTNG4YlRmtMpQiXuohsg==",
-      "license": "MIT",
-      "engines": {
-        "node": ">=14.0.0"
-      }
-    },
-    "node_modules/split2": {
-      "version": "4.2.0",
-      "resolved": "https://registry.npmmirror.com/split2/-/split2-4.2.0.tgz",
-      "integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==",
-      "license": "ISC",
-      "engines": {
-        "node": ">= 10.x"
-      }
-    },
-    "node_modules/sprintf-js": {
-      "version": "1.0.3",
-      "resolved": "https://registry.npmmirror.com/sprintf-js/-/sprintf-js-1.0.3.tgz",
-      "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==",
-      "license": "BSD-3-Clause"
-    },
-    "node_modules/string_decoder": {
-      "version": "1.3.0",
-      "resolved": "https://registry.npmmirror.com/string_decoder/-/string_decoder-1.3.0.tgz",
-      "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
-      "license": "MIT",
-      "dependencies": {
-        "safe-buffer": "~5.2.0"
-      }
-    },
-    "node_modules/string-width": {
-      "version": "4.2.3",
-      "resolved": "https://registry.npmmirror.com/string-width/-/string-width-4.2.3.tgz",
-      "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
-      "license": "MIT",
-      "dependencies": {
-        "emoji-regex": "^8.0.0",
-        "is-fullwidth-code-point": "^3.0.0",
-        "strip-ansi": "^6.0.1"
-      },
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/strip-ansi": {
-      "version": "6.0.1",
-      "resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-6.0.1.tgz",
-      "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
-      "license": "MIT",
-      "dependencies": {
-        "ansi-regex": "^5.0.1"
-      },
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/supports-color": {
-      "version": "7.2.0",
-      "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz",
-      "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
-      "license": "MIT",
-      "dependencies": {
-        "has-flag": "^4.0.0"
-      },
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/supports-preserve-symlinks-flag": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmmirror.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",
-      "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==",
-      "license": "MIT",
-      "engines": {
-        "node": ">= 0.4"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/ljharb"
-      }
-    },
-    "node_modules/tar": {
-      "version": "6.2.1",
-      "resolved": "https://registry.npmmirror.com/tar/-/tar-6.2.1.tgz",
-      "integrity": "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==",
-      "license": "ISC",
-      "dependencies": {
-        "chownr": "^2.0.0",
-        "fs-minipass": "^2.0.0",
-        "minipass": "^5.0.0",
-        "minizlib": "^2.1.1",
-        "mkdirp": "^1.0.3",
-        "yallist": "^4.0.0"
-      },
-      "engines": {
-        "node": ">=10"
-      }
-    },
-    "node_modules/tr46": {
-      "version": "0.0.3",
-      "resolved": "https://registry.npmmirror.com/tr46/-/tr46-0.0.3.tgz",
-      "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==",
-      "license": "MIT"
-    },
-    "node_modules/tslib": {
-      "version": "1.14.1",
-      "resolved": "https://registry.npmmirror.com/tslib/-/tslib-1.14.1.tgz",
-      "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
-      "license": "0BSD"
-    },
-    "node_modules/undici-types": {
-      "version": "6.20.0",
-      "resolved": "https://registry.npmmirror.com/undici-types/-/undici-types-6.20.0.tgz",
-      "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==",
-      "license": "MIT"
-    },
-    "node_modules/util-deprecate": {
-      "version": "1.0.2",
-      "resolved": "https://registry.npmmirror.com/util-deprecate/-/util-deprecate-1.0.2.tgz",
-      "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",
-      "license": "MIT"
-    },
-    "node_modules/webidl-conversions": {
-      "version": "3.0.1",
-      "resolved": "https://registry.npmmirror.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
-      "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==",
-      "license": "BSD-2-Clause"
-    },
-    "node_modules/whatwg-url": {
-      "version": "5.0.0",
-      "resolved": "https://registry.npmmirror.com/whatwg-url/-/whatwg-url-5.0.0.tgz",
-      "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
-      "license": "MIT",
-      "dependencies": {
-        "tr46": "~0.0.3",
-        "webidl-conversions": "^3.0.0"
-      }
-    },
-    "node_modules/wide-align": {
-      "version": "1.1.5",
-      "resolved": "https://registry.npmmirror.com/wide-align/-/wide-align-1.1.5.tgz",
-      "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==",
-      "license": "ISC",
-      "dependencies": {
-        "string-width": "^1.0.2 || 2 || 3 || 4"
-      }
-    },
-    "node_modules/wrap-ansi": {
-      "version": "7.0.0",
-      "resolved": "https://registry.npmmirror.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
-      "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
-      "license": "MIT",
-      "dependencies": {
-        "ansi-styles": "^4.0.0",
-        "string-width": "^4.1.0",
-        "strip-ansi": "^6.0.0"
-      },
-      "engines": {
-        "node": ">=10"
-      },
-      "funding": {
-        "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
-      }
-    },
-    "node_modules/wrappy": {
-      "version": "1.0.2",
-      "resolved": "https://registry.npmmirror.com/wrappy/-/wrappy-1.0.2.tgz",
-      "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
-      "license": "ISC"
-    },
-    "node_modules/xtend": {
-      "version": "4.0.2",
-      "resolved": "https://registry.npmmirror.com/xtend/-/xtend-4.0.2.tgz",
-      "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==",
-      "license": "MIT",
-      "engines": {
-        "node": ">=0.4"
-      }
-    },
-    "node_modules/y18n": {
-      "version": "5.0.8",
-      "resolved": "https://registry.npmmirror.com/y18n/-/y18n-5.0.8.tgz",
-      "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==",
-      "license": "ISC",
-      "engines": {
-        "node": ">=10"
-      }
-    },
-    "node_modules/yallist": {
-      "version": "4.0.0",
-      "resolved": "https://registry.npmmirror.com/yallist/-/yallist-4.0.0.tgz",
-      "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
-      "license": "ISC"
-    },
-    "node_modules/yargs": {
-      "version": "16.2.0",
-      "resolved": "https://registry.npmmirror.com/yargs/-/yargs-16.2.0.tgz",
-      "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==",
-      "license": "MIT",
-      "dependencies": {
-        "cliui": "^7.0.2",
-        "escalade": "^3.1.1",
-        "get-caller-file": "^2.0.5",
-        "require-directory": "^2.1.1",
-        "string-width": "^4.2.0",
-        "y18n": "^5.0.5",
-        "yargs-parser": "^20.2.2"
-      },
-      "engines": {
-        "node": ">=10"
-      }
-    },
-    "node_modules/yargs-parser": {
-      "version": "20.2.9",
-      "resolved": "https://registry.npmmirror.com/yargs-parser/-/yargs-parser-20.2.9.tgz",
-      "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==",
-      "license": "ISC",
-      "engines": {
-        "node": ">=10"
-      }
-    }
-  }
-}

+ 0 - 74
rag-server/node_modules/@mapbox/node-pre-gyp/.github/workflows/codeql.yml

@@ -1,74 +0,0 @@
-# For most projects, this workflow file will not need changing; you simply need
-# to commit it to your repository.
-#
-# You may wish to alter this file to override the set of languages analyzed,
-# or to provide custom queries or build logic.
-#
-# ******** NOTE ********
-# We have attempted to detect the languages in your repository. Please check
-# the `language` matrix defined below to confirm you have the correct set of
-# supported CodeQL languages.
-#
-name: "CodeQL"
-
-on:
-  push:
-    branches: [ "master" ]
-  pull_request:
-    # The branches below must be a subset of the branches above
-    branches: [ "master" ]
-  schedule:
-    - cron: '24 5 * * 4'
-
-jobs:
-  analyze:
-    name: Analyze
-    runs-on: ubuntu-latest
-    permissions:
-      actions: read
-      contents: read
-      security-events: write
-
-    strategy:
-      fail-fast: false
-      matrix:
-        language: [ 'javascript' ]
-        # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
-        # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
-
-    steps:
-    - name: Checkout repository
-      uses: actions/checkout@v3
-
-    # Initializes the CodeQL tools for scanning.
-    - name: Initialize CodeQL
-      uses: github/codeql-action/init@v2
-      with:
-        languages: ${{ matrix.language }}
-        # If you wish to specify custom queries, you can do so here or in a config file.
-        # By default, queries listed here will override any specified in a config file.
-        # Prefix the list here with "+" to use these queries and those in the config file.
-
-        # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
-        # queries: security-extended,security-and-quality
-
-
-    # Autobuild attempts to build any compiled languages  (C/C++, C#, Go, or Java).
-    # If this step fails, then you should remove it and run the build manually (see below)
-    - name: Autobuild
-      uses: github/codeql-action/autobuild@v2
-
-    # ℹ️ Command-line programs to run using the OS shell.
-    # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
-
-    #   If the Autobuild fails above, remove it and uncomment the following three lines.
-    #   modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
-
-    # - run: |
-    #   echo "Run, Build Application using script"
-    #   ./location_of_script_within_repo/buildscript.sh
-
-    - name: Perform CodeQL Analysis
-      uses: github/codeql-action/analyze@v2
-      with:
-        category: "/language:${{matrix.language}}"

+ 0 - 510
rag-server/node_modules/@mapbox/node-pre-gyp/CHANGELOG.md

@@ -1,510 +0,0 @@
-# node-pre-gyp changelog
-
-## 1.0.11
-- Fixes dependabot alert [CVE-2021-44906](https://nvd.nist.gov/vuln/detail/CVE-2021-44906)
-
-## 1.0.10
-- Upgraded minimist to 1.2.6 to address dependabot alert [CVE-2021-44906](https://nvd.nist.gov/vuln/detail/CVE-2021-44906)
-
-## 1.0.9
-- Upgraded node-fetch to 2.6.7 to address [CVE-2022-0235](https://www.cve.org/CVERecord?id=CVE-2022-0235)
-- Upgraded detect-libc to 2.0.0 to use non-blocking NodeJS(>=12) Report API
-
-## 1.0.8
-- Downgraded npmlog to maintain node v10 and v8 support (https://github.com/mapbox/node-pre-gyp/pull/624)
-
-## 1.0.7
-- Upgraded nyc and npmlog to address https://github.com/advisories/GHSA-93q8-gq69-wqmw
-
-## 1.0.6
-- Added node v17 to the internal node releases listing
-- Upgraded various dependencies declared in package.json to latest major versions (node-fetch from 2.6.1 to 2.6.5, npmlog from 4.1.2 to 5.01, semver from 7.3.4 to 7.3.5, and tar from 6.1.0 to 6.1.11)
-- Fixed bug in `staging_host` parameter (https://github.com/mapbox/node-pre-gyp/pull/590)
-
-
-## 1.0.5
-- Fix circular reference warning with node >= v14
-
-## 1.0.4
-- Added node v16 to the internal node releases listing
-
-## 1.0.3
-- Improved support configuring s3 uploads (solves https://github.com/mapbox/node-pre-gyp/issues/571)
-  - New options added in https://github.com/mapbox/node-pre-gyp/pull/576: 'bucket', 'region', and `s3ForcePathStyle`
-
-## 1.0.2
-- Fixed regression in proxy support (https://github.com/mapbox/node-pre-gyp/issues/572)
-
-## 1.0.1
-- Switched from mkdirp@1.0.4 to make-dir@3.1.0 to avoid this bug: https://github.com/isaacs/node-mkdirp/issues/31
-
-## 1.0.0
-- Module is now name-spaced at `@mapbox/node-pre-gyp` and the original `node-pre-gyp` is deprecated.
-- New: support for staging and production s3 targets (see README.md)
-- BREAKING: no longer supporting `node_pre_gyp_accessKeyId` & `node_pre_gyp_secretAccessKey`, use `AWS_ACCESS_KEY_ID` & `AWS_SECRET_ACCESS_KEY` instead to authenticate against s3 for `info`, `publish`, and `unpublish` commands.
-- Dropped node v6 support, added node v14 support
-- Switched tests to use mapbox-owned bucket for testing
-- Added coverage tracking and linting with eslint
-- Added back support for symlinks inside the tarball
-- Upgraded all test apps to N-API/node-addon-api
-- New: support for staging and production s3 targets (see README.md)
-- Added `node_pre_gyp_s3_host` env var which has priority over the `--s3_host` option or default.
-- Replaced needle with node-fetch
-- Added proxy support for node-fetch
-- Upgraded to mkdirp@1.x
-
-## 0.17.0
-- Got travis + appveyor green again
-- Added support for more node versions
-
-## 0.16.0
-
-- Added Node 15 support in the local database (https://github.com/mapbox/node-pre-gyp/pull/520)
-
-## 0.15.0
-
-- Bump dependency on `mkdirp` from `^0.5.1` to `^0.5.3` (https://github.com/mapbox/node-pre-gyp/pull/492)
-- Bump dependency on `needle` from `^2.2.1` to `^2.5.0` (https://github.com/mapbox/node-pre-gyp/pull/502)
-- Added Node 14 support in the local database (https://github.com/mapbox/node-pre-gyp/pull/501)
-
-## 0.14.0
-
-- Defer modules requires in napi.js (https://github.com/mapbox/node-pre-gyp/pull/434)
-- Bump dependency on `tar` from `^4` to `^4.4.2` (https://github.com/mapbox/node-pre-gyp/pull/454)
-- Support extracting compiled binary from local offline mirror (https://github.com/mapbox/node-pre-gyp/pull/459)
-- Added Node 13 support in the local database (https://github.com/mapbox/node-pre-gyp/pull/483)
-
-## 0.13.0
-
-- Added Node 12 support in the local database (https://github.com/mapbox/node-pre-gyp/pull/449)
-
-## 0.12.0
-
-- Fixed double-build problem with node v10 (https://github.com/mapbox/node-pre-gyp/pull/428)
-- Added node 11 support in the local database (https://github.com/mapbox/node-pre-gyp/pull/422)
-
-## 0.11.0
-
-- Fixed double-install problem with node v10
-- Significant N-API improvements (https://github.com/mapbox/node-pre-gyp/pull/405)
-
-## 0.10.3
-
-- Now will use `request` over `needle` if request is installed. By default `needle` is used for `https`. This should unbreak proxy support that regressed in v0.9.0
-
-## 0.10.2
-
-- Fixed rc/deep-extent security vulnerability
-- Fixed broken reinstall script do to incorrectly named get_best_napi_version
-
-## 0.10.1
-
-- Fix needle error event (@medns)
-
-## 0.10.0
-
-- Allow for a single-level module path when packing @allenluce (https://github.com/mapbox/node-pre-gyp/pull/371)
-- Log warnings instead of errors when falling back @xzyfer (https://github.com/mapbox/node-pre-gyp/pull/366)
-- Add Node.js v10 support to tests (https://github.com/mapbox/node-pre-gyp/pull/372)
-- Remove retire.js from CI (https://github.com/mapbox/node-pre-gyp/pull/372)
-- Remove support for Node.js v4 due to [EOL on April 30th, 2018](https://github.com/nodejs/Release/blob/7dd52354049cae99eed0e9fe01345b0722a86fde/schedule.json#L14)
-- Update appveyor tests to install default NPM version instead of NPM v2.x for all Windows builds (https://github.com/mapbox/node-pre-gyp/pull/375)
-
-## 0.9.1
-
-- Fixed regression (in v0.9.0) with support for http redirects @allenluce (https://github.com/mapbox/node-pre-gyp/pull/361)
-
-## 0.9.0
-
-- Switched from using `request` to `needle` to reduce size of module deps (https://github.com/mapbox/node-pre-gyp/pull/350)
-
-## 0.8.0
-
-- N-API support (@inspiredware)
-
-## 0.7.1
-
-- Upgraded to tar v4.x
-
-## 0.7.0
-
- - Updated request and hawk (#347)
- - Dropped node v0.10.x support
-
-## 0.6.40
-
- - Improved error reporting if an install fails
-
-## 0.6.39
-
- - Support for node v9
- - Support for versioning on `{libc}` to allow binaries to work on non-glic linux systems like alpine linux
-
-
-## 0.6.38
-
- - Maintaining compatibility (for v0.6.x series) with node v0.10.x
-
-## 0.6.37
-
- - Solved one part of #276: now now deduce the node ABI from the major version for node >= 2 even when not stored in the abi_crosswalk.json
- - Fixed docs to avoid mentioning the deprecated and dangerous `prepublish` in package.json (#291)
- - Add new node versions to crosswalk
- - Ported tests to use tape instead of mocha
- - Got appveyor tests passing by downgrading npm and node-gyp
-
-## 0.6.36
-
- - Removed the running of `testbinary` during install. Because this was regressed for so long, it is too dangerous to re-enable by default. Developers needing validation can call `node-pre-gyp testbinary` directory.
- - Fixed regression in v0.6.35 for electron installs (now skipping binary validation which is not yet supported for electron)
-
-## 0.6.35
-
- - No longer recommending `npm ls` in `prepublish` (#291)
- - Fixed testbinary command (#283) @szdavid92
-
-## 0.6.34
-
- - Added new node versions to crosswalk, including v8
- - Upgraded deps to latest versions, started using `^` instead of `~` for all deps.
-
-## 0.6.33
-
- - Improved support for yarn
-
-## 0.6.32
-
- - Honor npm configuration for CA bundles (@heikkipora)
- - Add node-pre-gyp and npm versions to user agent (@addaleax)
- - Updated various deps
- - Add known node version for v7.x
-
-## 0.6.31
-
- - Updated various deps
-
-## 0.6.30
-
- - Update to npmlog@4.x and semver@5.3.x
- - Add known node version for v6.5.0
-
-## 0.6.29
-
- - Add known node versions for v0.10.45, v0.12.14, v4.4.4, v5.11.1, and v6.1.0
-
-## 0.6.28
-
- - Now more verbose when remote binaries are not available. This is needed since npm is increasingly more quiet by default
-   and users need to know why builds are falling back to source compiles that might then error out.
-
-## 0.6.27
-
- - Add known node version for node v6
- - Stopped bundling dependencies
- - Documented method for module authors to avoid bundling node-pre-gyp
-   - See https://github.com/mapbox/node-pre-gyp/tree/master#configuring for details
-
-## 0.6.26
-
- - Skip validation for nw runtime (https://github.com/mapbox/node-pre-gyp/pull/181) via @fleg
-
-## 0.6.25
-
- - Improved support for auto-detection of electron runtime in `node-pre-gyp.find()`
-   - Pull request from @enlight - https://github.com/mapbox/node-pre-gyp/pull/187
- - Add known node version for 4.4.1 and 5.9.1
-
-## 0.6.24
-
- - Add known node version for 5.8.0, 5.9.0, and 4.4.0.
-
-## 0.6.23
-
- - Add known node version for 0.10.43, 0.12.11, 4.3.2, and 5.7.1.
-
-## 0.6.22
-
- - Add known node version for 4.3.1, and 5.7.0.
-
-## 0.6.21
-
- - Add known node version for 0.10.42, 0.12.10, 4.3.0, and 5.6.0.
-
-## 0.6.20
-
- - Add known node version for 4.2.5, 4.2.6, 5.4.0, 5.4.1,and 5.5.0.
-
-## 0.6.19
-
- - Add known node version for 4.2.4
-
-## 0.6.18
-
- - Add new known node versions for 0.10.x, 0.12.x, 4.x, and 5.x
-
-## 0.6.17
-
- - Re-tagged to fix packaging problem of `Error: Cannot find module 'isarray'`
-
-## 0.6.16
-
- - Added known version in crosswalk for 5.1.0.
-
-## 0.6.15
-
- - Upgraded tar-pack (https://github.com/mapbox/node-pre-gyp/issues/182)
- - Support custom binary hosting mirror (https://github.com/mapbox/node-pre-gyp/pull/170)
- - Added known version in crosswalk for 4.2.2.
-
-## 0.6.14
-
- - Added node 5.x version
-
-## 0.6.13
-
- - Added more known node 4.x versions
-
-## 0.6.12
-
- - Added support for [Electron](http://electron.atom.io/). Just pass the `--runtime=electron` flag when building/installing. Thanks @zcbenz
-
-## 0.6.11
-
- - Added known node and io.js versions including more 3.x and 4.x versions
-
-## 0.6.10
-
- - Added known node and io.js versions including 3.x and 4.x versions
- - Upgraded `tar` dep
-
-## 0.6.9
-
- - Upgraded `rc` dep
- - Updated known io.js version: v2.4.0
-
-## 0.6.8
-
- - Upgraded `semver` and `rimraf` deps
- - Updated known node and io.js versions
-
-## 0.6.7
-
- - Fixed `node_abi` versions for io.js 1.1.x -> 1.8.x (should be 43, but was stored as 42) (refs https://github.com/iojs/build/issues/94)
-
-## 0.6.6
-
- - Updated with known io.js 2.0.0 version
-
-## 0.6.5
-
- - Now respecting `npm_config_node_gyp` (https://github.com/npm/npm/pull/4887)
- - Updated to semver@4.3.2
- - Updated known node v0.12.x versions and io.js 1.x versions.
-
-## 0.6.4
-
- - Improved support for `io.js` (@fengmk2)
- - Test coverage improvements (@mikemorris)
- - Fixed support for `--dist-url` that regressed in 0.6.3
-
-## 0.6.3
-
- - Added support for passing raw options to node-gyp using `--` separator. Flags passed after
-   the `--` to `node-pre-gyp configure` will be passed directly to gyp while flags passed
-   after the `--` will be passed directly to make/visual studio.
- - Added `node-pre-gyp configure` command to be able to call `node-gyp configure` directly
- - Fix issue with require validation not working on windows 7 (@edgarsilva)
-
-## 0.6.2
-
- - Support for io.js >= v1.0.2
- - Deferred require of `request` and `tar` to help speed up command line usage of `node-pre-gyp`.
-
-## 0.6.1
-
- - Fixed bundled `tar` version
-
-## 0.6.0
-
- - BREAKING: node odd releases like v0.11.x now use `major.minor.patch` for `{node_abi}` instead of `NODE_MODULE_VERSION` (#124)
- - Added support for `toolset` option in versioning. By default is an empty string but `--toolset` can be passed to publish or install to select alternative binaries that target a custom toolset like C++11. For example to target Visual Studio 2014 modules like node-sqlite3 use `--toolset=v140`.
- - Added support for `--no-rollback` option to request that a failed binary test does not remove the binary module leaves it in place.
- - Added support for `--update-binary` option to request an existing binary be re-installed and the check for a valid local module be skipped.
- - Added support for passing build options from `npm` through `node-pre-gyp` to `node-gyp`: `--nodedir`, `--disturl`, `--python`, and `--msvs_version`
-
-## 0.5.31
-
- - Added support for deducing node_abi for node.js runtime from previous release if the series is even
- - Added support for --target=0.10.33
-
-## 0.5.30
-
- - Repackaged with latest bundled deps
-
-## 0.5.29
-
- - Added support for semver `build`.
- - Fixed support for downloading from urls that include `+`.
-
-## 0.5.28
-
- - Now reporting unix style paths only in reveal command
-
-## 0.5.27
-
- - Fixed support for auto-detecting s3 bucket name when it contains `.` - @taavo
- - Fixed support for installing when path contains a `'` - @halfdan
- - Ported tests to mocha
-
-## 0.5.26
-
- - Fix node-webkit support when `--target` option is not provided
-
-## 0.5.25
-
- - Fix bundling of deps
-
-## 0.5.24
-
- - Updated ABI crosswalk to incldue node v0.10.30 and v0.10.31
-
-## 0.5.23
-
- - Added `reveal` command. Pass no options to get all versioning data as json. Pass a second arg to grab a single versioned property value
- - Added support for `--silent` (shortcut for `--loglevel=silent`)
-
-## 0.5.22
-
- - Fixed node-webkit versioning name (NOTE: node-webkit support still experimental)
-
-## 0.5.21
-
- - New package to fix `shasum check failed` error with v0.5.20
-
-## 0.5.20
-
- - Now versioning node-webkit binaries based on major.minor.patch - assuming no compatible ABI across versions (#90)
-
-## 0.5.19
-
- - Updated to know about more node-webkit releases
-
-## 0.5.18
-
- - Updated to know about more node-webkit releases
-
-## 0.5.17
-
- - Updated to know about node v0.10.29 release
-
-## 0.5.16
-
- - Now supporting all aws-sdk configuration parameters (http://docs.aws.amazon.com/AWSJavaScriptSDK/guide/node-configuring.html) (#86)
-
-## 0.5.15
-
- - Fixed installation of windows packages sub directories on unix systems (#84)
-
-## 0.5.14
-
- - Finished support for cross building using `--target_platform` option (#82)
- - Now skipping binary validation on install if target arch/platform do not match the host.
- - Removed multi-arch validing for OS X since it required a FAT node.js binary
-
-## 0.5.13
-
- - Fix problem in 0.5.12 whereby the wrong versions of mkdirp and semver where bundled.
-
-## 0.5.12
-
- - Improved support for node-webkit (@Mithgol)
-
-## 0.5.11
-
- - Updated target versions listing
-
-## 0.5.10
-
- - Fixed handling of `-debug` flag passed directory to node-pre-gyp (#72)
- - Added optional second arg to `node_pre_gyp.find` to customize the default versioning options used to locate the runtime binary
- - Failed install due to `testbinary` check failure no longer leaves behind binary (#70)
-
-## 0.5.9
-
- - Fixed regression in `testbinary` command causing installs to fail on windows with 0.5.7 (#60)
-
-## 0.5.8
-
- - Started bundling deps
-
-## 0.5.7
-
- - Fixed the `testbinary` check, which is used to determine whether to re-download or source compile, to work even in complex dependency situations (#63)
- - Exposed the internal `testbinary` command in node-pre-gyp command line tool
- - Fixed minor bug so that `fallback_to_build` option is always respected
-
-## 0.5.6
-
- - Added support for versioning on the `name` value in `package.json` (#57).
- - Moved to using streams for reading tarball when publishing (#52)
-
-## 0.5.5
-
- - Improved binary validation that also now works with node-webkit (@Mithgol)
- - Upgraded test apps to work with node v0.11.x
- - Improved test coverage
-
-## 0.5.4
-
- - No longer depends on external install of node-gyp for compiling builds.
-
-## 0.5.3
-
- - Reverted fix for debian/nodejs since it broke windows (#45)
-
-## 0.5.2
-
- - Support for debian systems where the node binary is named `nodejs` (#45)
- - Added `bin/node-pre-gyp.cmd` to be able to run command on windows locally (npm creates an .npm automatically when globally installed)
- - Updated abi-crosswalk with node v0.10.26 entry.
-
-## 0.5.1
-
- - Various minor bug fixes, several improving windows support for publishing.
-
-## 0.5.0
-
- - Changed property names in `binary` object: now required are `module_name`, `module_path`, and `host`.
- - Now `module_path` supports versioning, which allows developers to opt-in to using a versioned install path (#18).
- - Added `remote_path` which also supports versioning.
- - Changed `remote_uri` to `host`.
-
-## 0.4.2
-
- - Added support for `--target` flag to request cross-compile against a specific node/node-webkit version.
- - Added preliminary support for node-webkit
- - Fixed support for `--target_arch` option being respected in all cases.
-
-## 0.4.1
-
- - Fixed exception when only stderr is available in binary test (@bendi / #31)
-
-## 0.4.0
-
- - Enforce only `https:` based remote publishing access.
- - Added `node-pre-gyp info` command to display listing of published binaries
- - Added support for changing the directory node-pre-gyp should build in with the `-C/--directory` option.
- - Added support for S3 prefixes.
-
-## 0.3.1
-
- - Added `unpublish` command.
- - Fixed module path construction in tests.
- - Added ability to disable falling back to build behavior via `npm install --fallback-to-build=false` which overrides setting in a depedencies package.json `install` target.
-
-## 0.3.0
-
- - Support for packaging all files in `module_path` directory - see `app4` for example
- - Added `testpackage` command.
- - Changed `clean` command to only delete `.node` not entire `build` directory since node-gyp will handle that.
- - `.node` modules must be in a folder of there own since tar-pack will remove everything when it unpacks.

+ 0 - 27
rag-server/node_modules/@mapbox/node-pre-gyp/LICENSE

@@ -1,27 +0,0 @@
-Copyright (c), Mapbox
-
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-    * Redistributions of source code must retain the above copyright notice,
-      this list of conditions and the following disclaimer.
-    * Redistributions in binary form must reproduce the above copyright notice,
-      this list of conditions and the following disclaimer in the documentation
-      and/or other materials provided with the distribution.
-    * Neither the name of node-pre-gyp nor the names of its contributors
-      may be used to endorse or promote products derived from this software
-      without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
-CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+ 0 - 742
rag-server/node_modules/@mapbox/node-pre-gyp/README.md

@@ -1,742 +0,0 @@
-# @mapbox/node-pre-gyp
-
-#### @mapbox/node-pre-gyp makes it easy to publish and install Node.js C++ addons from binaries
-
-[![Build Status](https://travis-ci.com/mapbox/node-pre-gyp.svg?branch=master)](https://travis-ci.com/mapbox/node-pre-gyp)
-[![Build status](https://ci.appveyor.com/api/projects/status/3nxewb425y83c0gv)](https://ci.appveyor.com/project/Mapbox/node-pre-gyp)
-
-`@mapbox/node-pre-gyp` stands between [npm](https://github.com/npm/npm) and [node-gyp](https://github.com/Tootallnate/node-gyp) and offers a cross-platform method of binary deployment.
-
-### Special note on previous package
-
-On Feb 9th, 2021 `@mapbox/node-pre-gyp@1.0.0` was [released](./CHANGELOG.md). Older, unscoped versions that are not part of the `@mapbox` org are deprecated and only `@mapbox/node-pre-gyp` will see updates going forward. To upgrade to the new package do:
-
-```
-npm uninstall node-pre-gyp --save
-npm install @mapbox/node-pre-gyp --save
-```
-
-### Features
-
- - A command line tool called `node-pre-gyp` that can install your package's C++ module from a binary.
- - A variety of developer targeted commands for packaging, testing, and publishing binaries.
- - A JavaScript module that can dynamically require your installed binary: `require('@mapbox/node-pre-gyp').find`
-
-For a hello world example of a module packaged with `node-pre-gyp` see <https://github.com/springmeyer/node-addon-example> and [the wiki ](https://github.com/mapbox/node-pre-gyp/wiki/Modules-using-node-pre-gyp) for real world examples.
-
-## Credits
-
- - The module is modeled after [node-gyp](https://github.com/Tootallnate/node-gyp) by [@Tootallnate](https://github.com/Tootallnate)
- - Motivation for initial development came from [@ErisDS](https://github.com/ErisDS) and the [Ghost Project](https://github.com/TryGhost/Ghost).
- - Development is sponsored by [Mapbox](https://www.mapbox.com/)
-
-## FAQ
-
-See the [Frequently Ask Questions](https://github.com/mapbox/node-pre-gyp/wiki/FAQ).
-
-## Depends
-
- - Node.js >= node v8.x
-
-## Install
-
-`node-pre-gyp` is designed to be installed as a local dependency of your Node.js C++ addon and accessed like:
-
-    ./node_modules/.bin/node-pre-gyp --help
-
-But you can also install it globally:
-
-    npm install @mapbox/node-pre-gyp -g
-
-## Usage
-
-### Commands
-
-View all possible commands:
-
-    node-pre-gyp --help
-
-- clean - Remove the entire folder containing the compiled .node module
-- install - Install pre-built binary for module
-- reinstall - Run "clean" and "install" at once
-- build - Compile the module by dispatching to node-gyp or nw-gyp
-- rebuild - Run "clean" and "build" at once
-- package - Pack binary into tarball
-- testpackage - Test that the staged package is valid
-- publish - Publish pre-built binary
-- unpublish - Unpublish pre-built binary
-- info - Fetch info on published binaries
-
-You can also chain commands:
-
-    node-pre-gyp clean build unpublish publish info
-
-### Options
-
-Options include:
-
- - `-C/--directory`: run the command in this directory
- - `--build-from-source`: build from source instead of using pre-built binary
- - `--update-binary`: reinstall by replacing previously installed local binary with remote binary
- - `--runtime=node-webkit`: customize the runtime: `node`, `electron` and `node-webkit` are the valid options
- - `--fallback-to-build`: fallback to building from source if pre-built binary is not available
- - `--target=0.4.0`: Pass the target node or node-webkit version to compile against
- - `--target_arch=ia32`: Pass the target arch and override the host `arch`. Any value that is [supported by Node.js](https://nodejs.org/api/os.html#osarch) is valid.
- - `--target_platform=win32`: Pass the target platform and override the host `platform`. Valid values are `linux`, `darwin`, `win32`, `sunos`, `freebsd`, `openbsd`, and `aix`.
-
-Both `--build-from-source` and `--fallback-to-build` can be passed alone or they can provide values. You can pass `--fallback-to-build=false` to override the option as declared in package.json. In addition to being able to pass `--build-from-source` you can also pass `--build-from-source=myapp` where `myapp` is the name of your module.
-
-For example: `npm install --build-from-source=myapp`. This is useful if:
-
- - `myapp` is referenced in the package.json of a larger app and therefore `myapp` is being installed as a dependency with `npm install`.
- - The larger app also depends on other modules installed with `node-pre-gyp`
- - You only want to trigger a source compile for `myapp` and the other modules.
-
-### Configuring
-
-This is a guide to configuring your module to use node-pre-gyp.
-
-#### 1) Add new entries to your `package.json`
-
- - Add `@mapbox/node-pre-gyp` to `dependencies`
- - Add `aws-sdk` as a `devDependency`
- - Add a custom `install` script
- - Declare a `binary` object
-
-This looks like:
-
-```js
-    "dependencies"  : {
-      "@mapbox/node-pre-gyp": "1.x"
-    },
-    "devDependencies": {
-      "aws-sdk": "2.x"
-    }
-    "scripts": {
-        "install": "node-pre-gyp install --fallback-to-build"
-    },
-    "binary": {
-        "module_name": "your_module",
-        "module_path": "./lib/binding/",
-        "host": "https://your_module.s3-us-west-1.amazonaws.com"
-    }
-```
-
-For a full example see [node-addon-examples's package.json](https://github.com/springmeyer/node-addon-example/blob/master/package.json).
-
-Let's break this down:
-
- - Dependencies need to list `node-pre-gyp`
- - Your devDependencies should list `aws-sdk` so that you can run `node-pre-gyp publish` locally or a CI system. We recommend using `devDependencies` only since `aws-sdk` is large and not needed for `node-pre-gyp install` since it only uses http to fetch binaries
- - Your `scripts` section should override the `install` target with `"install": "node-pre-gyp install --fallback-to-build"`. This allows node-pre-gyp to be used instead of the default npm behavior of always source compiling with `node-gyp` directly.
- - Your package.json should contain a `binary` section describing key properties you provide to allow node-pre-gyp to package optimally. They are detailed below.
-
-Note: in the past we recommended putting `@mapbox/node-pre-gyp` in the `bundledDependencies`, but we no longer recommend this. In the past there were npm bugs (with node versions 0.10.x) that could lead to node-pre-gyp not being available at the right time during install (unless we bundled). This should no longer be the case. Also, for a time we recommended using `"preinstall": "npm install @mapbox/node-pre-gyp"` as an alternative method to avoid needing to bundle. But this did not behave predictably across all npm versions - see https://github.com/mapbox/node-pre-gyp/issues/260 for the details. So we do not recommend using `preinstall` to install `@mapbox/node-pre-gyp`. More history on this at https://github.com/strongloop/fsevents/issues/157#issuecomment-265545908.
-
-##### The `binary` object has three required properties
-
-###### module_name
-
-The name of your native node module. This value must:
-
- - Match the name passed to [the NODE_MODULE macro](http://nodejs.org/api/addons.html#addons_hello_world)
- - Must be a valid C variable name (e.g. it cannot contain `-`)
- - Should not include the `.node` extension.
-
-###### module_path
-
-The location your native module is placed after a build. This should be an empty directory without other Javascript files. This entire directory will be packaged in the binary tarball. When installing from a remote package this directory will be overwritten with the contents of the tarball.
-
-Note: This property supports variables based on [Versioning](#versioning).
-
-###### host
-
-A url to the remote location where you've published tarball binaries (must be `https` not `http`).
-
-It is highly recommended that you use Amazon S3. The reasons are:
-
-  - Various node-pre-gyp commands like `publish` and `info` only work with an S3 host.
-  - S3 is a very solid hosting platform for distributing large files.
-  - We provide detail documentation for using [S3 hosting](#s3-hosting) with node-pre-gyp.
-
-Why then not require S3? Because while some applications using node-pre-gyp need to distribute binaries as large as 20-30 MB, others might have very small binaries and might wish to store them in a GitHub repo. This is not recommended, but if an author really wants to host in a non-S3 location then it should be possible.
-
-It should also be mentioned that there is an optional and entirely separate npm module called [node-pre-gyp-github](https://github.com/bchr02/node-pre-gyp-github) which is intended to complement node-pre-gyp and be installed along with it. It provides the ability to store and publish your binaries within your repositories GitHub Releases if you would rather not use S3 directly. Installation and usage instructions can be found [here](https://github.com/bchr02/node-pre-gyp-github), but the basic premise is that instead of using the ```node-pre-gyp publish``` command you would use ```node-pre-gyp-github publish```.
-
-##### The `binary` object other optional S3 properties
-
-If you are not using a standard s3 path like `bucket_name.s3(.-)region.amazonaws.com`, you might get an error on `publish` because node-pre-gyp extracts the region and bucket from the `host` url. For example, you may have an on-premises s3-compatible storage  server, or may have configured a specific dns redirecting to an s3  endpoint. In these cases, you can explicitly set the `region` and `bucket` properties to tell node-pre-gyp to use these values instead of guessing from the `host` property. The following values can be used in the `binary` section:
-
-###### host
-
-The url to the remote server root location (must be `https` not `http`).
-
-###### bucket
-
-The bucket name where your tarball binaries should be located.
-
-###### region
-
-Your S3 server region.
-
-###### s3ForcePathStyle
-
-Set `s3ForcePathStyle` to true if the endpoint url should not be prefixed with the bucket name. If false (default), the server endpoint would be  constructed as `bucket_name.your_server.com`.
-
-##### The `binary` object has optional properties
-
-###### remote_path
-
-It **is recommended** that you customize this property. This is an extra path to use for publishing and finding remote tarballs. The default value for `remote_path` is `""` meaning that if you do not provide it then all packages will be published at the base of the `host`. It is recommended to provide a value like `./{name}/v{version}` to help organize remote packages in the case that you choose to publish multiple node addons to the same `host`.
-
-Note: This property supports variables based on [Versioning](#versioning).
-
-###### package_name
-
-It is **not recommended** to override this property unless you are also overriding the `remote_path`. This is the versioned name of the remote tarball containing the binary `.node` module and any supporting files you've placed inside the `module_path` directory. Unless you specify `package_name` in your `package.json` then it defaults to `{module_name}-v{version}-{node_abi}-{platform}-{arch}.tar.gz` which allows your binary to work across node versions, platforms, and architectures. If you are using `remote_path` that is also versioned by `./{module_name}/v{version}` then you could remove these variables from the `package_name` and just use: `{node_abi}-{platform}-{arch}.tar.gz`. Then your remote tarball will be looked up at, for example, `https://example.com/your-module/v0.1.0/node-v11-linux-x64.tar.gz`.
-
-Avoiding the version of your module in the `package_name` and instead only embedding in a directory name can be useful when you want to make a quick tag of your module that does not change any C++ code. In this case you can just copy binaries to the new version behind the scenes like:
-
-```sh
-aws s3 sync --acl public-read s3://mapbox-node-binary/sqlite3/v3.0.3/ s3://mapbox-node-binary/sqlite3/v3.0.4/
-```
-
-Note: This property supports variables based on [Versioning](#versioning).
-
-#### 2) Add a new target to binding.gyp
-
-`node-pre-gyp` calls out to `node-gyp` to compile the module and passes variables along like [module_name](#module_name) and [module_path](#module_path).
-
-A new target must be added to `binding.gyp` that moves the compiled `.node` module from `./build/Release/module_name.node` into the directory specified by `module_path`.
-
-Add a target like this at the end of your `targets` list:
-
-```js
-    {
-      "target_name": "action_after_build",
-      "type": "none",
-      "dependencies": [ "<(module_name)" ],
-      "copies": [
-        {
-          "files": [ "<(PRODUCT_DIR)/<(module_name).node" ],
-          "destination": "<(module_path)"
-        }
-      ]
-    }
-```
-
-For a full example see [node-addon-example's binding.gyp](https://github.com/springmeyer/node-addon-example/blob/2ff60a8ded7f042864ad21db00c3a5a06cf47075/binding.gyp).
-
-#### 3) Dynamically require your `.node`
-
-Inside the main js file that requires your addon module you are likely currently doing:
-
-```js
-var binding = require('../build/Release/binding.node');
-```
-
-or:
-
-```js
-var bindings = require('./bindings')
-```
-
-Change those lines to:
-
-```js
-var binary = require('@mapbox/node-pre-gyp');
-var path = require('path');
-var binding_path = binary.find(path.resolve(path.join(__dirname,'./package.json')));
-var binding = require(binding_path);
-```
-
-For a full example see [node-addon-example's index.js](https://github.com/springmeyer/node-addon-example/blob/2ff60a8ded7f042864ad21db00c3a5a06cf47075/index.js#L1-L4)
-
-#### 4) Build and package your app
-
-Now build your module from source:
-
-    npm install --build-from-source
-
-The `--build-from-source` tells `node-pre-gyp` to not look for a remote package and instead dispatch to node-gyp to build.
-
-Now `node-pre-gyp` should now also be installed as a local dependency so the command line tool it offers can be found at `./node_modules/.bin/node-pre-gyp`.
-
-#### 5) Test
-
-Now `npm test` should work just as it did before.
-
-#### 6) Publish the tarball
-
-Then package your app:
-
-    ./node_modules/.bin/node-pre-gyp package
-
-Once packaged, now you can publish:
-
-    ./node_modules/.bin/node-pre-gyp publish
-
-Currently the `publish` command pushes your binary to S3. This requires:
-
- - You have installed `aws-sdk` with `npm install aws-sdk`
- - You have created a bucket already.
- - The `host` points to an S3 http or https endpoint.
- - You have configured node-pre-gyp to read your S3 credentials (see [S3 hosting](#s3-hosting) for details).
-
-You can also host your binaries elsewhere. To do this requires:
-
- - You manually publish the binary created by the `package` command to an `https` endpoint
- - Ensure that the `host` value points to your custom `https` endpoint.
-
-#### 7) Automate builds
-
-Now you need to publish builds for all the platforms and node versions you wish to support. This is best automated.
-
- - See [Appveyor Automation](#appveyor-automation) for how to auto-publish builds on Windows.
- - See [Travis Automation](#travis-automation) for how to auto-publish builds on OS X and Linux.
-
-#### 8) You're done!
-
-Now publish your module to the npm registry. Users will now be able to install your module from a binary.
-
-What will happen is this:
-
-1. `npm install <your package>` will pull from the npm registry
-2. npm will run the `install` script which will call out to `node-pre-gyp`
-3. `node-pre-gyp` will fetch the binary `.node` module and unpack in the right place
-4. Assuming that all worked, you are done
-
-If a a binary was not available for a given platform and `--fallback-to-build` was used then `node-gyp rebuild` will be called to try to source compile the module.
-
-#### 9) One more option
-
-It may be that you want to work with two s3 buckets, one for staging and one for production; this
-arrangement makes it less likely to accidentally overwrite a production binary. It also allows the production
-environment to have more restrictive permissions than staging while still enabling publishing when
-developing and testing.
-
-The binary.host property can be set at execution time. In order to do so all of the following conditions
-must be true.
-
-- binary.host is falsey or not present
-- binary.staging_host is not empty
-- binary.production_host is not empty
-
-If any of these checks fail then the operation will not perform execution time determination of the s3 target.
-
-If the command being executed is either "publish" or "unpublish" then the default is set to `binary.staging_host`. In all other cases
-the default is `binary.production_host`.
-
-The command-line options `--s3_host=staging` or `--s3_host=production` override the default. If `s3_host`
-is present and not `staging` or `production` an exception is thrown.
-
-This allows installing from staging by specifying `--s3_host=staging`. And it requires specifying
-`--s3_option=production` in order to publish to, or unpublish from, production, making accidental errors less likely.
-
-## Node-API Considerations
-
-[Node-API](https://nodejs.org/api/n-api.html#n_api_node_api), which was previously known as N-API, is an ABI-stable alternative to previous technologies such as [nan](https://github.com/nodejs/nan) which are tied to a specific Node runtime engine. Node-API is Node runtime engine agnostic and guarantees modules created today will continue to run, without changes, into the future.
-
-Using `node-pre-gyp` with Node-API projects requires a handful of additional configuration values and imposes some additional requirements.
-
-The most significant difference is that an Node-API module can be coded to target multiple  Node-API versions. Therefore, an Node-API module must declare in its `package.json` file which Node-API versions the module is designed to run against. In addition, since multiple builds may be required for a single module, path and file names must be specified in way that avoids naming conflicts.
-
-### The `napi_versions` array property
-
-A Node-API module must declare in its `package.json` file, the Node-API versions the module is intended to support. This is accomplished by including an `napi-versions` array property in the `binary` object. For example:
-
-```js
-"binary": {
-    "module_name": "your_module",
-    "module_path": "your_module_path",
-    "host": "https://your_bucket.s3-us-west-1.amazonaws.com",
-    "napi_versions": [1,3]
-  }
-```
-
-If the `napi_versions` array property is *not* present, `node-pre-gyp` operates as it always has. Including the `napi_versions` array property instructs `node-pre-gyp` that this is a Node-API module build.
-
-When the `napi_versions` array property is present, `node-pre-gyp` fires off multiple operations, one for each of the Node-API versions in the array. In the example above, two operations are initiated, one for Node-API version 1 and second for Node-API version 3. How this version number is communicated is described next.
-
-### The `napi_build_version` value
-
-For each of the Node-API module operations `node-pre-gyp` initiates, it ensures that the `napi_build_version` is set appropriately.
-
-This value is of importance in two areas:
-
-1. The C/C++ code which needs to know against which Node-API version it should compile.
-2. `node-pre-gyp` itself which must assign appropriate path and file names to avoid collisions.
-
-### Defining `NAPI_VERSION` for the C/C++ code
-
-The `napi_build_version` value is communicated to the C/C++ code by adding this code to the `binding.gyp` file:
-
-```
-"defines": [
-    "NAPI_VERSION=<(napi_build_version)",
-]
-```
-
-This ensures that `NAPI_VERSION`, an integer value, is declared appropriately to the C/C++ code for each build.
-
-> Note that earlier versions of this document recommended defining the symbol `NAPI_BUILD_VERSION`. `NAPI_VERSION` is preferred because it used by the Node-API C/C++ headers to configure the specific Node-API versions being requested.
-
-### Path and file naming requirements in `package.json`
-
-Since `node-pre-gyp` fires off multiple operations for each request, it is essential that path and file names be created in such a way as to avoid collisions. This is accomplished by imposing additional path and file naming requirements.
-
-Specifically, when performing Node-API builds, the `{napi_build_version}` text configuration value  *must* be present in the `module_path` property. In addition, the `{napi_build_version}` text configuration value  *must* be present in either the `remote_path` or `package_name` property. (No problem if it's in both.)
-
-Here's an example:
-
-```js
-"binary": {
-    "module_name": "your_module",
-    "module_path": "./lib/binding/napi-v{napi_build_version}",
-    "remote_path": "./{module_name}/v{version}/{configuration}/",
-    "package_name": "{platform}-{arch}-napi-v{napi_build_version}.tar.gz",
-    "host": "https://your_bucket.s3-us-west-1.amazonaws.com",
-    "napi_versions": [1,3]
-  }
-```
-
-## Supporting both Node-API and NAN builds
-
-You may have a legacy native add-on that you wish to continue supporting for those versions of Node that do not support Node-API, as you add Node-API support for later Node versions. This can be accomplished by specifying the `node_napi_label` configuration value in the package.json `binary.package_name` property.
-
-Placing the configuration value `node_napi_label` in the package.json `binary.package_name` property instructs `node-pre-gyp` to build all viable Node-API binaries supported by the current Node instance. If the current Node instance does not support Node-API, `node-pre-gyp` will request a traditional, non-Node-API build.
-
-The configuration value `node_napi_label` is set by `node-pre-gyp` to the type of build created, `napi` or `node`, and the version number. For Node-API builds, the string contains the Node-API version nad has values like `napi-v3`. For traditional, non-Node-API builds, the string contains the ABI version with values like `node-v46`.
-
-Here's how the `binary` configuration above might be changed to support both Node-API and NAN builds:
-
-```js
-"binary": {
-    "module_name": "your_module",
-    "module_path": "./lib/binding/{node_napi_label}",
-    "remote_path": "./{module_name}/v{version}/{configuration}/",
-    "package_name": "{platform}-{arch}-{node_napi_label}.tar.gz",
-    "host": "https://your_bucket.s3-us-west-1.amazonaws.com",
-    "napi_versions": [1,3]
-  }
-```
-
-The C/C++ symbol `NAPI_VERSION` can be used to distinguish Node-API and non-Node-API builds. The value of `NAPI_VERSION` is set to the integer Node-API version for Node-API builds and is set to `0` for non-Node-API builds.
-
-For example:
-
-```C
-#if NAPI_VERSION
-// Node-API code goes here
-#else
-// NAN code goes here
-#endif
-```
-
-### Two additional configuration values
-
-The following two configuration values, which were implemented in previous versions of `node-pre-gyp`, continue to exist, but have been replaced by the `node_napi_label` configuration value described above.
-
-1. `napi_version` If Node-API is supported by the currently executing Node instance, this value is the Node-API version number supported by Node. If Node-API is not supported, this value is an empty string.
-
-2. `node_abi_napi` If the value returned for `napi_version` is non empty, this value is `'napi'`. If the value returned for `napi_version` is empty, this value is the value returned for `node_abi`.
-
-These values are present for use in the `binding.gyp` file and may be used as `{napi_version}` and `{node_abi_napi}` for text substituion in the `binary` properties of the `package.json` file.
-
-## S3 Hosting
-
-You can host wherever you choose but S3 is cheap, `node-pre-gyp publish` expects it, and S3 can be integrated well with [Travis.ci](http://travis-ci.org) to automate builds for OS X and Ubuntu, and with [Appveyor](http://appveyor.com) to automate builds for Windows. Here is an approach to do this:
-
-First, get setup locally and test the workflow:
-
-#### 1) Create an S3 bucket
-
-And have your **key** and **secret key** ready for writing to the bucket.
-
-It is recommended to create a IAM user with a policy that only gives permissions to the specific bucket you plan to publish to. This can be done in the [IAM console](https://console.aws.amazon.com/iam/) by: 1) adding a new user, 2) choosing `Attach User Policy`, 3) Using the `Policy Generator`, 4) selecting `Amazon S3` for the service, 5) adding the actions: `DeleteObject`, `GetObject`, `GetObjectAcl`, `ListBucket`, `HeadBucket`, `PutObject`, `PutObjectAcl`, 6) adding an ARN of `arn:aws:s3:::bucket/*` (replacing `bucket` with your bucket name), and finally 7) clicking `Add Statement` and saving the policy. It should generate a policy like:
-
-```js
-{
-    "Version": "2012-10-17",
-    "Statement": [
-        {
-            "Sid": "objects",
-            "Effect": "Allow",
-            "Action": [
-                "s3:PutObject",
-                "s3:GetObjectAcl",
-                "s3:GetObject",
-                "s3:DeleteObject",
-                "s3:PutObjectAcl"
-            ],
-            "Resource": "arn:aws:s3:::your-bucket-name/*"
-        },
-        {
-            "Sid": "bucket",
-            "Effect": "Allow",
-            "Action": "s3:ListBucket",
-            "Resource": "arn:aws:s3:::your-bucket-name"
-        },
-        {
-            "Sid": "buckets",
-            "Effect": "Allow",
-            "Action": "s3:HeadBucket",
-            "Resource": "*"
-        }
-    ]
-}
-```
-
-#### 2) Install node-pre-gyp
-
-Either install it globally:
-
-    npm install node-pre-gyp -g
-
-Or put the local version on your PATH
-
-    export PATH=`pwd`/node_modules/.bin/:$PATH
-
-#### 3) Configure AWS credentials
-
-It is recommended to configure the AWS JS SDK v2 used internally by `node-pre-gyp` by setting these environment variables:
-
-- AWS_ACCESS_KEY_ID
-- AWS_SECRET_ACCESS_KEY
-
-But also you can also use the `Shared Config File` mentioned [in the AWS JS SDK v2 docs](https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/configuring-the-jssdk.html)
-
-#### 4) Package and publish your build
-
-Install the `aws-sdk`:
-
-    npm install aws-sdk
-
-Then publish:
-
-    node-pre-gyp package publish
-
-Note: if you hit an error like `Hostname/IP doesn't match certificate's altnames` it may mean that you need to provide the `region` option in your config.
-
-## Appveyor Automation
-
-[Appveyor](http://www.appveyor.com/) can build binaries and publish the results per commit and supports:
-
- - Windows Visual Studio 2013 and related compilers
- - Both 64 bit (x64) and 32 bit (x86) build configurations
- - Multiple Node.js versions
-
-For an example of doing this see [node-sqlite3's appveyor.yml](https://github.com/mapbox/node-sqlite3/blob/master/appveyor.yml).
-
-Below is a guide to getting set up:
-
-#### 1) Create a free Appveyor account
-
-Go to https://ci.appveyor.com/signup/free and sign in with your GitHub account.
-
-#### 2) Create a new project
-
-Go to https://ci.appveyor.com/projects/new and select the GitHub repo for your module
-
-#### 3) Add appveyor.yml and push it
-
-Once you have committed an `appveyor.yml` ([appveyor.yml reference](http://www.appveyor.com/docs/appveyor-yml)) to your GitHub repo and pushed it AppVeyor should automatically start building your project.
-
-#### 4) Create secure variables
-
-Encrypt your S3 AWS keys by going to <https://ci.appveyor.com/tools/encrypt> and hitting the `encrypt` button.
-
-Then paste the result into your `appveyor.yml`
-
-```yml
-environment:
-  AWS_ACCESS_KEY_ID:
-    secure: Dn9HKdLNYvDgPdQOzRq/DqZ/MPhjknRHB1o+/lVU8MA=
-  AWS_SECRET_ACCESS_KEY:
-    secure: W1rwNoSnOku1r+28gnoufO8UA8iWADmL1LiiwH9IOkIVhDTNGdGPJqAlLjNqwLnL
-```
-
-NOTE: keys are per account but not per repo (this is difference than Travis where keys are per repo but not related to the account used to encrypt them).
-
-#### 5) Hook up publishing
-
-Just put `node-pre-gyp package publish` in your `appveyor.yml` after `npm install`.
-
-#### 6) Publish when you want
-
-You might wish to publish binaries only on a specific commit. To do this you could borrow from the [Travis CI idea of commit keywords](http://about.travis-ci.org/docs/user/how-to-skip-a-build/) and add special handling for commit messages with `[publish binary]`:
-
-    SET CM=%APPVEYOR_REPO_COMMIT_MESSAGE%
-    if not "%CM%" == "%CM:[publish binary]=%" node-pre-gyp --msvs_version=2013 publish
-
-If your commit message contains special characters (e.g. `&`) this method might fail. An alternative is to use PowerShell, which gives you additional possibilities, like ignoring case by using `ToLower()`:
-
-    ps: if($env:APPVEYOR_REPO_COMMIT_MESSAGE.ToLower().Contains('[publish binary]')) { node-pre-gyp --msvs_version=2013 publish }
-
-Remember this publishing is not the same as `npm publish`. We're just talking about the binary module here and not your entire npm package.
-
-## Travis Automation
-
-[Travis](https://travis-ci.org/) can push to S3 after a successful build and supports both:
-
- - Ubuntu Precise and OS X (64 bit)
- - Multiple Node.js versions
-
-For an example of doing this see [node-add-example's .travis.yml](https://github.com/springmeyer/node-addon-example/blob/2ff60a8ded7f042864ad21db00c3a5a06cf47075/.travis.yml).
-
-Note: if you need 32 bit binaries, this can be done from a 64 bit Travis machine. See [the node-sqlite3 scripts for an example of doing this](https://github.com/mapbox/node-sqlite3/blob/bae122aa6a2b8a45f6b717fab24e207740e32b5d/scripts/build_against_node.sh#L54-L74).
-
-Below is a guide to getting set up:
-
-#### 1) Install the Travis gem
-
-    gem install travis
-
-#### 2) Create secure variables
-
-Make sure you run this command from within the directory of your module.
-
-Use `travis-encrypt` like:
-
-    travis encrypt AWS_ACCESS_KEY_ID=${node_pre_gyp_accessKeyId}
-    travis encrypt AWS_SECRET_ACCESS_KEY=${node_pre_gyp_secretAccessKey}
-
-Then put those values in your `.travis.yml` like:
-
-```yaml
-env:
-  global:
-    - secure: F+sEL/v56CzHqmCSSES4pEyC9NeQlkoR0Gs/ZuZxX1ytrj8SKtp3MKqBj7zhIclSdXBz4Ev966Da5ctmcTd410p0b240MV6BVOkLUtkjZJyErMBOkeb8n8yVfSoeMx8RiIhBmIvEn+rlQq+bSFis61/JkE9rxsjkGRZi14hHr4M=
-    - secure: o2nkUQIiABD139XS6L8pxq3XO5gch27hvm/gOdV+dzNKc/s2KomVPWcOyXNxtJGhtecAkABzaW8KHDDi5QL1kNEFx6BxFVMLO8rjFPsMVaBG9Ks6JiDQkkmrGNcnVdxI/6EKTLHTH5WLsz8+J7caDBzvKbEfTux5EamEhxIWgrI=
-```
-
-More details on Travis encryption at http://about.travis-ci.org/docs/user/encryption-keys/.
-
-#### 3) Hook up publishing
-
-Just put `node-pre-gyp package publish` in your `.travis.yml` after `npm install`.
-
-##### OS X publishing
-
-If you want binaries for OS X in addition to linux you can enable [multi-os for Travis](http://docs.travis-ci.com/user/multi-os/#Setting-.travis.yml)
-
-Use a configuration like:
-
-```yml
-
-language: cpp
-
-os:
-- linux
-- osx
-
-env:
-  matrix:
-    - NODE_VERSION="4"
-    - NODE_VERSION="6"
-
-before_install:
-- rm -rf ~/.nvm/ && git clone --depth 1 https://github.com/creationix/nvm.git ~/.nvm
-- source ~/.nvm/nvm.sh
-- nvm install $NODE_VERSION
-- nvm use $NODE_VERSION
-```
-
-See [Travis OS X Gotchas](#travis-os-x-gotchas) for why we replace `language: node_js` and `node_js:` sections with `language: cpp` and a custom matrix.
-
-Also create platform specific sections for any deps that need install. For example if you need libpng:
-
-```yml
-- if [ $(uname -s) == 'Linux' ]; then apt-get install libpng-dev; fi;
-- if [ $(uname -s) == 'Darwin' ]; then brew install libpng; fi;
-```
-
-For detailed multi-OS examples see [node-mapnik](https://github.com/mapnik/node-mapnik/blob/master/.travis.yml) and [node-sqlite3](https://github.com/mapbox/node-sqlite3/blob/master/.travis.yml).
-
-##### Travis OS X Gotchas
-
-First, unlike the Travis Linux machines, the OS X machines do not put `node-pre-gyp` on PATH by default. To do so you will need to:
-
-```sh
-export PATH=$(pwd)/node_modules/.bin:${PATH}
-```
-
-Second, the OS X machines do not support using a matrix for installing different Node.js versions. So you need to bootstrap the installation of Node.js in a cross platform way.
-
-By doing:
-
-```yml
-env:
-  matrix:
-    - NODE_VERSION="4"
-    - NODE_VERSION="6"
-
-before_install:
- - rm -rf ~/.nvm/ && git clone --depth 1 https://github.com/creationix/nvm.git ~/.nvm
- - source ~/.nvm/nvm.sh
- - nvm install $NODE_VERSION
- - nvm use $NODE_VERSION
-```
-
-You can easily recreate the previous behavior of this matrix:
-
-```yml
-node_js:
-  - "4"
-  - "6"
-```
-
-#### 4) Publish when you want
-
-You might wish to publish binaries only on a specific commit. To do this you could borrow from the [Travis CI idea of commit keywords](http://about.travis-ci.org/docs/user/how-to-skip-a-build/) and add special handling for commit messages with `[publish binary]`:
-
-    COMMIT_MESSAGE=$(git log --format=%B --no-merges -n 1 | tr -d '\n')
-    if [[ ${COMMIT_MESSAGE} =~ "[publish binary]" ]]; then node-pre-gyp publish; fi;
-
-Then you can trigger new binaries to be built like:
-
-    git commit -a -m "[publish binary]"
-
-Or, if you don't have any changes to make simply run:
-
-    git commit --allow-empty -m "[publish binary]"
-
-WARNING: if you are working in a pull request and publishing binaries from there then you will want to avoid double publishing when Travis CI builds both the `push` and `pr`. You only want to run the publish on the `push` commit. See https://github.com/Project-OSRM/node-osrm/blob/8eb837abe2e2e30e595093d16e5354bc5c573575/scripts/is_pr_merge.sh which is called from https://github.com/Project-OSRM/node-osrm/blob/8eb837abe2e2e30e595093d16e5354bc5c573575/scripts/publish.sh for an example of how to do this.
-
-Remember this publishing is not the same as `npm publish`. We're just talking about the binary module here and not your entire npm package. To automate the publishing of your entire package to npm on Travis see http://about.travis-ci.org/docs/user/deployment/npm/
-
-# Versioning
-
-The `binary` properties of `module_path`, `remote_path`, and `package_name` support variable substitution. The strings are evaluated by `node-pre-gyp` depending on your system and any custom build flags you passed.
-
- - `node_abi`: The node C++ `ABI` number. This value is available in Javascript as `process.versions.modules` as of [`>= v0.10.4 >= v0.11.7`](https://github.com/joyent/node/commit/ccabd4a6fa8a6eb79d29bc3bbe9fe2b6531c2d8e) and in C++ as the `NODE_MODULE_VERSION` define much earlier. For versions of Node before this was available we fallback to the V8 major and minor version.
- - `platform` matches node's `process.platform` like `linux`, `darwin`, and `win32` unless the user passed the `--target_platform` option to override.
- - `arch` matches node's `process.arch` like `x64` or `ia32` unless the user passes the `--target_arch` option to override.
- - `libc` matches `require('detect-libc').family` like `glibc` or `musl` unless the user passes the `--target_libc` option to override.
- - `configuration` - Either 'Release' or 'Debug' depending on if `--debug` is passed during the build.
- - `module_name` - the `binary.module_name` attribute from `package.json`.
- - `version` - the semver `version` value for your module from `package.json` (NOTE: ignores the `semver.build` property).
- - `major`, `minor`, `patch`, and `prelease` match the individual semver values for your module's `version`
- - `build` - the sevmer `build` value. For example it would be `this.that` if your package.json `version` was `v1.0.0+this.that`
- - `prerelease` - the semver `prerelease` value. For example it would be `alpha.beta` if your package.json `version` was `v1.0.0-alpha.beta`
-
-
-The options are visible in the code at <https://github.com/mapbox/node-pre-gyp/blob/612b7bca2604508d881e1187614870ba19a7f0c5/lib/util/versioning.js#L114-L127>
-
-# Download binary files from a mirror
-
-S3 is broken in China for the well known reason.
-
-Using the `npm` config argument: `--{module_name}_binary_host_mirror` can download binary files through a mirror, `-` in `module_name` will be replaced with `_`.
-
-e.g.: Install [v8-profiler](https://www.npmjs.com/package/v8-profiler) from `npm`.
-
-```bash
-$ npm install v8-profiler --profiler_binary_host_mirror=https://npm.taobao.org/mirrors/node-inspector/
-```
-
-e.g.: Install [canvas-prebuilt](https://www.npmjs.com/package/canvas-prebuilt) from `npm`.
-
-```bash
-$ npm install canvas-prebuilt --canvas_prebuilt_binary_host_mirror=https://npm.taobao.org/mirrors/canvas-prebuilt/
-```

+ 0 - 4
rag-server/node_modules/@mapbox/node-pre-gyp/bin/node-pre-gyp

@@ -1,4 +0,0 @@
-#!/usr/bin/env node
-'use strict';
-
-require('../lib/main');

+ 0 - 2
rag-server/node_modules/@mapbox/node-pre-gyp/bin/node-pre-gyp.cmd

@@ -1,2 +0,0 @@
-@echo off
-node  "%~dp0\node-pre-gyp" %*

+ 0 - 10
rag-server/node_modules/@mapbox/node-pre-gyp/contributing.md

@@ -1,10 +0,0 @@
-# Contributing
-
-
-### Releasing a new version:
-
-- Ensure tests are passing on travis and appveyor
-- Run `node scripts/abi_crosswalk.js` and commit any changes
-- Update the changelog
-- Tag a new release like: `git tag -a v0.6.34 -m "tagging v0.6.34" && git push --tags`
-- Run `npm publish`

+ 0 - 51
rag-server/node_modules/@mapbox/node-pre-gyp/lib/build.js

@@ -1,51 +0,0 @@
-'use strict';
-
-module.exports = exports = build;
-
-exports.usage = 'Attempts to compile the module by dispatching to node-gyp or nw-gyp';
-
-const napi = require('./util/napi.js');
-const compile = require('./util/compile.js');
-const handle_gyp_opts = require('./util/handle_gyp_opts.js');
-const configure = require('./configure.js');
-
-function do_build(gyp, argv, callback) {
-  handle_gyp_opts(gyp, argv, (err, result) => {
-    let final_args = ['build'].concat(result.gyp).concat(result.pre);
-    if (result.unparsed.length > 0) {
-      final_args = final_args.
-        concat(['--']).
-        concat(result.unparsed);
-    }
-    if (!err && result.opts.napi_build_version) {
-      napi.swap_build_dir_in(result.opts.napi_build_version);
-    }
-    compile.run_gyp(final_args, result.opts, (err2) => {
-      if (result.opts.napi_build_version) {
-        napi.swap_build_dir_out(result.opts.napi_build_version);
-      }
-      return callback(err2);
-    });
-  });
-}
-
-function build(gyp, argv, callback) {
-
-  // Form up commands to pass to node-gyp:
-  // We map `node-pre-gyp build` to `node-gyp configure build` so that we do not
-  // trigger a clean and therefore do not pay the penalty of a full recompile
-  if (argv.length && (argv.indexOf('rebuild') > -1)) {
-    argv.shift(); // remove `rebuild`
-    // here we map `node-pre-gyp rebuild` to `node-gyp rebuild` which internally means
-    // "clean + configure + build" and triggers a full recompile
-    compile.run_gyp(['clean'], {}, (err3) => {
-      if (err3) return callback(err3);
-      configure(gyp, argv, (err4) => {
-        if (err4) return callback(err4);
-        return do_build(gyp, argv, callback);
-      });
-    });
-  } else {
-    return do_build(gyp, argv, callback);
-  }
-}

+ 0 - 31
rag-server/node_modules/@mapbox/node-pre-gyp/lib/clean.js

@@ -1,31 +0,0 @@
-'use strict';
-
-module.exports = exports = clean;
-
-exports.usage = 'Removes the entire folder containing the compiled .node module';
-
-const rm = require('rimraf');
-const exists = require('fs').exists || require('path').exists;
-const versioning = require('./util/versioning.js');
-const napi = require('./util/napi.js');
-const path = require('path');
-
-function clean(gyp, argv, callback) {
-  const package_json = gyp.package_json;
-  const napi_build_version = napi.get_napi_build_version_from_command_args(argv);
-  const opts = versioning.evaluate(package_json, gyp.opts, napi_build_version);
-  const to_delete = opts.module_path;
-  if (!to_delete) {
-    return callback(new Error('module_path is empty, refusing to delete'));
-  } else if (path.normalize(to_delete) === path.normalize(process.cwd())) {
-    return callback(new Error('module_path is not set, refusing to delete'));
-  } else {
-    exists(to_delete, (found) => {
-      if (found) {
-        if (!gyp.opts.silent_clean) console.log('[' + package_json.name + '] Removing "%s"', to_delete);
-        return rm(to_delete, callback);
-      }
-      return callback();
-    });
-  }
-}

+ 0 - 52
rag-server/node_modules/@mapbox/node-pre-gyp/lib/configure.js

@@ -1,52 +0,0 @@
-'use strict';
-
-module.exports = exports = configure;
-
-exports.usage = 'Attempts to configure node-gyp or nw-gyp build';
-
-const napi = require('./util/napi.js');
-const compile = require('./util/compile.js');
-const handle_gyp_opts = require('./util/handle_gyp_opts.js');
-
-function configure(gyp, argv, callback) {
-  handle_gyp_opts(gyp, argv, (err, result) => {
-    let final_args = result.gyp.concat(result.pre);
-    // pull select node-gyp configure options out of the npm environ
-    const known_gyp_args = ['dist-url', 'python', 'nodedir', 'msvs_version'];
-    known_gyp_args.forEach((key) => {
-      const val = gyp.opts[key] || gyp.opts[key.replace('-', '_')];
-      if (val) {
-        final_args.push('--' + key + '=' + val);
-      }
-    });
-    // --ensure=false tell node-gyp to re-install node development headers
-    // but it is only respected by node-gyp install, so we have to call install
-    // as a separate step if the user passes it
-    if (gyp.opts.ensure === false) {
-      const install_args = final_args.concat(['install', '--ensure=false']);
-      compile.run_gyp(install_args, result.opts, (err2) => {
-        if (err2) return callback(err2);
-        if (result.unparsed.length > 0) {
-          final_args = final_args.
-            concat(['--']).
-            concat(result.unparsed);
-        }
-        compile.run_gyp(['configure'].concat(final_args), result.opts, (err3) => {
-          return callback(err3);
-        });
-      });
-    } else {
-      if (result.unparsed.length > 0) {
-        final_args = final_args.
-          concat(['--']).
-          concat(result.unparsed);
-      }
-      compile.run_gyp(['configure'].concat(final_args), result.opts, (err4) => {
-        if (!err4 && result.opts.napi_build_version) {
-          napi.swap_build_dir_out(result.opts.napi_build_version);
-        }
-        return callback(err4);
-      });
-    }
-  });
-}

+ 0 - 38
rag-server/node_modules/@mapbox/node-pre-gyp/lib/info.js

@@ -1,38 +0,0 @@
-'use strict';
-
-module.exports = exports = info;
-
-exports.usage = 'Lists all published binaries (requires aws-sdk)';
-
-const log = require('npmlog');
-const versioning = require('./util/versioning.js');
-const s3_setup = require('./util/s3_setup.js');
-
-function info(gyp, argv, callback) {
-  const package_json = gyp.package_json;
-  const opts = versioning.evaluate(package_json, gyp.opts);
-  const config = {};
-  s3_setup.detect(opts, config);
-  const s3 = s3_setup.get_s3(config);
-  const s3_opts = {
-    Bucket: config.bucket,
-    Prefix: config.prefix
-  };
-  s3.listObjects(s3_opts, (err, meta) => {
-    if (err && err.code === 'NotFound') {
-      return callback(new Error('[' + package_json.name + '] Not found: https://' + s3_opts.Bucket + '.s3.amazonaws.com/' + config.prefix));
-    } else if (err) {
-      return callback(err);
-    } else {
-      log.verbose(JSON.stringify(meta, null, 1));
-      if (meta && meta.Contents) {
-        meta.Contents.forEach((obj) => {
-          console.log(obj.Key);
-        });
-      } else {
-        console.error('[' + package_json.name + '] No objects found at https://' + s3_opts.Bucket + '.s3.amazonaws.com/' + config.prefix);
-      }
-      return callback();
-    }
-  });
-}

+ 0 - 235
rag-server/node_modules/@mapbox/node-pre-gyp/lib/install.js

@@ -1,235 +0,0 @@
-'use strict';
-
-module.exports = exports = install;
-
-exports.usage = 'Attempts to install pre-built binary for module';
-
-const fs = require('fs');
-const path = require('path');
-const log = require('npmlog');
-const existsAsync = fs.exists || path.exists;
-const versioning = require('./util/versioning.js');
-const napi = require('./util/napi.js');
-const makeDir = require('make-dir');
-// for fetching binaries
-const fetch = require('node-fetch');
-const tar = require('tar');
-
-let npgVersion = 'unknown';
-try {
-  // Read own package.json to get the current node-pre-pyp version.
-  const ownPackageJSON = fs.readFileSync(path.join(__dirname, '..', 'package.json'), 'utf8');
-  npgVersion = JSON.parse(ownPackageJSON).version;
-} catch (e) {
-  // do nothing
-}
-
-function place_binary(uri, targetDir, opts, callback) {
-  log.http('GET', uri);
-
-  // Try getting version info from the currently running npm.
-  const envVersionInfo = process.env.npm_config_user_agent ||
-        'node ' + process.version;
-
-  const sanitized = uri.replace('+', '%2B');
-  const requestOpts = {
-    uri: sanitized,
-    headers: {
-      'User-Agent': 'node-pre-gyp (v' + npgVersion + ', ' + envVersionInfo + ')'
-    },
-    follow_max: 10
-  };
-
-  if (opts.cafile) {
-    try {
-      requestOpts.ca = fs.readFileSync(opts.cafile);
-    } catch (e) {
-      return callback(e);
-    }
-  } else if (opts.ca) {
-    requestOpts.ca = opts.ca;
-  }
-
-  const proxyUrl = opts.proxy ||
-                    process.env.http_proxy ||
-                    process.env.HTTP_PROXY ||
-                    process.env.npm_config_proxy;
-  let agent;
-  if (proxyUrl) {
-    const ProxyAgent = require('https-proxy-agent');
-    agent = new ProxyAgent(proxyUrl);
-    log.http('download', 'proxy agent configured using: "%s"', proxyUrl);
-  }
-
-  fetch(sanitized, { agent })
-    .then((res) => {
-      if (!res.ok) {
-        throw new Error(`response status ${res.status} ${res.statusText} on ${sanitized}`);
-      }
-      const dataStream = res.body;
-
-      return new Promise((resolve, reject) => {
-        let extractions = 0;
-        const countExtractions = (entry) => {
-          extractions += 1;
-          log.info('install', 'unpacking %s', entry.path);
-        };
-
-        dataStream.pipe(extract(targetDir, countExtractions))
-          .on('error', (e) => {
-            reject(e);
-          });
-        dataStream.on('end', () => {
-          resolve(`extracted file count: ${extractions}`);
-        });
-        dataStream.on('error', (e) => {
-          reject(e);
-        });
-      });
-    })
-    .then((text) => {
-      log.info(text);
-      callback();
-    })
-    .catch((e) => {
-      log.error(`install ${e.message}`);
-      callback(e);
-    });
-}
-
-function extract(to, onentry) {
-  return tar.extract({
-    cwd: to,
-    strip: 1,
-    onentry
-  });
-}
-
-function extract_from_local(from, targetDir, callback) {
-  if (!fs.existsSync(from)) {
-    return callback(new Error('Cannot find file ' + from));
-  }
-  log.info('Found local file to extract from ' + from);
-
-  // extract helpers
-  let extractCount = 0;
-  function countExtractions(entry) {
-    extractCount += 1;
-    log.info('install', 'unpacking ' + entry.path);
-  }
-  function afterExtract(err) {
-    if (err) return callback(err);
-    if (extractCount === 0) {
-      return callback(new Error('There was a fatal problem while extracting the tarball'));
-    }
-    log.info('tarball', 'done parsing tarball');
-    callback();
-  }
-
-  fs.createReadStream(from).pipe(extract(targetDir, countExtractions))
-    .on('close', afterExtract)
-    .on('error', afterExtract);
-}
-
-function do_build(gyp, argv, callback) {
-  const args = ['rebuild'].concat(argv);
-  gyp.todo.push({ name: 'build', args: args });
-  process.nextTick(callback);
-}
-
-function print_fallback_error(err, opts, package_json) {
-  const fallback_message = ' (falling back to source compile with node-gyp)';
-  let full_message = '';
-  if (err.statusCode !== undefined) {
-    // If we got a network response it but failed to download
-    // it means remote binaries are not available, so let's try to help
-    // the user/developer with the info to debug why
-    full_message = 'Pre-built binaries not found for ' + package_json.name + '@' + package_json.version;
-    full_message += ' and ' + opts.runtime + '@' + (opts.target || process.versions.node) + ' (' + opts.node_abi + ' ABI, ' + opts.libc + ')';
-    full_message += fallback_message;
-    log.warn('Tried to download(' + err.statusCode + '): ' + opts.hosted_tarball);
-    log.warn(full_message);
-    log.http(err.message);
-  } else {
-    // If we do not have a statusCode that means an unexpected error
-    // happened and prevented an http response, so we output the exact error
-    full_message = 'Pre-built binaries not installable for ' + package_json.name + '@' + package_json.version;
-    full_message += ' and ' + opts.runtime + '@' + (opts.target || process.versions.node) + ' (' + opts.node_abi + ' ABI, ' + opts.libc + ')';
-    full_message += fallback_message;
-    log.warn(full_message);
-    log.warn('Hit error ' + err.message);
-  }
-}
-
-//
-// install
-//
-function install(gyp, argv, callback) {
-  const package_json = gyp.package_json;
-  const napi_build_version = napi.get_napi_build_version_from_command_args(argv);
-  const source_build = gyp.opts['build-from-source'] || gyp.opts.build_from_source;
-  const update_binary = gyp.opts['update-binary'] || gyp.opts.update_binary;
-  const should_do_source_build = source_build === package_json.name || (source_build === true || source_build === 'true');
-  if (should_do_source_build) {
-    log.info('build', 'requesting source compile');
-    return do_build(gyp, argv, callback);
-  } else {
-    const fallback_to_build = gyp.opts['fallback-to-build'] || gyp.opts.fallback_to_build;
-    let should_do_fallback_build = fallback_to_build === package_json.name || (fallback_to_build === true || fallback_to_build === 'true');
-    // but allow override from npm
-    if (process.env.npm_config_argv) {
-      const cooked = JSON.parse(process.env.npm_config_argv).cooked;
-      const match = cooked.indexOf('--fallback-to-build');
-      if (match > -1 && cooked.length > match && cooked[match + 1] === 'false') {
-        should_do_fallback_build = false;
-        log.info('install', 'Build fallback disabled via npm flag: --fallback-to-build=false');
-      }
-    }
-    let opts;
-    try {
-      opts = versioning.evaluate(package_json, gyp.opts, napi_build_version);
-    } catch (err) {
-      return callback(err);
-    }
-
-    opts.ca = gyp.opts.ca;
-    opts.cafile = gyp.opts.cafile;
-
-    const from = opts.hosted_tarball;
-    const to = opts.module_path;
-    const binary_module = path.join(to, opts.module_name + '.node');
-    existsAsync(binary_module, (found) => {
-      if (!update_binary) {
-        if (found) {
-          console.log('[' + package_json.name + '] Success: "' + binary_module + '" already installed');
-          console.log('Pass --update-binary to reinstall or --build-from-source to recompile');
-          return callback();
-        }
-        log.info('check', 'checked for "' + binary_module + '" (not found)');
-      }
-
-      makeDir(to).then(() => {
-        const fileName = from.startsWith('file://') && from.slice('file://'.length);
-        if (fileName) {
-          extract_from_local(fileName, to, after_place);
-        } else {
-          place_binary(from, to, opts, after_place);
-        }
-      }).catch((err) => {
-        after_place(err);
-      });
-
-      function after_place(err) {
-        if (err && should_do_fallback_build) {
-          print_fallback_error(err, opts, package_json);
-          return do_build(gyp, argv, callback);
-        } else if (err) {
-          return callback(err);
-        } else {
-          console.log('[' + package_json.name + '] Success: "' + binary_module + '" is installed via remote');
-          return callback();
-        }
-      }
-    });
-  }
-}

+ 0 - 125
rag-server/node_modules/@mapbox/node-pre-gyp/lib/main.js

@@ -1,125 +0,0 @@
-'use strict';
-
-/**
- * Set the title.
- */
-
-process.title = 'node-pre-gyp';
-
-const node_pre_gyp = require('../');
-const log = require('npmlog');
-
-/**
- * Process and execute the selected commands.
- */
-
-const prog = new node_pre_gyp.Run({ argv: process.argv });
-let completed = false;
-
-if (prog.todo.length === 0) {
-  if (~process.argv.indexOf('-v') || ~process.argv.indexOf('--version')) {
-    console.log('v%s', prog.version);
-    process.exit(0);
-  } else if (~process.argv.indexOf('-h') || ~process.argv.indexOf('--help')) {
-    console.log('%s', prog.usage());
-    process.exit(0);
-  }
-  console.log('%s', prog.usage());
-  process.exit(1);
-}
-
-// if --no-color is passed
-if (prog.opts && Object.hasOwnProperty.call(prog, 'color') && !prog.opts.color) {
-  log.disableColor();
-}
-
-log.info('it worked if it ends with', 'ok');
-log.verbose('cli', process.argv);
-log.info('using', process.title + '@%s', prog.version);
-log.info('using', 'node@%s | %s | %s', process.versions.node, process.platform, process.arch);
-
-
-/**
- * Change dir if -C/--directory was passed.
- */
-
-const dir = prog.opts.directory;
-if (dir) {
-  const fs = require('fs');
-  try {
-    const stat = fs.statSync(dir);
-    if (stat.isDirectory()) {
-      log.info('chdir', dir);
-      process.chdir(dir);
-    } else {
-      log.warn('chdir', dir + ' is not a directory');
-    }
-  } catch (e) {
-    if (e.code === 'ENOENT') {
-      log.warn('chdir', dir + ' is not a directory');
-    } else {
-      log.warn('chdir', 'error during chdir() "%s"', e.message);
-    }
-  }
-}
-
-function run() {
-  const command = prog.todo.shift();
-  if (!command) {
-    // done!
-    completed = true;
-    log.info('ok');
-    return;
-  }
-
-  // set binary.host when appropriate. host determines the s3 target bucket.
-  const target = prog.setBinaryHostProperty(command.name);
-  if (target && ['install', 'publish', 'unpublish', 'info'].indexOf(command.name) >= 0) {
-    log.info('using binary.host: ' + prog.package_json.binary.host);
-  }
-
-  prog.commands[command.name](command.args, function(err) {
-    if (err) {
-      log.error(command.name + ' error');
-      log.error('stack', err.stack);
-      errorMessage();
-      log.error('not ok');
-      console.log(err.message);
-      return process.exit(1);
-    }
-    const args_array = [].slice.call(arguments, 1);
-    if (args_array.length) {
-      console.log.apply(console, args_array);
-    }
-    // now run the next command in the queue
-    process.nextTick(run);
-  });
-}
-
-process.on('exit', (code) => {
-  if (!completed && !code) {
-    log.error('Completion callback never invoked!');
-    errorMessage();
-    process.exit(6);
-  }
-});
-
-process.on('uncaughtException', (err) => {
-  log.error('UNCAUGHT EXCEPTION');
-  log.error('stack', err.stack);
-  errorMessage();
-  process.exit(7);
-});
-
-function errorMessage() {
-  // copied from npm's lib/util/error-handler.js
-  const os = require('os');
-  log.error('System', os.type() + ' ' + os.release());
-  log.error('command', process.argv.map(JSON.stringify).join(' '));
-  log.error('cwd', process.cwd());
-  log.error('node -v', process.version);
-  log.error(process.title + ' -v', 'v' + prog.package.version);
-}
-
-// start running the given commands!
-run();

+ 0 - 309
rag-server/node_modules/@mapbox/node-pre-gyp/lib/node-pre-gyp.js

@@ -1,309 +0,0 @@
-'use strict';
-
-/**
- * Module exports.
- */
-
-module.exports = exports;
-
-/**
- * Module dependencies.
- */
-
-// load mocking control function for accessing s3 via https. the function is a noop always returning
-// false if not mocking.
-exports.mockS3Http = require('./util/s3_setup').get_mockS3Http();
-exports.mockS3Http('on');
-const mocking = exports.mockS3Http('get');
-
-
-const fs = require('fs');
-const path = require('path');
-const nopt = require('nopt');
-const log = require('npmlog');
-log.disableProgress();
-const napi = require('./util/napi.js');
-
-const EE = require('events').EventEmitter;
-const inherits = require('util').inherits;
-const cli_commands = [
-  'clean',
-  'install',
-  'reinstall',
-  'build',
-  'rebuild',
-  'package',
-  'testpackage',
-  'publish',
-  'unpublish',
-  'info',
-  'testbinary',
-  'reveal',
-  'configure'
-];
-const aliases = {};
-
-// differentiate node-pre-gyp's logs from npm's
-log.heading = 'node-pre-gyp';
-
-if (mocking) {
-  log.warn(`mocking s3 to ${process.env.node_pre_gyp_mock_s3}`);
-}
-
-// this is a getter to avoid circular reference warnings with node v14.
-Object.defineProperty(exports, 'find', {
-  get: function() {
-    return require('./pre-binding').find;
-  },
-  enumerable: true
-});
-
-// in the following, "my_module" is using node-pre-gyp to
-// prebuild and install pre-built binaries. "main_module"
-// is using "my_module".
-//
-// "bin/node-pre-gyp" invokes Run() without a path. the
-// expectation is that the working directory is the package
-// root "my_module". this is true because in all cases npm is
-// executing a script in the context of "my_module".
-//
-// "pre-binding.find()" is executed by "my_module" but in the
-// context of "main_module". this is because "main_module" is
-// executing and requires "my_module" which is then executing
-// "pre-binding.find()" via "node-pre-gyp.find()", so the working
-// directory is that of "main_module".
-//
-// that's why "find()" must pass the path to package.json.
-//
-function Run({ package_json_path = './package.json', argv }) {
-  this.package_json_path = package_json_path;
-  this.commands = {};
-
-  const self = this;
-  cli_commands.forEach((command) => {
-    self.commands[command] = function(argvx, callback) {
-      log.verbose('command', command, argvx);
-      return require('./' + command)(self, argvx, callback);
-    };
-  });
-
-  this.parseArgv(argv);
-
-  // this is set to true after the binary.host property was set to
-  // either staging_host or production_host.
-  this.binaryHostSet = false;
-}
-inherits(Run, EE);
-exports.Run = Run;
-const proto = Run.prototype;
-
-/**
- * Export the contents of the package.json.
- */
-
-proto.package = require('../package.json');
-
-/**
- * nopt configuration definitions
- */
-
-proto.configDefs = {
-  help: Boolean,     // everywhere
-  arch: String,      // 'configure'
-  debug: Boolean,    // 'build'
-  directory: String, // bin
-  proxy: String,     // 'install'
-  loglevel: String  // everywhere
-};
-
-/**
- * nopt shorthands
- */
-
-proto.shorthands = {
-  release: '--no-debug',
-  C: '--directory',
-  debug: '--debug',
-  j: '--jobs',
-  silent: '--loglevel=silent',
-  silly: '--loglevel=silly',
-  verbose: '--loglevel=verbose'
-};
-
-/**
- * expose the command aliases for the bin file to use.
- */
-
-proto.aliases = aliases;
-
-/**
- * Parses the given argv array and sets the 'opts', 'argv',
- * 'command', and 'package_json' properties.
- */
-
-proto.parseArgv = function parseOpts(argv) {
-  this.opts = nopt(this.configDefs, this.shorthands, argv);
-  this.argv = this.opts.argv.remain.slice();
-  const commands = this.todo = [];
-
-  // create a copy of the argv array with aliases mapped
-  argv = this.argv.map((arg) => {
-    // is this an alias?
-    if (arg in this.aliases) {
-      arg = this.aliases[arg];
-    }
-    return arg;
-  });
-
-  // process the mapped args into "command" objects ("name" and "args" props)
-  argv.slice().forEach((arg) => {
-    if (arg in this.commands) {
-      const args = argv.splice(0, argv.indexOf(arg));
-      argv.shift();
-      if (commands.length > 0) {
-        commands[commands.length - 1].args = args;
-      }
-      commands.push({ name: arg, args: [] });
-    }
-  });
-  if (commands.length > 0) {
-    commands[commands.length - 1].args = argv.splice(0);
-  }
-
-
-  // if a directory was specified package.json is assumed to be relative
-  // to it.
-  let package_json_path = this.package_json_path;
-  if (this.opts.directory) {
-    package_json_path = path.join(this.opts.directory, package_json_path);
-  }
-
-  this.package_json = JSON.parse(fs.readFileSync(package_json_path));
-
-  // expand commands entries for multiple napi builds
-  this.todo = napi.expand_commands(this.package_json, this.opts, commands);
-
-  // support for inheriting config env variables from npm
-  const npm_config_prefix = 'npm_config_';
-  Object.keys(process.env).forEach((name) => {
-    if (name.indexOf(npm_config_prefix) !== 0) return;
-    const val = process.env[name];
-    if (name === npm_config_prefix + 'loglevel') {
-      log.level = val;
-    } else {
-      // add the user-defined options to the config
-      name = name.substring(npm_config_prefix.length);
-      // avoid npm argv clobber already present args
-      // which avoids problem of 'npm test' calling
-      // script that runs unique npm install commands
-      if (name === 'argv') {
-        if (this.opts.argv &&
-             this.opts.argv.remain &&
-             this.opts.argv.remain.length) {
-          // do nothing
-        } else {
-          this.opts[name] = val;
-        }
-      } else {
-        this.opts[name] = val;
-      }
-    }
-  });
-
-  if (this.opts.loglevel) {
-    log.level = this.opts.loglevel;
-  }
-  log.resume();
-};
-
-/**
- * allow the binary.host property to be set at execution time.
- *
- * for this to take effect requires all the following to be true.
- * - binary is a property in package.json
- * - binary.host is falsey
- * - binary.staging_host is not empty
- * - binary.production_host is not empty
- *
- * if any of the previous checks fail then the function returns an empty string
- * and makes no changes to package.json's binary property.
- *
- *
- * if command is "publish" then the default is set to "binary.staging_host"
- * if command is not "publish" the the default is set to "binary.production_host"
- *
- * if the command-line option '--s3_host' is set to "staging" or "production" then
- * "binary.host" is set to the specified "staging_host" or "production_host". if
- * '--s3_host' is any other value an exception is thrown.
- *
- * if '--s3_host' is not present then "binary.host" is set to the default as above.
- *
- * this strategy was chosen so that any command other than "publish" or "unpublish" uses "production"
- * as the default without requiring any command-line options but that "publish" and "unpublish" require
- * '--s3_host production_host' to be specified in order to *really* publish (or unpublish). publishing
- * to staging can be done freely without worrying about disturbing any production releases.
- */
-proto.setBinaryHostProperty = function(command) {
-  if (this.binaryHostSet) {
-    return this.package_json.binary.host;
-  }
-  const p = this.package_json;
-  // don't set anything if host is present. it must be left blank to trigger this.
-  if (!p || !p.binary || p.binary.host) {
-    return '';
-  }
-  // and both staging and production must be present. errors will be reported later.
-  if (!p.binary.staging_host || !p.binary.production_host) {
-    return '';
-  }
-  let target = 'production_host';
-  if (command === 'publish' || command === 'unpublish') {
-    target = 'staging_host';
-  }
-  // the environment variable has priority over the default or the command line. if
-  // either the env var or the command line option are invalid throw an error.
-  const npg_s3_host = process.env.node_pre_gyp_s3_host;
-  if (npg_s3_host === 'staging' || npg_s3_host === 'production') {
-    target = `${npg_s3_host}_host`;
-  } else if (this.opts['s3_host'] === 'staging' || this.opts['s3_host'] === 'production') {
-    target = `${this.opts['s3_host']}_host`;
-  } else if (this.opts['s3_host'] || npg_s3_host) {
-    throw new Error(`invalid s3_host ${this.opts['s3_host'] || npg_s3_host}`);
-  }
-
-  p.binary.host = p.binary[target];
-  this.binaryHostSet = true;
-
-  return p.binary.host;
-};
-
-/**
- * Returns the usage instructions for node-pre-gyp.
- */
-
-proto.usage = function usage() {
-  const str = [
-    '',
-    '  Usage: node-pre-gyp <command> [options]',
-    '',
-    '  where <command> is one of:',
-    cli_commands.map((c) => {
-      return '    - ' + c + ' - ' + require('./' + c).usage;
-    }).join('\n'),
-    '',
-    'node-pre-gyp@' + this.version + '  ' + path.resolve(__dirname, '..'),
-    'node@' + process.versions.node
-  ].join('\n');
-  return str;
-};
-
-/**
- * Version number getter.
- */
-
-Object.defineProperty(proto, 'version', {
-  get: function() {
-    return this.package.version;
-  },
-  enumerable: true
-});

+ 0 - 73
rag-server/node_modules/@mapbox/node-pre-gyp/lib/package.js

@@ -1,73 +0,0 @@
-'use strict';
-
-module.exports = exports = _package;
-
-exports.usage = 'Packs binary (and enclosing directory) into locally staged tarball';
-
-const fs = require('fs');
-const path = require('path');
-const log = require('npmlog');
-const versioning = require('./util/versioning.js');
-const napi = require('./util/napi.js');
-const existsAsync = fs.exists || path.exists;
-const makeDir = require('make-dir');
-const tar = require('tar');
-
-function readdirSync(dir) {
-  let list = [];
-  const files = fs.readdirSync(dir);
-
-  files.forEach((file) => {
-    const stats = fs.lstatSync(path.join(dir, file));
-    if (stats.isDirectory()) {
-      list = list.concat(readdirSync(path.join(dir, file)));
-    } else {
-      list.push(path.join(dir, file));
-    }
-  });
-  return list;
-}
-
-function _package(gyp, argv, callback) {
-  const package_json = gyp.package_json;
-  const napi_build_version = napi.get_napi_build_version_from_command_args(argv);
-  const opts = versioning.evaluate(package_json, gyp.opts, napi_build_version);
-  const from = opts.module_path;
-  const binary_module = path.join(from, opts.module_name + '.node');
-  existsAsync(binary_module, (found) => {
-    if (!found) {
-      return callback(new Error('Cannot package because ' + binary_module + ' missing: run `node-pre-gyp rebuild` first'));
-    }
-    const tarball = opts.staged_tarball;
-    const filter_func = function(entry) {
-      const basename = path.basename(entry);
-      if (basename.length && basename[0] !== '.') {
-        console.log('packing ' + entry);
-        return true;
-      } else {
-        console.log('skipping ' + entry);
-      }
-      return false;
-    };
-    makeDir(path.dirname(tarball)).then(() => {
-      let files = readdirSync(from);
-      const base = path.basename(from);
-      files = files.map((file) => {
-        return path.join(base, path.relative(from, file));
-      });
-      tar.create({
-        portable: false,
-        gzip: true,
-        filter: filter_func,
-        file: tarball,
-        cwd: path.dirname(from)
-      }, files, (err2) => {
-        if (err2)  console.error('[' + package_json.name + '] ' + err2.message);
-        else log.info('package', 'Binary staged at "' + tarball + '"');
-        return callback(err2);
-      });
-    }).catch((err) => {
-      return callback(err);
-    });
-  });
-}

+ 0 - 34
rag-server/node_modules/@mapbox/node-pre-gyp/lib/pre-binding.js

@@ -1,34 +0,0 @@
-'use strict';
-
-const npg = require('..');
-const versioning = require('../lib/util/versioning.js');
-const napi = require('../lib/util/napi.js');
-const existsSync = require('fs').existsSync || require('path').existsSync;
-const path = require('path');
-
-module.exports = exports;
-
-exports.usage = 'Finds the require path for the node-pre-gyp installed module';
-
-exports.validate = function(package_json, opts) {
-  versioning.validate_config(package_json, opts);
-};
-
-exports.find = function(package_json_path, opts) {
-  if (!existsSync(package_json_path)) {
-    throw new Error(package_json_path + 'does not exist');
-  }
-  const prog = new npg.Run({ package_json_path, argv: process.argv });
-  prog.setBinaryHostProperty();
-  const package_json = prog.package_json;
-
-  versioning.validate_config(package_json, opts);
-  let napi_build_version;
-  if (napi.get_napi_build_versions(package_json, opts)) {
-    napi_build_version = napi.get_best_napi_build_version(package_json, opts);
-  }
-  opts = opts || {};
-  if (!opts.module_root) opts.module_root = path.dirname(package_json_path);
-  const meta = versioning.evaluate(package_json, opts, napi_build_version);
-  return meta.module;
-};

+ 0 - 81
rag-server/node_modules/@mapbox/node-pre-gyp/lib/publish.js

@@ -1,81 +0,0 @@
-'use strict';
-
-module.exports = exports = publish;
-
-exports.usage = 'Publishes pre-built binary (requires aws-sdk)';
-
-const fs = require('fs');
-const path = require('path');
-const log = require('npmlog');
-const versioning = require('./util/versioning.js');
-const napi = require('./util/napi.js');
-const s3_setup = require('./util/s3_setup.js');
-const existsAsync = fs.exists || path.exists;
-const url = require('url');
-
-function publish(gyp, argv, callback) {
-  const package_json = gyp.package_json;
-  const napi_build_version = napi.get_napi_build_version_from_command_args(argv);
-  const opts = versioning.evaluate(package_json, gyp.opts, napi_build_version);
-  const tarball = opts.staged_tarball;
-  existsAsync(tarball, (found) => {
-    if (!found) {
-      return callback(new Error('Cannot publish because ' + tarball + ' missing: run `node-pre-gyp package` first'));
-    }
-
-    log.info('publish', 'Detecting s3 credentials');
-    const config = {};
-    s3_setup.detect(opts, config);
-    const s3 = s3_setup.get_s3(config);
-
-    const key_name = url.resolve(config.prefix, opts.package_name);
-    const s3_opts = {
-      Bucket: config.bucket,
-      Key: key_name
-    };
-    log.info('publish', 'Authenticating with s3');
-    log.info('publish', config);
-
-    log.info('publish', 'Checking for existing binary at ' + opts.hosted_path);
-    s3.headObject(s3_opts, (err, meta) => {
-      if (meta) log.info('publish', JSON.stringify(meta));
-      if (err && err.code === 'NotFound') {
-        // we are safe to publish because
-        // the object does not already exist
-        log.info('publish', 'Preparing to put object');
-        const s3_put_opts = {
-          ACL: 'public-read',
-          Body: fs.createReadStream(tarball),
-          Key: key_name,
-          Bucket: config.bucket
-        };
-        log.info('publish', 'Putting object', s3_put_opts.ACL, s3_put_opts.Bucket, s3_put_opts.Key);
-        try {
-          s3.putObject(s3_put_opts, (err2, resp) => {
-            log.info('publish', 'returned from putting object');
-            if (err2) {
-              log.info('publish', 's3 putObject error: "' + err2 + '"');
-              return callback(err2);
-            }
-            if (resp) log.info('publish', 's3 putObject response: "' + JSON.stringify(resp) + '"');
-            log.info('publish', 'successfully put object');
-            console.log('[' + package_json.name + '] published to ' + opts.hosted_path);
-            return callback();
-          });
-        } catch (err3) {
-          log.info('publish', 's3 putObject error: "' + err3 + '"');
-          return callback(err3);
-        }
-      } else if (err) {
-        log.info('publish', 's3 headObject error: "' + err + '"');
-        return callback(err);
-      } else {
-        log.error('publish', 'Cannot publish over existing version');
-        log.error('publish', "Update the 'version' field in package.json and try again");
-        log.error('publish', 'If the previous version was published in error see:');
-        log.error('publish', '\t node-pre-gyp unpublish');
-        return callback(new Error('Failed publishing to ' + opts.hosted_path));
-      }
-    });
-  });
-}

+ 0 - 20
rag-server/node_modules/@mapbox/node-pre-gyp/lib/rebuild.js

@@ -1,20 +0,0 @@
-'use strict';
-
-module.exports = exports = rebuild;
-
-exports.usage = 'Runs "clean" and "build" at once';
-
-const napi = require('./util/napi.js');
-
-function rebuild(gyp, argv, callback) {
-  const package_json = gyp.package_json;
-  let commands = [
-    { name: 'clean', args: [] },
-    { name: 'build', args: ['rebuild'] }
-  ];
-  commands = napi.expand_commands(package_json, gyp.opts, commands);
-  for (let i = commands.length; i !== 0; i--) {
-    gyp.todo.unshift(commands[i - 1]);
-  }
-  process.nextTick(callback);
-}

+ 0 - 19
rag-server/node_modules/@mapbox/node-pre-gyp/lib/reinstall.js

@@ -1,19 +0,0 @@
-'use strict';
-
-module.exports = exports = rebuild;
-
-exports.usage = 'Runs "clean" and "install" at once';
-
-const napi = require('./util/napi.js');
-
-function rebuild(gyp, argv, callback) {
-  const package_json = gyp.package_json;
-  let installArgs = [];
-  const napi_build_version = napi.get_best_napi_build_version(package_json, gyp.opts);
-  if (napi_build_version != null) installArgs = [napi.get_command_arg(napi_build_version)];
-  gyp.todo.unshift(
-    { name: 'clean', args: [] },
-    { name: 'install', args: installArgs }
-  );
-  process.nextTick(callback);
-}

+ 0 - 32
rag-server/node_modules/@mapbox/node-pre-gyp/lib/reveal.js

@@ -1,32 +0,0 @@
-'use strict';
-
-module.exports = exports = reveal;
-
-exports.usage = 'Reveals data on the versioned binary';
-
-const versioning = require('./util/versioning.js');
-const napi = require('./util/napi.js');
-
-function unix_paths(key, val) {
-  return val && val.replace ? val.replace(/\\/g, '/') : val;
-}
-
-function reveal(gyp, argv, callback) {
-  const package_json = gyp.package_json;
-  const napi_build_version = napi.get_napi_build_version_from_command_args(argv);
-  const opts = versioning.evaluate(package_json, gyp.opts, napi_build_version);
-  let hit = false;
-  // if a second arg is passed look to see
-  // if it is a known option
-  // console.log(JSON.stringify(gyp.opts,null,1))
-  const remain = gyp.opts.argv.remain[gyp.opts.argv.remain.length - 1];
-  if (remain && Object.hasOwnProperty.call(opts, remain)) {
-    console.log(opts[remain].replace(/\\/g, '/'));
-    hit = true;
-  }
-  // otherwise return all options as json
-  if (!hit) {
-    console.log(JSON.stringify(opts, unix_paths, 2));
-  }
-  return callback();
-}

+ 0 - 79
rag-server/node_modules/@mapbox/node-pre-gyp/lib/testbinary.js

@@ -1,79 +0,0 @@
-'use strict';
-
-module.exports = exports = testbinary;
-
-exports.usage = 'Tests that the binary.node can be required';
-
-const path = require('path');
-const log = require('npmlog');
-const cp = require('child_process');
-const versioning = require('./util/versioning.js');
-const napi = require('./util/napi.js');
-
-function testbinary(gyp, argv, callback) {
-  const args = [];
-  const options = {};
-  let shell_cmd = process.execPath;
-  const package_json = gyp.package_json;
-  const napi_build_version = napi.get_napi_build_version_from_command_args(argv);
-  const opts = versioning.evaluate(package_json, gyp.opts, napi_build_version);
-  // skip validation for runtimes we don't explicitly support (like electron)
-  if (opts.runtime &&
-        opts.runtime !== 'node-webkit' &&
-        opts.runtime !== 'node') {
-    return callback();
-  }
-  const nw = (opts.runtime && opts.runtime === 'node-webkit');
-  // ensure on windows that / are used for require path
-  const binary_module = opts.module.replace(/\\/g, '/');
-  if ((process.arch !== opts.target_arch) ||
-        (process.platform !== opts.target_platform)) {
-    let msg = 'skipping validation since host platform/arch (';
-    msg += process.platform + '/' + process.arch + ')';
-    msg += ' does not match target (';
-    msg += opts.target_platform + '/' + opts.target_arch + ')';
-    log.info('validate', msg);
-    return callback();
-  }
-  if (nw) {
-    options.timeout = 5000;
-    if (process.platform === 'darwin') {
-      shell_cmd = 'node-webkit';
-    } else if (process.platform === 'win32') {
-      shell_cmd = 'nw.exe';
-    } else {
-      shell_cmd = 'nw';
-    }
-    const modulePath = path.resolve(binary_module);
-    const appDir = path.join(__dirname, 'util', 'nw-pre-gyp');
-    args.push(appDir);
-    args.push(modulePath);
-    log.info('validate', "Running test command: '" + shell_cmd + ' ' + args.join(' ') + "'");
-    cp.execFile(shell_cmd, args, options, (err, stdout, stderr) => {
-      // check for normal timeout for node-webkit
-      if (err) {
-        if (err.killed === true && err.signal && err.signal.indexOf('SIG') > -1) {
-          return callback();
-        }
-        const stderrLog = stderr.toString();
-        log.info('stderr', stderrLog);
-        if (/^\s*Xlib:\s*extension\s*"RANDR"\s*missing\s*on\s*display\s*":\d+\.\d+"\.\s*$/.test(stderrLog)) {
-          log.info('RANDR', 'stderr contains only RANDR error, ignored');
-          return callback();
-        }
-        return callback(err);
-      }
-      return callback();
-    });
-    return;
-  }
-  args.push('--eval');
-  args.push("require('" + binary_module.replace(/'/g, '\'') + "')");
-  log.info('validate', "Running test command: '" + shell_cmd + ' ' + args.join(' ') + "'");
-  cp.execFile(shell_cmd, args, options, (err, stdout, stderr) => {
-    if (err) {
-      return callback(err, { stdout: stdout, stderr: stderr });
-    }
-    return callback();
-  });
-}

+ 0 - 53
rag-server/node_modules/@mapbox/node-pre-gyp/lib/testpackage.js

@@ -1,53 +0,0 @@
-'use strict';
-
-module.exports = exports = testpackage;
-
-exports.usage = 'Tests that the staged package is valid';
-
-const fs = require('fs');
-const path = require('path');
-const log = require('npmlog');
-const existsAsync = fs.exists || path.exists;
-const versioning = require('./util/versioning.js');
-const napi = require('./util/napi.js');
-const testbinary = require('./testbinary.js');
-const tar = require('tar');
-const makeDir = require('make-dir');
-
-function testpackage(gyp, argv, callback) {
-  const package_json = gyp.package_json;
-  const napi_build_version = napi.get_napi_build_version_from_command_args(argv);
-  const opts = versioning.evaluate(package_json, gyp.opts, napi_build_version);
-  const tarball = opts.staged_tarball;
-  existsAsync(tarball, (found) => {
-    if (!found) {
-      return callback(new Error('Cannot test package because ' + tarball + ' missing: run `node-pre-gyp package` first'));
-    }
-    const to = opts.module_path;
-    function filter_func(entry) {
-      log.info('install', 'unpacking [' + entry.path + ']');
-    }
-
-    makeDir(to).then(() => {
-      tar.extract({
-        file: tarball,
-        cwd: to,
-        strip: 1,
-        onentry: filter_func
-      }).then(after_extract, callback);
-    }).catch((err) => {
-      return callback(err);
-    });
-
-    function after_extract() {
-      testbinary(gyp, argv, (err) => {
-        if (err) {
-          return callback(err);
-        } else {
-          console.log('[' + package_json.name + '] Package appears valid');
-          return callback();
-        }
-      });
-    }
-  });
-}

+ 0 - 41
rag-server/node_modules/@mapbox/node-pre-gyp/lib/unpublish.js

@@ -1,41 +0,0 @@
-'use strict';
-
-module.exports = exports = unpublish;
-
-exports.usage = 'Unpublishes pre-built binary (requires aws-sdk)';
-
-const log = require('npmlog');
-const versioning = require('./util/versioning.js');
-const napi = require('./util/napi.js');
-const s3_setup = require('./util/s3_setup.js');
-const url = require('url');
-
-function unpublish(gyp, argv, callback) {
-  const package_json = gyp.package_json;
-  const napi_build_version = napi.get_napi_build_version_from_command_args(argv);
-  const opts = versioning.evaluate(package_json, gyp.opts, napi_build_version);
-  const config = {};
-  s3_setup.detect(opts, config);
-  const s3 = s3_setup.get_s3(config);
-  const key_name = url.resolve(config.prefix, opts.package_name);
-  const s3_opts = {
-    Bucket: config.bucket,
-    Key: key_name
-  };
-  s3.headObject(s3_opts, (err, meta) => {
-    if (err && err.code === 'NotFound') {
-      console.log('[' + package_json.name + '] Not found: https://' + s3_opts.Bucket + '.s3.amazonaws.com/' + s3_opts.Key);
-      return callback();
-    } else if (err) {
-      return callback(err);
-    } else {
-      log.info('unpublish', JSON.stringify(meta));
-      s3.deleteObject(s3_opts, (err2, resp) => {
-        if (err2) return callback(err2);
-        log.info(JSON.stringify(resp));
-        console.log('[' + package_json.name + '] Success: removed https://' + s3_opts.Bucket + '.s3.amazonaws.com/' + s3_opts.Key);
-        return callback();
-      });
-    }
-  });
-}

+ 0 - 2602
rag-server/node_modules/@mapbox/node-pre-gyp/lib/util/abi_crosswalk.json

@@ -1,2602 +0,0 @@
-{
-  "0.1.14": {
-    "node_abi": null,
-    "v8": "1.3"
-  },
-  "0.1.15": {
-    "node_abi": null,
-    "v8": "1.3"
-  },
-  "0.1.16": {
-    "node_abi": null,
-    "v8": "1.3"
-  },
-  "0.1.17": {
-    "node_abi": null,
-    "v8": "1.3"
-  },
-  "0.1.18": {
-    "node_abi": null,
-    "v8": "1.3"
-  },
-  "0.1.19": {
-    "node_abi": null,
-    "v8": "2.0"
-  },
-  "0.1.20": {
-    "node_abi": null,
-    "v8": "2.0"
-  },
-  "0.1.21": {
-    "node_abi": null,
-    "v8": "2.0"
-  },
-  "0.1.22": {
-    "node_abi": null,
-    "v8": "2.0"
-  },
-  "0.1.23": {
-    "node_abi": null,
-    "v8": "2.0"
-  },
-  "0.1.24": {
-    "node_abi": null,
-    "v8": "2.0"
-  },
-  "0.1.25": {
-    "node_abi": null,
-    "v8": "2.0"
-  },
-  "0.1.26": {
-    "node_abi": null,
-    "v8": "2.0"
-  },
-  "0.1.27": {
-    "node_abi": null,
-    "v8": "2.1"
-  },
-  "0.1.28": {
-    "node_abi": null,
-    "v8": "2.1"
-  },
-  "0.1.29": {
-    "node_abi": null,
-    "v8": "2.1"
-  },
-  "0.1.30": {
-    "node_abi": null,
-    "v8": "2.1"
-  },
-  "0.1.31": {
-    "node_abi": null,
-    "v8": "2.1"
-  },
-  "0.1.32": {
-    "node_abi": null,
-    "v8": "2.1"
-  },
-  "0.1.33": {
-    "node_abi": null,
-    "v8": "2.1"
-  },
-  "0.1.90": {
-    "node_abi": null,
-    "v8": "2.2"
-  },
-  "0.1.91": {
-    "node_abi": null,
-    "v8": "2.2"
-  },
-  "0.1.92": {
-    "node_abi": null,
-    "v8": "2.2"
-  },
-  "0.1.93": {
-    "node_abi": null,
-    "v8": "2.2"
-  },
-  "0.1.94": {
-    "node_abi": null,
-    "v8": "2.2"
-  },
-  "0.1.95": {
-    "node_abi": null,
-    "v8": "2.2"
-  },
-  "0.1.96": {
-    "node_abi": null,
-    "v8": "2.2"
-  },
-  "0.1.97": {
-    "node_abi": null,
-    "v8": "2.2"
-  },
-  "0.1.98": {
-    "node_abi": null,
-    "v8": "2.2"
-  },
-  "0.1.99": {
-    "node_abi": null,
-    "v8": "2.2"
-  },
-  "0.1.100": {
-    "node_abi": null,
-    "v8": "2.2"
-  },
-  "0.1.101": {
-    "node_abi": null,
-    "v8": "2.3"
-  },
-  "0.1.102": {
-    "node_abi": null,
-    "v8": "2.3"
-  },
-  "0.1.103": {
-    "node_abi": null,
-    "v8": "2.3"
-  },
-  "0.1.104": {
-    "node_abi": null,
-    "v8": "2.3"
-  },
-  "0.2.0": {
-    "node_abi": 1,
-    "v8": "2.3"
-  },
-  "0.2.1": {
-    "node_abi": 1,
-    "v8": "2.3"
-  },
-  "0.2.2": {
-    "node_abi": 1,
-    "v8": "2.3"
-  },
-  "0.2.3": {
-    "node_abi": 1,
-    "v8": "2.3"
-  },
-  "0.2.4": {
-    "node_abi": 1,
-    "v8": "2.3"
-  },
-  "0.2.5": {
-    "node_abi": 1,
-    "v8": "2.3"
-  },
-  "0.2.6": {
-    "node_abi": 1,
-    "v8": "2.3"
-  },
-  "0.3.0": {
-    "node_abi": 1,
-    "v8": "2.5"
-  },
-  "0.3.1": {
-    "node_abi": 1,
-    "v8": "2.5"
-  },
-  "0.3.2": {
-    "node_abi": 1,
-    "v8": "3.0"
-  },
-  "0.3.3": {
-    "node_abi": 1,
-    "v8": "3.0"
-  },
-  "0.3.4": {
-    "node_abi": 1,
-    "v8": "3.0"
-  },
-  "0.3.5": {
-    "node_abi": 1,
-    "v8": "3.0"
-  },
-  "0.3.6": {
-    "node_abi": 1,
-    "v8": "3.0"
-  },
-  "0.3.7": {
-    "node_abi": 1,
-    "v8": "3.0"
-  },
-  "0.3.8": {
-    "node_abi": 1,
-    "v8": "3.1"
-  },
-  "0.4.0": {
-    "node_abi": 1,
-    "v8": "3.1"
-  },
-  "0.4.1": {
-    "node_abi": 1,
-    "v8": "3.1"
-  },
-  "0.4.2": {
-    "node_abi": 1,
-    "v8": "3.1"
-  },
-  "0.4.3": {
-    "node_abi": 1,
-    "v8": "3.1"
-  },
-  "0.4.4": {
-    "node_abi": 1,
-    "v8": "3.1"
-  },
-  "0.4.5": {
-    "node_abi": 1,
-    "v8": "3.1"
-  },
-  "0.4.6": {
-    "node_abi": 1,
-    "v8": "3.1"
-  },
-  "0.4.7": {
-    "node_abi": 1,
-    "v8": "3.1"
-  },
-  "0.4.8": {
-    "node_abi": 1,
-    "v8": "3.1"
-  },
-  "0.4.9": {
-    "node_abi": 1,
-    "v8": "3.1"
-  },
-  "0.4.10": {
-    "node_abi": 1,
-    "v8": "3.1"
-  },
-  "0.4.11": {
-    "node_abi": 1,
-    "v8": "3.1"
-  },
-  "0.4.12": {
-    "node_abi": 1,
-    "v8": "3.1"
-  },
-  "0.5.0": {
-    "node_abi": 1,
-    "v8": "3.1"
-  },
-  "0.5.1": {
-    "node_abi": 1,
-    "v8": "3.4"
-  },
-  "0.5.2": {
-    "node_abi": 1,
-    "v8": "3.4"
-  },
-  "0.5.3": {
-    "node_abi": 1,
-    "v8": "3.4"
-  },
-  "0.5.4": {
-    "node_abi": 1,
-    "v8": "3.5"
-  },
-  "0.5.5": {
-    "node_abi": 1,
-    "v8": "3.5"
-  },
-  "0.5.6": {
-    "node_abi": 1,
-    "v8": "3.6"
-  },
-  "0.5.7": {
-    "node_abi": 1,
-    "v8": "3.6"
-  },
-  "0.5.8": {
-    "node_abi": 1,
-    "v8": "3.6"
-  },
-  "0.5.9": {
-    "node_abi": 1,
-    "v8": "3.6"
-  },
-  "0.5.10": {
-    "node_abi": 1,
-    "v8": "3.7"
-  },
-  "0.6.0": {
-    "node_abi": 1,
-    "v8": "3.6"
-  },
-  "0.6.1": {
-    "node_abi": 1,
-    "v8": "3.6"
-  },
-  "0.6.2": {
-    "node_abi": 1,
-    "v8": "3.6"
-  },
-  "0.6.3": {
-    "node_abi": 1,
-    "v8": "3.6"
-  },
-  "0.6.4": {
-    "node_abi": 1,
-    "v8": "3.6"
-  },
-  "0.6.5": {
-    "node_abi": 1,
-    "v8": "3.6"
-  },
-  "0.6.6": {
-    "node_abi": 1,
-    "v8": "3.6"
-  },
-  "0.6.7": {
-    "node_abi": 1,
-    "v8": "3.6"
-  },
-  "0.6.8": {
-    "node_abi": 1,
-    "v8": "3.6"
-  },
-  "0.6.9": {
-    "node_abi": 1,
-    "v8": "3.6"
-  },
-  "0.6.10": {
-    "node_abi": 1,
-    "v8": "3.6"
-  },
-  "0.6.11": {
-    "node_abi": 1,
-    "v8": "3.6"
-  },
-  "0.6.12": {
-    "node_abi": 1,
-    "v8": "3.6"
-  },
-  "0.6.13": {
-    "node_abi": 1,
-    "v8": "3.6"
-  },
-  "0.6.14": {
-    "node_abi": 1,
-    "v8": "3.6"
-  },
-  "0.6.15": {
-    "node_abi": 1,
-    "v8": "3.6"
-  },
-  "0.6.16": {
-    "node_abi": 1,
-    "v8": "3.6"
-  },
-  "0.6.17": {
-    "node_abi": 1,
-    "v8": "3.6"
-  },
-  "0.6.18": {
-    "node_abi": 1,
-    "v8": "3.6"
-  },
-  "0.6.19": {
-    "node_abi": 1,
-    "v8": "3.6"
-  },
-  "0.6.20": {
-    "node_abi": 1,
-    "v8": "3.6"
-  },
-  "0.6.21": {
-    "node_abi": 1,
-    "v8": "3.6"
-  },
-  "0.7.0": {
-    "node_abi": 1,
-    "v8": "3.8"
-  },
-  "0.7.1": {
-    "node_abi": 1,
-    "v8": "3.8"
-  },
-  "0.7.2": {
-    "node_abi": 1,
-    "v8": "3.8"
-  },
-  "0.7.3": {
-    "node_abi": 1,
-    "v8": "3.9"
-  },
-  "0.7.4": {
-    "node_abi": 1,
-    "v8": "3.9"
-  },
-  "0.7.5": {
-    "node_abi": 1,
-    "v8": "3.9"
-  },
-  "0.7.6": {
-    "node_abi": 1,
-    "v8": "3.9"
-  },
-  "0.7.7": {
-    "node_abi": 1,
-    "v8": "3.9"
-  },
-  "0.7.8": {
-    "node_abi": 1,
-    "v8": "3.9"
-  },
-  "0.7.9": {
-    "node_abi": 1,
-    "v8": "3.11"
-  },
-  "0.7.10": {
-    "node_abi": 1,
-    "v8": "3.9"
-  },
-  "0.7.11": {
-    "node_abi": 1,
-    "v8": "3.11"
-  },
-  "0.7.12": {
-    "node_abi": 1,
-    "v8": "3.11"
-  },
-  "0.8.0": {
-    "node_abi": 1,
-    "v8": "3.11"
-  },
-  "0.8.1": {
-    "node_abi": 1,
-    "v8": "3.11"
-  },
-  "0.8.2": {
-    "node_abi": 1,
-    "v8": "3.11"
-  },
-  "0.8.3": {
-    "node_abi": 1,
-    "v8": "3.11"
-  },
-  "0.8.4": {
-    "node_abi": 1,
-    "v8": "3.11"
-  },
-  "0.8.5": {
-    "node_abi": 1,
-    "v8": "3.11"
-  },
-  "0.8.6": {
-    "node_abi": 1,
-    "v8": "3.11"
-  },
-  "0.8.7": {
-    "node_abi": 1,
-    "v8": "3.11"
-  },
-  "0.8.8": {
-    "node_abi": 1,
-    "v8": "3.11"
-  },
-  "0.8.9": {
-    "node_abi": 1,
-    "v8": "3.11"
-  },
-  "0.8.10": {
-    "node_abi": 1,
-    "v8": "3.11"
-  },
-  "0.8.11": {
-    "node_abi": 1,
-    "v8": "3.11"
-  },
-  "0.8.12": {
-    "node_abi": 1,
-    "v8": "3.11"
-  },
-  "0.8.13": {
-    "node_abi": 1,
-    "v8": "3.11"
-  },
-  "0.8.14": {
-    "node_abi": 1,
-    "v8": "3.11"
-  },
-  "0.8.15": {
-    "node_abi": 1,
-    "v8": "3.11"
-  },
-  "0.8.16": {
-    "node_abi": 1,
-    "v8": "3.11"
-  },
-  "0.8.17": {
-    "node_abi": 1,
-    "v8": "3.11"
-  },
-  "0.8.18": {
-    "node_abi": 1,
-    "v8": "3.11"
-  },
-  "0.8.19": {
-    "node_abi": 1,
-    "v8": "3.11"
-  },
-  "0.8.20": {
-    "node_abi": 1,
-    "v8": "3.11"
-  },
-  "0.8.21": {
-    "node_abi": 1,
-    "v8": "3.11"
-  },
-  "0.8.22": {
-    "node_abi": 1,
-    "v8": "3.11"
-  },
-  "0.8.23": {
-    "node_abi": 1,
-    "v8": "3.11"
-  },
-  "0.8.24": {
-    "node_abi": 1,
-    "v8": "3.11"
-  },
-  "0.8.25": {
-    "node_abi": 1,
-    "v8": "3.11"
-  },
-  "0.8.26": {
-    "node_abi": 1,
-    "v8": "3.11"
-  },
-  "0.8.27": {
-    "node_abi": 1,
-    "v8": "3.11"
-  },
-  "0.8.28": {
-    "node_abi": 1,
-    "v8": "3.11"
-  },
-  "0.9.0": {
-    "node_abi": 1,
-    "v8": "3.11"
-  },
-  "0.9.1": {
-    "node_abi": 10,
-    "v8": "3.11"
-  },
-  "0.9.2": {
-    "node_abi": 10,
-    "v8": "3.11"
-  },
-  "0.9.3": {
-    "node_abi": 10,
-    "v8": "3.13"
-  },
-  "0.9.4": {
-    "node_abi": 10,
-    "v8": "3.13"
-  },
-  "0.9.5": {
-    "node_abi": 10,
-    "v8": "3.13"
-  },
-  "0.9.6": {
-    "node_abi": 10,
-    "v8": "3.15"
-  },
-  "0.9.7": {
-    "node_abi": 10,
-    "v8": "3.15"
-  },
-  "0.9.8": {
-    "node_abi": 10,
-    "v8": "3.15"
-  },
-  "0.9.9": {
-    "node_abi": 11,
-    "v8": "3.15"
-  },
-  "0.9.10": {
-    "node_abi": 11,
-    "v8": "3.15"
-  },
-  "0.9.11": {
-    "node_abi": 11,
-    "v8": "3.14"
-  },
-  "0.9.12": {
-    "node_abi": 11,
-    "v8": "3.14"
-  },
-  "0.10.0": {
-    "node_abi": 11,
-    "v8": "3.14"
-  },
-  "0.10.1": {
-    "node_abi": 11,
-    "v8": "3.14"
-  },
-  "0.10.2": {
-    "node_abi": 11,
-    "v8": "3.14"
-  },
-  "0.10.3": {
-    "node_abi": 11,
-    "v8": "3.14"
-  },
-  "0.10.4": {
-    "node_abi": 11,
-    "v8": "3.14"
-  },
-  "0.10.5": {
-    "node_abi": 11,
-    "v8": "3.14"
-  },
-  "0.10.6": {
-    "node_abi": 11,
-    "v8": "3.14"
-  },
-  "0.10.7": {
-    "node_abi": 11,
-    "v8": "3.14"
-  },
-  "0.10.8": {
-    "node_abi": 11,
-    "v8": "3.14"
-  },
-  "0.10.9": {
-    "node_abi": 11,
-    "v8": "3.14"
-  },
-  "0.10.10": {
-    "node_abi": 11,
-    "v8": "3.14"
-  },
-  "0.10.11": {
-    "node_abi": 11,
-    "v8": "3.14"
-  },
-  "0.10.12": {
-    "node_abi": 11,
-    "v8": "3.14"
-  },
-  "0.10.13": {
-    "node_abi": 11,
-    "v8": "3.14"
-  },
-  "0.10.14": {
-    "node_abi": 11,
-    "v8": "3.14"
-  },
-  "0.10.15": {
-    "node_abi": 11,
-    "v8": "3.14"
-  },
-  "0.10.16": {
-    "node_abi": 11,
-    "v8": "3.14"
-  },
-  "0.10.17": {
-    "node_abi": 11,
-    "v8": "3.14"
-  },
-  "0.10.18": {
-    "node_abi": 11,
-    "v8": "3.14"
-  },
-  "0.10.19": {
-    "node_abi": 11,
-    "v8": "3.14"
-  },
-  "0.10.20": {
-    "node_abi": 11,
-    "v8": "3.14"
-  },
-  "0.10.21": {
-    "node_abi": 11,
-    "v8": "3.14"
-  },
-  "0.10.22": {
-    "node_abi": 11,
-    "v8": "3.14"
-  },
-  "0.10.23": {
-    "node_abi": 11,
-    "v8": "3.14"
-  },
-  "0.10.24": {
-    "node_abi": 11,
-    "v8": "3.14"
-  },
-  "0.10.25": {
-    "node_abi": 11,
-    "v8": "3.14"
-  },
-  "0.10.26": {
-    "node_abi": 11,
-    "v8": "3.14"
-  },
-  "0.10.27": {
-    "node_abi": 11,
-    "v8": "3.14"
-  },
-  "0.10.28": {
-    "node_abi": 11,
-    "v8": "3.14"
-  },
-  "0.10.29": {
-    "node_abi": 11,
-    "v8": "3.14"
-  },
-  "0.10.30": {
-    "node_abi": 11,
-    "v8": "3.14"
-  },
-  "0.10.31": {
-    "node_abi": 11,
-    "v8": "3.14"
-  },
-  "0.10.32": {
-    "node_abi": 11,
-    "v8": "3.14"
-  },
-  "0.10.33": {
-    "node_abi": 11,
-    "v8": "3.14"
-  },
-  "0.10.34": {
-    "node_abi": 11,
-    "v8": "3.14"
-  },
-  "0.10.35": {
-    "node_abi": 11,
-    "v8": "3.14"
-  },
-  "0.10.36": {
-    "node_abi": 11,
-    "v8": "3.14"
-  },
-  "0.10.37": {
-    "node_abi": 11,
-    "v8": "3.14"
-  },
-  "0.10.38": {
-    "node_abi": 11,
-    "v8": "3.14"
-  },
-  "0.10.39": {
-    "node_abi": 11,
-    "v8": "3.14"
-  },
-  "0.10.40": {
-    "node_abi": 11,
-    "v8": "3.14"
-  },
-  "0.10.41": {
-    "node_abi": 11,
-    "v8": "3.14"
-  },
-  "0.10.42": {
-    "node_abi": 11,
-    "v8": "3.14"
-  },
-  "0.10.43": {
-    "node_abi": 11,
-    "v8": "3.14"
-  },
-  "0.10.44": {
-    "node_abi": 11,
-    "v8": "3.14"
-  },
-  "0.10.45": {
-    "node_abi": 11,
-    "v8": "3.14"
-  },
-  "0.10.46": {
-    "node_abi": 11,
-    "v8": "3.14"
-  },
-  "0.10.47": {
-    "node_abi": 11,
-    "v8": "3.14"
-  },
-  "0.10.48": {
-    "node_abi": 11,
-    "v8": "3.14"
-  },
-  "0.11.0": {
-    "node_abi": 12,
-    "v8": "3.17"
-  },
-  "0.11.1": {
-    "node_abi": 12,
-    "v8": "3.18"
-  },
-  "0.11.2": {
-    "node_abi": 12,
-    "v8": "3.19"
-  },
-  "0.11.3": {
-    "node_abi": 12,
-    "v8": "3.19"
-  },
-  "0.11.4": {
-    "node_abi": 12,
-    "v8": "3.20"
-  },
-  "0.11.5": {
-    "node_abi": 12,
-    "v8": "3.20"
-  },
-  "0.11.6": {
-    "node_abi": 12,
-    "v8": "3.20"
-  },
-  "0.11.7": {
-    "node_abi": 12,
-    "v8": "3.20"
-  },
-  "0.11.8": {
-    "node_abi": 13,
-    "v8": "3.21"
-  },
-  "0.11.9": {
-    "node_abi": 13,
-    "v8": "3.22"
-  },
-  "0.11.10": {
-    "node_abi": 13,
-    "v8": "3.22"
-  },
-  "0.11.11": {
-    "node_abi": 14,
-    "v8": "3.22"
-  },
-  "0.11.12": {
-    "node_abi": 14,
-    "v8": "3.22"
-  },
-  "0.11.13": {
-    "node_abi": 14,
-    "v8": "3.25"
-  },
-  "0.11.14": {
-    "node_abi": 14,
-    "v8": "3.26"
-  },
-  "0.11.15": {
-    "node_abi": 14,
-    "v8": "3.28"
-  },
-  "0.11.16": {
-    "node_abi": 14,
-    "v8": "3.28"
-  },
-  "0.12.0": {
-    "node_abi": 14,
-    "v8": "3.28"
-  },
-  "0.12.1": {
-    "node_abi": 14,
-    "v8": "3.28"
-  },
-  "0.12.2": {
-    "node_abi": 14,
-    "v8": "3.28"
-  },
-  "0.12.3": {
-    "node_abi": 14,
-    "v8": "3.28"
-  },
-  "0.12.4": {
-    "node_abi": 14,
-    "v8": "3.28"
-  },
-  "0.12.5": {
-    "node_abi": 14,
-    "v8": "3.28"
-  },
-  "0.12.6": {
-    "node_abi": 14,
-    "v8": "3.28"
-  },
-  "0.12.7": {
-    "node_abi": 14,
-    "v8": "3.28"
-  },
-  "0.12.8": {
-    "node_abi": 14,
-    "v8": "3.28"
-  },
-  "0.12.9": {
-    "node_abi": 14,
-    "v8": "3.28"
-  },
-  "0.12.10": {
-    "node_abi": 14,
-    "v8": "3.28"
-  },
-  "0.12.11": {
-    "node_abi": 14,
-    "v8": "3.28"
-  },
-  "0.12.12": {
-    "node_abi": 14,
-    "v8": "3.28"
-  },
-  "0.12.13": {
-    "node_abi": 14,
-    "v8": "3.28"
-  },
-  "0.12.14": {
-    "node_abi": 14,
-    "v8": "3.28"
-  },
-  "0.12.15": {
-    "node_abi": 14,
-    "v8": "3.28"
-  },
-  "0.12.16": {
-    "node_abi": 14,
-    "v8": "3.28"
-  },
-  "0.12.17": {
-    "node_abi": 14,
-    "v8": "3.28"
-  },
-  "0.12.18": {
-    "node_abi": 14,
-    "v8": "3.28"
-  },
-  "1.0.0": {
-    "node_abi": 42,
-    "v8": "3.31"
-  },
-  "1.0.1": {
-    "node_abi": 42,
-    "v8": "3.31"
-  },
-  "1.0.2": {
-    "node_abi": 42,
-    "v8": "3.31"
-  },
-  "1.0.3": {
-    "node_abi": 42,
-    "v8": "4.1"
-  },
-  "1.0.4": {
-    "node_abi": 42,
-    "v8": "4.1"
-  },
-  "1.1.0": {
-    "node_abi": 43,
-    "v8": "4.1"
-  },
-  "1.2.0": {
-    "node_abi": 43,
-    "v8": "4.1"
-  },
-  "1.3.0": {
-    "node_abi": 43,
-    "v8": "4.1"
-  },
-  "1.4.1": {
-    "node_abi": 43,
-    "v8": "4.1"
-  },
-  "1.4.2": {
-    "node_abi": 43,
-    "v8": "4.1"
-  },
-  "1.4.3": {
-    "node_abi": 43,
-    "v8": "4.1"
-  },
-  "1.5.0": {
-    "node_abi": 43,
-    "v8": "4.1"
-  },
-  "1.5.1": {
-    "node_abi": 43,
-    "v8": "4.1"
-  },
-  "1.6.0": {
-    "node_abi": 43,
-    "v8": "4.1"
-  },
-  "1.6.1": {
-    "node_abi": 43,
-    "v8": "4.1"
-  },
-  "1.6.2": {
-    "node_abi": 43,
-    "v8": "4.1"
-  },
-  "1.6.3": {
-    "node_abi": 43,
-    "v8": "4.1"
-  },
-  "1.6.4": {
-    "node_abi": 43,
-    "v8": "4.1"
-  },
-  "1.7.1": {
-    "node_abi": 43,
-    "v8": "4.1"
-  },
-  "1.8.1": {
-    "node_abi": 43,
-    "v8": "4.1"
-  },
-  "1.8.2": {
-    "node_abi": 43,
-    "v8": "4.1"
-  },
-  "1.8.3": {
-    "node_abi": 43,
-    "v8": "4.1"
-  },
-  "1.8.4": {
-    "node_abi": 43,
-    "v8": "4.1"
-  },
-  "2.0.0": {
-    "node_abi": 44,
-    "v8": "4.2"
-  },
-  "2.0.1": {
-    "node_abi": 44,
-    "v8": "4.2"
-  },
-  "2.0.2": {
-    "node_abi": 44,
-    "v8": "4.2"
-  },
-  "2.1.0": {
-    "node_abi": 44,
-    "v8": "4.2"
-  },
-  "2.2.0": {
-    "node_abi": 44,
-    "v8": "4.2"
-  },
-  "2.2.1": {
-    "node_abi": 44,
-    "v8": "4.2"
-  },
-  "2.3.0": {
-    "node_abi": 44,
-    "v8": "4.2"
-  },
-  "2.3.1": {
-    "node_abi": 44,
-    "v8": "4.2"
-  },
-  "2.3.2": {
-    "node_abi": 44,
-    "v8": "4.2"
-  },
-  "2.3.3": {
-    "node_abi": 44,
-    "v8": "4.2"
-  },
-  "2.3.4": {
-    "node_abi": 44,
-    "v8": "4.2"
-  },
-  "2.4.0": {
-    "node_abi": 44,
-    "v8": "4.2"
-  },
-  "2.5.0": {
-    "node_abi": 44,
-    "v8": "4.2"
-  },
-  "3.0.0": {
-    "node_abi": 45,
-    "v8": "4.4"
-  },
-  "3.1.0": {
-    "node_abi": 45,
-    "v8": "4.4"
-  },
-  "3.2.0": {
-    "node_abi": 45,
-    "v8": "4.4"
-  },
-  "3.3.0": {
-    "node_abi": 45,
-    "v8": "4.4"
-  },
-  "3.3.1": {
-    "node_abi": 45,
-    "v8": "4.4"
-  },
-  "4.0.0": {
-    "node_abi": 46,
-    "v8": "4.5"
-  },
-  "4.1.0": {
-    "node_abi": 46,
-    "v8": "4.5"
-  },
-  "4.1.1": {
-    "node_abi": 46,
-    "v8": "4.5"
-  },
-  "4.1.2": {
-    "node_abi": 46,
-    "v8": "4.5"
-  },
-  "4.2.0": {
-    "node_abi": 46,
-    "v8": "4.5"
-  },
-  "4.2.1": {
-    "node_abi": 46,
-    "v8": "4.5"
-  },
-  "4.2.2": {
-    "node_abi": 46,
-    "v8": "4.5"
-  },
-  "4.2.3": {
-    "node_abi": 46,
-    "v8": "4.5"
-  },
-  "4.2.4": {
-    "node_abi": 46,
-    "v8": "4.5"
-  },
-  "4.2.5": {
-    "node_abi": 46,
-    "v8": "4.5"
-  },
-  "4.2.6": {
-    "node_abi": 46,
-    "v8": "4.5"
-  },
-  "4.3.0": {
-    "node_abi": 46,
-    "v8": "4.5"
-  },
-  "4.3.1": {
-    "node_abi": 46,
-    "v8": "4.5"
-  },
-  "4.3.2": {
-    "node_abi": 46,
-    "v8": "4.5"
-  },
-  "4.4.0": {
-    "node_abi": 46,
-    "v8": "4.5"
-  },
-  "4.4.1": {
-    "node_abi": 46,
-    "v8": "4.5"
-  },
-  "4.4.2": {
-    "node_abi": 46,
-    "v8": "4.5"
-  },
-  "4.4.3": {
-    "node_abi": 46,
-    "v8": "4.5"
-  },
-  "4.4.4": {
-    "node_abi": 46,
-    "v8": "4.5"
-  },
-  "4.4.5": {
-    "node_abi": 46,
-    "v8": "4.5"
-  },
-  "4.4.6": {
-    "node_abi": 46,
-    "v8": "4.5"
-  },
-  "4.4.7": {
-    "node_abi": 46,
-    "v8": "4.5"
-  },
-  "4.5.0": {
-    "node_abi": 46,
-    "v8": "4.5"
-  },
-  "4.6.0": {
-    "node_abi": 46,
-    "v8": "4.5"
-  },
-  "4.6.1": {
-    "node_abi": 46,
-    "v8": "4.5"
-  },
-  "4.6.2": {
-    "node_abi": 46,
-    "v8": "4.5"
-  },
-  "4.7.0": {
-    "node_abi": 46,
-    "v8": "4.5"
-  },
-  "4.7.1": {
-    "node_abi": 46,
-    "v8": "4.5"
-  },
-  "4.7.2": {
-    "node_abi": 46,
-    "v8": "4.5"
-  },
-  "4.7.3": {
-    "node_abi": 46,
-    "v8": "4.5"
-  },
-  "4.8.0": {
-    "node_abi": 46,
-    "v8": "4.5"
-  },
-  "4.8.1": {
-    "node_abi": 46,
-    "v8": "4.5"
-  },
-  "4.8.2": {
-    "node_abi": 46,
-    "v8": "4.5"
-  },
-  "4.8.3": {
-    "node_abi": 46,
-    "v8": "4.5"
-  },
-  "4.8.4": {
-    "node_abi": 46,
-    "v8": "4.5"
-  },
-  "4.8.5": {
-    "node_abi": 46,
-    "v8": "4.5"
-  },
-  "4.8.6": {
-    "node_abi": 46,
-    "v8": "4.5"
-  },
-  "4.8.7": {
-    "node_abi": 46,
-    "v8": "4.5"
-  },
-  "4.9.0": {
-    "node_abi": 46,
-    "v8": "4.5"
-  },
-  "4.9.1": {
-    "node_abi": 46,
-    "v8": "4.5"
-  },
-  "5.0.0": {
-    "node_abi": 47,
-    "v8": "4.6"
-  },
-  "5.1.0": {
-    "node_abi": 47,
-    "v8": "4.6"
-  },
-  "5.1.1": {
-    "node_abi": 47,
-    "v8": "4.6"
-  },
-  "5.2.0": {
-    "node_abi": 47,
-    "v8": "4.6"
-  },
-  "5.3.0": {
-    "node_abi": 47,
-    "v8": "4.6"
-  },
-  "5.4.0": {
-    "node_abi": 47,
-    "v8": "4.6"
-  },
-  "5.4.1": {
-    "node_abi": 47,
-    "v8": "4.6"
-  },
-  "5.5.0": {
-    "node_abi": 47,
-    "v8": "4.6"
-  },
-  "5.6.0": {
-    "node_abi": 47,
-    "v8": "4.6"
-  },
-  "5.7.0": {
-    "node_abi": 47,
-    "v8": "4.6"
-  },
-  "5.7.1": {
-    "node_abi": 47,
-    "v8": "4.6"
-  },
-  "5.8.0": {
-    "node_abi": 47,
-    "v8": "4.6"
-  },
-  "5.9.0": {
-    "node_abi": 47,
-    "v8": "4.6"
-  },
-  "5.9.1": {
-    "node_abi": 47,
-    "v8": "4.6"
-  },
-  "5.10.0": {
-    "node_abi": 47,
-    "v8": "4.6"
-  },
-  "5.10.1": {
-    "node_abi": 47,
-    "v8": "4.6"
-  },
-  "5.11.0": {
-    "node_abi": 47,
-    "v8": "4.6"
-  },
-  "5.11.1": {
-    "node_abi": 47,
-    "v8": "4.6"
-  },
-  "5.12.0": {
-    "node_abi": 47,
-    "v8": "4.6"
-  },
-  "6.0.0": {
-    "node_abi": 48,
-    "v8": "5.0"
-  },
-  "6.1.0": {
-    "node_abi": 48,
-    "v8": "5.0"
-  },
-  "6.2.0": {
-    "node_abi": 48,
-    "v8": "5.0"
-  },
-  "6.2.1": {
-    "node_abi": 48,
-    "v8": "5.0"
-  },
-  "6.2.2": {
-    "node_abi": 48,
-    "v8": "5.0"
-  },
-  "6.3.0": {
-    "node_abi": 48,
-    "v8": "5.0"
-  },
-  "6.3.1": {
-    "node_abi": 48,
-    "v8": "5.0"
-  },
-  "6.4.0": {
-    "node_abi": 48,
-    "v8": "5.0"
-  },
-  "6.5.0": {
-    "node_abi": 48,
-    "v8": "5.1"
-  },
-  "6.6.0": {
-    "node_abi": 48,
-    "v8": "5.1"
-  },
-  "6.7.0": {
-    "node_abi": 48,
-    "v8": "5.1"
-  },
-  "6.8.0": {
-    "node_abi": 48,
-    "v8": "5.1"
-  },
-  "6.8.1": {
-    "node_abi": 48,
-    "v8": "5.1"
-  },
-  "6.9.0": {
-    "node_abi": 48,
-    "v8": "5.1"
-  },
-  "6.9.1": {
-    "node_abi": 48,
-    "v8": "5.1"
-  },
-  "6.9.2": {
-    "node_abi": 48,
-    "v8": "5.1"
-  },
-  "6.9.3": {
-    "node_abi": 48,
-    "v8": "5.1"
-  },
-  "6.9.4": {
-    "node_abi": 48,
-    "v8": "5.1"
-  },
-  "6.9.5": {
-    "node_abi": 48,
-    "v8": "5.1"
-  },
-  "6.10.0": {
-    "node_abi": 48,
-    "v8": "5.1"
-  },
-  "6.10.1": {
-    "node_abi": 48,
-    "v8": "5.1"
-  },
-  "6.10.2": {
-    "node_abi": 48,
-    "v8": "5.1"
-  },
-  "6.10.3": {
-    "node_abi": 48,
-    "v8": "5.1"
-  },
-  "6.11.0": {
-    "node_abi": 48,
-    "v8": "5.1"
-  },
-  "6.11.1": {
-    "node_abi": 48,
-    "v8": "5.1"
-  },
-  "6.11.2": {
-    "node_abi": 48,
-    "v8": "5.1"
-  },
-  "6.11.3": {
-    "node_abi": 48,
-    "v8": "5.1"
-  },
-  "6.11.4": {
-    "node_abi": 48,
-    "v8": "5.1"
-  },
-  "6.11.5": {
-    "node_abi": 48,
-    "v8": "5.1"
-  },
-  "6.12.0": {
-    "node_abi": 48,
-    "v8": "5.1"
-  },
-  "6.12.1": {
-    "node_abi": 48,
-    "v8": "5.1"
-  },
-  "6.12.2": {
-    "node_abi": 48,
-    "v8": "5.1"
-  },
-  "6.12.3": {
-    "node_abi": 48,
-    "v8": "5.1"
-  },
-  "6.13.0": {
-    "node_abi": 48,
-    "v8": "5.1"
-  },
-  "6.13.1": {
-    "node_abi": 48,
-    "v8": "5.1"
-  },
-  "6.14.0": {
-    "node_abi": 48,
-    "v8": "5.1"
-  },
-  "6.14.1": {
-    "node_abi": 48,
-    "v8": "5.1"
-  },
-  "6.14.2": {
-    "node_abi": 48,
-    "v8": "5.1"
-  },
-  "6.14.3": {
-    "node_abi": 48,
-    "v8": "5.1"
-  },
-  "6.14.4": {
-    "node_abi": 48,
-    "v8": "5.1"
-  },
-  "6.15.0": {
-    "node_abi": 48,
-    "v8": "5.1"
-  },
-  "6.15.1": {
-    "node_abi": 48,
-    "v8": "5.1"
-  },
-  "6.16.0": {
-    "node_abi": 48,
-    "v8": "5.1"
-  },
-  "6.17.0": {
-    "node_abi": 48,
-    "v8": "5.1"
-  },
-  "6.17.1": {
-    "node_abi": 48,
-    "v8": "5.1"
-  },
-  "7.0.0": {
-    "node_abi": 51,
-    "v8": "5.4"
-  },
-  "7.1.0": {
-    "node_abi": 51,
-    "v8": "5.4"
-  },
-  "7.2.0": {
-    "node_abi": 51,
-    "v8": "5.4"
-  },
-  "7.2.1": {
-    "node_abi": 51,
-    "v8": "5.4"
-  },
-  "7.3.0": {
-    "node_abi": 51,
-    "v8": "5.4"
-  },
-  "7.4.0": {
-    "node_abi": 51,
-    "v8": "5.4"
-  },
-  "7.5.0": {
-    "node_abi": 51,
-    "v8": "5.4"
-  },
-  "7.6.0": {
-    "node_abi": 51,
-    "v8": "5.5"
-  },
-  "7.7.0": {
-    "node_abi": 51,
-    "v8": "5.5"
-  },
-  "7.7.1": {
-    "node_abi": 51,
-    "v8": "5.5"
-  },
-  "7.7.2": {
-    "node_abi": 51,
-    "v8": "5.5"
-  },
-  "7.7.3": {
-    "node_abi": 51,
-    "v8": "5.5"
-  },
-  "7.7.4": {
-    "node_abi": 51,
-    "v8": "5.5"
-  },
-  "7.8.0": {
-    "node_abi": 51,
-    "v8": "5.5"
-  },
-  "7.9.0": {
-    "node_abi": 51,
-    "v8": "5.5"
-  },
-  "7.10.0": {
-    "node_abi": 51,
-    "v8": "5.5"
-  },
-  "7.10.1": {
-    "node_abi": 51,
-    "v8": "5.5"
-  },
-  "8.0.0": {
-    "node_abi": 57,
-    "v8": "5.8"
-  },
-  "8.1.0": {
-    "node_abi": 57,
-    "v8": "5.8"
-  },
-  "8.1.1": {
-    "node_abi": 57,
-    "v8": "5.8"
-  },
-  "8.1.2": {
-    "node_abi": 57,
-    "v8": "5.8"
-  },
-  "8.1.3": {
-    "node_abi": 57,
-    "v8": "5.8"
-  },
-  "8.1.4": {
-    "node_abi": 57,
-    "v8": "5.8"
-  },
-  "8.2.0": {
-    "node_abi": 57,
-    "v8": "5.8"
-  },
-  "8.2.1": {
-    "node_abi": 57,
-    "v8": "5.8"
-  },
-  "8.3.0": {
-    "node_abi": 57,
-    "v8": "6.0"
-  },
-  "8.4.0": {
-    "node_abi": 57,
-    "v8": "6.0"
-  },
-  "8.5.0": {
-    "node_abi": 57,
-    "v8": "6.0"
-  },
-  "8.6.0": {
-    "node_abi": 57,
-    "v8": "6.0"
-  },
-  "8.7.0": {
-    "node_abi": 57,
-    "v8": "6.1"
-  },
-  "8.8.0": {
-    "node_abi": 57,
-    "v8": "6.1"
-  },
-  "8.8.1": {
-    "node_abi": 57,
-    "v8": "6.1"
-  },
-  "8.9.0": {
-    "node_abi": 57,
-    "v8": "6.1"
-  },
-  "8.9.1": {
-    "node_abi": 57,
-    "v8": "6.1"
-  },
-  "8.9.2": {
-    "node_abi": 57,
-    "v8": "6.1"
-  },
-  "8.9.3": {
-    "node_abi": 57,
-    "v8": "6.1"
-  },
-  "8.9.4": {
-    "node_abi": 57,
-    "v8": "6.1"
-  },
-  "8.10.0": {
-    "node_abi": 57,
-    "v8": "6.2"
-  },
-  "8.11.0": {
-    "node_abi": 57,
-    "v8": "6.2"
-  },
-  "8.11.1": {
-    "node_abi": 57,
-    "v8": "6.2"
-  },
-  "8.11.2": {
-    "node_abi": 57,
-    "v8": "6.2"
-  },
-  "8.11.3": {
-    "node_abi": 57,
-    "v8": "6.2"
-  },
-  "8.11.4": {
-    "node_abi": 57,
-    "v8": "6.2"
-  },
-  "8.12.0": {
-    "node_abi": 57,
-    "v8": "6.2"
-  },
-  "8.13.0": {
-    "node_abi": 57,
-    "v8": "6.2"
-  },
-  "8.14.0": {
-    "node_abi": 57,
-    "v8": "6.2"
-  },
-  "8.14.1": {
-    "node_abi": 57,
-    "v8": "6.2"
-  },
-  "8.15.0": {
-    "node_abi": 57,
-    "v8": "6.2"
-  },
-  "8.15.1": {
-    "node_abi": 57,
-    "v8": "6.2"
-  },
-  "8.16.0": {
-    "node_abi": 57,
-    "v8": "6.2"
-  },
-  "8.16.1": {
-    "node_abi": 57,
-    "v8": "6.2"
-  },
-  "8.16.2": {
-    "node_abi": 57,
-    "v8": "6.2"
-  },
-  "8.17.0": {
-    "node_abi": 57,
-    "v8": "6.2"
-  },
-  "9.0.0": {
-    "node_abi": 59,
-    "v8": "6.2"
-  },
-  "9.1.0": {
-    "node_abi": 59,
-    "v8": "6.2"
-  },
-  "9.2.0": {
-    "node_abi": 59,
-    "v8": "6.2"
-  },
-  "9.2.1": {
-    "node_abi": 59,
-    "v8": "6.2"
-  },
-  "9.3.0": {
-    "node_abi": 59,
-    "v8": "6.2"
-  },
-  "9.4.0": {
-    "node_abi": 59,
-    "v8": "6.2"
-  },
-  "9.5.0": {
-    "node_abi": 59,
-    "v8": "6.2"
-  },
-  "9.6.0": {
-    "node_abi": 59,
-    "v8": "6.2"
-  },
-  "9.6.1": {
-    "node_abi": 59,
-    "v8": "6.2"
-  },
-  "9.7.0": {
-    "node_abi": 59,
-    "v8": "6.2"
-  },
-  "9.7.1": {
-    "node_abi": 59,
-    "v8": "6.2"
-  },
-  "9.8.0": {
-    "node_abi": 59,
-    "v8": "6.2"
-  },
-  "9.9.0": {
-    "node_abi": 59,
-    "v8": "6.2"
-  },
-  "9.10.0": {
-    "node_abi": 59,
-    "v8": "6.2"
-  },
-  "9.10.1": {
-    "node_abi": 59,
-    "v8": "6.2"
-  },
-  "9.11.0": {
-    "node_abi": 59,
-    "v8": "6.2"
-  },
-  "9.11.1": {
-    "node_abi": 59,
-    "v8": "6.2"
-  },
-  "9.11.2": {
-    "node_abi": 59,
-    "v8": "6.2"
-  },
-  "10.0.0": {
-    "node_abi": 64,
-    "v8": "6.6"
-  },
-  "10.1.0": {
-    "node_abi": 64,
-    "v8": "6.6"
-  },
-  "10.2.0": {
-    "node_abi": 64,
-    "v8": "6.6"
-  },
-  "10.2.1": {
-    "node_abi": 64,
-    "v8": "6.6"
-  },
-  "10.3.0": {
-    "node_abi": 64,
-    "v8": "6.6"
-  },
-  "10.4.0": {
-    "node_abi": 64,
-    "v8": "6.7"
-  },
-  "10.4.1": {
-    "node_abi": 64,
-    "v8": "6.7"
-  },
-  "10.5.0": {
-    "node_abi": 64,
-    "v8": "6.7"
-  },
-  "10.6.0": {
-    "node_abi": 64,
-    "v8": "6.7"
-  },
-  "10.7.0": {
-    "node_abi": 64,
-    "v8": "6.7"
-  },
-  "10.8.0": {
-    "node_abi": 64,
-    "v8": "6.7"
-  },
-  "10.9.0": {
-    "node_abi": 64,
-    "v8": "6.8"
-  },
-  "10.10.0": {
-    "node_abi": 64,
-    "v8": "6.8"
-  },
-  "10.11.0": {
-    "node_abi": 64,
-    "v8": "6.8"
-  },
-  "10.12.0": {
-    "node_abi": 64,
-    "v8": "6.8"
-  },
-  "10.13.0": {
-    "node_abi": 64,
-    "v8": "6.8"
-  },
-  "10.14.0": {
-    "node_abi": 64,
-    "v8": "6.8"
-  },
-  "10.14.1": {
-    "node_abi": 64,
-    "v8": "6.8"
-  },
-  "10.14.2": {
-    "node_abi": 64,
-    "v8": "6.8"
-  },
-  "10.15.0": {
-    "node_abi": 64,
-    "v8": "6.8"
-  },
-  "10.15.1": {
-    "node_abi": 64,
-    "v8": "6.8"
-  },
-  "10.15.2": {
-    "node_abi": 64,
-    "v8": "6.8"
-  },
-  "10.15.3": {
-    "node_abi": 64,
-    "v8": "6.8"
-  },
-  "10.16.0": {
-    "node_abi": 64,
-    "v8": "6.8"
-  },
-  "10.16.1": {
-    "node_abi": 64,
-    "v8": "6.8"
-  },
-  "10.16.2": {
-    "node_abi": 64,
-    "v8": "6.8"
-  },
-  "10.16.3": {
-    "node_abi": 64,
-    "v8": "6.8"
-  },
-  "10.17.0": {
-    "node_abi": 64,
-    "v8": "6.8"
-  },
-  "10.18.0": {
-    "node_abi": 64,
-    "v8": "6.8"
-  },
-  "10.18.1": {
-    "node_abi": 64,
-    "v8": "6.8"
-  },
-  "10.19.0": {
-    "node_abi": 64,
-    "v8": "6.8"
-  },
-  "10.20.0": {
-    "node_abi": 64,
-    "v8": "6.8"
-  },
-  "10.20.1": {
-    "node_abi": 64,
-    "v8": "6.8"
-  },
-  "10.21.0": {
-    "node_abi": 64,
-    "v8": "6.8"
-  },
-  "10.22.0": {
-    "node_abi": 64,
-    "v8": "6.8"
-  },
-  "10.22.1": {
-    "node_abi": 64,
-    "v8": "6.8"
-  },
-  "10.23.0": {
-    "node_abi": 64,
-    "v8": "6.8"
-  },
-  "10.23.1": {
-    "node_abi": 64,
-    "v8": "6.8"
-  },
-  "10.23.2": {
-    "node_abi": 64,
-    "v8": "6.8"
-  },
-  "10.23.3": {
-    "node_abi": 64,
-    "v8": "6.8"
-  },
-  "10.24.0": {
-    "node_abi": 64,
-    "v8": "6.8"
-  },
-  "10.24.1": {
-    "node_abi": 64,
-    "v8": "6.8"
-  },
-  "11.0.0": {
-    "node_abi": 67,
-    "v8": "7.0"
-  },
-  "11.1.0": {
-    "node_abi": 67,
-    "v8": "7.0"
-  },
-  "11.2.0": {
-    "node_abi": 67,
-    "v8": "7.0"
-  },
-  "11.3.0": {
-    "node_abi": 67,
-    "v8": "7.0"
-  },
-  "11.4.0": {
-    "node_abi": 67,
-    "v8": "7.0"
-  },
-  "11.5.0": {
-    "node_abi": 67,
-    "v8": "7.0"
-  },
-  "11.6.0": {
-    "node_abi": 67,
-    "v8": "7.0"
-  },
-  "11.7.0": {
-    "node_abi": 67,
-    "v8": "7.0"
-  },
-  "11.8.0": {
-    "node_abi": 67,
-    "v8": "7.0"
-  },
-  "11.9.0": {
-    "node_abi": 67,
-    "v8": "7.0"
-  },
-  "11.10.0": {
-    "node_abi": 67,
-    "v8": "7.0"
-  },
-  "11.10.1": {
-    "node_abi": 67,
-    "v8": "7.0"
-  },
-  "11.11.0": {
-    "node_abi": 67,
-    "v8": "7.0"
-  },
-  "11.12.0": {
-    "node_abi": 67,
-    "v8": "7.0"
-  },
-  "11.13.0": {
-    "node_abi": 67,
-    "v8": "7.0"
-  },
-  "11.14.0": {
-    "node_abi": 67,
-    "v8": "7.0"
-  },
-  "11.15.0": {
-    "node_abi": 67,
-    "v8": "7.0"
-  },
-  "12.0.0": {
-    "node_abi": 72,
-    "v8": "7.4"
-  },
-  "12.1.0": {
-    "node_abi": 72,
-    "v8": "7.4"
-  },
-  "12.2.0": {
-    "node_abi": 72,
-    "v8": "7.4"
-  },
-  "12.3.0": {
-    "node_abi": 72,
-    "v8": "7.4"
-  },
-  "12.3.1": {
-    "node_abi": 72,
-    "v8": "7.4"
-  },
-  "12.4.0": {
-    "node_abi": 72,
-    "v8": "7.4"
-  },
-  "12.5.0": {
-    "node_abi": 72,
-    "v8": "7.5"
-  },
-  "12.6.0": {
-    "node_abi": 72,
-    "v8": "7.5"
-  },
-  "12.7.0": {
-    "node_abi": 72,
-    "v8": "7.5"
-  },
-  "12.8.0": {
-    "node_abi": 72,
-    "v8": "7.5"
-  },
-  "12.8.1": {
-    "node_abi": 72,
-    "v8": "7.5"
-  },
-  "12.9.0": {
-    "node_abi": 72,
-    "v8": "7.6"
-  },
-  "12.9.1": {
-    "node_abi": 72,
-    "v8": "7.6"
-  },
-  "12.10.0": {
-    "node_abi": 72,
-    "v8": "7.6"
-  },
-  "12.11.0": {
-    "node_abi": 72,
-    "v8": "7.7"
-  },
-  "12.11.1": {
-    "node_abi": 72,
-    "v8": "7.7"
-  },
-  "12.12.0": {
-    "node_abi": 72,
-    "v8": "7.7"
-  },
-  "12.13.0": {
-    "node_abi": 72,
-    "v8": "7.7"
-  },
-  "12.13.1": {
-    "node_abi": 72,
-    "v8": "7.7"
-  },
-  "12.14.0": {
-    "node_abi": 72,
-    "v8": "7.7"
-  },
-  "12.14.1": {
-    "node_abi": 72,
-    "v8": "7.7"
-  },
-  "12.15.0": {
-    "node_abi": 72,
-    "v8": "7.7"
-  },
-  "12.16.0": {
-    "node_abi": 72,
-    "v8": "7.8"
-  },
-  "12.16.1": {
-    "node_abi": 72,
-    "v8": "7.8"
-  },
-  "12.16.2": {
-    "node_abi": 72,
-    "v8": "7.8"
-  },
-  "12.16.3": {
-    "node_abi": 72,
-    "v8": "7.8"
-  },
-  "12.17.0": {
-    "node_abi": 72,
-    "v8": "7.8"
-  },
-  "12.18.0": {
-    "node_abi": 72,
-    "v8": "7.8"
-  },
-  "12.18.1": {
-    "node_abi": 72,
-    "v8": "7.8"
-  },
-  "12.18.2": {
-    "node_abi": 72,
-    "v8": "7.8"
-  },
-  "12.18.3": {
-    "node_abi": 72,
-    "v8": "7.8"
-  },
-  "12.18.4": {
-    "node_abi": 72,
-    "v8": "7.8"
-  },
-  "12.19.0": {
-    "node_abi": 72,
-    "v8": "7.8"
-  },
-  "12.19.1": {
-    "node_abi": 72,
-    "v8": "7.8"
-  },
-  "12.20.0": {
-    "node_abi": 72,
-    "v8": "7.8"
-  },
-  "12.20.1": {
-    "node_abi": 72,
-    "v8": "7.8"
-  },
-  "12.20.2": {
-    "node_abi": 72,
-    "v8": "7.8"
-  },
-  "12.21.0": {
-    "node_abi": 72,
-    "v8": "7.8"
-  },
-  "12.22.0": {
-    "node_abi": 72,
-    "v8": "7.8"
-  },
-  "12.22.1": {
-    "node_abi": 72,
-    "v8": "7.8"
-  },
-  "12.22.2": {
-    "node_abi": 72,
-    "v8": "7.8"
-  },
-  "12.22.3": {
-    "node_abi": 72,
-    "v8": "7.8"
-  },
-  "12.22.4": {
-    "node_abi": 72,
-    "v8": "7.8"
-  },
-  "12.22.5": {
-    "node_abi": 72,
-    "v8": "7.8"
-  },
-  "12.22.6": {
-    "node_abi": 72,
-    "v8": "7.8"
-  },
-  "12.22.7": {
-    "node_abi": 72,
-    "v8": "7.8"
-  },
-  "13.0.0": {
-    "node_abi": 79,
-    "v8": "7.8"
-  },
-  "13.0.1": {
-    "node_abi": 79,
-    "v8": "7.8"
-  },
-  "13.1.0": {
-    "node_abi": 79,
-    "v8": "7.8"
-  },
-  "13.2.0": {
-    "node_abi": 79,
-    "v8": "7.9"
-  },
-  "13.3.0": {
-    "node_abi": 79,
-    "v8": "7.9"
-  },
-  "13.4.0": {
-    "node_abi": 79,
-    "v8": "7.9"
-  },
-  "13.5.0": {
-    "node_abi": 79,
-    "v8": "7.9"
-  },
-  "13.6.0": {
-    "node_abi": 79,
-    "v8": "7.9"
-  },
-  "13.7.0": {
-    "node_abi": 79,
-    "v8": "7.9"
-  },
-  "13.8.0": {
-    "node_abi": 79,
-    "v8": "7.9"
-  },
-  "13.9.0": {
-    "node_abi": 79,
-    "v8": "7.9"
-  },
-  "13.10.0": {
-    "node_abi": 79,
-    "v8": "7.9"
-  },
-  "13.10.1": {
-    "node_abi": 79,
-    "v8": "7.9"
-  },
-  "13.11.0": {
-    "node_abi": 79,
-    "v8": "7.9"
-  },
-  "13.12.0": {
-    "node_abi": 79,
-    "v8": "7.9"
-  },
-  "13.13.0": {
-    "node_abi": 79,
-    "v8": "7.9"
-  },
-  "13.14.0": {
-    "node_abi": 79,
-    "v8": "7.9"
-  },
-  "14.0.0": {
-    "node_abi": 83,
-    "v8": "8.1"
-  },
-  "14.1.0": {
-    "node_abi": 83,
-    "v8": "8.1"
-  },
-  "14.2.0": {
-    "node_abi": 83,
-    "v8": "8.1"
-  },
-  "14.3.0": {
-    "node_abi": 83,
-    "v8": "8.1"
-  },
-  "14.4.0": {
-    "node_abi": 83,
-    "v8": "8.1"
-  },
-  "14.5.0": {
-    "node_abi": 83,
-    "v8": "8.3"
-  },
-  "14.6.0": {
-    "node_abi": 83,
-    "v8": "8.4"
-  },
-  "14.7.0": {
-    "node_abi": 83,
-    "v8": "8.4"
-  },
-  "14.8.0": {
-    "node_abi": 83,
-    "v8": "8.4"
-  },
-  "14.9.0": {
-    "node_abi": 83,
-    "v8": "8.4"
-  },
-  "14.10.0": {
-    "node_abi": 83,
-    "v8": "8.4"
-  },
-  "14.10.1": {
-    "node_abi": 83,
-    "v8": "8.4"
-  },
-  "14.11.0": {
-    "node_abi": 83,
-    "v8": "8.4"
-  },
-  "14.12.0": {
-    "node_abi": 83,
-    "v8": "8.4"
-  },
-  "14.13.0": {
-    "node_abi": 83,
-    "v8": "8.4"
-  },
-  "14.13.1": {
-    "node_abi": 83,
-    "v8": "8.4"
-  },
-  "14.14.0": {
-    "node_abi": 83,
-    "v8": "8.4"
-  },
-  "14.15.0": {
-    "node_abi": 83,
-    "v8": "8.4"
-  },
-  "14.15.1": {
-    "node_abi": 83,
-    "v8": "8.4"
-  },
-  "14.15.2": {
-    "node_abi": 83,
-    "v8": "8.4"
-  },
-  "14.15.3": {
-    "node_abi": 83,
-    "v8": "8.4"
-  },
-  "14.15.4": {
-    "node_abi": 83,
-    "v8": "8.4"
-  },
-  "14.15.5": {
-    "node_abi": 83,
-    "v8": "8.4"
-  },
-  "14.16.0": {
-    "node_abi": 83,
-    "v8": "8.4"
-  },
-  "14.16.1": {
-    "node_abi": 83,
-    "v8": "8.4"
-  },
-  "14.17.0": {
-    "node_abi": 83,
-    "v8": "8.4"
-  },
-  "14.17.1": {
-    "node_abi": 83,
-    "v8": "8.4"
-  },
-  "14.17.2": {
-    "node_abi": 83,
-    "v8": "8.4"
-  },
-  "14.17.3": {
-    "node_abi": 83,
-    "v8": "8.4"
-  },
-  "14.17.4": {
-    "node_abi": 83,
-    "v8": "8.4"
-  },
-  "14.17.5": {
-    "node_abi": 83,
-    "v8": "8.4"
-  },
-  "14.17.6": {
-    "node_abi": 83,
-    "v8": "8.4"
-  },
-  "14.18.0": {
-    "node_abi": 83,
-    "v8": "8.4"
-  },
-  "14.18.1": {
-    "node_abi": 83,
-    "v8": "8.4"
-  },
-  "15.0.0": {
-    "node_abi": 88,
-    "v8": "8.6"
-  },
-  "15.0.1": {
-    "node_abi": 88,
-    "v8": "8.6"
-  },
-  "15.1.0": {
-    "node_abi": 88,
-    "v8": "8.6"
-  },
-  "15.2.0": {
-    "node_abi": 88,
-    "v8": "8.6"
-  },
-  "15.2.1": {
-    "node_abi": 88,
-    "v8": "8.6"
-  },
-  "15.3.0": {
-    "node_abi": 88,
-    "v8": "8.6"
-  },
-  "15.4.0": {
-    "node_abi": 88,
-    "v8": "8.6"
-  },
-  "15.5.0": {
-    "node_abi": 88,
-    "v8": "8.6"
-  },
-  "15.5.1": {
-    "node_abi": 88,
-    "v8": "8.6"
-  },
-  "15.6.0": {
-    "node_abi": 88,
-    "v8": "8.6"
-  },
-  "15.7.0": {
-    "node_abi": 88,
-    "v8": "8.6"
-  },
-  "15.8.0": {
-    "node_abi": 88,
-    "v8": "8.6"
-  },
-  "15.9.0": {
-    "node_abi": 88,
-    "v8": "8.6"
-  },
-  "15.10.0": {
-    "node_abi": 88,
-    "v8": "8.6"
-  },
-  "15.11.0": {
-    "node_abi": 88,
-    "v8": "8.6"
-  },
-  "15.12.0": {
-    "node_abi": 88,
-    "v8": "8.6"
-  },
-  "15.13.0": {
-    "node_abi": 88,
-    "v8": "8.6"
-  },
-  "15.14.0": {
-    "node_abi": 88,
-    "v8": "8.6"
-  },
-  "16.0.0": {
-    "node_abi": 93,
-    "v8": "9.0"
-  },
-  "16.1.0": {
-    "node_abi": 93,
-    "v8": "9.0"
-  },
-  "16.2.0": {
-    "node_abi": 93,
-    "v8": "9.0"
-  },
-  "16.3.0": {
-    "node_abi": 93,
-    "v8": "9.0"
-  },
-  "16.4.0": {
-    "node_abi": 93,
-    "v8": "9.1"
-  },
-  "16.4.1": {
-    "node_abi": 93,
-    "v8": "9.1"
-  },
-  "16.4.2": {
-    "node_abi": 93,
-    "v8": "9.1"
-  },
-  "16.5.0": {
-    "node_abi": 93,
-    "v8": "9.1"
-  },
-  "16.6.0": {
-    "node_abi": 93,
-    "v8": "9.2"
-  },
-  "16.6.1": {
-    "node_abi": 93,
-    "v8": "9.2"
-  },
-  "16.6.2": {
-    "node_abi": 93,
-    "v8": "9.2"
-  },
-  "16.7.0": {
-    "node_abi": 93,
-    "v8": "9.2"
-  },
-  "16.8.0": {
-    "node_abi": 93,
-    "v8": "9.2"
-  },
-  "16.9.0": {
-    "node_abi": 93,
-    "v8": "9.3"
-  },
-  "16.9.1": {
-    "node_abi": 93,
-    "v8": "9.3"
-  },
-  "16.10.0": {
-    "node_abi": 93,
-    "v8": "9.3"
-  },
-  "16.11.0": {
-    "node_abi": 93,
-    "v8": "9.4"
-  },
-  "16.11.1": {
-    "node_abi": 93,
-    "v8": "9.4"
-  },
-  "16.12.0": {
-    "node_abi": 93,
-    "v8": "9.4"
-  },
-  "16.13.0": {
-    "node_abi": 93,
-    "v8": "9.4"
-  },
-  "17.0.0": {
-    "node_abi": 102,
-    "v8": "9.5"
-  },
-  "17.0.1": {
-    "node_abi": 102,
-    "v8": "9.5"
-  },
-  "17.1.0": {
-    "node_abi": 102,
-    "v8": "9.5"
-  }
-}

+ 0 - 93
rag-server/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js

@@ -1,93 +0,0 @@
-'use strict';
-
-module.exports = exports;
-
-const fs = require('fs');
-const path = require('path');
-const win = process.platform === 'win32';
-const existsSync = fs.existsSync || path.existsSync;
-const cp = require('child_process');
-
-// try to build up the complete path to node-gyp
-/* priority:
-  - node-gyp on ENV:npm_config_node_gyp (https://github.com/npm/npm/pull/4887)
-  - node-gyp on NODE_PATH
-  - node-gyp inside npm on NODE_PATH (ignore on iojs)
-  - node-gyp inside npm beside node exe
-*/
-function which_node_gyp() {
-  let node_gyp_bin;
-  if (process.env.npm_config_node_gyp) {
-    try {
-      node_gyp_bin = process.env.npm_config_node_gyp;
-      if (existsSync(node_gyp_bin)) {
-        return node_gyp_bin;
-      }
-    } catch (err) {
-      // do nothing
-    }
-  }
-  try {
-    const node_gyp_main = require.resolve('node-gyp'); // eslint-disable-line node/no-missing-require
-    node_gyp_bin = path.join(path.dirname(
-      path.dirname(node_gyp_main)),
-    'bin/node-gyp.js');
-    if (existsSync(node_gyp_bin)) {
-      return node_gyp_bin;
-    }
-  } catch (err) {
-    // do nothing
-  }
-  if (process.execPath.indexOf('iojs') === -1) {
-    try {
-      const npm_main = require.resolve('npm'); // eslint-disable-line node/no-missing-require
-      node_gyp_bin = path.join(path.dirname(
-        path.dirname(npm_main)),
-      'node_modules/node-gyp/bin/node-gyp.js');
-      if (existsSync(node_gyp_bin)) {
-        return node_gyp_bin;
-      }
-    } catch (err) {
-      // do nothing
-    }
-  }
-  const npm_base = path.join(path.dirname(
-    path.dirname(process.execPath)),
-  'lib/node_modules/npm/');
-  node_gyp_bin = path.join(npm_base, 'node_modules/node-gyp/bin/node-gyp.js');
-  if (existsSync(node_gyp_bin)) {
-    return node_gyp_bin;
-  }
-}
-
-module.exports.run_gyp = function(args, opts, callback) {
-  let shell_cmd = '';
-  const cmd_args = [];
-  if (opts.runtime && opts.runtime === 'node-webkit') {
-    shell_cmd = 'nw-gyp';
-    if (win) shell_cmd += '.cmd';
-  } else {
-    const node_gyp_path = which_node_gyp();
-    if (node_gyp_path) {
-      shell_cmd = process.execPath;
-      cmd_args.push(node_gyp_path);
-    } else {
-      shell_cmd = 'node-gyp';
-      if (win) shell_cmd += '.cmd';
-    }
-  }
-  const final_args = cmd_args.concat(args);
-  const cmd = cp.spawn(shell_cmd, final_args, { cwd: undefined, env: process.env, stdio: [0, 1, 2] });
-  cmd.on('error', (err) => {
-    if (err) {
-      return callback(new Error("Failed to execute '" + shell_cmd + ' ' + final_args.join(' ') + "' (" + err + ')'));
-    }
-    callback(null, opts);
-  });
-  cmd.on('close', (code) => {
-    if (code && code !== 0) {
-      return callback(new Error("Failed to execute '" + shell_cmd + ' ' + final_args.join(' ') + "' (" + code + ')'));
-    }
-    callback(null, opts);
-  });
-};

+ 0 - 102
rag-server/node_modules/@mapbox/node-pre-gyp/lib/util/handle_gyp_opts.js

@@ -1,102 +0,0 @@
-'use strict';
-
-module.exports = exports = handle_gyp_opts;
-
-const versioning = require('./versioning.js');
-const napi = require('./napi.js');
-
-/*
-
-Here we gather node-pre-gyp generated options (from versioning) and pass them along to node-gyp.
-
-We massage the args and options slightly to account for differences in what commands mean between
-node-pre-gyp and node-gyp (e.g. see the difference between "build" and "rebuild" below)
-
-Keep in mind: the values inside `argv` and `gyp.opts` below are different depending on whether
-node-pre-gyp is called directory, or if it is called in a `run-script` phase of npm.
-
-We also try to preserve any command line options that might have been passed to npm or node-pre-gyp.
-But this is fairly difficult without passing way to much through. For example `gyp.opts` contains all
-the process.env and npm pushes a lot of variables into process.env which node-pre-gyp inherits. So we have
-to be very selective about what we pass through.
-
-For example:
-
-`npm install --build-from-source` will give:
-
-argv == [ 'rebuild' ]
-gyp.opts.argv == { remain: [ 'install' ],
-  cooked: [ 'install', '--fallback-to-build' ],
-  original: [ 'install', '--fallback-to-build' ] }
-
-`./bin/node-pre-gyp build` will give:
-
-argv == []
-gyp.opts.argv == { remain: [ 'build' ],
-  cooked: [ 'build' ],
-  original: [ '-C', 'test/app1', 'build' ] }
-
-*/
-
-// select set of node-pre-gyp versioning info
-// to share with node-gyp
-const share_with_node_gyp = [
-  'module',
-  'module_name',
-  'module_path',
-  'napi_version',
-  'node_abi_napi',
-  'napi_build_version',
-  'node_napi_label'
-];
-
-function handle_gyp_opts(gyp, argv, callback) {
-
-  // Collect node-pre-gyp specific variables to pass to node-gyp
-  const node_pre_gyp_options = [];
-  // generate custom node-pre-gyp versioning info
-  const napi_build_version = napi.get_napi_build_version_from_command_args(argv);
-  const opts = versioning.evaluate(gyp.package_json, gyp.opts, napi_build_version);
-  share_with_node_gyp.forEach((key) => {
-    const val = opts[key];
-    if (val) {
-      node_pre_gyp_options.push('--' + key + '=' + val);
-    } else if (key === 'napi_build_version') {
-      node_pre_gyp_options.push('--' + key + '=0');
-    } else {
-      if (key !== 'napi_version' && key !== 'node_abi_napi')
-        return callback(new Error('Option ' + key + ' required but not found by node-pre-gyp'));
-    }
-  });
-
-  // Collect options that follow the special -- which disables nopt parsing
-  const unparsed_options = [];
-  let double_hyphen_found = false;
-  gyp.opts.argv.original.forEach((opt) => {
-    if (double_hyphen_found) {
-      unparsed_options.push(opt);
-    }
-    if (opt === '--') {
-      double_hyphen_found = true;
-    }
-  });
-
-  // We try respect and pass through remaining command
-  // line options (like --foo=bar) to node-gyp
-  const cooked = gyp.opts.argv.cooked;
-  const node_gyp_options = [];
-  cooked.forEach((value) => {
-    if (value.length > 2 && value.slice(0, 2) === '--') {
-      const key = value.slice(2);
-      const val = cooked[cooked.indexOf(value) + 1];
-      if (val && val.indexOf('--') === -1) { // handle '--foo=bar' or ['--foo','bar']
-        node_gyp_options.push('--' + key + '=' + val);
-      } else { // pass through --foo
-        node_gyp_options.push(value);
-      }
-    }
-  });
-
-  const result = { 'opts': opts, 'gyp': node_gyp_options, 'pre': node_pre_gyp_options, 'unparsed': unparsed_options };
-  return callback(null, result);
-}

+ 0 - 205
rag-server/node_modules/@mapbox/node-pre-gyp/lib/util/napi.js

@@ -1,205 +0,0 @@
-'use strict';
-
-const fs = require('fs');
-
-module.exports = exports;
-
-const versionArray = process.version
-  .substr(1)
-  .replace(/-.*$/, '')
-  .split('.')
-  .map((item) => {
-    return +item;
-  });
-
-const napi_multiple_commands = [
-  'build',
-  'clean',
-  'configure',
-  'package',
-  'publish',
-  'reveal',
-  'testbinary',
-  'testpackage',
-  'unpublish'
-];
-
-const napi_build_version_tag = 'napi_build_version=';
-
-module.exports.get_napi_version = function() {
-  // returns the non-zero numeric napi version or undefined if napi is not supported.
-  // correctly supporting target requires an updated cross-walk
-  let version = process.versions.napi; // can be undefined
-  if (!version) { // this code should never need to be updated
-    if (versionArray[0] === 9 && versionArray[1] >= 3) version = 2; // 9.3.0+
-    else if (versionArray[0] === 8) version = 1; // 8.0.0+
-  }
-  return version;
-};
-
-module.exports.get_napi_version_as_string = function(target) {
-  // returns the napi version as a string or an empty string if napi is not supported.
-  const version = module.exports.get_napi_version(target);
-  return version ? '' + version : '';
-};
-
-module.exports.validate_package_json = function(package_json, opts) { // throws Error
-
-  const binary = package_json.binary;
-  const module_path_ok = pathOK(binary.module_path);
-  const remote_path_ok = pathOK(binary.remote_path);
-  const package_name_ok = pathOK(binary.package_name);
-  const napi_build_versions = module.exports.get_napi_build_versions(package_json, opts, true);
-  const napi_build_versions_raw = module.exports.get_napi_build_versions_raw(package_json);
-
-  if (napi_build_versions) {
-    napi_build_versions.forEach((napi_build_version)=> {
-      if (!(parseInt(napi_build_version, 10) === napi_build_version && napi_build_version > 0)) {
-        throw new Error('All values specified in napi_versions must be positive integers.');
-      }
-    });
-  }
-
-  if (napi_build_versions && (!module_path_ok || (!remote_path_ok && !package_name_ok))) {
-    throw new Error('When napi_versions is specified; module_path and either remote_path or ' +
-			"package_name must contain the substitution string '{napi_build_version}`.");
-  }
-
-  if ((module_path_ok || remote_path_ok || package_name_ok) && !napi_build_versions_raw) {
-    throw new Error("When the substitution string '{napi_build_version}` is specified in " +
-			'module_path, remote_path, or package_name; napi_versions must also be specified.');
-  }
-
-  if (napi_build_versions && !module.exports.get_best_napi_build_version(package_json, opts) &&
-	module.exports.build_napi_only(package_json)) {
-    throw new Error(
-      'The Node-API version of this Node instance is ' + module.exports.get_napi_version(opts ? opts.target : undefined) + '. ' +
-			'This module supports Node-API version(s) ' + module.exports.get_napi_build_versions_raw(package_json) + '. ' +
-			'This Node instance cannot run this module.');
-  }
-
-  if (napi_build_versions_raw && !napi_build_versions && module.exports.build_napi_only(package_json)) {
-    throw new Error(
-      'The Node-API version of this Node instance is ' + module.exports.get_napi_version(opts ? opts.target : undefined) + '. ' +
-			'This module supports Node-API version(s) ' + module.exports.get_napi_build_versions_raw(package_json) + '. ' +
-			'This Node instance cannot run this module.');
-  }
-
-};
-
-function pathOK(path) {
-  return path && (path.indexOf('{napi_build_version}') !== -1 || path.indexOf('{node_napi_label}') !== -1);
-}
-
-module.exports.expand_commands = function(package_json, opts, commands) {
-  const expanded_commands = [];
-  const napi_build_versions = module.exports.get_napi_build_versions(package_json, opts);
-  commands.forEach((command)=> {
-    if (napi_build_versions && command.name === 'install') {
-      const napi_build_version = module.exports.get_best_napi_build_version(package_json, opts);
-      const args = napi_build_version ? [napi_build_version_tag + napi_build_version] : [];
-      expanded_commands.push({ name: command.name, args: args });
-    } else if (napi_build_versions && napi_multiple_commands.indexOf(command.name) !== -1) {
-      napi_build_versions.forEach((napi_build_version)=> {
-        const args = command.args.slice();
-        args.push(napi_build_version_tag + napi_build_version);
-        expanded_commands.push({ name: command.name, args: args });
-      });
-    } else {
-      expanded_commands.push(command);
-    }
-  });
-  return expanded_commands;
-};
-
-module.exports.get_napi_build_versions = function(package_json, opts, warnings) { // opts may be undefined
-  const log = require('npmlog');
-  let napi_build_versions = [];
-  const supported_napi_version = module.exports.get_napi_version(opts ? opts.target : undefined);
-  // remove duplicates, verify each napi version can actaully be built
-  if (package_json.binary && package_json.binary.napi_versions) {
-    package_json.binary.napi_versions.forEach((napi_version) => {
-      const duplicated = napi_build_versions.indexOf(napi_version) !== -1;
-      if (!duplicated && supported_napi_version && napi_version <= supported_napi_version) {
-        napi_build_versions.push(napi_version);
-      } else if (warnings && !duplicated && supported_napi_version) {
-        log.info('This Node instance does not support builds for Node-API version', napi_version);
-      }
-    });
-  }
-  if (opts && opts['build-latest-napi-version-only']) {
-    let latest_version = 0;
-    napi_build_versions.forEach((napi_version) => {
-      if (napi_version > latest_version) latest_version = napi_version;
-    });
-    napi_build_versions = latest_version ? [latest_version] : [];
-  }
-  return napi_build_versions.length ? napi_build_versions : undefined;
-};
-
-module.exports.get_napi_build_versions_raw = function(package_json) {
-  const napi_build_versions = [];
-  // remove duplicates
-  if (package_json.binary && package_json.binary.napi_versions) {
-    package_json.binary.napi_versions.forEach((napi_version) => {
-      if (napi_build_versions.indexOf(napi_version) === -1) {
-        napi_build_versions.push(napi_version);
-      }
-    });
-  }
-  return napi_build_versions.length ? napi_build_versions : undefined;
-};
-
-module.exports.get_command_arg = function(napi_build_version) {
-  return napi_build_version_tag + napi_build_version;
-};
-
-module.exports.get_napi_build_version_from_command_args = function(command_args) {
-  for (let i = 0; i < command_args.length; i++) {
-    const arg = command_args[i];
-    if (arg.indexOf(napi_build_version_tag) === 0) {
-      return parseInt(arg.substr(napi_build_version_tag.length), 10);
-    }
-  }
-  return undefined;
-};
-
-module.exports.swap_build_dir_out = function(napi_build_version) {
-  if (napi_build_version) {
-    const rm = require('rimraf');
-    rm.sync(module.exports.get_build_dir(napi_build_version));
-    fs.renameSync('build', module.exports.get_build_dir(napi_build_version));
-  }
-};
-
-module.exports.swap_build_dir_in = function(napi_build_version) {
-  if (napi_build_version) {
-    const rm = require('rimraf');
-    rm.sync('build');
-    fs.renameSync(module.exports.get_build_dir(napi_build_version), 'build');
-  }
-};
-
-module.exports.get_build_dir = function(napi_build_version) {
-  return 'build-tmp-napi-v' + napi_build_version;
-};
-
-module.exports.get_best_napi_build_version = function(package_json, opts) {
-  let best_napi_build_version = 0;
-  const napi_build_versions = module.exports.get_napi_build_versions(package_json, opts);
-  if (napi_build_versions) {
-    const our_napi_version = module.exports.get_napi_version(opts ? opts.target : undefined);
-    napi_build_versions.forEach((napi_build_version)=> {
-      if (napi_build_version > best_napi_build_version &&
-				napi_build_version <= our_napi_version) {
-        best_napi_build_version = napi_build_version;
-      }
-    });
-  }
-  return best_napi_build_version === 0 ? undefined : best_napi_build_version;
-};
-
-module.exports.build_napi_only = function(package_json) {
-  return package_json.binary && package_json.binary.package_name &&
-	package_json.binary.package_name.indexOf('{node_napi_label}') === -1;
-};

+ 0 - 26
rag-server/node_modules/@mapbox/node-pre-gyp/lib/util/nw-pre-gyp/index.html

@@ -1,26 +0,0 @@
-<!doctype html>
-<html>
-<head>
-<meta charset="utf-8">
-<title>Node-webkit-based module test</title>
-<script>
-function nwModuleTest(){
-   var util = require('util');
-   var moduleFolder = require('nw.gui').App.argv[0];
-   try {
-      require(moduleFolder);
-   } catch(e) {
-      if( process.platform !== 'win32' ){
-         util.log('nw-pre-gyp error:');
-         util.log(e.stack);
-      }
-      process.exit(1);
-   }
-   process.exit(0);
-}
-</script>
-</head>
-<body onload="nwModuleTest()">
-<h1>Node-webkit-based module test</h1>
-</body>
-</html>

+ 0 - 9
rag-server/node_modules/@mapbox/node-pre-gyp/lib/util/nw-pre-gyp/package.json

@@ -1,9 +0,0 @@
-{
-"main": "index.html",
-"name": "nw-pre-gyp-module-test",
-"description": "Node-webkit-based module test.",
-"version": "0.0.1",
-"window": {
-   "show": false
-}
-}

+ 0 - 163
rag-server/node_modules/@mapbox/node-pre-gyp/lib/util/s3_setup.js

@@ -1,163 +0,0 @@
-'use strict';
-
-module.exports = exports;
-
-const url = require('url');
-const fs = require('fs');
-const path = require('path');
-
-module.exports.detect = function(opts, config) {
-  const to = opts.hosted_path;
-  const uri = url.parse(to);
-  config.prefix = (!uri.pathname || uri.pathname === '/') ? '' : uri.pathname.replace('/', '');
-  if (opts.bucket && opts.region) {
-    config.bucket = opts.bucket;
-    config.region = opts.region;
-    config.endpoint = opts.host;
-    config.s3ForcePathStyle = opts.s3ForcePathStyle;
-  } else {
-    const parts = uri.hostname.split('.s3');
-    const bucket = parts[0];
-    if (!bucket) {
-      return;
-    }
-    if (!config.bucket) {
-      config.bucket = bucket;
-    }
-    if (!config.region) {
-      const region = parts[1].slice(1).split('.')[0];
-      if (region === 'amazonaws') {
-        config.region = 'us-east-1';
-      } else {
-        config.region = region;
-      }
-    }
-  }
-};
-
-module.exports.get_s3 = function(config) {
-
-  if (process.env.node_pre_gyp_mock_s3) {
-    // here we're mocking. node_pre_gyp_mock_s3 is the scratch directory
-    // for the mock code.
-    const AWSMock = require('mock-aws-s3');
-    const os = require('os');
-
-    AWSMock.config.basePath = `${os.tmpdir()}/mock`;
-
-    const s3 = AWSMock.S3();
-
-    // wrapped callback maker. fs calls return code of ENOENT but AWS.S3 returns
-    // NotFound.
-    const wcb = (fn) => (err, ...args) => {
-      if (err && err.code === 'ENOENT') {
-        err.code = 'NotFound';
-      }
-      return fn(err, ...args);
-    };
-
-    return {
-      listObjects(params, callback) {
-        return s3.listObjects(params, wcb(callback));
-      },
-      headObject(params, callback) {
-        return s3.headObject(params, wcb(callback));
-      },
-      deleteObject(params, callback) {
-        return s3.deleteObject(params, wcb(callback));
-      },
-      putObject(params, callback) {
-        return s3.putObject(params, wcb(callback));
-      }
-    };
-  }
-
-  // if not mocking then setup real s3.
-  const AWS = require('aws-sdk');
-
-  AWS.config.update(config);
-  const s3 = new AWS.S3();
-
-  // need to change if additional options need to be specified.
-  return {
-    listObjects(params, callback) {
-      return s3.listObjects(params, callback);
-    },
-    headObject(params, callback) {
-      return s3.headObject(params, callback);
-    },
-    deleteObject(params, callback) {
-      return s3.deleteObject(params, callback);
-    },
-    putObject(params, callback) {
-      return s3.putObject(params, callback);
-    }
-  };
-
-
-
-};
-
-//
-// function to get the mocking control function. if not mocking it returns a no-op.
-//
-// if mocking it sets up the mock http interceptors that use the mocked s3 file system
-// to fulfill reponses.
-module.exports.get_mockS3Http = function() {
-  let mock_s3 = false;
-  if (!process.env.node_pre_gyp_mock_s3) {
-    return () => mock_s3;
-  }
-
-  const nock = require('nock');
-  // the bucket used for testing, as addressed by https.
-  const host = 'https://mapbox-node-pre-gyp-public-testing-bucket.s3.us-east-1.amazonaws.com';
-  const mockDir = process.env.node_pre_gyp_mock_s3 + '/mapbox-node-pre-gyp-public-testing-bucket';
-
-  // function to setup interceptors. they are "turned off" by setting mock_s3 to false.
-  const mock_http = () => {
-    // eslint-disable-next-line no-unused-vars
-    function get(uri, requestBody) {
-      const filepath = path.join(mockDir, uri.replace('%2B', '+'));
-
-      try {
-        fs.accessSync(filepath, fs.constants.R_OK);
-      } catch (e) {
-        return [404, 'not found\n'];
-      }
-
-      // the mock s3 functions just write to disk, so just read from it.
-      return [200, fs.createReadStream(filepath)];
-    }
-
-    // eslint-disable-next-line no-unused-vars
-    return nock(host)
-      .persist()
-      .get(() => mock_s3) // mock any uri for s3 when true
-      .reply(get);
-  };
-
-  // setup interceptors. they check the mock_s3 flag to determine whether to intercept.
-  mock_http(nock, host, mockDir);
-  // function to turn matching all requests to s3 on/off.
-  const mockS3Http = (action) => {
-    const previous = mock_s3;
-    if (action === 'off') {
-      mock_s3 = false;
-    } else if (action === 'on') {
-      mock_s3 = true;
-    } else if (action !== 'get') {
-      throw new Error(`illegal action for setMockHttp ${action}`);
-    }
-    return previous;
-  };
-
-  // call mockS3Http with the argument
-  // - 'on' - turn it on
-  // - 'off' - turn it off (used by fetch.test.js so it doesn't interfere with redirects)
-  // - 'get' - return true or false for 'on' or 'off'
-  return mockS3Http;
-};
-
-
-

+ 0 - 335
rag-server/node_modules/@mapbox/node-pre-gyp/lib/util/versioning.js

@@ -1,335 +0,0 @@
-'use strict';
-
-module.exports = exports;
-
-const path = require('path');
-const semver = require('semver');
-const url = require('url');
-const detect_libc = require('detect-libc');
-const napi = require('./napi.js');
-
-let abi_crosswalk;
-
-// This is used for unit testing to provide a fake
-// ABI crosswalk that emulates one that is not updated
-// for the current version
-if (process.env.NODE_PRE_GYP_ABI_CROSSWALK) {
-  abi_crosswalk = require(process.env.NODE_PRE_GYP_ABI_CROSSWALK);
-} else {
-  abi_crosswalk = require('./abi_crosswalk.json');
-}
-
-const major_versions = {};
-Object.keys(abi_crosswalk).forEach((v) => {
-  const major = v.split('.')[0];
-  if (!major_versions[major]) {
-    major_versions[major] = v;
-  }
-});
-
-function get_electron_abi(runtime, target_version) {
-  if (!runtime) {
-    throw new Error('get_electron_abi requires valid runtime arg');
-  }
-  if (typeof target_version === 'undefined') {
-    // erroneous CLI call
-    throw new Error('Empty target version is not supported if electron is the target.');
-  }
-  // Electron guarantees that patch version update won't break native modules.
-  const sem_ver = semver.parse(target_version);
-  return runtime + '-v' + sem_ver.major + '.' + sem_ver.minor;
-}
-module.exports.get_electron_abi = get_electron_abi;
-
-function get_node_webkit_abi(runtime, target_version) {
-  if (!runtime) {
-    throw new Error('get_node_webkit_abi requires valid runtime arg');
-  }
-  if (typeof target_version === 'undefined') {
-    // erroneous CLI call
-    throw new Error('Empty target version is not supported if node-webkit is the target.');
-  }
-  return runtime + '-v' + target_version;
-}
-module.exports.get_node_webkit_abi = get_node_webkit_abi;
-
-function get_node_abi(runtime, versions) {
-  if (!runtime) {
-    throw new Error('get_node_abi requires valid runtime arg');
-  }
-  if (!versions) {
-    throw new Error('get_node_abi requires valid process.versions object');
-  }
-  const sem_ver = semver.parse(versions.node);
-  if (sem_ver.major === 0 && sem_ver.minor % 2) { // odd series
-    // https://github.com/mapbox/node-pre-gyp/issues/124
-    return runtime + '-v' + versions.node;
-  } else {
-    // process.versions.modules added in >= v0.10.4 and v0.11.7
-    // https://github.com/joyent/node/commit/ccabd4a6fa8a6eb79d29bc3bbe9fe2b6531c2d8e
-    return versions.modules ? runtime + '-v' + (+versions.modules) :
-      'v8-' + versions.v8.split('.').slice(0, 2).join('.');
-  }
-}
-module.exports.get_node_abi = get_node_abi;
-
-function get_runtime_abi(runtime, target_version) {
-  if (!runtime) {
-    throw new Error('get_runtime_abi requires valid runtime arg');
-  }
-  if (runtime === 'node-webkit') {
-    return get_node_webkit_abi(runtime, target_version || process.versions['node-webkit']);
-  } else if (runtime === 'electron') {
-    return get_electron_abi(runtime, target_version || process.versions.electron);
-  } else {
-    if (runtime !== 'node') {
-      throw new Error("Unknown Runtime: '" + runtime + "'");
-    }
-    if (!target_version) {
-      return get_node_abi(runtime, process.versions);
-    } else {
-      let cross_obj;
-      // abi_crosswalk generated with ./scripts/abi_crosswalk.js
-      if (abi_crosswalk[target_version]) {
-        cross_obj = abi_crosswalk[target_version];
-      } else {
-        const target_parts = target_version.split('.').map((i) => { return +i; });
-        if (target_parts.length !== 3) { // parse failed
-          throw new Error('Unknown target version: ' + target_version);
-        }
-        /*
-                    The below code tries to infer the last known ABI compatible version
-                    that we have recorded in the abi_crosswalk.json when an exact match
-                    is not possible. The reasons for this to exist are complicated:
-
-                       - We support passing --target to be able to allow developers to package binaries for versions of node
-                         that are not the same one as they are running. This might also be used in combination with the
-                         --target_arch or --target_platform flags to also package binaries for alternative platforms
-                       - When --target is passed we can't therefore determine the ABI (process.versions.modules) from the node
-                         version that is running in memory
-                       - So, therefore node-pre-gyp keeps an "ABI crosswalk" (lib/util/abi_crosswalk.json) to be able to look
-                         this info up for all versions
-                       - But we cannot easily predict what the future ABI will be for released versions
-                       - And node-pre-gyp needs to be a `bundledDependency` in apps that depend on it in order to work correctly
-                         by being fully available at install time.
-                       - So, the speed of node releases and the bundled nature of node-pre-gyp mean that a new node-pre-gyp release
-                         need to happen for every node.js/io.js/node-webkit/nw.js/atom-shell/etc release that might come online if
-                         you want the `--target` flag to keep working for the latest version
-                       - Which is impractical ^^
-                       - Hence the below code guesses about future ABI to make the need to update node-pre-gyp less demanding.
-
-                    In practice then you can have a dependency of your app like `node-sqlite3` that bundles a `node-pre-gyp` that
-                    only knows about node v0.10.33 in the `abi_crosswalk.json` but target node v0.10.34 (which is assumed to be
-                    ABI compatible with v0.10.33).
-
-                    TODO: use semver module instead of custom version parsing
-                */
-        const major = target_parts[0];
-        let minor = target_parts[1];
-        let patch = target_parts[2];
-        // io.js: yeah if node.js ever releases 1.x this will break
-        // but that is unlikely to happen: https://github.com/iojs/io.js/pull/253#issuecomment-69432616
-        if (major === 1) {
-          // look for last release that is the same major version
-          // e.g. we assume io.js 1.x is ABI compatible with >= 1.0.0
-          while (true) {
-            if (minor > 0) --minor;
-            if (patch > 0) --patch;
-            const new_iojs_target = '' + major + '.' + minor + '.' + patch;
-            if (abi_crosswalk[new_iojs_target]) {
-              cross_obj = abi_crosswalk[new_iojs_target];
-              console.log('Warning: node-pre-gyp could not find exact match for ' + target_version);
-              console.log('Warning: but node-pre-gyp successfully choose ' + new_iojs_target + ' as ABI compatible target');
-              break;
-            }
-            if (minor === 0 && patch === 0) {
-              break;
-            }
-          }
-        } else if (major >= 2) {
-          // look for last release that is the same major version
-          if (major_versions[major]) {
-            cross_obj = abi_crosswalk[major_versions[major]];
-            console.log('Warning: node-pre-gyp could not find exact match for ' + target_version);
-            console.log('Warning: but node-pre-gyp successfully choose ' + major_versions[major] + ' as ABI compatible target');
-          }
-        } else if (major === 0) { // node.js
-          if (target_parts[1] % 2 === 0) { // for stable/even node.js series
-            // look for the last release that is the same minor release
-            // e.g. we assume node 0.10.x is ABI compatible with >= 0.10.0
-            while (--patch > 0) {
-              const new_node_target = '' + major + '.' + minor + '.' + patch;
-              if (abi_crosswalk[new_node_target]) {
-                cross_obj = abi_crosswalk[new_node_target];
-                console.log('Warning: node-pre-gyp could not find exact match for ' + target_version);
-                console.log('Warning: but node-pre-gyp successfully choose ' + new_node_target + ' as ABI compatible target');
-                break;
-              }
-            }
-          }
-        }
-      }
-      if (!cross_obj) {
-        throw new Error('Unsupported target version: ' + target_version);
-      }
-      // emulate process.versions
-      const versions_obj = {
-        node: target_version,
-        v8: cross_obj.v8 + '.0',
-        // abi_crosswalk uses 1 for node versions lacking process.versions.modules
-        // process.versions.modules added in >= v0.10.4 and v0.11.7
-        modules: cross_obj.node_abi > 1 ? cross_obj.node_abi : undefined
-      };
-      return get_node_abi(runtime, versions_obj);
-    }
-  }
-}
-module.exports.get_runtime_abi = get_runtime_abi;
-
-const required_parameters = [
-  'module_name',
-  'module_path',
-  'host'
-];
-
-function validate_config(package_json, opts) {
-  const msg = package_json.name + ' package.json is not node-pre-gyp ready:\n';
-  const missing = [];
-  if (!package_json.main) {
-    missing.push('main');
-  }
-  if (!package_json.version) {
-    missing.push('version');
-  }
-  if (!package_json.name) {
-    missing.push('name');
-  }
-  if (!package_json.binary) {
-    missing.push('binary');
-  }
-  const o = package_json.binary;
-  if (o) {
-    required_parameters.forEach((p) => {
-      if (!o[p] || typeof o[p] !== 'string') {
-        missing.push('binary.' + p);
-      }
-    });
-  }
-
-  if (missing.length >= 1) {
-    throw new Error(msg + 'package.json must declare these properties: \n' + missing.join('\n'));
-  }
-  if (o) {
-    // enforce https over http
-    const protocol = url.parse(o.host).protocol;
-    if (protocol === 'http:') {
-      throw new Error("'host' protocol (" + protocol + ") is invalid - only 'https:' is accepted");
-    }
-  }
-  napi.validate_package_json(package_json, opts);
-}
-
-module.exports.validate_config = validate_config;
-
-function eval_template(template, opts) {
-  Object.keys(opts).forEach((key) => {
-    const pattern = '{' + key + '}';
-    while (template.indexOf(pattern) > -1) {
-      template = template.replace(pattern, opts[key]);
-    }
-  });
-  return template;
-}
-
-// url.resolve needs single trailing slash
-// to behave correctly, otherwise a double slash
-// may end up in the url which breaks requests
-// and a lacking slash may not lead to proper joining
-function fix_slashes(pathname) {
-  if (pathname.slice(-1) !== '/') {
-    return pathname + '/';
-  }
-  return pathname;
-}
-
-// remove double slashes
-// note: path.normalize will not work because
-// it will convert forward to back slashes
-function drop_double_slashes(pathname) {
-  return pathname.replace(/\/\//g, '/');
-}
-
-function get_process_runtime(versions) {
-  let runtime = 'node';
-  if (versions['node-webkit']) {
-    runtime = 'node-webkit';
-  } else if (versions.electron) {
-    runtime = 'electron';
-  }
-  return runtime;
-}
-
-module.exports.get_process_runtime = get_process_runtime;
-
-const default_package_name = '{module_name}-v{version}-{node_abi}-{platform}-{arch}.tar.gz';
-const default_remote_path = '';
-
-module.exports.evaluate = function(package_json, options, napi_build_version) {
-  options = options || {};
-  validate_config(package_json, options); // options is a suitable substitute for opts in this case
-  const v = package_json.version;
-  const module_version = semver.parse(v);
-  const runtime = options.runtime || get_process_runtime(process.versions);
-  const opts = {
-    name: package_json.name,
-    configuration: options.debug ? 'Debug' : 'Release',
-    debug: options.debug,
-    module_name: package_json.binary.module_name,
-    version: module_version.version,
-    prerelease: module_version.prerelease.length ? module_version.prerelease.join('.') : '',
-    build: module_version.build.length ? module_version.build.join('.') : '',
-    major: module_version.major,
-    minor: module_version.minor,
-    patch: module_version.patch,
-    runtime: runtime,
-    node_abi: get_runtime_abi(runtime, options.target),
-    node_abi_napi: napi.get_napi_version(options.target) ? 'napi' : get_runtime_abi(runtime, options.target),
-    napi_version: napi.get_napi_version(options.target), // non-zero numeric, undefined if unsupported
-    napi_build_version: napi_build_version || '',
-    node_napi_label: napi_build_version ? 'napi-v' + napi_build_version : get_runtime_abi(runtime, options.target),
-    target: options.target || '',
-    platform: options.target_platform || process.platform,
-    target_platform: options.target_platform || process.platform,
-    arch: options.target_arch || process.arch,
-    target_arch: options.target_arch || process.arch,
-    libc: options.target_libc || detect_libc.familySync() || 'unknown',
-    module_main: package_json.main,
-    toolset: options.toolset || '', // address https://github.com/mapbox/node-pre-gyp/issues/119
-    bucket: package_json.binary.bucket,
-    region: package_json.binary.region,
-    s3ForcePathStyle: package_json.binary.s3ForcePathStyle || false
-  };
-    // support host mirror with npm config `--{module_name}_binary_host_mirror`
-    // e.g.: https://github.com/node-inspector/v8-profiler/blob/master/package.json#L25
-    // > npm install v8-profiler --profiler_binary_host_mirror=https://npm.taobao.org/mirrors/node-inspector/
-  const validModuleName = opts.module_name.replace('-', '_');
-  const host = process.env['npm_config_' + validModuleName + '_binary_host_mirror'] || package_json.binary.host;
-  opts.host = fix_slashes(eval_template(host, opts));
-  opts.module_path = eval_template(package_json.binary.module_path, opts);
-  // now we resolve the module_path to ensure it is absolute so that binding.gyp variables work predictably
-  if (options.module_root) {
-    // resolve relative to known module root: works for pre-binding require
-    opts.module_path = path.join(options.module_root, opts.module_path);
-  } else {
-    // resolve relative to current working directory: works for node-pre-gyp commands
-    opts.module_path = path.resolve(opts.module_path);
-  }
-  opts.module = path.join(opts.module_path, opts.module_name + '.node');
-  opts.remote_path = package_json.binary.remote_path ? drop_double_slashes(fix_slashes(eval_template(package_json.binary.remote_path, opts))) : default_remote_path;
-  const package_name = package_json.binary.package_name ? package_json.binary.package_name : default_package_name;
-  opts.package_name = eval_template(package_name, opts);
-  opts.staged_tarball = path.join('build/stage', opts.remote_path, opts.package_name);
-  opts.hosted_path = url.resolve(opts.host, opts.remote_path);
-  opts.hosted_tarball = url.resolve(opts.hosted_path, opts.package_name);
-  return opts;
-};

+ 0 - 22
rag-server/node_modules/@mapbox/node-pre-gyp/node_modules/node-fetch/LICENSE.md

@@ -1,22 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2016 David Frank
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
-

+ 0 - 634
rag-server/node_modules/@mapbox/node-pre-gyp/node_modules/node-fetch/README.md

@@ -1,634 +0,0 @@
-node-fetch
-==========
-
-[![npm version][npm-image]][npm-url]
-[![build status][travis-image]][travis-url]
-[![coverage status][codecov-image]][codecov-url]
-[![install size][install-size-image]][install-size-url]
-[![Discord][discord-image]][discord-url]
-
-A light-weight module that brings `window.fetch` to Node.js
-
-(We are looking for [v2 maintainers and collaborators](https://github.com/bitinn/node-fetch/issues/567))
-
-[![Backers][opencollective-image]][opencollective-url]
-
-<!-- TOC -->
-
-- [Motivation](#motivation)
-- [Features](#features)
-- [Difference from client-side fetch](#difference-from-client-side-fetch)
-- [Installation](#installation)
-- [Loading and configuring the module](#loading-and-configuring-the-module)
-- [Common Usage](#common-usage)
-    - [Plain text or HTML](#plain-text-or-html)
-    - [JSON](#json)
-    - [Simple Post](#simple-post)
-    - [Post with JSON](#post-with-json)
-    - [Post with form parameters](#post-with-form-parameters)
-    - [Handling exceptions](#handling-exceptions)
-    - [Handling client and server errors](#handling-client-and-server-errors)
-- [Advanced Usage](#advanced-usage)
-    - [Streams](#streams)
-    - [Buffer](#buffer)
-    - [Accessing Headers and other Meta data](#accessing-headers-and-other-meta-data)
-    - [Extract Set-Cookie Header](#extract-set-cookie-header)
-    - [Post data using a file stream](#post-data-using-a-file-stream)
-    - [Post with form-data (detect multipart)](#post-with-form-data-detect-multipart)
-    - [Request cancellation with AbortSignal](#request-cancellation-with-abortsignal)
-- [API](#api)
-    - [fetch(url[, options])](#fetchurl-options)
-    - [Options](#options)
-    - [Class: Request](#class-request)
-    - [Class: Response](#class-response)
-    - [Class: Headers](#class-headers)
-    - [Interface: Body](#interface-body)
-    - [Class: FetchError](#class-fetcherror)
-- [License](#license)
-- [Acknowledgement](#acknowledgement)
-
-<!-- /TOC -->
-
-## Motivation
-
-Instead of implementing `XMLHttpRequest` in Node.js to run browser-specific [Fetch polyfill](https://github.com/github/fetch), why not go from native `http` to `fetch` API directly? Hence, `node-fetch`, minimal code for a `window.fetch` compatible API on Node.js runtime.
-
-See Matt Andrews' [isomorphic-fetch](https://github.com/matthew-andrews/isomorphic-fetch) or Leonardo Quixada's [cross-fetch](https://github.com/lquixada/cross-fetch) for isomorphic usage (exports `node-fetch` for server-side, `whatwg-fetch` for client-side).
-
-## Features
-
-- Stay consistent with `window.fetch` API.
-- Make conscious trade-off when following [WHATWG fetch spec][whatwg-fetch] and [stream spec](https://streams.spec.whatwg.org/) implementation details, document known differences.
-- Use native promise but allow substituting it with [insert your favorite promise library].
-- Use native Node streams for body on both request and response.
-- Decode content encoding (gzip/deflate) properly and convert string output (such as `res.text()` and `res.json()`) to UTF-8 automatically.
-- Useful extensions such as timeout, redirect limit, response size limit, [explicit errors](ERROR-HANDLING.md) for troubleshooting.
-
-## Difference from client-side fetch
-
-- See [Known Differences](LIMITS.md) for details.
-- If you happen to use a missing feature that `window.fetch` offers, feel free to open an issue.
-- Pull requests are welcomed too!
-
-## Installation
-
-Current stable release (`2.x`)
-
-```sh
-$ npm install node-fetch
-```
-
-## Loading and configuring the module
-We suggest you load the module via `require` until the stabilization of ES modules in node:
-```js
-const fetch = require('node-fetch');
-```
-
-If you are using a Promise library other than native, set it through `fetch.Promise`:
-```js
-const Bluebird = require('bluebird');
-
-fetch.Promise = Bluebird;
-```
-
-## Common Usage
-
-NOTE: The documentation below is up-to-date with `2.x` releases; see the [`1.x` readme](https://github.com/bitinn/node-fetch/blob/1.x/README.md), [changelog](https://github.com/bitinn/node-fetch/blob/1.x/CHANGELOG.md) and [2.x upgrade guide](UPGRADE-GUIDE.md) for the differences.
-
-#### Plain text or HTML
-```js
-fetch('https://github.com/')
-    .then(res => res.text())
-    .then(body => console.log(body));
-```
-
-#### JSON
-
-```js
-
-fetch('https://api.github.com/users/github')
-    .then(res => res.json())
-    .then(json => console.log(json));
-```
-
-#### Simple Post
-```js
-fetch('https://httpbin.org/post', { method: 'POST', body: 'a=1' })
-    .then(res => res.json()) // expecting a json response
-    .then(json => console.log(json));
-```
-
-#### Post with JSON
-
-```js
-const body = { a: 1 };
-
-fetch('https://httpbin.org/post', {
-        method: 'post',
-        body:    JSON.stringify(body),
-        headers: { 'Content-Type': 'application/json' },
-    })
-    .then(res => res.json())
-    .then(json => console.log(json));
-```
-
-#### Post with form parameters
-`URLSearchParams` is available in Node.js as of v7.5.0. See [official documentation](https://nodejs.org/api/url.html#url_class_urlsearchparams) for more usage methods.
-
-NOTE: The `Content-Type` header is only set automatically to `x-www-form-urlencoded` when an instance of `URLSearchParams` is given as such:
-
-```js
-const { URLSearchParams } = require('url');
-
-const params = new URLSearchParams();
-params.append('a', 1);
-
-fetch('https://httpbin.org/post', { method: 'POST', body: params })
-    .then(res => res.json())
-    .then(json => console.log(json));
-```
-
-#### Handling exceptions
-NOTE: 3xx-5xx responses are *NOT* exceptions and should be handled in `then()`; see the next section for more information.
-
-Adding a catch to the fetch promise chain will catch *all* exceptions, such as errors originating from node core libraries, network errors and operational errors, which are instances of FetchError. See the [error handling document](ERROR-HANDLING.md)  for more details.
-
-```js
-fetch('https://domain.invalid/')
-    .catch(err => console.error(err));
-```
-
-#### Handling client and server errors
-It is common to create a helper function to check that the response contains no client (4xx) or server (5xx) error responses:
-
-```js
-function checkStatus(res) {
-    if (res.ok) { // res.status >= 200 && res.status < 300
-        return res;
-    } else {
-        throw MyCustomError(res.statusText);
-    }
-}
-
-fetch('https://httpbin.org/status/400')
-    .then(checkStatus)
-    .then(res => console.log('will not get here...'))
-```
-
-## Advanced Usage
-
-#### Streams
-The "Node.js way" is to use streams when possible:
-
-```js
-fetch('https://assets-cdn.github.com/images/modules/logos_page/Octocat.png')
-    .then(res => {
-        const dest = fs.createWriteStream('./octocat.png');
-        res.body.pipe(dest);
-    });
-```
-
-In Node.js 14 you can also use async iterators to read `body`; however, be careful to catch
-errors -- the longer a response runs, the more likely it is to encounter an error.
-
-```js
-const fetch = require('node-fetch');
-const response = await fetch('https://httpbin.org/stream/3');
-try {
-	for await (const chunk of response.body) {
-		console.dir(JSON.parse(chunk.toString()));
-	}
-} catch (err) {
-	console.error(err.stack);
-}
-```
-
-In Node.js 12 you can also use async iterators to read `body`; however, async iterators with streams
-did not mature until Node.js 14, so you need to do some extra work to ensure you handle errors
-directly from the stream and wait on it response to fully close.
-
-```js
-const fetch = require('node-fetch');
-const read = async body => {
-    let error;
-    body.on('error', err => {
-        error = err;
-    });
-    for await (const chunk of body) {
-        console.dir(JSON.parse(chunk.toString()));
-    }
-    return new Promise((resolve, reject) => {
-        body.on('close', () => {
-            error ? reject(error) : resolve();
-        });
-    });
-};
-try {
-    const response = await fetch('https://httpbin.org/stream/3');
-    await read(response.body);
-} catch (err) {
-    console.error(err.stack);
-}
-```
-
-#### Buffer
-If you prefer to cache binary data in full, use buffer(). (NOTE: `buffer()` is a `node-fetch`-only API)
-
-```js
-const fileType = require('file-type');
-
-fetch('https://assets-cdn.github.com/images/modules/logos_page/Octocat.png')
-    .then(res => res.buffer())
-    .then(buffer => fileType(buffer))
-    .then(type => { /* ... */ });
-```
-
-#### Accessing Headers and other Meta data
-```js
-fetch('https://github.com/')
-    .then(res => {
-        console.log(res.ok);
-        console.log(res.status);
-        console.log(res.statusText);
-        console.log(res.headers.raw());
-        console.log(res.headers.get('content-type'));
-    });
-```
-
-#### Extract Set-Cookie Header
-
-Unlike browsers, you can access raw `Set-Cookie` headers manually using `Headers.raw()`. This is a `node-fetch` only API.
-
-```js
-fetch(url).then(res => {
-    // returns an array of values, instead of a string of comma-separated values
-    console.log(res.headers.raw()['set-cookie']);
-});
-```
-
-#### Post data using a file stream
-
-```js
-const { createReadStream } = require('fs');
-
-const stream = createReadStream('input.txt');
-
-fetch('https://httpbin.org/post', { method: 'POST', body: stream })
-    .then(res => res.json())
-    .then(json => console.log(json));
-```
-
-#### Post with form-data (detect multipart)
-
-```js
-const FormData = require('form-data');
-
-const form = new FormData();
-form.append('a', 1);
-
-fetch('https://httpbin.org/post', { method: 'POST', body: form })
-    .then(res => res.json())
-    .then(json => console.log(json));
-
-// OR, using custom headers
-// NOTE: getHeaders() is non-standard API
-
-const form = new FormData();
-form.append('a', 1);
-
-const options = {
-    method: 'POST',
-    body: form,
-    headers: form.getHeaders()
-}
-
-fetch('https://httpbin.org/post', options)
-    .then(res => res.json())
-    .then(json => console.log(json));
-```
-
-#### Request cancellation with AbortSignal
-
-> NOTE: You may cancel streamed requests only on Node >= v8.0.0
-
-You may cancel requests with `AbortController`. A suggested implementation is [`abort-controller`](https://www.npmjs.com/package/abort-controller).
-
-An example of timing out a request after 150ms could be achieved as the following:
-
-```js
-import AbortController from 'abort-controller';
-
-const controller = new AbortController();
-const timeout = setTimeout(
-  () => { controller.abort(); },
-  150,
-);
-
-fetch(url, { signal: controller.signal })
-  .then(res => res.json())
-  .then(
-    data => {
-      useData(data)
-    },
-    err => {
-      if (err.name === 'AbortError') {
-        // request was aborted
-      }
-    },
-  )
-  .finally(() => {
-    clearTimeout(timeout);
-  });
-```
-
-See [test cases](https://github.com/bitinn/node-fetch/blob/master/test/test.js) for more examples.
-
-
-## API
-
-### fetch(url[, options])
-
-- `url` A string representing the URL for fetching
-- `options` [Options](#fetch-options) for the HTTP(S) request
-- Returns: <code>Promise&lt;[Response](#class-response)&gt;</code>
-
-Perform an HTTP(S) fetch.
-
-`url` should be an absolute url, such as `https://example.com/`. A path-relative URL (`/file/under/root`) or protocol-relative URL (`//can-be-http-or-https.com/`) will result in a rejected `Promise`.
-
-<a id="fetch-options"></a>
-### Options
-
-The default values are shown after each option key.
-
-```js
-{
-    // These properties are part of the Fetch Standard
-    method: 'GET',
-    headers: {},        // request headers. format is the identical to that accepted by the Headers constructor (see below)
-    body: null,         // request body. can be null, a string, a Buffer, a Blob, or a Node.js Readable stream
-    redirect: 'follow', // set to `manual` to extract redirect headers, `error` to reject redirect
-    signal: null,       // pass an instance of AbortSignal to optionally abort requests
-
-    // The following properties are node-fetch extensions
-    follow: 20,         // maximum redirect count. 0 to not follow redirect
-    timeout: 0,         // req/res timeout in ms, it resets on redirect. 0 to disable (OS limit applies). Signal is recommended instead.
-    compress: true,     // support gzip/deflate content encoding. false to disable
-    size: 0,            // maximum response body size in bytes. 0 to disable
-    agent: null         // http(s).Agent instance or function that returns an instance (see below)
-}
-```
-
-##### Default Headers
-
-If no values are set, the following request headers will be sent automatically:
-
-Header              | Value
-------------------- | --------------------------------------------------------
-`Accept-Encoding`   | `gzip,deflate` _(when `options.compress === true`)_
-`Accept`            | `*/*`
-`Content-Length`    | _(automatically calculated, if possible)_
-`Transfer-Encoding` | `chunked` _(when `req.body` is a stream)_
-`User-Agent`        | `node-fetch/1.0 (+https://github.com/bitinn/node-fetch)`
-
-Note: when `body` is a `Stream`, `Content-Length` is not set automatically.
-
-##### Custom Agent
-
-The `agent` option allows you to specify networking related options which are out of the scope of Fetch, including and not limited to the following:
-
-- Support self-signed certificate
-- Use only IPv4 or IPv6
-- Custom DNS Lookup
-
-See [`http.Agent`](https://nodejs.org/api/http.html#http_new_agent_options) for more information.
-
-If no agent is specified, the default agent provided by Node.js is used. Note that [this changed in Node.js 19](https://github.com/nodejs/node/blob/4267b92604ad78584244488e7f7508a690cb80d0/lib/_http_agent.js#L564) to have `keepalive` true by default. If you wish to enable `keepalive` in an earlier version of Node.js, you can override the agent as per the following code sample. 
-
-In addition, the `agent` option accepts a function that returns `http`(s)`.Agent` instance given current [URL](https://nodejs.org/api/url.html), this is useful during a redirection chain across HTTP and HTTPS protocol.
-
-```js
-const httpAgent = new http.Agent({
-    keepAlive: true
-});
-const httpsAgent = new https.Agent({
-    keepAlive: true
-});
-
-const options = {
-    agent: function (_parsedURL) {
-        if (_parsedURL.protocol == 'http:') {
-            return httpAgent;
-        } else {
-            return httpsAgent;
-        }
-    }
-}
-```
-
-<a id="class-request"></a>
-### Class: Request
-
-An HTTP(S) request containing information about URL, method, headers, and the body. This class implements the [Body](#iface-body) interface.
-
-Due to the nature of Node.js, the following properties are not implemented at this moment:
-
-- `type`
-- `destination`
-- `referrer`
-- `referrerPolicy`
-- `mode`
-- `credentials`
-- `cache`
-- `integrity`
-- `keepalive`
-
-The following node-fetch extension properties are provided:
-
-- `follow`
-- `compress`
-- `counter`
-- `agent`
-
-See [options](#fetch-options) for exact meaning of these extensions.
-
-#### new Request(input[, options])
-
-<small>*(spec-compliant)*</small>
-
-- `input` A string representing a URL, or another `Request` (which will be cloned)
-- `options` [Options][#fetch-options] for the HTTP(S) request
-
-Constructs a new `Request` object. The constructor is identical to that in the [browser](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request).
-
-In most cases, directly `fetch(url, options)` is simpler than creating a `Request` object.
-
-<a id="class-response"></a>
-### Class: Response
-
-An HTTP(S) response. This class implements the [Body](#iface-body) interface.
-
-The following properties are not implemented in node-fetch at this moment:
-
-- `Response.error()`
-- `Response.redirect()`
-- `type`
-- `trailer`
-
-#### new Response([body[, options]])
-
-<small>*(spec-compliant)*</small>
-
-- `body` A `String` or [`Readable` stream][node-readable]
-- `options` A [`ResponseInit`][response-init] options dictionary
-
-Constructs a new `Response` object. The constructor is identical to that in the [browser](https://developer.mozilla.org/en-US/docs/Web/API/Response/Response).
-
-Because Node.js does not implement service workers (for which this class was designed), one rarely has to construct a `Response` directly.
-
-#### response.ok
-
-<small>*(spec-compliant)*</small>
-
-Convenience property representing if the request ended normally. Will evaluate to true if the response status was greater than or equal to 200 but smaller than 300.
-
-#### response.redirected
-
-<small>*(spec-compliant)*</small>
-
-Convenience property representing if the request has been redirected at least once. Will evaluate to true if the internal redirect counter is greater than 0.
-
-<a id="class-headers"></a>
-### Class: Headers
-
-This class allows manipulating and iterating over a set of HTTP headers. All methods specified in the [Fetch Standard][whatwg-fetch] are implemented.
-
-#### new Headers([init])
-
-<small>*(spec-compliant)*</small>
-
-- `init` Optional argument to pre-fill the `Headers` object
-
-Construct a new `Headers` object. `init` can be either `null`, a `Headers` object, an key-value map object or any iterable object.
-
-```js
-// Example adapted from https://fetch.spec.whatwg.org/#example-headers-class
-
-const meta = {
-  'Content-Type': 'text/xml',
-  'Breaking-Bad': '<3'
-};
-const headers = new Headers(meta);
-
-// The above is equivalent to
-const meta = [
-  [ 'Content-Type', 'text/xml' ],
-  [ 'Breaking-Bad', '<3' ]
-];
-const headers = new Headers(meta);
-
-// You can in fact use any iterable objects, like a Map or even another Headers
-const meta = new Map();
-meta.set('Content-Type', 'text/xml');
-meta.set('Breaking-Bad', '<3');
-const headers = new Headers(meta);
-const copyOfHeaders = new Headers(headers);
-```
-
-<a id="iface-body"></a>
-### Interface: Body
-
-`Body` is an abstract interface with methods that are applicable to both `Request` and `Response` classes.
-
-The following methods are not yet implemented in node-fetch at this moment:
-
-- `formData()`
-
-#### body.body
-
-<small>*(deviation from spec)*</small>
-
-* Node.js [`Readable` stream][node-readable]
-
-Data are encapsulated in the `Body` object. Note that while the [Fetch Standard][whatwg-fetch] requires the property to always be a WHATWG `ReadableStream`, in node-fetch it is a Node.js [`Readable` stream][node-readable].
-
-#### body.bodyUsed
-
-<small>*(spec-compliant)*</small>
-
-* `Boolean`
-
-A boolean property for if this body has been consumed. Per the specs, a consumed body cannot be used again.
-
-#### body.arrayBuffer()
-#### body.blob()
-#### body.json()
-#### body.text()
-
-<small>*(spec-compliant)*</small>
-
-* Returns: <code>Promise</code>
-
-Consume the body and return a promise that will resolve to one of these formats.
-
-#### body.buffer()
-
-<small>*(node-fetch extension)*</small>
-
-* Returns: <code>Promise&lt;Buffer&gt;</code>
-
-Consume the body and return a promise that will resolve to a Buffer.
-
-#### body.textConverted()
-
-<small>*(node-fetch extension)*</small>
-
-* Returns: <code>Promise&lt;String&gt;</code>
-
-Identical to `body.text()`, except instead of always converting to UTF-8, encoding sniffing will be performed and text converted to UTF-8 if possible.
-
-(This API requires an optional dependency of the npm package [encoding](https://www.npmjs.com/package/encoding), which you need to install manually. `webpack` users may see [a warning message](https://github.com/bitinn/node-fetch/issues/412#issuecomment-379007792) due to this optional dependency.)
-
-<a id="class-fetcherror"></a>
-### Class: FetchError
-
-<small>*(node-fetch extension)*</small>
-
-An operational error in the fetching process. See [ERROR-HANDLING.md][] for more info.
-
-<a id="class-aborterror"></a>
-### Class: AbortError
-
-<small>*(node-fetch extension)*</small>
-
-An Error thrown when the request is aborted in response to an `AbortSignal`'s `abort` event. It has a `name` property of `AbortError`. See [ERROR-HANDLING.MD][] for more info.
-
-## Acknowledgement
-
-Thanks to [github/fetch](https://github.com/github/fetch) for providing a solid implementation reference.
-
-`node-fetch` v1 was maintained by [@bitinn](https://github.com/bitinn); v2 was maintained by [@TimothyGu](https://github.com/timothygu), [@bitinn](https://github.com/bitinn) and [@jimmywarting](https://github.com/jimmywarting); v2 readme is written by [@jkantr](https://github.com/jkantr).
-
-## License
-
-MIT
-
-[npm-image]: https://flat.badgen.net/npm/v/node-fetch
-[npm-url]: https://www.npmjs.com/package/node-fetch
-[travis-image]: https://flat.badgen.net/travis/bitinn/node-fetch
-[travis-url]: https://travis-ci.org/bitinn/node-fetch
-[codecov-image]: https://flat.badgen.net/codecov/c/github/bitinn/node-fetch/master
-[codecov-url]: https://codecov.io/gh/bitinn/node-fetch
-[install-size-image]: https://flat.badgen.net/packagephobia/install/node-fetch
-[install-size-url]: https://packagephobia.now.sh/result?p=node-fetch
-[discord-image]: https://img.shields.io/discord/619915844268326952?color=%237289DA&label=Discord&style=flat-square
-[discord-url]: https://discord.gg/Zxbndcm
-[opencollective-image]: https://opencollective.com/node-fetch/backers.svg
-[opencollective-url]: https://opencollective.com/node-fetch
-[whatwg-fetch]: https://fetch.spec.whatwg.org/
-[response-init]: https://fetch.spec.whatwg.org/#responseinit
-[node-readable]: https://nodejs.org/api/stream.html#stream_readable_streams
-[mdn-headers]: https://developer.mozilla.org/en-US/docs/Web/API/Headers
-[LIMITS.md]: https://github.com/bitinn/node-fetch/blob/master/LIMITS.md
-[ERROR-HANDLING.md]: https://github.com/bitinn/node-fetch/blob/master/ERROR-HANDLING.md
-[UPGRADE-GUIDE.md]: https://github.com/bitinn/node-fetch/blob/master/UPGRADE-GUIDE.md

+ 0 - 25
rag-server/node_modules/@mapbox/node-pre-gyp/node_modules/node-fetch/browser.js

@@ -1,25 +0,0 @@
-"use strict";
-
-// ref: https://github.com/tc39/proposal-global
-var getGlobal = function () {
-	// the only reliable means to get the global object is
-	// `Function('return this')()`
-	// However, this causes CSP violations in Chrome apps.
-	if (typeof self !== 'undefined') { return self; }
-	if (typeof window !== 'undefined') { return window; }
-	if (typeof global !== 'undefined') { return global; }
-	throw new Error('unable to locate global object');
-}
-
-var globalObject = getGlobal();
-
-module.exports = exports = globalObject.fetch;
-
-// Needed for TypeScript and Webpack.
-if (globalObject.fetch) {
-	exports.default = globalObject.fetch.bind(globalObject);
-}
-
-exports.Headers = globalObject.Headers;
-exports.Request = globalObject.Request;
-exports.Response = globalObject.Response;

+ 0 - 1777
rag-server/node_modules/@mapbox/node-pre-gyp/node_modules/node-fetch/lib/index.es.js

@@ -1,1777 +0,0 @@
-process.emitWarning("The .es.js file is deprecated. Use .mjs instead.");
-
-import Stream from 'stream';
-import http from 'http';
-import Url from 'url';
-import whatwgUrl from 'whatwg-url';
-import https from 'https';
-import zlib from 'zlib';
-
-// Based on https://github.com/tmpvar/jsdom/blob/aa85b2abf07766ff7bf5c1f6daafb3726f2f2db5/lib/jsdom/living/blob.js
-
-// fix for "Readable" isn't a named export issue
-const Readable = Stream.Readable;
-
-const BUFFER = Symbol('buffer');
-const TYPE = Symbol('type');
-
-class Blob {
-	constructor() {
-		this[TYPE] = '';
-
-		const blobParts = arguments[0];
-		const options = arguments[1];
-
-		const buffers = [];
-		let size = 0;
-
-		if (blobParts) {
-			const a = blobParts;
-			const length = Number(a.length);
-			for (let i = 0; i < length; i++) {
-				const element = a[i];
-				let buffer;
-				if (element instanceof Buffer) {
-					buffer = element;
-				} else if (ArrayBuffer.isView(element)) {
-					buffer = Buffer.from(element.buffer, element.byteOffset, element.byteLength);
-				} else if (element instanceof ArrayBuffer) {
-					buffer = Buffer.from(element);
-				} else if (element instanceof Blob) {
-					buffer = element[BUFFER];
-				} else {
-					buffer = Buffer.from(typeof element === 'string' ? element : String(element));
-				}
-				size += buffer.length;
-				buffers.push(buffer);
-			}
-		}
-
-		this[BUFFER] = Buffer.concat(buffers);
-
-		let type = options && options.type !== undefined && String(options.type).toLowerCase();
-		if (type && !/[^\u0020-\u007E]/.test(type)) {
-			this[TYPE] = type;
-		}
-	}
-	get size() {
-		return this[BUFFER].length;
-	}
-	get type() {
-		return this[TYPE];
-	}
-	text() {
-		return Promise.resolve(this[BUFFER].toString());
-	}
-	arrayBuffer() {
-		const buf = this[BUFFER];
-		const ab = buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength);
-		return Promise.resolve(ab);
-	}
-	stream() {
-		const readable = new Readable();
-		readable._read = function () {};
-		readable.push(this[BUFFER]);
-		readable.push(null);
-		return readable;
-	}
-	toString() {
-		return '[object Blob]';
-	}
-	slice() {
-		const size = this.size;
-
-		const start = arguments[0];
-		const end = arguments[1];
-		let relativeStart, relativeEnd;
-		if (start === undefined) {
-			relativeStart = 0;
-		} else if (start < 0) {
-			relativeStart = Math.max(size + start, 0);
-		} else {
-			relativeStart = Math.min(start, size);
-		}
-		if (end === undefined) {
-			relativeEnd = size;
-		} else if (end < 0) {
-			relativeEnd = Math.max(size + end, 0);
-		} else {
-			relativeEnd = Math.min(end, size);
-		}
-		const span = Math.max(relativeEnd - relativeStart, 0);
-
-		const buffer = this[BUFFER];
-		const slicedBuffer = buffer.slice(relativeStart, relativeStart + span);
-		const blob = new Blob([], { type: arguments[2] });
-		blob[BUFFER] = slicedBuffer;
-		return blob;
-	}
-}
-
-Object.defineProperties(Blob.prototype, {
-	size: { enumerable: true },
-	type: { enumerable: true },
-	slice: { enumerable: true }
-});
-
-Object.defineProperty(Blob.prototype, Symbol.toStringTag, {
-	value: 'Blob',
-	writable: false,
-	enumerable: false,
-	configurable: true
-});
-
-/**
- * fetch-error.js
- *
- * FetchError interface for operational errors
- */
-
-/**
- * Create FetchError instance
- *
- * @param   String      message      Error message for human
- * @param   String      type         Error type for machine
- * @param   String      systemError  For Node.js system error
- * @return  FetchError
- */
-function FetchError(message, type, systemError) {
-  Error.call(this, message);
-
-  this.message = message;
-  this.type = type;
-
-  // when err.type is `system`, err.code contains system error code
-  if (systemError) {
-    this.code = this.errno = systemError.code;
-  }
-
-  // hide custom error implementation details from end-users
-  Error.captureStackTrace(this, this.constructor);
-}
-
-FetchError.prototype = Object.create(Error.prototype);
-FetchError.prototype.constructor = FetchError;
-FetchError.prototype.name = 'FetchError';
-
-let convert;
-try {
-	convert = require('encoding').convert;
-} catch (e) {}
-
-const INTERNALS = Symbol('Body internals');
-
-// fix an issue where "PassThrough" isn't a named export for node <10
-const PassThrough = Stream.PassThrough;
-
-/**
- * Body mixin
- *
- * Ref: https://fetch.spec.whatwg.org/#body
- *
- * @param   Stream  body  Readable stream
- * @param   Object  opts  Response options
- * @return  Void
- */
-function Body(body) {
-	var _this = this;
-
-	var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
-	    _ref$size = _ref.size;
-
-	let size = _ref$size === undefined ? 0 : _ref$size;
-	var _ref$timeout = _ref.timeout;
-	let timeout = _ref$timeout === undefined ? 0 : _ref$timeout;
-
-	if (body == null) {
-		// body is undefined or null
-		body = null;
-	} else if (isURLSearchParams(body)) {
-		// body is a URLSearchParams
-		body = Buffer.from(body.toString());
-	} else if (isBlob(body)) ; else if (Buffer.isBuffer(body)) ; else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') {
-		// body is ArrayBuffer
-		body = Buffer.from(body);
-	} else if (ArrayBuffer.isView(body)) {
-		// body is ArrayBufferView
-		body = Buffer.from(body.buffer, body.byteOffset, body.byteLength);
-	} else if (body instanceof Stream) ; else {
-		// none of the above
-		// coerce to string then buffer
-		body = Buffer.from(String(body));
-	}
-	this[INTERNALS] = {
-		body,
-		disturbed: false,
-		error: null
-	};
-	this.size = size;
-	this.timeout = timeout;
-
-	if (body instanceof Stream) {
-		body.on('error', function (err) {
-			const error = err.name === 'AbortError' ? err : new FetchError(`Invalid response body while trying to fetch ${_this.url}: ${err.message}`, 'system', err);
-			_this[INTERNALS].error = error;
-		});
-	}
-}
-
-Body.prototype = {
-	get body() {
-		return this[INTERNALS].body;
-	},
-
-	get bodyUsed() {
-		return this[INTERNALS].disturbed;
-	},
-
-	/**
-  * Decode response as ArrayBuffer
-  *
-  * @return  Promise
-  */
-	arrayBuffer() {
-		return consumeBody.call(this).then(function (buf) {
-			return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength);
-		});
-	},
-
-	/**
-  * Return raw response as Blob
-  *
-  * @return Promise
-  */
-	blob() {
-		let ct = this.headers && this.headers.get('content-type') || '';
-		return consumeBody.call(this).then(function (buf) {
-			return Object.assign(
-			// Prevent copying
-			new Blob([], {
-				type: ct.toLowerCase()
-			}), {
-				[BUFFER]: buf
-			});
-		});
-	},
-
-	/**
-  * Decode response as json
-  *
-  * @return  Promise
-  */
-	json() {
-		var _this2 = this;
-
-		return consumeBody.call(this).then(function (buffer) {
-			try {
-				return JSON.parse(buffer.toString());
-			} catch (err) {
-				return Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, 'invalid-json'));
-			}
-		});
-	},
-
-	/**
-  * Decode response as text
-  *
-  * @return  Promise
-  */
-	text() {
-		return consumeBody.call(this).then(function (buffer) {
-			return buffer.toString();
-		});
-	},
-
-	/**
-  * Decode response as buffer (non-spec api)
-  *
-  * @return  Promise
-  */
-	buffer() {
-		return consumeBody.call(this);
-	},
-
-	/**
-  * Decode response as text, while automatically detecting the encoding and
-  * trying to decode to UTF-8 (non-spec api)
-  *
-  * @return  Promise
-  */
-	textConverted() {
-		var _this3 = this;
-
-		return consumeBody.call(this).then(function (buffer) {
-			return convertBody(buffer, _this3.headers);
-		});
-	}
-};
-
-// In browsers, all properties are enumerable.
-Object.defineProperties(Body.prototype, {
-	body: { enumerable: true },
-	bodyUsed: { enumerable: true },
-	arrayBuffer: { enumerable: true },
-	blob: { enumerable: true },
-	json: { enumerable: true },
-	text: { enumerable: true }
-});
-
-Body.mixIn = function (proto) {
-	for (const name of Object.getOwnPropertyNames(Body.prototype)) {
-		// istanbul ignore else: future proof
-		if (!(name in proto)) {
-			const desc = Object.getOwnPropertyDescriptor(Body.prototype, name);
-			Object.defineProperty(proto, name, desc);
-		}
-	}
-};
-
-/**
- * Consume and convert an entire Body to a Buffer.
- *
- * Ref: https://fetch.spec.whatwg.org/#concept-body-consume-body
- *
- * @return  Promise
- */
-function consumeBody() {
-	var _this4 = this;
-
-	if (this[INTERNALS].disturbed) {
-		return Body.Promise.reject(new TypeError(`body used already for: ${this.url}`));
-	}
-
-	this[INTERNALS].disturbed = true;
-
-	if (this[INTERNALS].error) {
-		return Body.Promise.reject(this[INTERNALS].error);
-	}
-
-	let body = this.body;
-
-	// body is null
-	if (body === null) {
-		return Body.Promise.resolve(Buffer.alloc(0));
-	}
-
-	// body is blob
-	if (isBlob(body)) {
-		body = body.stream();
-	}
-
-	// body is buffer
-	if (Buffer.isBuffer(body)) {
-		return Body.Promise.resolve(body);
-	}
-
-	// istanbul ignore if: should never happen
-	if (!(body instanceof Stream)) {
-		return Body.Promise.resolve(Buffer.alloc(0));
-	}
-
-	// body is stream
-	// get ready to actually consume the body
-	let accum = [];
-	let accumBytes = 0;
-	let abort = false;
-
-	return new Body.Promise(function (resolve, reject) {
-		let resTimeout;
-
-		// allow timeout on slow response body
-		if (_this4.timeout) {
-			resTimeout = setTimeout(function () {
-				abort = true;
-				reject(new FetchError(`Response timeout while trying to fetch ${_this4.url} (over ${_this4.timeout}ms)`, 'body-timeout'));
-			}, _this4.timeout);
-		}
-
-		// handle stream errors
-		body.on('error', function (err) {
-			if (err.name === 'AbortError') {
-				// if the request was aborted, reject with this Error
-				abort = true;
-				reject(err);
-			} else {
-				// other errors, such as incorrect content-encoding
-				reject(new FetchError(`Invalid response body while trying to fetch ${_this4.url}: ${err.message}`, 'system', err));
-			}
-		});
-
-		body.on('data', function (chunk) {
-			if (abort || chunk === null) {
-				return;
-			}
-
-			if (_this4.size && accumBytes + chunk.length > _this4.size) {
-				abort = true;
-				reject(new FetchError(`content size at ${_this4.url} over limit: ${_this4.size}`, 'max-size'));
-				return;
-			}
-
-			accumBytes += chunk.length;
-			accum.push(chunk);
-		});
-
-		body.on('end', function () {
-			if (abort) {
-				return;
-			}
-
-			clearTimeout(resTimeout);
-
-			try {
-				resolve(Buffer.concat(accum, accumBytes));
-			} catch (err) {
-				// handle streams that have accumulated too much data (issue #414)
-				reject(new FetchError(`Could not create Buffer from response body for ${_this4.url}: ${err.message}`, 'system', err));
-			}
-		});
-	});
-}
-
-/**
- * Detect buffer encoding and convert to target encoding
- * ref: http://www.w3.org/TR/2011/WD-html5-20110113/parsing.html#determining-the-character-encoding
- *
- * @param   Buffer  buffer    Incoming buffer
- * @param   String  encoding  Target encoding
- * @return  String
- */
-function convertBody(buffer, headers) {
-	if (typeof convert !== 'function') {
-		throw new Error('The package `encoding` must be installed to use the textConverted() function');
-	}
-
-	const ct = headers.get('content-type');
-	let charset = 'utf-8';
-	let res, str;
-
-	// header
-	if (ct) {
-		res = /charset=([^;]*)/i.exec(ct);
-	}
-
-	// no charset in content type, peek at response body for at most 1024 bytes
-	str = buffer.slice(0, 1024).toString();
-
-	// html5
-	if (!res && str) {
-		res = /<meta.+?charset=(['"])(.+?)\1/i.exec(str);
-	}
-
-	// html4
-	if (!res && str) {
-		res = /<meta[\s]+?http-equiv=(['"])content-type\1[\s]+?content=(['"])(.+?)\2/i.exec(str);
-		if (!res) {
-			res = /<meta[\s]+?content=(['"])(.+?)\1[\s]+?http-equiv=(['"])content-type\3/i.exec(str);
-			if (res) {
-				res.pop(); // drop last quote
-			}
-		}
-
-		if (res) {
-			res = /charset=(.*)/i.exec(res.pop());
-		}
-	}
-
-	// xml
-	if (!res && str) {
-		res = /<\?xml.+?encoding=(['"])(.+?)\1/i.exec(str);
-	}
-
-	// found charset
-	if (res) {
-		charset = res.pop();
-
-		// prevent decode issues when sites use incorrect encoding
-		// ref: https://hsivonen.fi/encoding-menu/
-		if (charset === 'gb2312' || charset === 'gbk') {
-			charset = 'gb18030';
-		}
-	}
-
-	// turn raw buffers into a single utf-8 buffer
-	return convert(buffer, 'UTF-8', charset).toString();
-}
-
-/**
- * Detect a URLSearchParams object
- * ref: https://github.com/bitinn/node-fetch/issues/296#issuecomment-307598143
- *
- * @param   Object  obj     Object to detect by type or brand
- * @return  String
- */
-function isURLSearchParams(obj) {
-	// Duck-typing as a necessary condition.
-	if (typeof obj !== 'object' || typeof obj.append !== 'function' || typeof obj.delete !== 'function' || typeof obj.get !== 'function' || typeof obj.getAll !== 'function' || typeof obj.has !== 'function' || typeof obj.set !== 'function') {
-		return false;
-	}
-
-	// Brand-checking and more duck-typing as optional condition.
-	return obj.constructor.name === 'URLSearchParams' || Object.prototype.toString.call(obj) === '[object URLSearchParams]' || typeof obj.sort === 'function';
-}
-
-/**
- * Check if `obj` is a W3C `Blob` object (which `File` inherits from)
- * @param  {*} obj
- * @return {boolean}
- */
-function isBlob(obj) {
-	return typeof obj === 'object' && typeof obj.arrayBuffer === 'function' && typeof obj.type === 'string' && typeof obj.stream === 'function' && typeof obj.constructor === 'function' && typeof obj.constructor.name === 'string' && /^(Blob|File)$/.test(obj.constructor.name) && /^(Blob|File)$/.test(obj[Symbol.toStringTag]);
-}
-
-/**
- * Clone body given Res/Req instance
- *
- * @param   Mixed  instance  Response or Request instance
- * @return  Mixed
- */
-function clone(instance) {
-	let p1, p2;
-	let body = instance.body;
-
-	// don't allow cloning a used body
-	if (instance.bodyUsed) {
-		throw new Error('cannot clone body after it is used');
-	}
-
-	// check that body is a stream and not form-data object
-	// note: we can't clone the form-data object without having it as a dependency
-	if (body instanceof Stream && typeof body.getBoundary !== 'function') {
-		// tee instance body
-		p1 = new PassThrough();
-		p2 = new PassThrough();
-		body.pipe(p1);
-		body.pipe(p2);
-		// set instance body to teed body and return the other teed body
-		instance[INTERNALS].body = p1;
-		body = p2;
-	}
-
-	return body;
-}
-
-/**
- * Performs the operation "extract a `Content-Type` value from |object|" as
- * specified in the specification:
- * https://fetch.spec.whatwg.org/#concept-bodyinit-extract
- *
- * This function assumes that instance.body is present.
- *
- * @param   Mixed  instance  Any options.body input
- */
-function extractContentType(body) {
-	if (body === null) {
-		// body is null
-		return null;
-	} else if (typeof body === 'string') {
-		// body is string
-		return 'text/plain;charset=UTF-8';
-	} else if (isURLSearchParams(body)) {
-		// body is a URLSearchParams
-		return 'application/x-www-form-urlencoded;charset=UTF-8';
-	} else if (isBlob(body)) {
-		// body is blob
-		return body.type || null;
-	} else if (Buffer.isBuffer(body)) {
-		// body is buffer
-		return null;
-	} else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') {
-		// body is ArrayBuffer
-		return null;
-	} else if (ArrayBuffer.isView(body)) {
-		// body is ArrayBufferView
-		return null;
-	} else if (typeof body.getBoundary === 'function') {
-		// detect form data input from form-data module
-		return `multipart/form-data;boundary=${body.getBoundary()}`;
-	} else if (body instanceof Stream) {
-		// body is stream
-		// can't really do much about this
-		return null;
-	} else {
-		// Body constructor defaults other things to string
-		return 'text/plain;charset=UTF-8';
-	}
-}
-
-/**
- * The Fetch Standard treats this as if "total bytes" is a property on the body.
- * For us, we have to explicitly get it with a function.
- *
- * ref: https://fetch.spec.whatwg.org/#concept-body-total-bytes
- *
- * @param   Body    instance   Instance of Body
- * @return  Number?            Number of bytes, or null if not possible
- */
-function getTotalBytes(instance) {
-	const body = instance.body;
-
-
-	if (body === null) {
-		// body is null
-		return 0;
-	} else if (isBlob(body)) {
-		return body.size;
-	} else if (Buffer.isBuffer(body)) {
-		// body is buffer
-		return body.length;
-	} else if (body && typeof body.getLengthSync === 'function') {
-		// detect form data input from form-data module
-		if (body._lengthRetrievers && body._lengthRetrievers.length == 0 || // 1.x
-		body.hasKnownLength && body.hasKnownLength()) {
-			// 2.x
-			return body.getLengthSync();
-		}
-		return null;
-	} else {
-		// body is stream
-		return null;
-	}
-}
-
-/**
- * Write a Body to a Node.js WritableStream (e.g. http.Request) object.
- *
- * @param   Body    instance   Instance of Body
- * @return  Void
- */
-function writeToStream(dest, instance) {
-	const body = instance.body;
-
-
-	if (body === null) {
-		// body is null
-		dest.end();
-	} else if (isBlob(body)) {
-		body.stream().pipe(dest);
-	} else if (Buffer.isBuffer(body)) {
-		// body is buffer
-		dest.write(body);
-		dest.end();
-	} else {
-		// body is stream
-		body.pipe(dest);
-	}
-}
-
-// expose Promise
-Body.Promise = global.Promise;
-
-/**
- * headers.js
- *
- * Headers class offers convenient helpers
- */
-
-const invalidTokenRegex = /[^\^_`a-zA-Z\-0-9!#$%&'*+.|~]/;
-const invalidHeaderCharRegex = /[^\t\x20-\x7e\x80-\xff]/;
-
-function validateName(name) {
-	name = `${name}`;
-	if (invalidTokenRegex.test(name) || name === '') {
-		throw new TypeError(`${name} is not a legal HTTP header name`);
-	}
-}
-
-function validateValue(value) {
-	value = `${value}`;
-	if (invalidHeaderCharRegex.test(value)) {
-		throw new TypeError(`${value} is not a legal HTTP header value`);
-	}
-}
-
-/**
- * Find the key in the map object given a header name.
- *
- * Returns undefined if not found.
- *
- * @param   String  name  Header name
- * @return  String|Undefined
- */
-function find(map, name) {
-	name = name.toLowerCase();
-	for (const key in map) {
-		if (key.toLowerCase() === name) {
-			return key;
-		}
-	}
-	return undefined;
-}
-
-const MAP = Symbol('map');
-class Headers {
-	/**
-  * Headers class
-  *
-  * @param   Object  headers  Response headers
-  * @return  Void
-  */
-	constructor() {
-		let init = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;
-
-		this[MAP] = Object.create(null);
-
-		if (init instanceof Headers) {
-			const rawHeaders = init.raw();
-			const headerNames = Object.keys(rawHeaders);
-
-			for (const headerName of headerNames) {
-				for (const value of rawHeaders[headerName]) {
-					this.append(headerName, value);
-				}
-			}
-
-			return;
-		}
-
-		// We don't worry about converting prop to ByteString here as append()
-		// will handle it.
-		if (init == null) ; else if (typeof init === 'object') {
-			const method = init[Symbol.iterator];
-			if (method != null) {
-				if (typeof method !== 'function') {
-					throw new TypeError('Header pairs must be iterable');
-				}
-
-				// sequence<sequence<ByteString>>
-				// Note: per spec we have to first exhaust the lists then process them
-				const pairs = [];
-				for (const pair of init) {
-					if (typeof pair !== 'object' || typeof pair[Symbol.iterator] !== 'function') {
-						throw new TypeError('Each header pair must be iterable');
-					}
-					pairs.push(Array.from(pair));
-				}
-
-				for (const pair of pairs) {
-					if (pair.length !== 2) {
-						throw new TypeError('Each header pair must be a name/value tuple');
-					}
-					this.append(pair[0], pair[1]);
-				}
-			} else {
-				// record<ByteString, ByteString>
-				for (const key of Object.keys(init)) {
-					const value = init[key];
-					this.append(key, value);
-				}
-			}
-		} else {
-			throw new TypeError('Provided initializer must be an object');
-		}
-	}
-
-	/**
-  * Return combined header value given name
-  *
-  * @param   String  name  Header name
-  * @return  Mixed
-  */
-	get(name) {
-		name = `${name}`;
-		validateName(name);
-		const key = find(this[MAP], name);
-		if (key === undefined) {
-			return null;
-		}
-
-		return this[MAP][key].join(', ');
-	}
-
-	/**
-  * Iterate over all headers
-  *
-  * @param   Function  callback  Executed for each item with parameters (value, name, thisArg)
-  * @param   Boolean   thisArg   `this` context for callback function
-  * @return  Void
-  */
-	forEach(callback) {
-		let thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;
-
-		let pairs = getHeaders(this);
-		let i = 0;
-		while (i < pairs.length) {
-			var _pairs$i = pairs[i];
-			const name = _pairs$i[0],
-			      value = _pairs$i[1];
-
-			callback.call(thisArg, value, name, this);
-			pairs = getHeaders(this);
-			i++;
-		}
-	}
-
-	/**
-  * Overwrite header values given name
-  *
-  * @param   String  name   Header name
-  * @param   String  value  Header value
-  * @return  Void
-  */
-	set(name, value) {
-		name = `${name}`;
-		value = `${value}`;
-		validateName(name);
-		validateValue(value);
-		const key = find(this[MAP], name);
-		this[MAP][key !== undefined ? key : name] = [value];
-	}
-
-	/**
-  * Append a value onto existing header
-  *
-  * @param   String  name   Header name
-  * @param   String  value  Header value
-  * @return  Void
-  */
-	append(name, value) {
-		name = `${name}`;
-		value = `${value}`;
-		validateName(name);
-		validateValue(value);
-		const key = find(this[MAP], name);
-		if (key !== undefined) {
-			this[MAP][key].push(value);
-		} else {
-			this[MAP][name] = [value];
-		}
-	}
-
-	/**
-  * Check for header name existence
-  *
-  * @param   String   name  Header name
-  * @return  Boolean
-  */
-	has(name) {
-		name = `${name}`;
-		validateName(name);
-		return find(this[MAP], name) !== undefined;
-	}
-
-	/**
-  * Delete all header values given name
-  *
-  * @param   String  name  Header name
-  * @return  Void
-  */
-	delete(name) {
-		name = `${name}`;
-		validateName(name);
-		const key = find(this[MAP], name);
-		if (key !== undefined) {
-			delete this[MAP][key];
-		}
-	}
-
-	/**
-  * Return raw headers (non-spec api)
-  *
-  * @return  Object
-  */
-	raw() {
-		return this[MAP];
-	}
-
-	/**
-  * Get an iterator on keys.
-  *
-  * @return  Iterator
-  */
-	keys() {
-		return createHeadersIterator(this, 'key');
-	}
-
-	/**
-  * Get an iterator on values.
-  *
-  * @return  Iterator
-  */
-	values() {
-		return createHeadersIterator(this, 'value');
-	}
-
-	/**
-  * Get an iterator on entries.
-  *
-  * This is the default iterator of the Headers object.
-  *
-  * @return  Iterator
-  */
-	[Symbol.iterator]() {
-		return createHeadersIterator(this, 'key+value');
-	}
-}
-Headers.prototype.entries = Headers.prototype[Symbol.iterator];
-
-Object.defineProperty(Headers.prototype, Symbol.toStringTag, {
-	value: 'Headers',
-	writable: false,
-	enumerable: false,
-	configurable: true
-});
-
-Object.defineProperties(Headers.prototype, {
-	get: { enumerable: true },
-	forEach: { enumerable: true },
-	set: { enumerable: true },
-	append: { enumerable: true },
-	has: { enumerable: true },
-	delete: { enumerable: true },
-	keys: { enumerable: true },
-	values: { enumerable: true },
-	entries: { enumerable: true }
-});
-
-function getHeaders(headers) {
-	let kind = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'key+value';
-
-	const keys = Object.keys(headers[MAP]).sort();
-	return keys.map(kind === 'key' ? function (k) {
-		return k.toLowerCase();
-	} : kind === 'value' ? function (k) {
-		return headers[MAP][k].join(', ');
-	} : function (k) {
-		return [k.toLowerCase(), headers[MAP][k].join(', ')];
-	});
-}
-
-const INTERNAL = Symbol('internal');
-
-function createHeadersIterator(target, kind) {
-	const iterator = Object.create(HeadersIteratorPrototype);
-	iterator[INTERNAL] = {
-		target,
-		kind,
-		index: 0
-	};
-	return iterator;
-}
-
-const HeadersIteratorPrototype = Object.setPrototypeOf({
-	next() {
-		// istanbul ignore if
-		if (!this || Object.getPrototypeOf(this) !== HeadersIteratorPrototype) {
-			throw new TypeError('Value of `this` is not a HeadersIterator');
-		}
-
-		var _INTERNAL = this[INTERNAL];
-		const target = _INTERNAL.target,
-		      kind = _INTERNAL.kind,
-		      index = _INTERNAL.index;
-
-		const values = getHeaders(target, kind);
-		const len = values.length;
-		if (index >= len) {
-			return {
-				value: undefined,
-				done: true
-			};
-		}
-
-		this[INTERNAL].index = index + 1;
-
-		return {
-			value: values[index],
-			done: false
-		};
-	}
-}, Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));
-
-Object.defineProperty(HeadersIteratorPrototype, Symbol.toStringTag, {
-	value: 'HeadersIterator',
-	writable: false,
-	enumerable: false,
-	configurable: true
-});
-
-/**
- * Export the Headers object in a form that Node.js can consume.
- *
- * @param   Headers  headers
- * @return  Object
- */
-function exportNodeCompatibleHeaders(headers) {
-	const obj = Object.assign({ __proto__: null }, headers[MAP]);
-
-	// http.request() only supports string as Host header. This hack makes
-	// specifying custom Host header possible.
-	const hostHeaderKey = find(headers[MAP], 'Host');
-	if (hostHeaderKey !== undefined) {
-		obj[hostHeaderKey] = obj[hostHeaderKey][0];
-	}
-
-	return obj;
-}
-
-/**
- * Create a Headers object from an object of headers, ignoring those that do
- * not conform to HTTP grammar productions.
- *
- * @param   Object  obj  Object of headers
- * @return  Headers
- */
-function createHeadersLenient(obj) {
-	const headers = new Headers();
-	for (const name of Object.keys(obj)) {
-		if (invalidTokenRegex.test(name)) {
-			continue;
-		}
-		if (Array.isArray(obj[name])) {
-			for (const val of obj[name]) {
-				if (invalidHeaderCharRegex.test(val)) {
-					continue;
-				}
-				if (headers[MAP][name] === undefined) {
-					headers[MAP][name] = [val];
-				} else {
-					headers[MAP][name].push(val);
-				}
-			}
-		} else if (!invalidHeaderCharRegex.test(obj[name])) {
-			headers[MAP][name] = [obj[name]];
-		}
-	}
-	return headers;
-}
-
-const INTERNALS$1 = Symbol('Response internals');
-
-// fix an issue where "STATUS_CODES" aren't a named export for node <10
-const STATUS_CODES = http.STATUS_CODES;
-
-/**
- * Response class
- *
- * @param   Stream  body  Readable stream
- * @param   Object  opts  Response options
- * @return  Void
- */
-class Response {
-	constructor() {
-		let body = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
-		let opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
-
-		Body.call(this, body, opts);
-
-		const status = opts.status || 200;
-		const headers = new Headers(opts.headers);
-
-		if (body != null && !headers.has('Content-Type')) {
-			const contentType = extractContentType(body);
-			if (contentType) {
-				headers.append('Content-Type', contentType);
-			}
-		}
-
-		this[INTERNALS$1] = {
-			url: opts.url,
-			status,
-			statusText: opts.statusText || STATUS_CODES[status],
-			headers,
-			counter: opts.counter
-		};
-	}
-
-	get url() {
-		return this[INTERNALS$1].url || '';
-	}
-
-	get status() {
-		return this[INTERNALS$1].status;
-	}
-
-	/**
-  * Convenience property representing if the request ended normally
-  */
-	get ok() {
-		return this[INTERNALS$1].status >= 200 && this[INTERNALS$1].status < 300;
-	}
-
-	get redirected() {
-		return this[INTERNALS$1].counter > 0;
-	}
-
-	get statusText() {
-		return this[INTERNALS$1].statusText;
-	}
-
-	get headers() {
-		return this[INTERNALS$1].headers;
-	}
-
-	/**
-  * Clone this response
-  *
-  * @return  Response
-  */
-	clone() {
-		return new Response(clone(this), {
-			url: this.url,
-			status: this.status,
-			statusText: this.statusText,
-			headers: this.headers,
-			ok: this.ok,
-			redirected: this.redirected
-		});
-	}
-}
-
-Body.mixIn(Response.prototype);
-
-Object.defineProperties(Response.prototype, {
-	url: { enumerable: true },
-	status: { enumerable: true },
-	ok: { enumerable: true },
-	redirected: { enumerable: true },
-	statusText: { enumerable: true },
-	headers: { enumerable: true },
-	clone: { enumerable: true }
-});
-
-Object.defineProperty(Response.prototype, Symbol.toStringTag, {
-	value: 'Response',
-	writable: false,
-	enumerable: false,
-	configurable: true
-});
-
-const INTERNALS$2 = Symbol('Request internals');
-const URL = Url.URL || whatwgUrl.URL;
-
-// fix an issue where "format", "parse" aren't a named export for node <10
-const parse_url = Url.parse;
-const format_url = Url.format;
-
-/**
- * Wrapper around `new URL` to handle arbitrary URLs
- *
- * @param  {string} urlStr
- * @return {void}
- */
-function parseURL(urlStr) {
-	/*
- 	Check whether the URL is absolute or not
- 		Scheme: https://tools.ietf.org/html/rfc3986#section-3.1
- 	Absolute URL: https://tools.ietf.org/html/rfc3986#section-4.3
- */
-	if (/^[a-zA-Z][a-zA-Z\d+\-.]*:/.exec(urlStr)) {
-		urlStr = new URL(urlStr).toString();
-	}
-
-	// Fallback to old implementation for arbitrary URLs
-	return parse_url(urlStr);
-}
-
-const streamDestructionSupported = 'destroy' in Stream.Readable.prototype;
-
-/**
- * Check if a value is an instance of Request.
- *
- * @param   Mixed   input
- * @return  Boolean
- */
-function isRequest(input) {
-	return typeof input === 'object' && typeof input[INTERNALS$2] === 'object';
-}
-
-function isAbortSignal(signal) {
-	const proto = signal && typeof signal === 'object' && Object.getPrototypeOf(signal);
-	return !!(proto && proto.constructor.name === 'AbortSignal');
-}
-
-/**
- * Request class
- *
- * @param   Mixed   input  Url or Request instance
- * @param   Object  init   Custom options
- * @return  Void
- */
-class Request {
-	constructor(input) {
-		let init = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
-
-		let parsedURL;
-
-		// normalize input
-		if (!isRequest(input)) {
-			if (input && input.href) {
-				// in order to support Node.js' Url objects; though WHATWG's URL objects
-				// will fall into this branch also (since their `toString()` will return
-				// `href` property anyway)
-				parsedURL = parseURL(input.href);
-			} else {
-				// coerce input to a string before attempting to parse
-				parsedURL = parseURL(`${input}`);
-			}
-			input = {};
-		} else {
-			parsedURL = parseURL(input.url);
-		}
-
-		let method = init.method || input.method || 'GET';
-		method = method.toUpperCase();
-
-		if ((init.body != null || isRequest(input) && input.body !== null) && (method === 'GET' || method === 'HEAD')) {
-			throw new TypeError('Request with GET/HEAD method cannot have body');
-		}
-
-		let inputBody = init.body != null ? init.body : isRequest(input) && input.body !== null ? clone(input) : null;
-
-		Body.call(this, inputBody, {
-			timeout: init.timeout || input.timeout || 0,
-			size: init.size || input.size || 0
-		});
-
-		const headers = new Headers(init.headers || input.headers || {});
-
-		if (inputBody != null && !headers.has('Content-Type')) {
-			const contentType = extractContentType(inputBody);
-			if (contentType) {
-				headers.append('Content-Type', contentType);
-			}
-		}
-
-		let signal = isRequest(input) ? input.signal : null;
-		if ('signal' in init) signal = init.signal;
-
-		if (signal != null && !isAbortSignal(signal)) {
-			throw new TypeError('Expected signal to be an instanceof AbortSignal');
-		}
-
-		this[INTERNALS$2] = {
-			method,
-			redirect: init.redirect || input.redirect || 'follow',
-			headers,
-			parsedURL,
-			signal
-		};
-
-		// node-fetch-only options
-		this.follow = init.follow !== undefined ? init.follow : input.follow !== undefined ? input.follow : 20;
-		this.compress = init.compress !== undefined ? init.compress : input.compress !== undefined ? input.compress : true;
-		this.counter = init.counter || input.counter || 0;
-		this.agent = init.agent || input.agent;
-	}
-
-	get method() {
-		return this[INTERNALS$2].method;
-	}
-
-	get url() {
-		return format_url(this[INTERNALS$2].parsedURL);
-	}
-
-	get headers() {
-		return this[INTERNALS$2].headers;
-	}
-
-	get redirect() {
-		return this[INTERNALS$2].redirect;
-	}
-
-	get signal() {
-		return this[INTERNALS$2].signal;
-	}
-
-	/**
-  * Clone this request
-  *
-  * @return  Request
-  */
-	clone() {
-		return new Request(this);
-	}
-}
-
-Body.mixIn(Request.prototype);
-
-Object.defineProperty(Request.prototype, Symbol.toStringTag, {
-	value: 'Request',
-	writable: false,
-	enumerable: false,
-	configurable: true
-});
-
-Object.defineProperties(Request.prototype, {
-	method: { enumerable: true },
-	url: { enumerable: true },
-	headers: { enumerable: true },
-	redirect: { enumerable: true },
-	clone: { enumerable: true },
-	signal: { enumerable: true }
-});
-
-/**
- * Convert a Request to Node.js http request options.
- *
- * @param   Request  A Request instance
- * @return  Object   The options object to be passed to http.request
- */
-function getNodeRequestOptions(request) {
-	const parsedURL = request[INTERNALS$2].parsedURL;
-	const headers = new Headers(request[INTERNALS$2].headers);
-
-	// fetch step 1.3
-	if (!headers.has('Accept')) {
-		headers.set('Accept', '*/*');
-	}
-
-	// Basic fetch
-	if (!parsedURL.protocol || !parsedURL.hostname) {
-		throw new TypeError('Only absolute URLs are supported');
-	}
-
-	if (!/^https?:$/.test(parsedURL.protocol)) {
-		throw new TypeError('Only HTTP(S) protocols are supported');
-	}
-
-	if (request.signal && request.body instanceof Stream.Readable && !streamDestructionSupported) {
-		throw new Error('Cancellation of streamed requests with AbortSignal is not supported in node < 8');
-	}
-
-	// HTTP-network-or-cache fetch steps 2.4-2.7
-	let contentLengthValue = null;
-	if (request.body == null && /^(POST|PUT)$/i.test(request.method)) {
-		contentLengthValue = '0';
-	}
-	if (request.body != null) {
-		const totalBytes = getTotalBytes(request);
-		if (typeof totalBytes === 'number') {
-			contentLengthValue = String(totalBytes);
-		}
-	}
-	if (contentLengthValue) {
-		headers.set('Content-Length', contentLengthValue);
-	}
-
-	// HTTP-network-or-cache fetch step 2.11
-	if (!headers.has('User-Agent')) {
-		headers.set('User-Agent', 'node-fetch/1.0 (+https://github.com/bitinn/node-fetch)');
-	}
-
-	// HTTP-network-or-cache fetch step 2.15
-	if (request.compress && !headers.has('Accept-Encoding')) {
-		headers.set('Accept-Encoding', 'gzip,deflate');
-	}
-
-	let agent = request.agent;
-	if (typeof agent === 'function') {
-		agent = agent(parsedURL);
-	}
-
-	// HTTP-network fetch step 4.2
-	// chunked encoding is handled by Node.js
-
-	return Object.assign({}, parsedURL, {
-		method: request.method,
-		headers: exportNodeCompatibleHeaders(headers),
-		agent
-	});
-}
-
-/**
- * abort-error.js
- *
- * AbortError interface for cancelled requests
- */
-
-/**
- * Create AbortError instance
- *
- * @param   String      message      Error message for human
- * @return  AbortError
- */
-function AbortError(message) {
-  Error.call(this, message);
-
-  this.type = 'aborted';
-  this.message = message;
-
-  // hide custom error implementation details from end-users
-  Error.captureStackTrace(this, this.constructor);
-}
-
-AbortError.prototype = Object.create(Error.prototype);
-AbortError.prototype.constructor = AbortError;
-AbortError.prototype.name = 'AbortError';
-
-const URL$1 = Url.URL || whatwgUrl.URL;
-
-// fix an issue where "PassThrough", "resolve" aren't a named export for node <10
-const PassThrough$1 = Stream.PassThrough;
-
-const isDomainOrSubdomain = function isDomainOrSubdomain(destination, original) {
-	const orig = new URL$1(original).hostname;
-	const dest = new URL$1(destination).hostname;
-
-	return orig === dest || orig[orig.length - dest.length - 1] === '.' && orig.endsWith(dest);
-};
-
-/**
- * isSameProtocol reports whether the two provided URLs use the same protocol.
- *
- * Both domains must already be in canonical form.
- * @param {string|URL} original
- * @param {string|URL} destination
- */
-const isSameProtocol = function isSameProtocol(destination, original) {
-	const orig = new URL$1(original).protocol;
-	const dest = new URL$1(destination).protocol;
-
-	return orig === dest;
-};
-
-/**
- * Fetch function
- *
- * @param   Mixed    url   Absolute url or Request instance
- * @param   Object   opts  Fetch options
- * @return  Promise
- */
-function fetch(url, opts) {
-
-	// allow custom promise
-	if (!fetch.Promise) {
-		throw new Error('native promise missing, set fetch.Promise to your favorite alternative');
-	}
-
-	Body.Promise = fetch.Promise;
-
-	// wrap http.request into fetch
-	return new fetch.Promise(function (resolve, reject) {
-		// build request object
-		const request = new Request(url, opts);
-		const options = getNodeRequestOptions(request);
-
-		const send = (options.protocol === 'https:' ? https : http).request;
-		const signal = request.signal;
-
-		let response = null;
-
-		const abort = function abort() {
-			let error = new AbortError('The user aborted a request.');
-			reject(error);
-			if (request.body && request.body instanceof Stream.Readable) {
-				destroyStream(request.body, error);
-			}
-			if (!response || !response.body) return;
-			response.body.emit('error', error);
-		};
-
-		if (signal && signal.aborted) {
-			abort();
-			return;
-		}
-
-		const abortAndFinalize = function abortAndFinalize() {
-			abort();
-			finalize();
-		};
-
-		// send request
-		const req = send(options);
-		let reqTimeout;
-
-		if (signal) {
-			signal.addEventListener('abort', abortAndFinalize);
-		}
-
-		function finalize() {
-			req.abort();
-			if (signal) signal.removeEventListener('abort', abortAndFinalize);
-			clearTimeout(reqTimeout);
-		}
-
-		if (request.timeout) {
-			req.once('socket', function (socket) {
-				reqTimeout = setTimeout(function () {
-					reject(new FetchError(`network timeout at: ${request.url}`, 'request-timeout'));
-					finalize();
-				}, request.timeout);
-			});
-		}
-
-		req.on('error', function (err) {
-			reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err));
-
-			if (response && response.body) {
-				destroyStream(response.body, err);
-			}
-
-			finalize();
-		});
-
-		fixResponseChunkedTransferBadEnding(req, function (err) {
-			if (signal && signal.aborted) {
-				return;
-			}
-
-			if (response && response.body) {
-				destroyStream(response.body, err);
-			}
-		});
-
-		/* c8 ignore next 18 */
-		if (parseInt(process.version.substring(1)) < 14) {
-			// Before Node.js 14, pipeline() does not fully support async iterators and does not always
-			// properly handle when the socket close/end events are out of order.
-			req.on('socket', function (s) {
-				s.addListener('close', function (hadError) {
-					// if a data listener is still present we didn't end cleanly
-					const hasDataListener = s.listenerCount('data') > 0;
-
-					// if end happened before close but the socket didn't emit an error, do it now
-					if (response && hasDataListener && !hadError && !(signal && signal.aborted)) {
-						const err = new Error('Premature close');
-						err.code = 'ERR_STREAM_PREMATURE_CLOSE';
-						response.body.emit('error', err);
-					}
-				});
-			});
-		}
-
-		req.on('response', function (res) {
-			clearTimeout(reqTimeout);
-
-			const headers = createHeadersLenient(res.headers);
-
-			// HTTP fetch step 5
-			if (fetch.isRedirect(res.statusCode)) {
-				// HTTP fetch step 5.2
-				const location = headers.get('Location');
-
-				// HTTP fetch step 5.3
-				let locationURL = null;
-				try {
-					locationURL = location === null ? null : new URL$1(location, request.url).toString();
-				} catch (err) {
-					// error here can only be invalid URL in Location: header
-					// do not throw when options.redirect == manual
-					// let the user extract the errorneous redirect URL
-					if (request.redirect !== 'manual') {
-						reject(new FetchError(`uri requested responds with an invalid redirect URL: ${location}`, 'invalid-redirect'));
-						finalize();
-						return;
-					}
-				}
-
-				// HTTP fetch step 5.5
-				switch (request.redirect) {
-					case 'error':
-						reject(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${request.url}`, 'no-redirect'));
-						finalize();
-						return;
-					case 'manual':
-						// node-fetch-specific step: make manual redirect a bit easier to use by setting the Location header value to the resolved URL.
-						if (locationURL !== null) {
-							// handle corrupted header
-							try {
-								headers.set('Location', locationURL);
-							} catch (err) {
-								// istanbul ignore next: nodejs server prevent invalid response headers, we can't test this through normal request
-								reject(err);
-							}
-						}
-						break;
-					case 'follow':
-						// HTTP-redirect fetch step 2
-						if (locationURL === null) {
-							break;
-						}
-
-						// HTTP-redirect fetch step 5
-						if (request.counter >= request.follow) {
-							reject(new FetchError(`maximum redirect reached at: ${request.url}`, 'max-redirect'));
-							finalize();
-							return;
-						}
-
-						// HTTP-redirect fetch step 6 (counter increment)
-						// Create a new Request object.
-						const requestOpts = {
-							headers: new Headers(request.headers),
-							follow: request.follow,
-							counter: request.counter + 1,
-							agent: request.agent,
-							compress: request.compress,
-							method: request.method,
-							body: request.body,
-							signal: request.signal,
-							timeout: request.timeout,
-							size: request.size
-						};
-
-						if (!isDomainOrSubdomain(request.url, locationURL) || !isSameProtocol(request.url, locationURL)) {
-							for (const name of ['authorization', 'www-authenticate', 'cookie', 'cookie2']) {
-								requestOpts.headers.delete(name);
-							}
-						}
-
-						// HTTP-redirect fetch step 9
-						if (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) {
-							reject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect'));
-							finalize();
-							return;
-						}
-
-						// HTTP-redirect fetch step 11
-						if (res.statusCode === 303 || (res.statusCode === 301 || res.statusCode === 302) && request.method === 'POST') {
-							requestOpts.method = 'GET';
-							requestOpts.body = undefined;
-							requestOpts.headers.delete('content-length');
-						}
-
-						// HTTP-redirect fetch step 15
-						resolve(fetch(new Request(locationURL, requestOpts)));
-						finalize();
-						return;
-				}
-			}
-
-			// prepare response
-			res.once('end', function () {
-				if (signal) signal.removeEventListener('abort', abortAndFinalize);
-			});
-			let body = res.pipe(new PassThrough$1());
-
-			const response_options = {
-				url: request.url,
-				status: res.statusCode,
-				statusText: res.statusMessage,
-				headers: headers,
-				size: request.size,
-				timeout: request.timeout,
-				counter: request.counter
-			};
-
-			// HTTP-network fetch step 12.1.1.3
-			const codings = headers.get('Content-Encoding');
-
-			// HTTP-network fetch step 12.1.1.4: handle content codings
-
-			// in following scenarios we ignore compression support
-			// 1. compression support is disabled
-			// 2. HEAD request
-			// 3. no Content-Encoding header
-			// 4. no content response (204)
-			// 5. content not modified response (304)
-			if (!request.compress || request.method === 'HEAD' || codings === null || res.statusCode === 204 || res.statusCode === 304) {
-				response = new Response(body, response_options);
-				resolve(response);
-				return;
-			}
-
-			// For Node v6+
-			// Be less strict when decoding compressed responses, since sometimes
-			// servers send slightly invalid responses that are still accepted
-			// by common browsers.
-			// Always using Z_SYNC_FLUSH is what cURL does.
-			const zlibOptions = {
-				flush: zlib.Z_SYNC_FLUSH,
-				finishFlush: zlib.Z_SYNC_FLUSH
-			};
-
-			// for gzip
-			if (codings == 'gzip' || codings == 'x-gzip') {
-				body = body.pipe(zlib.createGunzip(zlibOptions));
-				response = new Response(body, response_options);
-				resolve(response);
-				return;
-			}
-
-			// for deflate
-			if (codings == 'deflate' || codings == 'x-deflate') {
-				// handle the infamous raw deflate response from old servers
-				// a hack for old IIS and Apache servers
-				const raw = res.pipe(new PassThrough$1());
-				raw.once('data', function (chunk) {
-					// see http://stackoverflow.com/questions/37519828
-					if ((chunk[0] & 0x0F) === 0x08) {
-						body = body.pipe(zlib.createInflate());
-					} else {
-						body = body.pipe(zlib.createInflateRaw());
-					}
-					response = new Response(body, response_options);
-					resolve(response);
-				});
-				raw.on('end', function () {
-					// some old IIS servers return zero-length OK deflate responses, so 'data' is never emitted.
-					if (!response) {
-						response = new Response(body, response_options);
-						resolve(response);
-					}
-				});
-				return;
-			}
-
-			// for br
-			if (codings == 'br' && typeof zlib.createBrotliDecompress === 'function') {
-				body = body.pipe(zlib.createBrotliDecompress());
-				response = new Response(body, response_options);
-				resolve(response);
-				return;
-			}
-
-			// otherwise, use response as-is
-			response = new Response(body, response_options);
-			resolve(response);
-		});
-
-		writeToStream(req, request);
-	});
-}
-function fixResponseChunkedTransferBadEnding(request, errorCallback) {
-	let socket;
-
-	request.on('socket', function (s) {
-		socket = s;
-	});
-
-	request.on('response', function (response) {
-		const headers = response.headers;
-
-		if (headers['transfer-encoding'] === 'chunked' && !headers['content-length']) {
-			response.once('close', function (hadError) {
-				// tests for socket presence, as in some situations the
-				// the 'socket' event is not triggered for the request
-				// (happens in deno), avoids `TypeError`
-				// if a data listener is still present we didn't end cleanly
-				const hasDataListener = socket && socket.listenerCount('data') > 0;
-
-				if (hasDataListener && !hadError) {
-					const err = new Error('Premature close');
-					err.code = 'ERR_STREAM_PREMATURE_CLOSE';
-					errorCallback(err);
-				}
-			});
-		}
-	});
-}
-
-function destroyStream(stream, err) {
-	if (stream.destroy) {
-		stream.destroy(err);
-	} else {
-		// node < 8
-		stream.emit('error', err);
-		stream.end();
-	}
-}
-
-/**
- * Redirect code matching
- *
- * @param   Number   code  Status code
- * @return  Boolean
- */
-fetch.isRedirect = function (code) {
-	return code === 301 || code === 302 || code === 303 || code === 307 || code === 308;
-};
-
-// expose Promise
-fetch.Promise = global.Promise;
-
-export default fetch;
-export { Headers, Request, Response, FetchError, AbortError };

+ 0 - 1787
rag-server/node_modules/@mapbox/node-pre-gyp/node_modules/node-fetch/lib/index.js

@@ -1,1787 +0,0 @@
-'use strict';
-
-Object.defineProperty(exports, '__esModule', { value: true });
-
-function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
-
-var Stream = _interopDefault(require('stream'));
-var http = _interopDefault(require('http'));
-var Url = _interopDefault(require('url'));
-var whatwgUrl = _interopDefault(require('whatwg-url'));
-var https = _interopDefault(require('https'));
-var zlib = _interopDefault(require('zlib'));
-
-// Based on https://github.com/tmpvar/jsdom/blob/aa85b2abf07766ff7bf5c1f6daafb3726f2f2db5/lib/jsdom/living/blob.js
-
-// fix for "Readable" isn't a named export issue
-const Readable = Stream.Readable;
-
-const BUFFER = Symbol('buffer');
-const TYPE = Symbol('type');
-
-class Blob {
-	constructor() {
-		this[TYPE] = '';
-
-		const blobParts = arguments[0];
-		const options = arguments[1];
-
-		const buffers = [];
-		let size = 0;
-
-		if (blobParts) {
-			const a = blobParts;
-			const length = Number(a.length);
-			for (let i = 0; i < length; i++) {
-				const element = a[i];
-				let buffer;
-				if (element instanceof Buffer) {
-					buffer = element;
-				} else if (ArrayBuffer.isView(element)) {
-					buffer = Buffer.from(element.buffer, element.byteOffset, element.byteLength);
-				} else if (element instanceof ArrayBuffer) {
-					buffer = Buffer.from(element);
-				} else if (element instanceof Blob) {
-					buffer = element[BUFFER];
-				} else {
-					buffer = Buffer.from(typeof element === 'string' ? element : String(element));
-				}
-				size += buffer.length;
-				buffers.push(buffer);
-			}
-		}
-
-		this[BUFFER] = Buffer.concat(buffers);
-
-		let type = options && options.type !== undefined && String(options.type).toLowerCase();
-		if (type && !/[^\u0020-\u007E]/.test(type)) {
-			this[TYPE] = type;
-		}
-	}
-	get size() {
-		return this[BUFFER].length;
-	}
-	get type() {
-		return this[TYPE];
-	}
-	text() {
-		return Promise.resolve(this[BUFFER].toString());
-	}
-	arrayBuffer() {
-		const buf = this[BUFFER];
-		const ab = buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength);
-		return Promise.resolve(ab);
-	}
-	stream() {
-		const readable = new Readable();
-		readable._read = function () {};
-		readable.push(this[BUFFER]);
-		readable.push(null);
-		return readable;
-	}
-	toString() {
-		return '[object Blob]';
-	}
-	slice() {
-		const size = this.size;
-
-		const start = arguments[0];
-		const end = arguments[1];
-		let relativeStart, relativeEnd;
-		if (start === undefined) {
-			relativeStart = 0;
-		} else if (start < 0) {
-			relativeStart = Math.max(size + start, 0);
-		} else {
-			relativeStart = Math.min(start, size);
-		}
-		if (end === undefined) {
-			relativeEnd = size;
-		} else if (end < 0) {
-			relativeEnd = Math.max(size + end, 0);
-		} else {
-			relativeEnd = Math.min(end, size);
-		}
-		const span = Math.max(relativeEnd - relativeStart, 0);
-
-		const buffer = this[BUFFER];
-		const slicedBuffer = buffer.slice(relativeStart, relativeStart + span);
-		const blob = new Blob([], { type: arguments[2] });
-		blob[BUFFER] = slicedBuffer;
-		return blob;
-	}
-}
-
-Object.defineProperties(Blob.prototype, {
-	size: { enumerable: true },
-	type: { enumerable: true },
-	slice: { enumerable: true }
-});
-
-Object.defineProperty(Blob.prototype, Symbol.toStringTag, {
-	value: 'Blob',
-	writable: false,
-	enumerable: false,
-	configurable: true
-});
-
-/**
- * fetch-error.js
- *
- * FetchError interface for operational errors
- */
-
-/**
- * Create FetchError instance
- *
- * @param   String      message      Error message for human
- * @param   String      type         Error type for machine
- * @param   String      systemError  For Node.js system error
- * @return  FetchError
- */
-function FetchError(message, type, systemError) {
-  Error.call(this, message);
-
-  this.message = message;
-  this.type = type;
-
-  // when err.type is `system`, err.code contains system error code
-  if (systemError) {
-    this.code = this.errno = systemError.code;
-  }
-
-  // hide custom error implementation details from end-users
-  Error.captureStackTrace(this, this.constructor);
-}
-
-FetchError.prototype = Object.create(Error.prototype);
-FetchError.prototype.constructor = FetchError;
-FetchError.prototype.name = 'FetchError';
-
-let convert;
-try {
-	convert = require('encoding').convert;
-} catch (e) {}
-
-const INTERNALS = Symbol('Body internals');
-
-// fix an issue where "PassThrough" isn't a named export for node <10
-const PassThrough = Stream.PassThrough;
-
-/**
- * Body mixin
- *
- * Ref: https://fetch.spec.whatwg.org/#body
- *
- * @param   Stream  body  Readable stream
- * @param   Object  opts  Response options
- * @return  Void
- */
-function Body(body) {
-	var _this = this;
-
-	var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
-	    _ref$size = _ref.size;
-
-	let size = _ref$size === undefined ? 0 : _ref$size;
-	var _ref$timeout = _ref.timeout;
-	let timeout = _ref$timeout === undefined ? 0 : _ref$timeout;
-
-	if (body == null) {
-		// body is undefined or null
-		body = null;
-	} else if (isURLSearchParams(body)) {
-		// body is a URLSearchParams
-		body = Buffer.from(body.toString());
-	} else if (isBlob(body)) ; else if (Buffer.isBuffer(body)) ; else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') {
-		// body is ArrayBuffer
-		body = Buffer.from(body);
-	} else if (ArrayBuffer.isView(body)) {
-		// body is ArrayBufferView
-		body = Buffer.from(body.buffer, body.byteOffset, body.byteLength);
-	} else if (body instanceof Stream) ; else {
-		// none of the above
-		// coerce to string then buffer
-		body = Buffer.from(String(body));
-	}
-	this[INTERNALS] = {
-		body,
-		disturbed: false,
-		error: null
-	};
-	this.size = size;
-	this.timeout = timeout;
-
-	if (body instanceof Stream) {
-		body.on('error', function (err) {
-			const error = err.name === 'AbortError' ? err : new FetchError(`Invalid response body while trying to fetch ${_this.url}: ${err.message}`, 'system', err);
-			_this[INTERNALS].error = error;
-		});
-	}
-}
-
-Body.prototype = {
-	get body() {
-		return this[INTERNALS].body;
-	},
-
-	get bodyUsed() {
-		return this[INTERNALS].disturbed;
-	},
-
-	/**
-  * Decode response as ArrayBuffer
-  *
-  * @return  Promise
-  */
-	arrayBuffer() {
-		return consumeBody.call(this).then(function (buf) {
-			return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength);
-		});
-	},
-
-	/**
-  * Return raw response as Blob
-  *
-  * @return Promise
-  */
-	blob() {
-		let ct = this.headers && this.headers.get('content-type') || '';
-		return consumeBody.call(this).then(function (buf) {
-			return Object.assign(
-			// Prevent copying
-			new Blob([], {
-				type: ct.toLowerCase()
-			}), {
-				[BUFFER]: buf
-			});
-		});
-	},
-
-	/**
-  * Decode response as json
-  *
-  * @return  Promise
-  */
-	json() {
-		var _this2 = this;
-
-		return consumeBody.call(this).then(function (buffer) {
-			try {
-				return JSON.parse(buffer.toString());
-			} catch (err) {
-				return Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, 'invalid-json'));
-			}
-		});
-	},
-
-	/**
-  * Decode response as text
-  *
-  * @return  Promise
-  */
-	text() {
-		return consumeBody.call(this).then(function (buffer) {
-			return buffer.toString();
-		});
-	},
-
-	/**
-  * Decode response as buffer (non-spec api)
-  *
-  * @return  Promise
-  */
-	buffer() {
-		return consumeBody.call(this);
-	},
-
-	/**
-  * Decode response as text, while automatically detecting the encoding and
-  * trying to decode to UTF-8 (non-spec api)
-  *
-  * @return  Promise
-  */
-	textConverted() {
-		var _this3 = this;
-
-		return consumeBody.call(this).then(function (buffer) {
-			return convertBody(buffer, _this3.headers);
-		});
-	}
-};
-
-// In browsers, all properties are enumerable.
-Object.defineProperties(Body.prototype, {
-	body: { enumerable: true },
-	bodyUsed: { enumerable: true },
-	arrayBuffer: { enumerable: true },
-	blob: { enumerable: true },
-	json: { enumerable: true },
-	text: { enumerable: true }
-});
-
-Body.mixIn = function (proto) {
-	for (const name of Object.getOwnPropertyNames(Body.prototype)) {
-		// istanbul ignore else: future proof
-		if (!(name in proto)) {
-			const desc = Object.getOwnPropertyDescriptor(Body.prototype, name);
-			Object.defineProperty(proto, name, desc);
-		}
-	}
-};
-
-/**
- * Consume and convert an entire Body to a Buffer.
- *
- * Ref: https://fetch.spec.whatwg.org/#concept-body-consume-body
- *
- * @return  Promise
- */
-function consumeBody() {
-	var _this4 = this;
-
-	if (this[INTERNALS].disturbed) {
-		return Body.Promise.reject(new TypeError(`body used already for: ${this.url}`));
-	}
-
-	this[INTERNALS].disturbed = true;
-
-	if (this[INTERNALS].error) {
-		return Body.Promise.reject(this[INTERNALS].error);
-	}
-
-	let body = this.body;
-
-	// body is null
-	if (body === null) {
-		return Body.Promise.resolve(Buffer.alloc(0));
-	}
-
-	// body is blob
-	if (isBlob(body)) {
-		body = body.stream();
-	}
-
-	// body is buffer
-	if (Buffer.isBuffer(body)) {
-		return Body.Promise.resolve(body);
-	}
-
-	// istanbul ignore if: should never happen
-	if (!(body instanceof Stream)) {
-		return Body.Promise.resolve(Buffer.alloc(0));
-	}
-
-	// body is stream
-	// get ready to actually consume the body
-	let accum = [];
-	let accumBytes = 0;
-	let abort = false;
-
-	return new Body.Promise(function (resolve, reject) {
-		let resTimeout;
-
-		// allow timeout on slow response body
-		if (_this4.timeout) {
-			resTimeout = setTimeout(function () {
-				abort = true;
-				reject(new FetchError(`Response timeout while trying to fetch ${_this4.url} (over ${_this4.timeout}ms)`, 'body-timeout'));
-			}, _this4.timeout);
-		}
-
-		// handle stream errors
-		body.on('error', function (err) {
-			if (err.name === 'AbortError') {
-				// if the request was aborted, reject with this Error
-				abort = true;
-				reject(err);
-			} else {
-				// other errors, such as incorrect content-encoding
-				reject(new FetchError(`Invalid response body while trying to fetch ${_this4.url}: ${err.message}`, 'system', err));
-			}
-		});
-
-		body.on('data', function (chunk) {
-			if (abort || chunk === null) {
-				return;
-			}
-
-			if (_this4.size && accumBytes + chunk.length > _this4.size) {
-				abort = true;
-				reject(new FetchError(`content size at ${_this4.url} over limit: ${_this4.size}`, 'max-size'));
-				return;
-			}
-
-			accumBytes += chunk.length;
-			accum.push(chunk);
-		});
-
-		body.on('end', function () {
-			if (abort) {
-				return;
-			}
-
-			clearTimeout(resTimeout);
-
-			try {
-				resolve(Buffer.concat(accum, accumBytes));
-			} catch (err) {
-				// handle streams that have accumulated too much data (issue #414)
-				reject(new FetchError(`Could not create Buffer from response body for ${_this4.url}: ${err.message}`, 'system', err));
-			}
-		});
-	});
-}
-
-/**
- * Detect buffer encoding and convert to target encoding
- * ref: http://www.w3.org/TR/2011/WD-html5-20110113/parsing.html#determining-the-character-encoding
- *
- * @param   Buffer  buffer    Incoming buffer
- * @param   String  encoding  Target encoding
- * @return  String
- */
-function convertBody(buffer, headers) {
-	if (typeof convert !== 'function') {
-		throw new Error('The package `encoding` must be installed to use the textConverted() function');
-	}
-
-	const ct = headers.get('content-type');
-	let charset = 'utf-8';
-	let res, str;
-
-	// header
-	if (ct) {
-		res = /charset=([^;]*)/i.exec(ct);
-	}
-
-	// no charset in content type, peek at response body for at most 1024 bytes
-	str = buffer.slice(0, 1024).toString();
-
-	// html5
-	if (!res && str) {
-		res = /<meta.+?charset=(['"])(.+?)\1/i.exec(str);
-	}
-
-	// html4
-	if (!res && str) {
-		res = /<meta[\s]+?http-equiv=(['"])content-type\1[\s]+?content=(['"])(.+?)\2/i.exec(str);
-		if (!res) {
-			res = /<meta[\s]+?content=(['"])(.+?)\1[\s]+?http-equiv=(['"])content-type\3/i.exec(str);
-			if (res) {
-				res.pop(); // drop last quote
-			}
-		}
-
-		if (res) {
-			res = /charset=(.*)/i.exec(res.pop());
-		}
-	}
-
-	// xml
-	if (!res && str) {
-		res = /<\?xml.+?encoding=(['"])(.+?)\1/i.exec(str);
-	}
-
-	// found charset
-	if (res) {
-		charset = res.pop();
-
-		// prevent decode issues when sites use incorrect encoding
-		// ref: https://hsivonen.fi/encoding-menu/
-		if (charset === 'gb2312' || charset === 'gbk') {
-			charset = 'gb18030';
-		}
-	}
-
-	// turn raw buffers into a single utf-8 buffer
-	return convert(buffer, 'UTF-8', charset).toString();
-}
-
-/**
- * Detect a URLSearchParams object
- * ref: https://github.com/bitinn/node-fetch/issues/296#issuecomment-307598143
- *
- * @param   Object  obj     Object to detect by type or brand
- * @return  String
- */
-function isURLSearchParams(obj) {
-	// Duck-typing as a necessary condition.
-	if (typeof obj !== 'object' || typeof obj.append !== 'function' || typeof obj.delete !== 'function' || typeof obj.get !== 'function' || typeof obj.getAll !== 'function' || typeof obj.has !== 'function' || typeof obj.set !== 'function') {
-		return false;
-	}
-
-	// Brand-checking and more duck-typing as optional condition.
-	return obj.constructor.name === 'URLSearchParams' || Object.prototype.toString.call(obj) === '[object URLSearchParams]' || typeof obj.sort === 'function';
-}
-
-/**
- * Check if `obj` is a W3C `Blob` object (which `File` inherits from)
- * @param  {*} obj
- * @return {boolean}
- */
-function isBlob(obj) {
-	return typeof obj === 'object' && typeof obj.arrayBuffer === 'function' && typeof obj.type === 'string' && typeof obj.stream === 'function' && typeof obj.constructor === 'function' && typeof obj.constructor.name === 'string' && /^(Blob|File)$/.test(obj.constructor.name) && /^(Blob|File)$/.test(obj[Symbol.toStringTag]);
-}
-
-/**
- * Clone body given Res/Req instance
- *
- * @param   Mixed  instance  Response or Request instance
- * @return  Mixed
- */
-function clone(instance) {
-	let p1, p2;
-	let body = instance.body;
-
-	// don't allow cloning a used body
-	if (instance.bodyUsed) {
-		throw new Error('cannot clone body after it is used');
-	}
-
-	// check that body is a stream and not form-data object
-	// note: we can't clone the form-data object without having it as a dependency
-	if (body instanceof Stream && typeof body.getBoundary !== 'function') {
-		// tee instance body
-		p1 = new PassThrough();
-		p2 = new PassThrough();
-		body.pipe(p1);
-		body.pipe(p2);
-		// set instance body to teed body and return the other teed body
-		instance[INTERNALS].body = p1;
-		body = p2;
-	}
-
-	return body;
-}
-
-/**
- * Performs the operation "extract a `Content-Type` value from |object|" as
- * specified in the specification:
- * https://fetch.spec.whatwg.org/#concept-bodyinit-extract
- *
- * This function assumes that instance.body is present.
- *
- * @param   Mixed  instance  Any options.body input
- */
-function extractContentType(body) {
-	if (body === null) {
-		// body is null
-		return null;
-	} else if (typeof body === 'string') {
-		// body is string
-		return 'text/plain;charset=UTF-8';
-	} else if (isURLSearchParams(body)) {
-		// body is a URLSearchParams
-		return 'application/x-www-form-urlencoded;charset=UTF-8';
-	} else if (isBlob(body)) {
-		// body is blob
-		return body.type || null;
-	} else if (Buffer.isBuffer(body)) {
-		// body is buffer
-		return null;
-	} else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') {
-		// body is ArrayBuffer
-		return null;
-	} else if (ArrayBuffer.isView(body)) {
-		// body is ArrayBufferView
-		return null;
-	} else if (typeof body.getBoundary === 'function') {
-		// detect form data input from form-data module
-		return `multipart/form-data;boundary=${body.getBoundary()}`;
-	} else if (body instanceof Stream) {
-		// body is stream
-		// can't really do much about this
-		return null;
-	} else {
-		// Body constructor defaults other things to string
-		return 'text/plain;charset=UTF-8';
-	}
-}
-
-/**
- * The Fetch Standard treats this as if "total bytes" is a property on the body.
- * For us, we have to explicitly get it with a function.
- *
- * ref: https://fetch.spec.whatwg.org/#concept-body-total-bytes
- *
- * @param   Body    instance   Instance of Body
- * @return  Number?            Number of bytes, or null if not possible
- */
-function getTotalBytes(instance) {
-	const body = instance.body;
-
-
-	if (body === null) {
-		// body is null
-		return 0;
-	} else if (isBlob(body)) {
-		return body.size;
-	} else if (Buffer.isBuffer(body)) {
-		// body is buffer
-		return body.length;
-	} else if (body && typeof body.getLengthSync === 'function') {
-		// detect form data input from form-data module
-		if (body._lengthRetrievers && body._lengthRetrievers.length == 0 || // 1.x
-		body.hasKnownLength && body.hasKnownLength()) {
-			// 2.x
-			return body.getLengthSync();
-		}
-		return null;
-	} else {
-		// body is stream
-		return null;
-	}
-}
-
-/**
- * Write a Body to a Node.js WritableStream (e.g. http.Request) object.
- *
- * @param   Body    instance   Instance of Body
- * @return  Void
- */
-function writeToStream(dest, instance) {
-	const body = instance.body;
-
-
-	if (body === null) {
-		// body is null
-		dest.end();
-	} else if (isBlob(body)) {
-		body.stream().pipe(dest);
-	} else if (Buffer.isBuffer(body)) {
-		// body is buffer
-		dest.write(body);
-		dest.end();
-	} else {
-		// body is stream
-		body.pipe(dest);
-	}
-}
-
-// expose Promise
-Body.Promise = global.Promise;
-
-/**
- * headers.js
- *
- * Headers class offers convenient helpers
- */
-
-const invalidTokenRegex = /[^\^_`a-zA-Z\-0-9!#$%&'*+.|~]/;
-const invalidHeaderCharRegex = /[^\t\x20-\x7e\x80-\xff]/;
-
-function validateName(name) {
-	name = `${name}`;
-	if (invalidTokenRegex.test(name) || name === '') {
-		throw new TypeError(`${name} is not a legal HTTP header name`);
-	}
-}
-
-function validateValue(value) {
-	value = `${value}`;
-	if (invalidHeaderCharRegex.test(value)) {
-		throw new TypeError(`${value} is not a legal HTTP header value`);
-	}
-}
-
-/**
- * Find the key in the map object given a header name.
- *
- * Returns undefined if not found.
- *
- * @param   String  name  Header name
- * @return  String|Undefined
- */
-function find(map, name) {
-	name = name.toLowerCase();
-	for (const key in map) {
-		if (key.toLowerCase() === name) {
-			return key;
-		}
-	}
-	return undefined;
-}
-
-const MAP = Symbol('map');
-class Headers {
-	/**
-  * Headers class
-  *
-  * @param   Object  headers  Response headers
-  * @return  Void
-  */
-	constructor() {
-		let init = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;
-
-		this[MAP] = Object.create(null);
-
-		if (init instanceof Headers) {
-			const rawHeaders = init.raw();
-			const headerNames = Object.keys(rawHeaders);
-
-			for (const headerName of headerNames) {
-				for (const value of rawHeaders[headerName]) {
-					this.append(headerName, value);
-				}
-			}
-
-			return;
-		}
-
-		// We don't worry about converting prop to ByteString here as append()
-		// will handle it.
-		if (init == null) ; else if (typeof init === 'object') {
-			const method = init[Symbol.iterator];
-			if (method != null) {
-				if (typeof method !== 'function') {
-					throw new TypeError('Header pairs must be iterable');
-				}
-
-				// sequence<sequence<ByteString>>
-				// Note: per spec we have to first exhaust the lists then process them
-				const pairs = [];
-				for (const pair of init) {
-					if (typeof pair !== 'object' || typeof pair[Symbol.iterator] !== 'function') {
-						throw new TypeError('Each header pair must be iterable');
-					}
-					pairs.push(Array.from(pair));
-				}
-
-				for (const pair of pairs) {
-					if (pair.length !== 2) {
-						throw new TypeError('Each header pair must be a name/value tuple');
-					}
-					this.append(pair[0], pair[1]);
-				}
-			} else {
-				// record<ByteString, ByteString>
-				for (const key of Object.keys(init)) {
-					const value = init[key];
-					this.append(key, value);
-				}
-			}
-		} else {
-			throw new TypeError('Provided initializer must be an object');
-		}
-	}
-
-	/**
-  * Return combined header value given name
-  *
-  * @param   String  name  Header name
-  * @return  Mixed
-  */
-	get(name) {
-		name = `${name}`;
-		validateName(name);
-		const key = find(this[MAP], name);
-		if (key === undefined) {
-			return null;
-		}
-
-		return this[MAP][key].join(', ');
-	}
-
-	/**
-  * Iterate over all headers
-  *
-  * @param   Function  callback  Executed for each item with parameters (value, name, thisArg)
-  * @param   Boolean   thisArg   `this` context for callback function
-  * @return  Void
-  */
-	forEach(callback) {
-		let thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;
-
-		let pairs = getHeaders(this);
-		let i = 0;
-		while (i < pairs.length) {
-			var _pairs$i = pairs[i];
-			const name = _pairs$i[0],
-			      value = _pairs$i[1];
-
-			callback.call(thisArg, value, name, this);
-			pairs = getHeaders(this);
-			i++;
-		}
-	}
-
-	/**
-  * Overwrite header values given name
-  *
-  * @param   String  name   Header name
-  * @param   String  value  Header value
-  * @return  Void
-  */
-	set(name, value) {
-		name = `${name}`;
-		value = `${value}`;
-		validateName(name);
-		validateValue(value);
-		const key = find(this[MAP], name);
-		this[MAP][key !== undefined ? key : name] = [value];
-	}
-
-	/**
-  * Append a value onto existing header
-  *
-  * @param   String  name   Header name
-  * @param   String  value  Header value
-  * @return  Void
-  */
-	append(name, value) {
-		name = `${name}`;
-		value = `${value}`;
-		validateName(name);
-		validateValue(value);
-		const key = find(this[MAP], name);
-		if (key !== undefined) {
-			this[MAP][key].push(value);
-		} else {
-			this[MAP][name] = [value];
-		}
-	}
-
-	/**
-  * Check for header name existence
-  *
-  * @param   String   name  Header name
-  * @return  Boolean
-  */
-	has(name) {
-		name = `${name}`;
-		validateName(name);
-		return find(this[MAP], name) !== undefined;
-	}
-
-	/**
-  * Delete all header values given name
-  *
-  * @param   String  name  Header name
-  * @return  Void
-  */
-	delete(name) {
-		name = `${name}`;
-		validateName(name);
-		const key = find(this[MAP], name);
-		if (key !== undefined) {
-			delete this[MAP][key];
-		}
-	}
-
-	/**
-  * Return raw headers (non-spec api)
-  *
-  * @return  Object
-  */
-	raw() {
-		return this[MAP];
-	}
-
-	/**
-  * Get an iterator on keys.
-  *
-  * @return  Iterator
-  */
-	keys() {
-		return createHeadersIterator(this, 'key');
-	}
-
-	/**
-  * Get an iterator on values.
-  *
-  * @return  Iterator
-  */
-	values() {
-		return createHeadersIterator(this, 'value');
-	}
-
-	/**
-  * Get an iterator on entries.
-  *
-  * This is the default iterator of the Headers object.
-  *
-  * @return  Iterator
-  */
-	[Symbol.iterator]() {
-		return createHeadersIterator(this, 'key+value');
-	}
-}
-Headers.prototype.entries = Headers.prototype[Symbol.iterator];
-
-Object.defineProperty(Headers.prototype, Symbol.toStringTag, {
-	value: 'Headers',
-	writable: false,
-	enumerable: false,
-	configurable: true
-});
-
-Object.defineProperties(Headers.prototype, {
-	get: { enumerable: true },
-	forEach: { enumerable: true },
-	set: { enumerable: true },
-	append: { enumerable: true },
-	has: { enumerable: true },
-	delete: { enumerable: true },
-	keys: { enumerable: true },
-	values: { enumerable: true },
-	entries: { enumerable: true }
-});
-
-function getHeaders(headers) {
-	let kind = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'key+value';
-
-	const keys = Object.keys(headers[MAP]).sort();
-	return keys.map(kind === 'key' ? function (k) {
-		return k.toLowerCase();
-	} : kind === 'value' ? function (k) {
-		return headers[MAP][k].join(', ');
-	} : function (k) {
-		return [k.toLowerCase(), headers[MAP][k].join(', ')];
-	});
-}
-
-const INTERNAL = Symbol('internal');
-
-function createHeadersIterator(target, kind) {
-	const iterator = Object.create(HeadersIteratorPrototype);
-	iterator[INTERNAL] = {
-		target,
-		kind,
-		index: 0
-	};
-	return iterator;
-}
-
-const HeadersIteratorPrototype = Object.setPrototypeOf({
-	next() {
-		// istanbul ignore if
-		if (!this || Object.getPrototypeOf(this) !== HeadersIteratorPrototype) {
-			throw new TypeError('Value of `this` is not a HeadersIterator');
-		}
-
-		var _INTERNAL = this[INTERNAL];
-		const target = _INTERNAL.target,
-		      kind = _INTERNAL.kind,
-		      index = _INTERNAL.index;
-
-		const values = getHeaders(target, kind);
-		const len = values.length;
-		if (index >= len) {
-			return {
-				value: undefined,
-				done: true
-			};
-		}
-
-		this[INTERNAL].index = index + 1;
-
-		return {
-			value: values[index],
-			done: false
-		};
-	}
-}, Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));
-
-Object.defineProperty(HeadersIteratorPrototype, Symbol.toStringTag, {
-	value: 'HeadersIterator',
-	writable: false,
-	enumerable: false,
-	configurable: true
-});
-
-/**
- * Export the Headers object in a form that Node.js can consume.
- *
- * @param   Headers  headers
- * @return  Object
- */
-function exportNodeCompatibleHeaders(headers) {
-	const obj = Object.assign({ __proto__: null }, headers[MAP]);
-
-	// http.request() only supports string as Host header. This hack makes
-	// specifying custom Host header possible.
-	const hostHeaderKey = find(headers[MAP], 'Host');
-	if (hostHeaderKey !== undefined) {
-		obj[hostHeaderKey] = obj[hostHeaderKey][0];
-	}
-
-	return obj;
-}
-
-/**
- * Create a Headers object from an object of headers, ignoring those that do
- * not conform to HTTP grammar productions.
- *
- * @param   Object  obj  Object of headers
- * @return  Headers
- */
-function createHeadersLenient(obj) {
-	const headers = new Headers();
-	for (const name of Object.keys(obj)) {
-		if (invalidTokenRegex.test(name)) {
-			continue;
-		}
-		if (Array.isArray(obj[name])) {
-			for (const val of obj[name]) {
-				if (invalidHeaderCharRegex.test(val)) {
-					continue;
-				}
-				if (headers[MAP][name] === undefined) {
-					headers[MAP][name] = [val];
-				} else {
-					headers[MAP][name].push(val);
-				}
-			}
-		} else if (!invalidHeaderCharRegex.test(obj[name])) {
-			headers[MAP][name] = [obj[name]];
-		}
-	}
-	return headers;
-}
-
-const INTERNALS$1 = Symbol('Response internals');
-
-// fix an issue where "STATUS_CODES" aren't a named export for node <10
-const STATUS_CODES = http.STATUS_CODES;
-
-/**
- * Response class
- *
- * @param   Stream  body  Readable stream
- * @param   Object  opts  Response options
- * @return  Void
- */
-class Response {
-	constructor() {
-		let body = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
-		let opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
-
-		Body.call(this, body, opts);
-
-		const status = opts.status || 200;
-		const headers = new Headers(opts.headers);
-
-		if (body != null && !headers.has('Content-Type')) {
-			const contentType = extractContentType(body);
-			if (contentType) {
-				headers.append('Content-Type', contentType);
-			}
-		}
-
-		this[INTERNALS$1] = {
-			url: opts.url,
-			status,
-			statusText: opts.statusText || STATUS_CODES[status],
-			headers,
-			counter: opts.counter
-		};
-	}
-
-	get url() {
-		return this[INTERNALS$1].url || '';
-	}
-
-	get status() {
-		return this[INTERNALS$1].status;
-	}
-
-	/**
-  * Convenience property representing if the request ended normally
-  */
-	get ok() {
-		return this[INTERNALS$1].status >= 200 && this[INTERNALS$1].status < 300;
-	}
-
-	get redirected() {
-		return this[INTERNALS$1].counter > 0;
-	}
-
-	get statusText() {
-		return this[INTERNALS$1].statusText;
-	}
-
-	get headers() {
-		return this[INTERNALS$1].headers;
-	}
-
-	/**
-  * Clone this response
-  *
-  * @return  Response
-  */
-	clone() {
-		return new Response(clone(this), {
-			url: this.url,
-			status: this.status,
-			statusText: this.statusText,
-			headers: this.headers,
-			ok: this.ok,
-			redirected: this.redirected
-		});
-	}
-}
-
-Body.mixIn(Response.prototype);
-
-Object.defineProperties(Response.prototype, {
-	url: { enumerable: true },
-	status: { enumerable: true },
-	ok: { enumerable: true },
-	redirected: { enumerable: true },
-	statusText: { enumerable: true },
-	headers: { enumerable: true },
-	clone: { enumerable: true }
-});
-
-Object.defineProperty(Response.prototype, Symbol.toStringTag, {
-	value: 'Response',
-	writable: false,
-	enumerable: false,
-	configurable: true
-});
-
-const INTERNALS$2 = Symbol('Request internals');
-const URL = Url.URL || whatwgUrl.URL;
-
-// fix an issue where "format", "parse" aren't a named export for node <10
-const parse_url = Url.parse;
-const format_url = Url.format;
-
-/**
- * Wrapper around `new URL` to handle arbitrary URLs
- *
- * @param  {string} urlStr
- * @return {void}
- */
-function parseURL(urlStr) {
-	/*
- 	Check whether the URL is absolute or not
- 		Scheme: https://tools.ietf.org/html/rfc3986#section-3.1
- 	Absolute URL: https://tools.ietf.org/html/rfc3986#section-4.3
- */
-	if (/^[a-zA-Z][a-zA-Z\d+\-.]*:/.exec(urlStr)) {
-		urlStr = new URL(urlStr).toString();
-	}
-
-	// Fallback to old implementation for arbitrary URLs
-	return parse_url(urlStr);
-}
-
-const streamDestructionSupported = 'destroy' in Stream.Readable.prototype;
-
-/**
- * Check if a value is an instance of Request.
- *
- * @param   Mixed   input
- * @return  Boolean
- */
-function isRequest(input) {
-	return typeof input === 'object' && typeof input[INTERNALS$2] === 'object';
-}
-
-function isAbortSignal(signal) {
-	const proto = signal && typeof signal === 'object' && Object.getPrototypeOf(signal);
-	return !!(proto && proto.constructor.name === 'AbortSignal');
-}
-
-/**
- * Request class
- *
- * @param   Mixed   input  Url or Request instance
- * @param   Object  init   Custom options
- * @return  Void
- */
-class Request {
-	constructor(input) {
-		let init = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
-
-		let parsedURL;
-
-		// normalize input
-		if (!isRequest(input)) {
-			if (input && input.href) {
-				// in order to support Node.js' Url objects; though WHATWG's URL objects
-				// will fall into this branch also (since their `toString()` will return
-				// `href` property anyway)
-				parsedURL = parseURL(input.href);
-			} else {
-				// coerce input to a string before attempting to parse
-				parsedURL = parseURL(`${input}`);
-			}
-			input = {};
-		} else {
-			parsedURL = parseURL(input.url);
-		}
-
-		let method = init.method || input.method || 'GET';
-		method = method.toUpperCase();
-
-		if ((init.body != null || isRequest(input) && input.body !== null) && (method === 'GET' || method === 'HEAD')) {
-			throw new TypeError('Request with GET/HEAD method cannot have body');
-		}
-
-		let inputBody = init.body != null ? init.body : isRequest(input) && input.body !== null ? clone(input) : null;
-
-		Body.call(this, inputBody, {
-			timeout: init.timeout || input.timeout || 0,
-			size: init.size || input.size || 0
-		});
-
-		const headers = new Headers(init.headers || input.headers || {});
-
-		if (inputBody != null && !headers.has('Content-Type')) {
-			const contentType = extractContentType(inputBody);
-			if (contentType) {
-				headers.append('Content-Type', contentType);
-			}
-		}
-
-		let signal = isRequest(input) ? input.signal : null;
-		if ('signal' in init) signal = init.signal;
-
-		if (signal != null && !isAbortSignal(signal)) {
-			throw new TypeError('Expected signal to be an instanceof AbortSignal');
-		}
-
-		this[INTERNALS$2] = {
-			method,
-			redirect: init.redirect || input.redirect || 'follow',
-			headers,
-			parsedURL,
-			signal
-		};
-
-		// node-fetch-only options
-		this.follow = init.follow !== undefined ? init.follow : input.follow !== undefined ? input.follow : 20;
-		this.compress = init.compress !== undefined ? init.compress : input.compress !== undefined ? input.compress : true;
-		this.counter = init.counter || input.counter || 0;
-		this.agent = init.agent || input.agent;
-	}
-
-	get method() {
-		return this[INTERNALS$2].method;
-	}
-
-	get url() {
-		return format_url(this[INTERNALS$2].parsedURL);
-	}
-
-	get headers() {
-		return this[INTERNALS$2].headers;
-	}
-
-	get redirect() {
-		return this[INTERNALS$2].redirect;
-	}
-
-	get signal() {
-		return this[INTERNALS$2].signal;
-	}
-
-	/**
-  * Clone this request
-  *
-  * @return  Request
-  */
-	clone() {
-		return new Request(this);
-	}
-}
-
-Body.mixIn(Request.prototype);
-
-Object.defineProperty(Request.prototype, Symbol.toStringTag, {
-	value: 'Request',
-	writable: false,
-	enumerable: false,
-	configurable: true
-});
-
-Object.defineProperties(Request.prototype, {
-	method: { enumerable: true },
-	url: { enumerable: true },
-	headers: { enumerable: true },
-	redirect: { enumerable: true },
-	clone: { enumerable: true },
-	signal: { enumerable: true }
-});
-
-/**
- * Convert a Request to Node.js http request options.
- *
- * @param   Request  A Request instance
- * @return  Object   The options object to be passed to http.request
- */
-function getNodeRequestOptions(request) {
-	const parsedURL = request[INTERNALS$2].parsedURL;
-	const headers = new Headers(request[INTERNALS$2].headers);
-
-	// fetch step 1.3
-	if (!headers.has('Accept')) {
-		headers.set('Accept', '*/*');
-	}
-
-	// Basic fetch
-	if (!parsedURL.protocol || !parsedURL.hostname) {
-		throw new TypeError('Only absolute URLs are supported');
-	}
-
-	if (!/^https?:$/.test(parsedURL.protocol)) {
-		throw new TypeError('Only HTTP(S) protocols are supported');
-	}
-
-	if (request.signal && request.body instanceof Stream.Readable && !streamDestructionSupported) {
-		throw new Error('Cancellation of streamed requests with AbortSignal is not supported in node < 8');
-	}
-
-	// HTTP-network-or-cache fetch steps 2.4-2.7
-	let contentLengthValue = null;
-	if (request.body == null && /^(POST|PUT)$/i.test(request.method)) {
-		contentLengthValue = '0';
-	}
-	if (request.body != null) {
-		const totalBytes = getTotalBytes(request);
-		if (typeof totalBytes === 'number') {
-			contentLengthValue = String(totalBytes);
-		}
-	}
-	if (contentLengthValue) {
-		headers.set('Content-Length', contentLengthValue);
-	}
-
-	// HTTP-network-or-cache fetch step 2.11
-	if (!headers.has('User-Agent')) {
-		headers.set('User-Agent', 'node-fetch/1.0 (+https://github.com/bitinn/node-fetch)');
-	}
-
-	// HTTP-network-or-cache fetch step 2.15
-	if (request.compress && !headers.has('Accept-Encoding')) {
-		headers.set('Accept-Encoding', 'gzip,deflate');
-	}
-
-	let agent = request.agent;
-	if (typeof agent === 'function') {
-		agent = agent(parsedURL);
-	}
-
-	// HTTP-network fetch step 4.2
-	// chunked encoding is handled by Node.js
-
-	return Object.assign({}, parsedURL, {
-		method: request.method,
-		headers: exportNodeCompatibleHeaders(headers),
-		agent
-	});
-}
-
-/**
- * abort-error.js
- *
- * AbortError interface for cancelled requests
- */
-
-/**
- * Create AbortError instance
- *
- * @param   String      message      Error message for human
- * @return  AbortError
- */
-function AbortError(message) {
-  Error.call(this, message);
-
-  this.type = 'aborted';
-  this.message = message;
-
-  // hide custom error implementation details from end-users
-  Error.captureStackTrace(this, this.constructor);
-}
-
-AbortError.prototype = Object.create(Error.prototype);
-AbortError.prototype.constructor = AbortError;
-AbortError.prototype.name = 'AbortError';
-
-const URL$1 = Url.URL || whatwgUrl.URL;
-
-// fix an issue where "PassThrough", "resolve" aren't a named export for node <10
-const PassThrough$1 = Stream.PassThrough;
-
-const isDomainOrSubdomain = function isDomainOrSubdomain(destination, original) {
-	const orig = new URL$1(original).hostname;
-	const dest = new URL$1(destination).hostname;
-
-	return orig === dest || orig[orig.length - dest.length - 1] === '.' && orig.endsWith(dest);
-};
-
-/**
- * isSameProtocol reports whether the two provided URLs use the same protocol.
- *
- * Both domains must already be in canonical form.
- * @param {string|URL} original
- * @param {string|URL} destination
- */
-const isSameProtocol = function isSameProtocol(destination, original) {
-	const orig = new URL$1(original).protocol;
-	const dest = new URL$1(destination).protocol;
-
-	return orig === dest;
-};
-
-/**
- * Fetch function
- *
- * @param   Mixed    url   Absolute url or Request instance
- * @param   Object   opts  Fetch options
- * @return  Promise
- */
-function fetch(url, opts) {
-
-	// allow custom promise
-	if (!fetch.Promise) {
-		throw new Error('native promise missing, set fetch.Promise to your favorite alternative');
-	}
-
-	Body.Promise = fetch.Promise;
-
-	// wrap http.request into fetch
-	return new fetch.Promise(function (resolve, reject) {
-		// build request object
-		const request = new Request(url, opts);
-		const options = getNodeRequestOptions(request);
-
-		const send = (options.protocol === 'https:' ? https : http).request;
-		const signal = request.signal;
-
-		let response = null;
-
-		const abort = function abort() {
-			let error = new AbortError('The user aborted a request.');
-			reject(error);
-			if (request.body && request.body instanceof Stream.Readable) {
-				destroyStream(request.body, error);
-			}
-			if (!response || !response.body) return;
-			response.body.emit('error', error);
-		};
-
-		if (signal && signal.aborted) {
-			abort();
-			return;
-		}
-
-		const abortAndFinalize = function abortAndFinalize() {
-			abort();
-			finalize();
-		};
-
-		// send request
-		const req = send(options);
-		let reqTimeout;
-
-		if (signal) {
-			signal.addEventListener('abort', abortAndFinalize);
-		}
-
-		function finalize() {
-			req.abort();
-			if (signal) signal.removeEventListener('abort', abortAndFinalize);
-			clearTimeout(reqTimeout);
-		}
-
-		if (request.timeout) {
-			req.once('socket', function (socket) {
-				reqTimeout = setTimeout(function () {
-					reject(new FetchError(`network timeout at: ${request.url}`, 'request-timeout'));
-					finalize();
-				}, request.timeout);
-			});
-		}
-
-		req.on('error', function (err) {
-			reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err));
-
-			if (response && response.body) {
-				destroyStream(response.body, err);
-			}
-
-			finalize();
-		});
-
-		fixResponseChunkedTransferBadEnding(req, function (err) {
-			if (signal && signal.aborted) {
-				return;
-			}
-
-			if (response && response.body) {
-				destroyStream(response.body, err);
-			}
-		});
-
-		/* c8 ignore next 18 */
-		if (parseInt(process.version.substring(1)) < 14) {
-			// Before Node.js 14, pipeline() does not fully support async iterators and does not always
-			// properly handle when the socket close/end events are out of order.
-			req.on('socket', function (s) {
-				s.addListener('close', function (hadError) {
-					// if a data listener is still present we didn't end cleanly
-					const hasDataListener = s.listenerCount('data') > 0;
-
-					// if end happened before close but the socket didn't emit an error, do it now
-					if (response && hasDataListener && !hadError && !(signal && signal.aborted)) {
-						const err = new Error('Premature close');
-						err.code = 'ERR_STREAM_PREMATURE_CLOSE';
-						response.body.emit('error', err);
-					}
-				});
-			});
-		}
-
-		req.on('response', function (res) {
-			clearTimeout(reqTimeout);
-
-			const headers = createHeadersLenient(res.headers);
-
-			// HTTP fetch step 5
-			if (fetch.isRedirect(res.statusCode)) {
-				// HTTP fetch step 5.2
-				const location = headers.get('Location');
-
-				// HTTP fetch step 5.3
-				let locationURL = null;
-				try {
-					locationURL = location === null ? null : new URL$1(location, request.url).toString();
-				} catch (err) {
-					// error here can only be invalid URL in Location: header
-					// do not throw when options.redirect == manual
-					// let the user extract the errorneous redirect URL
-					if (request.redirect !== 'manual') {
-						reject(new FetchError(`uri requested responds with an invalid redirect URL: ${location}`, 'invalid-redirect'));
-						finalize();
-						return;
-					}
-				}
-
-				// HTTP fetch step 5.5
-				switch (request.redirect) {
-					case 'error':
-						reject(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${request.url}`, 'no-redirect'));
-						finalize();
-						return;
-					case 'manual':
-						// node-fetch-specific step: make manual redirect a bit easier to use by setting the Location header value to the resolved URL.
-						if (locationURL !== null) {
-							// handle corrupted header
-							try {
-								headers.set('Location', locationURL);
-							} catch (err) {
-								// istanbul ignore next: nodejs server prevent invalid response headers, we can't test this through normal request
-								reject(err);
-							}
-						}
-						break;
-					case 'follow':
-						// HTTP-redirect fetch step 2
-						if (locationURL === null) {
-							break;
-						}
-
-						// HTTP-redirect fetch step 5
-						if (request.counter >= request.follow) {
-							reject(new FetchError(`maximum redirect reached at: ${request.url}`, 'max-redirect'));
-							finalize();
-							return;
-						}
-
-						// HTTP-redirect fetch step 6 (counter increment)
-						// Create a new Request object.
-						const requestOpts = {
-							headers: new Headers(request.headers),
-							follow: request.follow,
-							counter: request.counter + 1,
-							agent: request.agent,
-							compress: request.compress,
-							method: request.method,
-							body: request.body,
-							signal: request.signal,
-							timeout: request.timeout,
-							size: request.size
-						};
-
-						if (!isDomainOrSubdomain(request.url, locationURL) || !isSameProtocol(request.url, locationURL)) {
-							for (const name of ['authorization', 'www-authenticate', 'cookie', 'cookie2']) {
-								requestOpts.headers.delete(name);
-							}
-						}
-
-						// HTTP-redirect fetch step 9
-						if (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) {
-							reject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect'));
-							finalize();
-							return;
-						}
-
-						// HTTP-redirect fetch step 11
-						if (res.statusCode === 303 || (res.statusCode === 301 || res.statusCode === 302) && request.method === 'POST') {
-							requestOpts.method = 'GET';
-							requestOpts.body = undefined;
-							requestOpts.headers.delete('content-length');
-						}
-
-						// HTTP-redirect fetch step 15
-						resolve(fetch(new Request(locationURL, requestOpts)));
-						finalize();
-						return;
-				}
-			}
-
-			// prepare response
-			res.once('end', function () {
-				if (signal) signal.removeEventListener('abort', abortAndFinalize);
-			});
-			let body = res.pipe(new PassThrough$1());
-
-			const response_options = {
-				url: request.url,
-				status: res.statusCode,
-				statusText: res.statusMessage,
-				headers: headers,
-				size: request.size,
-				timeout: request.timeout,
-				counter: request.counter
-			};
-
-			// HTTP-network fetch step 12.1.1.3
-			const codings = headers.get('Content-Encoding');
-
-			// HTTP-network fetch step 12.1.1.4: handle content codings
-
-			// in following scenarios we ignore compression support
-			// 1. compression support is disabled
-			// 2. HEAD request
-			// 3. no Content-Encoding header
-			// 4. no content response (204)
-			// 5. content not modified response (304)
-			if (!request.compress || request.method === 'HEAD' || codings === null || res.statusCode === 204 || res.statusCode === 304) {
-				response = new Response(body, response_options);
-				resolve(response);
-				return;
-			}
-
-			// For Node v6+
-			// Be less strict when decoding compressed responses, since sometimes
-			// servers send slightly invalid responses that are still accepted
-			// by common browsers.
-			// Always using Z_SYNC_FLUSH is what cURL does.
-			const zlibOptions = {
-				flush: zlib.Z_SYNC_FLUSH,
-				finishFlush: zlib.Z_SYNC_FLUSH
-			};
-
-			// for gzip
-			if (codings == 'gzip' || codings == 'x-gzip') {
-				body = body.pipe(zlib.createGunzip(zlibOptions));
-				response = new Response(body, response_options);
-				resolve(response);
-				return;
-			}
-
-			// for deflate
-			if (codings == 'deflate' || codings == 'x-deflate') {
-				// handle the infamous raw deflate response from old servers
-				// a hack for old IIS and Apache servers
-				const raw = res.pipe(new PassThrough$1());
-				raw.once('data', function (chunk) {
-					// see http://stackoverflow.com/questions/37519828
-					if ((chunk[0] & 0x0F) === 0x08) {
-						body = body.pipe(zlib.createInflate());
-					} else {
-						body = body.pipe(zlib.createInflateRaw());
-					}
-					response = new Response(body, response_options);
-					resolve(response);
-				});
-				raw.on('end', function () {
-					// some old IIS servers return zero-length OK deflate responses, so 'data' is never emitted.
-					if (!response) {
-						response = new Response(body, response_options);
-						resolve(response);
-					}
-				});
-				return;
-			}
-
-			// for br
-			if (codings == 'br' && typeof zlib.createBrotliDecompress === 'function') {
-				body = body.pipe(zlib.createBrotliDecompress());
-				response = new Response(body, response_options);
-				resolve(response);
-				return;
-			}
-
-			// otherwise, use response as-is
-			response = new Response(body, response_options);
-			resolve(response);
-		});
-
-		writeToStream(req, request);
-	});
-}
-function fixResponseChunkedTransferBadEnding(request, errorCallback) {
-	let socket;
-
-	request.on('socket', function (s) {
-		socket = s;
-	});
-
-	request.on('response', function (response) {
-		const headers = response.headers;
-
-		if (headers['transfer-encoding'] === 'chunked' && !headers['content-length']) {
-			response.once('close', function (hadError) {
-				// tests for socket presence, as in some situations the
-				// the 'socket' event is not triggered for the request
-				// (happens in deno), avoids `TypeError`
-				// if a data listener is still present we didn't end cleanly
-				const hasDataListener = socket && socket.listenerCount('data') > 0;
-
-				if (hasDataListener && !hadError) {
-					const err = new Error('Premature close');
-					err.code = 'ERR_STREAM_PREMATURE_CLOSE';
-					errorCallback(err);
-				}
-			});
-		}
-	});
-}
-
-function destroyStream(stream, err) {
-	if (stream.destroy) {
-		stream.destroy(err);
-	} else {
-		// node < 8
-		stream.emit('error', err);
-		stream.end();
-	}
-}
-
-/**
- * Redirect code matching
- *
- * @param   Number   code  Status code
- * @return  Boolean
- */
-fetch.isRedirect = function (code) {
-	return code === 301 || code === 302 || code === 303 || code === 307 || code === 308;
-};
-
-// expose Promise
-fetch.Promise = global.Promise;
-
-module.exports = exports = fetch;
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.default = exports;
-exports.Headers = Headers;
-exports.Request = Request;
-exports.Response = Response;
-exports.FetchError = FetchError;
-exports.AbortError = AbortError;

+ 0 - 1775
rag-server/node_modules/@mapbox/node-pre-gyp/node_modules/node-fetch/lib/index.mjs

@@ -1,1775 +0,0 @@
-import Stream from 'stream';
-import http from 'http';
-import Url from 'url';
-import whatwgUrl from 'whatwg-url';
-import https from 'https';
-import zlib from 'zlib';
-
-// Based on https://github.com/tmpvar/jsdom/blob/aa85b2abf07766ff7bf5c1f6daafb3726f2f2db5/lib/jsdom/living/blob.js
-
-// fix for "Readable" isn't a named export issue
-const Readable = Stream.Readable;
-
-const BUFFER = Symbol('buffer');
-const TYPE = Symbol('type');
-
-class Blob {
-	constructor() {
-		this[TYPE] = '';
-
-		const blobParts = arguments[0];
-		const options = arguments[1];
-
-		const buffers = [];
-		let size = 0;
-
-		if (blobParts) {
-			const a = blobParts;
-			const length = Number(a.length);
-			for (let i = 0; i < length; i++) {
-				const element = a[i];
-				let buffer;
-				if (element instanceof Buffer) {
-					buffer = element;
-				} else if (ArrayBuffer.isView(element)) {
-					buffer = Buffer.from(element.buffer, element.byteOffset, element.byteLength);
-				} else if (element instanceof ArrayBuffer) {
-					buffer = Buffer.from(element);
-				} else if (element instanceof Blob) {
-					buffer = element[BUFFER];
-				} else {
-					buffer = Buffer.from(typeof element === 'string' ? element : String(element));
-				}
-				size += buffer.length;
-				buffers.push(buffer);
-			}
-		}
-
-		this[BUFFER] = Buffer.concat(buffers);
-
-		let type = options && options.type !== undefined && String(options.type).toLowerCase();
-		if (type && !/[^\u0020-\u007E]/.test(type)) {
-			this[TYPE] = type;
-		}
-	}
-	get size() {
-		return this[BUFFER].length;
-	}
-	get type() {
-		return this[TYPE];
-	}
-	text() {
-		return Promise.resolve(this[BUFFER].toString());
-	}
-	arrayBuffer() {
-		const buf = this[BUFFER];
-		const ab = buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength);
-		return Promise.resolve(ab);
-	}
-	stream() {
-		const readable = new Readable();
-		readable._read = function () {};
-		readable.push(this[BUFFER]);
-		readable.push(null);
-		return readable;
-	}
-	toString() {
-		return '[object Blob]';
-	}
-	slice() {
-		const size = this.size;
-
-		const start = arguments[0];
-		const end = arguments[1];
-		let relativeStart, relativeEnd;
-		if (start === undefined) {
-			relativeStart = 0;
-		} else if (start < 0) {
-			relativeStart = Math.max(size + start, 0);
-		} else {
-			relativeStart = Math.min(start, size);
-		}
-		if (end === undefined) {
-			relativeEnd = size;
-		} else if (end < 0) {
-			relativeEnd = Math.max(size + end, 0);
-		} else {
-			relativeEnd = Math.min(end, size);
-		}
-		const span = Math.max(relativeEnd - relativeStart, 0);
-
-		const buffer = this[BUFFER];
-		const slicedBuffer = buffer.slice(relativeStart, relativeStart + span);
-		const blob = new Blob([], { type: arguments[2] });
-		blob[BUFFER] = slicedBuffer;
-		return blob;
-	}
-}
-
-Object.defineProperties(Blob.prototype, {
-	size: { enumerable: true },
-	type: { enumerable: true },
-	slice: { enumerable: true }
-});
-
-Object.defineProperty(Blob.prototype, Symbol.toStringTag, {
-	value: 'Blob',
-	writable: false,
-	enumerable: false,
-	configurable: true
-});
-
-/**
- * fetch-error.js
- *
- * FetchError interface for operational errors
- */
-
-/**
- * Create FetchError instance
- *
- * @param   String      message      Error message for human
- * @param   String      type         Error type for machine
- * @param   String      systemError  For Node.js system error
- * @return  FetchError
- */
-function FetchError(message, type, systemError) {
-  Error.call(this, message);
-
-  this.message = message;
-  this.type = type;
-
-  // when err.type is `system`, err.code contains system error code
-  if (systemError) {
-    this.code = this.errno = systemError.code;
-  }
-
-  // hide custom error implementation details from end-users
-  Error.captureStackTrace(this, this.constructor);
-}
-
-FetchError.prototype = Object.create(Error.prototype);
-FetchError.prototype.constructor = FetchError;
-FetchError.prototype.name = 'FetchError';
-
-let convert;
-try {
-	convert = require('encoding').convert;
-} catch (e) {}
-
-const INTERNALS = Symbol('Body internals');
-
-// fix an issue where "PassThrough" isn't a named export for node <10
-const PassThrough = Stream.PassThrough;
-
-/**
- * Body mixin
- *
- * Ref: https://fetch.spec.whatwg.org/#body
- *
- * @param   Stream  body  Readable stream
- * @param   Object  opts  Response options
- * @return  Void
- */
-function Body(body) {
-	var _this = this;
-
-	var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
-	    _ref$size = _ref.size;
-
-	let size = _ref$size === undefined ? 0 : _ref$size;
-	var _ref$timeout = _ref.timeout;
-	let timeout = _ref$timeout === undefined ? 0 : _ref$timeout;
-
-	if (body == null) {
-		// body is undefined or null
-		body = null;
-	} else if (isURLSearchParams(body)) {
-		// body is a URLSearchParams
-		body = Buffer.from(body.toString());
-	} else if (isBlob(body)) ; else if (Buffer.isBuffer(body)) ; else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') {
-		// body is ArrayBuffer
-		body = Buffer.from(body);
-	} else if (ArrayBuffer.isView(body)) {
-		// body is ArrayBufferView
-		body = Buffer.from(body.buffer, body.byteOffset, body.byteLength);
-	} else if (body instanceof Stream) ; else {
-		// none of the above
-		// coerce to string then buffer
-		body = Buffer.from(String(body));
-	}
-	this[INTERNALS] = {
-		body,
-		disturbed: false,
-		error: null
-	};
-	this.size = size;
-	this.timeout = timeout;
-
-	if (body instanceof Stream) {
-		body.on('error', function (err) {
-			const error = err.name === 'AbortError' ? err : new FetchError(`Invalid response body while trying to fetch ${_this.url}: ${err.message}`, 'system', err);
-			_this[INTERNALS].error = error;
-		});
-	}
-}
-
-Body.prototype = {
-	get body() {
-		return this[INTERNALS].body;
-	},
-
-	get bodyUsed() {
-		return this[INTERNALS].disturbed;
-	},
-
-	/**
-  * Decode response as ArrayBuffer
-  *
-  * @return  Promise
-  */
-	arrayBuffer() {
-		return consumeBody.call(this).then(function (buf) {
-			return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength);
-		});
-	},
-
-	/**
-  * Return raw response as Blob
-  *
-  * @return Promise
-  */
-	blob() {
-		let ct = this.headers && this.headers.get('content-type') || '';
-		return consumeBody.call(this).then(function (buf) {
-			return Object.assign(
-			// Prevent copying
-			new Blob([], {
-				type: ct.toLowerCase()
-			}), {
-				[BUFFER]: buf
-			});
-		});
-	},
-
-	/**
-  * Decode response as json
-  *
-  * @return  Promise
-  */
-	json() {
-		var _this2 = this;
-
-		return consumeBody.call(this).then(function (buffer) {
-			try {
-				return JSON.parse(buffer.toString());
-			} catch (err) {
-				return Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, 'invalid-json'));
-			}
-		});
-	},
-
-	/**
-  * Decode response as text
-  *
-  * @return  Promise
-  */
-	text() {
-		return consumeBody.call(this).then(function (buffer) {
-			return buffer.toString();
-		});
-	},
-
-	/**
-  * Decode response as buffer (non-spec api)
-  *
-  * @return  Promise
-  */
-	buffer() {
-		return consumeBody.call(this);
-	},
-
-	/**
-  * Decode response as text, while automatically detecting the encoding and
-  * trying to decode to UTF-8 (non-spec api)
-  *
-  * @return  Promise
-  */
-	textConverted() {
-		var _this3 = this;
-
-		return consumeBody.call(this).then(function (buffer) {
-			return convertBody(buffer, _this3.headers);
-		});
-	}
-};
-
-// In browsers, all properties are enumerable.
-Object.defineProperties(Body.prototype, {
-	body: { enumerable: true },
-	bodyUsed: { enumerable: true },
-	arrayBuffer: { enumerable: true },
-	blob: { enumerable: true },
-	json: { enumerable: true },
-	text: { enumerable: true }
-});
-
-Body.mixIn = function (proto) {
-	for (const name of Object.getOwnPropertyNames(Body.prototype)) {
-		// istanbul ignore else: future proof
-		if (!(name in proto)) {
-			const desc = Object.getOwnPropertyDescriptor(Body.prototype, name);
-			Object.defineProperty(proto, name, desc);
-		}
-	}
-};
-
-/**
- * Consume and convert an entire Body to a Buffer.
- *
- * Ref: https://fetch.spec.whatwg.org/#concept-body-consume-body
- *
- * @return  Promise
- */
-function consumeBody() {
-	var _this4 = this;
-
-	if (this[INTERNALS].disturbed) {
-		return Body.Promise.reject(new TypeError(`body used already for: ${this.url}`));
-	}
-
-	this[INTERNALS].disturbed = true;
-
-	if (this[INTERNALS].error) {
-		return Body.Promise.reject(this[INTERNALS].error);
-	}
-
-	let body = this.body;
-
-	// body is null
-	if (body === null) {
-		return Body.Promise.resolve(Buffer.alloc(0));
-	}
-
-	// body is blob
-	if (isBlob(body)) {
-		body = body.stream();
-	}
-
-	// body is buffer
-	if (Buffer.isBuffer(body)) {
-		return Body.Promise.resolve(body);
-	}
-
-	// istanbul ignore if: should never happen
-	if (!(body instanceof Stream)) {
-		return Body.Promise.resolve(Buffer.alloc(0));
-	}
-
-	// body is stream
-	// get ready to actually consume the body
-	let accum = [];
-	let accumBytes = 0;
-	let abort = false;
-
-	return new Body.Promise(function (resolve, reject) {
-		let resTimeout;
-
-		// allow timeout on slow response body
-		if (_this4.timeout) {
-			resTimeout = setTimeout(function () {
-				abort = true;
-				reject(new FetchError(`Response timeout while trying to fetch ${_this4.url} (over ${_this4.timeout}ms)`, 'body-timeout'));
-			}, _this4.timeout);
-		}
-
-		// handle stream errors
-		body.on('error', function (err) {
-			if (err.name === 'AbortError') {
-				// if the request was aborted, reject with this Error
-				abort = true;
-				reject(err);
-			} else {
-				// other errors, such as incorrect content-encoding
-				reject(new FetchError(`Invalid response body while trying to fetch ${_this4.url}: ${err.message}`, 'system', err));
-			}
-		});
-
-		body.on('data', function (chunk) {
-			if (abort || chunk === null) {
-				return;
-			}
-
-			if (_this4.size && accumBytes + chunk.length > _this4.size) {
-				abort = true;
-				reject(new FetchError(`content size at ${_this4.url} over limit: ${_this4.size}`, 'max-size'));
-				return;
-			}
-
-			accumBytes += chunk.length;
-			accum.push(chunk);
-		});
-
-		body.on('end', function () {
-			if (abort) {
-				return;
-			}
-
-			clearTimeout(resTimeout);
-
-			try {
-				resolve(Buffer.concat(accum, accumBytes));
-			} catch (err) {
-				// handle streams that have accumulated too much data (issue #414)
-				reject(new FetchError(`Could not create Buffer from response body for ${_this4.url}: ${err.message}`, 'system', err));
-			}
-		});
-	});
-}
-
-/**
- * Detect buffer encoding and convert to target encoding
- * ref: http://www.w3.org/TR/2011/WD-html5-20110113/parsing.html#determining-the-character-encoding
- *
- * @param   Buffer  buffer    Incoming buffer
- * @param   String  encoding  Target encoding
- * @return  String
- */
-function convertBody(buffer, headers) {
-	if (typeof convert !== 'function') {
-		throw new Error('The package `encoding` must be installed to use the textConverted() function');
-	}
-
-	const ct = headers.get('content-type');
-	let charset = 'utf-8';
-	let res, str;
-
-	// header
-	if (ct) {
-		res = /charset=([^;]*)/i.exec(ct);
-	}
-
-	// no charset in content type, peek at response body for at most 1024 bytes
-	str = buffer.slice(0, 1024).toString();
-
-	// html5
-	if (!res && str) {
-		res = /<meta.+?charset=(['"])(.+?)\1/i.exec(str);
-	}
-
-	// html4
-	if (!res && str) {
-		res = /<meta[\s]+?http-equiv=(['"])content-type\1[\s]+?content=(['"])(.+?)\2/i.exec(str);
-		if (!res) {
-			res = /<meta[\s]+?content=(['"])(.+?)\1[\s]+?http-equiv=(['"])content-type\3/i.exec(str);
-			if (res) {
-				res.pop(); // drop last quote
-			}
-		}
-
-		if (res) {
-			res = /charset=(.*)/i.exec(res.pop());
-		}
-	}
-
-	// xml
-	if (!res && str) {
-		res = /<\?xml.+?encoding=(['"])(.+?)\1/i.exec(str);
-	}
-
-	// found charset
-	if (res) {
-		charset = res.pop();
-
-		// prevent decode issues when sites use incorrect encoding
-		// ref: https://hsivonen.fi/encoding-menu/
-		if (charset === 'gb2312' || charset === 'gbk') {
-			charset = 'gb18030';
-		}
-	}
-
-	// turn raw buffers into a single utf-8 buffer
-	return convert(buffer, 'UTF-8', charset).toString();
-}
-
-/**
- * Detect a URLSearchParams object
- * ref: https://github.com/bitinn/node-fetch/issues/296#issuecomment-307598143
- *
- * @param   Object  obj     Object to detect by type or brand
- * @return  String
- */
-function isURLSearchParams(obj) {
-	// Duck-typing as a necessary condition.
-	if (typeof obj !== 'object' || typeof obj.append !== 'function' || typeof obj.delete !== 'function' || typeof obj.get !== 'function' || typeof obj.getAll !== 'function' || typeof obj.has !== 'function' || typeof obj.set !== 'function') {
-		return false;
-	}
-
-	// Brand-checking and more duck-typing as optional condition.
-	return obj.constructor.name === 'URLSearchParams' || Object.prototype.toString.call(obj) === '[object URLSearchParams]' || typeof obj.sort === 'function';
-}
-
-/**
- * Check if `obj` is a W3C `Blob` object (which `File` inherits from)
- * @param  {*} obj
- * @return {boolean}
- */
-function isBlob(obj) {
-	return typeof obj === 'object' && typeof obj.arrayBuffer === 'function' && typeof obj.type === 'string' && typeof obj.stream === 'function' && typeof obj.constructor === 'function' && typeof obj.constructor.name === 'string' && /^(Blob|File)$/.test(obj.constructor.name) && /^(Blob|File)$/.test(obj[Symbol.toStringTag]);
-}
-
-/**
- * Clone body given Res/Req instance
- *
- * @param   Mixed  instance  Response or Request instance
- * @return  Mixed
- */
-function clone(instance) {
-	let p1, p2;
-	let body = instance.body;
-
-	// don't allow cloning a used body
-	if (instance.bodyUsed) {
-		throw new Error('cannot clone body after it is used');
-	}
-
-	// check that body is a stream and not form-data object
-	// note: we can't clone the form-data object without having it as a dependency
-	if (body instanceof Stream && typeof body.getBoundary !== 'function') {
-		// tee instance body
-		p1 = new PassThrough();
-		p2 = new PassThrough();
-		body.pipe(p1);
-		body.pipe(p2);
-		// set instance body to teed body and return the other teed body
-		instance[INTERNALS].body = p1;
-		body = p2;
-	}
-
-	return body;
-}
-
-/**
- * Performs the operation "extract a `Content-Type` value from |object|" as
- * specified in the specification:
- * https://fetch.spec.whatwg.org/#concept-bodyinit-extract
- *
- * This function assumes that instance.body is present.
- *
- * @param   Mixed  instance  Any options.body input
- */
-function extractContentType(body) {
-	if (body === null) {
-		// body is null
-		return null;
-	} else if (typeof body === 'string') {
-		// body is string
-		return 'text/plain;charset=UTF-8';
-	} else if (isURLSearchParams(body)) {
-		// body is a URLSearchParams
-		return 'application/x-www-form-urlencoded;charset=UTF-8';
-	} else if (isBlob(body)) {
-		// body is blob
-		return body.type || null;
-	} else if (Buffer.isBuffer(body)) {
-		// body is buffer
-		return null;
-	} else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') {
-		// body is ArrayBuffer
-		return null;
-	} else if (ArrayBuffer.isView(body)) {
-		// body is ArrayBufferView
-		return null;
-	} else if (typeof body.getBoundary === 'function') {
-		// detect form data input from form-data module
-		return `multipart/form-data;boundary=${body.getBoundary()}`;
-	} else if (body instanceof Stream) {
-		// body is stream
-		// can't really do much about this
-		return null;
-	} else {
-		// Body constructor defaults other things to string
-		return 'text/plain;charset=UTF-8';
-	}
-}
-
-/**
- * The Fetch Standard treats this as if "total bytes" is a property on the body.
- * For us, we have to explicitly get it with a function.
- *
- * ref: https://fetch.spec.whatwg.org/#concept-body-total-bytes
- *
- * @param   Body    instance   Instance of Body
- * @return  Number?            Number of bytes, or null if not possible
- */
-function getTotalBytes(instance) {
-	const body = instance.body;
-
-
-	if (body === null) {
-		// body is null
-		return 0;
-	} else if (isBlob(body)) {
-		return body.size;
-	} else if (Buffer.isBuffer(body)) {
-		// body is buffer
-		return body.length;
-	} else if (body && typeof body.getLengthSync === 'function') {
-		// detect form data input from form-data module
-		if (body._lengthRetrievers && body._lengthRetrievers.length == 0 || // 1.x
-		body.hasKnownLength && body.hasKnownLength()) {
-			// 2.x
-			return body.getLengthSync();
-		}
-		return null;
-	} else {
-		// body is stream
-		return null;
-	}
-}
-
-/**
- * Write a Body to a Node.js WritableStream (e.g. http.Request) object.
- *
- * @param   Body    instance   Instance of Body
- * @return  Void
- */
-function writeToStream(dest, instance) {
-	const body = instance.body;
-
-
-	if (body === null) {
-		// body is null
-		dest.end();
-	} else if (isBlob(body)) {
-		body.stream().pipe(dest);
-	} else if (Buffer.isBuffer(body)) {
-		// body is buffer
-		dest.write(body);
-		dest.end();
-	} else {
-		// body is stream
-		body.pipe(dest);
-	}
-}
-
-// expose Promise
-Body.Promise = global.Promise;
-
-/**
- * headers.js
- *
- * Headers class offers convenient helpers
- */
-
-const invalidTokenRegex = /[^\^_`a-zA-Z\-0-9!#$%&'*+.|~]/;
-const invalidHeaderCharRegex = /[^\t\x20-\x7e\x80-\xff]/;
-
-function validateName(name) {
-	name = `${name}`;
-	if (invalidTokenRegex.test(name) || name === '') {
-		throw new TypeError(`${name} is not a legal HTTP header name`);
-	}
-}
-
-function validateValue(value) {
-	value = `${value}`;
-	if (invalidHeaderCharRegex.test(value)) {
-		throw new TypeError(`${value} is not a legal HTTP header value`);
-	}
-}
-
-/**
- * Find the key in the map object given a header name.
- *
- * Returns undefined if not found.
- *
- * @param   String  name  Header name
- * @return  String|Undefined
- */
-function find(map, name) {
-	name = name.toLowerCase();
-	for (const key in map) {
-		if (key.toLowerCase() === name) {
-			return key;
-		}
-	}
-	return undefined;
-}
-
-const MAP = Symbol('map');
-class Headers {
-	/**
-  * Headers class
-  *
-  * @param   Object  headers  Response headers
-  * @return  Void
-  */
-	constructor() {
-		let init = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;
-
-		this[MAP] = Object.create(null);
-
-		if (init instanceof Headers) {
-			const rawHeaders = init.raw();
-			const headerNames = Object.keys(rawHeaders);
-
-			for (const headerName of headerNames) {
-				for (const value of rawHeaders[headerName]) {
-					this.append(headerName, value);
-				}
-			}
-
-			return;
-		}
-
-		// We don't worry about converting prop to ByteString here as append()
-		// will handle it.
-		if (init == null) ; else if (typeof init === 'object') {
-			const method = init[Symbol.iterator];
-			if (method != null) {
-				if (typeof method !== 'function') {
-					throw new TypeError('Header pairs must be iterable');
-				}
-
-				// sequence<sequence<ByteString>>
-				// Note: per spec we have to first exhaust the lists then process them
-				const pairs = [];
-				for (const pair of init) {
-					if (typeof pair !== 'object' || typeof pair[Symbol.iterator] !== 'function') {
-						throw new TypeError('Each header pair must be iterable');
-					}
-					pairs.push(Array.from(pair));
-				}
-
-				for (const pair of pairs) {
-					if (pair.length !== 2) {
-						throw new TypeError('Each header pair must be a name/value tuple');
-					}
-					this.append(pair[0], pair[1]);
-				}
-			} else {
-				// record<ByteString, ByteString>
-				for (const key of Object.keys(init)) {
-					const value = init[key];
-					this.append(key, value);
-				}
-			}
-		} else {
-			throw new TypeError('Provided initializer must be an object');
-		}
-	}
-
-	/**
-  * Return combined header value given name
-  *
-  * @param   String  name  Header name
-  * @return  Mixed
-  */
-	get(name) {
-		name = `${name}`;
-		validateName(name);
-		const key = find(this[MAP], name);
-		if (key === undefined) {
-			return null;
-		}
-
-		return this[MAP][key].join(', ');
-	}
-
-	/**
-  * Iterate over all headers
-  *
-  * @param   Function  callback  Executed for each item with parameters (value, name, thisArg)
-  * @param   Boolean   thisArg   `this` context for callback function
-  * @return  Void
-  */
-	forEach(callback) {
-		let thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;
-
-		let pairs = getHeaders(this);
-		let i = 0;
-		while (i < pairs.length) {
-			var _pairs$i = pairs[i];
-			const name = _pairs$i[0],
-			      value = _pairs$i[1];
-
-			callback.call(thisArg, value, name, this);
-			pairs = getHeaders(this);
-			i++;
-		}
-	}
-
-	/**
-  * Overwrite header values given name
-  *
-  * @param   String  name   Header name
-  * @param   String  value  Header value
-  * @return  Void
-  */
-	set(name, value) {
-		name = `${name}`;
-		value = `${value}`;
-		validateName(name);
-		validateValue(value);
-		const key = find(this[MAP], name);
-		this[MAP][key !== undefined ? key : name] = [value];
-	}
-
-	/**
-  * Append a value onto existing header
-  *
-  * @param   String  name   Header name
-  * @param   String  value  Header value
-  * @return  Void
-  */
-	append(name, value) {
-		name = `${name}`;
-		value = `${value}`;
-		validateName(name);
-		validateValue(value);
-		const key = find(this[MAP], name);
-		if (key !== undefined) {
-			this[MAP][key].push(value);
-		} else {
-			this[MAP][name] = [value];
-		}
-	}
-
-	/**
-  * Check for header name existence
-  *
-  * @param   String   name  Header name
-  * @return  Boolean
-  */
-	has(name) {
-		name = `${name}`;
-		validateName(name);
-		return find(this[MAP], name) !== undefined;
-	}
-
-	/**
-  * Delete all header values given name
-  *
-  * @param   String  name  Header name
-  * @return  Void
-  */
-	delete(name) {
-		name = `${name}`;
-		validateName(name);
-		const key = find(this[MAP], name);
-		if (key !== undefined) {
-			delete this[MAP][key];
-		}
-	}
-
-	/**
-  * Return raw headers (non-spec api)
-  *
-  * @return  Object
-  */
-	raw() {
-		return this[MAP];
-	}
-
-	/**
-  * Get an iterator on keys.
-  *
-  * @return  Iterator
-  */
-	keys() {
-		return createHeadersIterator(this, 'key');
-	}
-
-	/**
-  * Get an iterator on values.
-  *
-  * @return  Iterator
-  */
-	values() {
-		return createHeadersIterator(this, 'value');
-	}
-
-	/**
-  * Get an iterator on entries.
-  *
-  * This is the default iterator of the Headers object.
-  *
-  * @return  Iterator
-  */
-	[Symbol.iterator]() {
-		return createHeadersIterator(this, 'key+value');
-	}
-}
-Headers.prototype.entries = Headers.prototype[Symbol.iterator];
-
-Object.defineProperty(Headers.prototype, Symbol.toStringTag, {
-	value: 'Headers',
-	writable: false,
-	enumerable: false,
-	configurable: true
-});
-
-Object.defineProperties(Headers.prototype, {
-	get: { enumerable: true },
-	forEach: { enumerable: true },
-	set: { enumerable: true },
-	append: { enumerable: true },
-	has: { enumerable: true },
-	delete: { enumerable: true },
-	keys: { enumerable: true },
-	values: { enumerable: true },
-	entries: { enumerable: true }
-});
-
-function getHeaders(headers) {
-	let kind = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'key+value';
-
-	const keys = Object.keys(headers[MAP]).sort();
-	return keys.map(kind === 'key' ? function (k) {
-		return k.toLowerCase();
-	} : kind === 'value' ? function (k) {
-		return headers[MAP][k].join(', ');
-	} : function (k) {
-		return [k.toLowerCase(), headers[MAP][k].join(', ')];
-	});
-}
-
-const INTERNAL = Symbol('internal');
-
-function createHeadersIterator(target, kind) {
-	const iterator = Object.create(HeadersIteratorPrototype);
-	iterator[INTERNAL] = {
-		target,
-		kind,
-		index: 0
-	};
-	return iterator;
-}
-
-const HeadersIteratorPrototype = Object.setPrototypeOf({
-	next() {
-		// istanbul ignore if
-		if (!this || Object.getPrototypeOf(this) !== HeadersIteratorPrototype) {
-			throw new TypeError('Value of `this` is not a HeadersIterator');
-		}
-
-		var _INTERNAL = this[INTERNAL];
-		const target = _INTERNAL.target,
-		      kind = _INTERNAL.kind,
-		      index = _INTERNAL.index;
-
-		const values = getHeaders(target, kind);
-		const len = values.length;
-		if (index >= len) {
-			return {
-				value: undefined,
-				done: true
-			};
-		}
-
-		this[INTERNAL].index = index + 1;
-
-		return {
-			value: values[index],
-			done: false
-		};
-	}
-}, Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));
-
-Object.defineProperty(HeadersIteratorPrototype, Symbol.toStringTag, {
-	value: 'HeadersIterator',
-	writable: false,
-	enumerable: false,
-	configurable: true
-});
-
-/**
- * Export the Headers object in a form that Node.js can consume.
- *
- * @param   Headers  headers
- * @return  Object
- */
-function exportNodeCompatibleHeaders(headers) {
-	const obj = Object.assign({ __proto__: null }, headers[MAP]);
-
-	// http.request() only supports string as Host header. This hack makes
-	// specifying custom Host header possible.
-	const hostHeaderKey = find(headers[MAP], 'Host');
-	if (hostHeaderKey !== undefined) {
-		obj[hostHeaderKey] = obj[hostHeaderKey][0];
-	}
-
-	return obj;
-}
-
-/**
- * Create a Headers object from an object of headers, ignoring those that do
- * not conform to HTTP grammar productions.
- *
- * @param   Object  obj  Object of headers
- * @return  Headers
- */
-function createHeadersLenient(obj) {
-	const headers = new Headers();
-	for (const name of Object.keys(obj)) {
-		if (invalidTokenRegex.test(name)) {
-			continue;
-		}
-		if (Array.isArray(obj[name])) {
-			for (const val of obj[name]) {
-				if (invalidHeaderCharRegex.test(val)) {
-					continue;
-				}
-				if (headers[MAP][name] === undefined) {
-					headers[MAP][name] = [val];
-				} else {
-					headers[MAP][name].push(val);
-				}
-			}
-		} else if (!invalidHeaderCharRegex.test(obj[name])) {
-			headers[MAP][name] = [obj[name]];
-		}
-	}
-	return headers;
-}
-
-const INTERNALS$1 = Symbol('Response internals');
-
-// fix an issue where "STATUS_CODES" aren't a named export for node <10
-const STATUS_CODES = http.STATUS_CODES;
-
-/**
- * Response class
- *
- * @param   Stream  body  Readable stream
- * @param   Object  opts  Response options
- * @return  Void
- */
-class Response {
-	constructor() {
-		let body = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
-		let opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
-
-		Body.call(this, body, opts);
-
-		const status = opts.status || 200;
-		const headers = new Headers(opts.headers);
-
-		if (body != null && !headers.has('Content-Type')) {
-			const contentType = extractContentType(body);
-			if (contentType) {
-				headers.append('Content-Type', contentType);
-			}
-		}
-
-		this[INTERNALS$1] = {
-			url: opts.url,
-			status,
-			statusText: opts.statusText || STATUS_CODES[status],
-			headers,
-			counter: opts.counter
-		};
-	}
-
-	get url() {
-		return this[INTERNALS$1].url || '';
-	}
-
-	get status() {
-		return this[INTERNALS$1].status;
-	}
-
-	/**
-  * Convenience property representing if the request ended normally
-  */
-	get ok() {
-		return this[INTERNALS$1].status >= 200 && this[INTERNALS$1].status < 300;
-	}
-
-	get redirected() {
-		return this[INTERNALS$1].counter > 0;
-	}
-
-	get statusText() {
-		return this[INTERNALS$1].statusText;
-	}
-
-	get headers() {
-		return this[INTERNALS$1].headers;
-	}
-
-	/**
-  * Clone this response
-  *
-  * @return  Response
-  */
-	clone() {
-		return new Response(clone(this), {
-			url: this.url,
-			status: this.status,
-			statusText: this.statusText,
-			headers: this.headers,
-			ok: this.ok,
-			redirected: this.redirected
-		});
-	}
-}
-
-Body.mixIn(Response.prototype);
-
-Object.defineProperties(Response.prototype, {
-	url: { enumerable: true },
-	status: { enumerable: true },
-	ok: { enumerable: true },
-	redirected: { enumerable: true },
-	statusText: { enumerable: true },
-	headers: { enumerable: true },
-	clone: { enumerable: true }
-});
-
-Object.defineProperty(Response.prototype, Symbol.toStringTag, {
-	value: 'Response',
-	writable: false,
-	enumerable: false,
-	configurable: true
-});
-
-const INTERNALS$2 = Symbol('Request internals');
-const URL = Url.URL || whatwgUrl.URL;
-
-// fix an issue where "format", "parse" aren't a named export for node <10
-const parse_url = Url.parse;
-const format_url = Url.format;
-
-/**
- * Wrapper around `new URL` to handle arbitrary URLs
- *
- * @param  {string} urlStr
- * @return {void}
- */
-function parseURL(urlStr) {
-	/*
- 	Check whether the URL is absolute or not
- 		Scheme: https://tools.ietf.org/html/rfc3986#section-3.1
- 	Absolute URL: https://tools.ietf.org/html/rfc3986#section-4.3
- */
-	if (/^[a-zA-Z][a-zA-Z\d+\-.]*:/.exec(urlStr)) {
-		urlStr = new URL(urlStr).toString();
-	}
-
-	// Fallback to old implementation for arbitrary URLs
-	return parse_url(urlStr);
-}
-
-const streamDestructionSupported = 'destroy' in Stream.Readable.prototype;
-
-/**
- * Check if a value is an instance of Request.
- *
- * @param   Mixed   input
- * @return  Boolean
- */
-function isRequest(input) {
-	return typeof input === 'object' && typeof input[INTERNALS$2] === 'object';
-}
-
-function isAbortSignal(signal) {
-	const proto = signal && typeof signal === 'object' && Object.getPrototypeOf(signal);
-	return !!(proto && proto.constructor.name === 'AbortSignal');
-}
-
-/**
- * Request class
- *
- * @param   Mixed   input  Url or Request instance
- * @param   Object  init   Custom options
- * @return  Void
- */
-class Request {
-	constructor(input) {
-		let init = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
-
-		let parsedURL;
-
-		// normalize input
-		if (!isRequest(input)) {
-			if (input && input.href) {
-				// in order to support Node.js' Url objects; though WHATWG's URL objects
-				// will fall into this branch also (since their `toString()` will return
-				// `href` property anyway)
-				parsedURL = parseURL(input.href);
-			} else {
-				// coerce input to a string before attempting to parse
-				parsedURL = parseURL(`${input}`);
-			}
-			input = {};
-		} else {
-			parsedURL = parseURL(input.url);
-		}
-
-		let method = init.method || input.method || 'GET';
-		method = method.toUpperCase();
-
-		if ((init.body != null || isRequest(input) && input.body !== null) && (method === 'GET' || method === 'HEAD')) {
-			throw new TypeError('Request with GET/HEAD method cannot have body');
-		}
-
-		let inputBody = init.body != null ? init.body : isRequest(input) && input.body !== null ? clone(input) : null;
-
-		Body.call(this, inputBody, {
-			timeout: init.timeout || input.timeout || 0,
-			size: init.size || input.size || 0
-		});
-
-		const headers = new Headers(init.headers || input.headers || {});
-
-		if (inputBody != null && !headers.has('Content-Type')) {
-			const contentType = extractContentType(inputBody);
-			if (contentType) {
-				headers.append('Content-Type', contentType);
-			}
-		}
-
-		let signal = isRequest(input) ? input.signal : null;
-		if ('signal' in init) signal = init.signal;
-
-		if (signal != null && !isAbortSignal(signal)) {
-			throw new TypeError('Expected signal to be an instanceof AbortSignal');
-		}
-
-		this[INTERNALS$2] = {
-			method,
-			redirect: init.redirect || input.redirect || 'follow',
-			headers,
-			parsedURL,
-			signal
-		};
-
-		// node-fetch-only options
-		this.follow = init.follow !== undefined ? init.follow : input.follow !== undefined ? input.follow : 20;
-		this.compress = init.compress !== undefined ? init.compress : input.compress !== undefined ? input.compress : true;
-		this.counter = init.counter || input.counter || 0;
-		this.agent = init.agent || input.agent;
-	}
-
-	get method() {
-		return this[INTERNALS$2].method;
-	}
-
-	get url() {
-		return format_url(this[INTERNALS$2].parsedURL);
-	}
-
-	get headers() {
-		return this[INTERNALS$2].headers;
-	}
-
-	get redirect() {
-		return this[INTERNALS$2].redirect;
-	}
-
-	get signal() {
-		return this[INTERNALS$2].signal;
-	}
-
-	/**
-  * Clone this request
-  *
-  * @return  Request
-  */
-	clone() {
-		return new Request(this);
-	}
-}
-
-Body.mixIn(Request.prototype);
-
-Object.defineProperty(Request.prototype, Symbol.toStringTag, {
-	value: 'Request',
-	writable: false,
-	enumerable: false,
-	configurable: true
-});
-
-Object.defineProperties(Request.prototype, {
-	method: { enumerable: true },
-	url: { enumerable: true },
-	headers: { enumerable: true },
-	redirect: { enumerable: true },
-	clone: { enumerable: true },
-	signal: { enumerable: true }
-});
-
-/**
- * Convert a Request to Node.js http request options.
- *
- * @param   Request  A Request instance
- * @return  Object   The options object to be passed to http.request
- */
-function getNodeRequestOptions(request) {
-	const parsedURL = request[INTERNALS$2].parsedURL;
-	const headers = new Headers(request[INTERNALS$2].headers);
-
-	// fetch step 1.3
-	if (!headers.has('Accept')) {
-		headers.set('Accept', '*/*');
-	}
-
-	// Basic fetch
-	if (!parsedURL.protocol || !parsedURL.hostname) {
-		throw new TypeError('Only absolute URLs are supported');
-	}
-
-	if (!/^https?:$/.test(parsedURL.protocol)) {
-		throw new TypeError('Only HTTP(S) protocols are supported');
-	}
-
-	if (request.signal && request.body instanceof Stream.Readable && !streamDestructionSupported) {
-		throw new Error('Cancellation of streamed requests with AbortSignal is not supported in node < 8');
-	}
-
-	// HTTP-network-or-cache fetch steps 2.4-2.7
-	let contentLengthValue = null;
-	if (request.body == null && /^(POST|PUT)$/i.test(request.method)) {
-		contentLengthValue = '0';
-	}
-	if (request.body != null) {
-		const totalBytes = getTotalBytes(request);
-		if (typeof totalBytes === 'number') {
-			contentLengthValue = String(totalBytes);
-		}
-	}
-	if (contentLengthValue) {
-		headers.set('Content-Length', contentLengthValue);
-	}
-
-	// HTTP-network-or-cache fetch step 2.11
-	if (!headers.has('User-Agent')) {
-		headers.set('User-Agent', 'node-fetch/1.0 (+https://github.com/bitinn/node-fetch)');
-	}
-
-	// HTTP-network-or-cache fetch step 2.15
-	if (request.compress && !headers.has('Accept-Encoding')) {
-		headers.set('Accept-Encoding', 'gzip,deflate');
-	}
-
-	let agent = request.agent;
-	if (typeof agent === 'function') {
-		agent = agent(parsedURL);
-	}
-
-	// HTTP-network fetch step 4.2
-	// chunked encoding is handled by Node.js
-
-	return Object.assign({}, parsedURL, {
-		method: request.method,
-		headers: exportNodeCompatibleHeaders(headers),
-		agent
-	});
-}
-
-/**
- * abort-error.js
- *
- * AbortError interface for cancelled requests
- */
-
-/**
- * Create AbortError instance
- *
- * @param   String      message      Error message for human
- * @return  AbortError
- */
-function AbortError(message) {
-  Error.call(this, message);
-
-  this.type = 'aborted';
-  this.message = message;
-
-  // hide custom error implementation details from end-users
-  Error.captureStackTrace(this, this.constructor);
-}
-
-AbortError.prototype = Object.create(Error.prototype);
-AbortError.prototype.constructor = AbortError;
-AbortError.prototype.name = 'AbortError';
-
-const URL$1 = Url.URL || whatwgUrl.URL;
-
-// fix an issue where "PassThrough", "resolve" aren't a named export for node <10
-const PassThrough$1 = Stream.PassThrough;
-
-const isDomainOrSubdomain = function isDomainOrSubdomain(destination, original) {
-	const orig = new URL$1(original).hostname;
-	const dest = new URL$1(destination).hostname;
-
-	return orig === dest || orig[orig.length - dest.length - 1] === '.' && orig.endsWith(dest);
-};
-
-/**
- * isSameProtocol reports whether the two provided URLs use the same protocol.
- *
- * Both domains must already be in canonical form.
- * @param {string|URL} original
- * @param {string|URL} destination
- */
-const isSameProtocol = function isSameProtocol(destination, original) {
-	const orig = new URL$1(original).protocol;
-	const dest = new URL$1(destination).protocol;
-
-	return orig === dest;
-};
-
-/**
- * Fetch function
- *
- * @param   Mixed    url   Absolute url or Request instance
- * @param   Object   opts  Fetch options
- * @return  Promise
- */
-function fetch(url, opts) {
-
-	// allow custom promise
-	if (!fetch.Promise) {
-		throw new Error('native promise missing, set fetch.Promise to your favorite alternative');
-	}
-
-	Body.Promise = fetch.Promise;
-
-	// wrap http.request into fetch
-	return new fetch.Promise(function (resolve, reject) {
-		// build request object
-		const request = new Request(url, opts);
-		const options = getNodeRequestOptions(request);
-
-		const send = (options.protocol === 'https:' ? https : http).request;
-		const signal = request.signal;
-
-		let response = null;
-
-		const abort = function abort() {
-			let error = new AbortError('The user aborted a request.');
-			reject(error);
-			if (request.body && request.body instanceof Stream.Readable) {
-				destroyStream(request.body, error);
-			}
-			if (!response || !response.body) return;
-			response.body.emit('error', error);
-		};
-
-		if (signal && signal.aborted) {
-			abort();
-			return;
-		}
-
-		const abortAndFinalize = function abortAndFinalize() {
-			abort();
-			finalize();
-		};
-
-		// send request
-		const req = send(options);
-		let reqTimeout;
-
-		if (signal) {
-			signal.addEventListener('abort', abortAndFinalize);
-		}
-
-		function finalize() {
-			req.abort();
-			if (signal) signal.removeEventListener('abort', abortAndFinalize);
-			clearTimeout(reqTimeout);
-		}
-
-		if (request.timeout) {
-			req.once('socket', function (socket) {
-				reqTimeout = setTimeout(function () {
-					reject(new FetchError(`network timeout at: ${request.url}`, 'request-timeout'));
-					finalize();
-				}, request.timeout);
-			});
-		}
-
-		req.on('error', function (err) {
-			reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err));
-
-			if (response && response.body) {
-				destroyStream(response.body, err);
-			}
-
-			finalize();
-		});
-
-		fixResponseChunkedTransferBadEnding(req, function (err) {
-			if (signal && signal.aborted) {
-				return;
-			}
-
-			if (response && response.body) {
-				destroyStream(response.body, err);
-			}
-		});
-
-		/* c8 ignore next 18 */
-		if (parseInt(process.version.substring(1)) < 14) {
-			// Before Node.js 14, pipeline() does not fully support async iterators and does not always
-			// properly handle when the socket close/end events are out of order.
-			req.on('socket', function (s) {
-				s.addListener('close', function (hadError) {
-					// if a data listener is still present we didn't end cleanly
-					const hasDataListener = s.listenerCount('data') > 0;
-
-					// if end happened before close but the socket didn't emit an error, do it now
-					if (response && hasDataListener && !hadError && !(signal && signal.aborted)) {
-						const err = new Error('Premature close');
-						err.code = 'ERR_STREAM_PREMATURE_CLOSE';
-						response.body.emit('error', err);
-					}
-				});
-			});
-		}
-
-		req.on('response', function (res) {
-			clearTimeout(reqTimeout);
-
-			const headers = createHeadersLenient(res.headers);
-
-			// HTTP fetch step 5
-			if (fetch.isRedirect(res.statusCode)) {
-				// HTTP fetch step 5.2
-				const location = headers.get('Location');
-
-				// HTTP fetch step 5.3
-				let locationURL = null;
-				try {
-					locationURL = location === null ? null : new URL$1(location, request.url).toString();
-				} catch (err) {
-					// error here can only be invalid URL in Location: header
-					// do not throw when options.redirect == manual
-					// let the user extract the errorneous redirect URL
-					if (request.redirect !== 'manual') {
-						reject(new FetchError(`uri requested responds with an invalid redirect URL: ${location}`, 'invalid-redirect'));
-						finalize();
-						return;
-					}
-				}
-
-				// HTTP fetch step 5.5
-				switch (request.redirect) {
-					case 'error':
-						reject(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${request.url}`, 'no-redirect'));
-						finalize();
-						return;
-					case 'manual':
-						// node-fetch-specific step: make manual redirect a bit easier to use by setting the Location header value to the resolved URL.
-						if (locationURL !== null) {
-							// handle corrupted header
-							try {
-								headers.set('Location', locationURL);
-							} catch (err) {
-								// istanbul ignore next: nodejs server prevent invalid response headers, we can't test this through normal request
-								reject(err);
-							}
-						}
-						break;
-					case 'follow':
-						// HTTP-redirect fetch step 2
-						if (locationURL === null) {
-							break;
-						}
-
-						// HTTP-redirect fetch step 5
-						if (request.counter >= request.follow) {
-							reject(new FetchError(`maximum redirect reached at: ${request.url}`, 'max-redirect'));
-							finalize();
-							return;
-						}
-
-						// HTTP-redirect fetch step 6 (counter increment)
-						// Create a new Request object.
-						const requestOpts = {
-							headers: new Headers(request.headers),
-							follow: request.follow,
-							counter: request.counter + 1,
-							agent: request.agent,
-							compress: request.compress,
-							method: request.method,
-							body: request.body,
-							signal: request.signal,
-							timeout: request.timeout,
-							size: request.size
-						};
-
-						if (!isDomainOrSubdomain(request.url, locationURL) || !isSameProtocol(request.url, locationURL)) {
-							for (const name of ['authorization', 'www-authenticate', 'cookie', 'cookie2']) {
-								requestOpts.headers.delete(name);
-							}
-						}
-
-						// HTTP-redirect fetch step 9
-						if (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) {
-							reject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect'));
-							finalize();
-							return;
-						}
-
-						// HTTP-redirect fetch step 11
-						if (res.statusCode === 303 || (res.statusCode === 301 || res.statusCode === 302) && request.method === 'POST') {
-							requestOpts.method = 'GET';
-							requestOpts.body = undefined;
-							requestOpts.headers.delete('content-length');
-						}
-
-						// HTTP-redirect fetch step 15
-						resolve(fetch(new Request(locationURL, requestOpts)));
-						finalize();
-						return;
-				}
-			}
-
-			// prepare response
-			res.once('end', function () {
-				if (signal) signal.removeEventListener('abort', abortAndFinalize);
-			});
-			let body = res.pipe(new PassThrough$1());
-
-			const response_options = {
-				url: request.url,
-				status: res.statusCode,
-				statusText: res.statusMessage,
-				headers: headers,
-				size: request.size,
-				timeout: request.timeout,
-				counter: request.counter
-			};
-
-			// HTTP-network fetch step 12.1.1.3
-			const codings = headers.get('Content-Encoding');
-
-			// HTTP-network fetch step 12.1.1.4: handle content codings
-
-			// in following scenarios we ignore compression support
-			// 1. compression support is disabled
-			// 2. HEAD request
-			// 3. no Content-Encoding header
-			// 4. no content response (204)
-			// 5. content not modified response (304)
-			if (!request.compress || request.method === 'HEAD' || codings === null || res.statusCode === 204 || res.statusCode === 304) {
-				response = new Response(body, response_options);
-				resolve(response);
-				return;
-			}
-
-			// For Node v6+
-			// Be less strict when decoding compressed responses, since sometimes
-			// servers send slightly invalid responses that are still accepted
-			// by common browsers.
-			// Always using Z_SYNC_FLUSH is what cURL does.
-			const zlibOptions = {
-				flush: zlib.Z_SYNC_FLUSH,
-				finishFlush: zlib.Z_SYNC_FLUSH
-			};
-
-			// for gzip
-			if (codings == 'gzip' || codings == 'x-gzip') {
-				body = body.pipe(zlib.createGunzip(zlibOptions));
-				response = new Response(body, response_options);
-				resolve(response);
-				return;
-			}
-
-			// for deflate
-			if (codings == 'deflate' || codings == 'x-deflate') {
-				// handle the infamous raw deflate response from old servers
-				// a hack for old IIS and Apache servers
-				const raw = res.pipe(new PassThrough$1());
-				raw.once('data', function (chunk) {
-					// see http://stackoverflow.com/questions/37519828
-					if ((chunk[0] & 0x0F) === 0x08) {
-						body = body.pipe(zlib.createInflate());
-					} else {
-						body = body.pipe(zlib.createInflateRaw());
-					}
-					response = new Response(body, response_options);
-					resolve(response);
-				});
-				raw.on('end', function () {
-					// some old IIS servers return zero-length OK deflate responses, so 'data' is never emitted.
-					if (!response) {
-						response = new Response(body, response_options);
-						resolve(response);
-					}
-				});
-				return;
-			}
-
-			// for br
-			if (codings == 'br' && typeof zlib.createBrotliDecompress === 'function') {
-				body = body.pipe(zlib.createBrotliDecompress());
-				response = new Response(body, response_options);
-				resolve(response);
-				return;
-			}
-
-			// otherwise, use response as-is
-			response = new Response(body, response_options);
-			resolve(response);
-		});
-
-		writeToStream(req, request);
-	});
-}
-function fixResponseChunkedTransferBadEnding(request, errorCallback) {
-	let socket;
-
-	request.on('socket', function (s) {
-		socket = s;
-	});
-
-	request.on('response', function (response) {
-		const headers = response.headers;
-
-		if (headers['transfer-encoding'] === 'chunked' && !headers['content-length']) {
-			response.once('close', function (hadError) {
-				// tests for socket presence, as in some situations the
-				// the 'socket' event is not triggered for the request
-				// (happens in deno), avoids `TypeError`
-				// if a data listener is still present we didn't end cleanly
-				const hasDataListener = socket && socket.listenerCount('data') > 0;
-
-				if (hasDataListener && !hadError) {
-					const err = new Error('Premature close');
-					err.code = 'ERR_STREAM_PREMATURE_CLOSE';
-					errorCallback(err);
-				}
-			});
-		}
-	});
-}
-
-function destroyStream(stream, err) {
-	if (stream.destroy) {
-		stream.destroy(err);
-	} else {
-		// node < 8
-		stream.emit('error', err);
-		stream.end();
-	}
-}
-
-/**
- * Redirect code matching
- *
- * @param   Number   code  Status code
- * @return  Boolean
- */
-fetch.isRedirect = function (code) {
-	return code === 301 || code === 302 || code === 303 || code === 307 || code === 308;
-};
-
-// expose Promise
-fetch.Promise = global.Promise;
-
-export default fetch;
-export { Headers, Request, Response, FetchError, AbortError };

+ 0 - 89
rag-server/node_modules/@mapbox/node-pre-gyp/node_modules/node-fetch/package.json

@@ -1,89 +0,0 @@
-{
-    "name": "node-fetch",
-    "version": "2.7.0",
-    "description": "A light-weight module that brings window.fetch to node.js",
-    "main": "lib/index.js",
-    "browser": "./browser.js",
-    "module": "lib/index.mjs",
-    "files": [
-        "lib/index.js",
-        "lib/index.mjs",
-        "lib/index.es.js",
-        "browser.js"
-    ],
-    "engines": {
-        "node": "4.x || >=6.0.0"
-    },
-    "scripts": {
-        "build": "cross-env BABEL_ENV=rollup rollup -c",
-        "prepare": "npm run build",
-        "test": "cross-env BABEL_ENV=test mocha --require babel-register --throw-deprecation test/test.js",
-        "report": "cross-env BABEL_ENV=coverage nyc --reporter lcov --reporter text mocha -R spec test/test.js",
-        "coverage": "cross-env BABEL_ENV=coverage nyc --reporter json --reporter text mocha -R spec test/test.js && codecov -f coverage/coverage-final.json"
-    },
-    "repository": {
-        "type": "git",
-        "url": "https://github.com/bitinn/node-fetch.git"
-    },
-    "keywords": [
-        "fetch",
-        "http",
-        "promise"
-    ],
-    "author": "David Frank",
-    "license": "MIT",
-    "bugs": {
-        "url": "https://github.com/bitinn/node-fetch/issues"
-    },
-    "homepage": "https://github.com/bitinn/node-fetch",
-    "dependencies": {
-        "whatwg-url": "^5.0.0"
-    },
-    "peerDependencies": {
-        "encoding": "^0.1.0"
-    },
-    "peerDependenciesMeta": {
-        "encoding": {
-            "optional": true
-        }
-    },
-    "devDependencies": {
-        "@ungap/url-search-params": "^0.1.2",
-        "abort-controller": "^1.1.0",
-        "abortcontroller-polyfill": "^1.3.0",
-        "babel-core": "^6.26.3",
-        "babel-plugin-istanbul": "^4.1.6",
-        "babel-plugin-transform-async-generator-functions": "^6.24.1",
-        "babel-polyfill": "^6.26.0",
-        "babel-preset-env": "1.4.0",
-        "babel-register": "^6.16.3",
-        "chai": "^3.5.0",
-        "chai-as-promised": "^7.1.1",
-        "chai-iterator": "^1.1.1",
-        "chai-string": "~1.3.0",
-        "codecov": "3.3.0",
-        "cross-env": "^5.2.0",
-        "form-data": "^2.3.3",
-        "is-builtin-module": "^1.0.0",
-        "mocha": "^5.0.0",
-        "nyc": "11.9.0",
-        "parted": "^0.1.1",
-        "promise": "^8.0.3",
-        "resumer": "0.0.0",
-        "rollup": "^0.63.4",
-        "rollup-plugin-babel": "^3.0.7",
-        "string-to-arraybuffer": "^1.0.2",
-        "teeny-request": "3.7.0"
-    },
-    "release": {
-        "branches": [
-            "+([0-9]).x",
-            "main",
-            "next",
-            {
-                "name": "beta",
-                "prerelease": true
-            }
-        ]
-    }
-}

+ 0 - 62
rag-server/node_modules/@mapbox/node-pre-gyp/package.json

@@ -1,62 +0,0 @@
-{
-  "name": "@mapbox/node-pre-gyp",
-  "description": "Node.js native addon binary install tool",
-  "version": "1.0.11",
-  "keywords": [
-    "native",
-    "addon",
-    "module",
-    "c",
-    "c++",
-    "bindings",
-    "binary"
-  ],
-  "license": "BSD-3-Clause",
-  "author": "Dane Springmeyer <dane@mapbox.com>",
-  "repository": {
-    "type": "git",
-    "url": "git://github.com/mapbox/node-pre-gyp.git"
-  },
-  "bin": "./bin/node-pre-gyp",
-  "main": "./lib/node-pre-gyp.js",
-  "dependencies": {
-    "detect-libc": "^2.0.0",
-    "https-proxy-agent": "^5.0.0",
-    "make-dir": "^3.1.0",
-    "node-fetch": "^2.6.7",
-    "nopt": "^5.0.0",
-    "npmlog": "^5.0.1",
-    "rimraf": "^3.0.2",
-    "semver": "^7.3.5",
-    "tar": "^6.1.11"
-  },
-  "devDependencies": {
-    "@mapbox/cloudfriend": "^5.1.0",
-    "@mapbox/eslint-config-mapbox": "^3.0.0",
-    "aws-sdk": "^2.1087.0",
-    "codecov": "^3.8.3",
-    "eslint": "^7.32.0",
-    "eslint-plugin-node": "^11.1.0",
-    "mock-aws-s3": "^4.0.2",
-    "nock": "^12.0.3",
-    "node-addon-api": "^4.3.0",
-    "nyc": "^15.1.0",
-    "tape": "^5.5.2",
-    "tar-fs": "^2.1.1"
-  },
-  "nyc": {
-    "all": true,
-    "skip-full": false,
-    "exclude": [
-      "test/**"
-    ]
-  },
-  "scripts": {
-    "coverage": "nyc --all --include index.js --include lib/ npm test",
-    "upload-coverage": "nyc report --reporter json && codecov --clear --flags=unit --file=./coverage/coverage-final.json",
-    "lint": "eslint bin/node-pre-gyp lib/*js lib/util/*js test/*js scripts/*js",
-    "fix": "npm run lint -- --fix",
-    "update-crosswalk": "node scripts/abi_crosswalk.js",
-    "test": "tape test/*test.js"
-  }
-}

+ 0 - 1
rag-server/node_modules/@tensorflow/tfjs-core/.bazelignore

@@ -1 +0,0 @@
-node_modules

+ 0 - 1
rag-server/node_modules/@tensorflow/tfjs-core/.bazelrc

@@ -1 +0,0 @@
-build --symlink_prefix=dist/

+ 0 - 2
rag-server/node_modules/@tensorflow/tfjs-core/BUILD.bazel

@@ -1,2 +0,0 @@
-# Allow typescript rules in any package to reference this file
-exports_files(["tsconfig.json"])

+ 0 - 41
rag-server/node_modules/@tensorflow/tfjs-core/README.md

@@ -1,41 +0,0 @@
-# TensorFlow.js Core API
-
-A part of the TensorFlow.js ecosystem, this repo hosts `@tensorflow/tfjs-core`,
-the TensorFlow.js Core API, which provides low-level, hardware-accelerated
-linear algebra operations and an eager API for automatic differentiation.
-
-Check out [js.tensorflow.org](https://js.tensorflow.org) for more
-information about the library, tutorials and API docs.
-
-To keep track of issues we use the [tensorflow/tfjs](https://github.com/tensorflow/tfjs) Github repo.
-
-## Importing
-
-You can install TensorFlow.js via yarn or npm. We recommend using the
-[@tensorflow/tfjs](https://www.npmjs.com/package/@tensorflow/tfjs) npm package,
-which gives you both this Core API and the higher-level
-[Layers API](/tfjs-layers):
-
-```js
-import * as tf from '@tensorflow/tfjs';
-// You have the Core API: tf.matMul(), tf.softmax(), ...
-// You also have Layers API: tf.model(), tf.layers.dense(), ...
-```
-
-On the other hand, if you care about the bundle size and you do not use the
-Layers API, you can import only the Core API:
-
-```js
-import * as tfc from '@tensorflow/tfjs-core';
-// You have the Core API: tfc.matMul(), tfc.softmax(), ...
-// No Layers API.
-```
-
-For info about development, check out [DEVELOPMENT.md](/DEVELOPMENT.md).
-
-## For more information
-
-- [TensorFlow.js API documentation](https://js.tensorflow.org/api/latest/)
-- [TensorFlow.js Tutorials](https://js.tensorflow.org/tutorials/)
-
-Thanks <a href="https://www.browserstack.com/">BrowserStack</a> for providing testing support.

+ 0 - 387
rag-server/node_modules/@tensorflow/tfjs-core/benchmarks/index.html

@@ -1,387 +0,0 @@
-<!-- Copyright 2019 Google LLC. All Rights Reserved.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-==============================================================================-->
-
-<html>
-
-<head>
-  <title>TensorFlow.js Model Benchmark</title>
-  <link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
-  <link href="./main.css" rel="stylesheet">
-  <script src="https://cdnjs.cloudflare.com/ajax/libs/dat-gui/0.7.2/dat.gui.min.js"></script>
-</head>
-
-<body>
-  <h2>TensorFlow.js Model Benchmark</h2>
-  <div id="modal-msg"></div>
-  <div id="container">
-    <div id="stats">
-      <div class="box">
-        <pre id="env"></pre>
-      </div>
-      <table class="table" id="timings">
-        <thead>
-          <tr>
-            <th>Type</th>
-            <th>Value</th>
-          </tr>
-        </thead>
-        <tbody>
-        </tbody>
-      </table>
-      <div class="box" id="perf-trendline-container">
-        <div class="label">Inference times</div>
-        <div class="trendline">
-          <div class="yMax"></div>
-          <div class="yMin"></div>
-          <svg>
-            <path></path>
-          </svg>
-        </div>
-      </div>
-    </div>
-    <table class="table" id="kernels">
-      <thead id="kernels-thead">
-      </thead>
-      <tbody></tbody>
-    </table>
-  </div>
-  <script src="https://unpkg.com/@tensorflow/tfjs-core@latest/dist/tf-core.js"></script>
-  <script src="https://unpkg.com/@tensorflow/tfjs-layers@latest/dist/tf-layers.js"></script>
-  <script src="https://unpkg.com/@tensorflow/tfjs-converter@latest/dist/tf-converter.js"></script>
-  <script src="https://unpkg.com/@tensorflow/tfjs-backend-wasm@latest/dist/tf-backend-wasm.js"></script>
-  <script src="https://unpkg.com/@tensorflow/tfjs-automl@latest/dist/tf-automl.js"></script>
-  <script src="https://cdn.jsdelivr.net/npm/@tensorflow-models/universal-sentence-encoder"></script>
-  <script src="https://cdn.jsdelivr.net/npm/@tensorflow-models/posenet@2"></script>
-  <script src="https://cdn.jsdelivr.net/npm/@tensorflow-models/body-pix@2"></script>
-
-  <script src="./modelConfig.js"></script>
-  <script src="./util.js"></script>
-  <script>
-    'use strict';
-
-    const state = {
-      numRuns: 50,
-      benchmark: 'mobilenet_v2',
-      run: (v) => {
-        runBenchmark();
-      },
-      backend: 'wasm',
-      kernelTiming: 'aggregate',
-    };
-
-    const modalDiv = document.getElementById('modal-msg');
-    const timeTable = document.querySelector('#timings tbody');
-    const envDiv = document.getElementById('env');
-    const kernelsTableHead = document.getElementById('kernels-thead');
-    const kernelTable = document.querySelector('#kernels tbody');
-
-    let model, predict, chartWidth;
-
-    async function showMsg(message) {
-      if (message != null) {
-        modalDiv.innerHTML = message + '...';
-        modalDiv.style.display = 'block';
-      } else {
-        modalDiv.style.display = 'none';
-      }
-      await tf.nextFrame();
-      await tf.nextFrame();
-    }
-
-    function showVersions() {
-      envDiv.innerHTML = JSON.stringify({
-        core: tf.version_core,
-        layers: tf.version_layers,
-        converter: tf.version_converter
-      }, null, 2);
-    }
-
-    async function showEnvironment() {
-      await tf.time(() => tf.add(tf.tensor1d([1]), tf.tensor1d([1])).data());
-      envDiv.innerHTML += `<br/>${JSON.stringify(tf.env().features, null, 2)
-        } `;
-    }
-
-    async function setupTable() {
-      kernelsTableHead.innerText = '';
-      kernelTable.innerHTML = '';
-      await tf.nextFrame();
-      const rows = ['<b>Kernel</b>', '<b>Time(ms)</b>'];
-      if (state.kernelTiming === 'individual') {
-        rows.push('<b>Inputs</b>', '<b>Output</b>');
-        if (state.backend === 'webgl') {
-          rows.push('<b>GPUPrograms</b>');
-        }
-      }
-      appendRow(kernelsTableHead, ...rows);
-
-      await tf.nextFrame();
-    }
-
-    function appendRow(tbody, ...cells) {
-      const tr = document.createElement('tr');
-      cells.forEach(c => {
-        const td = document.createElement('td');
-        if (c instanceof HTMLElement) {
-          td.appendChild(c);
-        } else {
-          td.innerHTML = c;
-        }
-        tr.appendChild(td);
-      });
-      tbody.appendChild(tr);
-    }
-
-    async function warmUpAndRecordTime() {
-      await showMsg('Warming up');
-      const start = performance.now();
-      let res = predict(model);
-      if (res instanceof Promise) {
-        res = await res;
-      }
-
-      if (res instanceof tf.Tensor) {
-        const tmp = res;
-        res = await res.data();
-        tmp.dispose();
-      }
-
-      const elapsed = performance.now() - start;
-      await showMsg(null);
-      appendRow(timeTable, '1st inference', printTime(elapsed));
-    }
-
-    async function loadAndRecordTime(benchmark) {
-      await showMsg('Loading the model');
-      const start = performance.now();
-      if (benchmark.model == null) {
-        model = await benchmark.load();
-        benchmark.model = model;
-      } else {
-        model = benchmark.model;
-      }
-      predict = benchmark.predictFunc();
-
-      const elapsed = performance.now() - start;
-      await showMsg(null);
-
-      appendRow(timeTable, `<b> Benchmark:</b> ${state.benchmark} `,
-        `<b> Runs:</b> ${state.numRuns} `);
-
-      appendRow(timeTable, 'Model load', printTime(elapsed));
-    }
-
-    const chartHeight = 150;
-    function populateTrendline(node, data, forceYMinToZero = false, yFormatter = d => d) {
-      node.querySelector("svg").setAttribute("width", chartWidth);
-      node.querySelector("svg").setAttribute("height", chartHeight);
-
-      const yMax = Math.max(...data);
-      let yMin = forceYMinToZero ? 0 : Math.min(...data);
-      if (yMin === yMax) {
-        yMin = 0;
-      }
-
-      node.querySelector(".yMin").textContent = yFormatter(yMin);
-      node.querySelector(".yMax").textContent = yFormatter(yMax);
-
-      const xIncrement = chartWidth / (data.length - 1);
-      node.querySelector("path")
-        .setAttribute("d", `M${data.map((d, i) => `${i * xIncrement},${chartHeight - ((d - yMin) / (yMax - yMin)) * chartHeight}`).join('L')} `);
-    }
-
-    async function measureAveragePredictTime() {
-      await showMsg(`Running predict ${state.numRuns} times`);
-      chartWidth = document.querySelector("#perf-trendline-container").getBoundingClientRect().width;
-
-      const times = [];
-      const numLeakedTensors = [];
-
-      for (let i = 0; i < state.numRuns; i++) {
-        const start = performance.now();
-        const tensorsBefore = tf.memory().numTensors;
-        let res = predict(model);
-        if (res instanceof Promise) {
-          res = await res;
-        }
-
-        if (res instanceof tf.Tensor) {
-          const tmp = res;
-          res = await res.data();
-          tmp.dispose();
-        }
-
-        times.push(performance.now() - start);
-        const memInfo = tf.memory();
-        const leakedTensors = memInfo.numTensors - tensorsBefore;
-        numLeakedTensors.push(leakedTensors);
-      }
-
-      const forceInferenceTrendYMinToZero = true;
-      populateTrendline(document.querySelector("#perf-trendline-container"), times, forceInferenceTrendYMinToZero, printTime);
-
-      await showMsg(null);
-      const average = times.reduce((acc, curr) => acc + curr, 0) / times.length;
-      const min = Math.min(...times);
-      appendRow(timeTable, `Subsequent average(${state.numRuns} runs)`, printTime(average));
-      appendRow(timeTable, 'Best time', printTime(min));
-      appendRow(timeTable, 'Leaked tensors', numLeakedTensors[0]);
-    }
-
-    async function profileMemory() {
-      await showMsg('Profile memory');
-      const start = performance.now();
-      let res;
-      const data = await tf.profile(() => res = predict(model));
-      if (res instanceof Promise) {
-        res = await res;
-      }
-
-      if (res instanceof tf.Tensor) {
-        const tmp = res;
-        res = await res.data();
-        tmp.dispose();
-      }
-      const elapsed = performance.now() - start;
-      await showMsg(null);
-      appendRow(timeTable, 'Peak memory', printMemory(data.peakBytes));
-      appendRow(timeTable, '2nd inference', printTime(elapsed));
-    }
-
-    function showKernelTime(kernels) {
-      const tbody = document.querySelector('#kernels tbody');
-      if (state.kernelTiming === 'individual') {
-        kernels.forEach(k => {
-          const nameSpan = document.createElement('span');
-          nameSpan.setAttribute('title', k.scopes.slice(0, -1).join(' --> '));
-          nameSpan.textContent = k.scopes[k.scopes.length - 1];
-          appendRow(tbody, nameSpan, k.time.toFixed(2), k.inputs, k.output, k.gpuProgramsInfo);
-        });
-      } else {
-        const kernelTotalTime = {};
-        kernels.forEach(k => {
-          const kernelName = k.scopes[0];
-          if (kernelTotalTime[kernelName] == null) {
-            kernelTotalTime[kernelName] = 0;
-          }
-          kernelTotalTime[kernelName] += k.time;
-        });
-
-        const result = Object.keys(kernelTotalTime)
-            .map(k => [k, kernelTotalTime[k]])
-            .sort((a, b) => b[1] - a[1]);
-        result.forEach(r => {
-          const nameSpan = document.createElement('span');
-          nameSpan.setAttribute('title', r[0]);
-          nameSpan.textContent = r[0];
-          appendRow(tbody, nameSpan, r[1].toFixed(2));
-        });
-      }
-    }
-
-    async function profileKernelTime() {
-      await showMsg('Profiling kernels');
-      _tfengine.ENV.set('DEBUG', true);
-      const oldLog = console.log;
-      let kernels = [];
-      console.log = msg => {
-        let parts = [];
-        if (typeof msg === 'string') {
-          parts = msg.split('\t').map(x => x.slice(2));
-        }
-
-        if (parts.length > 2) {
-          // heuristic for determining whether we've caught a profiler
-          // log statement as opposed to a regular console.log
-          // TODO(https://github.com/tensorflow/tfjs/issues/563): return timing information as part of tf.profile
-          const scopes = parts[0].trim()
-            .split('||')
-            .filter(s => s !== 'unnamed scope');
-          kernels.push({
-            scopes: scopes,
-            time: Number.parseFloat(parts[1]),
-            output: parts[2].trim(),
-            inputs: parts[4],
-            gpuProgramsInfo: parts[5]
-          });
-        } else {
-          oldLog.call(oldLog, msg);
-        }
-      }
-      let res = predict(model);
-      if (res instanceof Promise) {
-        res = await res;
-      }
-
-      if (res instanceof tf.Tensor) {
-        const tmp = res;
-        res = await res.data();
-        tmp.dispose();
-      }
-
-      await showMsg(null);
-      await sleep(10);
-      kernels = kernels.sort((a, b) => b.time - a.time);
-      appendRow(timeTable, 'Number of kernels', kernels.length);
-
-      // Add an empty row at the end of a benchmark run
-      appendRow(timeTable, '', '');
-      showKernelTime(kernels);
-      _tfengine.ENV.set('DEBUG', false);
-      // Switch back to the old log;
-      console.log = oldLog;
-    }
-
-    async function runBenchmark() {
-      const benchmark = benchmarks[state.benchmark];
-      await setupTable();
-      await loadAndRecordTime(benchmark);
-      await warmUpAndRecordTime();
-      await showMsg('Waiting for GC');
-      await sleep(1000);
-      await profileMemory();
-      await sleep(200);
-      await measureAveragePredictTime();
-      await sleep(200);
-      if (state.backend != 'webgl' || queryTimerIsEnabled()) {
-        await profileKernelTime();
-      } else {
-        showMsg('Skipping kernel times since query timer extension is not ' +
-          'available. <br/> Use Chrome 70+.');
-      };
-    }
-
-    async function onPageLoad() {
-      var gui = new dat.gui.GUI();
-
-      await tf.setBackend(state.backend);
-
-      gui.add(state, 'numRuns');
-      gui.add(state, 'benchmark', Object.keys(benchmarks));
-      gui.add(state, 'backend', ['wasm', 'webgl', 'cpu']).onChange(backend => {
-        tf.setBackend(backend);
-      });
-      gui.add(state, 'kernelTiming', ['aggregate', 'individual']);
-      gui.add(state, 'run');
-
-      showVersions();
-      await showEnvironment();
-    }
-
-    onPageLoad();
-  </script>
-</body>
-
-</html>

+ 0 - 137
rag-server/node_modules/@tensorflow/tfjs-core/benchmarks/main.css

@@ -1,137 +0,0 @@
-/**
-* @license
-* Copyright 2019 Google LLC. All Rights Reserved.
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-* =============================================================================
-*/
-
-html,
-body {
-  font-family: 'Roboto', sans-serif;
-  font-size: 13px;
-  display: flex;
-  flex-direction: column;
-  box-sizing: border-box;
-  position: relative;
-}
-
-body {
-  margin: 20px 100px;
-}
-
-h2 {
-  margin-bottom: 30px;
-}
-
-#kernels {
-  max-width: 750px;
-}
-
-#container {
-  display: flex;
-  flex-direction: row;
-  flex-wrap: wrap;
-}
-
-.box {
-  margin-right: 30px;
-  margin-bottom: 30px;
-}
-
-.box pre {
-  margin: 0;
-  border: 1px solid #ccc;
-  padding: 8px;
-  font-size: 10px;
-}
-
-div[id*='trendline-container'] svg {
-  overflow: visible;
-  border-bottom: 1px solid #ccc;
-  border-left: 1px solid #ccc;
-}
-
-div[id*='trendline-container'] .label {
-  font-size: 14px;
-  font-weight: bold;
-}
-
-div[id*='trendline-container'] path {
-  fill: none;
-  stroke: #222;
-}
-
-.trendline {
-  position: relative;
-  margin-top: 20px;
-}
-
-.trendline .yMax,
-.trendline .yMin {
-  position: absolute;
-  right: calc(100% + 6px);
-  font-size: 11px;
-  white-space: nowrap;
-}
-
-.trendline .yMin {
-  bottom: 0;
-}
-
-.trendline .yMax {
-  top: 0;
-}
-
-#modal-msg {
-  border-radius: 5px;
-  background-color: black;
-  color: white;
-  padding: 7px;
-  top: 15px;
-  left: 45%;
-  display: none;
-  position: absolute;
-}
-
-.table {
-  margin-right: 30px;
-  margin-bottom: 30px;
-  border: 1px solid #ccc;
-  border-collapse: collapse;
-  border-spacing: 0;
-}
-
-.table tr {
-  border-bottom: 1px solid #ddd;
-}
-
-.table tr:nth-child(even) {
-  background-color: #f1f1f1;
-}
-
-.table th {
-  font-weight: bold;
-}
-
-.table td,
-th {
-  padding: 8px 8px;
-  font-size: 13px;
-  text-align: left;
-  vertical-align: top;
-}
-
-.table td:first-child,
-th:first-child {
-  padding-left: 16px;
-}

+ 0 - 200
rag-server/node_modules/@tensorflow/tfjs-core/benchmarks/modelConfig.js

@@ -1,200 +0,0 @@
-/**
- * @license
- * Copyright 2019 Google LLC. All Rights Reserved.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * =============================================================================
- */
-
-const sentences = [
-  'add clem burke in my playlist Pre-Party R&B Jams',
-  'Add Live from Aragon Ballroom to Trapeo',
-  'add Unite and Win to my night out',
-  'Add track to my Digster Future Hits',
-  'add the piano bar to my Cindy Wilson',
-  'Add Spanish Harlem Incident to cleaning the house',
-  'add The Greyest of Blue Skies in Indie Español my playlist',
-  'Add the name kids in the street to the plylist New Indie Mix',
-  'add album radar latino',
-  'Add Tranquility to the Latin Pop Rising playlist.',
-  'play something from the twenties',
-  'Play The View From The Afternoon by Malese Jow on Last Fm',
-  'play songs by Sammy Fain',
-  'Play music from the year 1964',
-  'Play the heinz strobl ep from 2016 on Groove Shark',
-  'Play me Leonid Soybelman on Vimeo.',
-  'Play a song from my workout playlist on Groove Shark',
-  'play some Alte Kameraden music',
-  'Will it be warm 1 week from now in DC',
-  'what is the forecast for temperate conditions in Thailand in Lopeno',
-  'Is the weather colder in Costa Rica',
-  'Will it be colder in Delaware?',
-  '"I need to know the weather for Hamorton, TN"',
-  'What will the weather be in Albania at 11:56.',
-  'Is it going to hail in Mount San Jacinto State Park',
-  'What\'s the forecast for Walker Bay Nature Reserve for next year ? ',
-  'is it supposed to be sunny here?',
-  'in California will it be cold in East Trenton Heights',
-  'What is the weather like in Wallis and Futuna? What will the weather be in Romania at 4?',
-  'What is the weather going to be like in Reidland New Mexico next Jun.?',
-  'How cold is it in Cargray, Argentina?',
-  'Is the forecast chillier in 1 hour in Mali',
-  'Tell me if there will be wind in NE Will it be cloudy not far  from Allenton Will there be a blizzard in AR what is the New Caledonia forecast for Bagnell on sep. the 5th Weather for apr. the thirteenth in Djibouti',
-  'Can you give me the weather forecast in Tajikistan? How cold is it going to be in San Marcial, AK in one second? What will the weather be in a month from now at my current location?',
-  'What is the weather like in IA in april How windy is it in Anderson Lake State Fish and Wildlife Area? Is it going to be stormy in Austin Creek State Recreation Area at 09:42?',
-  'When will the weather be temperate like it is now in Stansbury Park in Tuvalu, What is the weather in neighboring OH, What\'s the weather forecast for Spain ? ',
-  'Play the music Hands Up',
-  'Play some twenties theme music on Google Music.',
-  'How will the weather be in New Mexico around 00:09:07 am?',
-  'What will the humidity be in AR in 49 weeks and a half from now',
-  'Is it humid in Parc national de Killarney',
-  'is it supposed to get colder here on 12/28/2019',
-  'How is the forecast for OK?',
-  'what is the Posey Island State Park forecast for colder temps at meal time',
-  'Is it supposed to be chilly in Kuwait?',
-  'Tell me if it\'ll be chilly here at 0 pm',
-  'what is the forecast for colder conditions within the same area of this current place',
-  'Will it hail today in West Point at 11:36:48',
-  'Is it overcast in South Carolina',
-  'Will the sun be out close-by Admiralty Island National Monument?',
-  'What will the weather be in Wakarusa',
-  'How temperate will it be here this week?',
-  'what is the forecast for here at tea time',
-];
-
-const benchmarks = {
-  'mobilenet_v2': {
-    load: async () => {
-      const url =
-          'https://storage.googleapis.com/learnjs-data/mobilenet_v2_100_fused/model.json';
-      return tf.loadGraphModel(url);
-    },
-    predictFunc: () => {
-      const zeros = tf.zeros([1, 224, 224, 3]);
-      return model => model.predict(zeros);
-    }
-  },
-  'mesh_128': {
-    load: async () => {
-      const url =
-          'https://storage.googleapis.com/learnjs-data/mesh_128_shift30_fixed_batch/model.json';
-      return tf.loadGraphModel(url);
-    },
-    predictFunc: () => {
-      const zeros = tf.zeros([1, 128, 128, 3]);
-      return model => {
-        return model.predict(zeros)[0];
-      };
-    },
-  },
-  'face_detector': {
-    load: async () => {
-      const url =
-          'https://storage.googleapis.com/learnjs-data/face_detector_front/model.json';
-      return tf.loadGraphModel(url);
-    },
-    predictFunc: () => {
-      const zeros = tf.zeros([1, 128, 128, 3]);
-      return model => {
-        return model.predict(zeros);
-      };
-    },
-  },
-  'AutoML Image': {
-    load: async () => {
-      const url =
-          'https://storage.googleapis.com/tfjs-testing/tfjs-automl/img_classification/model.json';
-      return tf.automl.loadImageClassification(url);
-    },
-    predictFunc: () => {
-      const zeros = tf.zeros([224, 224, 3]);
-      return model => model.classify(zeros);
-    }
-  },
-  'AutoML Object': {
-    load: async () => {
-      const url =
-          'https://storage.googleapis.com/tfjs-testing/tfjs-automl/object_detection/model.json';
-      return tf.automl.loadObjectDetection(url);
-    },
-    predictFunc: () => {
-      const zeros = tf.zeros([224, 224, 3]);
-      return model => model.detect(zeros);
-    }
-  },
-  'USE - batchsize 30': {
-    load: async () => {
-      return use.load();
-    },
-    predictFunc: () => {
-      const sentences30 = sentences.slice(0, 30);
-      return async model => {
-        const res = await model.embed(sentences30);
-        return await res.data();
-      }
-    }
-  },
-  'USE - batchsize 1': {
-    load: async () => {
-      return use.load();
-    },
-    predictFunc: () => {
-      let nextIdx = 0;
-
-      return async model => {
-        const next = [sentences[(nextIdx % sentences.length)]];
-        const res = await model.embed(next);
-        nextIdx += 1;
-        return await res.data();
-      }
-    }
-  },
-  'posenet': {
-    load: async () => {
-      const model = await posenet.load();
-      model.image = await loadImage('tennis_standing.jpg');
-      return model;
-    },
-    predictFunc: () => {
-      return async model => {
-        return model.estimateSinglePose(model.image);
-      }
-    }
-  },
-  'bodypix': {
-    load: async () => {
-      const model = await bodyPix.load();
-      model.image = await loadImage('tennis_standing.jpg');
-      return model;
-    },
-    predictFunc: () => {
-      return async model => {
-        return model.segmentPerson(model.image);
-      }
-    }
-  },
-};
-
-const imageBucket =
-    'https://storage.googleapis.com/tfjs-models/assets/posenet/';
-async function loadImage(imagePath) {
-  const image = new Image();
-  const promise = new Promise((resolve, reject) => {
-    image.crossOrigin = '';
-    image.onload = () => {
-      resolve(image);
-    };
-  });
-
-  image.src = `${imageBucket}${imagePath}`;
-  return promise;
-}

+ 0 - 39
rag-server/node_modules/@tensorflow/tfjs-core/benchmarks/util.js

@@ -1,39 +0,0 @@
-/**
- * @license
- * Copyright 2019 Google LLC. All Rights Reserved.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * =============================================================================
- */
-
-function printTime(elapsed) {
-  return elapsed.toFixed(1) + ' ms';
-}
-
-function printMemory(bytes) {
-  if (bytes < 1024) {
-    return bytes + ' B';
-  } else if (bytes < 1024 * 1024) {
-    return (bytes / 1024).toFixed(2) + ' KB';
-  } else {
-    return (bytes / (1024 * 1024)).toFixed(2) + ' MB';
-  }
-}
-
-function sleep(timeMs) {
-  return new Promise(resolve => setTimeout(resolve, timeMs));
-}
-
-function queryTimerIsEnabled() {
-  return _tfengine.ENV.getNumber(
-             'WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION') > 0;
-}

+ 0 - 80
rag-server/node_modules/@tensorflow/tfjs-core/cloudbuild.yml

@@ -1,80 +0,0 @@
-steps:
-# Install common dependencies.
-- name: 'node:10'
-  id: 'yarn-common'
-  entrypoint: 'yarn'
-  args: ['install']
-
-# Install tfjs-core dependencies.
-- name: 'node:10'
-  dir: 'tfjs-core'
-  id: 'yarn'
-  entrypoint: 'yarn'
-  args: ['install']
-  waitFor: ['yarn-common']
-
-# Build
-- name: 'node:10'
-  dir: 'tfjs-core'
-  id: 'build'
-  entrypoint: 'yarn'
-  args: ['build-ci']
-  waitFor: ['yarn']
-
-# Run unit tests.
-- name: 'node:10'
-  dir: 'tfjs-core'
-  id: 'test'
-  entrypoint: 'yarn'
-  args: ['test-ci']
-  waitFor: ['build']
-  env: ['BROWSERSTACK_USERNAME=deeplearnjs1']
-  secretEnv: ['BROWSERSTACK_KEY']
-
-# Run unit tests in react native.
-- name: 'node:10'
-  dir: 'tfjs-react-native/integration_rn59'
-  id: 'react-native-from-core'
-  entrypoint: 'yarn'
-  args: ['test-ci', 'use-core-build']
-  waitFor: ['build']
-  env: ['BROWSERSTACK_USERNAME=deeplearnjs1']
-  secretEnv: ['BROWSERSTACK_KEY']
-
-# bundle size check
-- name: 'node:10'
-  dir: 'tfjs-core'
-  id: 'test-bundle-size'
-  entrypoint: 'yarn'
-  args: ['test-bundle-size']
-  waitFor: ['yarn']
-
-# test doc snippets
-- name: 'node:10'
-  dir: 'tfjs-core'
-  id: 'test-snippets'
-  entrypoint: 'yarn'
-  args: ['test-snippets']
-  waitFor: ['yarn']
-
-# test Async backends
-- name: 'node:10'
-  dir: 'tfjs-core'
-  id: 'test-async-backends'
-  entrypoint: 'yarn'
-  args: ['test-async-backends-ci']
-  waitFor: ['build']
-
-# General configuration
-secrets:
-- kmsKeyName: projects/learnjs-174218/locations/global/keyRings/tfjs/cryptoKeys/enc
-  secretEnv:
-    BROWSERSTACK_KEY: CiQAkwyoIW0LcnxymzotLwaH4udVTQFBEN4AEA5CA+a3+yflL2ASPQAD8BdZnGARf78MhH5T9rQqyz9HNODwVjVIj64CTkFlUCGrP1B2HX9LXHWHLmtKutEGTeFFX9XhuBzNExA=
-timeout: 1800s
-logsBucket: 'gs://tfjs-build-logs'
-substitutions:
-  _NIGHTLY: ''
-options:
-  logStreamingOption: 'STREAM_ON'
-  machineType: 'N1_HIGHCPU_8'
-  substitution_option: 'ALLOW_LOOSE'

+ 0 - 46
rag-server/node_modules/@tensorflow/tfjs-core/dist/backends/array_util.d.ts

@@ -1,46 +0,0 @@
-/**
- * @license
- * Copyright 2019 Google LLC. All Rights Reserved.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * =============================================================================
- */
-/**
- * Inserts a value into a sorted array. This method allows duplicate, meaning it
- * allows inserting duplicate value, in which case, the element will be inserted
- * at the lowest index of the value.
- * @param arr The array to modify.
- * @param element The element to insert.
- * @param comparator Optional. If no comparator is specified, elements are
- * compared using array_util.defaultComparator, which is suitable for Strings
- * and Numbers in ascending arrays. If the array contains multiple instances of
- * the target value, the left-most instance will be returned. To provide a
- * comparator, it should take 2 arguments to compare and return a negative,
- * zero, or a positive number.
- */
-export declare function binaryInsert<T>(arr: T[], element: T, comparator?: (a: T, b: T) => number): void;
-/**
- * Searches the array for the target using binary search, returns the index
- * of the found element, or position to insert if element not found. If no
- * comparator is specified, elements are compared using array_
- * util.defaultComparator, which is suitable for Strings and Numbers in
- * ascending arrays. If the array contains multiple instances of the target
- * value, the left-most instance will be returned.
- * @param arr The array to be searched in.
- * @param target The target to be searched for.
- * @param comparator Should take 2 arguments to compare and return a negative,
- *    zero, or a positive number.
- * @return Lowest index of the target value if found, otherwise the insertion
- *    point where the target should be inserted, in the form of
- *    (-insertionPoint - 1).
- */
-export declare function binarySearch<T>(arr: T[], target: T, comparator?: (a: T, b: T) => number): number;

+ 0 - 87
rag-server/node_modules/@tensorflow/tfjs-core/dist/backends/array_util.js

@@ -1,87 +0,0 @@
-"use strict";
-/**
- * @license
- * Copyright 2019 Google LLC. All Rights Reserved.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * =============================================================================
- */
-Object.defineProperty(exports, "__esModule", { value: true });
-/**
- * Inserts a value into a sorted array. This method allows duplicate, meaning it
- * allows inserting duplicate value, in which case, the element will be inserted
- * at the lowest index of the value.
- * @param arr The array to modify.
- * @param element The element to insert.
- * @param comparator Optional. If no comparator is specified, elements are
- * compared using array_util.defaultComparator, which is suitable for Strings
- * and Numbers in ascending arrays. If the array contains multiple instances of
- * the target value, the left-most instance will be returned. To provide a
- * comparator, it should take 2 arguments to compare and return a negative,
- * zero, or a positive number.
- */
-function binaryInsert(arr, element, comparator) {
-    var index = binarySearch(arr, element, comparator);
-    var insertionPoint = index < 0 ? -(index + 1) : index;
-    arr.splice(insertionPoint, 0, element);
-}
-exports.binaryInsert = binaryInsert;
-/**
- * Searches the array for the target using binary search, returns the index
- * of the found element, or position to insert if element not found. If no
- * comparator is specified, elements are compared using array_
- * util.defaultComparator, which is suitable for Strings and Numbers in
- * ascending arrays. If the array contains multiple instances of the target
- * value, the left-most instance will be returned.
- * @param arr The array to be searched in.
- * @param target The target to be searched for.
- * @param comparator Should take 2 arguments to compare and return a negative,
- *    zero, or a positive number.
- * @return Lowest index of the target value if found, otherwise the insertion
- *    point where the target should be inserted, in the form of
- *    (-insertionPoint - 1).
- */
-function binarySearch(arr, target, comparator) {
-    return binarySearch_(arr, target, comparator || defaultComparator);
-}
-exports.binarySearch = binarySearch;
-/**
- * Compares its two arguments for order.
- * @param a The first element to be compared.
- * @param b The second element to be compared.
- * @return A negative number, zero, or a positive number as the first
- *     argument is less than, equal to, or greater than the second.
- */
-function defaultComparator(a, b) {
-    return a > b ? 1 : a < b ? -1 : 0;
-}
-function binarySearch_(arr, target, comparator) {
-    var left = 0;
-    var right = arr.length;
-    var middle = 0;
-    var found = false;
-    while (left < right) {
-        middle = left + ((right - left) >>> 1);
-        var compareResult = comparator(target, arr[middle]);
-        if (compareResult > 0) {
-            left = middle + 1;
-        }
-        else {
-            right = middle;
-            // If compareResult is 0, the value is found. We record it is found,
-            // and then keep looking because there may be duplicate.
-            found = !compareResult;
-        }
-    }
-    return found ? left : -left - 1;
-}
-//# sourceMappingURL=array_util.js.map

+ 0 - 1
rag-server/node_modules/@tensorflow/tfjs-core/dist/backends/array_util.js.map

@@ -1 +0,0 @@
-{"version":3,"file":"array_util.js","sourceRoot":"","sources":["../../src/backends/array_util.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;AAEH;;;;;;;;;;;;GAYG;AACH,SAAgB,YAAY,CACxB,GAAQ,EAAE,OAAU,EAAE,UAAmC;IAC3D,IAAM,KAAK,GAAG,YAAY,CAAC,GAAG,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;IACrD,IAAM,cAAc,GAAG,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IACxD,GAAG,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC,EAAE,OAAO,CAAC,CAAC;AACzC,CAAC;AALD,oCAKC;AAED;;;;;;;;;;;;;;GAcG;AACH,SAAgB,YAAY,CACxB,GAAQ,EAAE,MAAS,EAAE,UAAmC;IAC1D,OAAO,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,IAAI,iBAAiB,CAAC,CAAC;AACrE,CAAC;AAHD,oCAGC;AAED;;;;;;GAMG;AACH,SAAS,iBAAiB,CAAI,CAAI,EAAE,CAAI;IACtC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACpC,CAAC;AAED,SAAS,aAAa,CAClB,GAAQ,EAAE,MAAS,EAAE,UAAkC;IACzD,IAAI,IAAI,GAAG,CAAC,CAAC;IACb,IAAI,KAAK,GAAG,GAAG,CAAC,MAAM,CAAC;IACvB,IAAI,MAAM,GAAG,CAAC,CAAC;IACf,IAAI,KAAK,GAAG,KAAK,CAAC;IAClB,OAAO,IAAI,GAAG,KAAK,EAAE;QACnB,MAAM,GAAG,IAAI,GAAG,CAAC,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;QACvC,IAAM,aAAa,GAAG,UAAU,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;QACtD,IAAI,aAAa,GAAG,CAAC,EAAE;YACrB,IAAI,GAAG,MAAM,GAAG,CAAC,CAAC;SACnB;aAAM;YACL,KAAK,GAAG,MAAM,CAAC;YACf,oEAAoE;YACpE,wDAAwD;YACxD,KAAK,GAAG,CAAC,aAAa,CAAC;SACxB;KACF;IAED,OAAO,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC;AAClC,CAAC"}

+ 0 - 17
rag-server/node_modules/@tensorflow/tfjs-core/dist/backends/array_util_test.d.ts

@@ -1,17 +0,0 @@
-/**
- * @license
- * Copyright 2019 Google LLC. All Rights Reserved.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * =============================================================================
- */
-export {};

文件差异内容过多而无法显示
+ 0 - 0
rag-server/node_modules/@tensorflow/tfjs-core/dist/backends/array_util_test.js.map


+ 0 - 225
rag-server/node_modules/@tensorflow/tfjs-core/dist/backends/backend.d.ts

@@ -1,225 +0,0 @@
-/**
- * @license
- * Copyright 2018 Google Inc. All Rights Reserved.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * =============================================================================
- */
-import { Conv2DInfo, Conv3DInfo } from '../ops/conv_util';
-import { FusedBatchMatMulConfig, FusedConv2DConfig } from '../ops/fused_util';
-import { Backend, DataId, Scalar, Tensor, Tensor1D, Tensor2D, Tensor3D, Tensor4D, Tensor5D } from '../tensor';
-import { BackendValues, DataType, Rank, ShapeMap } from '../types';
-export declare const EPSILON_FLOAT32 = 1e-7;
-export declare const EPSILON_FLOAT16 = 0.0001;
-export interface BackendTimingInfo {
-    kernelMs: number | {
-        error: string;
-    };
-    getExtraProfileInfo?(): string;
-}
-export interface TensorStorage {
-    read(dataId: DataId): Promise<BackendValues>;
-    readSync(dataId: DataId): BackendValues;
-    disposeData(dataId: DataId): void;
-    write(values: BackendValues, shape: number[], dtype: DataType): DataId;
-    move(dataId: DataId, values: BackendValues, shape: number[], dtype: DataType): void;
-    memory(): {
-        unreliable: boolean;
-    };
-    /** Returns number of data ids currently in the storage. */
-    numDataIds(): number;
-}
-/** Convenient class for storing tensor-related data. */
-export declare class DataStorage<T> {
-    private backend;
-    private dataMover;
-    private data;
-    private dataIdsCount;
-    constructor(backend: KernelBackend, dataMover: DataMover);
-    get(dataId: DataId): T;
-    set(dataId: DataId, value: T): void;
-    has(dataId: DataId): boolean;
-    delete(dataId: DataId): boolean;
-    numDataIds(): number;
-}
-export interface DataMover {
-    /**
-     * To be called by backends whenever they see a dataId that they don't own.
-     * Upon calling this method, the mover will fetch the tensor from another
-     * backend and register it with the current active backend.
-     */
-    moveData(backend: KernelBackend, dataId: DataId): void;
-}
-export interface BackendTimer {
-    time(f: () => void): Promise<BackendTimingInfo>;
-}
-/**
- * The interface that defines the kernels that should be implemented when
- * adding a new backend. New backends don't need to implement every one of the
- * methods, this can be done gradually (throw an error for unimplemented
- * methods).
- */
-export declare class KernelBackend implements TensorStorage, Backend, BackendTimer {
-    time(f: () => void): Promise<BackendTimingInfo>;
-    read(dataId: object): Promise<BackendValues>;
-    readSync(dataId: object): BackendValues;
-    numDataIds(): number;
-    disposeData(dataId: object): void;
-    write(values: BackendValues, shape: number[], dtype: DataType): DataId;
-    move(dataId: DataId, values: BackendValues, shape: number[], dtype: DataType): void;
-    memory(): {
-        unreliable: boolean;
-        reasons?: string[];
-    };
-    /** Returns the highest precision for floats in bits (e.g. 16 or 32) */
-    floatPrecision(): 16 | 32;
-    /** Returns the smallest representable number.  */
-    epsilon(): number;
-    batchMatMul(a: Tensor3D, b: Tensor3D, transposeA: boolean, transposeB: boolean): Tensor3D;
-    fusedBatchMatMul({ a, b, transposeA, transposeB, bias, activation, preluActivationWeights }: FusedBatchMatMulConfig): Tensor3D;
-    slice<T extends Tensor>(x: T, begin: number[], size: number[]): T;
-    stridedSlice<T extends Tensor>(x: T, begin: number[], end: number[], strides: number[]): T;
-    unstack(x: Tensor, axis: number): Tensor[];
-    reverse<T extends Tensor>(a: T, axis: number[]): T;
-    concat(tensors: Tensor[], axis: number): Tensor;
-    neg<T extends Tensor>(a: T): T;
-    add(a: Tensor, b: Tensor): Tensor;
-    addN<T extends Tensor>(tensors: T[]): T;
-    subtract(a: Tensor, b: Tensor): Tensor;
-    multiply(a: Tensor, b: Tensor): Tensor;
-    realDivide(a: Tensor, b: Tensor): Tensor;
-    floorDiv(a: Tensor, b: Tensor): Tensor;
-    sum(x: Tensor, axes: number[]): Tensor;
-    prod(x: Tensor, axes: number[]): Tensor;
-    unsortedSegmentSum<T extends Tensor>(x: T, segmentIds: Tensor1D, numSegments: number): Tensor;
-    argMin(x: Tensor, axis: number): Tensor;
-    argMax(x: Tensor, axis: number): Tensor;
-    equal(a: Tensor, b: Tensor): Tensor;
-    notEqual(a: Tensor, b: Tensor): Tensor;
-    less(a: Tensor, b: Tensor): Tensor;
-    lessEqual(a: Tensor, b: Tensor): Tensor;
-    greater(a: Tensor, b: Tensor): Tensor;
-    greaterEqual(a: Tensor, b: Tensor): Tensor;
-    logicalNot<T extends Tensor>(a: T): T;
-    logicalAnd(a: Tensor, b: Tensor): Tensor;
-    logicalOr(a: Tensor, b: Tensor): Tensor;
-    where(condition: Tensor): Tensor2D;
-    select(condition: Tensor, a: Tensor, b: Tensor): Tensor;
-    topk<T extends Tensor>(x: T, k: number, sorted: boolean): [T, T];
-    min(x: Tensor, axes: number[]): Tensor;
-    minimum(a: Tensor, b: Tensor): Tensor;
-    mod(a: Tensor, b: Tensor): Tensor;
-    max(x: Tensor, axes: number[]): Tensor;
-    maximum(a: Tensor, b: Tensor): Tensor;
-    all(x: Tensor, axes: number[]): Tensor;
-    any(x: Tensor, axes: number[]): Tensor;
-    squaredDifference(a: Tensor, b: Tensor): Tensor;
-    ceil<T extends Tensor>(x: T): T;
-    floor<T extends Tensor>(x: T): T;
-    round<T extends Tensor>(x: T): T;
-    sign<T extends Tensor>(x: T): T;
-    isNaN<T extends Tensor>(x: T): T;
-    isInf<T extends Tensor>(x: T): T;
-    isFinite<T extends Tensor>(x: T): T;
-    pow<T extends Tensor>(a: T, b: Tensor): T;
-    exp<T extends Tensor>(x: T): T;
-    expm1<T extends Tensor>(x: T): T;
-    softmax<T extends Tensor>(x: T, dim: number): T;
-    log<T extends Tensor>(x: T): T;
-    log1p<T extends Tensor>(x: T): T;
-    sqrt<T extends Tensor>(x: T): T;
-    rsqrt<T extends Tensor>(x: T): T;
-    square<T extends Tensor>(x: T): T;
-    reciprocal<T extends Tensor>(x: T): T;
-    relu<T extends Tensor>(x: T): T;
-    relu6<T extends Tensor>(x: T): T;
-    prelu<T extends Tensor>(x: T, a: T): T;
-    elu<T extends Tensor>(x: T): T;
-    eluDer<T extends Tensor>(dy: T, y: T): T;
-    selu<T extends Tensor>(x: T): T;
-    int<T extends Tensor>(x: T): T;
-    clip<T extends Tensor>(x: T, min: number, max: number): T;
-    abs<T extends Tensor>(x: T): T;
-    complexAbs<T extends Tensor>(x: T): T;
-    sigmoid<T extends Tensor>(x: T): T;
-    softplus<T extends Tensor>(x: T): T;
-    sin<T extends Tensor>(x: T): T;
-    cos<T extends Tensor>(x: T): T;
-    tan<T extends Tensor>(x: T): T;
-    asin<T extends Tensor>(x: T): T;
-    acos<T extends Tensor>(x: T): T;
-    atan<T extends Tensor>(x: T): T;
-    atan2<T extends Tensor>(a: T, b: T): T;
-    sinh<T extends Tensor>(x: T): T;
-    cosh<T extends Tensor>(x: T): T;
-    tanh<T extends Tensor>(x: T): T;
-    asinh<T extends Tensor>(x: T): T;
-    acosh<T extends Tensor>(x: T): T;
-    atanh<T extends Tensor>(x: T): T;
-    erf<T extends Tensor>(x: T): T;
-    step<T extends Tensor>(x: T, alpha: number): T;
-    fusedConv2d({ input, filter, convInfo, bias, activation, preluActivationWeights }: FusedConv2DConfig): Tensor4D;
-    conv2d(x: Tensor4D, filter: Tensor4D, convInfo: Conv2DInfo): Tensor4D;
-    conv2dDerInput(dy: Tensor4D, filter: Tensor4D, convInfo: Conv2DInfo): Tensor4D;
-    conv2dDerFilter(x: Tensor4D, dY: Tensor4D, convInfo: Conv2DInfo): Tensor4D;
-    fusedDepthwiseConv2D({ input, filter, convInfo, bias, activation, preluActivationWeights }: FusedConv2DConfig): Tensor4D;
-    depthwiseConv2D(input: Tensor4D, filter: Tensor4D, convInfo: Conv2DInfo): Tensor4D;
-    depthwiseConv2DDerInput(dy: Tensor4D, filter: Tensor4D, convInfo: Conv2DInfo): Tensor4D;
-    depthwiseConv2DDerFilter(x: Tensor4D, dY: Tensor4D, convInfo: Conv2DInfo): Tensor4D;
-    conv3d(x: Tensor5D, filter: Tensor5D, convInfo: Conv3DInfo): Tensor5D;
-    conv3dDerInput(dy: Tensor5D, filter: Tensor5D, convInfo: Conv3DInfo): Tensor5D;
-    conv3dDerFilter(x: Tensor5D, dY: Tensor5D, convInfo: Conv3DInfo): Tensor5D;
-    maxPool(x: Tensor4D, convInfo: Conv2DInfo): Tensor4D;
-    maxPoolBackprop(dy: Tensor4D, x: Tensor4D, y: Tensor4D, convInfo: Conv2DInfo): Tensor4D;
-    avgPool(x: Tensor4D, convInfo: Conv2DInfo): Tensor4D;
-    avgPoolBackprop(dy: Tensor4D, x: Tensor4D, convInfo: Conv2DInfo): Tensor4D;
-    avgPool3d(x: Tensor5D, convInfo: Conv3DInfo): Tensor5D;
-    avgPool3dBackprop(dy: Tensor5D, x: Tensor5D, convInfo: Conv3DInfo): Tensor5D;
-    maxPool3d(x: Tensor5D, convInfo: Conv3DInfo): Tensor5D;
-    maxPool3dBackprop(dy: Tensor5D, x: Tensor5D, y: Tensor5D, convInfo: Conv3DInfo): Tensor5D;
-    reshape<T extends Tensor, R extends Rank>(x: T, shape: ShapeMap[R]): Tensor<R>;
-    cast<T extends Tensor>(x: T, dtype: DataType): T;
-    tile<T extends Tensor>(x: T, reps: number[]): T;
-    pad<T extends Tensor>(x: T, paddings: Array<[number, number]>, constantValue: number): T;
-    transpose<T extends Tensor>(x: T, perm: number[]): T;
-    gather<T extends Tensor>(x: T, indices: Tensor1D, axis: number): T;
-    gatherND(x: Tensor, indices: Tensor): Tensor;
-    scatterND<R extends Rank>(indices: Tensor, updates: Tensor, shape: ShapeMap[R]): Tensor<R>;
-    batchToSpaceND<T extends Tensor>(x: T, blockShape: number[], crops: number[][]): T;
-    spaceToBatchND<T extends Tensor>(x: T, blockShape: number[], paddings: number[][]): T;
-    resizeBilinear(x: Tensor4D, newHeight: number, newWidth: number, alignCorners: boolean): Tensor4D;
-    resizeBilinearBackprop(dy: Tensor4D, x: Tensor4D, alignCorners: boolean): Tensor4D;
-    resizeNearestNeighbor(x: Tensor4D, newHEight: number, newWidth: number, alignCorners: boolean): Tensor4D;
-    resizeNearestNeighborBackprop(dy: Tensor4D, x: Tensor4D, alignCorners: boolean): Tensor4D;
-    batchNormalization(x: Tensor4D, mean: Tensor4D | Tensor1D, variance: Tensor4D | Tensor1D, varianceEpsilon: number, scale?: Tensor4D | Tensor1D, offset?: Tensor4D | Tensor1D): Tensor4D;
-    localResponseNormalization4D(x: Tensor4D, radius: number, bias: number, alpha: number, beta: number): Tensor4D;
-    LRNGrad(dy: Tensor4D, inputImage: Tensor4D, outputImage: Tensor4D, radius: number, bias: number, alpha: number, beta: number): Tensor4D;
-    multinomial(logits: Tensor2D, normalized: boolean, numSamples: number, seed: number): Tensor2D;
-    oneHot(indices: Tensor1D, depth: number, onValue: number, offValue: number): Tensor2D;
-    cumsum(x: Tensor, axis: number, exclusive: boolean, reverse: boolean): Tensor;
-    nonMaxSuppression(boxes: Tensor2D, scores: Tensor1D, maxOutputSize: number, iouThreshold: number, scoreThreshold?: number): Tensor1D;
-    fft(x: Tensor2D): Tensor2D;
-    ifft(x: Tensor2D): Tensor2D;
-    complex<T extends Tensor>(real: T, imag: T): T;
-    real<T extends Tensor>(input: T): T;
-    imag<T extends Tensor>(input: T): T;
-    cropAndResize(image: Tensor4D, boxes: Tensor2D, boxIndex: Tensor1D, cropSize: [number, number], method: 'bilinear' | 'nearest', extrapolationValue: number): Tensor4D;
-    depthToSpace(x: Tensor4D, blockSize: number, dataFormat: string): Tensor4D;
-    split<T extends Tensor>(value: T, sizeSplits: number[], axis: number): T[];
-    sparseToDense<R extends Rank>(sparseIndices: Tensor, sparseValues: Tensor, outputShape: ShapeMap[R], defaultValue: Scalar): Tensor<R>;
-    diag(x: Tensor): Tensor;
-    fill<R extends Rank>(shape: ShapeMap[R], value: number | string, dtype?: DataType): Tensor<R>;
-    onesLike<R extends Rank>(x: Tensor<R>): Tensor<R>;
-    zerosLike<R extends Rank>(x: Tensor<R>): Tensor<R>;
-    linspace(start: number, stop: number, num: number): Tensor1D;
-    dispose(): void;
-}

+ 0 - 518
rag-server/node_modules/@tensorflow/tfjs-core/dist/backends/backend.js

@@ -1,518 +0,0 @@
-"use strict";
-/**
- * @license
- * Copyright 2018 Google Inc. All Rights Reserved.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * =============================================================================
- */
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.EPSILON_FLOAT32 = 1e-7;
-exports.EPSILON_FLOAT16 = 1e-4;
-/** Convenient class for storing tensor-related data. */
-var DataStorage = /** @class */ (function () {
-    function DataStorage(backend, dataMover) {
-        this.backend = backend;
-        this.dataMover = dataMover;
-        this.data = new WeakMap();
-        this.dataIdsCount = 0;
-    }
-    DataStorage.prototype.get = function (dataId) {
-        if (!this.data.has(dataId)) {
-            this.dataMover.moveData(this.backend, dataId);
-        }
-        return this.data.get(dataId);
-    };
-    DataStorage.prototype.set = function (dataId, value) {
-        this.dataIdsCount++;
-        this.data.set(dataId, value);
-    };
-    DataStorage.prototype.has = function (dataId) {
-        return this.data.has(dataId);
-    };
-    DataStorage.prototype.delete = function (dataId) {
-        this.dataIdsCount--;
-        return this.data.delete(dataId);
-    };
-    DataStorage.prototype.numDataIds = function () {
-        return this.dataIdsCount;
-    };
-    return DataStorage;
-}());
-exports.DataStorage = DataStorage;
-/**
- * The interface that defines the kernels that should be implemented when
- * adding a new backend. New backends don't need to implement every one of the
- * methods, this can be done gradually (throw an error for unimplemented
- * methods).
- */
-var KernelBackend = /** @class */ (function () {
-    function KernelBackend() {
-    }
-    KernelBackend.prototype.time = function (f) {
-        return notYetImplemented('time');
-    };
-    KernelBackend.prototype.read = function (dataId) {
-        return notYetImplemented('read');
-    };
-    KernelBackend.prototype.readSync = function (dataId) {
-        return notYetImplemented('readSync');
-    };
-    KernelBackend.prototype.numDataIds = function () {
-        return notYetImplemented('numDataIds');
-    };
-    KernelBackend.prototype.disposeData = function (dataId) {
-        return notYetImplemented('disposeData');
-    };
-    KernelBackend.prototype.write = function (values, shape, dtype) {
-        return notYetImplemented('write');
-    };
-    KernelBackend.prototype.move = function (dataId, values, shape, dtype) {
-        return notYetImplemented('move');
-    };
-    KernelBackend.prototype.memory = function () {
-        return notYetImplemented('memory');
-    };
-    /** Returns the highest precision for floats in bits (e.g. 16 or 32) */
-    KernelBackend.prototype.floatPrecision = function () {
-        return notYetImplemented('floatPrecision');
-    };
-    /** Returns the smallest representable number.  */
-    KernelBackend.prototype.epsilon = function () {
-        return this.floatPrecision() === 32 ? exports.EPSILON_FLOAT32 : exports.EPSILON_FLOAT16;
-    };
-    KernelBackend.prototype.batchMatMul = function (a, b, transposeA, transposeB) {
-        return notYetImplemented('batchMatMul');
-    };
-    KernelBackend.prototype.fusedBatchMatMul = function (_a) {
-        var a = _a.a, b = _a.b, transposeA = _a.transposeA, transposeB = _a.transposeB, bias = _a.bias, activation = _a.activation, preluActivationWeights = _a.preluActivationWeights;
-        return notYetImplemented('fusedBatchMatMul');
-    };
-    KernelBackend.prototype.slice = function (x, begin, size) {
-        return notYetImplemented('slice');
-    };
-    KernelBackend.prototype.stridedSlice = function (x, begin, end, strides) {
-        return notYetImplemented('stridedSlice');
-    };
-    KernelBackend.prototype.unstack = function (x, axis) {
-        return notYetImplemented('unstack');
-    };
-    KernelBackend.prototype.reverse = function (a, axis) {
-        return notYetImplemented('reverse');
-    };
-    KernelBackend.prototype.concat = function (tensors, axis) {
-        return notYetImplemented('concat');
-    };
-    KernelBackend.prototype.neg = function (a) {
-        return notYetImplemented('neg');
-    };
-    KernelBackend.prototype.add = function (a, b) {
-        return notYetImplemented('add');
-    };
-    KernelBackend.prototype.addN = function (tensors) {
-        return notYetImplemented('addN');
-    };
-    KernelBackend.prototype.subtract = function (a, b) {
-        return notYetImplemented('subtract');
-    };
-    KernelBackend.prototype.multiply = function (a, b) {
-        return notYetImplemented('multiply');
-    };
-    KernelBackend.prototype.realDivide = function (a, b) {
-        return notYetImplemented('realDivide');
-    };
-    KernelBackend.prototype.floorDiv = function (a, b) {
-        return notYetImplemented('floorDiv');
-    };
-    KernelBackend.prototype.sum = function (x, axes) {
-        return notYetImplemented('sum');
-    };
-    KernelBackend.prototype.prod = function (x, axes) {
-        return notYetImplemented('prod');
-    };
-    KernelBackend.prototype.unsortedSegmentSum = function (x, segmentIds, numSegments) {
-        return notYetImplemented('unsortedSegmentSum');
-    };
-    KernelBackend.prototype.argMin = function (x, axis) {
-        return notYetImplemented('argMin');
-    };
-    KernelBackend.prototype.argMax = function (x, axis) {
-        return notYetImplemented('argMax');
-    };
-    KernelBackend.prototype.equal = function (a, b) {
-        return notYetImplemented('equal');
-    };
-    KernelBackend.prototype.notEqual = function (a, b) {
-        return notYetImplemented('notEqual');
-    };
-    KernelBackend.prototype.less = function (a, b) {
-        return notYetImplemented('less');
-    };
-    KernelBackend.prototype.lessEqual = function (a, b) {
-        return notYetImplemented('lessEqual');
-    };
-    KernelBackend.prototype.greater = function (a, b) {
-        return notYetImplemented('greater');
-    };
-    KernelBackend.prototype.greaterEqual = function (a, b) {
-        return notYetImplemented('greaterEqual');
-    };
-    KernelBackend.prototype.logicalNot = function (a) {
-        return notYetImplemented('logicalNot');
-    };
-    KernelBackend.prototype.logicalAnd = function (a, b) {
-        return notYetImplemented('logicalAnd');
-    };
-    KernelBackend.prototype.logicalOr = function (a, b) {
-        return notYetImplemented('logicalOr');
-    };
-    KernelBackend.prototype.where = function (condition) {
-        return notYetImplemented('where');
-    };
-    KernelBackend.prototype.select = function (condition, a, b) {
-        return notYetImplemented('select');
-    };
-    KernelBackend.prototype.topk = function (x, k, sorted) {
-        return notYetImplemented('topk');
-    };
-    KernelBackend.prototype.min = function (x, axes) {
-        return notYetImplemented('min');
-    };
-    KernelBackend.prototype.minimum = function (a, b) {
-        return notYetImplemented('minimum');
-    };
-    KernelBackend.prototype.mod = function (a, b) {
-        return notYetImplemented('mod');
-    };
-    KernelBackend.prototype.max = function (x, axes) {
-        return notYetImplemented('max');
-    };
-    KernelBackend.prototype.maximum = function (a, b) {
-        return notYetImplemented('maximum');
-    };
-    KernelBackend.prototype.all = function (x, axes) {
-        return notYetImplemented('all');
-    };
-    KernelBackend.prototype.any = function (x, axes) {
-        return notYetImplemented('any');
-    };
-    KernelBackend.prototype.squaredDifference = function (a, b) {
-        return notYetImplemented('squaredDifference');
-    };
-    KernelBackend.prototype.ceil = function (x) {
-        return notYetImplemented('ceil');
-    };
-    KernelBackend.prototype.floor = function (x) {
-        return notYetImplemented('floor');
-    };
-    KernelBackend.prototype.round = function (x) {
-        return notYetImplemented('round');
-    };
-    KernelBackend.prototype.sign = function (x) {
-        return notYetImplemented('sign');
-    };
-    KernelBackend.prototype.isNaN = function (x) {
-        return notYetImplemented('isNaN');
-    };
-    KernelBackend.prototype.isInf = function (x) {
-        return notYetImplemented('isInf');
-    };
-    KernelBackend.prototype.isFinite = function (x) {
-        return notYetImplemented('isFinite');
-    };
-    KernelBackend.prototype.pow = function (a, b) {
-        return notYetImplemented('pow');
-    };
-    KernelBackend.prototype.exp = function (x) {
-        return notYetImplemented('exp');
-    };
-    KernelBackend.prototype.expm1 = function (x) {
-        return notYetImplemented('expm1');
-    };
-    KernelBackend.prototype.softmax = function (x, dim) {
-        return notYetImplemented('softmax');
-    };
-    KernelBackend.prototype.log = function (x) {
-        return notYetImplemented('log');
-    };
-    KernelBackend.prototype.log1p = function (x) {
-        return notYetImplemented('log1p');
-    };
-    KernelBackend.prototype.sqrt = function (x) {
-        return notYetImplemented('sqrt');
-    };
-    KernelBackend.prototype.rsqrt = function (x) {
-        return notYetImplemented('rsqrt');
-    };
-    KernelBackend.prototype.square = function (x) {
-        return notYetImplemented('square');
-    };
-    KernelBackend.prototype.reciprocal = function (x) {
-        return notYetImplemented('reciprocal');
-    };
-    KernelBackend.prototype.relu = function (x) {
-        return notYetImplemented('relu');
-    };
-    KernelBackend.prototype.relu6 = function (x) {
-        return notYetImplemented('relu6');
-    };
-    KernelBackend.prototype.prelu = function (x, a) {
-        return notYetImplemented('prelu');
-    };
-    KernelBackend.prototype.elu = function (x) {
-        return notYetImplemented('elu');
-    };
-    KernelBackend.prototype.eluDer = function (dy, y) {
-        return notYetImplemented('eluDer');
-    };
-    KernelBackend.prototype.selu = function (x) {
-        return notYetImplemented('selu');
-    };
-    KernelBackend.prototype.int = function (x) {
-        return notYetImplemented('int');
-    };
-    KernelBackend.prototype.clip = function (x, min, max) {
-        return notYetImplemented('clip');
-    };
-    KernelBackend.prototype.abs = function (x) {
-        return notYetImplemented('abs');
-    };
-    KernelBackend.prototype.complexAbs = function (x) {
-        return notYetImplemented('complexAbs');
-    };
-    KernelBackend.prototype.sigmoid = function (x) {
-        return notYetImplemented('sigmoid');
-    };
-    KernelBackend.prototype.softplus = function (x) {
-        return notYetImplemented('softplus');
-    };
-    KernelBackend.prototype.sin = function (x) {
-        return notYetImplemented('sin');
-    };
-    KernelBackend.prototype.cos = function (x) {
-        return notYetImplemented('cos');
-    };
-    KernelBackend.prototype.tan = function (x) {
-        return notYetImplemented('tan');
-    };
-    KernelBackend.prototype.asin = function (x) {
-        return notYetImplemented('asin');
-    };
-    KernelBackend.prototype.acos = function (x) {
-        return notYetImplemented('acos');
-    };
-    KernelBackend.prototype.atan = function (x) {
-        return notYetImplemented('atan');
-    };
-    KernelBackend.prototype.atan2 = function (a, b) {
-        return notYetImplemented('atan2');
-    };
-    KernelBackend.prototype.sinh = function (x) {
-        return notYetImplemented('sinh');
-    };
-    KernelBackend.prototype.cosh = function (x) {
-        return notYetImplemented('cosh');
-    };
-    KernelBackend.prototype.tanh = function (x) {
-        return notYetImplemented('tanh');
-    };
-    KernelBackend.prototype.asinh = function (x) {
-        return notYetImplemented('asinh');
-    };
-    KernelBackend.prototype.acosh = function (x) {
-        return notYetImplemented('acosh');
-    };
-    KernelBackend.prototype.atanh = function (x) {
-        return notYetImplemented('atanh');
-    };
-    KernelBackend.prototype.erf = function (x) {
-        return notYetImplemented('erf');
-    };
-    KernelBackend.prototype.step = function (x, alpha) {
-        return notYetImplemented('step');
-    };
-    KernelBackend.prototype.fusedConv2d = function (_a) {
-        var input = _a.input, filter = _a.filter, convInfo = _a.convInfo, bias = _a.bias, activation = _a.activation, preluActivationWeights = _a.preluActivationWeights;
-        return notYetImplemented('fusedConv2d');
-    };
-    KernelBackend.prototype.conv2d = function (x, filter, convInfo) {
-        return notYetImplemented('conv2d');
-    };
-    KernelBackend.prototype.conv2dDerInput = function (dy, filter, convInfo) {
-        return notYetImplemented('conv2dDerInput');
-    };
-    KernelBackend.prototype.conv2dDerFilter = function (x, dY, convInfo) {
-        return notYetImplemented('conv2dDerFilter');
-    };
-    KernelBackend.prototype.fusedDepthwiseConv2D = function (_a) {
-        var input = _a.input, filter = _a.filter, convInfo = _a.convInfo, bias = _a.bias, activation = _a.activation, preluActivationWeights = _a.preluActivationWeights;
-        return notYetImplemented('fusedDepthwiseConv2D');
-    };
-    KernelBackend.prototype.depthwiseConv2D = function (input, filter, convInfo) {
-        return notYetImplemented('depthwiseConv2D');
-    };
-    KernelBackend.prototype.depthwiseConv2DDerInput = function (dy, filter, convInfo) {
-        return notYetImplemented('depthwiseConv2DDerInput');
-    };
-    KernelBackend.prototype.depthwiseConv2DDerFilter = function (x, dY, convInfo) {
-        return notYetImplemented('depthwiseConv2DDerFilter');
-    };
-    KernelBackend.prototype.conv3d = function (x, filter, convInfo) {
-        return notYetImplemented('conv3d');
-    };
-    KernelBackend.prototype.conv3dDerInput = function (dy, filter, convInfo) {
-        return notYetImplemented('conv3dDerInput');
-    };
-    KernelBackend.prototype.conv3dDerFilter = function (x, dY, convInfo) {
-        return notYetImplemented('conv3dDerFilter');
-    };
-    KernelBackend.prototype.maxPool = function (x, convInfo) {
-        return notYetImplemented('maxPool');
-    };
-    KernelBackend.prototype.maxPoolBackprop = function (dy, x, y, convInfo) {
-        return notYetImplemented('maxPoolBackprop');
-    };
-    KernelBackend.prototype.avgPool = function (x, convInfo) {
-        return notYetImplemented('avgPool');
-    };
-    KernelBackend.prototype.avgPoolBackprop = function (dy, x, convInfo) {
-        return notYetImplemented('avgPoolBackprop');
-    };
-    KernelBackend.prototype.avgPool3d = function (x, convInfo) {
-        return notYetImplemented('avgPool3d');
-    };
-    KernelBackend.prototype.avgPool3dBackprop = function (dy, x, convInfo) {
-        return notYetImplemented('avgPool3dBackprop');
-    };
-    KernelBackend.prototype.maxPool3d = function (x, convInfo) {
-        return notYetImplemented('maxPool3d');
-    };
-    KernelBackend.prototype.maxPool3dBackprop = function (dy, x, y, convInfo) {
-        return notYetImplemented('maxPool3dBackprop');
-    };
-    KernelBackend.prototype.reshape = function (x, shape) {
-        return notYetImplemented('reshape');
-    };
-    KernelBackend.prototype.cast = function (x, dtype) {
-        return notYetImplemented('cast');
-    };
-    KernelBackend.prototype.tile = function (x, reps) {
-        return notYetImplemented('tile');
-    };
-    KernelBackend.prototype.pad = function (x, paddings, constantValue) {
-        return notYetImplemented('pad');
-    };
-    KernelBackend.prototype.transpose = function (x, perm) {
-        return notYetImplemented('transpose');
-    };
-    KernelBackend.prototype.gather = function (x, indices, axis) {
-        return notYetImplemented('gather');
-    };
-    KernelBackend.prototype.gatherND = function (x, indices) {
-        return notYetImplemented('gatherND');
-    };
-    KernelBackend.prototype.scatterND = function (indices, updates, shape) {
-        return notYetImplemented('scatterND');
-    };
-    KernelBackend.prototype.batchToSpaceND = function (x, blockShape, crops) {
-        return notYetImplemented('batchToSpaceND');
-    };
-    KernelBackend.prototype.spaceToBatchND = function (x, blockShape, paddings) {
-        return notYetImplemented('spaceToBatchND');
-    };
-    KernelBackend.prototype.resizeBilinear = function (x, newHeight, newWidth, alignCorners) {
-        return notYetImplemented('resizeBilinear');
-    };
-    KernelBackend.prototype.resizeBilinearBackprop = function (dy, x, alignCorners) {
-        return notYetImplemented('resizeBilinearBackprop');
-    };
-    KernelBackend.prototype.resizeNearestNeighbor = function (x, newHEight, newWidth, alignCorners) {
-        return notYetImplemented('resizeNearestNeighbor');
-    };
-    KernelBackend.prototype.resizeNearestNeighborBackprop = function (dy, x, alignCorners) {
-        return notYetImplemented('resizeNearestNeighborBackprop');
-    };
-    KernelBackend.prototype.batchNormalization = function (x, mean, variance, varianceEpsilon, scale, offset) {
-        return notYetImplemented('batchNormalization');
-    };
-    KernelBackend.prototype.localResponseNormalization4D = function (x, radius, bias, alpha, beta) {
-        return notYetImplemented('localResponseNormalization4D');
-    };
-    KernelBackend.prototype.LRNGrad = function (dy, inputImage, outputImage, radius, bias, alpha, beta) {
-        return notYetImplemented('LRNGrad');
-    };
-    KernelBackend.prototype.multinomial = function (logits, normalized, numSamples, seed) {
-        return notYetImplemented('multinomial');
-    };
-    KernelBackend.prototype.oneHot = function (indices, depth, onValue, offValue) {
-        return notYetImplemented('oneHot');
-    };
-    KernelBackend.prototype.cumsum = function (x, axis, exclusive, reverse) {
-        return notYetImplemented('cumsum');
-    };
-    KernelBackend.prototype.nonMaxSuppression = function (boxes, scores, maxOutputSize, iouThreshold, scoreThreshold) {
-        return notYetImplemented('nonMaxSuppression');
-    };
-    KernelBackend.prototype.fft = function (x) {
-        return notYetImplemented('fft');
-    };
-    KernelBackend.prototype.ifft = function (x) {
-        return notYetImplemented('ifft');
-    };
-    KernelBackend.prototype.complex = function (real, imag) {
-        return notYetImplemented('complex');
-    };
-    KernelBackend.prototype.real = function (input) {
-        return notYetImplemented('real');
-    };
-    KernelBackend.prototype.imag = function (input) {
-        return notYetImplemented('imag');
-    };
-    KernelBackend.prototype.cropAndResize = function (image, boxes, boxIndex, cropSize, method, extrapolationValue) {
-        return notYetImplemented('cropAndResize');
-    };
-    KernelBackend.prototype.depthToSpace = function (x, blockSize, dataFormat) {
-        return notYetImplemented('depthToSpace');
-    };
-    // Aligns with the "SplitV" kernel in TensorFlow.
-    KernelBackend.prototype.split = function (value, sizeSplits, axis) {
-        return notYetImplemented('split');
-    };
-    KernelBackend.prototype.sparseToDense = function (sparseIndices, sparseValues, outputShape, defaultValue) {
-        return notYetImplemented('sparseToDense');
-    };
-    KernelBackend.prototype.diag = function (x) {
-        return notYetImplemented('diag');
-    };
-    KernelBackend.prototype.fill = function (shape, value, dtype) {
-        return notYetImplemented('fill');
-    };
-    KernelBackend.prototype.onesLike = function (x) {
-        return notYetImplemented('onesLike');
-    };
-    KernelBackend.prototype.zerosLike = function (x) {
-        return notYetImplemented('zerosLike');
-    };
-    KernelBackend.prototype.linspace = function (start, stop, num) {
-        return notYetImplemented('linspace');
-    };
-    KernelBackend.prototype.dispose = function () {
-        return notYetImplemented('dispose');
-    };
-    return KernelBackend;
-}());
-exports.KernelBackend = KernelBackend;
-function notYetImplemented(kernelName) {
-    throw new Error("'" + kernelName + "' not yet implemented or not found in the registry. " +
-        "Did you forget to import the kernel?");
-}
-//# sourceMappingURL=backend.js.map

文件差异内容过多而无法显示
+ 0 - 0
rag-server/node_modules/@tensorflow/tfjs-core/dist/backends/backend.js.map


+ 0 - 1
rag-server/node_modules/@tensorflow/tfjs-core/dist/backends/backend_test.d.ts

@@ -1 +0,0 @@
-export {};

+ 0 - 1
rag-server/node_modules/@tensorflow/tfjs-core/dist/backends/backend_test.js.map

@@ -1 +0,0 @@
-{"version":3,"file":"backend_test.js","sourceRoot":"","sources":["../../src/backends/backend_test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBA,iBAgBA;;AAhCA;;;;;;;;;;;;;;;GAeG;AACH,6BAA+B;AAC/B,gDAA4D;AAC5D,qCAA2D;AAE3D,gCAAiB,CAAC,SAAS,EAAE,uBAAQ,EAAE;IACrC,EAAE,CAAC,0CAA0C,EAAE;QAC7C,IAAM,YAAY,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC,cAAc,EAAE,KAAK,EAAE,CAAC,CAAC;YACvD,yBAAe,CAAC,CAAC;YACjB,yBAAe,CAAC;QACpB,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IACpD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,kBAAkB,EAAE;;;;;oBACrB,KAAA,MAAM,CAAA;oBAAC,qBAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC,KAAK,EAAE,EAAA;;oBAAnD,kBAAO,SAA4C,EAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;;;;SACzE,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}

+ 0 - 31
rag-server/node_modules/@tensorflow/tfjs-core/dist/backends/backend_util.d.ts

@@ -1,31 +0,0 @@
-/**
- * @license
- * Copyright 2018 Google Inc. All Rights Reserved.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * =============================================================================
- */
-import { Tensor } from '../tensor';
-import { Rank } from '../types';
-import { DataType, ShapeMap } from '../types';
-import { KernelBackend } from './backend';
-export * from '../ops/axis_util';
-export * from '../ops/broadcast_util';
-export * from '../ops/concat_util';
-export * from '../ops/conv_util';
-export { Activation, FusedConv2DConfig } from '../ops/fused_util';
-export * from '../ops/reduce_util';
-export { BackendValues, TypedArray, upcastType, PixelData } from '../types';
-export { MemoryInfo, TimingInfo } from '../engine';
-export declare function castTensor<T extends Tensor>(x: T, dtype: DataType, backend: KernelBackend): T;
-export declare function reshapeTensor<T extends Tensor, R extends Rank>(x: T, shape: ShapeMap[R]): Tensor<R>;
-export declare function linspaceImpl(start: number, stop: number, num: number): Tensor<Rank.R1>;

+ 0 - 84
rag-server/node_modules/@tensorflow/tfjs-core/dist/backends/backend_util.js

@@ -1,84 +0,0 @@
-"use strict";
-/**
- * @license
- * Copyright 2018 Google Inc. All Rights Reserved.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * =============================================================================
- */
-function __export(m) {
-    for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-var engine_1 = require("../engine");
-var tensor_ops_1 = require("../ops/tensor_ops");
-var util_1 = require("../util");
-// Utilities needed by backend consumers of tf-core.
-__export(require("../ops/axis_util"));
-__export(require("../ops/broadcast_util"));
-__export(require("../ops/concat_util"));
-__export(require("../ops/conv_util"));
-__export(require("../ops/reduce_util"));
-var types_1 = require("../types");
-exports.upcastType = types_1.upcastType;
-function castTensor(x, dtype, backend) {
-    if (dtype === 'complex64') {
-        if (x.dtype === 'complex64') {
-            return x.clone();
-        }
-        var zerosTensor = tensor_ops_1.zeros(x.shape);
-        var floatX = x.toFloat();
-        var result = backend.complex(floatX, zerosTensor);
-        zerosTensor.dispose();
-        floatX.dispose();
-        return result;
-    }
-    if (!util_1.hasEncodingLoss(x.dtype, dtype)) {
-        // We don't change the underlying data, since we cast to higher
-        // precision.
-        return engine_1.ENGINE.makeTensorFromDataId(x.dataId, x.shape, dtype);
-    }
-    if (x.dtype === 'complex64') {
-        var real = backend.real(x);
-        var result = real.cast(dtype);
-        real.dispose();
-        return result;
-    }
-    if (dtype === 'int32') {
-        return backend.int(x);
-    }
-    else if (dtype === 'bool') {
-        var zero = tensor_ops_1.scalar(0, x.dtype);
-        var result = backend.notEqual(x, zero);
-        zero.dispose();
-        return result;
-    }
-    else {
-        throw new Error("Error in Cast: failed to cast " + x.dtype + " to " + dtype);
-    }
-}
-exports.castTensor = castTensor;
-function reshapeTensor(x, shape) {
-    return engine_1.ENGINE.makeTensorFromDataId(x.dataId, shape, x.dtype);
-}
-exports.reshapeTensor = reshapeTensor;
-function linspaceImpl(start, stop, num) {
-    var step = (stop - start) / (num - 1);
-    var values = util_1.makeZerosTypedArray(num, 'float32');
-    values[0] = start;
-    for (var i = 1; i < values.length; i++) {
-        values[i] = values[i - 1] + step;
-    }
-    return tensor_ops_1.tensor1d(values, 'float32');
-}
-exports.linspaceImpl = linspaceImpl;
-//# sourceMappingURL=backend_util.js.map

文件差异内容过多而无法显示
+ 0 - 0
rag-server/node_modules/@tensorflow/tfjs-core/dist/backends/backend_util.js.map


+ 0 - 96
rag-server/node_modules/@tensorflow/tfjs-core/dist/backends/complex_util.d.ts

@@ -1,96 +0,0 @@
-/**
- * @license
- * Copyright 2018 Google LLC. All Rights Reserved.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * =============================================================================
- */
-import { TypedArray } from '../types';
-/**
- * Merges real and imaginary Float32Arrays into a single complex Float32Array.
- *
- * The memory layout is interleaved as follows:
- * real: [r0, r1, r2]
- * imag: [i0, i1, i2]
- * complex: [r0, i0, r1, i1, r2, i2]
- *
- * This is the inverse of splitRealAndImagArrays.
- *
- * @param real The real values of the complex tensor values.
- * @param imag The imag values of the complex tensor values.
- * @returns A complex tensor as a Float32Array with merged values.
- */
-export declare function mergeRealAndImagArrays(real: Float32Array, imag: Float32Array): Float32Array;
-/**
- * Splits a complex Float32Array into real and imag parts.
- *
- * The memory layout is interleaved as follows:
- * complex: [r0, i0, r1, i1, r2, i2]
- * real: [r0, r1, r2]
- * imag: [i0, i1, i2]
- *
- * This is the inverse of mergeRealAndImagArrays.
- *
- * @param complex The complex tensor values.
- * @returns An object with real and imag Float32Array components of the complex
- *     tensor.
- */
-export declare function splitRealAndImagArrays(complex: Float32Array): {
-    real: Float32Array;
-    imag: Float32Array;
-};
-/**
- * Extracts even indexed complex values in the given array.
- * @param complex The complex tensor values
- */
-export declare function complexWithEvenIndex(complex: Float32Array): {
-    real: Float32Array;
-    imag: Float32Array;
-};
-/**
- * Extracts odd indexed comple values in the given array.
- * @param complex The complex tensor values
- */
-export declare function complexWithOddIndex(complex: Float32Array): {
-    real: Float32Array;
-    imag: Float32Array;
-};
-/**
- * Get the map representing a complex value in the given array.
- * @param complex The complex tensor values.
- * @param index An index of the target complex value.
- */
-export declare function getComplexWithIndex(complex: Float32Array, index: number): {
-    real: number;
-    imag: number;
-};
-/**
- * Insert a given complex value into the TypedArray.
- * @param data The array in which the complex value is inserted.
- * @param c The complex value to be inserted.
- * @param index An index of the target complex value.
- */
-export declare function assignToTypedArray(data: TypedArray, real: number, imag: number, index: number): void;
-/**
- * Make the list of exponent terms used by FFT.
- */
-export declare function exponents(n: number, inverse: boolean): {
-    real: Float32Array;
-    imag: Float32Array;
-};
-/**
- * Make the exponent term used by FFT.
- */
-export declare function exponent(k: number, n: number, inverse: boolean): {
-    real: number;
-    imag: number;
-};

+ 0 - 146
rag-server/node_modules/@tensorflow/tfjs-core/dist/backends/complex_util.js

@@ -1,146 +0,0 @@
-"use strict";
-/**
- * @license
- * Copyright 2018 Google LLC. All Rights Reserved.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * =============================================================================
- */
-Object.defineProperty(exports, "__esModule", { value: true });
-/**
- * Merges real and imaginary Float32Arrays into a single complex Float32Array.
- *
- * The memory layout is interleaved as follows:
- * real: [r0, r1, r2]
- * imag: [i0, i1, i2]
- * complex: [r0, i0, r1, i1, r2, i2]
- *
- * This is the inverse of splitRealAndImagArrays.
- *
- * @param real The real values of the complex tensor values.
- * @param imag The imag values of the complex tensor values.
- * @returns A complex tensor as a Float32Array with merged values.
- */
-function mergeRealAndImagArrays(real, imag) {
-    if (real.length !== imag.length) {
-        throw new Error("Cannot merge real and imag arrays of different lengths. real:" +
-            (real.length + ", imag: " + imag.length + "."));
-    }
-    var result = new Float32Array(real.length * 2);
-    for (var i = 0; i < result.length; i += 2) {
-        result[i] = real[i / 2];
-        result[i + 1] = imag[i / 2];
-    }
-    return result;
-}
-exports.mergeRealAndImagArrays = mergeRealAndImagArrays;
-/**
- * Splits a complex Float32Array into real and imag parts.
- *
- * The memory layout is interleaved as follows:
- * complex: [r0, i0, r1, i1, r2, i2]
- * real: [r0, r1, r2]
- * imag: [i0, i1, i2]
- *
- * This is the inverse of mergeRealAndImagArrays.
- *
- * @param complex The complex tensor values.
- * @returns An object with real and imag Float32Array components of the complex
- *     tensor.
- */
-function splitRealAndImagArrays(complex) {
-    var real = new Float32Array(complex.length / 2);
-    var imag = new Float32Array(complex.length / 2);
-    for (var i = 0; i < complex.length; i += 2) {
-        real[i / 2] = complex[i];
-        imag[i / 2] = complex[i + 1];
-    }
-    return { real: real, imag: imag };
-}
-exports.splitRealAndImagArrays = splitRealAndImagArrays;
-/**
- * Extracts even indexed complex values in the given array.
- * @param complex The complex tensor values
- */
-function complexWithEvenIndex(complex) {
-    var len = Math.ceil(complex.length / 4);
-    var real = new Float32Array(len);
-    var imag = new Float32Array(len);
-    for (var i = 0; i < complex.length; i += 4) {
-        real[Math.floor(i / 4)] = complex[i];
-        imag[Math.floor(i / 4)] = complex[i + 1];
-    }
-    return { real: real, imag: imag };
-}
-exports.complexWithEvenIndex = complexWithEvenIndex;
-/**
- * Extracts odd indexed comple values in the given array.
- * @param complex The complex tensor values
- */
-function complexWithOddIndex(complex) {
-    var len = Math.floor(complex.length / 4);
-    var real = new Float32Array(len);
-    var imag = new Float32Array(len);
-    for (var i = 2; i < complex.length; i += 4) {
-        real[Math.floor(i / 4)] = complex[i];
-        imag[Math.floor(i / 4)] = complex[i + 1];
-    }
-    return { real: real, imag: imag };
-}
-exports.complexWithOddIndex = complexWithOddIndex;
-/**
- * Get the map representing a complex value in the given array.
- * @param complex The complex tensor values.
- * @param index An index of the target complex value.
- */
-function getComplexWithIndex(complex, index) {
-    var real = complex[index * 2];
-    var imag = complex[index * 2 + 1];
-    return { real: real, imag: imag };
-}
-exports.getComplexWithIndex = getComplexWithIndex;
-/**
- * Insert a given complex value into the TypedArray.
- * @param data The array in which the complex value is inserted.
- * @param c The complex value to be inserted.
- * @param index An index of the target complex value.
- */
-function assignToTypedArray(data, real, imag, index) {
-    data[index * 2] = real;
-    data[index * 2 + 1] = imag;
-}
-exports.assignToTypedArray = assignToTypedArray;
-/**
- * Make the list of exponent terms used by FFT.
- */
-function exponents(n, inverse) {
-    var real = new Float32Array(n / 2);
-    var imag = new Float32Array(n / 2);
-    for (var i = 0; i < Math.ceil(n / 2); i++) {
-        var x = (inverse ? 2 : -2) * Math.PI * (i / n);
-        real[i] = Math.cos(x);
-        imag[i] = Math.sin(x);
-    }
-    return { real: real, imag: imag };
-}
-exports.exponents = exponents;
-/**
- * Make the exponent term used by FFT.
- */
-function exponent(k, n, inverse) {
-    var x = (inverse ? 2 : -2) * Math.PI * (k / n);
-    var real = Math.cos(x);
-    var imag = Math.sin(x);
-    return { real: real, imag: imag };
-}
-exports.exponent = exponent;
-//# sourceMappingURL=complex_util.js.map

文件差异内容过多而无法显示
+ 0 - 0
rag-server/node_modules/@tensorflow/tfjs-core/dist/backends/complex_util.js.map


+ 0 - 1
rag-server/node_modules/@tensorflow/tfjs-core/dist/backends/complex_util_test.d.ts

@@ -1 +0,0 @@
-export {};

文件差异内容过多而无法显示
+ 0 - 0
rag-server/node_modules/@tensorflow/tfjs-core/dist/backends/complex_util_test.js.map


+ 0 - 204
rag-server/node_modules/@tensorflow/tfjs-core/dist/backends/cpu/backend_cpu.d.ts

@@ -1,204 +0,0 @@
-/**
- * @license
- * Copyright 2017 Google Inc. All Rights Reserved.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * =============================================================================
- */
-import { Conv2DInfo, Conv3DInfo } from '../../ops/conv_util';
-import { FusedBatchMatMulConfig, FusedConv2DConfig } from '../../ops/fused_util';
-import { DataId, Scalar, Tensor, Tensor1D, Tensor2D, Tensor3D, Tensor4D, Tensor5D } from '../../tensor';
-import { BackendValues, DataType, Rank, ShapeMap } from '../../types';
-import { BackendTimingInfo, DataStorage, KernelBackend } from '../backend';
-export interface TensorData<D extends DataType> {
-    values?: BackendValues;
-    dtype: D;
-    complexTensors?: {
-        real: Tensor;
-        imag: Tensor;
-    };
-}
-export declare class MathBackendCPU extends KernelBackend {
-    blockSize: number;
-    data: DataStorage<TensorData<DataType>>;
-    private firstUse;
-    constructor();
-    write(values: BackendValues, shape: number[], dtype: DataType): DataId;
-    move(dataId: DataId, values: BackendValues, shape: number[], dtype: DataType): void;
-    numDataIds(): number;
-    read(dataId: DataId): Promise<BackendValues>;
-    readSync(dataId: DataId): BackendValues;
-    private bufferSync;
-    private makeOutput;
-    disposeData(dataId: DataId): void;
-    time(f: () => void): Promise<BackendTimingInfo>;
-    memory(): {
-        unreliable: boolean;
-        reasons: string[];
-    };
-    complex<T extends Tensor>(real: T, imag: T): T;
-    real<T extends Tensor>(input: T): T;
-    imag<T extends Tensor>(input: T): T;
-    slice<T extends Tensor>(x: T, begin: number[], size: number[]): T;
-    stridedSlice<T extends Tensor>(x: T, begin: number[], end: number[], strides: number[]): T;
-    diag(x: Tensor): Tensor;
-    unstack(x: Tensor, axis: number): Tensor[];
-    reverse<T extends Tensor>(x: T, axis: number[]): T;
-    concat(tensors: Tensor[], axis: number): Tensor;
-    neg<T extends Tensor>(x: T): T;
-    add(a: Tensor, b: Tensor): Tensor;
-    addN<T extends Tensor>(tensors: T[]): T;
-    softmax<T extends Tensor>(logits: T, dim: number): T;
-    subtract(a: Tensor, b: Tensor): Tensor;
-    pow<T extends Tensor>(a: T, b: Tensor): T;
-    batchMatMul(a: Tensor3D, b: Tensor3D, transposeA: boolean, transposeB: boolean): Tensor3D;
-    fusedBatchMatMul({ a, b, transposeA, transposeB, bias, activation, preluActivationWeights }: FusedBatchMatMulConfig): Tensor3D;
-    multiply(a: Tensor, b: Tensor): Tensor;
-    realDivide(a: Tensor, b: Tensor): Tensor;
-    floorDiv(a: Tensor, b: Tensor): Tensor;
-    sum(x: Tensor, axes: number[]): Tensor;
-    prod(x: Tensor, axes: number[]): Tensor;
-    unsortedSegmentSum<T extends Tensor>(x: T, segmentIds: Tensor1D, numSegments: number): Tensor;
-    argMin(x: Tensor, axis: number): Tensor;
-    argMax(x: Tensor, axis: number): Tensor;
-    cumsum(x: Tensor, axis: number, exclusive: boolean, reverse: boolean): Tensor;
-    equal(a: Tensor, b: Tensor): Tensor;
-    notEqual(a: Tensor, b: Tensor): Tensor;
-    less(a: Tensor, b: Tensor): Tensor;
-    lessEqual(a: Tensor, b: Tensor): Tensor;
-    greater(a: Tensor, b: Tensor): Tensor;
-    greaterEqual(a: Tensor, b: Tensor): Tensor;
-    logicalNot<T extends Tensor>(x: T): T;
-    logicalAnd(a: Tensor, b: Tensor): Tensor;
-    logicalOr(a: Tensor, b: Tensor): Tensor;
-    select(condition: Tensor, a: Tensor, b: Tensor): Tensor;
-    where(condition: Tensor): Tensor2D;
-    topk<T extends Tensor>(x: T, k: number, sorted: boolean): [T, T];
-    min(x: Tensor, axes: number[]): Tensor;
-    minimum(a: Tensor, b: Tensor): Tensor;
-    mod(a: Tensor, b: Tensor): Tensor;
-    max(x: Tensor, axes: number[]): Tensor;
-    maximum(a: Tensor, b: Tensor): Tensor;
-    all(x: Tensor, axes: number[]): Tensor;
-    any(x: Tensor, axes: number[]): Tensor;
-    squaredDifference(a: Tensor, b: Tensor): Tensor;
-    ceil<T extends Tensor>(x: T): T;
-    floor<T extends Tensor>(x: T): T;
-    sign<T extends Tensor>(x: T): T;
-    isNaN<T extends Tensor>(x: T): T;
-    isInf<T extends Tensor>(x: T): T;
-    isFinite<T extends Tensor>(x: T): T;
-    round<T extends Tensor>(x: T): T;
-    exp<T extends Tensor>(x: T): T;
-    expm1<T extends Tensor>(x: T): T;
-    log<T extends Tensor>(x: T): T;
-    log1p<T extends Tensor>(x: T): T;
-    sqrt<T extends Tensor>(x: T): T;
-    rsqrt<T extends Tensor>(x: T): T;
-    reciprocal<T extends Tensor>(x: T): T;
-    linear<T extends Tensor>(x: T): T;
-    relu<T extends Tensor>(x: T): T;
-    relu6<T extends Tensor>(x: T): T;
-    prelu<T extends Tensor>(x: T, a: T): T;
-    elu<T extends Tensor>(x: T): T;
-    eluDer<T extends Tensor>(dy: T, y: T): T;
-    selu<T extends Tensor>(x: T): T;
-    clip<T extends Tensor>(x: T, min: number, max: number): T;
-    abs<T extends Tensor>(x: T): T;
-    complexAbs<T extends Tensor>(x: T): T;
-    int<T extends Tensor>(x: T): T;
-    sigmoid<T extends Tensor>(x: T): T;
-    softplus<T extends Tensor>(x: T): T;
-    sin<T extends Tensor>(x: T): T;
-    cos<T extends Tensor>(x: T): T;
-    tan<T extends Tensor>(x: T): T;
-    asin<T extends Tensor>(x: T): T;
-    acos<T extends Tensor>(x: T): T;
-    atan<T extends Tensor>(x: T): T;
-    atan2<T extends Tensor>(a: T, b: T): T;
-    sinh<T extends Tensor>(x: T): T;
-    cosh<T extends Tensor>(x: T): T;
-    tanh<T extends Tensor>(x: T): T;
-    asinh<T extends Tensor>(x: T): T;
-    acosh<T extends Tensor>(x: T): T;
-    atanh<T extends Tensor>(x: T): T;
-    erf<T extends Tensor>(x: T): T;
-    step<T extends Tensor>(x: T, alpha?: number): T;
-    fusedConv2d({ input, filter, convInfo, bias, activation, preluActivationWeights }: FusedConv2DConfig): Tensor4D;
-    conv2d(x: Tensor4D, filter: Tensor4D, convInfo: Conv2DInfo): Tensor4D;
-    conv3d(x: Tensor5D, filter: Tensor5D, convInfo: Conv3DInfo): Tensor5D;
-    conv2dDerInput(dy: Tensor4D, filter: Tensor4D, convInfo: Conv2DInfo): Tensor4D;
-    conv3dDerInput(dy: Tensor5D, filter: Tensor5D, convInfo: Conv3DInfo): Tensor5D;
-    conv2dDerFilter(x: Tensor4D, dy: Tensor4D, convInfo: Conv2DInfo): Tensor4D;
-    conv3dDerFilter(x: Tensor5D, dy: Tensor5D, convInfo: Conv3DInfo): Tensor5D;
-    fusedDepthwiseConv2D({ input, filter, convInfo, bias, activation, preluActivationWeights }: FusedConv2DConfig): Tensor4D;
-    depthwiseConv2D(x: Tensor4D, filter: Tensor4D, convInfo: Conv2DInfo): Tensor4D;
-    depthwiseConv2DDerInput(dy: Tensor4D, filter: Tensor4D, convInfo: Conv2DInfo): Tensor4D;
-    depthwiseConv2DDerFilter(x: Tensor4D, dy: Tensor4D, convInfo: Conv2DInfo): Tensor4D;
-    tile<T extends Tensor>(x: T, reps: number[]): T;
-    pad<T extends Tensor>(x: T, paddings: Array<[number, number]>, constantValue: number): T;
-    transpose<T extends Tensor>(x: T, perm: number[]): T;
-    gather<T extends Tensor>(x: T, indices: Tensor1D, axis: number): T;
-    batchToSpaceND<T extends Tensor>(x: T, blockShape: number[], crops: number[][]): T;
-    spaceToBatchND<T extends Tensor>(x: T, blockShape: number[], paddings: Array<[number, number]>): T;
-    private pool;
-    maxPool(x: Tensor4D, convInfo: Conv2DInfo): Tensor4D;
-    private maxPoolPositions;
-    maxPoolBackprop(dy: Tensor4D, x: Tensor4D, y: Tensor4D, convInfo: Conv2DInfo): Tensor4D;
-    avgPoolBackprop(dy: Tensor4D, x: Tensor4D, convInfo: Conv2DInfo): Tensor4D;
-    private pool3d;
-    avgPool3d(x: Tensor5D, convInfo: Conv3DInfo): Tensor5D;
-    avgPool3dBackprop(dy: Tensor5D, x: Tensor5D, convInfo: Conv3DInfo): Tensor5D;
-    maxPool3d(x: Tensor5D, convInfo: Conv3DInfo): Tensor5D;
-    private maxPool3dPositions;
-    maxPool3dBackprop(dy: Tensor5D, x: Tensor5D, y: Tensor5D, convInfo: Conv3DInfo): Tensor5D;
-    cast<T extends Tensor>(x: T, dtype: DataType): T;
-    reshape<R extends Rank>(x: Tensor, shape: ShapeMap[R]): Tensor<R>;
-    avgPool(x: Tensor4D, convInfo: Conv2DInfo): Tensor4D;
-    resizeBilinear(x: Tensor4D, newHeight: number, newWidth: number, alignCorners: boolean): Tensor4D;
-    resizeBilinearBackprop(dy: Tensor4D, x: Tensor4D, alignCorners: boolean): Tensor<Rank.R4>;
-    resizeNearestNeighbor(x: Tensor4D, newHeight: number, newWidth: number, alignCorners: boolean): Tensor4D;
-    resizeNearestNeighborBackprop(dy: Tensor4D, x: Tensor4D, alignCorners: boolean): Tensor<Rank.R4>;
-    batchNormalization(x: Tensor4D, mean: Tensor4D | Tensor1D, variance: Tensor4D | Tensor1D, varianceEpsilon: number, scale?: Tensor4D | Tensor1D, offset?: Tensor4D | Tensor1D): Tensor4D;
-    localResponseNormalization4D(x: Tensor4D, depthRadius: number, bias: number, alpha: number, beta: number): Tensor4D;
-    LRNGrad(dy: Tensor4D, inputImage: Tensor4D, outputImage: Tensor4D, depthRadius: number, bias: number, alpha: number, beta: number): Tensor4D;
-    multinomial(logits: Tensor2D, normalized: boolean, numSamples: number, seed: number): Tensor2D;
-    oneHot(indices: Tensor1D, depth: number, onValue: number, offValue: number): Tensor2D;
-    nonMaxSuppression(boxes: Tensor2D, scores: Tensor1D, maxOutputSize: number, iouThreshold: number, scoreThreshold: number): Tensor1D;
-    fft(x: Tensor2D): Tensor2D;
-    ifft(x: Tensor2D): Tensor2D;
-    /**
-     * Calculate FFT of inner most elements of batch tensor.
-     */
-    private fftBatch;
-    private fftImpl;
-    private isExponentOf2;
-    private fftRadix2;
-    private fourierTransformByMatmul;
-    depthToSpace(x: Tensor4D, blockSize: number, dataFormat: 'NHWC' | 'NCHW'): Tensor4D;
-    private broadcastedBinaryOp;
-    private broadcastedBinaryComplexOp;
-    split<T extends Tensor>(x: T, sizeSplits: number[], axis: number): T[];
-    dispose(): void;
-    floatPrecision(): 16 | 32;
-    /** Returns the smallest representable number.  */
-    epsilon(): number;
-    cropAndResize(images: Tensor4D, boxes: Tensor2D, boxIndex: Tensor1D, cropSize: [number, number], method: string, extrapolationValue: number): Tensor<Rank.R4>;
-    sparseToDense<R extends Rank>(sparseIndices: Tensor, sparseValues: Tensor, outputShape: ShapeMap[R], defaultValue: Scalar): Tensor<R>;
-    gatherND(x: Tensor, indices: Tensor): Tensor;
-    scatterND<R extends Rank>(indices: Tensor, updates: Tensor, shape: ShapeMap[R]): Tensor<R>;
-    fill<R extends Rank>(shape: ShapeMap[R], value: number | string, dtype?: DataType): Tensor<R>;
-    onesLike<R extends Rank>(x: Tensor<R>): Tensor<R>;
-    zerosLike<R extends Rank>(x: Tensor<R>): Tensor<R>;
-    linspace(start: number, stop: number, num: number): Tensor1D;
-    private scatter;
-}

+ 0 - 3149
rag-server/node_modules/@tensorflow/tfjs-core/dist/backends/cpu/backend_cpu.js

@@ -1,3149 +0,0 @@
-"use strict";
-/**
- * @license
- * Copyright 2017 Google Inc. All Rights Reserved.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * =============================================================================
- */
-var __extends = (this && this.__extends) || (function () {
-    var extendStatics = function (d, b) {
-        extendStatics = Object.setPrototypeOf ||
-            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
-            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
-        return extendStatics(d, b);
-    };
-    return function (d, b) {
-        extendStatics(d, b);
-        function __() { this.constructor = d; }
-        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
-    };
-})();
-var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
-    return new (P || (P = Promise))(function (resolve, reject) {
-        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
-        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
-        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
-        step((generator = generator.apply(thisArg, _arguments || [])).next());
-    });
-};
-var __generator = (this && this.__generator) || function (thisArg, body) {
-    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
-    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
-    function verb(n) { return function (v) { return step([n, v]); }; }
-    function step(op) {
-        if (f) throw new TypeError("Generator is already executing.");
-        while (_) try {
-            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
-            if (y = 0, t) op = [op[0] & 2, t.value];
-            switch (op[0]) {
-                case 0: case 1: t = op; break;
-                case 4: _.label++; return { value: op[1], done: false };
-                case 5: _.label++; y = op[1]; op = [0]; continue;
-                case 7: op = _.ops.pop(); _.trys.pop(); continue;
-                default:
-                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
-                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
-                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
-                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
-                    if (t[2]) _.ops.pop();
-                    _.trys.pop(); continue;
-            }
-            op = body.call(thisArg, _);
-        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
-        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
-    }
-};
-Object.defineProperty(exports, "__esModule", { value: true });
-var seedrandom = require("seedrandom");
-var engine_1 = require("../../engine");
-var environment_1 = require("../../environment");
-var log_1 = require("../../log");
-var array_ops_util = require("../../ops/array_ops_util");
-var axis_util = require("../../ops/axis_util");
-var broadcast_util = require("../../ops/broadcast_util");
-var complex_ops_1 = require("../../ops/complex_ops");
-var concat_util = require("../../ops/concat_util");
-var erf_util = require("../../ops/erf_util");
-var gather_nd_util = require("../../ops/gather_nd_util");
-var ops = require("../../ops/ops");
-var ops_1 = require("../../ops/ops");
-var scatter_nd_util = require("../../ops/scatter_nd_util");
-var selu_util = require("../../ops/selu_util");
-var slice_util_1 = require("../../ops/slice_util");
-var tensor_1 = require("../../tensor");
-var types_1 = require("../../types");
-var util = require("../../util");
-var util_1 = require("../../util");
-var backend_1 = require("../backend");
-var backend_util = require("../backend_util");
-var complex_util = require("../complex_util");
-var non_max_suppression_impl_1 = require("../non_max_suppression_impl");
-var split_shared_1 = require("../split_shared");
-var tile_impl_1 = require("../tile_impl");
-var topk_impl_1 = require("../topk_impl");
-var where_impl_1 = require("../where_impl");
-var cpu_util_1 = require("./cpu_util");
-function mapActivation(backend, x, activation, preluActivationWeights) {
-    if (activation === 'linear') {
-        return backend.linear(x);
-    }
-    else if (activation === 'relu') {
-        return backend.relu(x);
-    }
-    else if (activation === 'elu') {
-        return backend.elu(x);
-    }
-    else if (activation === 'relu6') {
-        return backend.relu6(x);
-    }
-    else if (activation === 'prelu') {
-        return backend.prelu(x, preluActivationWeights);
-    }
-    throw new Error("Activation " + activation + " has not been implemented for the CPU backend.");
-}
-var MathBackendCPU = /** @class */ (function (_super) {
-    __extends(MathBackendCPU, _super);
-    function MathBackendCPU() {
-        var _this = _super.call(this) || this;
-        _this.blockSize = 48;
-        _this.firstUse = true;
-        _this.data = new backend_1.DataStorage(_this, engine_1.ENGINE);
-        return _this;
-    }
-    MathBackendCPU.prototype.write = function (values, shape, dtype) {
-        if (this.firstUse) {
-            this.firstUse = false;
-            if (environment_1.env().get('IS_NODE')) {
-                log_1.warn('\n============================\n' +
-                    'Hi there 👋. Looks like you are running TensorFlow.js in ' +
-                    'Node.js. To speed things up dramatically, install our node ' +
-                    'backend, which binds to TensorFlow C++, by running ' +
-                    'npm i @tensorflow/tfjs-node, ' +
-                    'or npm i @tensorflow/tfjs-node-gpu if you have CUDA. ' +
-                    'Then call require(\'@tensorflow/tfjs-node\'); (-gpu ' +
-                    'suffix for CUDA) at the start of your program. ' +
-                    'Visit https://github.com/tensorflow/tfjs-node for more details.' +
-                    '\n============================');
-            }
-        }
-        var dataId = {};
-        this.data.set(dataId, { values: values, dtype: dtype });
-        return dataId;
-    };
-    MathBackendCPU.prototype.move = function (dataId, values, shape, dtype) {
-        this.data.set(dataId, { values: values, dtype: dtype });
-    };
-    MathBackendCPU.prototype.numDataIds = function () {
-        return this.data.numDataIds();
-    };
-    MathBackendCPU.prototype.read = function (dataId) {
-        return __awaiter(this, void 0, void 0, function () {
-            return __generator(this, function (_a) {
-                return [2 /*return*/, this.readSync(dataId)];
-            });
-        });
-    };
-    MathBackendCPU.prototype.readSync = function (dataId) {
-        var _a = this.data.get(dataId), dtype = _a.dtype, complexTensors = _a.complexTensors;
-        if (dtype === 'complex64') {
-            var realValues = this.readSync(complexTensors.real.dataId);
-            var imagValues = this.readSync(complexTensors.imag.dataId);
-            return complex_util.mergeRealAndImagArrays(realValues, imagValues);
-        }
-        return this.data.get(dataId).values;
-    };
-    MathBackendCPU.prototype.bufferSync = function (t) {
-        var data = this.readSync(t.dataId);
-        var decodedData = data;
-        if (t.dtype === 'string') {
-            try {
-                // Decode the bytes into string.
-                decodedData = data.map(function (d) { return util.decodeString(d); });
-            }
-            catch (_a) {
-                throw new Error('Failed to decode encoded string bytes into utf-8');
-            }
-        }
-        return ops_1.buffer(t.shape, t.dtype, decodedData);
-    };
-    MathBackendCPU.prototype.makeOutput = function (values, shape, dtype) {
-        var dataId = this.write(values, shape, dtype);
-        return engine_1.ENGINE.makeTensorFromDataId(dataId, shape, dtype, this);
-    };
-    MathBackendCPU.prototype.disposeData = function (dataId) {
-        if (this.data.has(dataId)) {
-            var complexTensors = this.data.get(dataId).complexTensors;
-            if (complexTensors != null) {
-                complexTensors.real.dispose();
-                complexTensors.imag.dispose();
-            }
-            this.data.delete(dataId);
-        }
-    };
-    MathBackendCPU.prototype.time = function (f) {
-        return __awaiter(this, void 0, void 0, function () {
-            var start, kernelMs;
-            return __generator(this, function (_a) {
-                start = util_1.now();
-                f();
-                kernelMs = util_1.now() - start;
-                return [2 /*return*/, { kernelMs: kernelMs }];
-            });
-        });
-    };
-    MathBackendCPU.prototype.memory = function () {
-        return {
-            // Unreliable due to automatic gc. The numbers above are cumulative.
-            unreliable: true,
-            reasons: ['The reported memory is an upper bound. Due to automatic garbage ' +
-                    'collection, the true allocated memory may be less.']
-        };
-    };
-    MathBackendCPU.prototype.complex = function (real, imag) {
-        var result = this.makeOutput(null, real.shape, 'complex64');
-        var resultData = this.data.get(result.dataId);
-        // The backend owns the reference to the underlying real and imaginary
-        // clones. These will explicitly get disposed when the complex tensor is
-        // disposed.
-        resultData.complexTensors = {
-            real: engine_1.ENGINE.keep(real.clone()),
-            imag: engine_1.ENGINE.keep(imag.clone())
-        };
-        return result;
-    };
-    MathBackendCPU.prototype.real = function (input) {
-        var resultData = this.data.get(input.dataId);
-        return resultData.complexTensors.real.clone();
-    };
-    MathBackendCPU.prototype.imag = function (input) {
-        var resultData = this.data.get(input.dataId);
-        return resultData.complexTensors.imag.clone();
-    };
-    MathBackendCPU.prototype.slice = function (x, begin, size) {
-        cpu_util_1.assertNotComplex(x, 'slice');
-        var isContinous = slice_util_1.isSliceContinous(x.shape, begin, size);
-        if (isContinous) {
-            var flatOffset = slice_util_1.computeFlatOffset(begin, x.strides);
-            var length_1 = util.sizeFromShape(size);
-            var vals = this.readSync(x.dataId);
-            return ops_1.tensor(vals.subarray(flatOffset, flatOffset + length_1), size, x.dtype);
-        }
-        var buffer = ops.buffer(size, x.dtype);
-        var xBuf = this.bufferSync(x);
-        for (var i = 0; i < buffer.size; ++i) {
-            var loc = buffer.indexToLoc(i);
-            var xLoc = loc.map(function (idx, j) { return idx + begin[j]; });
-            buffer.values[i] = xBuf.get.apply(xBuf, xLoc);
-        }
-        return buffer.toTensor();
-    };
-    MathBackendCPU.prototype.stridedSlice = function (x, begin, end, strides) {
-        cpu_util_1.assertNotComplex(x, 'stridedSlice');
-        var outShape = slice_util_1.computeOutShape(begin, end, strides);
-        if (outShape.some(function (axis) { return axis === 0; })) {
-            return ops.tensor([], outShape);
-        }
-        var buffer = ops.buffer(outShape, x.dtype);
-        var xBuf = this.bufferSync(x);
-        for (var i = 0; i < buffer.size; i++) {
-            var loc = buffer.indexToLoc(i);
-            var newLoc = new Array(loc.length);
-            for (var j = 0; j < newLoc.length; j++) {
-                newLoc[j] = loc[j] * strides[j] + begin[j];
-            }
-            buffer.set.apply(buffer, [xBuf.get.apply(xBuf, newLoc)].concat(loc));
-        }
-        return buffer.toTensor();
-    };
-    MathBackendCPU.prototype.diag = function (x) {
-        var xVals = this.readSync(x.dataId);
-        var buffer = ops.buffer([x.size, x.size], x.dtype);
-        var vals = buffer.values;
-        for (var i = 0; i < xVals.length; i++) {
-            vals[i * x.size + i] = xVals[i];
-        }
-        return buffer.toTensor();
-    };
-    MathBackendCPU.prototype.unstack = function (x, axis) {
-        var num = x.shape[axis];
-        var outShape = new Array(x.rank - 1);
-        var outIndex = 0;
-        for (var i = 0; i < x.rank; i++) {
-            if (i !== axis) {
-                outShape[outIndex++] = x.shape[i];
-            }
-        }
-        var begin = new Array(x.rank).fill(0);
-        var size = x.shape.slice();
-        size[axis] = 1;
-        var res = new Array(num);
-        for (var i = 0; i < res.length; i++) {
-            begin[axis] = i;
-            res[i] = this.slice(x, begin, size).reshape(outShape);
-        }
-        return res;
-    };
-    MathBackendCPU.prototype.reverse = function (x, axis) {
-        cpu_util_1.assertNotComplex(x, 'reverse');
-        var buffer = ops.buffer(x.shape, x.dtype);
-        var xBuf = this.bufferSync(x);
-        var _loop_1 = function (i) {
-            var outLoc = buffer.indexToLoc(i);
-            var inLoc = outLoc.slice();
-            axis.forEach(function (ax) { return inLoc[ax] = x.shape[ax] - 1 - inLoc[ax]; });
-            buffer.set.apply(buffer, [xBuf.get.apply(xBuf, inLoc)].concat(outLoc));
-        };
-        for (var i = 0; i < buffer.size; i++) {
-            _loop_1(i);
-        }
-        return buffer.toTensor();
-    };
-    MathBackendCPU.prototype.concat = function (tensors, axis) {
-        var _this = this;
-        if (tensors[0].dtype === 'complex64') {
-            var reals = tensors.map(function (t) { return complex_ops_1.real(t); });
-            var imags = tensors.map(function (t) { return complex_ops_1.imag(t); });
-            return complex_ops_1.complex(this.concat(reals, axis), this.concat(imags, axis));
-        }
-        var tensors2D = tensors.map(function (t) {
-            var innerSize = util.sizeFromShape(t.shape.slice(axis));
-            return t.as2D(-1, innerSize);
-        });
-        var outShape = concat_util.computeOutShape(tensors2D.map(function (t) { return t.shape; }), 1 /* axis */);
-        var values = ops.buffer(outShape, tensors[0].dtype)
-            .values;
-        if (tensors2D[0].shape[0] === 1) {
-            // Use built-in TypedArray.set() method for speed.
-            var offset_1 = 0;
-            tensors2D.forEach(function (t) {
-                values.set(_this.readSync(t.dataId), offset_1);
-                offset_1 += t.size;
-            });
-        }
-        else {
-            var colOffset_1 = 0;
-            tensors2D.forEach(function (t) {
-                var tVals = _this.readSync(t.dataId);
-                var tIdx = 0;
-                for (var row = 0; row < t.shape[0]; ++row) {
-                    var resIdx = row * outShape[1] + colOffset_1;
-                    for (var col = 0; col < t.shape[1]; ++col) {
-                        values[resIdx + col] = tVals[tIdx++];
-                    }
-                }
-                colOffset_1 += t.shape[1];
-            });
-        }
-        var finalOutShape = concat_util.computeOutShape(tensors.map(function (t) { return t.shape; }), axis);
-        return ops_1.tensor(values, finalOutShape, tensors[0].dtype);
-    };
-    MathBackendCPU.prototype.neg = function (x) {
-        cpu_util_1.assertNotComplex(x, 'neg');
-        return this.multiply(ops.scalar(-1), x);
-    };
-    MathBackendCPU.prototype.add = function (a, b) {
-        if (a.dtype === 'complex64' || b.dtype === 'complex64') {
-            return this.broadcastedBinaryComplexOp(a.cast('complex64'), b.cast('complex64'), function (aReal, aImag, bReal, bImag) {
-                return { real: aReal + bReal, imag: aImag + bImag };
-            });
-        }
-        return this.broadcastedBinaryOp(a, b, types_1.upcastType(a.dtype, b.dtype), function (aValue, bValue) { return aValue + bValue; });
-    };
-    MathBackendCPU.prototype.addN = function (tensors) {
-        var _this = this;
-        cpu_util_1.assertNotComplex(tensors, 'addN');
-        var vals = tensors.map(function (t) { return _this.readSync(t.dataId); });
-        var result = ops.buffer(tensors[0].shape, tensors[0].dtype);
-        var resultVals = result.values;
-        for (var i = 0; i < tensors.length; i++) {
-            var currVals = vals[i];
-            for (var j = 0; j < resultVals.length; j++) {
-                resultVals[j] += currVals[j];
-            }
-        }
-        return result.toTensor();
-    };
-    MathBackendCPU.prototype.softmax = function (logits, dim) {
-        var axes = util.parseAxisParam([dim], logits.shape);
-        var maxLogit = this.max(logits, axes);
-        var expandedShape = axis_util.expandShapeToKeepDim(maxLogit.shape, axes);
-        var a = this.subtract(logits, maxLogit.reshape(expandedShape));
-        var b = this.exp(a);
-        var sumExp = this.sum(b, axes).reshape(expandedShape);
-        return this.realDivide(b, sumExp);
-    };
-    MathBackendCPU.prototype.subtract = function (a, b) {
-        if (a.dtype === 'complex64' || b.dtype === 'complex64') {
-            return this.broadcastedBinaryComplexOp(a.cast('complex64'), b.cast('complex64'), function (aReal, aImag, bReal, bImag) {
-                return { real: aReal - bReal, imag: aImag - bImag };
-            });
-        }
-        return this.broadcastedBinaryOp(a, b, types_1.upcastType(a.dtype, b.dtype), function (aValue, bValue) { return aValue - bValue; });
-    };
-    MathBackendCPU.prototype.pow = function (a, b) {
-        cpu_util_1.assertNotComplex([a, b], 'pow');
-        return this.broadcastedBinaryOp(a, b, a.dtype, function (aValue, bValue) { return Math.pow(aValue, bValue); });
-    };
-    MathBackendCPU.prototype.batchMatMul = function (a, b, transposeA, transposeB) {
-        cpu_util_1.assertNotComplex([a, b], 'matMul');
-        var sharedDim = transposeA ? a.shape[1] : a.shape[2];
-        var leftDim = transposeA ? a.shape[2] : a.shape[1];
-        var rightDim = transposeB ? b.shape[1] : b.shape[2];
-        var batchDim = a.shape[0];
-        var aValues = this.readSync(a.dataId);
-        var bValues = this.readSync(b.dataId);
-        var _a = transposeA ?
-            [a.strides[0], 1, a.strides[1]] :
-            [a.strides[0], a.strides[1], 1], aBatch = _a[0], aOuterStep = _a[1], aInnerStep = _a[2];
-        var _b = transposeB ?
-            [1, b.strides[1], b.strides[0]] :
-            [b.strides[1], 1, b.strides[0]], bInnerStep = _b[0], bOuterStep = _b[1], bBatch = _b[2];
-        var size = leftDim * rightDim;
-        var result = ops_1.buffer([batchDim, leftDim, rightDim], a.dtype);
-        var resVals = result.values;
-        var blockSize = this.blockSize;
-        for (var b_1 = 0; b_1 < batchDim; b_1++) {
-            for (var i0 = 0; i0 < leftDim; i0 += blockSize) {
-                for (var j0 = 0; j0 < rightDim; j0 += blockSize) {
-                    for (var k0 = 0; k0 < sharedDim; k0 += blockSize) {
-                        // for when blockSize doesn't evenly divide the input
-                        var iBlock = Math.min(i0 + blockSize, leftDim);
-                        var jBlock = Math.min(j0 + blockSize, rightDim);
-                        var kBlock = Math.min(k0 + blockSize, sharedDim);
-                        for (var i = i0; i < iBlock; i++) {
-                            for (var j = j0; j < jBlock; j++) {
-                                var sum = 0.0;
-                                for (var k = k0; k < kBlock; k++) {
-                                    sum += aValues[b_1 * aBatch + i * aOuterStep + k * aInnerStep] *
-                                        bValues[k * bInnerStep + j * bOuterStep + b_1 * bBatch];
-                                }
-                                resVals[b_1 * size + (i * rightDim + j)] += sum;
-                            }
-                        }
-                    }
-                }
-            }
-        }
-        return result.toTensor();
-    };
-    MathBackendCPU.prototype.fusedBatchMatMul = function (_a) {
-        var a = _a.a, b = _a.b, transposeA = _a.transposeA, transposeB = _a.transposeB, bias = _a.bias, activation = _a.activation, preluActivationWeights = _a.preluActivationWeights;
-        var result = this.batchMatMul(a, b, transposeA, transposeB);
-        if (bias) {
-            result = this.add(result, bias);
-        }
-        if (activation) {
-            result =
-                mapActivation(this, result, activation, preluActivationWeights);
-        }
-        return result;
-    };
-    MathBackendCPU.prototype.multiply = function (a, b) {
-        if (a.dtype === 'complex64' || b.dtype === 'complex64') {
-            return this.broadcastedBinaryComplexOp(a.cast('complex64'), b.cast('complex64'), function (aReal, aImag, bReal, bImag) {
-                return {
-                    real: aReal * bReal - aImag * bImag,
-                    imag: aReal * bImag + aImag * bReal
-                };
-            });
-        }
-        return this.broadcastedBinaryOp(a, b, types_1.upcastType(a.dtype, b.dtype), function (aValue, bValue) { return aValue * bValue; });
-    };
-    MathBackendCPU.prototype.realDivide = function (a, b) {
-        cpu_util_1.assertNotComplex([a, b], 'realDivide');
-        var op = function (a, b) { return a / b; };
-        var outputDtype = 'float32';
-        return this.broadcastedBinaryOp(a, b, outputDtype, op);
-    };
-    MathBackendCPU.prototype.floorDiv = function (a, b) {
-        cpu_util_1.assertNotComplex([a, b], 'floorDiv');
-        var op = function (a, b) { return Math.floor(a / b); };
-        var outputDtype = 'int32';
-        return this.broadcastedBinaryOp(a, b, outputDtype, op);
-    };
-    MathBackendCPU.prototype.sum = function (x, axes) {
-        cpu_util_1.assertNotComplex(x, 'sum');
-        axis_util.assertAxesAreInnerMostDims('sum', axes, x.rank);
-        var _a = axis_util.computeOutAndReduceShapes(x.shape, axes), outShape = _a[0], reduceShape = _a[1];
-        var resultDtype = types_1.upcastType(x.dtype, 'int32');
-        var result = ops.zeros(outShape, resultDtype);
-        var reduceSize = util.sizeFromShape(reduceShape);
-        var vals = this.readSync(result.dataId);
-        var aVals = this.readSync(x.dataId);
-        for (var i = 0; i < vals.length; ++i) {
-            var offset = i * reduceSize;
-            var sum = 0;
-            for (var j = 0; j < reduceSize; ++j) {
-                sum += aVals[offset + j];
-            }
-            vals[i] = sum;
-        }
-        return result;
-    };
-    MathBackendCPU.prototype.prod = function (x, axes) {
-        cpu_util_1.assertNotComplex(x, 'sum');
-        var _a = axis_util.computeOutAndReduceShapes(x.shape, axes), outShape = _a[0], reduceShape = _a[1];
-        var resultDtype = types_1.upcastType(x.dtype, 'int32');
-        var result = ops.zeros(outShape, resultDtype);
-        var reduceSize = util.sizeFromShape(reduceShape);
-        var vals = this.readSync(result.dataId);
-        var aVals = this.readSync(x.dataId);
-        for (var i = 0; i < vals.length; ++i) {
-            var offset = i * reduceSize;
-            var prod = 1;
-            for (var j = 0; j < reduceSize; ++j) {
-                prod *= aVals[offset + j];
-            }
-            vals[i] = prod;
-        }
-        return result;
-    };
-    MathBackendCPU.prototype.unsortedSegmentSum = function (x, segmentIds, numSegments) {
-        cpu_util_1.assertNotComplex(x, 'unsortedSegmentSum');
-        var res = [];
-        // Reshape the segment id's so that they can be broadcast with
-        // x. The new shape should be [segmentIds.shape, 1, ..., 1]
-        var numIters = x.rank - segmentIds.rank;
-        for (var i = 0; i < numIters; ++i) {
-            segmentIds = segmentIds.expandDims(i + 1);
-        }
-        for (var i = 0; i < numSegments; ++i) {
-            var segmentId = ops.scalar(i, 'int32');
-            var mask = ops.equal(segmentId, segmentIds).asType('float32');
-            var sum = mask.mul(x).sum(0);
-            res.push(sum);
-        }
-        return ops.stack(res);
-    };
-    MathBackendCPU.prototype.argMin = function (x, axis) {
-        cpu_util_1.assertNotComplex(x, 'argMin');
-        var axes = [axis];
-        axis_util.assertAxesAreInnerMostDims('argMin', axes, x.rank);
-        var _a = axis_util.computeOutAndReduceShapes(x.shape, axes), outShape = _a[0], reduceShape = _a[1];
-        var result = ops.zeros(outShape, 'int32');
-        var reduceSize = util.sizeFromShape(reduceShape);
-        var vals = this.readSync(result.dataId);
-        var aVals = this.readSync(x.dataId);
-        for (var i = 0; i < vals.length; ++i) {
-            var offset = i * reduceSize;
-            var min = aVals[offset];
-            var minIndex = 0;
-            for (var j = 0; j < reduceSize; ++j) {
-                var value = aVals[offset + j];
-                if (value < min) {
-                    min = value;
-                    minIndex = j;
-                }
-            }
-            vals[i] = minIndex;
-        }
-        return result;
-    };
-    MathBackendCPU.prototype.argMax = function (x, axis) {
-        cpu_util_1.assertNotComplex(x, 'argMax');
-        var axes = [axis];
-        axis_util.assertAxesAreInnerMostDims('argMax', axes, x.rank);
-        var _a = axis_util.computeOutAndReduceShapes(x.shape, axes), outShape = _a[0], reduceShape = _a[1];
-        var result = ops.zeros(outShape, 'int32');
-        var reduceSize = util.sizeFromShape(reduceShape);
-        var vals = this.readSync(result.dataId);
-        var aVals = this.readSync(x.dataId);
-        for (var i = 0; i < vals.length; ++i) {
-            var offset = i * reduceSize;
-            var max = aVals[offset];
-            var maxIndex = 0;
-            for (var j = 0; j < reduceSize; ++j) {
-                var value = aVals[offset + j];
-                if (value > max) {
-                    max = value;
-                    maxIndex = j;
-                }
-            }
-            vals[i] = maxIndex;
-        }
-        return result;
-    };
-    MathBackendCPU.prototype.cumsum = function (x, axis, exclusive, reverse) {
-        cpu_util_1.assertNotComplex(x, 'cumsum');
-        if (axis !== x.rank - 1) {
-            throw new Error("backend.cumsum in CPU expects an inner-most axis=" + (x.rank - 1) + " " +
-                ("but got axis=" + axis));
-        }
-        var resultDtype = types_1.upcastType(x.dtype, 'int32');
-        var result = ops.zeros(x.shape, resultDtype);
-        var vals = this.readSync(result.dataId);
-        var aVals = this.readSync(x.dataId);
-        var finalDim = x.shape[x.rank - 1];
-        var indexAdjuster = reverse ?
-            function (i, j) { return i + finalDim - j - 1; } :
-            function (i, j) { return i + j; };
-        for (var i = 0; i < aVals.length; i += finalDim) {
-            for (var j = 0; j < finalDim; j++) {
-                var idx = indexAdjuster(i, j);
-                if (j === 0) {
-                    vals[idx] = exclusive ? 0 : aVals[idx];
-                }
-                else {
-                    var prevIdx = indexAdjuster(i, j - 1);
-                    vals[idx] = exclusive ? aVals[prevIdx] + vals[prevIdx] :
-                        aVals[idx] + vals[prevIdx];
-                }
-            }
-        }
-        return result;
-    };
-    MathBackendCPU.prototype.equal = function (a, b) {
-        cpu_util_1.assertNotComplex([a, b], 'equal');
-        return this.broadcastedBinaryOp(a, b, 'bool', function (aVal, bVal) {
-            return (aVal === bVal) ? 1 : 0;
-        });
-    };
-    MathBackendCPU.prototype.notEqual = function (a, b) {
-        cpu_util_1.assertNotComplex([a, b], 'notEqual');
-        return this.broadcastedBinaryOp(a, b, 'bool', function (aVal, bVal) {
-            return (aVal !== bVal) ? 1 : 0;
-        });
-    };
-    MathBackendCPU.prototype.less = function (a, b) {
-        cpu_util_1.assertNotComplex([a, b], 'less');
-        return this.broadcastedBinaryOp(a, b, 'bool', function (aVal, bVal) {
-            return (aVal < bVal) ? 1 : 0;
-        });
-    };
-    MathBackendCPU.prototype.lessEqual = function (a, b) {
-        cpu_util_1.assertNotComplex([a, b], 'lessEqual');
-        return this.broadcastedBinaryOp(a, b, 'bool', function (aVal, bVal) {
-            return (aVal <= bVal) ? 1 : 0;
-        });
-    };
-    MathBackendCPU.prototype.greater = function (a, b) {
-        cpu_util_1.assertNotComplex([a, b], 'greater');
-        return this.broadcastedBinaryOp(a, b, 'bool', function (aVal, bVal) {
-            return (aVal > bVal) ? 1 : 0;
-        });
-    };
-    MathBackendCPU.prototype.greaterEqual = function (a, b) {
-        cpu_util_1.assertNotComplex([a, b], 'greaterEqual');
-        return this.broadcastedBinaryOp(a, b, 'bool', function (aVal, bVal) {
-            return (aVal >= bVal) ? 1 : 0;
-        });
-    };
-    MathBackendCPU.prototype.logicalNot = function (x) {
-        cpu_util_1.assertNotComplex(x, 'logicalNot');
-        var values = this.readSync(x.dataId);
-        var newValues = new Uint8Array(values.length);
-        for (var i = 0; i < values.length; ++i) {
-            newValues[i] = values[i] ? 0 : 1;
-        }
-        return this.makeOutput(newValues, x.shape, 'bool');
-    };
-    MathBackendCPU.prototype.logicalAnd = function (a, b) {
-        cpu_util_1.assertNotComplex([a, b], 'logicalAnd');
-        return this.broadcastedBinaryOp(a, b, 'bool', function (aVal, bVal) {
-            return aVal && bVal;
-        });
-    };
-    MathBackendCPU.prototype.logicalOr = function (a, b) {
-        cpu_util_1.assertNotComplex([a, b], 'logicalOr');
-        return this.broadcastedBinaryOp(a, b, 'bool', function (aVal, bVal) {
-            return aVal || bVal;
-        });
-    };
-    MathBackendCPU.prototype.select = function (condition, a, b) {
-        cpu_util_1.assertNotComplex([condition, a, b], 'select');
-        var values = this.readSync(condition.dataId);
-        var aValues = this.readSync(a.dataId);
-        var bValues = this.readSync(b.dataId);
-        var result = ops.zeros(a.shape, types_1.upcastType(a.dtype, b.dtype));
-        var newValues = this.readSync(result.dataId);
-        var index = 0;
-        var offset = condition.rank === 0 || condition.rank > 1 || a.rank === 1 ?
-            1 :
-            util.sizeFromShape(a.shape.slice(1));
-        for (var i = 0; i < values.length; i++) {
-            for (var j = 0; j < offset; j++) {
-                if (values[i] === 1) {
-                    newValues[index++] = aValues[i];
-                }
-                else {
-                    newValues[index++] = bValues[i];
-                }
-            }
-        }
-        return result;
-    };
-    MathBackendCPU.prototype.where = function (condition) {
-        cpu_util_1.assertNotComplex([condition], 'where');
-        var condVals = this.readSync(condition.dataId);
-        return where_impl_1.whereImpl(condition.shape, condVals);
-    };
-    MathBackendCPU.prototype.topk = function (x, k, sorted) {
-        cpu_util_1.assertNotComplex(x, 'topk');
-        var xVals = this.readSync(x.dataId);
-        return topk_impl_1.topkImpl(xVals, x.shape, x.dtype, k, sorted);
-    };
-    MathBackendCPU.prototype.min = function (x, axes) {
-        cpu_util_1.assertNotComplex(x, 'min');
-        axis_util.assertAxesAreInnerMostDims('min', axes, x.rank);
-        var _a = axis_util.computeOutAndReduceShapes(x.shape, axes), outShape = _a[0], reduceShape = _a[1];
-        var result = ops.zeros(outShape, x.dtype);
-        var reduceSize = util.sizeFromShape(reduceShape);
-        var vals = this.readSync(result.dataId);
-        var aVals = this.readSync(x.dataId);
-        for (var i = 0; i < vals.length; ++i) {
-            var offset = i * reduceSize;
-            var min = aVals[offset];
-            for (var j = 0; j < reduceSize; ++j) {
-                var value = aVals[offset + j];
-                if (value < min) {
-                    min = value;
-                }
-            }
-            vals[i] = min;
-        }
-        return result;
-    };
-    MathBackendCPU.prototype.minimum = function (a, b) {
-        cpu_util_1.assertNotComplex([a, b], 'minimum');
-        return this.broadcastedBinaryOp(a, b, a.dtype, function (aVal, bVal) { return Math.min(aVal, bVal); });
-    };
-    MathBackendCPU.prototype.mod = function (a, b) {
-        cpu_util_1.assertNotComplex([a, b], 'mod');
-        return this.broadcastedBinaryOp(a, b, a.dtype, function (aVal, bVal) {
-            var rem = aVal % bVal;
-            if ((aVal < 0 && bVal < 0) || (aVal >= 0 && bVal >= 0)) {
-                return rem;
-            }
-            else {
-                return (rem + bVal) % bVal;
-            }
-        });
-    };
-    MathBackendCPU.prototype.max = function (x, axes) {
-        cpu_util_1.assertNotComplex(x, 'max');
-        axis_util.assertAxesAreInnerMostDims('max', axes, x.rank);
-        var _a = axis_util.computeOutAndReduceShapes(x.shape, axes), outShape = _a[0], reduceShape = _a[1];
-        var result = ops.zeros(outShape, x.dtype);
-        var reduceSize = util.sizeFromShape(reduceShape);
-        var vals = this.readSync(result.dataId);
-        var aVals = this.readSync(x.dataId);
-        for (var i = 0; i < vals.length; ++i) {
-            var offset = i * reduceSize;
-            var max = aVals[offset];
-            for (var j = 0; j < reduceSize; ++j) {
-                var value = aVals[offset + j];
-                if (value > max) {
-                    max = value;
-                }
-            }
-            vals[i] = max;
-        }
-        return result;
-    };
-    MathBackendCPU.prototype.maximum = function (a, b) {
-        cpu_util_1.assertNotComplex([a, b], 'maximum');
-        return this.broadcastedBinaryOp(a, b, a.dtype, function (aVal, bVal) { return Math.max(aVal, bVal); });
-    };
-    MathBackendCPU.prototype.all = function (x, axes) {
-        cpu_util_1.assertNotComplex(x, 'all');
-        axis_util.assertAxesAreInnerMostDims('all', axes, x.rank);
-        var _a = axis_util.computeOutAndReduceShapes(x.shape, axes), outShape = _a[0], reduceShape = _a[1];
-        var result = ops.zeros(outShape, x.dtype);
-        var reduceSize = util.sizeFromShape(reduceShape);
-        var vals = this.readSync(result.dataId);
-        var aVals = this.readSync(x.dataId);
-        for (var i = 0; i < vals.length; ++i) {
-            var offset = i * reduceSize;
-            var all = aVals[offset];
-            for (var j = 0; j < reduceSize; ++j) {
-                var value = aVals[offset + j];
-                all = all && value;
-            }
-            vals[i] = all;
-        }
-        return result;
-    };
-    MathBackendCPU.prototype.any = function (x, axes) {
-        cpu_util_1.assertNotComplex(x, 'any');
-        axis_util.assertAxesAreInnerMostDims('any', axes, x.rank);
-        var _a = axis_util.computeOutAndReduceShapes(x.shape, axes), outShape = _a[0], reduceShape = _a[1];
-        var result = ops.zeros(outShape, x.dtype);
-        var reduceSize = util.sizeFromShape(reduceShape);
-        var vals = this.readSync(result.dataId);
-        var aVals = this.readSync(x.dataId);
-        for (var i = 0; i < vals.length; ++i) {
-            var offset = i * reduceSize;
-            var anyVal = aVals[offset];
-            for (var j = 0; j < reduceSize; ++j) {
-                var value = aVals[offset + j];
-                anyVal = anyVal || value;
-            }
-            vals[i] = anyVal;
-        }
-        return result;
-    };
-    MathBackendCPU.prototype.squaredDifference = function (a, b) {
-        cpu_util_1.assertNotComplex([a, b], 'squaredDifference');
-        return this.broadcastedBinaryOp(a, b, a.dtype, function (aVal, bVal) {
-            var diff = aVal - bVal;
-            return diff * diff;
-        });
-    };
-    MathBackendCPU.prototype.ceil = function (x) {
-        cpu_util_1.assertNotComplex(x, 'ceil');
-        var values = this.readSync(x.dataId);
-        var newValues = new Float32Array(values.length);
-        for (var i = 0; i < values.length; ++i) {
-            newValues[i] = Math.ceil(values[i]);
-        }
-        return this.makeOutput(newValues, x.shape, 'float32');
-    };
-    MathBackendCPU.prototype.floor = function (x) {
-        cpu_util_1.assertNotComplex(x, 'floor');
-        var values = this.readSync(x.dataId);
-        var newValues = new Float32Array(values.length);
-        for (var i = 0; i < values.length; ++i) {
-            newValues[i] = Math.floor(values[i]);
-        }
-        return this.makeOutput(newValues, x.shape, 'float32');
-    };
-    MathBackendCPU.prototype.sign = function (x) {
-        cpu_util_1.assertNotComplex(x, 'x');
-        var values = this.readSync(x.dataId);
-        var newValues = new Float32Array(values.length);
-        for (var i = 0; i < values.length; ++i) {
-            if (values[i] < 0) {
-                newValues[i] = -1;
-            }
-            else if (values[i] > 0) {
-                newValues[i] = 1;
-            }
-            else {
-                newValues[i] = 0;
-            }
-        }
-        return this.makeOutput(newValues, x.shape, 'float32');
-    };
-    MathBackendCPU.prototype.isNaN = function (x) {
-        cpu_util_1.assertNotComplex(x, 'x');
-        var values = this.readSync(x.dataId);
-        var newValues = new Uint8Array(values.length);
-        for (var i = 0; i < values.length; ++i) {
-            if (Number.isNaN(values[i])) {
-                newValues[i] = 1;
-            }
-        }
-        return this.makeOutput(newValues, x.shape, 'bool');
-    };
-    MathBackendCPU.prototype.isInf = function (x) {
-        cpu_util_1.assertNotComplex(x, 'x');
-        var values = this.readSync(x.dataId);
-        var newValues = new Uint8Array(values.length);
-        for (var i = 0; i < values.length; ++i) {
-            if (Math.abs(values[i]) === Infinity) {
-                newValues[i] = 1;
-            }
-        }
-        return this.makeOutput(newValues, x.shape, 'bool');
-    };
-    MathBackendCPU.prototype.isFinite = function (x) {
-        cpu_util_1.assertNotComplex(x, 'x');
-        var values = this.readSync(x.dataId);
-        var newValues = new Uint8Array(values.length);
-        for (var i = 0; i < values.length; ++i) {
-            if (Number.isFinite(values[i])) {
-                newValues[i] = 1;
-            }
-        }
-        return this.makeOutput(newValues, x.shape, 'bool');
-    };
-    MathBackendCPU.prototype.round = function (x) {
-        cpu_util_1.assertNotComplex(x, 'round');
-        var values = this.readSync(x.dataId);
-        var newValues = new Float32Array(values.length);
-        for (var i = 0; i < values.length; ++i) {
-            // The algorithm is based on banker's rounding.
-            var base = Math.floor(values[i]);
-            if (values[i] - base < 0.5) {
-                newValues[i] = Math.floor(values[i]);
-            }
-            else if (values[i] - base > 0.5) {
-                newValues[i] = Math.ceil(values[i]);
-            }
-            else {
-                if (base % 2.0 === 0.0) {
-                    newValues[i] = base;
-                }
-                else {
-                    newValues[i] = base + 1.0;
-                }
-            }
-        }
-        return this.makeOutput(newValues, x.shape, 'float32');
-    };
-    MathBackendCPU.prototype.exp = function (x) {
-        cpu_util_1.assertNotComplex(x, 'exp');
-        var values = this.readSync(x.dataId);
-        var newValues = new Float32Array(values.length);
-        for (var i = 0; i < values.length; ++i) {
-            newValues[i] = Math.exp(values[i]);
-        }
-        return this.makeOutput(newValues, x.shape, 'float32');
-    };
-    MathBackendCPU.prototype.expm1 = function (x) {
-        cpu_util_1.assertNotComplex(x, 'expm1');
-        var values = this.readSync(x.dataId);
-        var newValues = new Float32Array(values.length);
-        for (var i = 0; i < values.length; ++i) {
-            newValues[i] = Math.expm1(values[i]);
-        }
-        return this.makeOutput(newValues, x.shape, 'float32');
-    };
-    MathBackendCPU.prototype.log = function (x) {
-        cpu_util_1.assertNotComplex(x, 'log');
-        var values = this.readSync(x.dataId);
-        var newValues = new Float32Array(values.length);
-        for (var i = 0; i < values.length; ++i) {
-            var value = values[i];
-            newValues[i] = Math.log(value);
-        }
-        return this.makeOutput(newValues, x.shape, 'float32');
-    };
-    MathBackendCPU.prototype.log1p = function (x) {
-        cpu_util_1.assertNotComplex(x, 'log1p');
-        var values = this.readSync(x.dataId);
-        var newValues = new Float32Array(values.length);
-        for (var i = 0; i < values.length; ++i) {
-            var value = values[i];
-            newValues[i] = Math.log1p(value);
-        }
-        return this.makeOutput(newValues, x.shape, 'float32');
-    };
-    MathBackendCPU.prototype.sqrt = function (x) {
-        cpu_util_1.assertNotComplex(x, 'sqrt');
-        var values = this.readSync(x.dataId);
-        var newValues = new Float32Array(values.length);
-        for (var i = 0; i < values.length; ++i) {
-            var value = values[i];
-            newValues[i] = Math.sqrt(value);
-        }
-        return this.makeOutput(newValues, x.shape, 'float32');
-    };
-    MathBackendCPU.prototype.rsqrt = function (x) {
-        cpu_util_1.assertNotComplex(x, 'rsqrt');
-        var values = this.readSync(x.dataId);
-        var newValues = new Float32Array(values.length);
-        for (var i = 0; i < values.length; ++i) {
-            var value = values[i];
-            newValues[i] = 1 / Math.sqrt(value);
-        }
-        return this.makeOutput(newValues, x.shape, 'float32');
-    };
-    MathBackendCPU.prototype.reciprocal = function (x) {
-        cpu_util_1.assertNotComplex(x, 'reciprocal');
-        var values = this.readSync(x.dataId);
-        var newValues = new Float32Array(values.length);
-        for (var i = 0; i < values.length; ++i) {
-            newValues[i] = 1 / values[i];
-        }
-        return this.makeOutput(newValues, x.shape, 'float32');
-    };
-    MathBackendCPU.prototype.linear = function (x) {
-        return x;
-    };
-    MathBackendCPU.prototype.relu = function (x) {
-        cpu_util_1.assertNotComplex(x, 'relu');
-        var res = ops.zeros(x.shape, x.dtype);
-        var resVals = this.readSync(res.dataId);
-        var inVals = this.readSync(x.dataId);
-        for (var i = 0; i < inVals.length; ++i) {
-            resVals[i] = Math.max(0, inVals[i]);
-        }
-        return res;
-    };
-    MathBackendCPU.prototype.relu6 = function (x) {
-        cpu_util_1.assertNotComplex(x, 'relu');
-        var res = ops.zeros(x.shape, x.dtype);
-        var resVals = this.readSync(res.dataId);
-        var inVals = this.readSync(x.dataId);
-        for (var i = 0; i < inVals.length; ++i) {
-            resVals[i] = Math.min(Math.max(0, inVals[i]), 6);
-        }
-        return res;
-    };
-    MathBackendCPU.prototype.prelu = function (x, a) {
-        cpu_util_1.assertNotComplex([x, a], 'prelu');
-        return this.broadcastedBinaryOp(x, a, x.dtype, function (xValue, aValue) { return xValue < 0 ? aValue * xValue : xValue; });
-    };
-    MathBackendCPU.prototype.elu = function (x) {
-        cpu_util_1.assertNotComplex(x, 'elu');
-        var resultValues = new Float32Array(x.size);
-        var values = this.readSync(x.dataId);
-        for (var i = 0; i < values.length; ++i) {
-            var v = values[i];
-            if (v >= 0) {
-                resultValues[i] = v;
-            }
-            else {
-                resultValues[i] = (Math.exp(v) - 1);
-            }
-        }
-        return this.makeOutput(resultValues, x.shape, 'float32');
-    };
-    MathBackendCPU.prototype.eluDer = function (dy, y) {
-        cpu_util_1.assertNotComplex([dy, y], 'eluDer');
-        var resultValues = new Float32Array(y.size);
-        var values = this.readSync(y.dataId);
-        var dyValues = this.readSync(dy.dataId);
-        for (var i = 0; i < values.length; ++i) {
-            var v = values[i];
-            if (v >= 1) {
-                resultValues[i] = dyValues[i];
-            }
-            else {
-                resultValues[i] = dyValues[i] * (v + 1);
-            }
-        }
-        return this.makeOutput(resultValues, y.shape, 'float32');
-    };
-    MathBackendCPU.prototype.selu = function (x) {
-        cpu_util_1.assertNotComplex(x, 'selu');
-        // Stable and Attracting Fixed Point (0, 1) for Normalized Weights.
-        // see: https://arxiv.org/abs/1706.02515
-        var scaleAlpha = selu_util.SELU_SCALEALPHA;
-        var scale = selu_util.SELU_SCALE;
-        var resultValues = new Float32Array(x.size);
-        var values = this.readSync(x.dataId);
-        for (var i = 0; i < values.length; ++i) {
-            var v = values[i];
-            if (v >= 0) {
-                resultValues[i] = scale * v;
-            }
-            else {
-                resultValues[i] = scaleAlpha * (Math.exp(v) - 1);
-            }
-        }
-        return this.makeOutput(resultValues, x.shape, 'float32');
-    };
-    MathBackendCPU.prototype.clip = function (x, min, max) {
-        cpu_util_1.assertNotComplex(x, 'clip');
-        var resultValues = new Float32Array(x.size);
-        var values = this.readSync(x.dataId);
-        for (var i = 0; i < values.length; ++i) {
-            var v = values[i];
-            resultValues[i] = v > max ? max : (v < min ? min : v);
-        }
-        return this.makeOutput(resultValues, x.shape, 'float32');
-    };
-    MathBackendCPU.prototype.abs = function (x) {
-        var resultValues = new Float32Array(x.size);
-        var values = this.readSync(x.dataId);
-        for (var i = 0; i < values.length; ++i) {
-            resultValues[i] = Math.abs(values[i]);
-        }
-        return this.makeOutput(resultValues, x.shape, 'float32');
-    };
-    MathBackendCPU.prototype.complexAbs = function (x) {
-        var resultValues = new Float32Array(x.size);
-        var values = this.readSync(x.dataId);
-        for (var i = 0; i < x.size; ++i) {
-            var real_1 = values[i * 2];
-            var imag_1 = values[i * 2 + 1];
-            resultValues[i] = Math.hypot(real_1, imag_1);
-        }
-        return this.makeOutput(resultValues, x.shape, 'float32');
-    };
-    MathBackendCPU.prototype.int = function (x) {
-        cpu_util_1.assertNotComplex(x, 'int');
-        var resultValues = new Int32Array(x.size);
-        var values = this.readSync(x.dataId);
-        for (var i = 0; i < values.length; ++i) {
-            resultValues[i] = values[i];
-        }
-        return this.makeOutput(resultValues, x.shape, 'int32');
-    };
-    MathBackendCPU.prototype.sigmoid = function (x) {
-        cpu_util_1.assertNotComplex(x, 'sigmoid');
-        var resultValues = new Float32Array(x.size);
-        var values = this.readSync(x.dataId);
-        for (var i = 0; i < values.length; ++i) {
-            resultValues[i] = 1 / (1 + Math.exp(-values[i]));
-        }
-        return this.makeOutput(resultValues, x.shape, 'float32');
-    };
-    MathBackendCPU.prototype.softplus = function (x) {
-        cpu_util_1.assertNotComplex(x, 'softplus');
-        // mirrors the implementation of tf.nn.softplus: https://goo.gl/vkcvwX
-        // epsilon is the difference between 1.0 and the next representable float.
-        // For a single precision 32 bit float this should be 2^-23, see:
-        // https://math.byu.edu/~schow/work/IEEEFloatingPoint.htm
-        var epsilon = 1.1920928955078125e-7;
-        var threshold = Math.log(epsilon) + 2.0;
-        var resultValues = new Float32Array(x.size);
-        var values = this.readSync(x.dataId);
-        for (var i = 0; i < values.length; ++i) {
-            // Value above which exp(x) may overflow, but softplus(x) == x
-            // is within machine epsilon.
-            var tooLarge = values[i] > -threshold;
-            // Value below which exp(x) may underflow, but softplus(x) == exp(x)
-            // is within machine epsilon.
-            var tooSmall = values[i] < threshold;
-            var expX = Math.exp(values[i]);
-            var result = void 0;
-            if (tooSmall) {
-                result = expX;
-            }
-            else if (tooLarge) {
-                result = values[i];
-            }
-            else {
-                result = Math.log(1.0 + expX);
-            }
-            resultValues[i] = result;
-        }
-        return this.makeOutput(resultValues, x.shape, 'float32');
-    };
-    MathBackendCPU.prototype.sin = function (x) {
-        cpu_util_1.assertNotComplex(x, 'sin');
-        var resultValues = new Float32Array(x.size);
-        var values = this.readSync(x.dataId);
-        for (var i = 0; i < values.length; ++i) {
-            resultValues[i] = Math.sin(values[i]);
-        }
-        return this.makeOutput(resultValues, x.shape, 'float32');
-    };
-    MathBackendCPU.prototype.cos = function (x) {
-        cpu_util_1.assertNotComplex(x, 'cos');
-        var resultValues = new Float32Array(x.size);
-        var values = this.readSync(x.dataId);
-        for (var i = 0; i < values.length; ++i) {
-            resultValues[i] = Math.cos(values[i]);
-        }
-        return this.makeOutput(resultValues, x.shape, 'float32');
-    };
-    MathBackendCPU.prototype.tan = function (x) {
-        cpu_util_1.assertNotComplex(x, 'tan');
-        var resultValues = new Float32Array(x.size);
-        var values = this.readSync(x.dataId);
-        for (var i = 0; i < values.length; ++i) {
-            resultValues[i] = Math.tan(values[i]);
-        }
-        return this.makeOutput(resultValues, x.shape, 'float32');
-    };
-    MathBackendCPU.prototype.asin = function (x) {
-        cpu_util_1.assertNotComplex(x, 'asin');
-        var resultValues = new Float32Array(x.size);
-        var values = this.readSync(x.dataId);
-        for (var i = 0; i < values.length; ++i) {
-            resultValues[i] = Math.asin(values[i]);
-        }
-        return this.makeOutput(resultValues, x.shape, 'float32');
-    };
-    MathBackendCPU.prototype.acos = function (x) {
-        cpu_util_1.assertNotComplex(x, 'acos');
-        var resultValues = new Float32Array(x.size);
-        var values = this.readSync(x.dataId);
-        for (var i = 0; i < values.length; ++i) {
-            resultValues[i] = Math.acos(values[i]);
-        }
-        return this.makeOutput(resultValues, x.shape, 'float32');
-    };
-    MathBackendCPU.prototype.atan = function (x) {
-        cpu_util_1.assertNotComplex(x, 'atan');
-        var resultValues = new Float32Array(x.size);
-        var values = this.readSync(x.dataId);
-        for (var i = 0; i < values.length; ++i) {
-            resultValues[i] = Math.atan(values[i]);
-        }
-        return this.makeOutput(resultValues, x.shape, 'float32');
-    };
-    MathBackendCPU.prototype.atan2 = function (a, b) {
-        cpu_util_1.assertNotComplex([a, b], 'atan2');
-        return this.broadcastedBinaryOp(a, b, a.dtype, function (aValue, bValue) { return Math.atan2(aValue, bValue); });
-    };
-    MathBackendCPU.prototype.sinh = function (x) {
-        cpu_util_1.assertNotComplex(x, 'sinh');
-        var resultValues = new Float32Array(x.size);
-        var values = this.readSync(x.dataId);
-        for (var i = 0; i < values.length; ++i) {
-            resultValues[i] = Math.sinh(values[i]);
-        }
-        return this.makeOutput(resultValues, x.shape, 'float32');
-    };
-    MathBackendCPU.prototype.cosh = function (x) {
-        cpu_util_1.assertNotComplex(x, 'cosh');
-        var resultValues = new Float32Array(x.size);
-        var values = this.readSync(x.dataId);
-        for (var i = 0; i < values.length; ++i) {
-            resultValues[i] = Math.cosh(values[i]);
-        }
-        return this.makeOutput(resultValues, x.shape, 'float32');
-    };
-    MathBackendCPU.prototype.tanh = function (x) {
-        cpu_util_1.assertNotComplex(x, 'tanh');
-        var resultValues = new Float32Array(x.size);
-        var values = this.readSync(x.dataId);
-        for (var i = 0; i < values.length; ++i) {
-            resultValues[i] = util.tanh(values[i]);
-        }
-        return this.makeOutput(resultValues, x.shape, 'float32');
-    };
-    MathBackendCPU.prototype.asinh = function (x) {
-        cpu_util_1.assertNotComplex(x, 'asinh');
-        var resultValues = new Float32Array(x.size);
-        var values = this.readSync(x.dataId);
-        for (var i = 0; i < values.length; ++i) {
-            resultValues[i] = Math.asinh(values[i]);
-        }
-        return this.makeOutput(resultValues, x.shape, 'float32');
-    };
-    MathBackendCPU.prototype.acosh = function (x) {
-        cpu_util_1.assertNotComplex(x, 'acosh');
-        var resultValues = new Float32Array(x.size);
-        var values = this.readSync(x.dataId);
-        for (var i = 0; i < values.length; ++i) {
-            resultValues[i] = Math.acosh(values[i]);
-        }
-        return this.makeOutput(resultValues, x.shape, 'float32');
-    };
-    MathBackendCPU.prototype.atanh = function (x) {
-        cpu_util_1.assertNotComplex(x, 'atanh');
-        var resultValues = new Float32Array(x.size);
-        var values = this.readSync(x.dataId);
-        for (var i = 0; i < values.length; ++i) {
-            resultValues[i] = Math.atanh(values[i]);
-        }
-        return this.makeOutput(resultValues, x.shape, 'float32');
-    };
-    MathBackendCPU.prototype.erf = function (x) {
-        cpu_util_1.assertNotComplex(x, 'erf');
-        var resultValues = new Float32Array(x.size);
-        var values = this.readSync(x.dataId);
-        var p = erf_util.ERF_P;
-        var a1 = erf_util.ERF_A1;
-        var a2 = erf_util.ERF_A2;
-        var a3 = erf_util.ERF_A3;
-        var a4 = erf_util.ERF_A4;
-        var a5 = erf_util.ERF_A5;
-        for (var i = 0; i < values.length; ++i) {
-            var sign = Math.sign(values[i]);
-            var v = Math.abs(values[i]);
-            var t = 1.0 / (1.0 + p * v);
-            resultValues[i] = sign *
-                (1.0 -
-                    (((((a5 * t + a4) * t) + a3) * t + a2) * t + a1) * t *
-                        Math.exp(-v * v));
-        }
-        return this.makeOutput(resultValues, x.shape, 'float32');
-    };
-    MathBackendCPU.prototype.step = function (x, alpha) {
-        if (alpha === void 0) { alpha = 0; }
-        cpu_util_1.assertNotComplex(x, 'step');
-        var resultValues = new Float32Array(x.size);
-        var values = this.readSync(x.dataId);
-        for (var i = 0; i < values.length; ++i) {
-            var value = values[i];
-            if (isNaN(value)) {
-                resultValues[i] = NaN;
-            }
-            else {
-                resultValues[i] = value > 0 ? 1 : alpha;
-            }
-        }
-        return this.makeOutput(resultValues, x.shape, 'float32');
-    };
-    MathBackendCPU.prototype.fusedConv2d = function (_a) {
-        var input = _a.input, filter = _a.filter, convInfo = _a.convInfo, bias = _a.bias, activation = _a.activation, preluActivationWeights = _a.preluActivationWeights;
-        var result = this.conv2d(input, filter, convInfo);
-        if (bias) {
-            result = this.add(result, bias);
-        }
-        if (activation) {
-            result =
-                mapActivation(this, result, activation, preluActivationWeights);
-        }
-        return result;
-    };
-    MathBackendCPU.prototype.conv2d = function (x, filter, convInfo) {
-        cpu_util_1.assertNotComplex([x, filter], 'conv2d');
-        var filterHeight = convInfo.filterHeight;
-        var filterWidth = convInfo.filterWidth;
-        var dilationHeight = convInfo.dilationHeight;
-        var dilationWidth = convInfo.dilationWidth;
-        var padLeft = convInfo.padInfo.left;
-        var padTop = convInfo.padInfo.top;
-        var isChannelsLast = convInfo.dataFormat === 'channelsLast';
-        var y = ops.buffer(convInfo.outShape, x.dtype);
-        var xBatchStride = x.strides[0];
-        var xRowStride = isChannelsLast ? x.strides[1] : x.strides[2];
-        var xColStride = isChannelsLast ? x.strides[2] : 1;
-        var xChannelStride = isChannelsLast ? 1 : x.strides[1];
-        var yBatchStride = y.strides[0];
-        var yRowStride = isChannelsLast ? y.strides[1] : y.strides[2];
-        var yColStride = isChannelsLast ? y.strides[2] : 1;
-        var yChannelStride = isChannelsLast ? 1 : y.strides[1];
-        var xVals = this.readSync(x.dataId);
-        var wVals = this.readSync(filter.dataId);
-        var yVals = y.values;
-        for (var b = 0; b < convInfo.batchSize; ++b) {
-            var xOffset1 = b * xBatchStride;
-            var yOffset1 = b * yBatchStride;
-            for (var yR = 0; yR < convInfo.outHeight; ++yR) {
-                var yOffset2 = yOffset1 + yR * yRowStride;
-                var xRCorner = yR * convInfo.strideHeight - padTop;
-                for (var wR = 0; wR < filterHeight; wR++) {
-                    var xR = xRCorner + wR * dilationHeight;
-                    if (xR < 0 || xR >= convInfo.inHeight) {
-                        continue;
-                    }
-                    var wOffset1 = wR * filter.strides[0];
-                    var xOffset2 = xOffset1 + xR * xRowStride;
-                    for (var yC = 0; yC < convInfo.outWidth; ++yC) {
-                        var yOffset3 = yOffset2 + yC * yColStride;
-                        var xCCorner = yC * convInfo.strideWidth - padLeft;
-                        for (var wC = 0; wC < filterWidth; wC++) {
-                            var xC = xCCorner + wC * dilationWidth;
-                            if (xC < 0 || xC >= convInfo.inWidth) {
-                                continue;
-                            }
-                            var wOffset2 = wOffset1 + wC * filter.strides[1];
-                            var xOffset3 = xOffset2 + xC * xColStride;
-                            var wOffset3 = wOffset2;
-                            for (var d1 = 0; d1 < convInfo.inChannels; ++d1) {
-                                var xVal = xVals[xOffset3 + d1 * xChannelStride];
-                                for (var d2 = 0; d2 < convInfo.outChannels; ++d2) {
-                                    yVals[yOffset3 + d2 * yChannelStride] +=
-                                        xVal * wVals[wOffset3 + d2];
-                                }
-                                wOffset3 += convInfo.outChannels;
-                            }
-                        }
-                    }
-                }
-            }
-        }
-        return y.toTensor();
-    };
-    MathBackendCPU.prototype.conv3d = function (x, filter, convInfo) {
-        var filterDepth = convInfo.filterDepth;
-        var filterHeight = convInfo.filterHeight;
-        var filterWidth = convInfo.filterWidth;
-        var dilationDepth = convInfo.dilationDepth;
-        var dilationHeight = convInfo.dilationHeight;
-        var dilationWidth = convInfo.dilationWidth;
-        var padFront = convInfo.padInfo.front;
-        var padLeft = convInfo.padInfo.left;
-        var padTop = convInfo.padInfo.top;
-        var y = ops.buffer(convInfo.outShape, x.dtype);
-        var xVals = this.readSync(x.dataId);
-        var wVals = this.readSync(filter.dataId);
-        var yVals = y.values;
-        for (var b = 0; b < convInfo.batchSize; ++b) {
-            var xOffset1 = b * x.strides[0];
-            var yOffset1 = b * y.strides[0];
-            for (var yF = 0; yF < convInfo.outDepth; ++yF) {
-                var yOffset2 = yOffset1 + yF * y.strides[1];
-                var xFCorner = yF * convInfo.strideDepth - padFront;
-                for (var wF = 0; wF < filterDepth; wF++) {
-                    var xF = xFCorner + wF * dilationDepth;
-                    if (xF < 0 || xF >= convInfo.inDepth) {
-                        continue;
-                    }
-                    var wOffset1 = wF * filter.strides[0];
-                    var xOffset2 = xOffset1 + xF * x.strides[1];
-                    for (var yR = 0; yR < convInfo.outHeight; ++yR) {
-                        var yOffset3 = yOffset2 + yR * y.strides[2];
-                        var xRCorner = yR * convInfo.strideHeight - padTop;
-                        for (var wR = 0; wR < filterHeight; wR++) {
-                            var xR = xRCorner + wR * dilationHeight;
-                            if (xR < 0 || xR >= convInfo.inHeight) {
-                                continue;
-                            }
-                            var wOffset2 = wOffset1 + wR * filter.strides[1];
-                            var xOffset3 = xOffset2 + xR * x.strides[2];
-                            for (var yC = 0; yC < convInfo.outWidth; ++yC) {
-                                var yOffset4 = yOffset3 + yC * convInfo.outChannels;
-                                var xCCorner = yC * convInfo.strideWidth - padLeft;
-                                for (var wC = 0; wC < filterWidth; wC++) {
-                                    var xC = xCCorner + wC * dilationWidth;
-                                    if (xC < 0 || xC >= convInfo.inWidth) {
-                                        continue;
-                                    }
-                                    var wOffset3 = wOffset2 + wC * filter.strides[2];
-                                    var xOffset4 = xOffset3 + xC * convInfo.inChannels;
-                                    var wOffset4 = wOffset3;
-                                    for (var d1 = 0; d1 < convInfo.inChannels; ++d1) {
-                                        var xVal = xVals[xOffset4 + d1];
-                                        for (var d2 = 0; d2 < convInfo.outChannels; ++d2) {
-                                            yVals[yOffset4 + d2] += xVal * wVals[wOffset4 + d2];
-                                        }
-                                        wOffset4 += convInfo.outChannels;
-                                    }
-                                }
-                            }
-                        }
-                    }
-                }
-            }
-        }
-        return y.toTensor();
-    };
-    MathBackendCPU.prototype.conv2dDerInput = function (dy, filter, convInfo) {
-        cpu_util_1.assertNotComplex([dy, filter], 'conv2dDerInput');
-        var dx = ops.buffer(convInfo.inShape, 'float32');
-        var dxValues = dx.values;
-        var dyValues = this.readSync(dy.dataId);
-        var fltValues = this.readSync(filter.dataId);
-        var _a = filter.strides, fltS0 = _a[0], fltS1 = _a[1], fltS2 = _a[2];
-        var batchSize = convInfo.batchSize, filterHeight = convInfo.filterHeight, filterWidth = convInfo.filterWidth, inChannels = convInfo.inChannels, inHeight = convInfo.inHeight, inWidth = convInfo.inWidth, outChannels = convInfo.outChannels, outHeight = convInfo.outHeight, outWidth = convInfo.outWidth, strideHeight = convInfo.strideHeight, strideWidth = convInfo.strideWidth, dataFormat = convInfo.dataFormat;
-        var topPad = filterHeight - 1 - convInfo.padInfo.top;
-        var leftPad = filterWidth - 1 - convInfo.padInfo.left;
-        var isChannelsLast = dataFormat === 'channelsLast';
-        var xBatchStride = dx.strides[0];
-        var xRowStride = isChannelsLast ? dx.strides[1] : dx.strides[2];
-        var xColStride = isChannelsLast ? dx.strides[2] : 1;
-        var xChannelStride = isChannelsLast ? 1 : dx.strides[1];
-        var yBatchStride = dy.strides[0];
-        var yRowStride = isChannelsLast ? dy.strides[1] : dy.strides[2];
-        var yColStride = isChannelsLast ? dy.strides[2] : 1;
-        var yChannelStride = isChannelsLast ? 1 : dy.strides[1];
-        for (var b = 0; b < batchSize; ++b) {
-            for (var d1 = 0; d1 < inChannels; ++d1) {
-                for (var xR = 0; xR < inHeight; ++xR) {
-                    var xRCorner = xR - topPad;
-                    var xRMin = Math.max(0, Math.ceil(xRCorner / strideHeight));
-                    var yRMax = Math.min(outHeight, (filterHeight + xRCorner) / strideHeight);
-                    for (var xC = 0; xC < inWidth; ++xC) {
-                        var xCCorner = xC - leftPad;
-                        var xCMin = Math.max(0, Math.ceil(xCCorner / strideWidth));
-                        var yCMax = Math.min(outWidth, (filterWidth + xCCorner) / strideWidth);
-                        var dotProd = 0;
-                        for (var yR = xRMin; yR < yRMax; ++yR) {
-                            var wR = yR * strideHeight - xRCorner;
-                            for (var yC = xCMin; yC < yCMax; ++yC) {
-                                var wC = yC * strideWidth - xCCorner;
-                                var dyOffset = yBatchStride * b + yRowStride * yR + yColStride * yC;
-                                var fltOffset = fltS0 * (filterHeight - 1 - wR) +
-                                    fltS1 * (filterWidth - 1 - wC) + fltS2 * d1;
-                                for (var d2 = 0; d2 < outChannels; ++d2) {
-                                    var pixel = dyValues[dyOffset + yChannelStride * d2];
-                                    var weight = fltValues[fltOffset + d2];
-                                    dotProd += pixel * weight;
-                                }
-                            }
-                        }
-                        var dxOffset = xBatchStride * b + xRowStride * xR +
-                            xColStride * xC + xChannelStride * d1;
-                        dxValues[dxOffset] = dotProd;
-                    }
-                }
-            }
-        }
-        return dx.toTensor();
-    };
-    MathBackendCPU.prototype.conv3dDerInput = function (dy, filter, convInfo) {
-        var dx = ops.buffer(convInfo.inShape, 'float32');
-        var dxValues = dx.values;
-        var _a = dx.strides, dxS0 = _a[0], dxS1 = _a[1], dxS2 = _a[2], dxS3 = _a[3];
-        var dyValues = this.readSync(dy.dataId);
-        var _b = dy.strides, dyS0 = _b[0], dyS1 = _b[1], dyS2 = _b[2], dyS3 = _b[3];
-        var fltValues = this.readSync(filter.dataId);
-        var _c = filter.strides, fltS0 = _c[0], fltS1 = _c[1], fltS2 = _c[2], fltS3 = _c[3];
-        var batchSize = convInfo.batchSize, filterDepth = convInfo.filterDepth, filterHeight = convInfo.filterHeight, filterWidth = convInfo.filterWidth, inChannels = convInfo.inChannels, inDepth = convInfo.inDepth, inHeight = convInfo.inHeight, inWidth = convInfo.inWidth, outChannels = convInfo.outChannels, outDepth = convInfo.outDepth, outHeight = convInfo.outHeight, outWidth = convInfo.outWidth, strideDepth = convInfo.strideDepth, strideHeight = convInfo.strideHeight, strideWidth = convInfo.strideWidth;
-        var frontPad = filterDepth - 1 - convInfo.padInfo.front;
-        var topPad = filterHeight - 1 - convInfo.padInfo.top;
-        var leftPad = filterWidth - 1 - convInfo.padInfo.left;
-        for (var b = 0; b < batchSize; ++b) {
-            for (var d1 = 0; d1 < inChannels; ++d1) {
-                // Frames of depth
-                for (var xF = 0; xF < inDepth; ++xF) {
-                    var xFCorner = xF - frontPad;
-                    var xFMin = Math.max(0, Math.ceil(xFCorner / strideDepth));
-                    var yFMax = Math.min(outDepth, (filterDepth + xFCorner) / strideDepth);
-                    // Rows as per standard 2d matrix notation
-                    for (var xR = 0; xR < inHeight; ++xR) {
-                        var xRCorner = xR - topPad;
-                        var xRMin = Math.max(0, Math.ceil(xRCorner / strideHeight));
-                        var yRMax = Math.min(outHeight, (filterHeight + xRCorner) / strideHeight);
-                        // Columns as per standard 2d matrix notation
-                        for (var xC = 0; xC < inWidth; ++xC) {
-                            var xCCorner = xC - leftPad;
-                            var xCMin = Math.max(0, Math.ceil(xCCorner / strideWidth));
-                            var yCMax = Math.min(outWidth, (filterWidth + xCCorner) / strideWidth);
-                            var dotProd = 0;
-                            for (var yF = xFMin; yF < yFMax; ++yF) {
-                                var wF = yF * strideDepth - xFCorner;
-                                for (var yR = xRMin; yR < yRMax; ++yR) {
-                                    var wR = yR * strideHeight - xRCorner;
-                                    for (var yC = xCMin; yC < yCMax; ++yC) {
-                                        var wC = yC * strideWidth - xCCorner;
-                                        var dyOffset = dyS0 * b + dyS1 * yF + dyS2 * yR + dyS3 * yC;
-                                        var fltOffset = fltS0 * (filterDepth - 1 - wF) +
-                                            fltS1 * (filterHeight - 1 - wR) +
-                                            fltS2 * (filterWidth - 1 - wC) + fltS3 * d1;
-                                        for (var d2 = 0; d2 < outChannels; ++d2) {
-                                            var pixel = dyValues[dyOffset + d2];
-                                            var weight = fltValues[fltOffset + d2];
-                                            dotProd += pixel * weight;
-                                        }
-                                    }
-                                }
-                            }
-                            dxValues[dxS0 * b + dxS1 * xF + dxS2 * xR + dxS3 * xC + d1] =
-                                dotProd;
-                        }
-                    }
-                }
-            }
-        }
-        return dx.toTensor();
-    };
-    MathBackendCPU.prototype.conv2dDerFilter = function (x, dy, convInfo) {
-        cpu_util_1.assertNotComplex([x, dy], 'conv2dDerFilter');
-        var strideHeight = convInfo.strideHeight;
-        var strideWidth = convInfo.strideWidth;
-        var filterHeight = convInfo.filterHeight;
-        var filterWidth = convInfo.filterWidth;
-        var isChannelsLast = convInfo.dataFormat === 'channelsLast';
-        var dW = ops.buffer(convInfo.filterShape, 'float32');
-        var leftPad = convInfo.padInfo.left;
-        var topPad = convInfo.padInfo.top;
-        var xBuf = this.bufferSync(x);
-        var dyBuf = this.bufferSync(dy);
-        for (var wR = 0; wR < filterHeight; ++wR) {
-            var yRMin = Math.max(0, Math.ceil((topPad - wR) / strideHeight));
-            var yRMax = Math.min(convInfo.outHeight, (convInfo.inHeight + topPad - wR) / strideHeight);
-            for (var wC = 0; wC < filterWidth; ++wC) {
-                var yCMin = Math.max(0, Math.ceil((leftPad - wC) / strideWidth));
-                var yCMax = Math.min(convInfo.outWidth, (convInfo.inWidth + leftPad - wC) / strideWidth);
-                for (var d1 = 0; d1 < convInfo.inChannels; ++d1) {
-                    for (var d2 = 0; d2 < convInfo.outChannels; ++d2) {
-                        // Need to convolve.
-                        var dotProd = 0;
-                        for (var b = 0; b < convInfo.batchSize; ++b) {
-                            for (var yR = yRMin; yR < yRMax; ++yR) {
-                                var xR = wR + yR * strideHeight - topPad;
-                                for (var yC = yCMin; yC < yCMax; ++yC) {
-                                    var xC = wC + yC * strideWidth - leftPad;
-                                    if (isChannelsLast) {
-                                        dotProd +=
-                                            xBuf.get(b, xR, xC, d1) * dyBuf.get(b, yR, yC, d2);
-                                    }
-                                    else {
-                                        dotProd +=
-                                            xBuf.get(b, d1, xR, xC) * dyBuf.get(b, d2, yR, yC);
-                                    }
-                                }
-                            }
-                        }
-                        dW.set(dotProd, wR, wC, d1, d2);
-                    }
-                }
-            }
-        }
-        return dW.toTensor();
-    };
-    MathBackendCPU.prototype.conv3dDerFilter = function (x, dy, convInfo) {
-        var strideDepth = convInfo.strideDepth;
-        var strideHeight = convInfo.strideHeight;
-        var strideWidth = convInfo.strideWidth;
-        var filterDepth = convInfo.filterDepth;
-        var filterHeight = convInfo.filterHeight;
-        var filterWidth = convInfo.filterWidth;
-        var dw = ops.buffer(convInfo.filterShape, 'float32');
-        var dwValues = dw.values;
-        var _a = dw.strides, dwS0 = _a[0], dwS1 = _a[1], dwS2 = _a[2], dwS3 = _a[3];
-        var dyValues = this.readSync(dy.dataId);
-        var _b = dy.strides, dyS0 = _b[0], dyS1 = _b[1], dyS2 = _b[2], dyS3 = _b[3];
-        var xValues = this.readSync(x.dataId);
-        var _c = x.strides, xS0 = _c[0], xS1 = _c[1], xS2 = _c[2], xS3 = _c[3];
-        var frontPad = convInfo.padInfo.front;
-        var leftPad = convInfo.padInfo.left;
-        var topPad = convInfo.padInfo.top;
-        for (var wF = 0; wF < filterDepth; ++wF) {
-            var yFMin = Math.max(0, Math.ceil((frontPad - wF) / strideDepth));
-            var yFMax = Math.min(convInfo.outDepth, (convInfo.inDepth + frontPad - wF) / strideDepth);
-            var wOffset1 = wF * dwS0;
-            for (var wR = 0; wR < filterHeight; ++wR) {
-                var yRMin = Math.max(0, Math.ceil((topPad - wR) / strideHeight));
-                var yRMax = Math.min(convInfo.outHeight, (convInfo.inHeight + topPad - wR) / strideHeight);
-                var wOffset2 = wR * dwS1 + wOffset1;
-                for (var wC = 0; wC < filterWidth; ++wC) {
-                    var yCMin = Math.max(0, Math.ceil((leftPad - wC) / strideWidth));
-                    var yCMax = Math.min(convInfo.outWidth, (convInfo.inWidth + leftPad - wC) / strideWidth);
-                    var wOffset3 = wC * dwS2 + wOffset2;
-                    for (var d1 = 0; d1 < convInfo.inChannels; ++d1) {
-                        var wOffset4 = d1 * dwS3 + wOffset3;
-                        for (var d2 = 0; d2 < convInfo.outChannels; ++d2) {
-                            var dotProd = 0;
-                            for (var b = 0; b < convInfo.batchSize; ++b) {
-                                var xOffset1 = b * xS0;
-                                var yOffset1 = b * dyS0;
-                                for (var yF = yFMin; yF < yFMax; ++yF) {
-                                    var xF = wF + yF * strideDepth - frontPad;
-                                    var xOffset2 = xF * xS1 + xOffset1;
-                                    var yOffset2 = yF * dyS1 + yOffset1;
-                                    for (var yR = yRMin; yR < yRMax; ++yR) {
-                                        var xR = wR + yR * strideHeight - topPad;
-                                        var xOffset3 = xR * xS2 + xOffset2;
-                                        var yOffset3 = yR * dyS2 + yOffset2;
-                                        for (var yC = yCMin; yC < yCMax; ++yC) {
-                                            var xC = wC + yC * strideWidth - leftPad;
-                                            var xOffset4 = xC * xS3 + xOffset3;
-                                            var yOffset4 = yC * dyS3 + yOffset3;
-                                            dotProd +=
-                                                xValues[xOffset4 + d1] * dyValues[yOffset4 + d2];
-                                        }
-                                    }
-                                }
-                            }
-                            dwValues[wOffset4 + d2] = dotProd;
-                        }
-                    }
-                }
-            }
-        }
-        return dw.toTensor();
-    };
-    MathBackendCPU.prototype.fusedDepthwiseConv2D = function (_a) {
-        var input = _a.input, filter = _a.filter, convInfo = _a.convInfo, bias = _a.bias, activation = _a.activation, preluActivationWeights = _a.preluActivationWeights;
-        var result = this.depthwiseConv2D(input, filter, convInfo);
-        if (bias) {
-            result = this.add(result, bias);
-        }
-        if (activation) {
-            result =
-                mapActivation(this, result, activation, preluActivationWeights);
-        }
-        return result;
-    };
-    MathBackendCPU.prototype.depthwiseConv2D = function (x, filter, convInfo) {
-        cpu_util_1.assertNotComplex([x, filter], 'depthwiseConv2D');
-        var filterHeight = convInfo.filterHeight;
-        var filterWidth = convInfo.filterWidth;
-        var dilationHeight = convInfo.dilationHeight;
-        var dilationWidth = convInfo.dilationWidth;
-        var padLeft = convInfo.padInfo.left;
-        var padTop = convInfo.padInfo.top;
-        var chMul = convInfo.outChannels / convInfo.inChannels;
-        var y = ops.buffer(convInfo.outShape, x.dtype);
-        var xVals = this.readSync(x.dataId);
-        var wVals = this.readSync(filter.dataId);
-        var yVals = y.values;
-        for (var b = 0; b < convInfo.batchSize; ++b) {
-            var xOffset1 = b * x.strides[0];
-            var yOffset1 = b * y.strides[0];
-            for (var yR = 0; yR < convInfo.outHeight; ++yR) {
-                var yOffset2 = yOffset1 + yR * y.strides[1];
-                var xRCorner = yR * convInfo.strideHeight - padLeft;
-                for (var wR = 0; wR < filterHeight; ++wR) {
-                    var xR = xRCorner + wR * dilationHeight;
-                    if (xR < 0 || xR >= convInfo.inHeight) {
-                        continue;
-                    }
-                    var wOffset1 = wR * filter.strides[0];
-                    var xOffset2 = xOffset1 + xR * x.strides[1];
-                    for (var yC = 0; yC < convInfo.outWidth; ++yC) {
-                        var yOffset3 = yOffset2 + yC * y.strides[2];
-                        var xCCorner = yC * convInfo.strideWidth - padTop;
-                        for (var wC = 0; wC < filterWidth; ++wC) {
-                            var xC = xCCorner + wC * dilationWidth;
-                            if (xC < 0 || xC >= convInfo.inWidth) {
-                                continue;
-                            }
-                            var wOffset2 = wOffset1 + wC * filter.strides[1];
-                            var xOffset3 = xOffset2 + xC * convInfo.inChannels;
-                            var yOffset4 = yOffset3;
-                            var wOffset3 = wOffset2;
-                            for (var d1 = 0; d1 < convInfo.inChannels; ++d1) {
-                                var xVal = xVals[xOffset3 + d1];
-                                for (var q = 0; q < chMul; ++q) {
-                                    yVals[yOffset4 + q] += xVal * wVals[wOffset3 + q];
-                                }
-                                yOffset4 += chMul;
-                                wOffset3 += chMul;
-                            }
-                        }
-                    }
-                }
-            }
-        }
-        return y.toTensor();
-    };
-    MathBackendCPU.prototype.depthwiseConv2DDerInput = function (dy, filter, convInfo) {
-        cpu_util_1.assertNotComplex([dy, filter], 'depthwiseConv2DDerInput');
-        var dx = ops.buffer(convInfo.inShape, 'float32');
-        var dxValues = dx.values;
-        var _a = dx.strides, dxS0 = _a[0], dxS1 = _a[1], dxS2 = _a[2];
-        var dyValues = this.readSync(dy.dataId);
-        var _b = dy.strides, dyS0 = _b[0], dyS1 = _b[1], dyS2 = _b[2];
-        var fltValues = this.readSync(filter.dataId);
-        var _c = filter.strides, fltS0 = _c[0], fltS1 = _c[1], fltS2 = _c[2];
-        var batchSize = convInfo.batchSize, filterHeight = convInfo.filterHeight, filterWidth = convInfo.filterWidth, inChannels = convInfo.inChannels, inHeight = convInfo.inHeight, inWidth = convInfo.inWidth, outChannels = convInfo.outChannels, outHeight = convInfo.outHeight, outWidth = convInfo.outWidth, strideHeight = convInfo.strideHeight, strideWidth = convInfo.strideWidth;
-        var topPad = filterHeight - 1 - convInfo.padInfo.top;
-        var leftPad = filterWidth - 1 - convInfo.padInfo.left;
-        var chMul = outChannels / inChannels;
-        for (var b = 0; b < batchSize; ++b) {
-            for (var d1 = 0; d1 < inChannels; ++d1) {
-                for (var xR = 0; xR < inHeight; ++xR) {
-                    var xRCorner = xR - topPad;
-                    var xRMin = Math.max(0, Math.ceil(xRCorner / strideHeight));
-                    var yRMax = Math.min(outHeight, (filterHeight + xRCorner) / strideHeight);
-                    for (var xC = 0; xC < inWidth; ++xC) {
-                        var xCCorner = xC - leftPad;
-                        var xCMin = Math.max(0, Math.ceil(xCCorner / strideWidth));
-                        var yCMax = Math.min(outWidth, (filterWidth + xCCorner) / strideWidth);
-                        var dotProd = 0;
-                        for (var yR = xRMin; yR < yRMax; ++yR) {
-                            var wR = yR * strideHeight - xRCorner;
-                            for (var yC = xCMin; yC < yCMax; ++yC) {
-                                var wC = yC * strideWidth - xCCorner;
-                                var dyOffset = dyS0 * b + dyS1 * yR + dyS2 * yC;
-                                var fltOffset = fltS0 * (filterHeight - 1 - wR) +
-                                    fltS1 * (filterWidth - 1 - wC) + fltS2 * d1;
-                                for (var dm = 0; dm < chMul; ++dm) {
-                                    var d2 = d1 * chMul + dm;
-                                    var pixel = dyValues[dyOffset + d2];
-                                    var weight = fltValues[fltOffset + dm];
-                                    dotProd += pixel * weight;
-                                }
-                            }
-                        }
-                        dxValues[dxS0 * b + dxS1 * xR + dxS2 * xC + d1] = dotProd;
-                    }
-                }
-            }
-        }
-        return dx.toTensor();
-    };
-    MathBackendCPU.prototype.depthwiseConv2DDerFilter = function (x, dy, convInfo) {
-        cpu_util_1.assertNotComplex([x, dy], 'depthwiseConv2DDerFilter');
-        var strideHeight = convInfo.strideHeight;
-        var strideWidth = convInfo.strideWidth;
-        var filterHeight = convInfo.filterHeight;
-        var filterWidth = convInfo.filterWidth;
-        var dW = ops.buffer(convInfo.filterShape, 'float32');
-        var leftPad = convInfo.padInfo.left;
-        var topPad = convInfo.padInfo.top;
-        var chMul = convInfo.outChannels / convInfo.inChannels;
-        var xBuf = this.bufferSync(x);
-        var dyBuf = this.bufferSync(dy);
-        for (var wR = 0; wR < filterHeight; ++wR) {
-            var yRMin = Math.max(0, Math.ceil((topPad - wR) / strideHeight));
-            var yRMax = Math.min(convInfo.outHeight, (convInfo.inHeight + topPad - wR) / strideHeight);
-            for (var wC = 0; wC < filterWidth; ++wC) {
-                var yCMin = Math.max(0, Math.ceil((leftPad - wC) / strideWidth));
-                var yCMax = Math.min(convInfo.outWidth, (convInfo.inWidth + leftPad - wC) / strideWidth);
-                for (var d2 = 0; d2 < convInfo.outChannels; ++d2) {
-                    var d1 = Math.trunc(d2 / chMul);
-                    var dm = d2 % chMul;
-                    var dotProd = 0;
-                    for (var b = 0; b < convInfo.batchSize; ++b) {
-                        for (var yR = yRMin; yR < yRMax; ++yR) {
-                            var xR = wR + yR * strideHeight - topPad;
-                            for (var yC = yCMin; yC < yCMax; ++yC) {
-                                var xC = wC + yC * strideWidth - leftPad;
-                                dotProd += xBuf.get(b, xR, xC, d1) * dyBuf.get(b, yR, yC, d2);
-                            }
-                        }
-                    }
-                    dW.set(dotProd, wR, wC, d1, dm);
-                }
-            }
-        }
-        return dW.toTensor();
-    };
-    MathBackendCPU.prototype.tile = function (x, reps) {
-        cpu_util_1.assertNotComplex(x, 'tile');
-        return tile_impl_1.tile(this.bufferSync(x), reps);
-    };
-    MathBackendCPU.prototype.pad = function (x, paddings, constantValue) {
-        cpu_util_1.assertNotComplex(x, 'pad');
-        var outShape = paddings.map(function (p, i) { return p[0] /* beforePad */ + x.shape[i] + p[1]; } /* afterPad */);
-        var start = paddings.map(function (p) { return p[0]; });
-        var xBuffer = this.bufferSync(x);
-        var buffer = ops.buffer(outShape, x.dtype);
-        if (constantValue !== 0) {
-            buffer.values.fill(constantValue);
-        }
-        for (var i = 0; i < x.size; i++) {
-            var coords = xBuffer.indexToLoc(i);
-            var outCoords = coords.map(function (c, i) { return c + start[i]; });
-            buffer.set.apply(buffer, [xBuffer.get.apply(xBuffer, coords)].concat(outCoords));
-        }
-        return buffer.toTensor();
-    };
-    MathBackendCPU.prototype.transpose = function (x, perm) {
-        cpu_util_1.assertNotComplex(x, 'transpose');
-        var newShape = new Array(x.rank);
-        for (var i = 0; i < newShape.length; i++) {
-            newShape[i] = x.shape[perm[i]];
-        }
-        var values = this.readSync(x.dataId);
-        var result = ops_1.buffer(newShape, x.dtype);
-        var xBuf = this.bufferSync(x);
-        for (var i = 0; i < x.size; ++i) {
-            var loc = xBuf.indexToLoc(i);
-            // Permute location.
-            var newLoc = new Array(loc.length);
-            for (var i_1 = 0; i_1 < newLoc.length; i_1++) {
-                newLoc[i_1] = loc[perm[i_1]];
-            }
-            var newIndex = result.locToIndex(newLoc);
-            result.values[newIndex] = values[i];
-        }
-        return result.toTensor();
-    };
-    MathBackendCPU.prototype.gather = function (x, indices, axis) {
-        cpu_util_1.assertNotComplex([x, indices], 'gather');
-        var newShape = x.shape.slice();
-        var indicesValues = this.readSync(indices.dataId);
-        newShape[axis] = indicesValues.length;
-        var result = ops_1.buffer(newShape, x.dtype);
-        var xBuf = this.bufferSync(x);
-        for (var i = 0; i < result.size; ++i) {
-            var newLoc = result.indexToLoc(i);
-            var originalLoc = newLoc.slice();
-            originalLoc[axis] = indicesValues[newLoc[axis]];
-            var originalIndex = xBuf.locToIndex(originalLoc);
-            result.values[i] = xBuf.values[originalIndex];
-        }
-        return result.toTensor();
-    };
-    MathBackendCPU.prototype.batchToSpaceND = function (x, blockShape, crops) {
-        cpu_util_1.assertNotComplex([x], 'batchToSpaceND');
-        var prod = blockShape.reduce(function (a, b) { return a * b; });
-        var reshaped = array_ops_util.getReshaped(x.shape, blockShape, prod);
-        var permuted = array_ops_util.getPermuted(reshaped.length, blockShape.length);
-        var reshapedPermuted = array_ops_util.getReshapedPermuted(x.shape, blockShape, prod);
-        var sliceBeginCoords = array_ops_util.getSliceBeginCoords(crops, blockShape.length);
-        var sliceSize = array_ops_util.getSliceSize(reshapedPermuted, crops, blockShape.length);
-        return x.reshape(reshaped)
-            .transpose(permuted)
-            .reshape(reshapedPermuted)
-            .slice(sliceBeginCoords, sliceSize);
-    };
-    MathBackendCPU.prototype.spaceToBatchND = function (x, blockShape, paddings) {
-        cpu_util_1.assertNotComplex([x], 'spaceToBatchND');
-        var prod = blockShape.reduce(function (a, b) { return a * b; });
-        var completePaddings = [[0, 0]];
-        completePaddings.push.apply(completePaddings, paddings);
-        for (var i = 1 + blockShape.length; i < x.shape.length; ++i) {
-            completePaddings.push([0, 0]);
-        }
-        var paddedX = x.pad(completePaddings);
-        var reshapedPaddedShape = array_ops_util.getReshaped(paddedX.shape, blockShape, prod, false);
-        var permutedReshapedPaddedPermutation = array_ops_util.getPermuted(reshapedPaddedShape.length, blockShape.length, false);
-        var flattenShape = array_ops_util.getReshapedPermuted(paddedX.shape, blockShape, prod, false);
-        return paddedX.reshape(reshapedPaddedShape)
-            .transpose(permutedReshapedPaddedPermutation)
-            .reshape(flattenShape);
-    };
-    MathBackendCPU.prototype.pool = function (x, convInfo, poolType) {
-        cpu_util_1.assertNotComplex(x, 'pool');
-        var strideHeight = convInfo.strideHeight;
-        var strideWidth = convInfo.strideWidth;
-        var dilationHeight = convInfo.dilationHeight;
-        var dilationWidth = convInfo.dilationWidth;
-        var effectiveFilterHeight = convInfo.effectiveFilterHeight;
-        var effectiveFilterWidth = convInfo.effectiveFilterWidth;
-        var padTop = convInfo.padInfo.top;
-        var padLeft = convInfo.padInfo.left;
-        var initialValue = (poolType === 'max' ? Number.NEGATIVE_INFINITY :
-            Number.POSITIVE_INFINITY);
-        var xValues = this.readSync(x.dataId);
-        var output = ops.buffer(convInfo.outShape, x.dtype);
-        var outputVals = output.values;
-        var outputBatchStrides = convInfo.outShape[1] * convInfo.outShape[2] * convInfo.outShape[3];
-        var outputRowStrides = convInfo.outShape[2] * convInfo.outShape[3];
-        var outputColStrides = convInfo.outShape[3];
-        for (var b = 0; b < convInfo.batchSize; ++b) {
-            var outputBatchOffset = b * outputBatchStrides;
-            var inputBatchOffset = b * x.strides[0];
-            for (var d = 0; d < convInfo.inChannels; ++d) {
-                for (var yR = 0; yR < convInfo.outHeight; ++yR) {
-                    var xRCorner = yR * strideHeight - padTop;
-                    var xRMin = Math.max(0, xRCorner);
-                    var xRMax = Math.min(convInfo.inHeight, effectiveFilterHeight + xRCorner);
-                    var outputRowOffset = outputBatchOffset + yR * outputRowStrides;
-                    for (var yC = 0; yC < convInfo.outWidth; ++yC) {
-                        var xCCorner = yC * strideWidth - padLeft;
-                        var xCMin = Math.max(0, xCCorner);
-                        var xCMax = Math.min(convInfo.inWidth, effectiveFilterWidth + xCCorner);
-                        var minMaxValue = initialValue;
-                        var avgValue = 0;
-                        var count = 0;
-                        for (var xR = xRMin; xR < xRMax; xR += dilationHeight) {
-                            var xROffset = inputBatchOffset + xR * x.strides[1];
-                            for (var xC = xCMin; xC < xCMax; xC += dilationWidth) {
-                                var xCOffset = xROffset + xC * x.strides[2];
-                                var pixel = xValues[xCOffset + d];
-                                if ((poolType === 'max' && pixel > minMaxValue)) {
-                                    minMaxValue = pixel;
-                                }
-                                else if (poolType === 'avg') {
-                                    avgValue += pixel;
-                                    count++;
-                                }
-                            }
-                            if (isNaN(minMaxValue)) {
-                                break;
-                            }
-                        }
-                        var outputOffset = outputRowOffset + yC * outputColStrides + d;
-                        outputVals[outputOffset] =
-                            poolType === 'avg' ? avgValue / count : minMaxValue;
-                    }
-                }
-            }
-        }
-        return output.toTensor();
-    };
-    MathBackendCPU.prototype.maxPool = function (x, convInfo) {
-        return this.pool(x, convInfo, 'max');
-    };
-    MathBackendCPU.prototype.maxPoolPositions = function (x, convInfo) {
-        var maxPositions = ops.buffer(convInfo.outShape, 'int32');
-        var strideHeight = convInfo.strideHeight;
-        var strideWidth = convInfo.strideWidth;
-        var dilationHeight = convInfo.dilationHeight;
-        var dilationWidth = convInfo.dilationWidth;
-        var effectiveFilterHeight = convInfo.effectiveFilterHeight;
-        var effectiveFilterWidth = convInfo.effectiveFilterWidth;
-        var padTop = convInfo.padInfo.top;
-        var padLeft = convInfo.padInfo.left;
-        var xBuf = this.bufferSync(x);
-        for (var b = 0; b < convInfo.batchSize; ++b) {
-            for (var d = 0; d < convInfo.inChannels; ++d) {
-                for (var yR = 0; yR < convInfo.outHeight; ++yR) {
-                    var xRCorner = yR * strideHeight - padTop;
-                    var xRMin = xRCorner;
-                    while (xRMin < 0) {
-                        xRMin += dilationHeight;
-                    }
-                    // const xRMin = Math.max(0, xRCorner);
-                    var xRMax = Math.min(convInfo.inHeight, effectiveFilterHeight + xRCorner);
-                    for (var yC = 0; yC < convInfo.outWidth; ++yC) {
-                        var xCCorner = yC * strideWidth - padLeft;
-                        var xCMin = xCCorner;
-                        while (xCMin < 0) {
-                            xCMin += dilationWidth;
-                        }
-                        var xCMax = Math.min(convInfo.inWidth, effectiveFilterWidth + xCCorner);
-                        var maxValue = Number.NEGATIVE_INFINITY;
-                        var maxPosition = -1;
-                        for (var xR = xRMin; xR < xRMax; xR += dilationHeight) {
-                            var wR = xR - xRCorner;
-                            for (var xC = xCMin; xC < xCMax; xC += dilationWidth) {
-                                var wC = xC - xCCorner;
-                                var pixel = xBuf.get(b, xR, xC, d);
-                                if (pixel > maxValue) {
-                                    maxValue = pixel;
-                                    maxPosition = wR * effectiveFilterWidth + wC;
-                                }
-                            }
-                        }
-                        maxPositions.set(maxPosition, b, yR, yC, d);
-                    }
-                }
-            }
-        }
-        return maxPositions.toTensor();
-    };
-    MathBackendCPU.prototype.maxPoolBackprop = function (dy, x, y, convInfo) {
-        cpu_util_1.assertNotComplex([x, y], 'maxPoolBackprop');
-        var maxPositions = this.maxPoolPositions(x, convInfo);
-        var strideHeight = convInfo.strideHeight;
-        var strideWidth = convInfo.strideWidth;
-        var dilationHeight = convInfo.dilationHeight;
-        var dilationWidth = convInfo.dilationWidth;
-        var effectiveFilterHeight = convInfo.effectiveFilterHeight;
-        var effectiveFilterWidth = convInfo.effectiveFilterWidth;
-        var padLeft = effectiveFilterWidth - 1 - convInfo.padInfo.left;
-        var padTop = effectiveFilterHeight - 1 - convInfo.padInfo.top;
-        var dx = ops.buffer(x.shape, 'float32');
-        var maxPosBuf = this.bufferSync(maxPositions);
-        var dyBuf = this.bufferSync(dy);
-        for (var b = 0; b < convInfo.batchSize; ++b) {
-            for (var d = 0; d < convInfo.inChannels; ++d) {
-                for (var dxR = 0; dxR < convInfo.inHeight; ++dxR) {
-                    for (var dxC = 0; dxC < convInfo.inWidth; ++dxC) {
-                        // Shader code begins.
-                        var dyRCorner = dxR - padTop;
-                        var dyCCorner = dxC - padLeft;
-                        var dotProd = 0;
-                        for (var wR = 0; wR < effectiveFilterHeight; wR += dilationHeight) {
-                            var dyR = (dyRCorner + wR) / strideHeight;
-                            if (dyR < 0 || dyR >= convInfo.outHeight ||
-                                Math.floor(dyR) !== dyR) {
-                                continue;
-                            }
-                            for (var wC = 0; wC < effectiveFilterWidth; wC += dilationWidth) {
-                                var dyC = (dyCCorner + wC) / strideWidth;
-                                if (dyC < 0 || dyC >= convInfo.outWidth ||
-                                    Math.floor(dyC) !== dyC) {
-                                    continue;
-                                }
-                                var maxPos = effectiveFilterHeight * effectiveFilterWidth -
-                                    1 - maxPosBuf.get(b, dyR, dyC, d);
-                                var curPos = wR * effectiveFilterWidth + wC;
-                                var mask = maxPos === curPos ? 1 : 0;
-                                if (mask === 0) {
-                                    continue;
-                                }
-                                var pixel = dyBuf.get(b, dyR, dyC, d);
-                                dotProd += pixel * mask;
-                            }
-                        }
-                        dx.set(dotProd, b, dxR, dxC, d);
-                    }
-                }
-            }
-        }
-        return dx.toTensor();
-    };
-    MathBackendCPU.prototype.avgPoolBackprop = function (dy, x, convInfo) {
-        cpu_util_1.assertNotComplex([dy, x], 'avgPoolBackprop');
-        var strideHeight = convInfo.strideHeight;
-        var strideWidth = convInfo.strideWidth;
-        var filterHeight = convInfo.filterHeight;
-        var filterWidth = convInfo.filterWidth;
-        var dilationHeight = convInfo.dilationHeight;
-        var dilationWidth = convInfo.dilationWidth;
-        var effectiveFilterHeight = convInfo.effectiveFilterHeight;
-        var effectiveFilterWidth = convInfo.effectiveFilterWidth;
-        var padLeft = effectiveFilterWidth - 1 - convInfo.padInfo.left;
-        var padTop = effectiveFilterHeight - 1 - convInfo.padInfo.top;
-        var dx = ops.buffer(x.shape, 'float32');
-        var avgMultiplier = 1 / (filterHeight * filterWidth);
-        var dyBuf = this.bufferSync(dy);
-        for (var b = 0; b < convInfo.batchSize; ++b) {
-            for (var d = 0; d < convInfo.inChannels; ++d) {
-                for (var dxR = 0; dxR < convInfo.inHeight; ++dxR) {
-                    for (var dxC = 0; dxC < convInfo.inWidth; ++dxC) {
-                        // Shader code begins.
-                        var dyRCorner = dxR - padTop;
-                        var dyCCorner = dxC - padLeft;
-                        var dotProd = 0;
-                        for (var wR = 0; wR < effectiveFilterHeight; wR += dilationHeight) {
-                            var dyR = (dyRCorner + wR) / strideHeight;
-                            if (dyR < 0 || dyR >= convInfo.outHeight ||
-                                Math.floor(dyR) !== dyR) {
-                                continue;
-                            }
-                            for (var wC = 0; wC < effectiveFilterWidth; wC += dilationWidth) {
-                                var dyC = (dyCCorner + wC) / strideWidth;
-                                if (dyC < 0 || dyC >= convInfo.outWidth ||
-                                    Math.floor(dyC) !== dyC) {
-                                    continue;
-                                }
-                                var pixel = dyBuf.get(b, dyR, dyC, d);
-                                dotProd += pixel;
-                            }
-                        }
-                        dx.set(dotProd * avgMultiplier, b, dxR, dxC, d);
-                    }
-                }
-            }
-        }
-        return dx.toTensor();
-    };
-    MathBackendCPU.prototype.pool3d = function (x, convInfo, poolType) {
-        cpu_util_1.assertNotComplex(x, 'pool3d');
-        var strideDepth = convInfo.strideDepth;
-        var strideHeight = convInfo.strideHeight;
-        var strideWidth = convInfo.strideWidth;
-        var dilationDepth = convInfo.dilationDepth;
-        var dilationHeight = convInfo.dilationHeight;
-        var dilationWidth = convInfo.dilationWidth;
-        var effectiveFilterDepth = convInfo.effectiveFilterDepth;
-        var effectiveFilterHeight = convInfo.effectiveFilterHeight;
-        var effectiveFilterWidth = convInfo.effectiveFilterWidth;
-        var padFront = convInfo.padInfo.front;
-        var padTop = convInfo.padInfo.top;
-        var padLeft = convInfo.padInfo.left;
-        var initialValue = (poolType === 'max' ? Number.NEGATIVE_INFINITY :
-            Number.POSITIVE_INFINITY);
-        var xValues = this.readSync(x.dataId);
-        var output = ops.buffer(convInfo.outShape, x.dtype);
-        var outputVals = output.values;
-        var outputBatchStrides = convInfo.outShape[1] * convInfo.outShape[2] *
-            convInfo.outShape[3] * convInfo.outShape[4];
-        var outputDepthStrides = convInfo.outShape[2] * convInfo.outShape[3] * convInfo.outShape[4];
-        var outputRowStrides = convInfo.outShape[3] * convInfo.outShape[4];
-        var outputColStrides = convInfo.outShape[4];
-        for (var batch = 0; batch < convInfo.batchSize; ++batch) {
-            var outputBatchOffset = batch * outputBatchStrides;
-            var inputBatchOffset = batch * x.strides[0];
-            for (var channel = 0; channel < convInfo.inChannels; ++channel) {
-                for (var yDepth = 0; yDepth < convInfo.outDepth; ++yDepth) {
-                    var xDepthCorner = yDepth * strideDepth - padFront;
-                    var xDepthMin = xDepthCorner;
-                    while (xDepthMin < 0) {
-                        xDepthMin += dilationDepth;
-                    }
-                    var xDepthMax = Math.min(convInfo.inDepth, effectiveFilterDepth + xDepthCorner);
-                    var outputDepthOffset = outputBatchOffset + yDepth * outputDepthStrides;
-                    for (var yRow = 0; yRow < convInfo.outHeight; ++yRow) {
-                        var xRowCorner = yRow * strideHeight - padTop;
-                        var xRowMin = xRowCorner;
-                        while (xRowMin < 0) {
-                            xRowMin += dilationHeight;
-                        }
-                        var xRowMax = Math.min(convInfo.inHeight, effectiveFilterHeight + xRowCorner);
-                        var outputRowOffset = outputDepthOffset + yRow * outputRowStrides;
-                        for (var yCol = 0; yCol < convInfo.outWidth; ++yCol) {
-                            var xColCorner = yCol * strideWidth - padLeft;
-                            var xColMin = xColCorner;
-                            while (xColMin < 0) {
-                                xColMin += dilationWidth;
-                            }
-                            var xColMax = Math.min(convInfo.inWidth, effectiveFilterWidth + xColCorner);
-                            // Shader code begins
-                            var outputColOffset = outputRowOffset + yCol * outputColStrides;
-                            var minMaxValue = initialValue;
-                            var avgValue = 0;
-                            var count = 0;
-                            for (var xDepth = xDepthMin; xDepth < xDepthMax; xDepth += dilationDepth) {
-                                var xDepthOffset = inputBatchOffset + xDepth * x.strides[1];
-                                for (var xRow = xRowMin; xRow < xRowMax; xRow += dilationHeight) {
-                                    var xRowOffset = xDepthOffset + xRow * x.strides[2];
-                                    for (var xCol = xColMin; xCol < xColMax; xCol += dilationWidth) {
-                                        var xColOffset = xRowOffset + xCol * x.strides[3];
-                                        var pixel = xValues[xColOffset + channel];
-                                        if ((poolType === 'max' && pixel > minMaxValue)) {
-                                            minMaxValue = pixel;
-                                        }
-                                        else if (poolType === 'avg') {
-                                            avgValue += pixel;
-                                            count++;
-                                        }
-                                        if (isNaN(minMaxValue)) {
-                                            break;
-                                        }
-                                    }
-                                    if (isNaN(minMaxValue)) {
-                                        break;
-                                    }
-                                }
-                                if (isNaN(minMaxValue)) {
-                                    break;
-                                }
-                            }
-                            var outputOffset = outputColOffset + channel;
-                            outputVals[outputOffset] =
-                                poolType === 'avg' ? avgValue / count : minMaxValue;
-                        }
-                    }
-                }
-            }
-        }
-        return output.toTensor();
-    };
-    MathBackendCPU.prototype.avgPool3d = function (x, convInfo) {
-        cpu_util_1.assertNotComplex(x, 'avgPool3d');
-        return this.pool3d(x, convInfo, 'avg').toFloat();
-    };
-    MathBackendCPU.prototype.avgPool3dBackprop = function (dy, x, convInfo) {
-        cpu_util_1.assertNotComplex([dy, x], 'avgPool3dBackprop');
-        var strideDepth = convInfo.strideDepth;
-        var strideHeight = convInfo.strideHeight;
-        var strideWidth = convInfo.strideWidth;
-        var filterDepth = convInfo.filterDepth;
-        var filterHeight = convInfo.filterHeight;
-        var filterWidth = convInfo.filterWidth;
-        var dilationDepth = convInfo.dilationDepth;
-        var dilationHeight = convInfo.dilationHeight;
-        var dilationWidth = convInfo.dilationWidth;
-        var effectiveFilterDepth = convInfo.effectiveFilterDepth;
-        var effectiveFilterHeight = convInfo.effectiveFilterHeight;
-        var effectiveFilterWidth = convInfo.effectiveFilterWidth;
-        var padFront = effectiveFilterDepth - 1 - convInfo.padInfo.front;
-        var padLeft = effectiveFilterWidth - 1 - convInfo.padInfo.left;
-        var padTop = effectiveFilterHeight - 1 - convInfo.padInfo.top;
-        var dx = ops.buffer(x.shape, 'float32');
-        var avgMultiplier = 1 / (filterDepth * filterHeight * filterWidth);
-        var dyBuf = this.bufferSync(dy);
-        for (var batch = 0; batch < convInfo.batchSize; ++batch) {
-            for (var channel = 0; channel < convInfo.inChannels; ++channel) {
-                for (var dxDepth = 0; dxDepth < convInfo.inDepth; ++dxDepth) {
-                    for (var dxRow = 0; dxRow < convInfo.inHeight; ++dxRow) {
-                        for (var dxCol = 0; dxCol < convInfo.inWidth; ++dxCol) {
-                            // Shader code begins.
-                            var dyDepthCorner = dxDepth - padFront;
-                            var dyRowCorner = dxRow - padTop;
-                            var dyColCorner = dxCol - padLeft;
-                            var dotProd = 0;
-                            for (var wDepth = 0; wDepth < effectiveFilterDepth; wDepth += dilationDepth) {
-                                var dyDepth = (dyDepthCorner + wDepth) / strideDepth;
-                                if (dyDepth < 0 || dyDepth >= convInfo.outDepth ||
-                                    Math.floor(dyDepth) !== dyDepth) {
-                                    continue;
-                                }
-                                for (var wRow = 0; wRow < effectiveFilterHeight; wRow += dilationHeight) {
-                                    var dyRow = (dyRowCorner + wRow) / strideHeight;
-                                    if (dyRow < 0 || dyRow >= convInfo.outHeight ||
-                                        Math.floor(dyRow) !== dyRow) {
-                                        continue;
-                                    }
-                                    for (var wCol = 0; wCol < effectiveFilterWidth; wCol += dilationWidth) {
-                                        var dyCol = (dyColCorner + wCol) / strideWidth;
-                                        if (dyCol < 0 || dyCol >= convInfo.outWidth ||
-                                            Math.floor(dyCol) !== dyCol) {
-                                            continue;
-                                        }
-                                        var pixel = dyBuf.get(batch, dyDepth, dyRow, dyCol, channel);
-                                        dotProd += pixel;
-                                    }
-                                }
-                            }
-                            dx.set(dotProd * avgMultiplier, batch, dxDepth, dxRow, dxCol, channel);
-                        }
-                    }
-                }
-            }
-        }
-        return dx.toTensor();
-    };
-    MathBackendCPU.prototype.maxPool3d = function (x, convInfo) {
-        cpu_util_1.assertNotComplex(x, 'maxPool3d');
-        return this.pool3d(x, convInfo, 'max').toFloat();
-    };
-    MathBackendCPU.prototype.maxPool3dPositions = function (x, convInfo) {
-        var maxPositions = ops.buffer(convInfo.outShape, 'int32');
-        var strideDepth = convInfo.strideDepth;
-        var strideHeight = convInfo.strideHeight;
-        var strideWidth = convInfo.strideWidth;
-        var dilationDepth = convInfo.dilationDepth;
-        var dilationHeight = convInfo.dilationHeight;
-        var dilationWidth = convInfo.dilationWidth;
-        var effectiveFilterDepth = convInfo.effectiveFilterDepth;
-        var effectiveFilterHeight = convInfo.effectiveFilterHeight;
-        var effectiveFilterWidth = convInfo.effectiveFilterWidth;
-        var padFront = convInfo.padInfo.front;
-        var padTop = convInfo.padInfo.top;
-        var padLeft = convInfo.padInfo.left;
-        var xBuf = this.bufferSync(x);
-        for (var batch = 0; batch < convInfo.batchSize; ++batch) {
-            for (var channel = 0; channel < convInfo.inChannels; ++channel) {
-                for (var yDepth = 0; yDepth < convInfo.outDepth; ++yDepth) {
-                    var xDepthCorner = yDepth * strideDepth - padFront;
-                    var xDepthMin = xDepthCorner;
-                    while (xDepthMin < 0) {
-                        xDepthMin += dilationDepth;
-                    }
-                    var xDepthMax = Math.min(convInfo.inDepth, effectiveFilterDepth + xDepthCorner);
-                    for (var yRow = 0; yRow < convInfo.outHeight; ++yRow) {
-                        var xRowCorner = yRow * strideHeight - padTop;
-                        var xRowMin = xRowCorner;
-                        while (xRowMin < 0) {
-                            xRowMin += dilationHeight;
-                        }
-                        var xRowMax = Math.min(convInfo.inHeight, effectiveFilterHeight + xRowCorner);
-                        for (var yCol = 0; yCol < convInfo.outWidth; ++yCol) {
-                            var xColCorner = yCol * strideWidth - padLeft;
-                            var xColMin = xColCorner;
-                            while (xColMin < 0) {
-                                xColMin += dilationWidth;
-                            }
-                            var xColMax = Math.min(convInfo.inWidth, effectiveFilterWidth + xColCorner);
-                            // Shader code begins
-                            var maxValue = Number.NEGATIVE_INFINITY;
-                            var maxPosition = -1;
-                            for (var xDepth = xDepthMin; xDepth < xDepthMax; xDepth += dilationDepth) {
-                                var wDepth = xDepth - xDepthCorner;
-                                for (var xRow = xRowMin; xRow < xRowMax; xRow += dilationHeight) {
-                                    var wRow = xRow - xRowCorner;
-                                    for (var xCol = xColMin; xCol < xColMax; xCol += dilationWidth) {
-                                        var wCol = xCol - xColCorner;
-                                        var pixel = xBuf.get(batch, xDepth, xRow, xCol, channel);
-                                        if (pixel >= maxValue) {
-                                            maxValue = pixel;
-                                            maxPosition = wDepth * effectiveFilterHeight *
-                                                effectiveFilterWidth +
-                                                wRow * effectiveFilterHeight + wCol;
-                                        }
-                                    }
-                                }
-                            }
-                            maxPositions.set(maxPosition, batch, yDepth, yRow, yCol, channel);
-                        }
-                    }
-                }
-            }
-        }
-        return maxPositions.toTensor();
-    };
-    MathBackendCPU.prototype.maxPool3dBackprop = function (dy, x, y, convInfo) {
-        cpu_util_1.assertNotComplex([x, y], 'maxPool3dBackprop');
-        var maxPositions = this.maxPool3dPositions(x, convInfo);
-        var strideDepth = convInfo.strideDepth;
-        var strideHeight = convInfo.strideHeight;
-        var strideWidth = convInfo.strideWidth;
-        var dilationDepth = convInfo.dilationDepth;
-        var dilationHeight = convInfo.dilationHeight;
-        var dilationWidth = convInfo.dilationWidth;
-        var effectiveFilterDepth = convInfo.effectiveFilterDepth;
-        var effectiveFilterHeight = convInfo.effectiveFilterHeight;
-        var effectiveFilterWidth = convInfo.effectiveFilterWidth;
-        var padFront = effectiveFilterDepth - 1 - convInfo.padInfo.front;
-        var padLeft = effectiveFilterWidth - 1 - convInfo.padInfo.left;
-        var padTop = effectiveFilterHeight - 1 - convInfo.padInfo.top;
-        var dx = ops.buffer(x.shape, 'float32');
-        var maxPosBuf = this.bufferSync(maxPositions);
-        var dyBuf = this.bufferSync(dy);
-        for (var batch = 0; batch < convInfo.batchSize; ++batch) {
-            for (var channel = 0; channel < convInfo.inChannels; ++channel) {
-                for (var dxDepth = 0; dxDepth < convInfo.inDepth; ++dxDepth) {
-                    for (var dxRow = 0; dxRow < convInfo.inHeight; ++dxRow) {
-                        for (var dxCol = 0; dxCol < convInfo.inWidth; ++dxCol) {
-                            // Shader code begins
-                            var dyDepthCorner = dxDepth - padFront;
-                            var dyRowCorner = dxRow - padTop;
-                            var dyColCorner = dxCol - padLeft;
-                            var dotProd = 0;
-                            for (var wDepth = 0; wDepth < effectiveFilterDepth; wDepth += dilationDepth) {
-                                var dyDepth = (dyDepthCorner + wDepth) / strideDepth;
-                                if (dyDepth < 0 || dyDepth >= convInfo.outDepth ||
-                                    Math.floor(dyDepth) !== dyDepth) {
-                                    continue;
-                                }
-                                for (var wRow = 0; wRow < effectiveFilterHeight; wRow += dilationHeight) {
-                                    var dyRow = (dyRowCorner + wRow) / strideHeight;
-                                    if (dyRow < 0 || dyRow >= convInfo.outHeight ||
-                                        Math.floor(dyRow) !== dyRow) {
-                                        continue;
-                                    }
-                                    for (var wCol = 0; wCol < effectiveFilterWidth; wCol += dilationWidth) {
-                                        var dyCol = (dyColCorner + wCol) / strideWidth;
-                                        if (dyCol < 0 || dyCol >= convInfo.outWidth ||
-                                            Math.floor(dyCol) !== dyCol) {
-                                            continue;
-                                        }
-                                        var maxPos = effectiveFilterDepth *
-                                            effectiveFilterHeight * effectiveFilterWidth -
-                                            1 -
-                                            maxPosBuf.get(batch, dyDepth, dyRow, dyCol, channel);
-                                        var curPos = wDepth * effectiveFilterHeight * effectiveFilterWidth +
-                                            wRow * effectiveFilterWidth + wCol;
-                                        var mask = maxPos === curPos ? 1 : 0;
-                                        if (mask === 0) {
-                                            continue;
-                                        }
-                                        var pixel = dyBuf.get(batch, dyDepth, dyRow, dyCol, channel);
-                                        dotProd += pixel * mask;
-                                    }
-                                }
-                            }
-                            dx.set(dotProd, batch, dxDepth, dxRow, dxCol, channel);
-                        }
-                    }
-                }
-            }
-        }
-        return dx.toTensor();
-    };
-    MathBackendCPU.prototype.cast = function (x, dtype) {
-        return backend_util.castTensor(x, dtype, this);
-    };
-    MathBackendCPU.prototype.reshape = function (x, shape) {
-        return backend_util.reshapeTensor(x, shape);
-    };
-    MathBackendCPU.prototype.avgPool = function (x, convInfo) {
-        cpu_util_1.assertNotComplex(x, 'avgPool');
-        return this.pool(x, convInfo, 'avg').toFloat();
-    };
-    MathBackendCPU.prototype.resizeBilinear = function (x, newHeight, newWidth, alignCorners) {
-        cpu_util_1.assertNotComplex(x, 'resizeBilinear');
-        var _a = x.shape, batch = _a[0], oldHeight = _a[1], oldWidth = _a[2], numChannels = _a[3];
-        var xValues = this.readSync(x.dataId);
-        var result = new Float32Array(util.sizeFromShape([batch, newHeight, newWidth, numChannels]));
-        var effectiveInputSize = [
-            (alignCorners && newHeight > 1) ? oldHeight - 1 : oldHeight,
-            (alignCorners && newWidth > 1) ? oldWidth - 1 : oldWidth
-        ];
-        var effectiveOutputSize = [
-            (alignCorners && newHeight > 1) ? newHeight - 1 : newHeight,
-            (alignCorners && newWidth > 1) ? newWidth - 1 : newWidth
-        ];
-        var outputIdx = 0;
-        var effectiveRowSizeRatio = effectiveInputSize[0] / effectiveOutputSize[0];
-        var effectiveColSizeRatio = effectiveInputSize[1] / effectiveOutputSize[1];
-        for (var b = 0; b < batch; b++) {
-            for (var r = 0; r < newHeight; r++) {
-                var sourceFracRow = effectiveRowSizeRatio * r;
-                var sourceRowFloor = Math.floor(sourceFracRow);
-                var rowFrac = sourceFracRow - sourceRowFloor;
-                var sourceRowCeil = Math.min(oldHeight - 1, Math.ceil(sourceFracRow));
-                var topRowOffset = b * x.strides[0] + sourceRowFloor * x.strides[1];
-                var botRowOffset = b * x.strides[0] + sourceRowCeil * x.strides[1];
-                for (var c = 0; c < newWidth; c++) {
-                    var sourceFracCol = effectiveColSizeRatio * c;
-                    var sourceColFloor = Math.floor(sourceFracCol);
-                    var colFrac = sourceFracCol - sourceColFloor;
-                    var sourceColCeil = Math.min(oldWidth - 1, Math.ceil(sourceFracCol));
-                    var topLeftOffest = topRowOffset + sourceColFloor * x.strides[2];
-                    var botLeftOffset = botRowOffset + sourceColFloor * x.strides[2];
-                    var topRightOffset = topRowOffset + sourceColCeil * x.strides[2];
-                    var botRightOffest = botRowOffset + sourceColCeil * x.strides[2];
-                    for (var d = 0; d < numChannels; d++) {
-                        // Begin shader.
-                        // Compute the fractional index of the source.
-                        var topLeft = xValues[topLeftOffest + d];
-                        var bottomLeft = xValues[botLeftOffset + d];
-                        var topRight = xValues[topRightOffset + d];
-                        var bottomRight = xValues[botRightOffest + d];
-                        var top_1 = topLeft + (topRight - topLeft) * colFrac;
-                        var bottom = bottomLeft + (bottomRight - bottomLeft) * colFrac;
-                        var newValue = top_1 + (bottom - top_1) * rowFrac;
-                        result[outputIdx++] = newValue;
-                    }
-                }
-            }
-        }
-        return ops.tensor(result, [batch, newHeight, newWidth, numChannels]);
-    };
-    MathBackendCPU.prototype.resizeBilinearBackprop = function (dy, x, alignCorners) {
-        cpu_util_1.assertNotComplex([dy, x], 'resizeBilinearBackprop');
-        var _a = x.shape, batch = _a[0], xHeight = _a[1], xWidth = _a[2], depth = _a[3];
-        var _b = dy.shape, yHeight = _b[1], yWidth = _b[2];
-        var output = new Float32Array(batch * xHeight * xWidth * depth);
-        // In the backwards pass, we want to find the pixels that were generated
-        // for each pixel in the input image the forward pass and add the
-        // corresponding coefficient from dy to the gradient (with some
-        // interpolation).
-        var effectiveXSize = [
-            (alignCorners && yHeight > 1) ? xHeight - 1 : xHeight,
-            (alignCorners && yWidth > 1) ? xWidth - 1 : xWidth
-        ];
-        var effectiveYSize = [
-            (alignCorners && yHeight > 1) ? yHeight - 1 : yHeight,
-            (alignCorners && yWidth > 1) ? yWidth - 1 : yWidth
-        ];
-        var heightScale = effectiveXSize[0] / effectiveYSize[0];
-        var widthScale = effectiveXSize[1] / effectiveYSize[1];
-        // Reference implementation
-        // tslint:disable-next-line:max-line-length
-        // https://github.com/tensorflow/tensorflow/blob/3039375c86a5bbc9610c7725dcaa95d635f87ba2/tensorflow/core/kernels/resize_bilinear_op.cc#L275
-        var dyValues = this.readSync(dy.dataId);
-        var offset = 0;
-        for (var b = 0; b < batch; b++) {
-            var bOffset = b * x.strides[0];
-            for (var r = 0; r < yHeight; r++) {
-                var dxR = r * heightScale;
-                var topDxRIndex = Math.floor(dxR);
-                var bottomDxRIndex = Math.min(Math.ceil(dxR), xHeight - 1);
-                var topDxROffset = bOffset + topDxRIndex * x.strides[1];
-                var bottomDxROffset = bOffset + bottomDxRIndex * x.strides[1];
-                var dxRLerp = dxR - topDxRIndex;
-                var inverseDxRLerp = 1.0 - dxRLerp;
-                for (var c = 0; c < yWidth; c++) {
-                    var dxC = c * widthScale;
-                    var leftDxCIndex = Math.floor(dxC);
-                    var rightDxCIndex = Math.min(Math.ceil(dxC), xWidth - 1);
-                    var dxCLerp = dxC - leftDxCIndex;
-                    var inverseDxCLerp = 1.0 - dxCLerp;
-                    var topLeftRCOffset = topDxROffset + leftDxCIndex * x.strides[2];
-                    var topRightRCOffset = topDxROffset + rightDxCIndex * x.strides[2];
-                    var bottomLeftRCOffset = bottomDxROffset + leftDxCIndex * x.strides[2];
-                    var bottomRightRCOffset = bottomDxROffset + rightDxCIndex * x.strides[2];
-                    var inverseDxRLerpTimesInverseDxCLerp = inverseDxRLerp * inverseDxCLerp;
-                    var inverseDxRLerpTimesDxCLerp = inverseDxRLerp * dxCLerp;
-                    var dxRLerpTimesInverseDxCLerp = dxRLerp * inverseDxCLerp;
-                    var dxRLerpTimesDxCLerp = dxRLerp * dxCLerp;
-                    for (var d = 0; d < depth; d++) {
-                        var dyVal = dyValues[offset++];
-                        output[topLeftRCOffset + d] +=
-                            dyVal * inverseDxRLerpTimesInverseDxCLerp;
-                        output[topRightRCOffset + d] += dyVal * inverseDxRLerpTimesDxCLerp;
-                        output[bottomLeftRCOffset + d] +=
-                            dyVal * dxRLerpTimesInverseDxCLerp;
-                        output[bottomRightRCOffset + d] += dyVal * dxRLerpTimesDxCLerp;
-                    }
-                }
-            }
-        }
-        return ops.tensor4d(output, [batch, xWidth, xHeight, depth], x.dtype);
-    };
-    MathBackendCPU.prototype.resizeNearestNeighbor = function (x, newHeight, newWidth, alignCorners) {
-        cpu_util_1.assertNotComplex(x, 'resizeNearestNeighbor');
-        var _a = x.shape, batch = _a[0], oldHeight = _a[1], oldWidth = _a[2], numChannels = _a[3];
-        var xValues = this.readSync(x.dataId);
-        var output = new Float32Array(batch * newHeight * newWidth * numChannels);
-        var effectiveInputSize = [
-            (alignCorners && newHeight > 1) ? oldHeight - 1 : oldHeight,
-            (alignCorners && newWidth > 1) ? oldWidth - 1 : oldWidth
-        ];
-        var effectiveOutputSize = [
-            (alignCorners && newHeight > 1) ? newHeight - 1 : newHeight,
-            (alignCorners && newWidth > 1) ? newWidth - 1 : newWidth
-        ];
-        var effectiveRowSizeRatio = effectiveInputSize[0] / effectiveOutputSize[0];
-        var effectiveColSizeRatio = effectiveInputSize[1] / effectiveOutputSize[1];
-        var outputOffset = 0;
-        for (var b = 0; b < batch; b++) {
-            var batchOffset = b * x.strides[0];
-            for (var r = 0; r < newHeight; r++) {
-                var sourceFracRow = effectiveRowSizeRatio * r;
-                var sourceNearestRow = Math.min(oldHeight - 1, alignCorners ? Math.round(sourceFracRow) :
-                    Math.floor(sourceFracRow));
-                var rowOffset = batchOffset + sourceNearestRow * x.strides[1];
-                for (var c = 0; c < newWidth; c++) {
-                    var sourceFracCol = effectiveColSizeRatio * c;
-                    var sourceNearestCol = Math.min(oldWidth - 1, alignCorners ? Math.round(sourceFracCol) :
-                        Math.floor(sourceFracCol));
-                    var colOffset = rowOffset + sourceNearestCol * x.strides[2];
-                    for (var d = 0; d < numChannels; d++) {
-                        // Begin shader.
-                        // Compute the fractional index of the source.
-                        var newVal = xValues[colOffset + d];
-                        output[outputOffset++] = newVal;
-                    }
-                }
-            }
-        }
-        return ops.tensor(output, [batch, newHeight, newWidth, numChannels], x.dtype);
-    };
-    MathBackendCPU.prototype.resizeNearestNeighborBackprop = function (dy, x, alignCorners) {
-        cpu_util_1.assertNotComplex([dy, x], 'resizeNearestNeighborBackprop');
-        var _a = x.shape, batch = _a[0], xHeight = _a[1], xWidth = _a[2], depth = _a[3];
-        var _b = dy.shape, yHeight = _b[1], yWidth = _b[2];
-        var output = new Float32Array(batch * xHeight * xWidth * depth);
-        var dyValues = this.readSync(dy.dataId);
-        // In the backwards pass, we want to find the pixels that were generated
-        // for each pixel in the input image the forward pass
-        var effectiveXSize = [
-            (alignCorners && yHeight > 1) ? xHeight - 1 : xHeight,
-            (alignCorners && yWidth > 1) ? xWidth - 1 : xWidth
-        ];
-        var effectiveYSize = [
-            (alignCorners && yHeight > 1) ? yHeight - 1 : yHeight,
-            (alignCorners && yWidth > 1) ? yWidth - 1 : yWidth
-        ];
-        var heightScale = effectiveXSize[0] / effectiveYSize[0];
-        var widthScale = effectiveXSize[1] / effectiveYSize[1];
-        var invHeightScale = 1 / heightScale;
-        var invWidthScale = 1 / widthScale;
-        // This defines the size of the window of values around a particular
-        // index in dy that we want to search for contributions to dx.
-        var winHeight = (Math.ceil(invHeightScale) * 2) + 2;
-        var winWidth = (Math.ceil(invWidthScale) * 2) + 2;
-        // Loop over the output space.
-        for (var b = 0; b < batch; b++) {
-            var batchOffset = b * x.strides[0];
-            for (var r = 0; r < xHeight; r++) {
-                var rowOffset = batchOffset + r * x.strides[1];
-                // Compute bounds for where in dy we will look
-                var startRLerp = Math.floor(r * invHeightScale);
-                var startDyR = Math.floor(startRLerp - (winHeight / 2));
-                for (var c = 0; c < xWidth; c++) {
-                    var colOffset = rowOffset + c * x.strides[2];
-                    // Compute bounds for where in dy we will look
-                    var startCLerp = Math.floor(c * invWidthScale);
-                    var startDyC = Math.floor(startCLerp - (winWidth / 2));
-                    for (var d = 0; d < depth; d++) {
-                        var accum = 0;
-                        // loop over dy
-                        for (var dyRIndex = 0; dyRIndex < winHeight; dyRIndex++) {
-                            var dyR = dyRIndex + startDyR;
-                            // Guard against the window exceeding the bounds of dy
-                            if (dyR < 0 || dyR >= yHeight) {
-                                continue;
-                            }
-                            var dyROffset = batchOffset + dyR * dy.strides[1];
-                            var sourceFracRow = dyR * heightScale;
-                            var sourceNearestRow = Math.min(xHeight - 1, alignCorners ? Math.round(sourceFracRow) :
-                                Math.floor(sourceFracRow));
-                            if (r !== sourceNearestRow) {
-                                continue;
-                            }
-                            for (var dyCIndex = 0; dyCIndex < winWidth; dyCIndex++) {
-                                var dyC = dyCIndex + startDyC;
-                                // Guard against the window exceeding the bounds of dy
-                                if (dyC < 0 || dyC >= yWidth) {
-                                    continue;
-                                }
-                                var dyCOffset = dyROffset + dyC * dy.strides[2];
-                                var sourceFracCol = dyC * widthScale;
-                                var sourceNearestCol = Math.min(xWidth - 1, alignCorners ? Math.round(sourceFracCol) :
-                                    Math.floor(sourceFracCol));
-                                if (c === sourceNearestCol) {
-                                    accum += dyValues[dyCOffset + d];
-                                }
-                            }
-                        }
-                        output[colOffset + d] = accum;
-                    }
-                }
-            }
-        }
-        return ops.tensor4d(output, x.shape, x.dtype);
-    };
-    MathBackendCPU.prototype.batchNormalization = function (x, mean, variance, varianceEpsilon, scale, offset) {
-        cpu_util_1.assertNotComplex([x, mean, variance, scale, offset], 'batchNorm');
-        var xVals = this.readSync(x.dataId);
-        var mVals = this.readSync(mean.dataId);
-        var varVals = this.readSync(variance.dataId);
-        var sVals = scale ? this.readSync(scale.dataId) :
-            new Float32Array([1]);
-        var offVals = offset ? this.readSync(offset.dataId) :
-            new Float32Array([0]);
-        var outVals = new Float32Array(xVals.length);
-        var offValsLength = offVals.length;
-        var sValsLength = sVals.length;
-        var varValsLength = varVals.length;
-        var mValsLength = mVals.length;
-        var offi = 0;
-        var mi = 0;
-        var si = 0;
-        var vi = 0;
-        for (var i = 0; i < xVals.length; ++i) {
-            outVals[i] = offVals[offi++] +
-                (xVals[i] - mVals[mi++]) * sVals[si++] /
-                    Math.sqrt(varVals[vi++] + varianceEpsilon);
-            if (offi >= offValsLength) {
-                offi = 0;
-            }
-            if (mi >= mValsLength) {
-                mi = 0;
-            }
-            if (si >= sValsLength) {
-                si = 0;
-            }
-            if (vi >= varValsLength) {
-                vi = 0;
-            }
-        }
-        return ops_1.tensor4d(outVals, x.shape);
-    };
-    MathBackendCPU.prototype.localResponseNormalization4D = function (x, depthRadius, bias, alpha, beta) {
-        cpu_util_1.assertNotComplex(x, 'localResponseNormalization4D');
-        var channels = x.shape[3];
-        var maxD = channels - 1;
-        var xValues = this.readSync(x.dataId);
-        var size = x.size;
-        var result = new Float32Array(size);
-        function sumAcrossChannels(offset) {
-            var currentChannel = offset % channels;
-            var beginSumOffset = offset - currentChannel + Math.max(0, currentChannel - depthRadius);
-            var endSumOffset = offset - currentChannel +
-                Math.min(currentChannel + depthRadius, maxD);
-            var sum = 0.0;
-            for (; beginSumOffset <= endSumOffset; beginSumOffset++) {
-                var z = xValues[beginSumOffset];
-                sum += z * z;
-            }
-            return sum;
-        }
-        for (var offset = 0; offset < size; offset++) {
-            var sum = sumAcrossChannels(offset);
-            var val = xValues[offset] * Math.pow(bias + alpha * sum, -beta);
-            result[offset] = val;
-        }
-        return ops.tensor4d(result, x.shape);
-    };
-    MathBackendCPU.prototype.LRNGrad = function (dy, inputImage, outputImage, depthRadius, bias, alpha, beta) {
-        cpu_util_1.assertNotComplex(dy, 'LRNGrad');
-        var channels = dy.shape[3];
-        var dyValues = this.readSync(dy.dataId);
-        var inputImageValues = this.readSync(inputImage.dataId);
-        var outputImageValues = this.readSync(outputImage.dataId);
-        var result = new Float32Array(dy.size);
-        var size = dy.size;
-        for (var offset = 0; offset < size; offset++) {
-            var currentChannel = offset % channels;
-            var depthBegin = (offset - currentChannel) + Math.max(0, currentChannel - depthRadius);
-            var depthEnd = (offset - currentChannel) +
-                Math.min(channels, currentChannel + depthRadius + 1);
-            var norm = 0;
-            for (var k = depthBegin; k < depthEnd; k++) {
-                norm += Math.pow(inputImageValues[k], 2);
-            }
-            norm = alpha * norm + bias;
-            for (var k = depthBegin; k < depthEnd; k++) {
-                var dyi = -2 * alpha * beta * inputImageValues[k] *
-                    outputImageValues[offset] / norm;
-                if (offset === k) {
-                    dyi += Math.pow(norm, -beta);
-                }
-                dyi *= dyValues[offset];
-                result[k] += dyi;
-            }
-        }
-        return ops.tensor4d(result, dy.shape);
-    };
-    MathBackendCPU.prototype.multinomial = function (logits, normalized, numSamples, seed) {
-        cpu_util_1.assertNotComplex(logits, 'multinomial');
-        var probabilities = normalized ? logits : ops.softmax(logits);
-        var batchSize = probabilities.shape[0];
-        var numEvents = probabilities.shape[1];
-        var res = ops.zeros([batchSize, numSamples], 'int32');
-        var resVals = this.readSync(res.dataId);
-        var probVals = this.readSync(probabilities.dataId);
-        for (var b = 0; b < batchSize; ++b) {
-            var offset = b * numEvents;
-            // The cdf won't include the last event. It will be implicit if no other
-            // event happened.
-            var cdf = new Float32Array(numEvents - 1);
-            cdf[0] = probVals[offset];
-            for (var event_1 = 1; event_1 < cdf.length; ++event_1) {
-                cdf[event_1] = cdf[event_1 - 1] + probVals[offset + event_1];
-            }
-            var random = seedrandom.alea(seed.toString());
-            var outOffset = b * numSamples;
-            for (var sampleId = 0; sampleId < numSamples; ++sampleId) {
-                var r = random();
-                // Assume last event happened by default.
-                resVals[outOffset + sampleId] = cdf.length;
-                for (var event_2 = 0; event_2 < cdf.length; event_2++) {
-                    if (r < cdf[event_2]) {
-                        resVals[outOffset + sampleId] = event_2;
-                        break;
-                    }
-                }
-            }
-        }
-        return res;
-    };
-    MathBackendCPU.prototype.oneHot = function (indices, depth, onValue, offValue) {
-        cpu_util_1.assertNotComplex(indices, 'oneHot');
-        var res = new Float32Array(indices.size * depth);
-        res.fill(offValue);
-        var indicesVal = this.readSync(indices.dataId);
-        for (var event_3 = 0; event_3 < indices.size; ++event_3) {
-            if (indicesVal[event_3] >= 0 && indicesVal[event_3] < depth) {
-                res[event_3 * depth + indicesVal[event_3]] = onValue;
-            }
-        }
-        return ops.tensor2d(res, [indices.size, depth], 'int32');
-    };
-    MathBackendCPU.prototype.nonMaxSuppression = function (boxes, scores, maxOutputSize, iouThreshold, scoreThreshold) {
-        cpu_util_1.assertNotComplex(boxes, 'nonMaxSuppression');
-        var boxesVals = this.readSync(boxes.dataId);
-        var scoresVals = this.readSync(scores.dataId);
-        return non_max_suppression_impl_1.nonMaxSuppressionV3(boxesVals, scoresVals, maxOutputSize, iouThreshold, scoreThreshold);
-    };
-    MathBackendCPU.prototype.fft = function (x) {
-        return this.fftBatch(x, false);
-    };
-    MathBackendCPU.prototype.ifft = function (x) {
-        return this.fftBatch(x, true);
-    };
-    /**
-     * Calculate FFT of inner most elements of batch tensor.
-     */
-    MathBackendCPU.prototype.fftBatch = function (x, inverse) {
-        var batch = x.shape[0];
-        var innerDim = x.shape[1];
-        // Collects real and imaginary values separately.
-        var realResult = ops.buffer(x.shape, 'float32');
-        var imagResult = ops.buffer(x.shape, 'float32');
-        var real = ops.real(x).as2D(batch, innerDim);
-        var imag = ops.imag(x).as2D(batch, innerDim);
-        for (var b = 0; b < batch; b++) {
-            // TODO: Support slice ops for complex type.
-            var r = real.slice([b, 0], [1, innerDim]);
-            var i = imag.slice([b, 0], [1, innerDim]);
-            var input = ops.complex(r, i);
-            // Run FFT by batch element.
-            var res = this.readSync(this.fftImpl(input, inverse).dataId);
-            for (var d = 0; d < innerDim; d++) {
-                var c = complex_util.getComplexWithIndex(res, d);
-                realResult.values[b * innerDim + d] = c.real;
-                imagResult.values[b * innerDim + d] = c.imag;
-            }
-        }
-        var t = ops.complex(realResult.toTensor(), imagResult.toTensor());
-        return t.as2D(batch, innerDim);
-    };
-    MathBackendCPU.prototype.fftImpl = function (x, inverse) {
-        var x1D = x.as1D();
-        var n = x1D.size;
-        if (this.isExponentOf2(n)) {
-            var result = this.fftRadix2(x1D, n, inverse).as2D(x.shape[0], x.shape[1]);
-            if (inverse) {
-                result = ops.complex(ops.real(result).div(ops_1.scalar(n)), ops.imag(result).div(ops_1.scalar(n)));
-            }
-            return result;
-        }
-        else {
-            var data = this.readSync(x.dataId);
-            var rawOutput = this.fourierTransformByMatmul(data, n, inverse);
-            var output = complex_util.splitRealAndImagArrays(rawOutput);
-            return ops.complex(output.real, output.imag).as2D(x.shape[0], x.shape[1]);
-        }
-    };
-    MathBackendCPU.prototype.isExponentOf2 = function (size) {
-        return (size & size - 1) === 0;
-    };
-    // FFT using Cooley-Tukey algorithm on radix 2 dimensional input.
-    MathBackendCPU.prototype.fftRadix2 = function (input, size, inverse) {
-        if (size === 1) {
-            return input;
-        }
-        var data = this.readSync(input.dataId);
-        var half = size / 2;
-        var evenComplex = complex_util.complexWithEvenIndex(data);
-        var evenTensor = ops.complex(evenComplex.real, evenComplex.imag).as1D();
-        var oddComplex = complex_util.complexWithOddIndex(data);
-        var oddTensor = ops.complex(oddComplex.real, oddComplex.imag).as1D();
-        // Recursive call for half part of original input.
-        evenTensor = this.fftRadix2(evenTensor, half, inverse);
-        oddTensor = this.fftRadix2(oddTensor, half, inverse);
-        var e = complex_util.exponents(size, inverse);
-        var exponent = ops.complex(e.real, e.imag).mul(oddTensor);
-        var addPart = evenTensor.add(exponent);
-        var subPart = evenTensor.sub(exponent);
-        var realTensor = ops.real(addPart).concat(ops.real(subPart));
-        var imagTensor = ops.imag(addPart).concat(ops.imag(subPart));
-        return ops.complex(realTensor, imagTensor).as1D();
-    };
-    // Calculate fourier transform by multplying sinusoid matrix.
-    MathBackendCPU.prototype.fourierTransformByMatmul = function (data, size, inverse) {
-        var ret = new Float32Array(size * 2);
-        // TODO: Use matmul instead once it supports complex64 type.
-        for (var r = 0; r < size; r++) {
-            var real_2 = 0.0;
-            var imag_2 = 0.0;
-            for (var c = 0; c < size; c++) {
-                var e = complex_util.exponent(r * c, size, inverse);
-                var term = complex_util.getComplexWithIndex(data, c);
-                real_2 += term.real * e.real - term.imag * e.imag;
-                imag_2 += term.real * e.imag + term.imag * e.real;
-            }
-            if (inverse) {
-                real_2 /= size;
-                imag_2 /= size;
-            }
-            complex_util.assignToTypedArray(ret, real_2, imag_2, r);
-        }
-        return ret;
-    };
-    MathBackendCPU.prototype.depthToSpace = function (x, blockSize, dataFormat) {
-        util.assert(dataFormat === 'NHWC', function () { return "Only NHWC dataFormat supported on CPU for depthToSpace. Got " + dataFormat; });
-        util.assert(blockSize > 1, function () {
-            return "blockSize should be > 1 for depthToSpace, but was: " + blockSize;
-        });
-        var batchSize = x.shape[0];
-        var inputHeight = x.shape[1];
-        var inputWidth = x.shape[2];
-        var inputDepth = x.shape[3];
-        var outputHeight = inputHeight * blockSize;
-        var outputWidth = inputWidth * blockSize;
-        var outputDepth = inputDepth / (blockSize * blockSize);
-        var xValues = this.readSync(x.dataId);
-        var result = new Float32Array(batchSize * outputHeight * outputWidth * outputDepth);
-        var outputIdx = 0;
-        for (var b = 0; b < batchSize; ++b) {
-            for (var h = 0; h < outputHeight; ++h) {
-                var inH = Math.floor(h / blockSize);
-                var offsetH = (h % blockSize);
-                for (var w = 0; w < outputWidth; ++w) {
-                    var inW = Math.floor(w / blockSize);
-                    var offsetW = (w % blockSize);
-                    var offsetD = (offsetH * blockSize + offsetW) * outputDepth;
-                    for (var d = 0; d < outputDepth; ++d) {
-                        var inD = d + offsetD;
-                        var inputIdx = inD + inputDepth * (inW + inputWidth * (inH + inputHeight * b));
-                        result[outputIdx++] = xValues[inputIdx];
-                    }
-                }
-            }
-        }
-        return ops.tensor4d(result, [batchSize, outputHeight, outputWidth, outputDepth]);
-    };
-    MathBackendCPU.prototype.broadcastedBinaryOp = function (a, b, dtype, op) {
-        var newShape = broadcast_util.assertAndGetBroadcastShape(a.shape, b.shape);
-        var result = ops.buffer(newShape, dtype);
-        var aVals = this.readSync(a.dataId);
-        var bVals = this.readSync(b.dataId);
-        var aBroadcastDims = broadcast_util.getBroadcastDims(a.shape, newShape);
-        var bBroadcastDims = broadcast_util.getBroadcastDims(b.shape, newShape);
-        var resVals = result.values;
-        if (aBroadcastDims.length + bBroadcastDims.length === 0) {
-            for (var i = 0; i < resVals.length; ++i) {
-                resVals[i] = op(aVals[i % aVals.length], bVals[i % bVals.length]);
-            }
-        }
-        else {
-            var aBuf = this.bufferSync(a);
-            var bBuf = this.bufferSync(b);
-            var _loop_2 = function (i) {
-                var loc = result.indexToLoc(i);
-                var aLoc = loc.slice(-a.rank);
-                aBroadcastDims.forEach(function (d) { return aLoc[d] = 0; });
-                var aIndex = aBuf.locToIndex(aLoc);
-                var bLoc = loc.slice(-b.rank);
-                bBroadcastDims.forEach(function (d) { return bLoc[d] = 0; });
-                var bIndex = bBuf.locToIndex(bLoc);
-                resVals[i] = op(aVals[aIndex], bVals[bIndex]);
-            };
-            for (var i = 0; i < resVals.length; ++i) {
-                _loop_2(i);
-            }
-        }
-        return result.toTensor();
-    };
-    MathBackendCPU.prototype.broadcastedBinaryComplexOp = function (a, b, op) {
-        var newShape = broadcast_util.assertAndGetBroadcastShape(a.shape, b.shape);
-        var realResult = ops.buffer(newShape, 'float32');
-        var imagResult = ops.buffer(newShape, 'float32');
-        var aVals = this.readSync(a.dataId);
-        var bVals = this.readSync(b.dataId);
-        var aBroadcastDims = broadcast_util.getBroadcastDims(a.shape, newShape);
-        var bBroadcastDims = broadcast_util.getBroadcastDims(b.shape, newShape);
-        var realVals = realResult.values;
-        var imagVals = imagResult.values;
-        if (aBroadcastDims.length + bBroadcastDims.length === 0) {
-            for (var i = 0; i < realVals.length; i++) {
-                var aIdx = i % aVals.length;
-                var bIdx = i % bVals.length;
-                var result = op(aVals[aIdx * 2], aVals[aIdx * 2 + 1], bVals[bIdx * 2], bVals[bIdx * 2 + 1]);
-                realVals[i] = result.real;
-                imagVals[i] = result.imag;
-            }
-        }
-        else {
-            var aRealBuf = this.bufferSync(this.data.get(a.dataId).complexTensors.real);
-            var bRealBuf = this.bufferSync(this.data.get(b.dataId).complexTensors.real);
-            var _loop_3 = function (i) {
-                var loc = realResult.indexToLoc(i);
-                var aLoc = loc.slice(-a.rank);
-                aBroadcastDims.forEach(function (d) { return aLoc[d] = 0; });
-                var aIndex = aRealBuf.locToIndex(aLoc);
-                var bLoc = loc.slice(-b.rank);
-                bBroadcastDims.forEach(function (d) { return bLoc[d] = 0; });
-                var bIndex = bRealBuf.locToIndex(bLoc);
-                var opResult = op(aVals[aIndex * 2], aVals[aIndex * 2 + 1], bVals[bIndex * 2], bVals[bIndex * 2 + 1]);
-                realVals[i] = opResult.real;
-                imagVals[i] = opResult.imag;
-            };
-            for (var i = 0; i < realVals.length; i++) {
-                _loop_3(i);
-            }
-        }
-        return this.complex(realResult.toTensor(), imagResult.toTensor());
-    };
-    MathBackendCPU.prototype.split = function (x, sizeSplits, axis) {
-        return split_shared_1.split(x, sizeSplits, axis);
-    };
-    MathBackendCPU.prototype.dispose = function () { };
-    MathBackendCPU.prototype.floatPrecision = function () {
-        return 32;
-    };
-    /** Returns the smallest representable number.  */
-    MathBackendCPU.prototype.epsilon = function () {
-        return backend_1.EPSILON_FLOAT32;
-    };
-    MathBackendCPU.prototype.cropAndResize = function (images, boxes, boxIndex, cropSize, method, extrapolationValue) {
-        var _a = images.shape, batch = _a[0], imageHeight = _a[1], imageWidth = _a[2], numChannels = _a[3];
-        var numBoxes = boxes.shape[0];
-        var cropHeight = cropSize[0], cropWidth = cropSize[1];
-        var output = ops.buffer([numBoxes, cropHeight, cropWidth, numChannels], 'float32');
-        var boxVals = this.readSync(boxes.dataId);
-        var boxIndVals = this.readSync(boxIndex.dataId);
-        var imageVals = this.readSync(images.dataId);
-        var inStride = images.strides; // to calculate flat indexes into image
-        var outStride = output.strides; // to calculate flat indexes into output
-        // Reference implementation
-        // tslint:disable-next-line:max-line-length
-        // https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/kernels/crop_and_resize_op.cc
-        for (var b = 0; b < numBoxes; b++) {
-            var startInd = b * 4;
-            var y1 = boxVals[startInd];
-            var x1 = boxVals[startInd + 1];
-            var y2 = boxVals[startInd + 2];
-            var x2 = boxVals[startInd + 3];
-            var bInd = boxIndVals[b];
-            if (bInd >= batch) {
-                continue;
-            }
-            var heightScale = (cropHeight > 1) ?
-                (y2 - y1) * (imageHeight - 1) / (cropHeight - 1) :
-                0;
-            var widthScale = (cropWidth > 1) ? (x2 - x1) * (imageWidth - 1) / (cropWidth - 1) : 0;
-            for (var y = 0; y < cropHeight; y++) {
-                var yInd = (cropHeight > 1) ?
-                    y1 * (imageHeight - 1) + y * (heightScale) :
-                    0.5 * (y1 + y2) * (imageHeight - 1);
-                if (yInd < 0 || yInd > imageHeight - 1) {
-                    for (var x = 0; x < cropWidth; x++) {
-                        for (var c = 0; c < numChannels; c++) {
-                            var ind = c + x * outStride[2] + y * outStride[1] + b * outStride[0];
-                            output.values[ind] = extrapolationValue;
-                        }
-                    }
-                    continue;
-                }
-                if (method === 'bilinear') {
-                    var topInd = Math.floor(yInd);
-                    var bottomInd = Math.ceil(yInd);
-                    var yLerp = yInd - topInd;
-                    for (var x = 0; x < cropWidth; x++) {
-                        var xInd = (cropWidth > 1) ?
-                            x1 * (imageWidth - 1) + x * widthScale :
-                            0.5 * (x1 + x2) * (imageWidth - 1);
-                        if (xInd < 0 || xInd > imageWidth - 1) {
-                            for (var c = 0; c < numChannels; c++) {
-                                var ind = c + x * outStride[2] + y * outStride[1] + b * outStride[0];
-                                output.values[ind] = extrapolationValue;
-                            }
-                            continue;
-                        }
-                        var leftInd = Math.floor(xInd);
-                        var rightInd = Math.ceil(xInd);
-                        var xLerp = xInd - leftInd;
-                        for (var c = 0; c < numChannels; c++) {
-                            var ind = c + leftInd * inStride[2] + topInd * inStride[1] +
-                                bInd * inStride[0];
-                            var topLeft = imageVals[ind];
-                            ind = c + rightInd * inStride[2] + topInd * inStride[1] +
-                                bInd * inStride[0];
-                            var topRight = imageVals[ind];
-                            ind = c + leftInd * inStride[2] + bottomInd * inStride[1] +
-                                bInd * inStride[0];
-                            var bottomLeft = imageVals[ind];
-                            ind = c + rightInd * inStride[2] + bottomInd * inStride[1] +
-                                bInd * inStride[0];
-                            var bottomRight = imageVals[ind];
-                            var top_2 = topLeft + (topRight - topLeft) * xLerp;
-                            var bottom = bottomLeft + (bottomRight - bottomLeft) * xLerp;
-                            ind = c + x * outStride[2] + y * outStride[1] + b * outStride[0];
-                            output.values[ind] = top_2 + ((bottom - top_2) * yLerp);
-                        }
-                    }
-                }
-                else { // method == "nearest"
-                    for (var x = 0; x < cropWidth; ++x) {
-                        var xInd = (cropWidth > 1) ?
-                            x1 * (imageWidth - 1) + x * widthScale :
-                            0.5 * (x1 + x2) * (imageWidth - 1);
-                        if (xInd < 0 || xInd > imageWidth - 1) {
-                            for (var c = 0; c < numChannels; c++) {
-                                var ind = c + x * outStride[2] + y * outStride[1] + b * outStride[0];
-                                output.values[ind] = extrapolationValue;
-                            }
-                            continue;
-                        }
-                        var closestX = Math.round(xInd);
-                        var closestY = Math.round(yInd);
-                        for (var c = 0; c < numChannels; c++) {
-                            var inInd = c + closestX * inStride[2] +
-                                closestY * inStride[1] + bInd * inStride[0];
-                            var outInd = c + x * outStride[2] + y * outStride[1] + b * outStride[0];
-                            output.values[outInd] = imageVals[inInd];
-                        }
-                    }
-                }
-            }
-        }
-        return output.toTensor();
-    };
-    MathBackendCPU.prototype.sparseToDense = function (sparseIndices, sparseValues, outputShape, defaultValue) {
-        var _a = scatter_nd_util.calculateShapes(sparseValues, sparseIndices, outputShape), sliceRank = _a.sliceRank, numUpdates = _a.numUpdates, sliceSize = _a.sliceSize, strides = _a.strides, outputSize = _a.outputSize;
-        var sumDupeIndices = false;
-        return this.scatter(sparseIndices, sparseValues, outputShape, outputSize, sliceSize, numUpdates, sliceRank, strides, defaultValue, sumDupeIndices);
-    };
-    MathBackendCPU.prototype.gatherND = function (x, indices) {
-        var indicesShape = indices.shape;
-        var sliceRank = indicesShape[indicesShape.length - 1];
-        var _a = gather_nd_util.prepareAndValidate(x, indices), resultShape = _a[0], numSlices = _a[1], sliceSize = _a[2], strides = _a[3];
-        if (numSlices === 0) {
-            return ops_1.tensor([], resultShape, x.dtype);
-        }
-        var buffer = new tensor_1.TensorBuffer([numSlices, sliceSize], x.dtype);
-        var indicesData = this.readSync(indices.dataId);
-        var xData = this.readSync(x.dataId);
-        for (var i = 0; i < numSlices; i++) {
-            var index = [];
-            var flattenIndex = 0;
-            for (var j = 0; j < sliceRank; j++) {
-                var dim = indicesData[i * sliceRank + j];
-                flattenIndex += dim * strides[j];
-                index.push(dim);
-            }
-            if (flattenIndex < 0 || flattenIndex >= x.size / sliceSize) {
-                throw new Error("Invalid indices: " + index + " does not index into " + x.shape);
-            }
-            for (var k = 0; k < sliceSize; k++) {
-                buffer.values[i * sliceSize + k] = xData[flattenIndex * sliceSize + k];
-            }
-        }
-        return buffer.toTensor().reshape(resultShape);
-    };
-    MathBackendCPU.prototype.scatterND = function (indices, updates, shape) {
-        var _a = scatter_nd_util.calculateShapes(updates, indices, shape), sliceRank = _a.sliceRank, numUpdates = _a.numUpdates, sliceSize = _a.sliceSize, strides = _a.strides, outputSize = _a.outputSize;
-        var defaultValue = ops_1.scalar(0);
-        var sumDupeIndices = true;
-        return this.scatter(indices, updates, shape, outputSize, sliceSize, numUpdates, sliceRank, strides, defaultValue, sumDupeIndices);
-    };
-    MathBackendCPU.prototype.fill = function (shape, value, dtype) {
-        dtype = dtype || util_1.inferDtype(value);
-        var values = util_1.getArrayFromDType(dtype, util_1.sizeFromShape(shape));
-        values.fill(value);
-        return engine_1.ENGINE.makeTensor(values, shape, dtype, this);
-    };
-    MathBackendCPU.prototype.onesLike = function (x) {
-        if (x.dtype === 'string') {
-            throw new Error('onesLike is not supported for string tensors');
-        }
-        else {
-            return this.fill(x.shape, 1, x.dtype);
-        }
-    };
-    MathBackendCPU.prototype.zerosLike = function (x) {
-        var values = util_1.getArrayFromDType(x.dtype, util_1.sizeFromShape(x.shape));
-        return this.makeOutput(values, x.shape, x.dtype);
-    };
-    MathBackendCPU.prototype.linspace = function (start, stop, num) {
-        return backend_util.linspaceImpl(start, stop, num);
-    };
-    MathBackendCPU.prototype.scatter = function (indices, updates, shape, outputSize, sliceSize, numUpdates, sliceRank, strides, defaultValue, sumDupeIndices) {
-        var flattenShape = [outputSize / sliceSize, sliceSize];
-        var indicesData = this.readSync(indices.dataId);
-        var updatesData = this.readSync(updates.dataId);
-        if (outputSize === 0) {
-            return ops_1.tensor([], shape, updates.dtype);
-        }
-        var buffer = new tensor_1.TensorBuffer(flattenShape, updates.dtype);
-        buffer.values.fill(this.readSync(defaultValue.dataId)[0]);
-        for (var i = 0; i < numUpdates; i++) {
-            var index = [];
-            var flattenIndex = 0;
-            for (var j = 0; j < sliceRank; j++) {
-                var dim = indicesData[i * sliceRank + j];
-                index.push(dim);
-                flattenIndex += dim * strides[j];
-            }
-            if (flattenIndex < 0 || flattenIndex >= outputSize / sliceSize) {
-                throw new Error("Invalid indices: " + index + " does not index into " + shape);
-            }
-            for (var k = 0; k < sliceSize; k++) {
-                if (sumDupeIndices) {
-                    buffer.values[flattenIndex * sliceSize + k] +=
-                        updatesData[i * sliceSize + k];
-                }
-                else {
-                    buffer.values[flattenIndex * sliceSize + k] = updates.rank === 0 ?
-                        updatesData[0] :
-                        updatesData[i * sliceSize + k];
-                }
-            }
-        }
-        return buffer.toTensor().reshape(shape);
-    };
-    return MathBackendCPU;
-}(backend_1.KernelBackend));
-exports.MathBackendCPU = MathBackendCPU;
-engine_1.ENGINE.registerBackend('cpu', function () { return new MathBackendCPU(); }, 1 /* priority */);
-//# sourceMappingURL=backend_cpu.js.map

文件差异内容过多而无法显示
+ 0 - 0
rag-server/node_modules/@tensorflow/tfjs-core/dist/backends/cpu/backend_cpu.js.map


+ 0 - 17
rag-server/node_modules/@tensorflow/tfjs-core/dist/backends/cpu/backend_cpu_test.d.ts

@@ -1,17 +0,0 @@
-/**
- * @license
- * Copyright 2019 Google LLC. All Rights Reserved.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * =============================================================================
- */
-export {};

文件差异内容过多而无法显示
+ 0 - 0
rag-server/node_modules/@tensorflow/tfjs-core/dist/backends/cpu/backend_cpu_test.js.map


+ 0 - 18
rag-server/node_modules/@tensorflow/tfjs-core/dist/backends/cpu/backend_cpu_test_registry.d.ts

@@ -1,18 +0,0 @@
-/**
- * @license
- * Copyright 2019 Google LLC. All Rights Reserved.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * =============================================================================
- */
-import { Constraints } from '../../jasmine_util';
-export declare const CPU_ENVS: Constraints;

部分文件因为文件数量过多而无法显示