Overview

Request 6246 (accepted)

Fixes build in Tumbleweed

- Update to 1.1.13
- Update onnxruntime to 1.17.1.tgz
- Add patch to fix a cmake error:
* fix-cmake-error.patch

- 1.1.6
- Update to 1.1.13
* Add video_tick function to background filter info
* Update Onnxruntime version and fix Windows compilerconfig
- Update to 1.1.12
* Critical bugfix in the PSNR calculation for image-similarity
skipping in background filter
- Update to 1.1.11
* New! RMBG model from Bria.AI
https://huggingface.co/briaai/RMBG-1.4 - remove background from
any object! (not just human)
* We got rid of the annoying "update available" message in favor
of a more discreet message on the plugin settings.
* Better handling of local file paths on Windows
* more.
- Update to 1.1.10
* This release will fix the Flatpak recipe for Linux after the
dependency bump, as well as removing the start menu option from
the Windows installer.
- Update to 1.1.9
* In this release we bumped versions of OpenCV and ONNXRuntime,
and trying to get rid of the annoying "smart screen" block on
Windows. We're also rolling out releases through AUR, Pacstall

Submit package home:antl...ltimedia / obs-backg...dremoval to package Multimedia / obs-backgroundremoval

obs-backgroundremoval.changes Changed
x
 
1
@@ -1,4 +1,58 @@
2
 -------------------------------------------------------------------
3
+Tue Feb 18 12:35:51 UTC 2025 - Antonio Larrosa <alarrosa@suse.com>
4
+
5
+- Update to 1.1.13 
6
+  * Add video_tick function to background filter info
7
+  * Update Onnxruntime version and fix Windows compilerconfig
8
+- Update to 1.1.12
9
+  * Critical bugfix in the PSNR calculation for image-similarity
10
+    skipping in background filter
11
+- Update to 1.1.11
12
+  * New! RMBG model from Bria.AI
13
+    https://huggingface.co/briaai/RMBG-1.4 - remove background from
14
+    any object! (not just human)
15
+  * We got rid of the annoying "update available" message in favor
16
+    of a more discreet message on the plugin settings.
17
+  * Better handling of local file paths on Windows
18
+  * more.
19
+- Update to 1.1.10
20
+  * This release will fix the Flatpak recipe for Linux after the
21
+    dependency bump, as well as removing the start menu option from
22
+    the Windows installer.
23
+- Update to 1.1.9
24
+  * In this release we bumped versions of OpenCV and ONNXRuntime,
25
+    and trying to get rid of the annoying "smart screen" block on
26
+    Windows. We're also rolling out releases through AUR, Pacstall
27
+    and Flatpak. 💪 Linux!
28
+- Update to 1.1.8
29
+  * In this release we're introducing "simple mode" that hides most
30
+    of the settings under an "Advanced" checkbox, which should make
31
+    it far easier for newcomers to start using the filter without
32
+    "settings shock".
33
+  * Additionaly we implemented "temporal smoothing" that helps with
34
+    reducing the flickering of the edges in the binary mask.
35
+  * We bumped ONNX Runtime to v1.16.3 that increases robustness and
36
+    speed.
37
+  * We fixed the bug of the updater popping up the dialog because
38
+    we changed the repo URL.
39
+- Update to 1.1.7
40
+  * Upgrade to ONNXRuntime 1.16 which improves speed and
41
+    robustness.
42
+  * Repackaging of Mac OS release to a more consistent with Apple
43
+    dev tools.
44
+  * Fix crashes and bugs on Linux
45
+  * We added a new "website" for the plugin, which will eventually
46
+    have more installation info
47
+    https://occ-ai.github.io/obs-backgroundremoval/
48
+  * Adding a detailed log message with plugin info which helps us
49
+    debug
50
+
51
+- Update onnxruntime to 1.17.1.tgz
52
+- Use Source URLs in the spec file
53
+- Add patch to fix a cmake error:
54
+  * fix-cmake-error.patch
55
+
56
+-------------------------------------------------------------------
57
 Thu Sep 21 13:50:09 UTC 2023 - Kaito Udagawa <umireon@gmail.com>
58
 
59
-1.1.6
60
+- 1.1.6
61
obs-backgroundremoval.spec Changed
40
 
1
@@ -17,15 +17,16 @@
2
 
3
 
4
 Name:           obs-backgroundremoval
5
-Version:        1.1.6
6
+Version:        1.1.13
7
 Release:        0
8
 Summary:        OBS Plugin for Background Removal
9
 License:        GPL-2.0
10
-URL:            https://github.com/royshil/obs-backgroundremoval
11
-Source:         %{name}-%{version}.tar.gz
12
+URL:            https://github.com/locaal-ai/obs-backgroundremoval
13
+Source:         https://github.com/locaal-ai/%{name}/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz
14
 Source1:        %{name}-rpmlintrc
15
 Source2:        opencv-linux-Release-4.8.0-1.tar.gz
16
-Source3:        onnxruntime-linux-x64-gpu-1.15.1.tgz
17
+Source3:        https://github.com/microsoft/onnxruntime/releases/download/v1.17.1/onnxruntime-linux-x64-gpu-1.17.1.tgz
18
+Patch0:         fix-cmake-error.patch
19
 BuildRequires:  cmake
20
 BuildRequires:  gcc12-c++
21
 BuildRequires:  libcurl-devel
22
@@ -43,7 +44,7 @@
23
 An OBS plugin for removing background in portrait images (video), making it easy to replace the background when screen recording.
24
 
25
 %prep
26
-%autosetup
27
+%autosetup -p1
28
 
29
 %build
30
 %cmake \
31
@@ -58,7 +59,7 @@
32
   -DCUSTOM_OPENCV_URL=%{SOURCE2} \
33
   -DCUSTOM_OPENCV_HASH=MD5=7a668fbc3ac536812643c6b8c8f96be9 \
34
   -DCUSTOM_ONNXRUNTIME_URL=%{SOURCE3} \
35
-  -DCUSTOM_ONNXRUNTIME_MD5=8d2f5ee9f449bdecb10a45715fe74c53
36
+  -DCUSTOM_ONNXRUNTIME_HASH=MD5=da53e83b3ad3ab2cf46fbabd6a648a9d
37
 %cmake_build
38
 
39
 %install
40
fix-cmake-error.patch Added
14
 
1
@@ -0,0 +1,12 @@
2
+Index: obs-backgroundremoval-1.1.13/cmake/common/helpers_common.cmake
3
+===================================================================
4
+--- obs-backgroundremoval-1.1.13.orig/cmake/common/helpers_common.cmake
5
++++ obs-backgroundremoval-1.1.13/cmake/common/helpers_common.cmake
6
+@@ -86,7 +86,6 @@ macro(find_qt)
7
+       add_library(Qt::${component} INTERFACE IMPORTED)
8
+       set_target_properties(Qt::${component} PROPERTIES INTERFACE_LINK_LIBRARIES Qt${_QT_VERSION}::${component})
9
+     endif()
10
+-    set_property(TARGET Qt::${component} PROPERTY INTERFACE_COMPILE_FEATURES "")
11
+   endforeach()
12
+ 
13
+ endmacro()
14
obs-backgroundremoval-1.1.6.tar.gz/.github/scripts/.package.zsh -> obs-backgroundremoval-1.1.13.tar.gz/.github/scripts/.package.zsh Changed
26
 
1
@@ -180,13 +180,11 @@
2
     if (( _loglevel > 1  || ${+CI} )) _tarflags="v${_tarflags}"
3
 
4
     if (( package )) {
5
-      if  ! -f ${project_root}/build_macos/installer-macos.generated.pkgproj  {
6
-        log_error 'Packages project file not found. Run the build script or the CMake build and install procedures first.'
7
+      if  ! -f ${project_root}/build_macos/Distribution.generated.xml  {
8
+        log_error 'Distribution file not found. Run the build script or the CMake build and install procedures first.'
9
         return 2
10
       }
11
 
12
-      check_packages
13
-
14
       log_group "Packaging ${product_name}..."
15
       pushd ${project_root}
16
       pkgbuild \
17
@@ -195,7 +193,7 @@
18
         --scripts "${project_root}/cmake/macos/resources/scripts" \
19
         "${project_root}/release/${config}/${product_name}-flat.pkg"
20
       productbuild \
21
-        --distribution "${project_root}/cmake/macos/resources/Distribution.xml" \
22
+        --distribution "${project_root}/build_macos/Distribution.generated.xml" \
23
         --package-path "${project_root}/release/${config}" \
24
         "${project_root}/release/${config}/${product_name}.pkg"
25
       rm "${project_root}/release/${config}/${product_name}-flat.pkg"
26
obs-backgroundremoval-1.1.6.tar.gz/.github/scripts/utils.zsh/check_macos -> obs-backgroundremoval-1.1.13.tar.gz/.github/scripts/utils.zsh/check_macos Changed
9
 
1
@@ -17,6 +17,6 @@
2
   return 2
3
 }
4
 
5
-brew bundle --file ${SCRIPT_HOME}/.Brewfile
6
+brew bundle --no-upgrade --file ${SCRIPT_HOME}/.Brewfile
7
 rehash
8
 log_group
9
obs-backgroundremoval-1.1.13.tar.gz/.github/workflows/pages.yaml Added
55
 
1
@@ -0,0 +1,53 @@
2
+name: "Deploy pages to GitHub Pages"
3
+
4
+on:
5
+  push:
6
+    branches:
7
+      - "main"
8
+    release:
9
+      - "released"
10
+  workflow_dispatch:
11
+
12
+permissions:
13
+  contents: "read"
14
+  pages: "write"
15
+  id-token: "write"
16
+
17
+concurrency:
18
+  group: "pages"
19
+  cancel-in-progress: false
20
+
21
+jobs:
22
+  Deploy:
23
+    environment:
24
+      name: "github-pages"
25
+      url: "${{ steps.deployment.outputs.page_url }}"
26
+    runs-on: "ubuntu-latest"
27
+    defaults:
28
+      run:
29
+        working-directory: "./pages"
30
+    steps:
31
+      - name: "Checkout"
32
+        uses: "actions/checkout@v4"
33
+      - name: "Setup Pages"
34
+        uses: "actions/configure-pages@v3"
35
+        with:
36
+          static_site_generator: "sveltekit"
37
+      - uses: "actions/setup-node@v3"
38
+        with:
39
+          node-version: 20
40
+          cache: "npm"
41
+          cache-dependency-path: "./pages/package-lock.json"
42
+      - name: "Install dependencies"
43
+        run: "npm install"
44
+      - name: "Build pages"
45
+        run: "npm run build"
46
+        env:
47
+          GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
48
+      - name: "Upload artifact"
49
+        uses: "actions/upload-pages-artifact@v2"
50
+        with:
51
+          path: "./pages/build"
52
+      - name: "Deploy to GitHub Pages"
53
+        id: "deployment"
54
+        uses: "actions/deploy-pages@v2"
55
obs-backgroundremoval-1.1.6.tar.gz/.github/workflows/push.yaml -> obs-backgroundremoval-1.1.13.tar.gz/.github/workflows/push.yaml Changed
10
 
1
@@ -111,7 +111,7 @@
2
           draft: true
3
           prerelease: ${{ fromJSON(steps.check.outputs.prerelease) }}
4
           tag_name: ${{ steps.check.outputs.version }}
5
-          name: OBS Studio ${{ steps.check.outputs.version }}
6
+          name: obs-backgroundremoval ${{ steps.check.outputs.version }}
7
           body_path: ${{ github.workspace }}/CHECKSUMS.txt
8
           files: |
9
             ${{ github.workspace }}/*.exe
10
obs-backgroundremoval-1.1.13.tar.gz/.github/workflows/winget-update.yaml Added
21
 
1
@@ -0,0 +1,19 @@
2
+name: Submit package to Windows Package Manager Community Repository 
3
+
4
+on:
5
+  release:
6
+    types:
7
+      - published
8
+
9
+jobs:
10
+
11
+  winget:
12
+    name: Publish winget package
13
+    runs-on: windows-latest
14
+    steps:
15
+      - name: Submit package to Windows Package Manager Community Repository
16
+        run: |
17
+          iwr https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe
18
+          $github = Get-Content '${{ github.event_path }}' | ConvertFrom-Json
19
+          $installerUrl = $github.release.assets | Where-Object -Property name -match 'obs-backgroundremoval-*-windows-x64-Installer.exe' | Select -ExpandProperty browser_download_url -First 1
20
+          .\wingetcreate.exe update RoyShilkrot.obs-backgroundremoval -s -v $github.release.tag_name -u $installerUrl -t '${{ secrets.OBS_BGREMOVAL_PUBLIC_REPO_PAT }}'
21
obs-backgroundremoval-1.1.6.tar.gz/.gitignore -> obs-backgroundremoval-1.1.13.tar.gz/.gitignore Changed
17
 
1
@@ -7,6 +7,7 @@
2
 !/cmake
3
 !/data
4
 !/docs
5
+!/pages
6
 !/src
7
 !/vendor
8
 !.clang-format
9
@@ -17,6 +18,7 @@
10
 !CMakePresets.json
11
 !LICENSE
12
 !README.md
13
+!patch_libobs.diff
14
 
15
 # Exclude lock files
16
 *.lock.json
17
obs-backgroundremoval-1.1.6.tar.gz/CMakeLists.txt -> obs-backgroundremoval-1.1.13.tar.gz/CMakeLists.txt Changed
38
 
1
@@ -37,9 +37,18 @@
2
 set(USE_SYSTEM_ONNXRUNTIME
3
     OFF
4
     CACHE STRING "Use system ONNX Runtime")
5
+
6
+set(DISABLE_ONNXRUNTIME_GPU
7
+    OFF
8
+    CACHE STRING "Disables GPU support of ONNX Runtime (Only valid on Linux)")
9
+
10
+if(DISABLE_ONNXRUNTIME_GPU)
11
+  target_compile_definitions(${CMAKE_PROJECT_NAME} PRIVATE DISABLE_ONNXRUNTIME_GPU)
12
+endif()
13
+
14
 if(USE_SYSTEM_ONNXRUNTIME)
15
   if(OS_LINUX)
16
-    find_package(Onnxruntime 1.14.1 REQUIRED)
17
+    find_package(Onnxruntime 1.16.3 REQUIRED)
18
     set(Onnxruntime_INCLUDE_PATH
19
         ${Onnxruntime_INCLUDE_DIR} ${Onnxruntime_INCLUDE_DIR}/onnxruntime
20
         ${Onnxruntime_INCLUDE_DIR}/onnxruntime/core/session ${Onnxruntime_INCLUDE_DIR}/onnxruntime/core/providers/cpu)
21
@@ -71,6 +80,8 @@
22
 if(APPLE)
23
   add_subdirectory(src/update-checker/URLSessionClient)
24
   target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE URLSessionClient)
25
+  # add Foundation framework
26
+  target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE "-framework Foundation")
27
 elseif(MSVC)
28
   add_subdirectory(src/update-checker/WinRTHttpClient)
29
   target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE WinRTHttpClient)
30
@@ -87,7 +98,6 @@
31
           src/obs-utils/obs-config-utils.cpp
32
           src/update-checker/github-utils.cpp
33
           src/update-checker/update-checker.cpp
34
-          src/update-checker/UpdateDialog.cpp
35
           src/background-filter-info.c
36
           src/background-filter.cpp
37
           src/enhance-filter.cpp
38
obs-backgroundremoval-1.1.6.tar.gz/CMakePresets.json -> obs-backgroundremoval-1.1.13.tar.gz/CMakePresets.json Changed
39
 
1
@@ -24,7 +24,7 @@
2
         "CODESIGN_IDENTITY": "$penv{CODESIGN_IDENT}",
3
         "CODESIGN_TEAM": "$penv{CODESIGN_TEAM}",
4
         "ENABLE_FRONTEND_API": true,
5
-        "ENABLE_QT": true
6
+        "ENABLE_QT": false
7
       }
8
     },
9
     {
10
@@ -54,7 +54,7 @@
11
         "QT_VERSION": "6",
12
         "CMAKE_SYSTEM_VERSION": "10.0.18363.657",
13
         "ENABLE_FRONTEND_API": true,
14
-        "ENABLE_QT": true
15
+        "ENABLE_QT": false
16
       }
17
     },
18
     {
19
@@ -83,8 +83,7 @@
20
         "CMAKE_BUILD_TYPE": "RelWithDebInfo",
21
         "CMAKE_POSITION_INDEPENDENT_CODE": true,
22
         "ENABLE_FRONTEND_API": true,
23
-        "ENABLE_QT": true,
24
-        "USE_SYSTEM_CURL": true
25
+        "ENABLE_QT": false
26
       }
27
     },
28
     {
29
@@ -114,8 +113,7 @@
30
         "CMAKE_BUILD_TYPE": "RelWithDebInfo",
31
         "CMAKE_POSITION_INDEPENDENT_CODE": true,
32
         "ENABLE_FRONTEND_API": true,
33
-        "ENABLE_QT": true,
34
-        "USE_SYSTEM_CURL": true
35
+        "ENABLE_QT": false
36
       }
37
     },
38
     {
39
obs-backgroundremoval-1.1.6.tar.gz/README.md -> obs-backgroundremoval-1.1.13.tar.gz/README.md Changed
213
 
1
@@ -2,52 +2,73 @@
2
 
3
 <div align="center">
4
 
5
-!GitHub(https://img.shields.io/github/license/royshil/obs-backgroundremoval)(https://github.com/royshil/obs-backgroundremoval/blob/main/LICENSE)
6
-!GitHub Workflow Status(https://img.shields.io/github/actions/workflow/status/royshil/obs-backgroundremoval/push.yaml)(https://github.com/royshil/obs-backgroundremoval/actions/workflows/push.yaml)
7
-!Total downloads(https://img.shields.io/github/downloads/royshil/obs-backgroundremoval/total)(https://github.com/royshil/obs-backgroundremoval/releases)
8
+!GitHub(https://img.shields.io/github/license/occ-ai/obs-backgroundremoval)(https://github.com/occ-ai/obs-backgroundremoval/blob/main/LICENSE)
9
+!GitHub Workflow Status(https://img.shields.io/github/actions/workflow/status/occ-ai/obs-backgroundremoval/push.yaml)(https://github.com/occ-ai/obs-backgroundremoval/actions/workflows/push.yaml)
10
+!Total downloads(https://img.shields.io/github/downloads/occ-ai/obs-backgroundremoval/total)(https://github.com/occ-ai/obs-backgroundremoval/releases)
11
 !Flathub(https://img.shields.io/flathub/downloads/com.obsproject.Studio.Plugin.BackgroundRemoval?label=Flathub%20Installs)
12
-!GitHub release (latest by date)(https://img.shields.io/github/v/release/royshil/obs-backgroundremoval)(https://github.com/royshil/obs-backgroundremoval/releases)
13
+!GitHub release (latest by date)(https://img.shields.io/github/v/release/occ-ai/obs-backgroundremoval)(https://github.com/occ-ai/obs-backgroundremoval/releases)
14
+!Discord(https://img.shields.io/discord/1200229425141252116)(https://discord.gg/KbjGU2vvUz)
15
 
16
 </div>
17
 
18
 A plugin for OBS Studio(https://obsproject.com/) that allows you to replace the background in portrait images and video, as well as enhance low-light scenes.
19
 
20
+- Usage(#usage)
21
+- Download(#download)
22
 - Introduction(#introduction)
23
 - Building(#building)
24
   - MacOSX(#mac-osx)
25
-  - Linux (Ubuntu, Arch, openSUSE)(#linux)
26
+  - Linux (Ubuntu, Arch, openSUSE, Fedora)(#linux)
27
   - Windows(#windows)
28
 
29
-Other plugins from us:
30
-- 🚧 Experimental 🚧: CleanStream(https://github.com/royshil/obs-cleanstream) OBS plugin for real-time filler word (uh,um) and profanity removal from live audio stream
31
-- ✨ NEW: URL/API Source(https://github.com/royshil/obs-urlsource) a plugin for live fetching of API data and displaying on screen as a video source
32
-- ✨ NEW: LocalVocal(https://github.com/royshil/obs-localvocal) speech AI assistant plugin for real-time local transcription (captions), translation and other language functions
33
+For other AI plugins from us check out OCC AI(https://github.com/occ-ai).
34
+
35
+## Usage
36
+
37
+<div align="center">
38
+<video src="https://github.com/occ-ai/obs-backgroundremoval/assets/1067855/5ba5aae2-7ea2-4c90-ad45-fba5ccde1a4e" width="320"></video>
39
+</div>
40
+
41
+Check out the usage guide page(https://occ-ai.github.io/obs-backgroundremoval/usage) for usage walkthrough and recommendations.
42
+
43
+Additional tutorial videos:
44
+
45
+- Usage tutorial: https://youtu.be/veqNEsMqEE0
46
+- Depth of Field effect: https://youtu.be/jC3EKSpNjQk
47
+- Low-light enhancement: https://youtu.be/WSBLYWFrn2Q
48
+- Remove background from ANY object (not just human): https://youtu.be/N74VCDCToX8
49
 
50
 ## Download
51
-Check out the latest releases(https://github.com/royshil/obs-backgroundremoval/releases) for downloads and install instructions.
52
+
53
+Check out the guide page(https://occ-ai.github.io/obs-backgroundremoval) for downloads and install instructions for **Windows** and **MacOS**.
54
 
55
 ### Linux Installation
56
+
57
 On Ubuntu, there are two ways to install OBS and you have to use the corresponding method to install this plugin.
58
-- If you installed OBS via the official PPA, download the deb package from the releases(https://github.com/royshil/obs-backgroundremoval/releases) page and install it directly.
59
+
60
+- If you installed OBS via the official PPA, download the deb package from the releases(https://github.com/occ-ai/obs-backgroundremoval/releases) page and install it directly.
61
 - If you installed OBS via FlatHub, run the following command: `flatpak install com.obsproject.Studio.Plugin.BackgroundRemoval`
62
 
63
 The pre-built binary of this plugin can run Ubuntu 22.04 or later.
64
 
65
 On openSUSE, please see `docs/BUILDING-OPENSUSE.md`(docs/BUILDING-OPENSUSE.md).
66
 
67
+#### FlatHub
68
+
69
+On Debian, you cannot use our deb package and we only support FlatHub installation.
70
+
71
 On other Linux distros, use the FlatHub installation of both OBS and this plugin.
72
-If you install OBS in a way other than FlatHub, you have to build this plugin by yourself (see instructions for building below(#linux)).
73
 
74
-## Code Walkthrough
75
-This video on YouTube will take you through the major parts of the code and explain them.
76
+```
77
+flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
78
+flatpak install flathub com.obsproject.Studio
79
+flatpak install flathub com.obsproject.Studio.Plugin.BackgroundRemoval
80
+```
81
 
82
-<div align="center">
83
-  <a href="https://youtu.be/iFQtcJg0Wsk" target="_blank">
84
-    <img width="50%" src="https://img.youtube.com/vi/iFQtcJg0Wsk/maxresdefault.jpg"/>
85
-  </a>
86
-</div>
87
+If you install OBS in a way other than FlatHub, you have to build this plugin by yourself (see instructions for building below(#linux)).
88
+
89
+### OBS Version Support and Compatibility
90
 
91
-## OBS Version Support and Compatibility
92
 - OBS version 29+ (download(https://obsproject.com/download)) for the latest version of this plugin, e.g. 1.1.x and above.
93
 - OBS version 28+ for this plugin's version between 0.5.x and 1.0.x.
94
 - OBS version 27+ for this plugin's version 0.4.x and below.
95
@@ -60,31 +81,40 @@
96
 a transparent color.
97
 
98
 If you like this work, which is given to you completely free of charge, please consider supporting it by sponsoring us on GitHub:
99
+
100
 - https://github.com/sponsors/royshil
101
 - https://github.com/sponsors/umireon
102
 
103
-OBS Plugins forum: https://obsproject.com/forum/resources/background-removal-portrait-segmentation.1260/
104
+### Support and Help
105
+
106
+Reach out to us on Discord(https://discord.gg/3EUBUjpCD3) or the OBS Plugins forum(https://obsproject.com/forum/resources/background-removal-portrait-segmentation.1260/) for online / immediate help.
107
 
108
-Tutorial video on YouTube: https://youtu.be/veqNEsMqEE0
109
+If you found a bug or want to suggest a feature or improvement please open an issue(https://github.com/occ-ai/obs-backgroundremoval/issues).
110
 
111
-https://github.com/royshil/obs-backgroundremoval/assets/1067855/5ba5aae2-7ea2-4c90-ad45-fba5ccde1a4e
112
+If you are looking for hands-on help or private consultation please select a sponsorship tier(https://github.com/sponsors/royshil?frequency=one-time).
113
+
114
+### Technical Details
115
 
116
 GPU support:
117
-* Currently on Windows we support DirectML, which should reduce CPU usage by 95% and effectively use the systems accelerators (GPUs if available).
118
-* On Mac we support CoreML for acceleration, which is available on M1 and M2 (not Intel, sorry).
119
-* CUDA is supported in this plugin through TensorRT, however it is supported only on Linux.
120
-* The goal of this plugin is to be available for everyone on every system, even if they don't own a GPU.
121
+
122
+- Currently on Windows we support DirectML, which should reduce CPU usage by 95% and effectively use the systems accelerators (GPUs if available).
123
+- On Mac we support CoreML for acceleration, which is available on M1 and M2 (not Intel, sorry).
124
+- CUDA is supported in this plugin through TensorRT, however it is supported only on Linux.
125
+- The goal of this plugin is to be available for everyone on every system, even if they don't own a GPU.
126
 
127
 Number of CPU threads is controllable through the UI settings. A 2-thread setting works best.
128
 
129
 The pretrained model weights used for portrait foreground segmentation are taken from:
130
+
131
 - https://github.com/anilsathyan7/Portrait-Segmentation/tree/master/SINet
132
 - https://github.com/PaddlePaddle/PaddleSeg/tree/release/2.7/contrib/PP-HumanSeg
133
 - https://github.com/PINTO0309/PINTO_model_zoo/tree/main/082_MediaPipe_Meet_Segmentation
134
 - https://github.com/PeterL1n/RobustVideoMatting
135
 - https://github.com/PINTO0309/PINTO_model_zoo/tree/main/384_TCMonoDepth and https://github.com/yu-li/TCMonoDepth
136
+- https://huggingface.co/briaai/RMBG-1.4
137
 
138
 Image enhancement (low light) models are taken from:
139
+
140
 - https://github.com/PINTO0309/PINTO_model_zoo/tree/main/213_TBEFN
141
 - https://github.com/PINTO0309/PINTO_model_zoo/tree/main/372_URetinex-Net
142
 - https://github.com/PINTO0309/PINTO_model_zoo/tree/main/370_Semantic-Guided-Low-Light-Image-Enhancement
143
@@ -92,9 +122,19 @@
144
 
145
 Some more information about how I built it: https://www.morethantechnical.com/2021/04/15/obs-plugin-for-portrait-background-removal-with-onnx-sinet-model/ and https://www.morethantechnical.com/2023/05/20/building-an-obs-background-removal-plugin-a-walkthrough/
146
 
147
+### Code Walkthrough
148
+
149
+This video on YouTube will take you through the major parts of the code and explain them.
150
+
151
+<div align="center">
152
+  <a href="https://youtu.be/iFQtcJg0Wsk" target="_blank">
153
+    <img width="50%" src="https://img.youtube.com/vi/iFQtcJg0Wsk/maxresdefault.jpg"/>
154
+  </a>
155
+</div>
156
+
157
 ## Building
158
 
159
-The plugin was built and tested on Mac OSX  (Intel & Apple silicon), Windows and several Linux disros (e.g. Ubuntu/Debian-ish, Fedora, and more). Help is appreciated in building on other OSs and packages.
160
+The plugin was built and tested on Mac OSX (Intel & Apple silicon), Windows and several Linux disros (e.g. Ubuntu/Debian-ish, Fedora, and more). Help is appreciated in building on other OSs and packages.
161
 
162
 The building pipelines in CI take care of the heavy lifting. Use them in order to build the plugin locally. We attempt to use external OpenCV, libcurl and ONNX Runtime to reduce build times.
163
 
164
@@ -109,12 +149,15 @@
165
 ```
166
 
167
 #### Install
168
+
169
 The above script should succeed and the plugin files (e.g. `obs-backgroundremoval.plugin`) will reside in the `./release/Release` folder off of the root. Copy the `.plugin` file to the OBS directory e.g. `~/Library/Application Support/obs-studio/plugins`.
170
 
171
 To get `.pkg` installer file, run for example
172
+
173
 ```sh
174
 $ ./.github/scripts/package-macos -c Release
175
 ```
176
+
177
 (Note that maybe the outputs will be in the `Release` folder and not the `install` folder like `pakage-macos` expects, so you will need to rename the folder from `build_x86_64/Release` to `build_x86_64/install`)
178
 
179
 ### Linux
180
@@ -122,17 +165,21 @@
181
 #### Ubuntu
182
 
183
 Use the CI scripts again
184
+
185
 ```sh
186
 $ ./.github/scripts/build-linux.sh
187
 ```
188
 
189
 #### Arch Linux
190
+
191
 The community maintains AUR packages: https://aur.archlinux.org/packages/obs-backgroundremoval
192
 
193
 #### Fedora
194
+
195
 To compile on Fedora, you need to manage the dependencies manually. See docs/BUILDING-FEDORA.md(docs/BUILDING-FEDORA.md) for more information.
196
 
197
 #### FlatHub
198
+
199
 The plugin is available on FlatHub: https://github.com/flathub/com.obsproject.Studio.Plugin.BackgroundRemoval
200
 
201
 ```sh
202
@@ -150,7 +197,7 @@
203
 The build should exist in the `./release` folder off the root. You can manually install the files in the OBS directory.
204
 
205
 <picture>
206
-  <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=royshil/obs-backgroundremoval&type=Date&theme=dark" />
207
-  <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=royshil/obs-backgroundremoval&type=Date" />
208
-  <img alt="Star History Chart" src="https://api.star-history.com/svg?repos=royshil/obs-backgroundremoval&type=Date" />
209
+  <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=occ-ai/obs-backgroundremoval&type=Date&theme=dark" />
210
+  <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=occ-ai/obs-backgroundremoval&type=Date" />
211
+  <img alt="Star History Chart" src="https://api.star-history.com/svg?repos=occ-ai/obs-backgroundremoval&type=Date" />
212
 </picture>
213
obs-backgroundremoval-1.1.6.tar.gz/buildspec.json -> obs-backgroundremoval-1.1.13.tar.gz/buildspec.json Changed
23
 
1
@@ -32,12 +32,6 @@
2
         }
3
     },
4
     "tools": {
5
-        "packages": {
6
-            "version": "1.2.10",
7
-            "baseUrl": "http://s.sudre.free.fr/Software/files",
8
-            "label": "Packages.app",
9
-            "hash": "6afdd25386295974dad8f078b8f1e41cabebd08e72d970bf92f707c7e48b16c9"
10
-        }
11
     },
12
     "platformConfig": {
13
         "macos": {
14
@@ -45,7 +39,7 @@
15
         }
16
     },
17
     "name": "obs-backgroundremoval",
18
-    "version": "1.1.6",
19
+    "version": "1.1.13",
20
     "author": "Roy Shilkrot",
21
     "website": "https://github.com/royshil/obs-backgroundremoval",
22
     "email": "roy.shil@gmail.com",
23
obs-backgroundremoval-1.1.6.tar.gz/cmake/FetchOnnxruntime.cmake -> obs-backgroundremoval-1.1.13.tar.gz/cmake/FetchOnnxruntime.cmake Changed
138
 
1
@@ -4,35 +4,55 @@
2
     ""
3
     CACHE STRING "URL of a downloaded ONNX Runtime tarball")
4
 
5
-set(CUSTOM_ONNXRUNTIME_MD5
6
+set(CUSTOM_ONNXRUNTIME_HASH
7
     ""
8
-    CACHE STRING "MD5 Hash of a downloaded ONNX Runtime tarball")
9
+    CACHE STRING "Hash of a downloaded ONNX Runtime tarball")
10
+
11
+set(Onnxruntime_VERSION "1.17.1")
12
 
13
 if(CUSTOM_ONNXRUNTIME_URL STREQUAL "")
14
   set(USE_PREDEFINED_ONNXRUNTIME ON)
15
 else()
16
-  if(CUSTOM_ONNXRUNTIME_MD5 STREQUAL "")
17
-    message(FATAL_ERROR "Both of CUSTOM_ONNXRUNTIME_URL and CUSTOM_ONNXRUNTIME_MD5 must be present!")
18
+  if(CUSTOM_ONNXRUNTIME_HASH STREQUAL "")
19
+    message(FATAL_ERROR "Both of CUSTOM_ONNXRUNTIME_URL and CUSTOM_ONNXRUNTIME_HASH must be present!")
20
   else()
21
     set(USE_PREDEFINED_ONNXRUNTIME OFF)
22
   endif()
23
 endif()
24
 
25
-set(Onnxruntime_VERSION "1.15.1")
26
+if(USE_PREDEFINED_ONNXRUNTIME)
27
+  set(Onnxruntime_BASEURL "https://github.com/microsoft/onnxruntime/releases/download/v${Onnxruntime_VERSION}")
28
+  set(Onnxruntime_WINDOWS_VERSION "v${Onnxruntime_VERSION}-1")
29
+  set(Onnxruntime_WINDOWS_BASEURL
30
+      "https://github.com/occ-ai/occ-ai-dep-onnxruntime-static-win/releases/download/${Onnxruntime_WINDOWS_VERSION}")
31
 
32
-if(OS_MACOS)
33
-  if(USE_PREDEFINED_ONNXRUNTIME)
34
-    FetchContent_Declare(
35
-      Onnxruntime
36
-      URL "https://github.com/microsoft/onnxruntime/releases/download/v${Onnxruntime_VERSION}/onnxruntime-osx-universal2-${Onnxruntime_VERSION}.tgz"
37
-      URL_HASH MD5=6637c31d2dae5ad8bffb4da38ae4d89e)
38
+  if(APPLE)
39
+    set(Onnxruntime_URL "${Onnxruntime_BASEURL}/onnxruntime-osx-universal2-${Onnxruntime_VERSION}.tgz")
40
+    set(Onnxruntime_HASH SHA256=9FA57FA6F202A373599377EF75064AE568FDA8DA838632B26A86024C7378D306)
41
+  elseif(MSVC)
42
+    set(Onnxruntime_URL "${Onnxruntime_WINDOWS_BASEURL}/onnxruntime-windows-${Onnxruntime_WINDOWS_VERSION}-Release.zip")
43
+    set(OOnnxruntime_HASH SHA256=39E63850D9762810161AE1B4DEAE5E3C02363521273E4B894A9D9707AB626C38)
44
   else()
45
-    FetchContent_Declare(
46
-      Onnxruntime
47
-      URL "${CUSTOM_ONNXRUNTIME_URL}"
48
-      URL_HASH MD5=${CUSTOM_ONNXRUNTIME_MD5})
49
+    if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
50
+      set(Onnxruntime_URL "${Onnxruntime_BASEURL}/onnxruntime-linux-aarch64-${Onnxruntime_VERSION}.tgz")
51
+      set(Onnxruntime_HASH SHA256=70B6F536BB7AB5961D128E9DBD192368AC1513BFFB74FE92F97AAC342FBD0AC1)
52
+    else()
53
+      set(Onnxruntime_URL "${Onnxruntime_BASEURL}/onnxruntime-linux-x64-gpu-${Onnxruntime_VERSION}.tgz")
54
+      set(Onnxruntime_HASH SHA256=613C53745EA4960ED368F6B3AB673558BB8561C84A8FA781B4EA7FB4A4340BE4)
55
+    endif()
56
   endif()
57
-  FetchContent_MakeAvailable(Onnxruntime)
58
+else()
59
+  set(Onnxruntime_URL "${CUSTOM_ONNXRUNTIME_URL}")
60
+  set(Onnxruntime_HASH "${CUSTOM_ONNXRUNTIME_HASH}")
61
+endif()
62
+
63
+FetchContent_Declare(
64
+  onnxruntime
65
+  URL ${Onnxruntime_URL}
66
+  URL_HASH ${Onnxruntime_HASH})
67
+FetchContent_MakeAvailable(onnxruntime)
68
+
69
+if(APPLE)
70
   set(Onnxruntime_LIB "${onnxruntime_SOURCE_DIR}/lib/libonnxruntime.${Onnxruntime_VERSION}.dylib")
71
   target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE "${Onnxruntime_LIB}")
72
   target_include_directories(${CMAKE_PROJECT_NAME} SYSTEM PUBLIC "${onnxruntime_SOURCE_DIR}/include")
73
@@ -45,20 +65,7 @@
74
     COMMAND
75
       ${CMAKE_INSTALL_NAME_TOOL} -change "@rpath/libonnxruntime.${Onnxruntime_VERSION}.dylib"
76
       "@loader_path/../Frameworks/libonnxruntime.${Onnxruntime_VERSION}.dylib" $<TARGET_FILE:${CMAKE_PROJECT_NAME}>)
77
-elseif(OS_WINDOWS)
78
-  if(USE_PREDEFINED_ONNXRUNTIME)
79
-    FetchContent_Declare(
80
-      Onnxruntime
81
-      URL "https://github.com/umireon/onnxruntime-static-win/releases/download/v${Onnxruntime_VERSION}-1/onnxruntime-static-win.zip"
82
-      URL_HASH MD5=1be38fe8abe304085b9eb58272fbc941)
83
-  else()
84
-    FetchContent_Declare(
85
-      Onnxruntime
86
-      URL "${CUSTOM_ONNXRUNTIME_URL}"
87
-      URL_HASH MD5=${CUSTOM_ONNXRUNTIME_MD5})
88
-  endif()
89
-  FetchContent_MakeAvailable(Onnxruntime)
90
-
91
+elseif(MSVC)
92
   add_library(Ort INTERFACE)
93
   set(Onnxruntime_LIB_NAMES
94
       session;providers_shared;providers_dml;optimizer;providers;framework;graph;util;mlas;common;flatbuffers)
95
@@ -83,40 +90,16 @@
96
   set_target_properties(Ort::DirectML PROPERTIES IMPORTED_LOCATION ${onnxruntime_SOURCE_DIR}/bin/DirectML.dll)
97
   set_target_properties(Ort::DirectML PROPERTIES IMPORTED_IMPLIB ${onnxruntime_SOURCE_DIR}/bin/DirectML.lib)
98
 
99
-  target_link_libraries(Ort INTERFACE Ort::DirectML d3d12.lib dxgi.lib dxguid.lib)
100
+  target_link_libraries(Ort INTERFACE Ort::DirectML d3d12.lib dxgi.lib dxguid.lib Dxcore.lib)
101
 
102
   target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE Ort)
103
 
104
   install(IMPORTED_RUNTIME_ARTIFACTS Ort::DirectML DESTINATION "obs-plugins/64bit")
105
-elseif(OS_LINUX)
106
+else()
107
   if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
108
-    if(USE_PREDEFINED_ONNXRUNTIME)
109
-      FetchContent_Declare(
110
-        Onnxruntime
111
-        URL "https://github.com/microsoft/onnxruntime/releases/download/v${Onnxruntime_VERSION}/onnxruntime-linux-aarch64-${Onnxruntime_VERSION}.tgz"
112
-        URL_HASH MD5=ebec0b185c9bec94fde884a97b144c04)
113
-    else()
114
-      FetchContent_Declare(
115
-        Onnxruntime
116
-        URL "${CUSTOM_ONNXRUNTIME_URL}"
117
-        URL_HASH MD5=${CUSTOM_ONNXRUNTIME_MD5})
118
-    endif()
119
-    FetchContent_MakeAvailable(Onnxruntime)
120
     set(Onnxruntime_LINK_LIBS "${onnxruntime_SOURCE_DIR}/lib/libonnxruntime.so.${Onnxruntime_VERSION}")
121
     set(Onnxruntime_INSTALL_LIBS ${Onnxruntime_LINK_LIBS})
122
   else()
123
-    if(USE_PREDEFINED_ONNXRUNTIME)
124
-      FetchContent_Declare(
125
-        Onnxruntime
126
-        URL "https://github.com/microsoft/onnxruntime/releases/download/v${Onnxruntime_VERSION}/onnxruntime-linux-x64-gpu-${Onnxruntime_VERSION}.tgz"
127
-        URL_HASH MD5=8d2f5ee9f449bdecb10a45715fe74c53)
128
-    else()
129
-      FetchContent_Declare(
130
-        Onnxruntime
131
-        URL "${CUSTOM_ONNXRUNTIME_URL}"
132
-        URL_HASH MD5=${CUSTOM_ONNXRUNTIME_MD5})
133
-    endif()
134
-    FetchContent_MakeAvailable(Onnxruntime)
135
     set(Onnxruntime_LINK_LIBS "${onnxruntime_SOURCE_DIR}/lib/libonnxruntime.so.${Onnxruntime_VERSION}")
136
     set(Onnxruntime_INSTALL_LIBS
137
         ${Onnxruntime_LINK_LIBS} "${onnxruntime_SOURCE_DIR}/lib/libonnxruntime_providers_shared.so"
138
obs-backgroundremoval-1.1.6.tar.gz/cmake/FetchOpenCV.cmake -> obs-backgroundremoval-1.1.13.tar.gz/cmake/FetchOpenCV.cmake Changed
67
 
1
@@ -19,8 +19,8 @@
2
 endif()
3
 
4
 if(USE_PREDEFINED_OPENCV)
5
-  set(OpenCV_VERSION "4.8.0-1")
6
-  set(OpenCV_BASEURL "https://github.com/umireon/obs-backgroundremoval-dep-opencv/releases/download/${OpenCV_VERSION}")
7
+  set(OpenCV_VERSION "v4.8.1-1")
8
+  set(OpenCV_BASEURL "https://github.com/obs-ai/obs-backgroundremoval-dep-opencv/releases/download/${OpenCV_VERSION}")
9
 
10
   if(${CMAKE_BUILD_TYPE} STREQUAL Release OR ${CMAKE_BUILD_TYPE} STREQUAL RelWithDebInfo)
11
     set(OpenCV_BUILD_TYPE Release)
12
@@ -29,28 +29,28 @@
13
   endif()
14
 
15
   if(APPLE)
16
-    if(OpenCV_BUILD_TYPE STREQUAL Release)
17
-      set(OpenCV_URL "${OpenCV_BASEURL}/opencv-macos-Release.tar.gz")
18
-      set(OpenCV_HASH MD5=0875366a03aa44def76ab5a12d3e7b8f)
19
+    if(OpenCV_BUILD_TYPE STREQUAL Debug)
20
+      set(OpenCV_URL "${OpenCV_BASEURL}/opencv-macos-${OpenCV_VERSION}-Debug.tar.gz")
21
+      set(OpenCV_HASH SHA256=2930e335a19cc03a3d825e2b76eadd0d5cf08d8baf6537747d43f503dff32454)
22
     else()
23
-      set(OpenCV_URL "${OpenCV_BASEURL}/opencv-macos-Debug.tar.gz")
24
-      set(OpenCV_HASH MD5=9ae59653c7f9a4c991fbf59018e45d2c)
25
+      set(OpenCV_URL "${OpenCV_BASEURL}/opencv-macos-${OpenCV_VERSION}-Release.tar.gz")
26
+      set(OpenCV_HASH SHA256=b0c4fe2370b0bd5aa65c408e875b1ab18508ba31b93083805d7e398a3ecafdac)
27
     endif()
28
   elseif(MSVC)
29
-    if(OpenCV_BUILD_TYPE STREQUAL Release)
30
-      set(OpenCV_URL "${OpenCV_BASEURL}/opencv-windows-Release.zip")
31
-      set(OpenCV_HASH MD5=e653d590cfbcc3a9bf15ef20e64a6e32)
32
+    if(OpenCV_BUILD_TYPE STREQUAL Debug)
33
+      set(OpenCV_URL "${OpenCV_BASEURL}/opencv-windows-${OpenCV_VERSION}-Debug.zip")
34
+      set(OpenCV_HASH SHA256=0c5ef12cf4b4e4db7ea17a24db156165b6f01759f3f1660b069d0722e5d5dc37)
35
     else()
36
-      set(OpenCV_URL "${OpenCV_BASEURL}/opencv-windows-Debug.zip")
37
-      set(OpenCV_HASH MD5=abad340ccb73da2924544ec9066afcb3)
38
+      set(OpenCV_URL "${OpenCV_BASEURL}/opencv-windows-${OpenCV_VERSION}-Release.zip")
39
+      set(OpenCV_HASH SHA256=5e468f71d41d3a3ea46cc4f247475877f65d3655a2764a2c01074bda3b3e6864)
40
     endif()
41
   else()
42
-    if(OpenCV_BUILD_TYPE STREQUAL Release)
43
-      set(OpenCV_URL "${OpenCV_BASEURL}/opencv-linux-Release.tar.gz")
44
-      set(OpenCV_HASH MD5=7a668fbc3ac536812643c6b8c8f96be9)
45
+    if(OpenCV_BUILD_TYPE STREQUAL Debug)
46
+      set(OpenCV_URL "${OpenCV_BASEURL}/opencv-linux-${OpenCV_VERSION}-Debug.tar.gz")
47
+      set(OpenCV_HASH SHA256=e2e246d6b4f279be80e7fd0a78cba8a0eeee7b53ae807f2f57428d6876306422)
48
     else()
49
-      set(OpenCV_URL "${OpenCV_BASEURL}/opencv-linux-Debug.tar.gz")
50
-      set(OpenCV_HASH MD5=259699c71055ff748c200e62af059104)
51
+      set(OpenCV_URL "${OpenCV_BASEURL}/opencv-linux-${OpenCV_VERSION}-Release.tar.gz")
52
+      set(OpenCV_HASH SHA256=809922a7cc9f344a2d82a232ed7b02e122c82e77cba94b4047e666a0527cc00e)
53
     endif()
54
   endif()
55
 else()
56
@@ -68,8 +68,8 @@
57
 if(MSVC)
58
   target_link_libraries(
59
     OpenCV
60
-    INTERFACE ${opencv_SOURCE_DIR}/x64/vc17/staticlib/opencv_imgproc480.lib
61
-              ${opencv_SOURCE_DIR}/x64/vc17/staticlib/opencv_core480.lib
62
+    INTERFACE ${opencv_SOURCE_DIR}/x64/vc17/staticlib/opencv_imgproc481.lib
63
+              ${opencv_SOURCE_DIR}/x64/vc17/staticlib/opencv_core481.lib
64
               ${opencv_SOURCE_DIR}/x64/vc17/staticlib/zlib.lib)
65
   target_include_directories(OpenCV SYSTEM INTERFACE ${opencv_SOURCE_DIR}/include)
66
 else()
67
obs-backgroundremoval-1.1.6.tar.gz/cmake/common/buildspec_common.cmake -> obs-backgroundremoval-1.1.13.tar.gz/cmake/common/buildspec_common.cmake Changed
15
 
1
@@ -73,6 +73,13 @@
2
     set(_cmake_version "3.0.0")
3
   endif()
4
 
5
+  message(STATUS "Patch libobs")
6
+  execute_process(
7
+    COMMAND patch --forward "libobs/CMakeLists.txt" "${CMAKE_CURRENT_SOURCE_DIR}/patch_libobs.diff"
8
+    RESULT_VARIABLE _process_result
9
+    WORKING_DIRECTORY "${dependencies_dir}/${_obs_destination}")
10
+  message(STATUS "Patch - done")
11
+
12
   message(STATUS "Configure ${label} (${arch})")
13
   execute_process(
14
     COMMAND
15
obs-backgroundremoval-1.1.13.tar.gz/cmake/macos/resources/Distribution.xml.in Added
18
 
1
@@ -0,0 +1,16 @@
2
+<?xml version="1.0" encoding="utf-8"?>
3
+<installer-gui-script minSpecVersion="1">
4
+    <pkg-ref id="@MACOS_BUNDLEID@"/>
5
+    <options customize="never" require-scripts="false" hostArchitectures="x86_64,arm64"/>
6
+    <choices-outline>
7
+        <line choice="default">
8
+            <line choice="@MACOS_BUNDLEID@"/>
9
+        </line>
10
+    </choices-outline>
11
+    <choice id="default"/>
12
+    <choice id="@MACOS_BUNDLEID@" visible="false">
13
+        <pkg-ref id="@MACOS_BUNDLEID@"/>
14
+    </choice>
15
+    <pkg-ref id="@MACOS_BUNDLEID@" version="@CMAKE_PROJECT_VERSION@" onConclusion="none">@CMAKE_PROJECT_NAME@-flat.pkg</pkg-ref>
16
+    <domains enable_anywhere="false" enable_currentUserHome="true" enable_localSystem="false"/>
17
+</installer-gui-script>
18
obs-backgroundremoval-1.1.6.tar.gz/cmake/macos/resources/create-package.cmake.in -> obs-backgroundremoval-1.1.13.tar.gz/cmake/macos/resources/create-package.cmake.in Changed
9
 
1
@@ -3,5 +3,5 @@
2
 set(MACOS_BUNDLEID ${MACOS_BUNDLEID})
3
 set(UUID_PACKAGE ${UUID_PACKAGE})
4
 set(UUID_INSTALLER ${UUID_INSTALLER})
5
-configure_file(cmake/macos/resources/installer-macos.pkgproj.in
6
-  "${CMAKE_CURRENT_BINARY_DIR}/installer-macos.generated.pkgproj")
7
+configure_file(cmake/macos/resources/Distribution.xml.in
8
+  "${CMAKE_CURRENT_BINARY_DIR}/Distribution.generated.xml")
9
obs-backgroundremoval-1.1.6.tar.gz/cmake/windows/compilerconfig.cmake -> obs-backgroundremoval-1.1.13.tar.gz/cmake/windows/compilerconfig.cmake Changed
24
 
1
@@ -20,15 +20,19 @@
2
 endif()
3
 
4
 add_compile_options(
5
-  /W3 /utf-8 "$<$<COMPILE_LANG_AND_ID:C,MSVC>:/MP>" "$<$<COMPILE_LANG_AND_ID:CXX,MSVC>:/MP>"
6
+  /W3
7
+  /utf-8
8
+  "$<$<COMPILE_LANG_AND_ID:C,MSVC>:/MP>"
9
+  "$<$<COMPILE_LANG_AND_ID:CXX,MSVC>:/MP>"
10
   "$<$<COMPILE_LANG_AND_ID:C,Clang>:${_obs_clang_c_options}>"
11
-  "$<$<COMPILE_LANG_AND_ID:CXX,Clang>:${_obs_clang_cxx_options}>")
12
+  "$<$<COMPILE_LANG_AND_ID:CXX,Clang>:${_obs_clang_cxx_options}>"
13
+  /IGNORE:4099)
14
 
15
 add_compile_definitions(UNICODE _UNICODE _CRT_SECURE_NO_WARNINGS _CRT_NONSTDC_NO_WARNINGS $<$<CONFIG:DEBUG>:DEBUG>
16
                         $<$<CONFIG:DEBUG>:_DEBUG>)
17
 
18
 add_link_options("$<$<NOT:$<CONFIG:Debug>>:/OPT:REF>" "$<$<CONFIG:Debug>:/INCREMENTAL:NO>"
19
-                 "$<$<CONFIG:RelWithDebInfo>:/INCREMENTAL:NO>" "$<$<CONFIG:RelWithDebInfo>:/OPT:ICF>")
20
+                 "$<$<CONFIG:RelWithDebInfo>:/INCREMENTAL:NO>" "$<$<CONFIG:RelWithDebInfo>:/OPT:ICF>" /IGNORE:4099)
21
 
22
 if(CMAKE_COMPILE_WARNING_AS_ERROR)
23
   add_link_options(/WX)
24
obs-backgroundremoval-1.1.6.tar.gz/cmake/windows/resources/installer-Windows.iss.in -> obs-backgroundremoval-1.1.13.tar.gz/cmake/windows/resources/installer-Windows.iss.in Changed
11
 
1
@@ -20,6 +20,9 @@
2
 Compression=lzma
3
 SolidCompression=yes
4
 DirExistsWarning=no
5
+VersionInfoVersion={#MyAppVersion}
6
+AppCopyright=Copyright (C) 2023 {#MyAppPublisher}
7
+DisableProgramGroupPage=Yes
8
 
9
 Languages
10
 Name: "english"; MessagesFile: "compiler:Default.isl"
11
obs-backgroundremoval-1.1.6.tar.gz/data/locale/ar-EG.ini -> obs-backgroundremoval-1.1.13.tar.gz/data/locale/ar-EG.ini Changed
6
 
1
@@ -28,3 +28,4 @@
2
 SGLLIE="تحسين موجّه بالدليل الدلالي"
3
 ZERODCE="Zero-DCE"
4
 EnableThreshold="تمكين الحد"
5
+Advanced="إعدادات متقدمة"
6
obs-backgroundremoval-1.1.6.tar.gz/data/locale/bn-IN.ini -> obs-backgroundremoval-1.1.13.tar.gz/data/locale/bn-IN.ini Changed
6
 
1
@@ -28,3 +28,4 @@
2
 SGLLIE="সেমান্টিক গাইডেড উন্নয়ন"
3
 ZERODCE="শূন্য-DCE"
4
 EnableThreshold="থ্রেসহোল্ড সক্ষম করুন"
5
+Advanced="উন্নত সেটিংস"
6
obs-backgroundremoval-1.1.6.tar.gz/data/locale/en-US.ini -> obs-backgroundremoval-1.1.13.tar.gz/data/locale/en-US.ini Changed
21
 
1
@@ -17,8 +17,8 @@
2
 SelfieSegmentation="Selfie Segmentation"
3
 PPHumanSeg="PPHumanSeg"
4
 RobustVideoMatting="Robust Video Matting"
5
-CalculateMaskEveryXFrame="Calculate mask every X frame"
6
-BlurBackgroundFactor0NoBlurUseColor="Blur background factor (0 - no blur)"
7
+CalculateMaskEveryXFrame="Calculate every X frame"
8
+BlurBackgroundFactor0NoBlurUseColor="Blur background (0 - no blur)"
9
 EnhancePortrait="Enhance portrait"
10
 EffectStrengh="Effect strength (0 - no enhance)"
11
 EnhancementModel="Enhancement model"
12
@@ -32,3 +32,8 @@
13
 TCMonoDepth="TCMonoDepth (Depth)"
14
 EnableFocalBlur="Enable focal blur"
15
 BlurFocusDepth="Blur focus depth"
16
+Advanced="Advanced settings"
17
+FocalBlurGroup="Focal blur settings"
18
+ThresholdGroup="Threshold settings"
19
+EnableImageSimilarity="Skip image based on similarity?"
20
+ImageSimilarityThreshold="Sim. thresh. (high -> sensitive)"
21
obs-backgroundremoval-1.1.6.tar.gz/data/locale/es-SP.ini -> obs-backgroundremoval-1.1.13.tar.gz/data/locale/es-SP.ini Changed
6
 
1
@@ -28,3 +28,4 @@
2
 SGLLIE="Mejora guiada semántica"
3
 ZERODCE="Zero-DCE"
4
 EnableThreshold="Habilitar umbral"
5
+Advanced="Configuración avanzada"
6
obs-backgroundremoval-1.1.6.tar.gz/data/locale/fr-FR.ini -> obs-backgroundremoval-1.1.13.tar.gz/data/locale/fr-FR.ini Changed
6
 
1
@@ -28,3 +28,4 @@
2
 SGLLIE="Amélioration Guidée par la Sémantique"
3
 ZERODCE="Zero-DCE"
4
 EnableThreshold="Activer le seuil"
5
+Advanced="Paramètres avancés"
6
obs-backgroundremoval-1.1.6.tar.gz/data/locale/hi-IN.ini -> obs-backgroundremoval-1.1.13.tar.gz/data/locale/hi-IN.ini Changed
6
 
1
@@ -28,3 +28,4 @@
2
 SGLLIE="सेमांटिक गाइडेड एन्हांसमेंट"
3
 ZERODCE="ज़ीरो-डीसीई"
4
 EnableThreshold="थ्रेसहोल्ड सक्षम करें"
5
+Advanced="उन्नत सेटिंग्स"
6
obs-backgroundremoval-1.1.6.tar.gz/data/locale/it-IT.ini -> obs-backgroundremoval-1.1.13.tar.gz/data/locale/it-IT.ini Changed
6
 
1
@@ -28,3 +28,4 @@
2
 SGLLIE="Miglioramento semantico guidato"
3
 ZERODCE="Zero-DCE"
4
 EnableThreshold="Abilita soglia"
5
+Advanced="Impostazioni avanzate"
6
obs-backgroundremoval-1.1.6.tar.gz/data/locale/ja-JP.ini -> obs-backgroundremoval-1.1.13.tar.gz/data/locale/ja-JP.ini Changed
19
 
1
@@ -20,3 +20,17 @@
2
 CalculateMaskEveryXFrame="Xフレーム毎にマスクを計算"
3
 BlurBackgroundFactor0NoBlurUseColor="背景ぼかし係数(0でぼかさず背景色を使用)"
4
 EnableThreshold="しきい値を有効にする"
5
+Advanced="詳細設定"
6
+BlurFocusPoint="ぼかし焦点点"
7
+EnableFocalBlur="焦点ぼかしを有効にする"
8
+BlurFocusDepth="ぼかし焦点深度"
9
+EffectStrengh="効果強度(0で効果なし)"
10
+EnhancementModel="強化モデル"
11
+NumThreads="# CPUスレッド"
12
+TCMonoDepth="TCMonoDepth(深度)"
13
+TBEFN="TBEFN"
14
+URETINEX="URetinex-Net"
15
+SGLLIE="Semantic Guided Enhancement"
16
+ZERODCE="Zero-DCE"
17
+FocalBlurGroup="焦点ぼかし設定"
18
+ThresholdGroup="しきい値設定"
19
obs-backgroundremoval-1.1.6.tar.gz/data/locale/ko-KR.ini -> obs-backgroundremoval-1.1.13.tar.gz/data/locale/ko-KR.ini Changed
8
 
1
@@ -28,3 +28,6 @@
2
 SGLLIE="시맨틱 가이드 개선"
3
 ZERODCE="Zero-DCE"
4
 EnableThreshold="임계값 활성화"
5
+Advanced="고급 설정"
6
+FocalBlurGroup="초점 블러 설정"
7
+ThresholdGroup="임계값 설정"
8
obs-backgroundremoval-1.1.6.tar.gz/data/locale/pt-BR.ini -> obs-backgroundremoval-1.1.13.tar.gz/data/locale/pt-BR.ini Changed
12
 
1
@@ -28,3 +28,10 @@
2
 SGLLIE="Aprimoramento Guiado Semântico"
3
 ZERODCE="Zero-DCE"
4
 EnableThreshold="Ativar Limiar"
5
+Advanced="Configurações Avançadas"
6
+FocalBlurGroup="Configurações de desfoque focal"
7
+BlurFocusPoint="Ponto de foco desfocado"
8
+EnableFocalBlur="Ativar desfoque focal"
9
+BlurFocusDepth="Profundidade de foco desfocada"
10
+TCMonoDepth="TCMonoDepth (Profundidade)"
11
+ThresholdGroup="Configurações de Limiar"
12
obs-backgroundremoval-1.1.6.tar.gz/data/locale/ru-RU.ini -> obs-backgroundremoval-1.1.13.tar.gz/data/locale/ru-RU.ini Changed
6
 
1
@@ -28,3 +28,4 @@
2
 SGLLIE="Семантическое улучшение"
3
 ZERODCE="Zero-DCE"
4
 EnableThreshold="Включить порог"
5
+Advanced="Расширенные настройки"
6
obs-backgroundremoval-1.1.6.tar.gz/data/locale/ta-IN.ini -> obs-backgroundremoval-1.1.13.tar.gz/data/locale/ta-IN.ini Changed
6
 
1
@@ -28,3 +28,4 @@
2
 SGLLIE="பரிமாற்றத்தை உதர்வுபடுத்திய மேம்படுத்தல்"
3
 ZERODCE="பூஜிய மேற்கோளிக் குறியீடு"
4
 EnableThreshold="அளவுருக்கு அனுமதி"
5
+Advanced="மேம்படுத்தப்பட்ட அமைப்புகள்"
6
obs-backgroundremoval-1.1.6.tar.gz/data/locale/tr-TR.ini -> obs-backgroundremoval-1.1.13.tar.gz/data/locale/tr-TR.ini Changed
6
 
1
@@ -28,3 +28,4 @@
2
 SGLLIE="Semantik Rehberli İyileştirme"
3
 ZERODCE="Zero-DCE"
4
 EnableThreshold="Eşik Değerini Etkinleştir"
5
+Advanced="Gelişmiş Ayarlar"
6
obs-backgroundremoval-1.1.6.tar.gz/data/locale/zh-CN.ini -> obs-backgroundremoval-1.1.13.tar.gz/data/locale/zh-CN.ini Changed
6
 
1
@@ -28,3 +28,4 @@
2
 SGLLIE="语义引导增强"
3
 ZERODCE="Zero-DCE"
4
 EnableThreshold="启用阈值"
5
+Advanced="高级设置"
6
obs-backgroundremoval-1.1.13.tar.gz/data/models/bria_rmbg_1_4_qint8.onnx Added
obs-backgroundremoval-1.1.6.tar.gz/docs/BUILDING-FEDORA.md -> obs-backgroundremoval-1.1.13.tar.gz/docs/BUILDING-FEDORA.md Changed
10
 
1
@@ -13,7 +13,7 @@
2
 
3
 Clone the repository and set up the submodules:
4
 ```
5
-git clone https://github.com/royshil/obs-backgroundremoval.git
6
+git clone https://github.com/obs-ai/obs-backgroundremoval.git
7
 cd obs-backgroundremoval
8
 git submodule update --init
9
 ```
10
obs-backgroundremoval-1.1.6.tar.gz/docs/BUILDING-OPENSUSE.md -> obs-backgroundremoval-1.1.13.tar.gz/docs/BUILDING-OPENSUSE.md Changed
25
 
1
@@ -19,11 +19,20 @@
2
 ```
3
 sudo zypper install -t pattern devel_basis
4
 sudo zypper install zsh cmake Mesa-libGL-devel \
5
-  ffmpeg-6-libavcodes-devel ffmpeg-6-libavdevice-devel ffmpeg-6-libavformat-devel \
6
+  ffmpeg-6-libavcodec-devel ffmpeg-6-libavdevice-devel ffmpeg-6-libavformat-devel \
7
   libcurl-devel Mesa-libEGL-devel \
8
   libpulse-devel libxkbcommon-devel
9
-</dev/null >.github/scripts/utils.zsh/check_linux
10
-CI=1 .github/scripts/build-linux.zsh --skip-deps
11
+sudo zypper in cmake gcc12-c++ ninja obs-studio-devel opencv-devel qt6-base-devel zsh curl-devel jq
12
+
13
+cmake . -B build_x86_64 \
14
+  -DCMAKE_C_COMPILER=gcc-12 \
15
+  -DCMAKE_CXX_COMPILER=g++-12 \
16
+  -DQT_VERSION=6 \
17
+  -DCMAKE_BUILD_TYPE=RelWithDebInfo \
18
+  -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
19
+  -DENABLE_FRONTEND_API=ON \
20
+  -DENABLE_QT=ON
21
+cmake --build build_x86_64
22
 sudo cmake --install build_x86_64 --prefix /usr
23
 ```
24
 
25
obs-backgroundremoval-1.1.13.tar.gz/pages Added
2
 
1
+(directory)
2
obs-backgroundremoval-1.1.13.tar.gz/pages/.eslintignore Added
15
 
1
@@ -0,0 +1,13 @@
2
+.DS_Store
3
+node_modules
4
+/build
5
+/.svelte-kit
6
+/package
7
+.env
8
+.env.*
9
+!.env.example
10
+
11
+# Ignore files for PNPM, NPM and YARN
12
+pnpm-lock.yaml
13
+package-lock.json
14
+yarn.lock
15
obs-backgroundremoval-1.1.13.tar.gz/pages/.eslintrc.cjs Added
32
 
1
@@ -0,0 +1,30 @@
2
+module.exports = {
3
+   root: true,
4
+   extends: 
5
+       'eslint:recommended',
6
+       'plugin:@typescript-eslint/recommended',
7
+       'plugin:svelte/recommended',
8
+       'prettier'
9
+   ,
10
+   parser: '@typescript-eslint/parser',
11
+   plugins: '@typescript-eslint',
12
+   parserOptions: {
13
+       sourceType: 'module',
14
+       ecmaVersion: 2020,
15
+       extraFileExtensions: '.svelte'
16
+   },
17
+   env: {
18
+       browser: true,
19
+       es2017: true,
20
+       node: true
21
+   },
22
+   overrides: 
23
+       {
24
+           files: '*.svelte',
25
+           parser: 'svelte-eslint-parser',
26
+           parserOptions: {
27
+               parser: '@typescript-eslint/parser'
28
+           }
29
+       }
30
+   
31
+};
32
obs-backgroundremoval-1.1.13.tar.gz/pages/.gitignore Added
14
 
1
@@ -0,0 +1,12 @@
2
+.DS_Store
3
+node_modules
4
+/build
5
+/.svelte-kit
6
+/package
7
+.env
8
+.env.*
9
+!.env.example
10
+.vercel
11
+.output
12
+vite.config.js.timestamp-*
13
+vite.config.ts.timestamp-*
14
obs-backgroundremoval-1.1.13.tar.gz/pages/.npmrc Added
3
 
1
@@ -0,0 +1,1 @@
2
+engine-strict=true
3
obs-backgroundremoval-1.1.13.tar.gz/pages/.prettierignore Added
15
 
1
@@ -0,0 +1,13 @@
2
+.DS_Store
3
+node_modules
4
+/build
5
+/.svelte-kit
6
+/package
7
+.env
8
+.env.*
9
+!.env.example
10
+
11
+# Ignore files for PNPM, NPM and YARN
12
+pnpm-lock.yaml
13
+package-lock.json
14
+yarn.lock
15
obs-backgroundremoval-1.1.13.tar.gz/pages/.prettierrc Added
11
 
1
@@ -0,0 +1,9 @@
2
+{
3
+   "useTabs": true,
4
+   "singleQuote": true,
5
+   "trailingComma": "none",
6
+   "printWidth": 100,
7
+   "plugins": "prettier-plugin-svelte",
8
+   "pluginSearchDirs": ".",
9
+   "overrides": { "files": "*.svelte", "options": { "parser": "svelte" } }
10
+}
11
obs-backgroundremoval-1.1.13.tar.gz/pages/README.md Added
40
 
1
@@ -0,0 +1,38 @@
2
+# create-svelte
3
+
4
+Everything you need to build a Svelte project, powered by `create-svelte`(https://github.com/sveltejs/kit/tree/master/packages/create-svelte).
5
+
6
+## Creating a project
7
+
8
+If you're seeing this, you've probably already done this step. Congrats!
9
+
10
+```bash
11
+# create a new project in the current directory
12
+npm create svelte@latest
13
+
14
+# create a new project in my-app
15
+npm create svelte@latest my-app
16
+```
17
+
18
+## Developing
19
+
20
+Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
21
+
22
+```bash
23
+npm run dev
24
+
25
+# or start the server and open the app in a new browser tab
26
+npm run dev -- --open
27
+```
28
+
29
+## Building
30
+
31
+To create a production version of your app:
32
+
33
+```bash
34
+npm run build
35
+```
36
+
37
+You can preview the production build with `npm run preview`.
38
+
39
+> To deploy your app, you may need to install an adapter(https://kit.svelte.dev/docs/adapters) for your target environment.
40
obs-backgroundremoval-1.1.13.tar.gz/pages/package-lock.json Added
3122
 
1
@@ -0,0 +1,3120 @@
2
+{
3
+   "name": "pages",
4
+   "version": "0.0.1",
5
+   "lockfileVersion": 3,
6
+   "requires": true,
7
+   "packages": {
8
+       "": {
9
+           "name": "pages",
10
+           "version": "0.0.1",
11
+           "devDependencies": {
12
+               "@fontsource/fira-mono": "^4.5.10",
13
+               "@neoconfetti/svelte": "^1.0.0",
14
+               "@sveltejs/adapter-static": "^2.0.3",
15
+               "@sveltejs/kit": "^1.20.4",
16
+               "@types/cookie": "^0.5.1",
17
+               "@typescript-eslint/eslint-plugin": "^6.0.0",
18
+               "@typescript-eslint/parser": "^6.0.0",
19
+               "eslint": "^8.28.0",
20
+               "eslint-config-prettier": "^8.5.0",
21
+               "eslint-plugin-svelte": "^2.30.0",
22
+               "prettier": "^2.8.0",
23
+               "prettier-plugin-svelte": "^2.10.1",
24
+               "svelte": "^4.0.5",
25
+               "svelte-check": "^3.4.3",
26
+               "tslib": "^2.4.1",
27
+               "typescript": "^5.0.0",
28
+               "vite": "^4.4.2"
29
+           }
30
+       },
31
+       "node_modules/@aashutoshrathi/word-wrap": {
32
+           "version": "1.2.6",
33
+           "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz",
34
+           "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==",
35
+           "dev": true,
36
+           "engines": {
37
+               "node": ">=0.10.0"
38
+           }
39
+       },
40
+       "node_modules/@ampproject/remapping": {
41
+           "version": "2.2.1",
42
+           "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz",
43
+           "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==",
44
+           "dev": true,
45
+           "dependencies": {
46
+               "@jridgewell/gen-mapping": "^0.3.0",
47
+               "@jridgewell/trace-mapping": "^0.3.9"
48
+           },
49
+           "engines": {
50
+               "node": ">=6.0.0"
51
+           }
52
+       },
53
+       "node_modules/@esbuild/android-arm": {
54
+           "version": "0.18.20",
55
+           "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.20.tgz",
56
+           "integrity": "sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==",
57
+           "cpu": 
58
+               "arm"
59
+           ,
60
+           "dev": true,
61
+           "optional": true,
62
+           "os": 
63
+               "android"
64
+           ,
65
+           "engines": {
66
+               "node": ">=12"
67
+           }
68
+       },
69
+       "node_modules/@esbuild/android-arm64": {
70
+           "version": "0.18.20",
71
+           "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz",
72
+           "integrity": "sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==",
73
+           "cpu": 
74
+               "arm64"
75
+           ,
76
+           "dev": true,
77
+           "optional": true,
78
+           "os": 
79
+               "android"
80
+           ,
81
+           "engines": {
82
+               "node": ">=12"
83
+           }
84
+       },
85
+       "node_modules/@esbuild/android-x64": {
86
+           "version": "0.18.20",
87
+           "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.18.20.tgz",
88
+           "integrity": "sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==",
89
+           "cpu": 
90
+               "x64"
91
+           ,
92
+           "dev": true,
93
+           "optional": true,
94
+           "os": 
95
+               "android"
96
+           ,
97
+           "engines": {
98
+               "node": ">=12"
99
+           }
100
+       },
101
+       "node_modules/@esbuild/darwin-arm64": {
102
+           "version": "0.18.20",
103
+           "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz",
104
+           "integrity": "sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==",
105
+           "cpu": 
106
+               "arm64"
107
+           ,
108
+           "dev": true,
109
+           "optional": true,
110
+           "os": 
111
+               "darwin"
112
+           ,
113
+           "engines": {
114
+               "node": ">=12"
115
+           }
116
+       },
117
+       "node_modules/@esbuild/darwin-x64": {
118
+           "version": "0.18.20",
119
+           "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.18.20.tgz",
120
+           "integrity": "sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==",
121
+           "cpu": 
122
+               "x64"
123
+           ,
124
+           "dev": true,
125
+           "optional": true,
126
+           "os": 
127
+               "darwin"
128
+           ,
129
+           "engines": {
130
+               "node": ">=12"
131
+           }
132
+       },
133
+       "node_modules/@esbuild/freebsd-arm64": {
134
+           "version": "0.18.20",
135
+           "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.20.tgz",
136
+           "integrity": "sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==",
137
+           "cpu": 
138
+               "arm64"
139
+           ,
140
+           "dev": true,
141
+           "optional": true,
142
+           "os": 
143
+               "freebsd"
144
+           ,
145
+           "engines": {
146
+               "node": ">=12"
147
+           }
148
+       },
149
+       "node_modules/@esbuild/freebsd-x64": {
150
+           "version": "0.18.20",
151
+           "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.18.20.tgz",
152
+           "integrity": "sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==",
153
+           "cpu": 
154
+               "x64"
155
+           ,
156
+           "dev": true,
157
+           "optional": true,
158
+           "os": 
159
+               "freebsd"
160
+           ,
161
+           "engines": {
162
+               "node": ">=12"
163
+           }
164
+       },
165
+       "node_modules/@esbuild/linux-arm": {
166
+           "version": "0.18.20",
167
+           "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.18.20.tgz",
168
+           "integrity": "sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==",
169
+           "cpu": 
170
+               "arm"
171
+           ,
172
+           "dev": true,
173
+           "optional": true,
174
+           "os": 
175
+               "linux"
176
+           ,
177
+           "engines": {
178
+               "node": ">=12"
179
+           }
180
+       },
181
+       "node_modules/@esbuild/linux-arm64": {
182
+           "version": "0.18.20",
183
+           "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.18.20.tgz",
184
+           "integrity": "sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==",
185
+           "cpu": 
186
+               "arm64"
187
+           ,
188
+           "dev": true,
189
+           "optional": true,
190
+           "os": 
191
+               "linux"
192
+           ,
193
+           "engines": {
194
+               "node": ">=12"
195
+           }
196
+       },
197
+       "node_modules/@esbuild/linux-ia32": {
198
+           "version": "0.18.20",
199
+           "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.18.20.tgz",
200
+           "integrity": "sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==",
201
+           "cpu": 
202
+               "ia32"
203
+           ,
204
+           "dev": true,
205
+           "optional": true,
206
+           "os": 
207
+               "linux"
208
+           ,
209
+           "engines": {
210
+               "node": ">=12"
211
+           }
212
+       },
213
+       "node_modules/@esbuild/linux-loong64": {
214
+           "version": "0.18.20",
215
+           "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.18.20.tgz",
216
+           "integrity": "sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==",
217
+           "cpu": 
218
+               "loong64"
219
+           ,
220
+           "dev": true,
221
+           "optional": true,
222
+           "os": 
223
+               "linux"
224
+           ,
225
+           "engines": {
226
+               "node": ">=12"
227
+           }
228
+       },
229
+       "node_modules/@esbuild/linux-mips64el": {
230
+           "version": "0.18.20",
231
+           "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.18.20.tgz",
232
+           "integrity": "sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==",
233
+           "cpu": 
234
+               "mips64el"
235
+           ,
236
+           "dev": true,
237
+           "optional": true,
238
+           "os": 
239
+               "linux"
240
+           ,
241
+           "engines": {
242
+               "node": ">=12"
243
+           }
244
+       },
245
+       "node_modules/@esbuild/linux-ppc64": {
246
+           "version": "0.18.20",
247
+           "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.18.20.tgz",
248
+           "integrity": "sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==",
249
+           "cpu": 
250
+               "ppc64"
251
+           ,
252
+           "dev": true,
253
+           "optional": true,
254
+           "os": 
255
+               "linux"
256
+           ,
257
+           "engines": {
258
+               "node": ">=12"
259
+           }
260
+       },
261
+       "node_modules/@esbuild/linux-riscv64": {
262
+           "version": "0.18.20",
263
+           "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.18.20.tgz",
264
+           "integrity": "sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==",
265
+           "cpu": 
266
+               "riscv64"
267
+           ,
268
+           "dev": true,
269
+           "optional": true,
270
+           "os": 
271
+               "linux"
272
+           ,
273
+           "engines": {
274
+               "node": ">=12"
275
+           }
276
+       },
277
+       "node_modules/@esbuild/linux-s390x": {
278
+           "version": "0.18.20",
279
+           "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.18.20.tgz",
280
+           "integrity": "sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==",
281
+           "cpu": 
282
+               "s390x"
283
+           ,
284
+           "dev": true,
285
+           "optional": true,
286
+           "os": 
287
+               "linux"
288
+           ,
289
+           "engines": {
290
+               "node": ">=12"
291
+           }
292
+       },
293
+       "node_modules/@esbuild/linux-x64": {
294
+           "version": "0.18.20",
295
+           "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz",
296
+           "integrity": "sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==",
297
+           "cpu": 
298
+               "x64"
299
+           ,
300
+           "dev": true,
301
+           "optional": true,
302
+           "os": 
303
+               "linux"
304
+           ,
305
+           "engines": {
306
+               "node": ">=12"
307
+           }
308
+       },
309
+       "node_modules/@esbuild/netbsd-x64": {
310
+           "version": "0.18.20",
311
+           "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.18.20.tgz",
312
+           "integrity": "sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==",
313
+           "cpu": 
314
+               "x64"
315
+           ,
316
+           "dev": true,
317
+           "optional": true,
318
+           "os": 
319
+               "netbsd"
320
+           ,
321
+           "engines": {
322
+               "node": ">=12"
323
+           }
324
+       },
325
+       "node_modules/@esbuild/openbsd-x64": {
326
+           "version": "0.18.20",
327
+           "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.18.20.tgz",
328
+           "integrity": "sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==",
329
+           "cpu": 
330
+               "x64"
331
+           ,
332
+           "dev": true,
333
+           "optional": true,
334
+           "os": 
335
+               "openbsd"
336
+           ,
337
+           "engines": {
338
+               "node": ">=12"
339
+           }
340
+       },
341
+       "node_modules/@esbuild/sunos-x64": {
342
+           "version": "0.18.20",
343
+           "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.18.20.tgz",
344
+           "integrity": "sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==",
345
+           "cpu": 
346
+               "x64"
347
+           ,
348
+           "dev": true,
349
+           "optional": true,
350
+           "os": 
351
+               "sunos"
352
+           ,
353
+           "engines": {
354
+               "node": ">=12"
355
+           }
356
+       },
357
+       "node_modules/@esbuild/win32-arm64": {
358
+           "version": "0.18.20",
359
+           "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.18.20.tgz",
360
+           "integrity": "sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==",
361
+           "cpu": 
362
+               "arm64"
363
+           ,
364
+           "dev": true,
365
+           "optional": true,
366
+           "os": 
367
+               "win32"
368
+           ,
369
+           "engines": {
370
+               "node": ">=12"
371
+           }
372
+       },
373
+       "node_modules/@esbuild/win32-ia32": {
374
+           "version": "0.18.20",
375
+           "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.18.20.tgz",
376
+           "integrity": "sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==",
377
+           "cpu": 
378
+               "ia32"
379
+           ,
380
+           "dev": true,
381
+           "optional": true,
382
+           "os": 
383
+               "win32"
384
+           ,
385
+           "engines": {
386
+               "node": ">=12"
387
+           }
388
+       },
389
+       "node_modules/@esbuild/win32-x64": {
390
+           "version": "0.18.20",
391
+           "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz",
392
+           "integrity": "sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==",
393
+           "cpu": 
394
+               "x64"
395
+           ,
396
+           "dev": true,
397
+           "optional": true,
398
+           "os": 
399
+               "win32"
400
+           ,
401
+           "engines": {
402
+               "node": ">=12"
403
+           }
404
+       },
405
+       "node_modules/@eslint-community/eslint-utils": {
406
+           "version": "4.4.0",
407
+           "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz",
408
+           "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==",
409
+           "dev": true,
410
+           "dependencies": {
411
+               "eslint-visitor-keys": "^3.3.0"
412
+           },
413
+           "engines": {
414
+               "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
415
+           },
416
+           "peerDependencies": {
417
+               "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0"
418
+           }
419
+       },
420
+       "node_modules/@eslint-community/regexpp": {
421
+           "version": "4.9.1",
422
+           "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.9.1.tgz",
423
+           "integrity": "sha512-Y27x+MBLjXa+0JWDhykM3+JE+il3kHKAEqabfEWq3SDhZjLYb6/BHL/JKFnH3fe207JaXkyDo685Oc2Glt6ifA==",
424
+           "dev": true,
425
+           "engines": {
426
+               "node": "^12.0.0 || ^14.0.0 || >=16.0.0"
427
+           }
428
+       },
429
+       "node_modules/@eslint/eslintrc": {
430
+           "version": "2.1.2",
431
+           "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.2.tgz",
432
+           "integrity": "sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g==",
433
+           "dev": true,
434
+           "dependencies": {
435
+               "ajv": "^6.12.4",
436
+               "debug": "^4.3.2",
437
+               "espree": "^9.6.0",
438
+               "globals": "^13.19.0",
439
+               "ignore": "^5.2.0",
440
+               "import-fresh": "^3.2.1",
441
+               "js-yaml": "^4.1.0",
442
+               "minimatch": "^3.1.2",
443
+               "strip-json-comments": "^3.1.1"
444
+           },
445
+           "engines": {
446
+               "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
447
+           },
448
+           "funding": {
449
+               "url": "https://opencollective.com/eslint"
450
+           }
451
+       },
452
+       "node_modules/@eslint/js": {
453
+           "version": "8.50.0",
454
+           "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.50.0.tgz",
455
+           "integrity": "sha512-NCC3zz2+nvYd+Ckfh87rA47zfu2QsQpvc6k1yzTk+b9KzRj0wkGa8LSoGOXN6Zv4lRf/EIoZ80biDh9HOI+RNQ==",
456
+           "dev": true,
457
+           "engines": {
458
+               "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
459
+           }
460
+       },
461
+       "node_modules/@fastify/busboy": {
462
+           "version": "2.0.0",
463
+           "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.0.0.tgz",
464
+           "integrity": "sha512-JUFJad5lv7jxj926GPgymrWQxxjPYuJNiNjNMzqT+HiuP6Vl3dk5xzG+8sTX96np0ZAluvaMzPsjhHZ5rNuNQQ==",
465
+           "dev": true,
466
+           "engines": {
467
+               "node": ">=14"
468
+           }
469
+       },
470
+       "node_modules/@fontsource/fira-mono": {
471
+           "version": "4.5.10",
472
+           "resolved": "https://registry.npmjs.org/@fontsource/fira-mono/-/fira-mono-4.5.10.tgz",
473
+           "integrity": "sha512-bxUnRP8xptGRo8YXeY073DSpfK74XpSb0ZyRNpHV9WvLnJ7TwPOjZll8hTMin7zLC6iOp59pDZ8EQDj1gzgAQQ==",
474
+           "dev": true
475
+       },
476
+       "node_modules/@humanwhocodes/config-array": {
477
+           "version": "0.11.11",
478
+           "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.11.tgz",
479
+           "integrity": "sha512-N2brEuAadi0CcdeMXUkhbZB84eskAc8MEX1By6qEchoVywSgXPIjou4rYsl0V3Hj0ZnuGycGCjdNgockbzeWNA==",
480
+           "dev": true,
481
+           "dependencies": {
482
+               "@humanwhocodes/object-schema": "^1.2.1",
483
+               "debug": "^4.1.1",
484
+               "minimatch": "^3.0.5"
485
+           },
486
+           "engines": {
487
+               "node": ">=10.10.0"
488
+           }
489
+       },
490
+       "node_modules/@humanwhocodes/module-importer": {
491
+           "version": "1.0.1",
492
+           "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz",
493
+           "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==",
494
+           "dev": true,
495
+           "engines": {
496
+               "node": ">=12.22"
497
+           },
498
+           "funding": {
499
+               "type": "github",
500
+               "url": "https://github.com/sponsors/nzakas"
501
+           }
502
+       },
503
+       "node_modules/@humanwhocodes/object-schema": {
504
+           "version": "1.2.1",
505
+           "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz",
506
+           "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==",
507
+           "dev": true
508
+       },
509
+       "node_modules/@jridgewell/gen-mapping": {
510
+           "version": "0.3.3",
511
+           "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz",
512
+           "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==",
513
+           "dev": true,
514
+           "dependencies": {
515
+               "@jridgewell/set-array": "^1.0.1",
516
+               "@jridgewell/sourcemap-codec": "^1.4.10",
517
+               "@jridgewell/trace-mapping": "^0.3.9"
518
+           },
519
+           "engines": {
520
+               "node": ">=6.0.0"
521
+           }
522
+       },
523
+       "node_modules/@jridgewell/resolve-uri": {
524
+           "version": "3.1.1",
525
+           "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz",
526
+           "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==",
527
+           "dev": true,
528
+           "engines": {
529
+               "node": ">=6.0.0"
530
+           }
531
+       },
532
+       "node_modules/@jridgewell/set-array": {
533
+           "version": "1.1.2",
534
+           "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz",
535
+           "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==",
536
+           "dev": true,
537
+           "engines": {
538
+               "node": ">=6.0.0"
539
+           }
540
+       },
541
+       "node_modules/@jridgewell/sourcemap-codec": {
542
+           "version": "1.4.15",
543
+           "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz",
544
+           "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==",
545
+           "dev": true
546
+       },
547
+       "node_modules/@jridgewell/trace-mapping": {
548
+           "version": "0.3.19",
549
+           "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.19.tgz",
550
+           "integrity": "sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw==",
551
+           "dev": true,
552
+           "dependencies": {
553
+               "@jridgewell/resolve-uri": "^3.1.0",
554
+               "@jridgewell/sourcemap-codec": "^1.4.14"
555
+           }
556
+       },
557
+       "node_modules/@neoconfetti/svelte": {
558
+           "version": "1.0.0",
559
+           "resolved": "https://registry.npmjs.org/@neoconfetti/svelte/-/svelte-1.0.0.tgz",
560
+           "integrity": "sha512-SmksyaJAdSlMa9cTidVSIqYo1qti+WTsviNDwgjNVm+KQ3DRP2Df9umDIzC4vCcpEYY+chQe0i2IKnLw03AT8Q==",
561
+           "dev": true
562
+       },
563
+       "node_modules/@nodelib/fs.scandir": {
564
+           "version": "2.1.5",
565
+           "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
566
+           "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==",
567
+           "dev": true,
568
+           "dependencies": {
569
+               "@nodelib/fs.stat": "2.0.5",
570
+               "run-parallel": "^1.1.9"
571
+           },
572
+           "engines": {
573
+               "node": ">= 8"
574
+           }
575
+       },
576
+       "node_modules/@nodelib/fs.stat": {
577
+           "version": "2.0.5",
578
+           "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz",
579
+           "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==",
580
+           "dev": true,
581
+           "engines": {
582
+               "node": ">= 8"
583
+           }
584
+       },
585
+       "node_modules/@nodelib/fs.walk": {
586
+           "version": "1.2.8",
587
+           "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz",
588
+           "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==",
589
+           "dev": true,
590
+           "dependencies": {
591
+               "@nodelib/fs.scandir": "2.1.5",
592
+               "fastq": "^1.6.0"
593
+           },
594
+           "engines": {
595
+               "node": ">= 8"
596
+           }
597
+       },
598
+       "node_modules/@polka/url": {
599
+           "version": "1.0.0-next.23",
600
+           "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.23.tgz",
601
+           "integrity": "sha512-C16M+IYz0rgRhWZdCmK+h58JMv8vijAA61gmz2rspCSwKwzBebpdcsiUmwrtJRdphuY30i6BSLEOP8ppbNLyLg==",
602
+           "dev": true
603
+       },
604
+       "node_modules/@sveltejs/adapter-static": {
605
+           "version": "2.0.3",
606
+           "resolved": "https://registry.npmjs.org/@sveltejs/adapter-static/-/adapter-static-2.0.3.tgz",
607
+           "integrity": "sha512-VUqTfXsxYGugCpMqQv1U0LIdbR3S5nBkMMDmpjGVJyM6Q2jHVMFtdWJCkeHMySc6mZxJ+0eZK3T7IgmUCDrcUQ==",
608
+           "dev": true,
609
+           "peerDependencies": {
610
+               "@sveltejs/kit": "^1.5.0"
611
+           }
612
+       },
613
+       "node_modules/@sveltejs/kit": {
614
+           "version": "1.25.1",
615
+           "resolved": "https://registry.npmjs.org/@sveltejs/kit/-/kit-1.25.1.tgz",
616
+           "integrity": "sha512-pD8XsvNJNgTNkFngNlM60my/X8dXWPKVzN5RghEQr0NjGZmuCjy49AfFu2cGbZjNf5pBcqd2RCNMW912P5fkhA==",
617
+           "dev": true,
618
+           "hasInstallScript": true,
619
+           "dependencies": {
620
+               "@sveltejs/vite-plugin-svelte": "^2.4.1",
621
+               "@types/cookie": "^0.5.1",
622
+               "cookie": "^0.5.0",
623
+               "devalue": "^4.3.1",
624
+               "esm-env": "^1.0.0",
625
+               "kleur": "^4.1.5",
626
+               "magic-string": "^0.30.0",
627
+               "mime": "^3.0.0",
628
+               "sade": "^1.8.1",
629
+               "set-cookie-parser": "^2.6.0",
630
+               "sirv": "^2.0.2",
631
+               "tiny-glob": "^0.2.9",
632
+               "undici": "~5.25.0"
633
+           },
634
+           "bin": {
635
+               "svelte-kit": "svelte-kit.js"
636
+           },
637
+           "engines": {
638
+               "node": "^16.14 || >=18"
639
+           },
640
+           "peerDependencies": {
641
+               "svelte": "^3.54.0 || ^4.0.0-next.0",
642
+               "vite": "^4.0.0"
643
+           }
644
+       },
645
+       "node_modules/@sveltejs/vite-plugin-svelte": {
646
+           "version": "2.4.6",
647
+           "resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte/-/vite-plugin-svelte-2.4.6.tgz",
648
+           "integrity": "sha512-zO79p0+DZnXPnF0ltIigWDx/ux7Ni+HRaFOw720Qeivc1azFUrJxTl0OryXVibYNx1hCboGia1NRV3x8RNv4cA==",
649
+           "dev": true,
650
+           "dependencies": {
651
+               "@sveltejs/vite-plugin-svelte-inspector": "^1.0.4",
652
+               "debug": "^4.3.4",
653
+               "deepmerge": "^4.3.1",
654
+               "kleur": "^4.1.5",
655
+               "magic-string": "^0.30.3",
656
+               "svelte-hmr": "^0.15.3",
657
+               "vitefu": "^0.2.4"
658
+           },
659
+           "engines": {
660
+               "node": "^14.18.0 || >= 16"
661
+           },
662
+           "peerDependencies": {
663
+               "svelte": "^3.54.0 || ^4.0.0",
664
+               "vite": "^4.0.0"
665
+           }
666
+       },
667
+       "node_modules/@sveltejs/vite-plugin-svelte-inspector": {
668
+           "version": "1.0.4",
669
+           "resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte-inspector/-/vite-plugin-svelte-inspector-1.0.4.tgz",
670
+           "integrity": "sha512-zjiuZ3yydBtwpF3bj0kQNV0YXe+iKE545QGZVTaylW3eAzFr+pJ/cwK8lZEaRp4JtaJXhD5DyWAV4AxLh6DgaQ==",
671
+           "dev": true,
672
+           "dependencies": {
673
+               "debug": "^4.3.4"
674
+           },
675
+           "engines": {
676
+               "node": "^14.18.0 || >= 16"
677
+           },
678
+           "peerDependencies": {
679
+               "@sveltejs/vite-plugin-svelte": "^2.2.0",
680
+               "svelte": "^3.54.0 || ^4.0.0",
681
+               "vite": "^4.0.0"
682
+           }
683
+       },
684
+       "node_modules/@types/cookie": {
685
+           "version": "0.5.2",
686
+           "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.5.2.tgz",
687
+           "integrity": "sha512-DBpRoJGKJZn7RY92dPrgoMew8xCWc2P71beqsjyhEI/Ds9mOyVmBwtekyfhpwFIVt1WrxTonFifiOZ62V8CnNA==",
688
+           "dev": true
689
+       },
690
+       "node_modules/@types/estree": {
691
+           "version": "1.0.2",
692
+           "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.2.tgz",
693
+           "integrity": "sha512-VeiPZ9MMwXjO32/Xu7+OwflfmeoRwkE/qzndw42gGtgJwZopBnzy2gD//NN1+go1mADzkDcqf/KnFRSjTJ8xJA==",
694
+           "dev": true
695
+       },
696
+       "node_modules/@types/json-schema": {
697
+           "version": "7.0.13",
698
+           "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.13.tgz",
699
+           "integrity": "sha512-RbSSoHliUbnXj3ny0CNFOoxrIDV6SUGyStHsvDqosw6CkdPV8TtWGlfecuK4ToyMEAql6pzNxgCFKanovUzlgQ==",
700
+           "dev": true
701
+       },
702
+       "node_modules/@types/pug": {
703
+           "version": "2.0.7",
704
+           "resolved": "https://registry.npmjs.org/@types/pug/-/pug-2.0.7.tgz",
705
+           "integrity": "sha512-I469DU0UXNC1aHepwirWhu9YKg5fkxohZD95Ey/5A7lovC+Siu+MCLffva87lnfThaOrw9Vb1DUN5t55oULAAw==",
706
+           "dev": true
707
+       },
708
+       "node_modules/@types/semver": {
709
+           "version": "7.5.3",
710
+           "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.3.tgz",
711
+           "integrity": "sha512-OxepLK9EuNEIPxWNME+C6WwbRAOOI2o2BaQEGzz5Lu2e4Z5eDnEo+/aVEDMIXywoJitJ7xWd641wrGLZdtwRyw==",
712
+           "dev": true
713
+       },
714
+       "node_modules/@typescript-eslint/eslint-plugin": {
715
+           "version": "6.7.4",
716
+           "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.7.4.tgz",
717
+           "integrity": "sha512-DAbgDXwtX+pDkAHwiGhqP3zWUGpW49B7eqmgpPtg+BKJXwdct79ut9+ifqOFPJGClGKSHXn2PTBatCnldJRUoA==",
718
+           "dev": true,
719
+           "dependencies": {
720
+               "@eslint-community/regexpp": "^4.5.1",
721
+               "@typescript-eslint/scope-manager": "6.7.4",
722
+               "@typescript-eslint/type-utils": "6.7.4",
723
+               "@typescript-eslint/utils": "6.7.4",
724
+               "@typescript-eslint/visitor-keys": "6.7.4",
725
+               "debug": "^4.3.4",
726
+               "graphemer": "^1.4.0",
727
+               "ignore": "^5.2.4",
728
+               "natural-compare": "^1.4.0",
729
+               "semver": "^7.5.4",
730
+               "ts-api-utils": "^1.0.1"
731
+           },
732
+           "engines": {
733
+               "node": "^16.0.0 || >=18.0.0"
734
+           },
735
+           "funding": {
736
+               "type": "opencollective",
737
+               "url": "https://opencollective.com/typescript-eslint"
738
+           },
739
+           "peerDependencies": {
740
+               "@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha",
741
+               "eslint": "^7.0.0 || ^8.0.0"
742
+           },
743
+           "peerDependenciesMeta": {
744
+               "typescript": {
745
+                   "optional": true
746
+               }
747
+           }
748
+       },
749
+       "node_modules/@typescript-eslint/parser": {
750
+           "version": "6.7.4",
751
+           "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.7.4.tgz",
752
+           "integrity": "sha512-I5zVZFY+cw4IMZUeNCU7Sh2PO5O57F7Lr0uyhgCJmhN/BuTlnc55KxPonR4+EM3GBdfiCyGZye6DgMjtubQkmA==",
753
+           "dev": true,
754
+           "dependencies": {
755
+               "@typescript-eslint/scope-manager": "6.7.4",
756
+               "@typescript-eslint/types": "6.7.4",
757
+               "@typescript-eslint/typescript-estree": "6.7.4",
758
+               "@typescript-eslint/visitor-keys": "6.7.4",
759
+               "debug": "^4.3.4"
760
+           },
761
+           "engines": {
762
+               "node": "^16.0.0 || >=18.0.0"
763
+           },
764
+           "funding": {
765
+               "type": "opencollective",
766
+               "url": "https://opencollective.com/typescript-eslint"
767
+           },
768
+           "peerDependencies": {
769
+               "eslint": "^7.0.0 || ^8.0.0"
770
+           },
771
+           "peerDependenciesMeta": {
772
+               "typescript": {
773
+                   "optional": true
774
+               }
775
+           }
776
+       },
777
+       "node_modules/@typescript-eslint/scope-manager": {
778
+           "version": "6.7.4",
779
+           "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.7.4.tgz",
780
+           "integrity": "sha512-SdGqSLUPTXAXi7c3Ob7peAGVnmMoGzZ361VswK2Mqf8UOYcODiYvs8rs5ILqEdfvX1lE7wEZbLyELCW+Yrql1A==",
781
+           "dev": true,
782
+           "dependencies": {
783
+               "@typescript-eslint/types": "6.7.4",
784
+               "@typescript-eslint/visitor-keys": "6.7.4"
785
+           },
786
+           "engines": {
787
+               "node": "^16.0.0 || >=18.0.0"
788
+           },
789
+           "funding": {
790
+               "type": "opencollective",
791
+               "url": "https://opencollective.com/typescript-eslint"
792
+           }
793
+       },
794
+       "node_modules/@typescript-eslint/type-utils": {
795
+           "version": "6.7.4",
796
+           "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.7.4.tgz",
797
+           "integrity": "sha512-n+g3zi1QzpcAdHFP9KQF+rEFxMb2KxtnJGID3teA/nxKHOVi3ylKovaqEzGBbVY2pBttU6z85gp0D00ufLzViQ==",
798
+           "dev": true,
799
+           "dependencies": {
800
+               "@typescript-eslint/typescript-estree": "6.7.4",
801
+               "@typescript-eslint/utils": "6.7.4",
802
+               "debug": "^4.3.4",
803
+               "ts-api-utils": "^1.0.1"
804
+           },
805
+           "engines": {
806
+               "node": "^16.0.0 || >=18.0.0"
807
+           },
808
+           "funding": {
809
+               "type": "opencollective",
810
+               "url": "https://opencollective.com/typescript-eslint"
811
+           },
812
+           "peerDependencies": {
813
+               "eslint": "^7.0.0 || ^8.0.0"
814
+           },
815
+           "peerDependenciesMeta": {
816
+               "typescript": {
817
+                   "optional": true
818
+               }
819
+           }
820
+       },
821
+       "node_modules/@typescript-eslint/types": {
822
+           "version": "6.7.4",
823
+           "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.7.4.tgz",
824
+           "integrity": "sha512-o9XWK2FLW6eSS/0r/tgjAGsYasLAnOWg7hvZ/dGYSSNjCh+49k5ocPN8OmG5aZcSJ8pclSOyVKP2x03Sj+RrCA==",
825
+           "dev": true,
826
+           "engines": {
827
+               "node": "^16.0.0 || >=18.0.0"
828
+           },
829
+           "funding": {
830
+               "type": "opencollective",
831
+               "url": "https://opencollective.com/typescript-eslint"
832
+           }
833
+       },
834
+       "node_modules/@typescript-eslint/typescript-estree": {
835
+           "version": "6.7.4",
836
+           "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.7.4.tgz",
837
+           "integrity": "sha512-ty8b5qHKatlNYd9vmpHooQz3Vki3gG+3PchmtsA4TgrZBKWHNjWfkQid7K7xQogBqqc7/BhGazxMD5vr6Ha+iQ==",
838
+           "dev": true,
839
+           "dependencies": {
840
+               "@typescript-eslint/types": "6.7.4",
841
+               "@typescript-eslint/visitor-keys": "6.7.4",
842
+               "debug": "^4.3.4",
843
+               "globby": "^11.1.0",
844
+               "is-glob": "^4.0.3",
845
+               "semver": "^7.5.4",
846
+               "ts-api-utils": "^1.0.1"
847
+           },
848
+           "engines": {
849
+               "node": "^16.0.0 || >=18.0.0"
850
+           },
851
+           "funding": {
852
+               "type": "opencollective",
853
+               "url": "https://opencollective.com/typescript-eslint"
854
+           },
855
+           "peerDependenciesMeta": {
856
+               "typescript": {
857
+                   "optional": true
858
+               }
859
+           }
860
+       },
861
+       "node_modules/@typescript-eslint/utils": {
862
+           "version": "6.7.4",
863
+           "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.7.4.tgz",
864
+           "integrity": "sha512-PRQAs+HUn85Qdk+khAxsVV+oULy3VkbH3hQ8hxLRJXWBEd7iI+GbQxH5SEUSH7kbEoTp6oT1bOwyga24ELALTA==",
865
+           "dev": true,
866
+           "dependencies": {
867
+               "@eslint-community/eslint-utils": "^4.4.0",
868
+               "@types/json-schema": "^7.0.12",
869
+               "@types/semver": "^7.5.0",
870
+               "@typescript-eslint/scope-manager": "6.7.4",
871
+               "@typescript-eslint/types": "6.7.4",
872
+               "@typescript-eslint/typescript-estree": "6.7.4",
873
+               "semver": "^7.5.4"
874
+           },
875
+           "engines": {
876
+               "node": "^16.0.0 || >=18.0.0"
877
+           },
878
+           "funding": {
879
+               "type": "opencollective",
880
+               "url": "https://opencollective.com/typescript-eslint"
881
+           },
882
+           "peerDependencies": {
883
+               "eslint": "^7.0.0 || ^8.0.0"
884
+           }
885
+       },
886
+       "node_modules/@typescript-eslint/visitor-keys": {
887
+           "version": "6.7.4",
888
+           "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.7.4.tgz",
889
+           "integrity": "sha512-pOW37DUhlTZbvph50x5zZCkFn3xzwkGtNoJHzIM3svpiSkJzwOYr/kVBaXmf+RAQiUDs1AHEZVNPg6UJCJpwRA==",
890
+           "dev": true,
891
+           "dependencies": {
892
+               "@typescript-eslint/types": "6.7.4",
893
+               "eslint-visitor-keys": "^3.4.1"
894
+           },
895
+           "engines": {
896
+               "node": "^16.0.0 || >=18.0.0"
897
+           },
898
+           "funding": {
899
+               "type": "opencollective",
900
+               "url": "https://opencollective.com/typescript-eslint"
901
+           }
902
+       },
903
+       "node_modules/acorn": {
904
+           "version": "8.10.0",
905
+           "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz",
906
+           "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==",
907
+           "dev": true,
908
+           "bin": {
909
+               "acorn": "bin/acorn"
910
+           },
911
+           "engines": {
912
+               "node": ">=0.4.0"
913
+           }
914
+       },
915
+       "node_modules/acorn-jsx": {
916
+           "version": "5.3.2",
917
+           "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz",
918
+           "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==",
919
+           "dev": true,
920
+           "peerDependencies": {
921
+               "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0"
922
+           }
923
+       },
924
+       "node_modules/ajv": {
925
+           "version": "6.12.6",
926
+           "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
927
+           "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
928
+           "dev": true,
929
+           "dependencies": {
930
+               "fast-deep-equal": "^3.1.1",
931
+               "fast-json-stable-stringify": "^2.0.0",
932
+               "json-schema-traverse": "^0.4.1",
933
+               "uri-js": "^4.2.2"
934
+           },
935
+           "funding": {
936
+               "type": "github",
937
+               "url": "https://github.com/sponsors/epoberezkin"
938
+           }
939
+       },
940
+       "node_modules/ansi-regex": {
941
+           "version": "5.0.1",
942
+           "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
943
+           "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
944
+           "dev": true,
945
+           "engines": {
946
+               "node": ">=8"
947
+           }
948
+       },
949
+       "node_modules/ansi-styles": {
950
+           "version": "4.3.0",
951
+           "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
952
+           "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
953
+           "dev": true,
954
+           "dependencies": {
955
+               "color-convert": "^2.0.1"
956
+           },
957
+           "engines": {
958
+               "node": ">=8"
959
+           },
960
+           "funding": {
961
+               "url": "https://github.com/chalk/ansi-styles?sponsor=1"
962
+           }
963
+       },
964
+       "node_modules/anymatch": {
965
+           "version": "3.1.3",
966
+           "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",
967
+           "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",
968
+           "dev": true,
969
+           "dependencies": {
970
+               "normalize-path": "^3.0.0",
971
+               "picomatch": "^2.0.4"
972
+           },
973
+           "engines": {
974
+               "node": ">= 8"
975
+           }
976
+       },
977
+       "node_modules/argparse": {
978
+           "version": "2.0.1",
979
+           "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
980
+           "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
981
+           "dev": true
982
+       },
983
+       "node_modules/aria-query": {
984
+           "version": "5.3.0",
985
+           "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.0.tgz",
986
+           "integrity": "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==",
987
+           "dev": true,
988
+           "dependencies": {
989
+               "dequal": "^2.0.3"
990
+           }
991
+       },
992
+       "node_modules/array-union": {
993
+           "version": "2.1.0",
994
+           "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz",
995
+           "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==",
996
+           "dev": true,
997
+           "engines": {
998
+               "node": ">=8"
999
+           }
1000
+       },
1001
+       "node_modules/axobject-query": {
1002
+           "version": "3.2.1",
1003
+           "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-3.2.1.tgz",
1004
+           "integrity": "sha512-jsyHu61e6N4Vbz/v18DHwWYKK0bSWLqn47eeDSKPB7m8tqMHF9YJ+mhIk2lVteyZrY8tnSj/jHOv4YiTCuCJgg==",
1005
+           "dev": true,
1006
+           "dependencies": {
1007
+               "dequal": "^2.0.3"
1008
+           }
1009
+       },
1010
+       "node_modules/balanced-match": {
1011
+           "version": "1.0.2",
1012
+           "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
1013
+           "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
1014
+           "dev": true
1015
+       },
1016
+       "node_modules/binary-extensions": {
1017
+           "version": "2.2.0",
1018
+           "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
1019
+           "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==",
1020
+           "dev": true,
1021
+           "engines": {
1022
+               "node": ">=8"
1023
+           }
1024
+       },
1025
+       "node_modules/brace-expansion": {
1026
+           "version": "1.1.11",
1027
+           "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
1028
+           "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
1029
+           "dev": true,
1030
+           "dependencies": {
1031
+               "balanced-match": "^1.0.0",
1032
+               "concat-map": "0.0.1"
1033
+           }
1034
+       },
1035
+       "node_modules/braces": {
1036
+           "version": "3.0.2",
1037
+           "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
1038
+           "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
1039
+           "dev": true,
1040
+           "dependencies": {
1041
+               "fill-range": "^7.0.1"
1042
+           },
1043
+           "engines": {
1044
+               "node": ">=8"
1045
+           }
1046
+       },
1047
+       "node_modules/buffer-crc32": {
1048
+           "version": "0.2.13",
1049
+           "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz",
1050
+           "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==",
1051
+           "dev": true,
1052
+           "engines": {
1053
+               "node": "*"
1054
+           }
1055
+       },
1056
+       "node_modules/callsites": {
1057
+           "version": "3.1.0",
1058
+           "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
1059
+           "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==",
1060
+           "dev": true,
1061
+           "engines": {
1062
+               "node": ">=6"
1063
+           }
1064
+       },
1065
+       "node_modules/chalk": {
1066
+           "version": "4.1.2",
1067
+           "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
1068
+           "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
1069
+           "dev": true,
1070
+           "dependencies": {
1071
+               "ansi-styles": "^4.1.0",
1072
+               "supports-color": "^7.1.0"
1073
+           },
1074
+           "engines": {
1075
+               "node": ">=10"
1076
+           },
1077
+           "funding": {
1078
+               "url": "https://github.com/chalk/chalk?sponsor=1"
1079
+           }
1080
+       },
1081
+       "node_modules/chokidar": {
1082
+           "version": "3.5.3",
1083
+           "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz",
1084
+           "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==",
1085
+           "dev": true,
1086
+           "funding": 
1087
+               {
1088
+                   "type": "individual",
1089
+                   "url": "https://paulmillr.com/funding/"
1090
+               }
1091
+           ,
1092
+           "dependencies": {
1093
+               "anymatch": "~3.1.2",
1094
+               "braces": "~3.0.2",
1095
+               "glob-parent": "~5.1.2",
1096
+               "is-binary-path": "~2.1.0",
1097
+               "is-glob": "~4.0.1",
1098
+               "normalize-path": "~3.0.0",
1099
+               "readdirp": "~3.6.0"
1100
+           },
1101
+           "engines": {
1102
+               "node": ">= 8.10.0"
1103
+           },
1104
+           "optionalDependencies": {
1105
+               "fsevents": "~2.3.2"
1106
+           }
1107
+       },
1108
+       "node_modules/chokidar/node_modules/glob-parent": {
1109
+           "version": "5.1.2",
1110
+           "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
1111
+           "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
1112
+           "dev": true,
1113
+           "dependencies": {
1114
+               "is-glob": "^4.0.1"
1115
+           },
1116
+           "engines": {
1117
+               "node": ">= 6"
1118
+           }
1119
+       },
1120
+       "node_modules/code-red": {
1121
+           "version": "1.0.4",
1122
+           "resolved": "https://registry.npmjs.org/code-red/-/code-red-1.0.4.tgz",
1123
+           "integrity": "sha512-7qJWqItLA8/VPVlKJlFXU+NBlo/qyfs39aJcuMT/2ere32ZqvF5OSxgdM5xOfJJ7O429gg2HM47y8v9P+9wrNw==",
1124
+           "dev": true,
1125
+           "dependencies": {
1126
+               "@jridgewell/sourcemap-codec": "^1.4.15",
1127
+               "@types/estree": "^1.0.1",
1128
+               "acorn": "^8.10.0",
1129
+               "estree-walker": "^3.0.3",
1130
+               "periscopic": "^3.1.0"
1131
+           }
1132
+       },
1133
+       "node_modules/color-convert": {
1134
+           "version": "2.0.1",
1135
+           "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
1136
+           "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
1137
+           "dev": true,
1138
+           "dependencies": {
1139
+               "color-name": "~1.1.4"
1140
+           },
1141
+           "engines": {
1142
+               "node": ">=7.0.0"
1143
+           }
1144
+       },
1145
+       "node_modules/color-name": {
1146
+           "version": "1.1.4",
1147
+           "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
1148
+           "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
1149
+           "dev": true
1150
+       },
1151
+       "node_modules/concat-map": {
1152
+           "version": "0.0.1",
1153
+           "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
1154
+           "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
1155
+           "dev": true
1156
+       },
1157
+       "node_modules/cookie": {
1158
+           "version": "0.5.0",
1159
+           "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz",
1160
+           "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==",
1161
+           "dev": true,
1162
+           "engines": {
1163
+               "node": ">= 0.6"
1164
+           }
1165
+       },
1166
+       "node_modules/cross-spawn": {
1167
+           "version": "7.0.3",
1168
+           "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
1169
+           "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
1170
+           "dev": true,
1171
+           "dependencies": {
1172
+               "path-key": "^3.1.0",
1173
+               "shebang-command": "^2.0.0",
1174
+               "which": "^2.0.1"
1175
+           },
1176
+           "engines": {
1177
+               "node": ">= 8"
1178
+           }
1179
+       },
1180
+       "node_modules/css-tree": {
1181
+           "version": "2.3.1",
1182
+           "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.3.1.tgz",
1183
+           "integrity": "sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==",
1184
+           "dev": true,
1185
+           "dependencies": {
1186
+               "mdn-data": "2.0.30",
1187
+               "source-map-js": "^1.0.1"
1188
+           },
1189
+           "engines": {
1190
+               "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0"
1191
+           }
1192
+       },
1193
+       "node_modules/cssesc": {
1194
+           "version": "3.0.0",
1195
+           "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz",
1196
+           "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==",
1197
+           "dev": true,
1198
+           "bin": {
1199
+               "cssesc": "bin/cssesc"
1200
+           },
1201
+           "engines": {
1202
+               "node": ">=4"
1203
+           }
1204
+       },
1205
+       "node_modules/debug": {
1206
+           "version": "4.3.4",
1207
+           "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
1208
+           "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
1209
+           "dev": true,
1210
+           "dependencies": {
1211
+               "ms": "2.1.2"
1212
+           },
1213
+           "engines": {
1214
+               "node": ">=6.0"
1215
+           },
1216
+           "peerDependenciesMeta": {
1217
+               "supports-color": {
1218
+                   "optional": true
1219
+               }
1220
+           }
1221
+       },
1222
+       "node_modules/deep-is": {
1223
+           "version": "0.1.4",
1224
+           "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz",
1225
+           "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==",
1226
+           "dev": true
1227
+       },
1228
+       "node_modules/deepmerge": {
1229
+           "version": "4.3.1",
1230
+           "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz",
1231
+           "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==",
1232
+           "dev": true,
1233
+           "engines": {
1234
+               "node": ">=0.10.0"
1235
+           }
1236
+       },
1237
+       "node_modules/dequal": {
1238
+           "version": "2.0.3",
1239
+           "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz",
1240
+           "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==",
1241
+           "dev": true,
1242
+           "engines": {
1243
+               "node": ">=6"
1244
+           }
1245
+       },
1246
+       "node_modules/detect-indent": {
1247
+           "version": "6.1.0",
1248
+           "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-6.1.0.tgz",
1249
+           "integrity": "sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==",
1250
+           "dev": true,
1251
+           "engines": {
1252
+               "node": ">=8"
1253
+           }
1254
+       },
1255
+       "node_modules/devalue": {
1256
+           "version": "4.3.2",
1257
+           "resolved": "https://registry.npmjs.org/devalue/-/devalue-4.3.2.tgz",
1258
+           "integrity": "sha512-KqFl6pOgOW+Y6wJgu80rHpo2/3H07vr8ntR9rkkFIRETewbf5GaYYcakYfiKz89K+sLsuPkQIZaXDMjUObZwWg==",
1259
+           "dev": true
1260
+       },
1261
+       "node_modules/dir-glob": {
1262
+           "version": "3.0.1",
1263
+           "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz",
1264
+           "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==",
1265
+           "dev": true,
1266
+           "dependencies": {
1267
+               "path-type": "^4.0.0"
1268
+           },
1269
+           "engines": {
1270
+               "node": ">=8"
1271
+           }
1272
+       },
1273
+       "node_modules/doctrine": {
1274
+           "version": "3.0.0",
1275
+           "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz",
1276
+           "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==",
1277
+           "dev": true,
1278
+           "dependencies": {
1279
+               "esutils": "^2.0.2"
1280
+           },
1281
+           "engines": {
1282
+               "node": ">=6.0.0"
1283
+           }
1284
+       },
1285
+       "node_modules/es6-promise": {
1286
+           "version": "3.3.1",
1287
+           "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz",
1288
+           "integrity": "sha512-SOp9Phqvqn7jtEUxPWdWfWoLmyt2VaJ6MpvP9Comy1MceMXqE6bxvaTu4iaxpYYPzhny28Lc+M87/c2cPK6lDg==",
1289
+           "dev": true
1290
+       },
1291
+       "node_modules/esbuild": {
1292
+           "version": "0.18.20",
1293
+           "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.20.tgz",
1294
+           "integrity": "sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==",
1295
+           "dev": true,
1296
+           "hasInstallScript": true,
1297
+           "bin": {
1298
+               "esbuild": "bin/esbuild"
1299
+           },
1300
+           "engines": {
1301
+               "node": ">=12"
1302
+           },
1303
+           "optionalDependencies": {
1304
+               "@esbuild/android-arm": "0.18.20",
1305
+               "@esbuild/android-arm64": "0.18.20",
1306
+               "@esbuild/android-x64": "0.18.20",
1307
+               "@esbuild/darwin-arm64": "0.18.20",
1308
+               "@esbuild/darwin-x64": "0.18.20",
1309
+               "@esbuild/freebsd-arm64": "0.18.20",
1310
+               "@esbuild/freebsd-x64": "0.18.20",
1311
+               "@esbuild/linux-arm": "0.18.20",
1312
+               "@esbuild/linux-arm64": "0.18.20",
1313
+               "@esbuild/linux-ia32": "0.18.20",
1314
+               "@esbuild/linux-loong64": "0.18.20",
1315
+               "@esbuild/linux-mips64el": "0.18.20",
1316
+               "@esbuild/linux-ppc64": "0.18.20",
1317
+               "@esbuild/linux-riscv64": "0.18.20",
1318
+               "@esbuild/linux-s390x": "0.18.20",
1319
+               "@esbuild/linux-x64": "0.18.20",
1320
+               "@esbuild/netbsd-x64": "0.18.20",
1321
+               "@esbuild/openbsd-x64": "0.18.20",
1322
+               "@esbuild/sunos-x64": "0.18.20",
1323
+               "@esbuild/win32-arm64": "0.18.20",
1324
+               "@esbuild/win32-ia32": "0.18.20",
1325
+               "@esbuild/win32-x64": "0.18.20"
1326
+           }
1327
+       },
1328
+       "node_modules/escape-string-regexp": {
1329
+           "version": "4.0.0",
1330
+           "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
1331
+           "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",
1332
+           "dev": true,
1333
+           "engines": {
1334
+               "node": ">=10"
1335
+           },
1336
+           "funding": {
1337
+               "url": "https://github.com/sponsors/sindresorhus"
1338
+           }
1339
+       },
1340
+       "node_modules/eslint": {
1341
+           "version": "8.50.0",
1342
+           "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.50.0.tgz",
1343
+           "integrity": "sha512-FOnOGSuFuFLv/Sa+FDVRZl4GGVAAFFi8LecRsI5a1tMO5HIE8nCm4ivAlzt4dT3ol/PaaGC0rJEEXQmHJBGoOg==",
1344
+           "dev": true,
1345
+           "dependencies": {
1346
+               "@eslint-community/eslint-utils": "^4.2.0",
1347
+               "@eslint-community/regexpp": "^4.6.1",
1348
+               "@eslint/eslintrc": "^2.1.2",
1349
+               "@eslint/js": "8.50.0",
1350
+               "@humanwhocodes/config-array": "^0.11.11",
1351
+               "@humanwhocodes/module-importer": "^1.0.1",
1352
+               "@nodelib/fs.walk": "^1.2.8",
1353
+               "ajv": "^6.12.4",
1354
+               "chalk": "^4.0.0",
1355
+               "cross-spawn": "^7.0.2",
1356
+               "debug": "^4.3.2",
1357
+               "doctrine": "^3.0.0",
1358
+               "escape-string-regexp": "^4.0.0",
1359
+               "eslint-scope": "^7.2.2",
1360
+               "eslint-visitor-keys": "^3.4.3",
1361
+               "espree": "^9.6.1",
1362
+               "esquery": "^1.4.2",
1363
+               "esutils": "^2.0.2",
1364
+               "fast-deep-equal": "^3.1.3",
1365
+               "file-entry-cache": "^6.0.1",
1366
+               "find-up": "^5.0.0",
1367
+               "glob-parent": "^6.0.2",
1368
+               "globals": "^13.19.0",
1369
+               "graphemer": "^1.4.0",
1370
+               "ignore": "^5.2.0",
1371
+               "imurmurhash": "^0.1.4",
1372
+               "is-glob": "^4.0.0",
1373
+               "is-path-inside": "^3.0.3",
1374
+               "js-yaml": "^4.1.0",
1375
+               "json-stable-stringify-without-jsonify": "^1.0.1",
1376
+               "levn": "^0.4.1",
1377
+               "lodash.merge": "^4.6.2",
1378
+               "minimatch": "^3.1.2",
1379
+               "natural-compare": "^1.4.0",
1380
+               "optionator": "^0.9.3",
1381
+               "strip-ansi": "^6.0.1",
1382
+               "text-table": "^0.2.0"
1383
+           },
1384
+           "bin": {
1385
+               "eslint": "bin/eslint.js"
1386
+           },
1387
+           "engines": {
1388
+               "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
1389
+           },
1390
+           "funding": {
1391
+               "url": "https://opencollective.com/eslint"
1392
+           }
1393
+       },
1394
+       "node_modules/eslint-config-prettier": {
1395
+           "version": "8.10.0",
1396
+           "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.10.0.tgz",
1397
+           "integrity": "sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg==",
1398
+           "dev": true,
1399
+           "bin": {
1400
+               "eslint-config-prettier": "bin/cli.js"
1401
+           },
1402
+           "peerDependencies": {
1403
+               "eslint": ">=7.0.0"
1404
+           }
1405
+       },
1406
+       "node_modules/eslint-plugin-svelte": {
1407
+           "version": "2.34.0",
1408
+           "resolved": "https://registry.npmjs.org/eslint-plugin-svelte/-/eslint-plugin-svelte-2.34.0.tgz",
1409
+           "integrity": "sha512-4RYUgNai7wr0v+T/kljMiYSjC/oqwgq5i+cPppawryAayj4C7WK1ixFlWCGmNmBppnoKCl4iA4ZPzPtlHcb4CA==",
1410
+           "dev": true,
1411
+           "dependencies": {
1412
+               "@eslint-community/eslint-utils": "^4.2.0",
1413
+               "@jridgewell/sourcemap-codec": "^1.4.14",
1414
+               "debug": "^4.3.1",
1415
+               "esutils": "^2.0.3",
1416
+               "known-css-properties": "^0.28.0",
1417
+               "postcss": "^8.4.5",
1418
+               "postcss-load-config": "^3.1.4",
1419
+               "postcss-safe-parser": "^6.0.0",
1420
+               "postcss-selector-parser": "^6.0.11",
1421
+               "semver": "^7.5.3",
1422
+               "svelte-eslint-parser": ">=0.33.0 <1.0.0"
1423
+           },
1424
+           "engines": {
1425
+               "node": "^14.17.0 || >=16.0.0"
1426
+           },
1427
+           "funding": {
1428
+               "url": "https://github.com/sponsors/ota-meshi"
1429
+           },
1430
+           "peerDependencies": {
1431
+               "eslint": "^7.0.0 || ^8.0.0-0",
1432
+               "svelte": "^3.37.0 || ^4.0.0"
1433
+           },
1434
+           "peerDependenciesMeta": {
1435
+               "svelte": {
1436
+                   "optional": true
1437
+               }
1438
+           }
1439
+       },
1440
+       "node_modules/eslint-scope": {
1441
+           "version": "7.2.2",
1442
+           "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz",
1443
+           "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==",
1444
+           "dev": true,
1445
+           "dependencies": {
1446
+               "esrecurse": "^4.3.0",
1447
+               "estraverse": "^5.2.0"
1448
+           },
1449
+           "engines": {
1450
+               "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
1451
+           },
1452
+           "funding": {
1453
+               "url": "https://opencollective.com/eslint"
1454
+           }
1455
+       },
1456
+       "node_modules/eslint-visitor-keys": {
1457
+           "version": "3.4.3",
1458
+           "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz",
1459
+           "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==",
1460
+           "dev": true,
1461
+           "engines": {
1462
+               "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
1463
+           },
1464
+           "funding": {
1465
+               "url": "https://opencollective.com/eslint"
1466
+           }
1467
+       },
1468
+       "node_modules/esm-env": {
1469
+           "version": "1.0.0",
1470
+           "resolved": "https://registry.npmjs.org/esm-env/-/esm-env-1.0.0.tgz",
1471
+           "integrity": "sha512-Cf6VksWPsTuW01vU9Mk/3vRue91Zevka5SjyNf3nEpokFRuqt/KjUQoGAwq9qMmhpLTHmXzSIrFRw8zxWzmFBA==",
1472
+           "dev": true
1473
+       },
1474
+       "node_modules/espree": {
1475
+           "version": "9.6.1",
1476
+           "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz",
1477
+           "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==",
1478
+           "dev": true,
1479
+           "dependencies": {
1480
+               "acorn": "^8.9.0",
1481
+               "acorn-jsx": "^5.3.2",
1482
+               "eslint-visitor-keys": "^3.4.1"
1483
+           },
1484
+           "engines": {
1485
+               "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
1486
+           },
1487
+           "funding": {
1488
+               "url": "https://opencollective.com/eslint"
1489
+           }
1490
+       },
1491
+       "node_modules/esquery": {
1492
+           "version": "1.5.0",
1493
+           "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz",
1494
+           "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==",
1495
+           "dev": true,
1496
+           "dependencies": {
1497
+               "estraverse": "^5.1.0"
1498
+           },
1499
+           "engines": {
1500
+               "node": ">=0.10"
1501
+           }
1502
+       },
1503
+       "node_modules/esrecurse": {
1504
+           "version": "4.3.0",
1505
+           "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz",
1506
+           "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==",
1507
+           "dev": true,
1508
+           "dependencies": {
1509
+               "estraverse": "^5.2.0"
1510
+           },
1511
+           "engines": {
1512
+               "node": ">=4.0"
1513
+           }
1514
+       },
1515
+       "node_modules/estraverse": {
1516
+           "version": "5.3.0",
1517
+           "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz",
1518
+           "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==",
1519
+           "dev": true,
1520
+           "engines": {
1521
+               "node": ">=4.0"
1522
+           }
1523
+       },
1524
+       "node_modules/estree-walker": {
1525
+           "version": "3.0.3",
1526
+           "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz",
1527
+           "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==",
1528
+           "dev": true,
1529
+           "dependencies": {
1530
+               "@types/estree": "^1.0.0"
1531
+           }
1532
+       },
1533
+       "node_modules/esutils": {
1534
+           "version": "2.0.3",
1535
+           "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
1536
+           "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
1537
+           "dev": true,
1538
+           "engines": {
1539
+               "node": ">=0.10.0"
1540
+           }
1541
+       },
1542
+       "node_modules/fast-deep-equal": {
1543
+           "version": "3.1.3",
1544
+           "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
1545
+           "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
1546
+           "dev": true
1547
+       },
1548
+       "node_modules/fast-glob": {
1549
+           "version": "3.3.1",
1550
+           "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz",
1551
+           "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==",
1552
+           "dev": true,
1553
+           "dependencies": {
1554
+               "@nodelib/fs.stat": "^2.0.2",
1555
+               "@nodelib/fs.walk": "^1.2.3",
1556
+               "glob-parent": "^5.1.2",
1557
+               "merge2": "^1.3.0",
1558
+               "micromatch": "^4.0.4"
1559
+           },
1560
+           "engines": {
1561
+               "node": ">=8.6.0"
1562
+           }
1563
+       },
1564
+       "node_modules/fast-glob/node_modules/glob-parent": {
1565
+           "version": "5.1.2",
1566
+           "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
1567
+           "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
1568
+           "dev": true,
1569
+           "dependencies": {
1570
+               "is-glob": "^4.0.1"
1571
+           },
1572
+           "engines": {
1573
+               "node": ">= 6"
1574
+           }
1575
+       },
1576
+       "node_modules/fast-json-stable-stringify": {
1577
+           "version": "2.1.0",
1578
+           "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
1579
+           "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==",
1580
+           "dev": true
1581
+       },
1582
+       "node_modules/fast-levenshtein": {
1583
+           "version": "2.0.6",
1584
+           "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
1585
+           "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==",
1586
+           "dev": true
1587
+       },
1588
+       "node_modules/fastq": {
1589
+           "version": "1.15.0",
1590
+           "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz",
1591
+           "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==",
1592
+           "dev": true,
1593
+           "dependencies": {
1594
+               "reusify": "^1.0.4"
1595
+           }
1596
+       },
1597
+       "node_modules/file-entry-cache": {
1598
+           "version": "6.0.1",
1599
+           "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz",
1600
+           "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==",
1601
+           "dev": true,
1602
+           "dependencies": {
1603
+               "flat-cache": "^3.0.4"
1604
+           },
1605
+           "engines": {
1606
+               "node": "^10.12.0 || >=12.0.0"
1607
+           }
1608
+       },
1609
+       "node_modules/fill-range": {
1610
+           "version": "7.0.1",
1611
+           "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
1612
+           "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
1613
+           "dev": true,
1614
+           "dependencies": {
1615
+               "to-regex-range": "^5.0.1"
1616
+           },
1617
+           "engines": {
1618
+               "node": ">=8"
1619
+           }
1620
+       },
1621
+       "node_modules/find-up": {
1622
+           "version": "5.0.0",
1623
+           "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",
1624
+           "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==",
1625
+           "dev": true,
1626
+           "dependencies": {
1627
+               "locate-path": "^6.0.0",
1628
+               "path-exists": "^4.0.0"
1629
+           },
1630
+           "engines": {
1631
+               "node": ">=10"
1632
+           },
1633
+           "funding": {
1634
+               "url": "https://github.com/sponsors/sindresorhus"
1635
+           }
1636
+       },
1637
+       "node_modules/flat-cache": {
1638
+           "version": "3.1.0",
1639
+           "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.1.0.tgz",
1640
+           "integrity": "sha512-OHx4Qwrrt0E4jEIcI5/Xb+f+QmJYNj2rrK8wiIdQOIrB9WrrJL8cjZvXdXuBTkkEwEqLycb5BeZDV1o2i9bTew==",
1641
+           "dev": true,
1642
+           "dependencies": {
1643
+               "flatted": "^3.2.7",
1644
+               "keyv": "^4.5.3",
1645
+               "rimraf": "^3.0.2"
1646
+           },
1647
+           "engines": {
1648
+               "node": ">=12.0.0"
1649
+           }
1650
+       },
1651
+       "node_modules/flatted": {
1652
+           "version": "3.2.9",
1653
+           "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.9.tgz",
1654
+           "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==",
1655
+           "dev": true
1656
+       },
1657
+       "node_modules/fs.realpath": {
1658
+           "version": "1.0.0",
1659
+           "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
1660
+           "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==",
1661
+           "dev": true
1662
+       },
1663
+       "node_modules/fsevents": {
1664
+           "version": "2.3.3",
1665
+           "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
1666
+           "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
1667
+           "dev": true,
1668
+           "hasInstallScript": true,
1669
+           "optional": true,
1670
+           "os": 
1671
+               "darwin"
1672
+           ,
1673
+           "engines": {
1674
+               "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
1675
+           }
1676
+       },
1677
+       "node_modules/glob": {
1678
+           "version": "7.2.3",
1679
+           "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
1680
+           "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
1681
+           "dev": true,
1682
+           "dependencies": {
1683
+               "fs.realpath": "^1.0.0",
1684
+               "inflight": "^1.0.4",
1685
+               "inherits": "2",
1686
+               "minimatch": "^3.1.1",
1687
+               "once": "^1.3.0",
1688
+               "path-is-absolute": "^1.0.0"
1689
+           },
1690
+           "engines": {
1691
+               "node": "*"
1692
+           },
1693
+           "funding": {
1694
+               "url": "https://github.com/sponsors/isaacs"
1695
+           }
1696
+       },
1697
+       "node_modules/glob-parent": {
1698
+           "version": "6.0.2",
1699
+           "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz",
1700
+           "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==",
1701
+           "dev": true,
1702
+           "dependencies": {
1703
+               "is-glob": "^4.0.3"
1704
+           },
1705
+           "engines": {
1706
+               "node": ">=10.13.0"
1707
+           }
1708
+       },
1709
+       "node_modules/globals": {
1710
+           "version": "13.22.0",
1711
+           "resolved": "https://registry.npmjs.org/globals/-/globals-13.22.0.tgz",
1712
+           "integrity": "sha512-H1Ddc/PbZHTDVJSnj8kWptIRSD6AM3pK+mKytuIVF4uoBV7rshFlhhvA58ceJ5wp3Er58w6zj7bykMpYXt3ETw==",
1713
+           "dev": true,
1714
+           "dependencies": {
1715
+               "type-fest": "^0.20.2"
1716
+           },
1717
+           "engines": {
1718
+               "node": ">=8"
1719
+           },
1720
+           "funding": {
1721
+               "url": "https://github.com/sponsors/sindresorhus"
1722
+           }
1723
+       },
1724
+       "node_modules/globalyzer": {
1725
+           "version": "0.1.0",
1726
+           "resolved": "https://registry.npmjs.org/globalyzer/-/globalyzer-0.1.0.tgz",
1727
+           "integrity": "sha512-40oNTM9UfG6aBmuKxk/giHn5nQ8RVz/SS4Ir6zgzOv9/qC3kKZ9v4etGTcJbEl/NyVQH7FGU7d+X1egr57Md2Q==",
1728
+           "dev": true
1729
+       },
1730
+       "node_modules/globby": {
1731
+           "version": "11.1.0",
1732
+           "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz",
1733
+           "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==",
1734
+           "dev": true,
1735
+           "dependencies": {
1736
+               "array-union": "^2.1.0",
1737
+               "dir-glob": "^3.0.1",
1738
+               "fast-glob": "^3.2.9",
1739
+               "ignore": "^5.2.0",
1740
+               "merge2": "^1.4.1",
1741
+               "slash": "^3.0.0"
1742
+           },
1743
+           "engines": {
1744
+               "node": ">=10"
1745
+           },
1746
+           "funding": {
1747
+               "url": "https://github.com/sponsors/sindresorhus"
1748
+           }
1749
+       },
1750
+       "node_modules/globrex": {
1751
+           "version": "0.1.2",
1752
+           "resolved": "https://registry.npmjs.org/globrex/-/globrex-0.1.2.tgz",
1753
+           "integrity": "sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==",
1754
+           "dev": true
1755
+       },
1756
+       "node_modules/graceful-fs": {
1757
+           "version": "4.2.11",
1758
+           "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz",
1759
+           "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==",
1760
+           "dev": true
1761
+       },
1762
+       "node_modules/graphemer": {
1763
+           "version": "1.4.0",
1764
+           "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz",
1765
+           "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==",
1766
+           "dev": true
1767
+       },
1768
+       "node_modules/has-flag": {
1769
+           "version": "4.0.0",
1770
+           "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
1771
+           "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
1772
+           "dev": true,
1773
+           "engines": {
1774
+               "node": ">=8"
1775
+           }
1776
+       },
1777
+       "node_modules/ignore": {
1778
+           "version": "5.2.4",
1779
+           "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz",
1780
+           "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==",
1781
+           "dev": true,
1782
+           "engines": {
1783
+               "node": ">= 4"
1784
+           }
1785
+       },
1786
+       "node_modules/import-fresh": {
1787
+           "version": "3.3.0",
1788
+           "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz",
1789
+           "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==",
1790
+           "dev": true,
1791
+           "dependencies": {
1792
+               "parent-module": "^1.0.0",
1793
+               "resolve-from": "^4.0.0"
1794
+           },
1795
+           "engines": {
1796
+               "node": ">=6"
1797
+           },
1798
+           "funding": {
1799
+               "url": "https://github.com/sponsors/sindresorhus"
1800
+           }
1801
+       },
1802
+       "node_modules/imurmurhash": {
1803
+           "version": "0.1.4",
1804
+           "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
1805
+           "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==",
1806
+           "dev": true,
1807
+           "engines": {
1808
+               "node": ">=0.8.19"
1809
+           }
1810
+       },
1811
+       "node_modules/inflight": {
1812
+           "version": "1.0.6",
1813
+           "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
1814
+           "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
1815
+           "dev": true,
1816
+           "dependencies": {
1817
+               "once": "^1.3.0",
1818
+               "wrappy": "1"
1819
+           }
1820
+       },
1821
+       "node_modules/inherits": {
1822
+           "version": "2.0.4",
1823
+           "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
1824
+           "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
1825
+           "dev": true
1826
+       },
1827
+       "node_modules/is-binary-path": {
1828
+           "version": "2.1.0",
1829
+           "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
1830
+           "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
1831
+           "dev": true,
1832
+           "dependencies": {
1833
+               "binary-extensions": "^2.0.0"
1834
+           },
1835
+           "engines": {
1836
+               "node": ">=8"
1837
+           }
1838
+       },
1839
+       "node_modules/is-extglob": {
1840
+           "version": "2.1.1",
1841
+           "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
1842
+           "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
1843
+           "dev": true,
1844
+           "engines": {
1845
+               "node": ">=0.10.0"
1846
+           }
1847
+       },
1848
+       "node_modules/is-glob": {
1849
+           "version": "4.0.3",
1850
+           "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
1851
+           "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
1852
+           "dev": true,
1853
+           "dependencies": {
1854
+               "is-extglob": "^2.1.1"
1855
+           },
1856
+           "engines": {
1857
+               "node": ">=0.10.0"
1858
+           }
1859
+       },
1860
+       "node_modules/is-number": {
1861
+           "version": "7.0.0",
1862
+           "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
1863
+           "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
1864
+           "dev": true,
1865
+           "engines": {
1866
+               "node": ">=0.12.0"
1867
+           }
1868
+       },
1869
+       "node_modules/is-path-inside": {
1870
+           "version": "3.0.3",
1871
+           "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz",
1872
+           "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==",
1873
+           "dev": true,
1874
+           "engines": {
1875
+               "node": ">=8"
1876
+           }
1877
+       },
1878
+       "node_modules/is-reference": {
1879
+           "version": "3.0.2",
1880
+           "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-3.0.2.tgz",
1881
+           "integrity": "sha512-v3rht/LgVcsdZa3O2Nqs+NMowLOxeOm7Ay9+/ARQ2F+qEoANRcqrjAZKGN0v8ymUetZGgkp26LTnGT7H0Qo9Pg==",
1882
+           "dev": true,
1883
+           "dependencies": {
1884
+               "@types/estree": "*"
1885
+           }
1886
+       },
1887
+       "node_modules/isexe": {
1888
+           "version": "2.0.0",
1889
+           "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
1890
+           "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",
1891
+           "dev": true
1892
+       },
1893
+       "node_modules/js-yaml": {
1894
+           "version": "4.1.0",
1895
+           "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
1896
+           "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
1897
+           "dev": true,
1898
+           "dependencies": {
1899
+               "argparse": "^2.0.1"
1900
+           },
1901
+           "bin": {
1902
+               "js-yaml": "bin/js-yaml.js"
1903
+           }
1904
+       },
1905
+       "node_modules/json-buffer": {
1906
+           "version": "3.0.1",
1907
+           "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz",
1908
+           "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==",
1909
+           "dev": true
1910
+       },
1911
+       "node_modules/json-schema-traverse": {
1912
+           "version": "0.4.1",
1913
+           "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
1914
+           "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
1915
+           "dev": true
1916
+       },
1917
+       "node_modules/json-stable-stringify-without-jsonify": {
1918
+           "version": "1.0.1",
1919
+           "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz",
1920
+           "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==",
1921
+           "dev": true
1922
+       },
1923
+       "node_modules/keyv": {
1924
+           "version": "4.5.3",
1925
+           "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.3.tgz",
1926
+           "integrity": "sha512-QCiSav9WaX1PgETJ+SpNnx2PRRapJ/oRSXM4VO5OGYGSjrxbKPVFVhB3l2OCbLCk329N8qyAtsJjSjvVBWzEug==",
1927
+           "dev": true,
1928
+           "dependencies": {
1929
+               "json-buffer": "3.0.1"
1930
+           }
1931
+       },
1932
+       "node_modules/kleur": {
1933
+           "version": "4.1.5",
1934
+           "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz",
1935
+           "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==",
1936
+           "dev": true,
1937
+           "engines": {
1938
+               "node": ">=6"
1939
+           }
1940
+       },
1941
+       "node_modules/known-css-properties": {
1942
+           "version": "0.28.0",
1943
+           "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.28.0.tgz",
1944
+           "integrity": "sha512-9pSL5XB4J+ifHP0e0jmmC98OGC1nL8/JjS+fi6mnTlIf//yt/MfVLtKg7S6nCtj/8KTcWX7nRlY0XywoYY1ISQ==",
1945
+           "dev": true
1946
+       },
1947
+       "node_modules/levn": {
1948
+           "version": "0.4.1",
1949
+           "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz",
1950
+           "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==",
1951
+           "dev": true,
1952
+           "dependencies": {
1953
+               "prelude-ls": "^1.2.1",
1954
+               "type-check": "~0.4.0"
1955
+           },
1956
+           "engines": {
1957
+               "node": ">= 0.8.0"
1958
+           }
1959
+       },
1960
+       "node_modules/lilconfig": {
1961
+           "version": "2.1.0",
1962
+           "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.1.0.tgz",
1963
+           "integrity": "sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==",
1964
+           "dev": true,
1965
+           "engines": {
1966
+               "node": ">=10"
1967
+           }
1968
+       },
1969
+       "node_modules/locate-character": {
1970
+           "version": "3.0.0",
1971
+           "resolved": "https://registry.npmjs.org/locate-character/-/locate-character-3.0.0.tgz",
1972
+           "integrity": "sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA==",
1973
+           "dev": true
1974
+       },
1975
+       "node_modules/locate-path": {
1976
+           "version": "6.0.0",
1977
+           "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
1978
+           "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==",
1979
+           "dev": true,
1980
+           "dependencies": {
1981
+               "p-locate": "^5.0.0"
1982
+           },
1983
+           "engines": {
1984
+               "node": ">=10"
1985
+           },
1986
+           "funding": {
1987
+               "url": "https://github.com/sponsors/sindresorhus"
1988
+           }
1989
+       },
1990
+       "node_modules/lodash.merge": {
1991
+           "version": "4.6.2",
1992
+           "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz",
1993
+           "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==",
1994
+           "dev": true
1995
+       },
1996
+       "node_modules/lru-cache": {
1997
+           "version": "6.0.0",
1998
+           "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
1999
+           "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
2000
+           "dev": true,
2001
+           "dependencies": {
2002
+               "yallist": "^4.0.0"
2003
+           },
2004
+           "engines": {
2005
+               "node": ">=10"
2006
+           }
2007
+       },
2008
+       "node_modules/magic-string": {
2009
+           "version": "0.30.4",
2010
+           "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.4.tgz",
2011
+           "integrity": "sha512-Q/TKtsC5BPm0kGqgBIF9oXAs/xEf2vRKiIB4wCRQTJOQIByZ1d+NnUOotvJOvNpi5RNIgVOMC3pOuaP1ZTDlVg==",
2012
+           "dev": true,
2013
+           "dependencies": {
2014
+               "@jridgewell/sourcemap-codec": "^1.4.15"
2015
+           },
2016
+           "engines": {
2017
+               "node": ">=12"
2018
+           }
2019
+       },
2020
+       "node_modules/mdn-data": {
2021
+           "version": "2.0.30",
2022
+           "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.30.tgz",
2023
+           "integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==",
2024
+           "dev": true
2025
+       },
2026
+       "node_modules/merge2": {
2027
+           "version": "1.4.1",
2028
+           "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
2029
+           "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==",
2030
+           "dev": true,
2031
+           "engines": {
2032
+               "node": ">= 8"
2033
+           }
2034
+       },
2035
+       "node_modules/micromatch": {
2036
+           "version": "4.0.5",
2037
+           "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz",
2038
+           "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==",
2039
+           "dev": true,
2040
+           "dependencies": {
2041
+               "braces": "^3.0.2",
2042
+               "picomatch": "^2.3.1"
2043
+           },
2044
+           "engines": {
2045
+               "node": ">=8.6"
2046
+           }
2047
+       },
2048
+       "node_modules/mime": {
2049
+           "version": "3.0.0",
2050
+           "resolved": "https://registry.npmjs.org/mime/-/mime-3.0.0.tgz",
2051
+           "integrity": "sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==",
2052
+           "dev": true,
2053
+           "bin": {
2054
+               "mime": "cli.js"
2055
+           },
2056
+           "engines": {
2057
+               "node": ">=10.0.0"
2058
+           }
2059
+       },
2060
+       "node_modules/min-indent": {
2061
+           "version": "1.0.1",
2062
+           "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz",
2063
+           "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==",
2064
+           "dev": true,
2065
+           "engines": {
2066
+               "node": ">=4"
2067
+           }
2068
+       },
2069
+       "node_modules/minimatch": {
2070
+           "version": "3.1.2",
2071
+           "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
2072
+           "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
2073
+           "dev": true,
2074
+           "dependencies": {
2075
+               "brace-expansion": "^1.1.7"
2076
+           },
2077
+           "engines": {
2078
+               "node": "*"
2079
+           }
2080
+       },
2081
+       "node_modules/minimist": {
2082
+           "version": "1.2.8",
2083
+           "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
2084
+           "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
2085
+           "dev": true,
2086
+           "funding": {
2087
+               "url": "https://github.com/sponsors/ljharb"
2088
+           }
2089
+       },
2090
+       "node_modules/mkdirp": {
2091
+           "version": "0.5.6",
2092
+           "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz",
2093
+           "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==",
2094
+           "dev": true,
2095
+           "dependencies": {
2096
+               "minimist": "^1.2.6"
2097
+           },
2098
+           "bin": {
2099
+               "mkdirp": "bin/cmd.js"
2100
+           }
2101
+       },
2102
+       "node_modules/mri": {
2103
+           "version": "1.2.0",
2104
+           "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz",
2105
+           "integrity": "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==",
2106
+           "dev": true,
2107
+           "engines": {
2108
+               "node": ">=4"
2109
+           }
2110
+       },
2111
+       "node_modules/mrmime": {
2112
+           "version": "1.0.1",
2113
+           "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-1.0.1.tgz",
2114
+           "integrity": "sha512-hzzEagAgDyoU1Q6yg5uI+AorQgdvMCur3FcKf7NhMKWsaYg+RnbTyHRa/9IlLF9rf455MOCtcqqrQQ83pPP7Uw==",
2115
+           "dev": true,
2116
+           "engines": {
2117
+               "node": ">=10"
2118
+           }
2119
+       },
2120
+       "node_modules/ms": {
2121
+           "version": "2.1.2",
2122
+           "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
2123
+           "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
2124
+           "dev": true
2125
+       },
2126
+       "node_modules/nanoid": {
2127
+           "version": "3.3.6",
2128
+           "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz",
2129
+           "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==",
2130
+           "dev": true,
2131
+           "funding": 
2132
+               {
2133
+                   "type": "github",
2134
+                   "url": "https://github.com/sponsors/ai"
2135
+               }
2136
+           ,
2137
+           "bin": {
2138
+               "nanoid": "bin/nanoid.cjs"
2139
+           },
2140
+           "engines": {
2141
+               "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
2142
+           }
2143
+       },
2144
+       "node_modules/natural-compare": {
2145
+           "version": "1.4.0",
2146
+           "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz",
2147
+           "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==",
2148
+           "dev": true
2149
+       },
2150
+       "node_modules/normalize-path": {
2151
+           "version": "3.0.0",
2152
+           "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
2153
+           "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
2154
+           "dev": true,
2155
+           "engines": {
2156
+               "node": ">=0.10.0"
2157
+           }
2158
+       },
2159
+       "node_modules/once": {
2160
+           "version": "1.4.0",
2161
+           "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
2162
+           "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
2163
+           "dev": true,
2164
+           "dependencies": {
2165
+               "wrappy": "1"
2166
+           }
2167
+       },
2168
+       "node_modules/optionator": {
2169
+           "version": "0.9.3",
2170
+           "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz",
2171
+           "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==",
2172
+           "dev": true,
2173
+           "dependencies": {
2174
+               "@aashutoshrathi/word-wrap": "^1.2.3",
2175
+               "deep-is": "^0.1.3",
2176
+               "fast-levenshtein": "^2.0.6",
2177
+               "levn": "^0.4.1",
2178
+               "prelude-ls": "^1.2.1",
2179
+               "type-check": "^0.4.0"
2180
+           },
2181
+           "engines": {
2182
+               "node": ">= 0.8.0"
2183
+           }
2184
+       },
2185
+       "node_modules/p-limit": {
2186
+           "version": "3.1.0",
2187
+           "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
2188
+           "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",
2189
+           "dev": true,
2190
+           "dependencies": {
2191
+               "yocto-queue": "^0.1.0"
2192
+           },
2193
+           "engines": {
2194
+               "node": ">=10"
2195
+           },
2196
+           "funding": {
2197
+               "url": "https://github.com/sponsors/sindresorhus"
2198
+           }
2199
+       },
2200
+       "node_modules/p-locate": {
2201
+           "version": "5.0.0",
2202
+           "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz",
2203
+           "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==",
2204
+           "dev": true,
2205
+           "dependencies": {
2206
+               "p-limit": "^3.0.2"
2207
+           },
2208
+           "engines": {
2209
+               "node": ">=10"
2210
+           },
2211
+           "funding": {
2212
+               "url": "https://github.com/sponsors/sindresorhus"
2213
+           }
2214
+       },
2215
+       "node_modules/parent-module": {
2216
+           "version": "1.0.1",
2217
+           "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
2218
+           "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==",
2219
+           "dev": true,
2220
+           "dependencies": {
2221
+               "callsites": "^3.0.0"
2222
+           },
2223
+           "engines": {
2224
+               "node": ">=6"
2225
+           }
2226
+       },
2227
+       "node_modules/path-exists": {
2228
+           "version": "4.0.0",
2229
+           "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
2230
+           "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
2231
+           "dev": true,
2232
+           "engines": {
2233
+               "node": ">=8"
2234
+           }
2235
+       },
2236
+       "node_modules/path-is-absolute": {
2237
+           "version": "1.0.1",
2238
+           "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
2239
+           "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==",
2240
+           "dev": true,
2241
+           "engines": {
2242
+               "node": ">=0.10.0"
2243
+           }
2244
+       },
2245
+       "node_modules/path-key": {
2246
+           "version": "3.1.1",
2247
+           "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
2248
+           "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
2249
+           "dev": true,
2250
+           "engines": {
2251
+               "node": ">=8"
2252
+           }
2253
+       },
2254
+       "node_modules/path-type": {
2255
+           "version": "4.0.0",
2256
+           "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz",
2257
+           "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==",
2258
+           "dev": true,
2259
+           "engines": {
2260
+               "node": ">=8"
2261
+           }
2262
+       },
2263
+       "node_modules/periscopic": {
2264
+           "version": "3.1.0",
2265
+           "resolved": "https://registry.npmjs.org/periscopic/-/periscopic-3.1.0.tgz",
2266
+           "integrity": "sha512-vKiQ8RRtkl9P+r/+oefh25C3fhybptkHKCZSPlcXiJux2tJF55GnEj3BVn4A5gKfq9NWWXXrxkHBwVPUfH0opw==",
2267
+           "dev": true,
2268
+           "dependencies": {
2269
+               "@types/estree": "^1.0.0",
2270
+               "estree-walker": "^3.0.0",
2271
+               "is-reference": "^3.0.0"
2272
+           }
2273
+       },
2274
+       "node_modules/picocolors": {
2275
+           "version": "1.0.0",
2276
+           "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
2277
+           "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==",
2278
+           "dev": true
2279
+       },
2280
+       "node_modules/picomatch": {
2281
+           "version": "2.3.1",
2282
+           "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
2283
+           "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
2284
+           "dev": true,
2285
+           "engines": {
2286
+               "node": ">=8.6"
2287
+           },
2288
+           "funding": {
2289
+               "url": "https://github.com/sponsors/jonschlinkert"
2290
+           }
2291
+       },
2292
+       "node_modules/postcss": {
2293
+           "version": "8.4.31",
2294
+           "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz",
2295
+           "integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==",
2296
+           "dev": true,
2297
+           "funding": 
2298
+               {
2299
+                   "type": "opencollective",
2300
+                   "url": "https://opencollective.com/postcss/"
2301
+               },
2302
+               {
2303
+                   "type": "tidelift",
2304
+                   "url": "https://tidelift.com/funding/github/npm/postcss"
2305
+               },
2306
+               {
2307
+                   "type": "github",
2308
+                   "url": "https://github.com/sponsors/ai"
2309
+               }
2310
+           ,
2311
+           "dependencies": {
2312
+               "nanoid": "^3.3.6",
2313
+               "picocolors": "^1.0.0",
2314
+               "source-map-js": "^1.0.2"
2315
+           },
2316
+           "engines": {
2317
+               "node": "^10 || ^12 || >=14"
2318
+           }
2319
+       },
2320
+       "node_modules/postcss-load-config": {
2321
+           "version": "3.1.4",
2322
+           "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-3.1.4.tgz",
2323
+           "integrity": "sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg==",
2324
+           "dev": true,
2325
+           "dependencies": {
2326
+               "lilconfig": "^2.0.5",
2327
+               "yaml": "^1.10.2"
2328
+           },
2329
+           "engines": {
2330
+               "node": ">= 10"
2331
+           },
2332
+           "funding": {
2333
+               "type": "opencollective",
2334
+               "url": "https://opencollective.com/postcss/"
2335
+           },
2336
+           "peerDependencies": {
2337
+               "postcss": ">=8.0.9",
2338
+               "ts-node": ">=9.0.0"
2339
+           },
2340
+           "peerDependenciesMeta": {
2341
+               "postcss": {
2342
+                   "optional": true
2343
+               },
2344
+               "ts-node": {
2345
+                   "optional": true
2346
+               }
2347
+           }
2348
+       },
2349
+       "node_modules/postcss-safe-parser": {
2350
+           "version": "6.0.0",
2351
+           "resolved": "https://registry.npmjs.org/postcss-safe-parser/-/postcss-safe-parser-6.0.0.tgz",
2352
+           "integrity": "sha512-FARHN8pwH+WiS2OPCxJI8FuRJpTVnn6ZNFiqAM2aeW2LwTHWWmWgIyKC6cUo0L8aeKiF/14MNvnpls6R2PBeMQ==",
2353
+           "dev": true,
2354
+           "engines": {
2355
+               "node": ">=12.0"
2356
+           },
2357
+           "funding": {
2358
+               "type": "opencollective",
2359
+               "url": "https://opencollective.com/postcss/"
2360
+           },
2361
+           "peerDependencies": {
2362
+               "postcss": "^8.3.3"
2363
+           }
2364
+       },
2365
+       "node_modules/postcss-scss": {
2366
+           "version": "4.0.9",
2367
+           "resolved": "https://registry.npmjs.org/postcss-scss/-/postcss-scss-4.0.9.tgz",
2368
+           "integrity": "sha512-AjKOeiwAitL/MXxQW2DliT28EKukvvbEWx3LBmJIRN8KfBGZbRTxNYW0kSqi1COiTZ57nZ9NW06S6ux//N1c9A==",
2369
+           "dev": true,
2370
+           "funding": 
2371
+               {
2372
+                   "type": "opencollective",
2373
+                   "url": "https://opencollective.com/postcss/"
2374
+               },
2375
+               {
2376
+                   "type": "tidelift",
2377
+                   "url": "https://tidelift.com/funding/github/npm/postcss-scss"
2378
+               },
2379
+               {
2380
+                   "type": "github",
2381
+                   "url": "https://github.com/sponsors/ai"
2382
+               }
2383
+           ,
2384
+           "engines": {
2385
+               "node": ">=12.0"
2386
+           },
2387
+           "peerDependencies": {
2388
+               "postcss": "^8.4.29"
2389
+           }
2390
+       },
2391
+       "node_modules/postcss-selector-parser": {
2392
+           "version": "6.0.13",
2393
+           "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.13.tgz",
2394
+           "integrity": "sha512-EaV1Gl4mUEV4ddhDnv/xtj7sxwrwxdetHdWUGnT4VJQf+4d05v6lHYZr8N573k5Z0BViss7BDhfWtKS3+sfAqQ==",
2395
+           "dev": true,
2396
+           "dependencies": {
2397
+               "cssesc": "^3.0.0",
2398
+               "util-deprecate": "^1.0.2"
2399
+           },
2400
+           "engines": {
2401
+               "node": ">=4"
2402
+           }
2403
+       },
2404
+       "node_modules/prelude-ls": {
2405
+           "version": "1.2.1",
2406
+           "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz",
2407
+           "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==",
2408
+           "dev": true,
2409
+           "engines": {
2410
+               "node": ">= 0.8.0"
2411
+           }
2412
+       },
2413
+       "node_modules/prettier": {
2414
+           "version": "2.8.8",
2415
+           "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz",
2416
+           "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==",
2417
+           "dev": true,
2418
+           "bin": {
2419
+               "prettier": "bin-prettier.js"
2420
+           },
2421
+           "engines": {
2422
+               "node": ">=10.13.0"
2423
+           },
2424
+           "funding": {
2425
+               "url": "https://github.com/prettier/prettier?sponsor=1"
2426
+           }
2427
+       },
2428
+       "node_modules/prettier-plugin-svelte": {
2429
+           "version": "2.10.1",
2430
+           "resolved": "https://registry.npmjs.org/prettier-plugin-svelte/-/prettier-plugin-svelte-2.10.1.tgz",
2431
+           "integrity": "sha512-Wlq7Z5v2ueCubWo0TZzKc9XHcm7TDxqcuzRuGd0gcENfzfT4JZ9yDlCbEgxWgiPmLHkBjfOtpAWkcT28MCDpUQ==",
2432
+           "dev": true,
2433
+           "peerDependencies": {
2434
+               "prettier": "^1.16.4 || ^2.0.0",
2435
+               "svelte": "^3.2.0 || ^4.0.0-next.0"
2436
+           }
2437
+       },
2438
+       "node_modules/punycode": {
2439
+           "version": "2.3.0",
2440
+           "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz",
2441
+           "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==",
2442
+           "dev": true,
2443
+           "engines": {
2444
+               "node": ">=6"
2445
+           }
2446
+       },
2447
+       "node_modules/queue-microtask": {
2448
+           "version": "1.2.3",
2449
+           "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",
2450
+           "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==",
2451
+           "dev": true,
2452
+           "funding": 
2453
+               {
2454
+                   "type": "github",
2455
+                   "url": "https://github.com/sponsors/feross"
2456
+               },
2457
+               {
2458
+                   "type": "patreon",
2459
+                   "url": "https://www.patreon.com/feross"
2460
+               },
2461
+               {
2462
+                   "type": "consulting",
2463
+                   "url": "https://feross.org/support"
2464
+               }
2465
+           
2466
+       },
2467
+       "node_modules/readdirp": {
2468
+           "version": "3.6.0",
2469
+           "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
2470
+           "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
2471
+           "dev": true,
2472
+           "dependencies": {
2473
+               "picomatch": "^2.2.1"
2474
+           },
2475
+           "engines": {
2476
+               "node": ">=8.10.0"
2477
+           }
2478
+       },
2479
+       "node_modules/resolve-from": {
2480
+           "version": "4.0.0",
2481
+           "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",
2482
+           "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==",
2483
+           "dev": true,
2484
+           "engines": {
2485
+               "node": ">=4"
2486
+           }
2487
+       },
2488
+       "node_modules/reusify": {
2489
+           "version": "1.0.4",
2490
+           "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz",
2491
+           "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==",
2492
+           "dev": true,
2493
+           "engines": {
2494
+               "iojs": ">=1.0.0",
2495
+               "node": ">=0.10.0"
2496
+           }
2497
+       },
2498
+       "node_modules/rimraf": {
2499
+           "version": "3.0.2",
2500
+           "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
2501
+           "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
2502
+           "dev": true,
2503
+           "dependencies": {
2504
+               "glob": "^7.1.3"
2505
+           },
2506
+           "bin": {
2507
+               "rimraf": "bin.js"
2508
+           },
2509
+           "funding": {
2510
+               "url": "https://github.com/sponsors/isaacs"
2511
+           }
2512
+       },
2513
+       "node_modules/rollup": {
2514
+           "version": "3.29.4",
2515
+           "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.29.4.tgz",
2516
+           "integrity": "sha512-oWzmBZwvYrU0iJHtDmhsm662rC15FRXmcjCk1xD771dFDx5jJ02ufAQQTn0etB2emNk4J9EZg/yWKpsn9BWGRw==",
2517
+           "dev": true,
2518
+           "bin": {
2519
+               "rollup": "dist/bin/rollup"
2520
+           },
2521
+           "engines": {
2522
+               "node": ">=14.18.0",
2523
+               "npm": ">=8.0.0"
2524
+           },
2525
+           "optionalDependencies": {
2526
+               "fsevents": "~2.3.2"
2527
+           }
2528
+       },
2529
+       "node_modules/run-parallel": {
2530
+           "version": "1.2.0",
2531
+           "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz",
2532
+           "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==",
2533
+           "dev": true,
2534
+           "funding": 
2535
+               {
2536
+                   "type": "github",
2537
+                   "url": "https://github.com/sponsors/feross"
2538
+               },
2539
+               {
2540
+                   "type": "patreon",
2541
+                   "url": "https://www.patreon.com/feross"
2542
+               },
2543
+               {
2544
+                   "type": "consulting",
2545
+                   "url": "https://feross.org/support"
2546
+               }
2547
+           ,
2548
+           "dependencies": {
2549
+               "queue-microtask": "^1.2.2"
2550
+           }
2551
+       },
2552
+       "node_modules/sade": {
2553
+           "version": "1.8.1",
2554
+           "resolved": "https://registry.npmjs.org/sade/-/sade-1.8.1.tgz",
2555
+           "integrity": "sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==",
2556
+           "dev": true,
2557
+           "dependencies": {
2558
+               "mri": "^1.1.0"
2559
+           },
2560
+           "engines": {
2561
+               "node": ">=6"
2562
+           }
2563
+       },
2564
+       "node_modules/sander": {
2565
+           "version": "0.5.1",
2566
+           "resolved": "https://registry.npmjs.org/sander/-/sander-0.5.1.tgz",
2567
+           "integrity": "sha512-3lVqBir7WuKDHGrKRDn/1Ye3kwpXaDOMsiRP1wd6wpZW56gJhsbp5RqQpA6JG/P+pkXizygnr1dKR8vzWaVsfA==",
2568
+           "dev": true,
2569
+           "dependencies": {
2570
+               "es6-promise": "^3.1.2",
2571
+               "graceful-fs": "^4.1.3",
2572
+               "mkdirp": "^0.5.1",
2573
+               "rimraf": "^2.5.2"
2574
+           }
2575
+       },
2576
+       "node_modules/sander/node_modules/rimraf": {
2577
+           "version": "2.7.1",
2578
+           "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
2579
+           "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==",
2580
+           "dev": true,
2581
+           "dependencies": {
2582
+               "glob": "^7.1.3"
2583
+           },
2584
+           "bin": {
2585
+               "rimraf": "bin.js"
2586
+           }
2587
+       },
2588
+       "node_modules/semver": {
2589
+           "version": "7.5.4",
2590
+           "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
2591
+           "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
2592
+           "dev": true,
2593
+           "dependencies": {
2594
+               "lru-cache": "^6.0.0"
2595
+           },
2596
+           "bin": {
2597
+               "semver": "bin/semver.js"
2598
+           },
2599
+           "engines": {
2600
+               "node": ">=10"
2601
+           }
2602
+       },
2603
+       "node_modules/set-cookie-parser": {
2604
+           "version": "2.6.0",
2605
+           "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.6.0.tgz",
2606
+           "integrity": "sha512-RVnVQxTXuerk653XfuliOxBP81Sf0+qfQE73LIYKcyMYHG94AuH0kgrQpRDuTZnSmjpysHmzxJXKNfa6PjFhyQ==",
2607
+           "dev": true
2608
+       },
2609
+       "node_modules/shebang-command": {
2610
+           "version": "2.0.0",
2611
+           "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
2612
+           "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
2613
+           "dev": true,
2614
+           "dependencies": {
2615
+               "shebang-regex": "^3.0.0"
2616
+           },
2617
+           "engines": {
2618
+               "node": ">=8"
2619
+           }
2620
+       },
2621
+       "node_modules/shebang-regex": {
2622
+           "version": "3.0.0",
2623
+           "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
2624
+           "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
2625
+           "dev": true,
2626
+           "engines": {
2627
+               "node": ">=8"
2628
+           }
2629
+       },
2630
+       "node_modules/sirv": {
2631
+           "version": "2.0.3",
2632
+           "resolved": "https://registry.npmjs.org/sirv/-/sirv-2.0.3.tgz",
2633
+           "integrity": "sha512-O9jm9BsID1P+0HOi81VpXPoDxYP374pkOLzACAoyUQ/3OUVndNpsz6wMnY2z+yOxzbllCKZrM+9QrWsv4THnyA==",
2634
+           "dev": true,
2635
+           "dependencies": {
2636
+               "@polka/url": "^1.0.0-next.20",
2637
+               "mrmime": "^1.0.0",
2638
+               "totalist": "^3.0.0"
2639
+           },
2640
+           "engines": {
2641
+               "node": ">= 10"
2642
+           }
2643
+       },
2644
+       "node_modules/slash": {
2645
+           "version": "3.0.0",
2646
+           "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
2647
+           "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",
2648
+           "dev": true,
2649
+           "engines": {
2650
+               "node": ">=8"
2651
+           }
2652
+       },
2653
+       "node_modules/sorcery": {
2654
+           "version": "0.11.0",
2655
+           "resolved": "https://registry.npmjs.org/sorcery/-/sorcery-0.11.0.tgz",
2656
+           "integrity": "sha512-J69LQ22xrQB1cIFJhPfgtLuI6BpWRiWu1Y3vSsIwK/eAScqJxd/+CJlUuHQRdX2C9NGFamq+KqNywGgaThwfHw==",
2657
+           "dev": true,
2658
+           "dependencies": {
2659
+               "@jridgewell/sourcemap-codec": "^1.4.14",
2660
+               "buffer-crc32": "^0.2.5",
2661
+               "minimist": "^1.2.0",
2662
+               "sander": "^0.5.0"
2663
+           },
2664
+           "bin": {
2665
+               "sorcery": "bin/sorcery"
2666
+           }
2667
+       },
2668
+       "node_modules/source-map-js": {
2669
+           "version": "1.0.2",
2670
+           "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",
2671
+           "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==",
2672
+           "dev": true,
2673
+           "engines": {
2674
+               "node": ">=0.10.0"
2675
+           }
2676
+       },
2677
+       "node_modules/strip-ansi": {
2678
+           "version": "6.0.1",
2679
+           "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
2680
+           "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
2681
+           "dev": true,
2682
+           "dependencies": {
2683
+               "ansi-regex": "^5.0.1"
2684
+           },
2685
+           "engines": {
2686
+               "node": ">=8"
2687
+           }
2688
+       },
2689
+       "node_modules/strip-indent": {
2690
+           "version": "3.0.0",
2691
+           "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz",
2692
+           "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==",
2693
+           "dev": true,
2694
+           "dependencies": {
2695
+               "min-indent": "^1.0.0"
2696
+           },
2697
+           "engines": {
2698
+               "node": ">=8"
2699
+           }
2700
+       },
2701
+       "node_modules/strip-json-comments": {
2702
+           "version": "3.1.1",
2703
+           "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz",
2704
+           "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==",
2705
+           "dev": true,
2706
+           "engines": {
2707
+               "node": ">=8"
2708
+           },
2709
+           "funding": {
2710
+               "url": "https://github.com/sponsors/sindresorhus"
2711
+           }
2712
+       },
2713
+       "node_modules/supports-color": {
2714
+           "version": "7.2.0",
2715
+           "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
2716
+           "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
2717
+           "dev": true,
2718
+           "dependencies": {
2719
+               "has-flag": "^4.0.0"
2720
+           },
2721
+           "engines": {
2722
+               "node": ">=8"
2723
+           }
2724
+       },
2725
+       "node_modules/svelte": {
2726
+           "version": "4.2.1",
2727
+           "resolved": "https://registry.npmjs.org/svelte/-/svelte-4.2.1.tgz",
2728
+           "integrity": "sha512-LpLqY2Jr7cRxkrTc796/AaaoMLF/1ax7cto8Ot76wrvKQhrPmZ0JgajiWPmg9mTSDqO16SSLiD17r9MsvAPTmw==",
2729
+           "dev": true,
2730
+           "dependencies": {
2731
+               "@ampproject/remapping": "^2.2.1",
2732
+               "@jridgewell/sourcemap-codec": "^1.4.15",
2733
+               "@jridgewell/trace-mapping": "^0.3.18",
2734
+               "acorn": "^8.9.0",
2735
+               "aria-query": "^5.3.0",
2736
+               "axobject-query": "^3.2.1",
2737
+               "code-red": "^1.0.3",
2738
+               "css-tree": "^2.3.1",
2739
+               "estree-walker": "^3.0.3",
2740
+               "is-reference": "^3.0.1",
2741
+               "locate-character": "^3.0.0",
2742
+               "magic-string": "^0.30.0",
2743
+               "periscopic": "^3.1.0"
2744
+           },
2745
+           "engines": {
2746
+               "node": ">=16"
2747
+           }
2748
+       },
2749
+       "node_modules/svelte-check": {
2750
+           "version": "3.5.2",
2751
+           "resolved": "https://registry.npmjs.org/svelte-check/-/svelte-check-3.5.2.tgz",
2752
+           "integrity": "sha512-5a/YWbiH4c+AqAUP+0VneiV5bP8YOk9JL3jwvN+k2PEPLgpu85bjQc5eE67+eIZBBwUEJzmO3I92OqKcqbp3fw==",
2753
+           "dev": true,
2754
+           "dependencies": {
2755
+               "@jridgewell/trace-mapping": "^0.3.17",
2756
+               "chokidar": "^3.4.1",
2757
+               "fast-glob": "^3.2.7",
2758
+               "import-fresh": "^3.2.1",
2759
+               "picocolors": "^1.0.0",
2760
+               "sade": "^1.7.4",
2761
+               "svelte-preprocess": "^5.0.4",
2762
+               "typescript": "^5.0.3"
2763
+           },
2764
+           "bin": {
2765
+               "svelte-check": "bin/svelte-check"
2766
+           },
2767
+           "peerDependencies": {
2768
+               "svelte": "^3.55.0 || ^4.0.0-next.0 || ^4.0.0"
2769
+           }
2770
+       },
2771
+       "node_modules/svelte-eslint-parser": {
2772
+           "version": "0.33.1",
2773
+           "resolved": "https://registry.npmjs.org/svelte-eslint-parser/-/svelte-eslint-parser-0.33.1.tgz",
2774
+           "integrity": "sha512-vo7xPGTlKBGdLH8T5L64FipvTrqv3OQRx9d2z5X05KKZDlF4rQk8KViZO4flKERY+5BiVdOh7zZ7JGJWo5P0uA==",
2775
+           "dev": true,
2776
+           "dependencies": {
2777
+               "eslint-scope": "^7.0.0",
2778
+               "eslint-visitor-keys": "^3.0.0",
2779
+               "espree": "^9.0.0",
2780
+               "postcss": "^8.4.29",
2781
+               "postcss-scss": "^4.0.8"
2782
+           },
2783
+           "engines": {
2784
+               "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
2785
+           },
2786
+           "funding": {
2787
+               "url": "https://github.com/sponsors/ota-meshi"
2788
+           },
2789
+           "peerDependencies": {
2790
+               "svelte": "^3.37.0 || ^4.0.0"
2791
+           },
2792
+           "peerDependenciesMeta": {
2793
+               "svelte": {
2794
+                   "optional": true
2795
+               }
2796
+           }
2797
+       },
2798
+       "node_modules/svelte-hmr": {
2799
+           "version": "0.15.3",
2800
+           "resolved": "https://registry.npmjs.org/svelte-hmr/-/svelte-hmr-0.15.3.tgz",
2801
+           "integrity": "sha512-41snaPswvSf8TJUhlkoJBekRrABDXDMdpNpT2tfHIv4JuhgvHqLMhEPGtaQn0BmbNSTkuz2Ed20DF2eHw0SmBQ==",
2802
+           "dev": true,
2803
+           "engines": {
2804
+               "node": "^12.20 || ^14.13.1 || >= 16"
2805
+           },
2806
+           "peerDependencies": {
2807
+               "svelte": "^3.19.0 || ^4.0.0"
2808
+           }
2809
+       },
2810
+       "node_modules/svelte-preprocess": {
2811
+           "version": "5.0.4",
2812
+           "resolved": "https://registry.npmjs.org/svelte-preprocess/-/svelte-preprocess-5.0.4.tgz",
2813
+           "integrity": "sha512-ABia2QegosxOGsVlsSBJvoWeXy1wUKSfF7SWJdTjLAbx/Y3SrVevvvbFNQqrSJw89+lNSsM58SipmZJ5SRi5iw==",
2814
+           "dev": true,
2815
+           "hasInstallScript": true,
2816
+           "dependencies": {
2817
+               "@types/pug": "^2.0.6",
2818
+               "detect-indent": "^6.1.0",
2819
+               "magic-string": "^0.27.0",
2820
+               "sorcery": "^0.11.0",
2821
+               "strip-indent": "^3.0.0"
2822
+           },
2823
+           "engines": {
2824
+               "node": ">= 14.10.0"
2825
+           },
2826
+           "peerDependencies": {
2827
+               "@babel/core": "^7.10.2",
2828
+               "coffeescript": "^2.5.1",
2829
+               "less": "^3.11.3 || ^4.0.0",
2830
+               "postcss": "^7 || ^8",
2831
+               "postcss-load-config": "^2.1.0 || ^3.0.0 || ^4.0.0",
2832
+               "pug": "^3.0.0",
2833
+               "sass": "^1.26.8",
2834
+               "stylus": "^0.55.0",
2835
+               "sugarss": "^2.0.0 || ^3.0.0 || ^4.0.0",
2836
+               "svelte": "^3.23.0 || ^4.0.0-next.0 || ^4.0.0",
2837
+               "typescript": ">=3.9.5 || ^4.0.0 || ^5.0.0"
2838
+           },
2839
+           "peerDependenciesMeta": {
2840
+               "@babel/core": {
2841
+                   "optional": true
2842
+               },
2843
+               "coffeescript": {
2844
+                   "optional": true
2845
+               },
2846
+               "less": {
2847
+                   "optional": true
2848
+               },
2849
+               "postcss": {
2850
+                   "optional": true
2851
+               },
2852
+               "postcss-load-config": {
2853
+                   "optional": true
2854
+               },
2855
+               "pug": {
2856
+                   "optional": true
2857
+               },
2858
+               "sass": {
2859
+                   "optional": true
2860
+               },
2861
+               "stylus": {
2862
+                   "optional": true
2863
+               },
2864
+               "sugarss": {
2865
+                   "optional": true
2866
+               },
2867
+               "typescript": {
2868
+                   "optional": true
2869
+               }
2870
+           }
2871
+       },
2872
+       "node_modules/svelte-preprocess/node_modules/magic-string": {
2873
+           "version": "0.27.0",
2874
+           "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.27.0.tgz",
2875
+           "integrity": "sha512-8UnnX2PeRAPZuN12svgR9j7M1uWMovg/CEnIwIG0LFkXSJJe4PdfUGiTGl8V9bsBHFUtfVINcSyYxd7q+kx9fA==",
2876
+           "dev": true,
2877
+           "dependencies": {
2878
+               "@jridgewell/sourcemap-codec": "^1.4.13"
2879
+           },
2880
+           "engines": {
2881
+               "node": ">=12"
2882
+           }
2883
+       },
2884
+       "node_modules/text-table": {
2885
+           "version": "0.2.0",
2886
+           "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",
2887
+           "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==",
2888
+           "dev": true
2889
+       },
2890
+       "node_modules/tiny-glob": {
2891
+           "version": "0.2.9",
2892
+           "resolved": "https://registry.npmjs.org/tiny-glob/-/tiny-glob-0.2.9.tgz",
2893
+           "integrity": "sha512-g/55ssRPUjShh+xkfx9UPDXqhckHEsHr4Vd9zX55oSdGZc/MD0m3sferOkwWtp98bv+kcVfEHtRJgBVJzelrzg==",
2894
+           "dev": true,
2895
+           "dependencies": {
2896
+               "globalyzer": "0.1.0",
2897
+               "globrex": "^0.1.2"
2898
+           }
2899
+       },
2900
+       "node_modules/to-regex-range": {
2901
+           "version": "5.0.1",
2902
+           "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
2903
+           "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
2904
+           "dev": true,
2905
+           "dependencies": {
2906
+               "is-number": "^7.0.0"
2907
+           },
2908
+           "engines": {
2909
+               "node": ">=8.0"
2910
+           }
2911
+       },
2912
+       "node_modules/totalist": {
2913
+           "version": "3.0.1",
2914
+           "resolved": "https://registry.npmjs.org/totalist/-/totalist-3.0.1.tgz",
2915
+           "integrity": "sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==",
2916
+           "dev": true,
2917
+           "engines": {
2918
+               "node": ">=6"
2919
+           }
2920
+       },
2921
+       "node_modules/ts-api-utils": {
2922
+           "version": "1.0.3",
2923
+           "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.0.3.tgz",
2924
+           "integrity": "sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==",
2925
+           "dev": true,
2926
+           "engines": {
2927
+               "node": ">=16.13.0"
2928
+           },
2929
+           "peerDependencies": {
2930
+               "typescript": ">=4.2.0"
2931
+           }
2932
+       },
2933
+       "node_modules/tslib": {
2934
+           "version": "2.6.2",
2935
+           "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz",
2936
+           "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==",
2937
+           "dev": true
2938
+       },
2939
+       "node_modules/type-check": {
2940
+           "version": "0.4.0",
2941
+           "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz",
2942
+           "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==",
2943
+           "dev": true,
2944
+           "dependencies": {
2945
+               "prelude-ls": "^1.2.1"
2946
+           },
2947
+           "engines": {
2948
+               "node": ">= 0.8.0"
2949
+           }
2950
+       },
2951
+       "node_modules/type-fest": {
2952
+           "version": "0.20.2",
2953
+           "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz",
2954
+           "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==",
2955
+           "dev": true,
2956
+           "engines": {
2957
+               "node": ">=10"
2958
+           },
2959
+           "funding": {
2960
+               "url": "https://github.com/sponsors/sindresorhus"
2961
+           }
2962
+       },
2963
+       "node_modules/typescript": {
2964
+           "version": "5.2.2",
2965
+           "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz",
2966
+           "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==",
2967
+           "dev": true,
2968
+           "bin": {
2969
+               "tsc": "bin/tsc",
2970
+               "tsserver": "bin/tsserver"
2971
+           },
2972
+           "engines": {
2973
+               "node": ">=14.17"
2974
+           }
2975
+       },
2976
+       "node_modules/undici": {
2977
+           "version": "5.25.4",
2978
+           "resolved": "https://registry.npmjs.org/undici/-/undici-5.25.4.tgz",
2979
+           "integrity": "sha512-450yJxT29qKMf3aoudzFpIciqpx6Pji3hEWaXqXmanbXF58LTAGCKxcJjxMXWu3iG+Mudgo3ZUfDB6YDFd/dAw==",
2980
+           "dev": true,
2981
+           "dependencies": {
2982
+               "@fastify/busboy": "^2.0.0"
2983
+           },
2984
+           "engines": {
2985
+               "node": ">=14.0"
2986
+           }
2987
+       },
2988
+       "node_modules/uri-js": {
2989
+           "version": "4.4.1",
2990
+           "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",
2991
+           "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==",
2992
+           "dev": true,
2993
+           "dependencies": {
2994
+               "punycode": "^2.1.0"
2995
+           }
2996
+       },
2997
+       "node_modules/util-deprecate": {
2998
+           "version": "1.0.2",
2999
+           "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
3000
+           "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",
3001
+           "dev": true
3002
+       },
3003
+       "node_modules/vite": {
3004
+           "version": "4.4.10",
3005
+           "resolved": "https://registry.npmjs.org/vite/-/vite-4.4.10.tgz",
3006
+           "integrity": "sha512-TzIjiqx9BEXF8yzYdF2NTf1kFFbjMjUSV0LFZ3HyHoI3SGSPLnnFUKiIQtL3gl2AjHvMrprOvQ3amzaHgQlAxw==",
3007
+           "dev": true,
3008
+           "dependencies": {
3009
+               "esbuild": "^0.18.10",
3010
+               "postcss": "^8.4.27",
3011
+               "rollup": "^3.27.1"
3012
+           },
3013
+           "bin": {
3014
+               "vite": "bin/vite.js"
3015
+           },
3016
+           "engines": {
3017
+               "node": "^14.18.0 || >=16.0.0"
3018
+           },
3019
+           "funding": {
3020
+               "url": "https://github.com/vitejs/vite?sponsor=1"
3021
+           },
3022
+           "optionalDependencies": {
3023
+               "fsevents": "~2.3.2"
3024
+           },
3025
+           "peerDependencies": {
3026
+               "@types/node": ">= 14",
3027
+               "less": "*",
3028
+               "lightningcss": "^1.21.0",
3029
+               "sass": "*",
3030
+               "stylus": "*",
3031
+               "sugarss": "*",
3032
+               "terser": "^5.4.0"
3033
+           },
3034
+           "peerDependenciesMeta": {
3035
+               "@types/node": {
3036
+                   "optional": true
3037
+               },
3038
+               "less": {
3039
+                   "optional": true
3040
+               },
3041
+               "lightningcss": {
3042
+                   "optional": true
3043
+               },
3044
+               "sass": {
3045
+                   "optional": true
3046
+               },
3047
+               "stylus": {
3048
+                   "optional": true
3049
+               },
3050
+               "sugarss": {
3051
+                   "optional": true
3052
+               },
3053
+               "terser": {
3054
+                   "optional": true
3055
+               }
3056
+           }
3057
+       },
3058
+       "node_modules/vitefu": {
3059
+           "version": "0.2.4",
3060
+           "resolved": "https://registry.npmjs.org/vitefu/-/vitefu-0.2.4.tgz",
3061
+           "integrity": "sha512-fanAXjSaf9xXtOOeno8wZXIhgia+CZury481LsDaV++lSvcU2R9Ch2bPh3PYFyoHW+w9LqAeYRISVQjUIew14g==",
3062
+           "dev": true,
3063
+           "peerDependencies": {
3064
+               "vite": "^3.0.0 || ^4.0.0"
3065
+           },
3066
+           "peerDependenciesMeta": {
3067
+               "vite": {
3068
+                   "optional": true
3069
+               }
3070
+           }
3071
+       },
3072
+       "node_modules/which": {
3073
+           "version": "2.0.2",
3074
+           "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
3075
+           "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
3076
+           "dev": true,
3077
+           "dependencies": {
3078
+               "isexe": "^2.0.0"
3079
+           },
3080
+           "bin": {
3081
+               "node-which": "bin/node-which"
3082
+           },
3083
+           "engines": {
3084
+               "node": ">= 8"
3085
+           }
3086
+       },
3087
+       "node_modules/wrappy": {
3088
+           "version": "1.0.2",
3089
+           "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
3090
+           "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
3091
+           "dev": true
3092
+       },
3093
+       "node_modules/yallist": {
3094
+           "version": "4.0.0",
3095
+           "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
3096
+           "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
3097
+           "dev": true
3098
+       },
3099
+       "node_modules/yaml": {
3100
+           "version": "1.10.2",
3101
+           "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz",
3102
+           "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==",
3103
+           "dev": true,
3104
+           "engines": {
3105
+               "node": ">= 6"
3106
+           }
3107
+       },
3108
+       "node_modules/yocto-queue": {
3109
+           "version": "0.1.0",
3110
+           "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
3111
+           "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==",
3112
+           "dev": true,
3113
+           "engines": {
3114
+               "node": ">=10"
3115
+           },
3116
+           "funding": {
3117
+               "url": "https://github.com/sponsors/sindresorhus"
3118
+           }
3119
+       }
3120
+   }
3121
+}
3122
obs-backgroundremoval-1.1.13.tar.gz/pages/package.json Added
35
 
1
@@ -0,0 +1,33 @@
2
+{
3
+   "name": "pages",
4
+   "version": "0.0.1",
5
+   "scripts": {
6
+       "dev": "vite dev",
7
+       "build": "vite build",
8
+       "preview": "vite preview",
9
+       "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
10
+       "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
11
+       "lint": "prettier --plugin-search-dir . --check . && eslint .",
12
+       "format": "prettier --plugin-search-dir . --write ."
13
+   },
14
+   "devDependencies": {
15
+       "@fontsource/fira-mono": "^4.5.10",
16
+       "@neoconfetti/svelte": "^1.0.0",
17
+       "@sveltejs/adapter-static": "^2.0.3",
18
+       "@sveltejs/kit": "^1.20.4",
19
+       "@types/cookie": "^0.5.1",
20
+       "@typescript-eslint/eslint-plugin": "^6.0.0",
21
+       "@typescript-eslint/parser": "^6.0.0",
22
+       "eslint": "^8.28.0",
23
+       "eslint-config-prettier": "^8.5.0",
24
+       "eslint-plugin-svelte": "^2.30.0",
25
+       "prettier": "^2.8.0",
26
+       "prettier-plugin-svelte": "^2.10.1",
27
+       "svelte": "^4.0.5",
28
+       "svelte-check": "^3.4.3",
29
+       "tslib": "^2.4.1",
30
+       "typescript": "^5.0.0",
31
+       "vite": "^4.4.2"
32
+   },
33
+   "type": "module"
34
+}
35
obs-backgroundremoval-1.1.13.tar.gz/pages/src Added
2
 
1
+(directory)
2
obs-backgroundremoval-1.1.13.tar.gz/pages/src/app.d.ts Added
14
 
1
@@ -0,0 +1,12 @@
2
+// See https://kit.svelte.dev/docs/types#app
3
+// for information about these interfaces
4
+declare global {
5
+   namespace App {
6
+       // interface Error {}
7
+       // interface Locals {}
8
+       // interface PageData {}
9
+       // interface Platform {}
10
+   }
11
+}
12
+
13
+export {};
14
obs-backgroundremoval-1.1.13.tar.gz/pages/src/app.html Added
14
 
1
@@ -0,0 +1,12 @@
2
+<!DOCTYPE html>
3
+<html lang="en">
4
+   <head>
5
+       <meta charset="utf-8" />
6
+       <link rel="icon" href="%sveltekit.assets%/favicon.png" />
7
+       <meta name="viewport" content="width=device-width" />
8
+       %sveltekit.head%
9
+   </head>
10
+   <body data-sveltekit-preload-data="hover">
11
+       <div style="display: contents">%sveltekit.body%</div>
12
+   </body>
13
+</html>
14
obs-backgroundremoval-1.1.13.tar.gz/pages/src/lib Added
2
 
1
+(directory)
2
obs-backgroundremoval-1.1.13.tar.gz/pages/src/lib/github-release.ts Added
35
 
1
@@ -0,0 +1,33 @@
2
+interface GitHubLatestReleaseAsset {
3
+   readonly browser_download_url: string;
4
+   readonly name: string;
5
+}
6
+
7
+export interface GitHubLatestReleaseResult {
8
+   readonly assets: GitHubLatestReleaseAsset;
9
+}
10
+
11
+function getHeaders(): Record<string, string> {
12
+   const { GITHUB_TOKEN } = process.env;
13
+   if (GITHUB_TOKEN) {
14
+       return {
15
+           authorization: `Bearer ${GITHUB_TOKEN}`
16
+       };
17
+   } else {
18
+       return {};
19
+   }
20
+}
21
+
22
+export async function getLatestReleaseMetadata(
23
+   owner: string = 'occ-ai',
24
+   repo: string = 'obs-backgroundremoval'
25
+): Promise<GitHubLatestReleaseResult> {
26
+   const url = `https://api.github.com/repos/${owner}/${repo}/releases/latest`;
27
+   const response = await fetch(url, { headers: getHeaders() });
28
+   const json = await response.json();
29
+   if (!response.ok) {
30
+       console.error(json);
31
+       throw new Error(`The latest release of ${owner}/${repo} cannot be retrieved!`);
32
+   }
33
+   return json;
34
+}
35
obs-backgroundremoval-1.1.13.tar.gz/pages/src/lib/images Added
2
 
1
+(directory)
2
obs-backgroundremoval-1.1.13.tar.gz/pages/src/lib/images/addAVideoCaptureSource.png Added
obs-backgroundremoval-1.1.13.tar.gz/pages/src/lib/images/addBackgroundRemoval.png Added
obs-backgroundremoval-1.1.13.tar.gz/pages/src/lib/images/captureFilters.png Added
obs-backgroundremoval-1.1.13.tar.gz/pages/src/lib/images/checkDll.png Added
obs-backgroundremoval-1.1.13.tar.gz/pages/src/lib/images/filterSettings.png Added
obs-backgroundremoval-1.1.13.tar.gz/pages/src/lib/images/filterSettingsAdvanced.png Added
obs-backgroundremoval-1.1.13.tar.gz/pages/src/lib/images/github.svg Added
19
 
1
@@ -0,0 +1,16 @@
2
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="-3 -3 30 30">
3
+   <path
4
+       fill-rule="evenodd"
5
+       clip-rule="evenodd"
6
+       d="M12 2C6.47715 2 2 6.47715 2 12C2 17.5229 6.47715 22 12 22C17.5229 22 22 17.5229 22 12C22 6.47715 17.5229 2 12 2ZM0 12C0 5.3726 5.3726 0 12 0C18.6274 0 24 5.3726 24 12C24 18.6274 18.6274 24 12 24C5.3726 24 0 18.6274 0 12Z"
7
+       fill="rgba(0,0,0,0.7)"
8
+       stroke="none"
9
+   />
10
+   <path
11
+       fill-rule="evenodd"
12
+       clip-rule="evenodd"
13
+       d="M9.59162 22.7357C9.49492 22.6109 9.49492 21.4986 9.59162 19.399C8.55572 19.4347 7.90122 19.3628 7.62812 19.1833C7.21852 18.9139 6.80842 18.0833 6.44457 17.4979C6.08072 16.9125 5.27312 16.8199 4.94702 16.6891C4.62091 16.5582 4.53905 16.0247 5.84562 16.4282C7.15222 16.8316 7.21592 17.9303 7.62812 18.1872C8.04032 18.4441 9.02572 18.3317 9.47242 18.1259C9.91907 17.9201 9.88622 17.1538 9.96587 16.8503C10.0666 16.5669 9.71162 16.5041 9.70382 16.5018C9.26777 16.5018 6.97697 16.0036 6.34772 13.7852C5.71852 11.5669 6.52907 10.117 6.96147 9.49369C7.24972 9.07814 7.22422 8.19254 6.88497 6.83679C8.11677 6.67939 9.06732 7.06709 9.73672 7.99999C9.73737 8.00534 10.6143 7.47854 12.0001 7.47854C13.386 7.47854 13.8777 7.90764 14.2571 7.99999C14.6365 8.09234 14.94 6.36699 17.2834 6.83679C16.7942 7.79839 16.3844 8.99999 16.6972 9.49369C17.0099 9.98739 18.2372 11.5573 17.4833 13.7852C16.9807 15.2706 15.9927 16.1761 14.5192 16.5018C14.3502 16.5557 14.2658 16.6427 14.2658 16.7627C14.2658 16.9427 14.4942 16.9624 14.8233 17.8058C15.0426 18.368 15.0585 19.9739 14.8708 22.6234C14.3953 22.7445 14.0254 22.8257 13.7611 22.8673C13.2924 22.9409 12.7835 22.9822 12.2834 22.9982C11.7834 23.0141 11.6098 23.0123 10.9185 22.948C10.4577 22.9051 10.0154 22.8343 9.59162 22.7357Z"
14
+       fill="rgba(0,0,0,0.7)"
15
+       stroke="none"
16
+   />
17
+</svg>
18
\ No newline at end of file
19
obs-backgroundremoval-1.1.13.tar.gz/pages/src/lib/images/installWizard.png Added
obs-backgroundremoval-1.1.13.tar.gz/pages/src/lib/images/runUnkPublisher.png Added
obs-backgroundremoval-1.1.13.tar.gz/pages/src/routes Added
2
 
1
+(directory)
2
obs-backgroundremoval-1.1.13.tar.gz/pages/src/routes/+layout.svelte Added
33
 
1
@@ -0,0 +1,31 @@
2
+<script>
3
+   import Header from './Header.svelte';
4
+   import './styles.css';
5
+</script>
6
+
7
+<div class="app">
8
+   <Header />
9
+
10
+   <main>
11
+       <slot />
12
+   </main>
13
+</div>
14
+
15
+<style>
16
+   .app {
17
+       display: flex;
18
+       flex-direction: column;
19
+       min-height: 100vh;
20
+   }
21
+
22
+   main {
23
+       flex: 1;
24
+       display: flex;
25
+       flex-direction: column;
26
+       padding: 1rem;
27
+       width: 100%;
28
+       max-width: 64rem;
29
+       margin: 0 auto;
30
+       box-sizing: border-box;
31
+   }
32
+</style>
33
obs-backgroundremoval-1.1.13.tar.gz/pages/src/routes/+page.svelte Added
49
 
1
@@ -0,0 +1,47 @@
2
+<script>
3
+   import { base } from '$app/paths';
4
+</script>
5
+
6
+<svelte:head>
7
+   <title>OBS Background Removal</title>
8
+   <meta
9
+       name="description"
10
+       content="OBS Plugin: Background Removal / Virtual Green-screen and Low-Light Enhancement"
11
+   />
12
+</svelte:head>
13
+
14
+<section>
15
+   <header>
16
+       <h1>OBS Background Removal</h1>
17
+       <h2>
18
+           OBS Plugin: Background Removal / Virtual Green-screen and Low-Light Enhancement
19
+       </h2>
20
+   </header>
21
+
22
+    <p>See our <a href="{base}/usage">Usage</a> page for instructions on usage in OBS</p>
23
+
24
+   <h1>Download and Install (Official)</h1>
25
+   <a href="{base}/windows"><h2>Windows</h2></a>
26
+   <a href="{base}/macos"><h2>macOS</h2></a>
27
+   <a href="{base}/ubuntu"><h2>Ubuntu Linux</h2></a>
28
+   <a href="{base}/flatpak"><h2>FlatPak</h2></a>
29
+
30
+   <h1>Download and Install (Unofficial)</h1>
31
+   <a href="{base}/arch"><h2>Arch Linux</h2></a>
32
+   <a href="{base}/opensuse-tumbleweed"><h2>openSUSE Tumbleweed</h2></a>
33
+   <a href="{base}/fedora"><h2>Fedora</h2></a>
34
+</section>
35
+
36
+<style>
37
+   section {
38
+       display: flex;
39
+       flex-direction: column;
40
+       justify-content: center;
41
+       align-items: center;
42
+       flex: 0.6;
43
+   }
44
+
45
+   h1 {
46
+       width: 100%;
47
+   }
48
+</style>
49
obs-backgroundremoval-1.1.13.tar.gz/pages/src/routes/+page.ts Added
5
 
1
@@ -0,0 +1,3 @@
2
+// since there's no dynamic data here, we can prerender
3
+// it so that it gets served as a static asset in production
4
+export const prerender = true;
5
obs-backgroundremoval-1.1.13.tar.gz/pages/src/routes/Header.svelte Added
53
 
1
@@ -0,0 +1,51 @@
2
+<script>
3
+   import github from '$lib/images/github.svg';
4
+</script>
5
+
6
+<header>
7
+   <div class="corner" />
8
+
9
+   <nav />
10
+
11
+   <div class="corner">
12
+       <a href="https://github.com/obs-ai/obs-backgroundremoval">
13
+           <img src={github} alt="GitHub" />
14
+       </a>
15
+   </div>
16
+</header>
17
+
18
+<style>
19
+   header {
20
+       display: flex;
21
+       justify-content: space-between;
22
+   }
23
+
24
+   .corner {
25
+       width: 3em;
26
+       height: 3em;
27
+   }
28
+
29
+   .corner a {
30
+       display: flex;
31
+       align-items: center;
32
+       justify-content: center;
33
+       width: 100%;
34
+       height: 100%;
35
+   }
36
+
37
+   .corner img {
38
+       width: 2em;
39
+       height: 2em;
40
+       object-fit: contain;
41
+   }
42
+
43
+   nav {
44
+       display: flex;
45
+       justify-content: center;
46
+       --background: rgba(255, 255, 255, 0.7);
47
+   }
48
+
49
+   a:hover {
50
+       color: var(--color-theme-1);
51
+   }
52
+</style>
53
obs-backgroundremoval-1.1.13.tar.gz/pages/src/routes/arch Added
2
 
1
+(directory)
2
obs-backgroundremoval-1.1.13.tar.gz/pages/src/routes/arch/+page.svelte Added
41
 
1
@@ -0,0 +1,39 @@
2
+<script>
3
+   import { base } from '$app/paths';
4
+</script>
5
+
6
+<svelte:head>
7
+   <title>How to use OBS Background Removal on Arch Linux</title>
8
+   <meta name="description" content="How to use OBS Background Removal on Arch Linux" />
9
+</svelte:head>
10
+
11
+<div class="text-column">
12
+   <h1>Download and install on Arch Linux</h1>
13
+
14
+   <p>
15
+       <a
16
+           href="https://github.com/obsproject/obs-studio/wiki/Unofficial-Linux-Builds#arch-linuxmanjaro"
17
+           >Install the latest OBS by following the guide of unofficial builds</a
18
+       >
19
+   </p>
20
+
21
+   <p>
22
+       <a href="https://aur.archlinux.org/packages/obs-backgroundremoval"
23
+           >Download PKGBUILD of obs-backgroundremoval from AUR</a
24
+       >
25
+   </p>
26
+
27
+   <p>Build your package by running:</p>
28
+
29
+   <pre>makepkg --syncdeps</pre>
30
+
31
+   <p>Install your package by running:</p>
32
+
33
+   <pre>makepkg --install</pre>
34
+
35
+   <p>See the <a href="{base}/usage">usage page</a> for how to use the plugin</p>
36
+
37
+   <p>All set!</p>
38
+
39
+   <p><a href="{base}/">Back to the top page</a></p>
40
+</div>
41
obs-backgroundremoval-1.1.13.tar.gz/pages/src/routes/arch/+page.ts Added
11
 
1
@@ -0,0 +1,9 @@
2
+import { dev } from '$app/environment';
3
+
4
+// we don't need any JS on this page, though we'll load
5
+// it in dev so that we get hot module replacement
6
+export const csr = dev;
7
+
8
+// since there's no dynamic data here, we can prerender
9
+// it so that it gets served as a static asset in production
10
+export const prerender = true;
11
obs-backgroundremoval-1.1.13.tar.gz/pages/src/routes/fedora Added
2
 
1
+(directory)
2
obs-backgroundremoval-1.1.13.tar.gz/pages/src/routes/fedora/+page.svelte Added
36
 
1
@@ -0,0 +1,34 @@
2
+<script>
3
+   import { base } from '$app/paths';
4
+</script>
5
+
6
+<svelte:head>
7
+   <title>How to use OBS Background Removal on Fedora</title>
8
+   <meta name="description" content="How to use OBS Background Removal on Fedora" />
9
+</svelte:head>
10
+
11
+<div class="text-column">
12
+   <h1>Download and install on Fedora</h1>
13
+
14
+   <p>You need to build the obs-backgroundremoval plugin by yourself</p>
15
+
16
+   <p>
17
+       <a href="https://github.com/obsproject/obs-studio/wiki/Unofficial-Linux-Builds#fedora"
18
+           >Install the latest OBS by following the guide of unofficial builds</a
19
+       >
20
+   </p>
21
+
22
+   <p>
23
+       <a href="https://github.com/obs-ai/obs-backgroundremoval/blob/main/docs/BUILDING-FEDORA.md"
24
+           >Build and install the obs-backgroundremoval plugin by following the guide on the repository</a
25
+       >
26
+   </p>
27
+
28
+   <p>Start your OBS</p>
29
+
30
+   <p>See the <a href="{base}/usage">usage page</a> for how to use the plugin</p>
31
+
32
+   <p>All set!</p>
33
+
34
+   <p><a href="{base}/">Back to the top page</a></p>
35
+</div>
36
obs-backgroundremoval-1.1.13.tar.gz/pages/src/routes/fedora/+page.ts Added
11
 
1
@@ -0,0 +1,9 @@
2
+import { dev } from '$app/environment';
3
+
4
+// we don't need any JS on this page, though we'll load
5
+// it in dev so that we get hot module replacement
6
+export const csr = dev;
7
+
8
+// since there's no dynamic data here, we can prerender
9
+// it so that it gets served as a static asset in production
10
+export const prerender = true;
11
obs-backgroundremoval-1.1.13.tar.gz/pages/src/routes/flatpak Added
2
 
1
+(directory)
2
obs-backgroundremoval-1.1.13.tar.gz/pages/src/routes/flatpak/+page.svelte Added
28
 
1
@@ -0,0 +1,26 @@
2
+<script>
3
+   import { base } from '$app/paths';
4
+</script>
5
+
6
+<svelte:head>
7
+   <title>How to use OBS Background Removal on FlatPak</title>
8
+   <meta name="description" content="How to use OBS Background Removal on FlatPak" />
9
+</svelte:head>
10
+
11
+<div class="text-column">
12
+   <h1>Download and install on FlatPak</h1>
13
+
14
+   <p>
15
+       <a href="https://flathub.org/apps/com.obsproject.Studio">Install the latest OBS from FlatHub</a>
16
+   </p>
17
+
18
+   <p>Install com.obsproject.Studio.Plugin.BackgroundRemoval from FlatHub:</p>
19
+
20
+   <pre>flatpak install flathub com.obsproject.Studio.Plugin.BackgroundRemoval</pre>
21
+
22
+   <p>See the <a href="{base}/usage">usage page</a> for how to use the plugin</p>
23
+
24
+   <p>All set!</p>
25
+
26
+   <p><a href="{base}/">Back to the top page</a></p>
27
+</div>
28
obs-backgroundremoval-1.1.13.tar.gz/pages/src/routes/flatpak/+page.ts Added
11
 
1
@@ -0,0 +1,9 @@
2
+import { dev } from '$app/environment';
3
+
4
+// we don't need any JS on this page, though we'll load
5
+// it in dev so that we get hot module replacement
6
+export const csr = dev;
7
+
8
+// since there's no dynamic data here, we can prerender
9
+// it so that it gets served as a static asset in production
10
+export const prerender = true;
11
obs-backgroundremoval-1.1.13.tar.gz/pages/src/routes/macos Added
2
 
1
+(directory)
2
obs-backgroundremoval-1.1.13.tar.gz/pages/src/routes/macos/+page.server.ts Added
8
 
1
@@ -0,0 +1,6 @@
2
+import { getLatestReleaseMetadata } from '../../lib/github-release';
3
+
4
+/** @type {import('./$types').PageLoad} */
5
+export async function load() {
6
+   return { metadata: await getLatestReleaseMetadata() };
7
+}
8
obs-backgroundremoval-1.1.13.tar.gz/pages/src/routes/macos/+page.svelte Added
34
 
1
@@ -0,0 +1,32 @@
2
+<script>
3
+   import { base } from '$app/paths';
4
+   /** @type {import('./$types').PageData} */
5
+   export let data;
6
+   const asset = data.metadata.assets.find((e) => /macos-universal\.pkg/.test(e.name));
7
+   if (!asset) throw new Error('Ubuntu asset not found!');
8
+</script>
9
+
10
+<svelte:head>
11
+   <title>How to use OBS Background Removal on macOS</title>
12
+   <meta name="description" content="How to use OBS Background Removal on macOS" />
13
+</svelte:head>
14
+
15
+<div class="text-column">
16
+   <h1>Download and install on macOS</h1>
17
+
18
+   <p>
19
+       <a href="https://obsproject.com/ja/download"
20
+           >Downlaod and install the latest OBS (Both of Intel and Apple Silicon are applicable)</a
21
+       >
22
+   </p>
23
+
24
+   <p><a href={asset.browser_download_url}>Download the pkg installer for macOS</a></p>
25
+
26
+   <p>Install {asset.name}</p>
27
+
28
+   <p>See the <a href="{base}/usage">usage page</a> for how to use the plugin</p>
29
+
30
+   <p>All set!</p>
31
+
32
+   <p><a href="{base}/">Back to the top page</a></p>
33
+</div>
34
obs-backgroundremoval-1.1.13.tar.gz/pages/src/routes/macos/+page.ts Added
11
 
1
@@ -0,0 +1,9 @@
2
+import { dev } from '$app/environment';
3
+
4
+// we don't need any JS on this page, though we'll load
5
+// it in dev so that we get hot module replacement
6
+export const csr = dev;
7
+
8
+// since there's no dynamic data here, we can prerender
9
+// it so that it gets served as a static asset in production
10
+export const prerender = true;
11
obs-backgroundremoval-1.1.13.tar.gz/pages/src/routes/opensuse-tumbleweed Added
2
 
1
+(directory)
2
obs-backgroundremoval-1.1.13.tar.gz/pages/src/routes/opensuse-tumbleweed/+page.svelte Added
35
 
1
@@ -0,0 +1,33 @@
2
+<script>
3
+   import { base } from '$app/paths';
4
+   /** @type {import('./$types').PageData} */
5
+</script>
6
+
7
+<svelte:head>
8
+   <title>How to use OBS Background Removal on openSUSE Tumbleweed</title>
9
+   <meta name="description" content="How to use OBS Background Removal on openSUSE Tumbleweed" />
10
+</svelte:head>
11
+
12
+<div class="text-column">
13
+   <h1>Download and install on openSUSE Tumbleweed</h1>
14
+
15
+   <p>You need to build the obs-backgroundremoval plugin by yourself</p>
16
+
17
+   <p>
18
+       <a href="https://github.com/obsproject/obs-studio/wiki/Unofficial-Linux-Builds#opensuse"
19
+           >Install the latest OBS by following the guide of unofficial builds</a
20
+       >
21
+   </p>
22
+
23
+   <p>
24
+       <a href="https://github.com/obs-ai/obs-backgroundremoval/blob/main/docs/BUILDING-OPENSUSE.md"
25
+           >Build and install the obs-backgroundremoval plugin by following the guide on the repository</a
26
+       >
27
+   </p>
28
+
29
+   <p>See the <a href="{base}/usage">usage page</a> for how to use the plugin</p>
30
+
31
+   <p>All set!</p>
32
+
33
+   <p><a href="{base}/">Back to the top page</a></p>
34
+</div>
35
obs-backgroundremoval-1.1.13.tar.gz/pages/src/routes/opensuse-tumbleweed/+page.ts Added
11
 
1
@@ -0,0 +1,9 @@
2
+import { dev } from '$app/environment';
3
+
4
+// we don't need any JS on this page, though we'll load
5
+// it in dev so that we get hot module replacement
6
+export const csr = dev;
7
+
8
+// since there's no dynamic data here, we can prerender
9
+// it so that it gets served as a static asset in production
10
+export const prerender = true;
11
obs-backgroundremoval-1.1.13.tar.gz/pages/src/routes/styles.css Added
109
 
1
@@ -0,0 +1,107 @@
2
+@import '@fontsource/fira-mono';
3
+
4
+:root {
5
+   --font-body: Arial, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu,
6
+       Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
7
+   --font-mono: 'Fira Mono', monospace;
8
+   --color-bg-0: rgb(202, 216, 228);
9
+   --color-bg-1: hsl(209, 36%, 86%);
10
+   --color-bg-2: hsl(224, 44%, 95%);
11
+   --color-theme-1: #ff3e00;
12
+   --color-theme-2: #4075a6;
13
+   --color-text: rgba(0, 0, 0, 0.7);
14
+   --column-width: 42rem;
15
+   --column-margin-top: 4rem;
16
+   font-family: var(--font-body);
17
+   color: var(--color-text);
18
+}
19
+
20
+body {
21
+   min-height: 100vh;
22
+   margin: 0;
23
+   background-attachment: fixed;
24
+   background-color: var(--color-bg-1);
25
+   background-size: 100vw 100vh;
26
+   background-image: radial-gradient(
27
+           50% 50% at 50% 50%,
28
+           rgba(255, 255, 255, 0.75) 0%,
29
+           rgba(255, 255, 255, 0) 100%
30
+       ),
31
+       linear-gradient(180deg, var(--color-bg-0) 0%, var(--color-bg-1) 15%, var(--color-bg-2) 50%);
32
+}
33
+
34
+h1,
35
+h2,
36
+p {
37
+   font-weight: 400;
38
+}
39
+
40
+p {
41
+   line-height: 1.5;
42
+}
43
+
44
+a {
45
+   color: var(--color-theme-1);
46
+   text-decoration: none;
47
+}
48
+
49
+a:hover {
50
+   text-decoration: underline;
51
+}
52
+
53
+h1 {
54
+   font-size: 2rem;
55
+   text-align: center;
56
+}
57
+
58
+h2 {
59
+   font-size: 1rem;
60
+}
61
+
62
+pre {
63
+   font-size: 16px;
64
+   font-family: var(--font-mono);
65
+   background-color: rgba(255, 255, 255, 0.45);
66
+   border-radius: 3px;
67
+   box-shadow: 2px 2px 6px rgb(255 255 255 / 25%);
68
+   padding: 0.5em;
69
+   overflow-x: auto;
70
+   color: var(--color-text);
71
+}
72
+
73
+.text-column {
74
+   display: flex;
75
+   max-width: 48rem;
76
+   flex: 0.6;
77
+   flex-direction: column;
78
+   justify-content: center;
79
+   margin: 0 auto;
80
+}
81
+
82
+input,
83
+button {
84
+   font-size: inherit;
85
+   font-family: inherit;
86
+}
87
+
88
+button:focus:not(:focus-visible) {
89
+   outline: none;
90
+}
91
+
92
+@media (min-width: 720px) {
93
+   h1 {
94
+       font-size: 2.4rem;
95
+   }
96
+}
97
+
98
+.visually-hidden {
99
+   border: 0;
100
+   clip: rect(0 0 0 0);
101
+   height: auto;
102
+   margin: 0;
103
+   overflow: hidden;
104
+   padding: 0;
105
+   position: absolute;
106
+   width: 1px;
107
+   white-space: nowrap;
108
+}
109
obs-backgroundremoval-1.1.13.tar.gz/pages/src/routes/ubuntu Added
2
 
1
+(directory)
2
obs-backgroundremoval-1.1.13.tar.gz/pages/src/routes/ubuntu/+page.server.ts Added
8
 
1
@@ -0,0 +1,6 @@
2
+import { getLatestReleaseMetadata } from '../../lib/github-release';
3
+
4
+/** @type {import('./$types').PageLoad} */
5
+export async function load() {
6
+   return { metadata: await getLatestReleaseMetadata() };
7
+}
8
obs-backgroundremoval-1.1.13.tar.gz/pages/src/routes/ubuntu/+page.svelte Added
30
 
1
@@ -0,0 +1,28 @@
2
+<script>
3
+   import { base } from '$app/paths';
4
+   /** @type {import('./$types').PageData} */
5
+   export let data;
6
+   const asset = data.metadata.assets.find((e) => /x86_64-linux-gnu\.deb/.test(e.name));
7
+   if (!asset) throw new Error('Ubuntu asset not found!');
8
+</script>
9
+
10
+<svelte:head>
11
+   <title>How to use OBS Background Removal on Ubuntu Linux</title>
12
+   <meta name="description" content="How to use OBS Background Removal on Ubuntu Linux" />
13
+</svelte:head>
14
+
15
+<div class="text-column">
16
+   <h1>Download and install on Ubuntu Linux</h1>
17
+
18
+   <p><a href="https://obsproject.com/ja/download">Install the latest OBS from PPA</a></p>
19
+
20
+   <p><a href={asset.browser_download_url}>Download the deb package for Ubuntu Linux</a></p>
21
+
22
+   <p>Install {asset.name}</p>
23
+
24
+   <p>See the <a href="{base}/usage">usage page</a> for how to use the plugin</p>
25
+
26
+   <p>All set!</p>
27
+
28
+   <p><a href="{base}/">Back to the top page</a></p>
29
+</div>
30
obs-backgroundremoval-1.1.13.tar.gz/pages/src/routes/ubuntu/+page.ts Added
11
 
1
@@ -0,0 +1,9 @@
2
+import { dev } from '$app/environment';
3
+
4
+// we don't need any JS on this page, though we'll load
5
+// it in dev so that we get hot module replacement
6
+export const csr = dev;
7
+
8
+// since there's no dynamic data here, we can prerender
9
+// it so that it gets served as a static asset in production
10
+export const prerender = true;
11
obs-backgroundremoval-1.1.13.tar.gz/pages/src/routes/usage Added
2
 
1
+(directory)
2
obs-backgroundremoval-1.1.13.tar.gz/pages/src/routes/usage/+page.svelte Added
68
 
1
@@ -0,0 +1,66 @@
2
+<script>
3
+    import { base } from '$app/paths';
4
+    import addAVideoCaptureSource from '$lib/images/addAVideoCaptureSource.png';
5
+    import addBackgroundRemoval from '$lib/images/addBackgroundRemoval.png';
6
+    import captureFilters from '$lib/images/captureFilters.png';
7
+    import filterSettings from '$lib/images/filterSettings.png';
8
+    import filterSettingsAdvanced from '$lib/images/filterSettingsAdvanced.png';
9
+    import installWizard from '$lib/images/installWizard.png';
10
+    import runUnkPublisher from '$lib/images/runUnkPublisher.png';
11
+</script>
12
+
13
+<svelte:head>
14
+    <title>How to use OBS Background Removal</title>
15
+    <meta name="description" content="How to use OBS Background Removal" />
16
+</svelte:head>
17
+
18
+<div class="text-column">
19
+    <h1>Using OBS Background Removal</h1>
20
+
21
+    <p>Start OBS</p>
22
+
23
+    <p>Optionally add a video capture source. The plugin works on any source that provides an image render: Video,
24
+        Image, Media, Browser, Screen Capture, etc.</p>
25
+
26
+    <p><img src={addAVideoCaptureSource} width="400" /></p>
27
+
28
+    <p>Open the filters dialog on that source</p>
29
+
30
+    <p><img src={captureFilters} width="400" /></p>
31
+
32
+    <p>Add the Background Removal filter on the Effects filter. If you can't see the filter then the installation
33
+        process failed, or there is incompatibility with your OBS.</p>
34
+
35
+    <p><img src={addBackgroundRemoval} width="400" /></p>
36
+
37
+    <p>View the BG Removal filter settings</p>
38
+
39
+    <p><img src={filterSettings} width="400" /></p>
40
+
41
+    <p>Optionally use the advanced settings to change the behavior of the filter</p>
42
+
43
+    <p><img src={filterSettingsAdvanced} width="400" /></p>
44
+
45
+    <p>
46
+        Advice on how to get the best results:
47
+        <ul>
48
+            <li>Use a good camera, and good lighting.</li>
49
+            <li>The Mediapipe model is the fastest, but may not be the highest accuracy. We recommend setting the thresold
50
+                very low, like 0.05, to capture the whole portrait.</li>
51
+            <li>The Robust Video Matting (RVM) model gives the highest accuracy and also least "flickering", but it's not
52
+                the fastest.</li>
53
+            <li>The TCMonoDepth is a depth estimation model, not a background segmentation model, and can be used both for
54
+                portrait segmentation as well as "Depth of Field" blur effect. See the <a
55
+                    href="https://youtu.be/jC3EKSpNjQk" target="_blank">tutorial/preview</a>.</li>
56
+            <li>The RMBG model is a general background Removal model for any object, not just for humans. See the
57
+                <a href="https://youtu.be/N74VCDCToX8">tutorial/preview</a>.</li>
58
+        </ul>
59
+
60
+    <p>
61
+        View our tutorial videos <a href="https://youtu.be/veqNEsMqEE0">here</a>
62
+    </p>
63
+
64
+    <p>All set!</p>
65
+
66
+    <p><a href="{base}/">Back to the top page</a></p>
67
+</div>
68
obs-backgroundremoval-1.1.13.tar.gz/pages/src/routes/usage/+page.ts Added
11
 
1
@@ -0,0 +1,9 @@
2
+import { dev } from '$app/environment';
3
+
4
+// we don't need any JS on this page, though we'll load
5
+// it in dev so that we get hot module replacement
6
+export const csr = dev;
7
+
8
+// since there's no dynamic data here, we can prerender
9
+// it so that it gets served as a static asset in production
10
+export const prerender = true;
11
obs-backgroundremoval-1.1.13.tar.gz/pages/src/routes/windows Added
2
 
1
+(directory)
2
obs-backgroundremoval-1.1.13.tar.gz/pages/src/routes/windows/+page.server.ts Added
8
 
1
@@ -0,0 +1,6 @@
2
+import { getLatestReleaseMetadata } from '../../lib/github-release';
3
+
4
+/** @type {import('./$types').PageLoad} */
5
+export async function load() {
6
+   return { metadata: await getLatestReleaseMetadata() };
7
+}
8
obs-backgroundremoval-1.1.13.tar.gz/pages/src/routes/windows/+page.svelte Added
54
 
1
@@ -0,0 +1,52 @@
2
+<script>
3
+   import { base } from '$app/paths';
4
+   /** @type {import('./$types').PageData} */
5
+   export let data;
6
+   const asset = data.metadata.assets.find((e) => /windows-x64-Installer\.exe/.test(e.name));
7
+   if (!asset) throw new Error('Windows asset not found!');
8
+    import addAVideoCaptureSource from '$lib/images/addAVideoCaptureSource.png';
9
+    import addBackgroundRemoval from '$lib/images/addBackgroundRemoval.png';
10
+    import captureFilters from '$lib/images/captureFilters.png';
11
+    import filterSettings from '$lib/images/filterSettings.png';
12
+    import filterSettingsAdvanced from '$lib/images/filterSettingsAdvanced.png';
13
+    import installWizard from '$lib/images/installWizard.png';
14
+    import runUnkPublisher from '$lib/images/runUnkPublisher.png';
15
+    import checkDll from '$lib/images/checkDll.png';
16
+</script>
17
+
18
+<svelte:head>
19
+   <title>How to use OBS Background Removal on Windows</title>
20
+   <meta name="description" content="How to use OBS Background Removal on Windows" />
21
+</svelte:head>
22
+
23
+<div class="text-column">
24
+   <h1>Download and install on Windows</h1>
25
+
26
+    <p>The plugin supports OBS v29.x+ and a 64bit Windows</p>
27
+
28
+   <p><a href="https://obsproject.com/ja/download">Downlaod and install the latest OBS for 64bit</a></p>
29
+
30
+   <p><a href={asset.browser_download_url}>Download the installer for Windows</a></p>
31
+
32
+   <p>Execute {asset.name}. Allow it to run even if the publisher is unknown.</p>
33
+
34
+    <p><img src={runUnkPublisher} width="400" /></p>
35
+
36
+    <p>Follow the install wizard</p>
37
+
38
+    <p><img src={installWizard} width="400" /></p>
39
+
40
+    <p>Optionally ensure that the obs-backgroundremoval.dll exists in the OBS plugins folder:</p>
41
+
42
+    <p><code>C:\Program Files\obs-studio\obs-plugins\64bit\obs-backgroundremoval.dll</code></p>
43
+
44
+    <p><img src="{checkDll}" width="400" /></p>
45
+
46
+    <p>If your OBS is installed in <code>C:\Program Files (x86)\obs-studio</code> then consider re-installing the latest version of OBS 64bit.</p>
47
+
48
+   <p>See the <a href="{base}/usage">usage page</a> for how to use the plugin</p>
49
+
50
+   <p>All set!</p>
51
+
52
+   <p><a href="{base}/">Back to the top page</a></p>
53
+</div>
54
obs-backgroundremoval-1.1.13.tar.gz/pages/src/routes/windows/+page.ts Added
11
 
1
@@ -0,0 +1,9 @@
2
+import { dev } from '$app/environment';
3
+
4
+// we don't need any JS on this page, though we'll load
5
+// it in dev so that we get hot module replacement
6
+export const csr = dev;
7
+
8
+// since there's no dynamic data here, we can prerender
9
+// it so that it gets served as a static asset in production
10
+export const prerender = true;
11
obs-backgroundremoval-1.1.13.tar.gz/pages/static Added
2
 
1
+(directory)
2
obs-backgroundremoval-1.1.13.tar.gz/pages/static/favicon.png Added
obs-backgroundremoval-1.1.13.tar.gz/pages/static/robots.txt Added
5
 
1
@@ -0,0 +1,3 @@
2
+# https://www.robotstxt.org/robotstxt.html
3
+User-agent: *
4
+Disallow:
5
obs-backgroundremoval-1.1.13.tar.gz/pages/svelte.config.js Added
19
 
1
@@ -0,0 +1,17 @@
2
+import adapter from '@sveltejs/adapter-static';
3
+import { vitePreprocess } from '@sveltejs/kit/vite';
4
+
5
+/** @type {import('@sveltejs/kit').Config} */
6
+const config = {
7
+   preprocess: vitePreprocess(),
8
+
9
+   kit: {
10
+       adapter: adapter(),
11
+
12
+       paths: {
13
+           base: '/obs-backgroundremoval'
14
+       }
15
+   }
16
+};
17
+
18
+export default config;
19
obs-backgroundremoval-1.1.13.tar.gz/pages/tsconfig.json Added
19
 
1
@@ -0,0 +1,17 @@
2
+{
3
+   "extends": "./.svelte-kit/tsconfig.json",
4
+   "compilerOptions": {
5
+       "allowJs": true,
6
+       "checkJs": true,
7
+       "esModuleInterop": true,
8
+       "forceConsistentCasingInFileNames": true,
9
+       "resolveJsonModule": true,
10
+       "skipLibCheck": true,
11
+       "sourceMap": true,
12
+       "strict": true
13
+   }
14
+   // Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias
15
+   //
16
+   // If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes
17
+   // from the referenced tsconfig.json - TypeScript does not merge them in
18
+}
19
obs-backgroundremoval-1.1.13.tar.gz/pages/vite.config.ts Added
8
 
1
@@ -0,0 +1,6 @@
2
+import { sveltekit } from '@sveltejs/kit/vite';
3
+import { defineConfig } from 'vite';
4
+
5
+export default defineConfig({
6
+   plugins: sveltekit()
7
+});
8
obs-backgroundremoval-1.1.13.tar.gz/patch_libobs.diff Added
14
 
1
@@ -0,0 +1,12 @@
2
+diff --git a/libobs/CMakeLists.txt b/libobs/CMakeLists.txt
3
+index d2e2671..a08d948 100644
4
+--- a/libobs/CMakeLists.txt
5
++++ b/libobs/CMakeLists.txt
6
+@@ -287,6 +287,7 @@ set(public_headers
7
+     util/base.h
8
+     util/bmem.h
9
+     util/c99defs.h
10
++    util/config-file.h
11
+     util/darray.h
12
+     util/profiler.h
13
+     util/sse-intrin.h
14
obs-backgroundremoval-1.1.6.tar.gz/src/FilterData.h -> obs-backgroundremoval-1.1.13.tar.gz/src/FilterData.h Changed
13
 
1
@@ -30,9 +30,9 @@
2
    std::mutex outputLock;
3
 
4
 #if _WIN32
5
-   const wchar_t *modelFilepath = nullptr;
6
+   std::wstring modelFilepath;
7
 #else
8
-   const char *modelFilepath = nullptr;
9
+   std::string modelFilepath;
10
 #endif
11
 };
12
 
13
obs-backgroundremoval-1.1.6.tar.gz/src/background-filter.cpp -> obs-backgroundremoval-1.1.13.tar.gz/src/background-filter.cpp Changed
577
 
1
@@ -14,6 +14,8 @@
2
 #include <fstream>
3
 #include <new>
4
 #include <mutex>
5
+#include <regex>
6
+#include <thread>
7
 
8
 #include <plugin-support.h>
9
 #include "models/ModelSINET.h"
10
@@ -22,10 +24,12 @@
11
 #include "models/ModelRVM.h"
12
 #include "models/ModelPPHumanSeg.h"
13
 #include "models/ModelTCMonoDepth.h"
14
+#include "models/ModelRMBG.h"
15
 #include "FilterData.h"
16
 #include "ort-utils/ort-session-utils.h"
17
 #include "obs-utils/obs-utils.h"
18
 #include "consts.h"
19
+#include "update-checker/update-checker.h"
20
 
21
 struct background_removal_filter : public filter_data {
22
    bool enableThreshold = true;
23
@@ -36,17 +40,26 @@
24
    float feather = 0.0f;
25
 
26
    cv::Mat backgroundMask;
27
+   cv::Mat lastBackgroundMask;
28
+   cv::Mat lastImageBGRA;
29
+   float temporalSmoothFactor = 0.0f;
30
+   float imageSimilarityThreshold = 35.0f;
31
+   bool enableImageSimilarity = true;
32
    int maskEveryXFrames = 1;
33
    int maskEveryXFramesCount = 0;
34
    int64_t blurBackground = 0;
35
-   bool enableFocalBlur = true;
36
+   bool enableFocalBlur = false;
37
    float blurFocusPoint = 0.1f;
38
    float blurFocusDepth = 0.1f;
39
 
40
    gs_effect_t *effect;
41
    gs_effect_t *kawaseBlurEffect;
42
+
43
+   std::mutex modelMutex;
44
 };
45
 
46
+void background_removal_thread(void *data); // Forward declaration
47
+
48
 const char *background_filter_getname(void *unused)
49
 {
50
    UNUSED_PARAMETER(unused);
51
@@ -55,18 +68,60 @@
52
 
53
 /**                   PROPERTIES                     */
54
 
55
+static bool visible_on_bool(obs_properties_t *ppts, obs_data_t *settings,
56
+               const char *bool_prop, const char *prop_name)
57
+{
58
+   const bool enabled = obs_data_get_bool(settings, bool_prop);
59
+   obs_property_t *p = obs_properties_get(ppts, prop_name);
60
+   obs_property_set_visible(p, enabled);
61
+   return true;
62
+}
63
+
64
 static bool enable_threshold_modified(obs_properties_t *ppts, obs_property_t *p,
65
                      obs_data_t *settings)
66
 {
67
-   const bool enabled = obs_data_get_bool(settings, "enable_threshold");
68
-   p = obs_properties_get(ppts, "threshold");
69
-   obs_property_set_visible(p, enabled);
70
-   p = obs_properties_get(ppts, "contour_filter");
71
-   obs_property_set_visible(p, enabled);
72
-   p = obs_properties_get(ppts, "smooth_contour");
73
-   obs_property_set_visible(p, enabled);
74
-   p = obs_properties_get(ppts, "feather");
75
-   obs_property_set_visible(p, enabled);
76
+   UNUSED_PARAMETER(p);
77
+   return visible_on_bool(ppts, settings, "enable_threshold",
78
+                  "threshold_group");
79
+}
80
+
81
+static bool enable_focal_blur(obs_properties_t *ppts, obs_property_t *p,
82
+                 obs_data_t *settings)
83
+{
84
+   UNUSED_PARAMETER(p);
85
+   return visible_on_bool(ppts, settings, "enable_focal_blur",
86
+                  "focal_blur_group");
87
+}
88
+
89
+static bool enable_image_similarity(obs_properties_t *ppts, obs_property_t *p,
90
+                   obs_data_t *settings)
91
+{
92
+   UNUSED_PARAMETER(p);
93
+   return visible_on_bool(ppts, settings, "enable_image_similarity",
94
+                  "image_similarity_threshold");
95
+}
96
+
97
+static bool enable_advanced_settings(obs_properties_t *ppts, obs_property_t *p,
98
+                    obs_data_t *settings)
99
+{
100
+   const bool enabled = obs_data_get_bool(settings, "advanced");
101
+   p = obs_properties_get(ppts, "blur_background");
102
+   obs_property_set_visible(p, true);
103
+
104
+   for (const char *prop_name :
105
+        {"model_select", "useGPU", "mask_every_x_frames", "numThreads",
106
+         "enable_focal_blur", "enable_threshold", "threshold_group",
107
+         "focal_blur_group", "temporal_smooth_factor",
108
+         "image_similarity_threshold", "enable_image_similarity"}) {
109
+       p = obs_properties_get(ppts, prop_name);
110
+       obs_property_set_visible(p, enabled);
111
+   }
112
+
113
+   if (enabled) {
114
+       enable_threshold_modified(ppts, p, settings);
115
+       enable_focal_blur(ppts, p, settings);
116
+       enable_image_similarity(ppts, p, settings);
117
+   }
118
 
119
    return true;
120
 }
121
@@ -75,28 +130,41 @@
122
 {
123
    obs_properties_t *props = obs_properties_create();
124
 
125
+   obs_property_t *advanced = obs_properties_add_bool(
126
+       props, "advanced", obs_module_text("Advanced"));
127
+
128
+   // If advanced is selected show the advanced settings, otherwise hide them
129
+   obs_property_set_modified_callback(advanced, enable_advanced_settings);
130
+
131
    /* Threshold props */
132
    obs_property_t *p_enable_threshold = obs_properties_add_bool(
133
        props, "enable_threshold", obs_module_text("EnableThreshold"));
134
    obs_property_set_modified_callback(p_enable_threshold,
135
                       enable_threshold_modified);
136
 
137
-   obs_properties_add_float_slider(props, "threshold",
138
+   // Threshold props group
139
+   obs_properties_t *threshold_props = obs_properties_create();
140
+
141
+   obs_properties_add_float_slider(threshold_props, "threshold",
142
                    obs_module_text("Threshold"), 0.0, 1.0,
143
                    0.025);
144
 
145
    obs_properties_add_float_slider(
146
-       props, "contour_filter",
147
+       threshold_props, "contour_filter",
148
        obs_module_text("ContourFilterPercentOfImage"), 0.0, 1.0,
149
        0.025);
150
 
151
-   obs_properties_add_float_slider(props, "smooth_contour",
152
+   obs_properties_add_float_slider(threshold_props, "smooth_contour",
153
                    obs_module_text("SmoothSilhouette"),
154
                    0.0, 1.0, 0.05);
155
 
156
    obs_properties_add_float_slider(
157
-       props, "feather", obs_module_text("FeatherBlendSilhouette"),
158
-       0.0, 1.0, 0.05);
159
+       threshold_props, "feather",
160
+       obs_module_text("FeatherBlendSilhouette"), 0.0, 1.0, 0.05);
161
+
162
+   obs_properties_add_group(props, "threshold_group",
163
+                obs_module_text("ThresholdGroup"),
164
+                OBS_GROUP_NORMAL, threshold_props);
165
 
166
    /* GPU, CPU and performance Props */
167
    obs_property_t *p_use_gpu = obs_properties_add_list(
168
@@ -145,6 +213,22 @@
169
    obs_property_list_add_string(p_model_select,
170
                     obs_module_text("TCMonoDepth"),
171
                     MODEL_DEPTH_TCMONODEPTH);
172
+   obs_property_list_add_string(p_model_select, obs_module_text("RMBG"),
173
+                    MODEL_RMBG);
174
+
175
+   obs_properties_add_float_slider(props, "temporal_smooth_factor",
176
+                   obs_module_text("TemporalSmoothFactor"),
177
+                   0.0, 1.0, 0.01);
178
+
179
+   obs_property_t *p_enable_image_similarity = obs_properties_add_bool(
180
+       props, "enable_image_similarity",
181
+       obs_module_text("EnableImageSimilarity"));
182
+   obs_property_set_modified_callback(p_enable_image_similarity,
183
+                      enable_image_similarity);
184
+
185
+   obs_properties_add_float_slider(
186
+       props, "image_similarity_threshold",
187
+       obs_module_text("ImageSimilarityThreshold"), 0.0, 100.0, 1.0);
188
 
189
    /* Background Blur Props */
190
    obs_properties_add_int_slider(
191
@@ -154,34 +238,43 @@
192
 
193
    obs_property_t *p_enable_focal_blur = obs_properties_add_bool(
194
        props, "enable_focal_blur", obs_module_text("EnableFocalBlur"));
195
-   obs_property_set_modified_callback(
196
-       p_enable_focal_blur,
197
-       (obs_properties_t *ppts, obs_property_t *p,
198
-          obs_data_t *settings) {
199
-           UNUSED_PARAMETER(p);
200
-           const bool enabled = obs_data_get_bool(
201
-               settings, "enable_focal_blur");
202
-           obs_property_t *prop =
203
-               obs_properties_get(ppts, "blur_focus_point");
204
-           obs_property_set_visible(prop, enabled);
205
-           prop = obs_properties_get(ppts, "blur_focus_depth");
206
-           obs_property_set_visible(prop, enabled);
207
-           return true;
208
-       });
209
-
210
-   obs_properties_add_float_slider(props, "blur_focus_point",
211
+   obs_property_set_modified_callback(p_enable_focal_blur,
212
+                      enable_focal_blur);
213
+
214
+   obs_properties_t *focal_blur_props = obs_properties_create();
215
+
216
+   obs_properties_add_float_slider(focal_blur_props, "blur_focus_point",
217
                    obs_module_text("BlurFocusPoint"), 0.0,
218
                    1.0, 0.05);
219
-   obs_properties_add_float_slider(props, "blur_focus_depth",
220
+   obs_properties_add_float_slider(focal_blur_props, "blur_focus_depth",
221
                    obs_module_text("BlurFocusDepth"), 0.0,
222
                    0.3, 0.02);
223
 
224
+   obs_properties_add_group(props, "focal_blur_group",
225
+                obs_module_text("FocalBlurGroup"),
226
+                OBS_GROUP_NORMAL, focal_blur_props);
227
+
228
+   // Add a informative text about the plugin
229
+   // replace the placeholder with the current version
230
+   // use std::regex_replace instead of QString::arg because the latter doesn't work on Linux
231
+   std::string basic_info = std::regex_replace(
232
+       PLUGIN_INFO_TEMPLATE, std::regex("%1"), PLUGIN_VERSION);
233
+   // Check for update
234
+   if (get_latest_version() != nullptr) {
235
+       basic_info += std::regex_replace(
236
+           PLUGIN_INFO_TEMPLATE_UPDATE_AVAILABLE, std::regex("%1"),
237
+           get_latest_version());
238
+   }
239
+   obs_properties_add_text(props, "info", basic_info.c_str(),
240
+               OBS_TEXT_INFO);
241
+
242
    UNUSED_PARAMETER(data);
243
    return props;
244
 }
245
 
246
 void background_filter_defaults(obs_data_t *settings)
247
 {
248
+   obs_data_set_default_bool(settings, "advanced", false);
249
    obs_data_set_default_bool(settings, "enable_threshold", true);
250
    obs_data_set_default_double(settings, "threshold", 0.5);
251
    obs_data_set_default_double(settings, "contour_filter", 0.05);
252
@@ -199,15 +292,23 @@
253
    obs_data_set_default_int(settings, "mask_every_x_frames", 1);
254
    obs_data_set_default_int(settings, "blur_background", 0);
255
    obs_data_set_default_int(settings, "numThreads", 1);
256
-   obs_data_set_default_bool(settings, "enable_focal_blur", true);
257
+   obs_data_set_default_bool(settings, "enable_focal_blur", false);
258
+   obs_data_set_default_double(settings, "temporal_smooth_factor", 0.85);
259
+   obs_data_set_default_double(settings, "image_similarity_threshold",
260
+                   35.0);
261
+   obs_data_set_default_bool(settings, "enable_image_similarity", true);
262
    obs_data_set_default_double(settings, "blur_focus_point", 0.1);
263
    obs_data_set_default_double(settings, "blur_focus_depth", 0.0);
264
 }
265
 
266
 void background_filter_update(void *data, obs_data_t *settings)
267
 {
268
+   obs_log(LOG_INFO, "Background filter updated");
269
    struct background_removal_filter *tf =
270
        reinterpret_cast<background_removal_filter *>(data);
271
+
272
+   tf->isDisabled = true;
273
+
274
    tf->enableThreshold =
275
        (float)obs_data_get_bool(settings, "enable_threshold");
276
    tf->threshold = (float)obs_data_get_double(settings, "threshold");
277
@@ -227,6 +328,12 @@
278
        (float)obs_data_get_double(settings, "blur_focus_point");
279
    tf->blurFocusDepth =
280
        (float)obs_data_get_double(settings, "blur_focus_depth");
281
+   tf->temporalSmoothFactor =
282
+       (float)obs_data_get_double(settings, "temporal_smooth_factor");
283
+   tf->imageSimilarityThreshold = (float)obs_data_get_double(
284
+       settings, "image_similarity_threshold");
285
+   tf->enableImageSimilarity =
286
+       (float)obs_data_get_bool(settings, "enable_image_similarity");
287
 
288
    const std::string newUseGpu = obs_data_get_string(settings, "useGPU");
289
    const std::string newModel =
290
@@ -236,6 +343,9 @@
291
 
292
    if (tf->modelSelection.empty() || tf->modelSelection != newModel ||
293
        tf->useGPU != newUseGpu || tf->numThreads != newNumThreads) {
294
+       // lock modelMutex
295
+       std::unique_lock<std::mutex> lock(tf->modelMutex);
296
+
297
        // Re-initialize model if it's not already the selected one or switching inference device
298
        tf->modelSelection = newModel;
299
        tf->useGPU = newUseGpu;
300
@@ -259,8 +369,20 @@
301
        if (tf->modelSelection == MODEL_DEPTH_TCMONODEPTH) {
302
            tf->model.reset(new ModelTCMonoDepth);
303
        }
304
+       if (tf->modelSelection == MODEL_RMBG) {
305
+           tf->model.reset(new ModelRMBG);
306
+       }
307
 
308
-       createOrtSession(tf);
309
+       int ortSessionResult = createOrtSession(tf);
310
+       if (ortSessionResult != OBS_BGREMOVAL_ORT_SESSION_SUCCESS) {
311
+           obs_log(LOG_ERROR,
312
+               "Failed to create ONNXRuntime session. Error code: %d",
313
+               ortSessionResult);
314
+           // disable filter
315
+           tf->isDisabled = true;
316
+           tf->model.reset();
317
+           return;
318
+       }
319
    }
320
 
321
    obs_enter_graphics();
322
@@ -277,10 +399,44 @@
323
    bfree(kawaseBlurEffectPath);
324
 
325
    obs_leave_graphics();
326
+
327
+   // Log the currently selected options
328
+   obs_log(LOG_INFO, "Background Removal Filter Options:");
329
+   // name of the source that the filter is attached to
330
+   obs_log(LOG_INFO, "  Source: %s", obs_source_get_name(tf->source));
331
+   obs_log(LOG_INFO, "  Model: %s", tf->modelSelection.c_str());
332
+   obs_log(LOG_INFO, "  Inference Device: %s", tf->useGPU.c_str());
333
+   obs_log(LOG_INFO, "  Num Threads: %d", tf->numThreads);
334
+   obs_log(LOG_INFO, "  Enable Threshold: %s",
335
+       tf->enableThreshold ? "true" : "false");
336
+   obs_log(LOG_INFO, "  Threshold: %f", tf->threshold);
337
+   obs_log(LOG_INFO, "  Contour Filter: %f", tf->contourFilter);
338
+   obs_log(LOG_INFO, "  Smooth Contour: %f", tf->smoothContour);
339
+   obs_log(LOG_INFO, "  Feather: %f", tf->feather);
340
+   obs_log(LOG_INFO, "  Mask Every X Frames: %d", tf->maskEveryXFrames);
341
+   obs_log(LOG_INFO, "  Enable Image Similarity: %s",
342
+       tf->enableImageSimilarity ? "true" : "false");
343
+   obs_log(LOG_INFO, "  Image Similarity Threshold: %f",
344
+       tf->imageSimilarityThreshold);
345
+   obs_log(LOG_INFO, "  Blur Background: %d", tf->blurBackground);
346
+   obs_log(LOG_INFO, "  Enable Focal Blur: %s",
347
+       tf->enableFocalBlur ? "true" : "false");
348
+   obs_log(LOG_INFO, "  Blur Focus Point: %f", tf->blurFocusPoint);
349
+   obs_log(LOG_INFO, "  Blur Focus Depth: %f", tf->blurFocusDepth);
350
+   obs_log(LOG_INFO, "  Disabled: %s", tf->isDisabled ? "true" : "false");
351
+#ifdef _WIN32
352
+   obs_log(LOG_INFO, "  Model file path: %S", tf->modelFilepath.c_str());
353
+#else
354
+   obs_log(LOG_INFO, "  Model file path: %s", tf->modelFilepath.c_str());
355
+#endif
356
+
357
+   // enable
358
+   tf->isDisabled = false;
359
 }
360
 
361
 void background_filter_activate(void *data)
362
 {
363
+   obs_log(LOG_INFO, "Background filter activated");
364
    struct background_removal_filter *tf =
365
        reinterpret_cast<background_removal_filter *>(data);
366
    tf->isDisabled = false;
367
@@ -288,6 +444,7 @@
368
 
369
 void background_filter_deactivate(void *data)
370
 {
371
+   obs_log(LOG_INFO, "Background filter deactivated");
372
    struct background_removal_filter *tf =
373
        reinterpret_cast<background_removal_filter *>(data);
374
    tf->isDisabled = true;
375
@@ -297,6 +454,7 @@
376
 
377
 void *background_filter_create(obs_data_t *settings, obs_source_t *source)
378
 {
379
+   obs_log(LOG_INFO, "Background filter created");
380
    void *data = bmalloc(sizeof(struct background_removal_filter));
381
    struct background_removal_filter *tf = new (data)
382
        background_removal_filter();
383
@@ -316,10 +474,14 @@
384
 
385
 void background_filter_destroy(void *data)
386
 {
387
+   obs_log(LOG_INFO, "Background filter destroyed");
388
+
389
    struct background_removal_filter *tf =
390
        reinterpret_cast<background_removal_filter *>(data);
391
 
392
    if (tf) {
393
+       tf->isDisabled = true;
394
+
395
        obs_enter_graphics();
396
        gs_texrender_destroy(tf->texrender);
397
        if (tf->stagesurface) {
398
@@ -356,6 +518,8 @@
399
 
400
 void background_filter_video_tick(void *data, float seconds)
401
 {
402
+   UNUSED_PARAMETER(seconds);
403
+
404
    struct background_removal_filter *tf =
405
        reinterpret_cast<background_removal_filter *>(data);
406
 
407
@@ -367,7 +531,8 @@
408
        return;
409
    }
410
 
411
-   if (tf->inputBGRA.empty()) {
412
+   if (!tf->model) {
413
+       obs_log(LOG_ERROR, "Model is not initialized");
414
        return;
415
    }
416
 
417
@@ -376,11 +541,30 @@
418
        std::unique_lock<std::mutex> lock(tf->inputBGRALock,
419
                          std::try_to_lock);
420
        if (!lock.owns_lock()) {
421
+           // No data to process
422
+           return;
423
+       }
424
+       if (tf->inputBGRA.empty()) {
425
+           // No data to process
426
            return;
427
        }
428
        imageBGRA = tf->inputBGRA.clone();
429
    }
430
 
431
+   if (tf->enableImageSimilarity) {
432
+       if (!tf->lastImageBGRA.empty() && !imageBGRA.empty() &&
433
+           tf->lastImageBGRA.size() == imageBGRA.size()) {
434
+           // calculate PSNR
435
+           double psnr = cv::PSNR(tf->lastImageBGRA, imageBGRA);
436
+
437
+           if (psnr > tf->imageSimilarityThreshold) {
438
+               // The image is almost the same as the previous one. Skip processing.
439
+               return;
440
+           }
441
+       }
442
+       tf->lastImageBGRA = imageBGRA.clone();
443
+   }
444
+
445
    if (tf->backgroundMask.empty()) {
446
        // First frame. Initialize the background mask.
447
        tf->backgroundMask =
448
@@ -399,9 +583,45 @@
449
        } else {
450
            cv::Mat backgroundMask;
451
 
452
-           // Process the image to find the mask.
453
-           processImageForBackground(tf, imageBGRA,
454
-                         backgroundMask);
455
+           {
456
+               std::unique_lock<std::mutex> lock(
457
+                   tf->modelMutex);
458
+               // Process the image to find the mask.
459
+               processImageForBackground(tf, imageBGRA,
460
+                             backgroundMask);
461
+           }
462
+
463
+           if (backgroundMask.empty()) {
464
+               // Something went wrong. Just use the previous mask.
465
+               obs_log(LOG_WARNING,
466
+                   "Background mask is empty. This shouldn't happen. Using previous mask.");
467
+               return;
468
+           }
469
+
470
+           // Temporal smoothing
471
+           if (tf->temporalSmoothFactor > 0.0 &&
472
+               tf->temporalSmoothFactor < 1.0 &&
473
+               !tf->lastBackgroundMask.empty() &&
474
+               tf->lastBackgroundMask.size() ==
475
+                   backgroundMask.size()) {
476
+
477
+               float temporalSmoothFactor =
478
+                   tf->temporalSmoothFactor;
479
+               if (tf->enableThreshold) {
480
+                   // The temporal smooth factor can't be smaller than the threshold
481
+                   temporalSmoothFactor =
482
+                       std::max(temporalSmoothFactor,
483
+                            tf->threshold);
484
+               }
485
+
486
+               cv::addWeighted(backgroundMask,
487
+                       temporalSmoothFactor,
488
+                       tf->lastBackgroundMask,
489
+                       1.0 - temporalSmoothFactor, 0.0,
490
+                       backgroundMask);
491
+           }
492
+
493
+           tf->lastBackgroundMask = backgroundMask.clone();
494
 
495
            // Contour processing
496
            // Only applicable if we are thresholding (and get a binary image)
497
@@ -471,13 +691,11 @@
498
            backgroundMask.copyTo(tf->backgroundMask);
499
        }
500
    } catch (const Ort::Exception &e) {
501
-       blog(LOG_ERROR, "ONNXRuntime Exception: %s", e.what());
502
+       obs_log(LOG_ERROR, "ONNXRuntime Exception: %s", e.what());
503
        // TODO: Fall back to CPU if it makes sense
504
    } catch (const std::exception &e) {
505
-       blog(LOG_ERROR, "%s", e.what());
506
+       obs_log(LOG_ERROR, "%s", e.what());
507
    }
508
-
509
-   UNUSED_PARAMETER(seconds);
510
 }
511
 
512
 static gs_texture_t *blur_background(struct background_removal_filter *tf,
513
@@ -511,8 +729,8 @@
514
    for (int i = 0; i < (int)tf->blurBackground; i++) {
515
        gs_texrender_reset(tf->texrender);
516
        if (!gs_texrender_begin(tf->texrender, width, height)) {
517
-           blog(LOG_INFO,
518
-                "Could not open background blur texrender!");
519
+           obs_log(LOG_INFO,
520
+               "Could not open background blur texrender!");
521
            return blurredTexture;
522
        }
523
 
524
@@ -554,15 +772,26 @@
525
    struct background_removal_filter *tf =
526
        reinterpret_cast<background_removal_filter *>(data);
527
 
528
+   if (tf->isDisabled) {
529
+       if (tf->source) {
530
+           obs_source_skip_video_filter(tf->source);
531
+       }
532
+       return;
533
+   }
534
+
535
    uint32_t width, height;
536
    if (!getRGBAFromStageSurface(tf, width, height)) {
537
-       obs_source_skip_video_filter(tf->source);
538
+       if (tf->source) {
539
+           obs_source_skip_video_filter(tf->source);
540
+       }
541
        return;
542
    }
543
 
544
    if (!tf->effect) {
545
        // Effect failed to load, skip rendering
546
-       obs_source_skip_video_filter(tf->source);
547
+       if (tf->source) {
548
+           obs_source_skip_video_filter(tf->source);
549
+       }
550
        return;
551
    }
552
 
553
@@ -573,8 +802,10 @@
554
            tf->backgroundMask.cols, tf->backgroundMask.rows, GS_R8,
555
            1, (const uint8_t **)&tf->backgroundMask.data, 0);
556
        if (!alphaTexture) {
557
-           blog(LOG_ERROR, "Failed to create alpha texture");
558
-           obs_source_skip_video_filter(tf->source);
559
+           obs_log(LOG_ERROR, "Failed to create alpha texture");
560
+           if (tf->source) {
561
+               obs_source_skip_video_filter(tf->source);
562
+           }
563
            return;
564
        }
565
    }
566
@@ -585,7 +816,9 @@
567
 
568
    if (!obs_source_process_filter_begin(tf->source, GS_RGBA,
569
                         OBS_ALLOW_DIRECT_RENDERING)) {
570
-       obs_source_skip_video_filter(tf->source);
571
+       if (tf->source) {
572
+           obs_source_skip_video_filter(tf->source);
573
+       }
574
        gs_texture_destroy(alphaTexture);
575
        gs_texture_destroy(blurredTexture);
576
        return;
577
obs-backgroundremoval-1.1.6.tar.gz/src/consts.h -> obs-backgroundremoval-1.1.13.tar.gz/src/consts.h Changed
21
 
1
@@ -13,6 +13,7 @@
2
 const char *const MODEL_ENHANCE_ZERODCE = "models/zero_dce_180x320.onnx";
3
 const char *const MODEL_DEPTH_TCMONODEPTH =
4
    "models/tcmonodepth_tcsmallnet_192x320.onnx";
5
+const char *const MODEL_RMBG = "models/bria_rmbg_1_4_qint8.onnx";
6
 
7
 const char *const USEGPU_CPU = "cpu";
8
 const char *const USEGPU_DML = "dml";
9
@@ -24,4 +25,11 @@
10
 const char *const KAWASE_BLUR_EFFECT_PATH = "effects/kawase_blur.effect";
11
 const char *const BLEND_EFFECT_PATH = "effects/blend_images.effect";
12
 
13
+const char *const PLUGIN_INFO_TEMPLATE =
14
+   "<a href=\"https://github.com/occ-ai/obs-backgroundremoval/\">Background Removal</a> (%1) by "
15
+   "<a href=\"https://github.com/occ-ai\">OCC AI</a> ❤️ "
16
+   "<a href=\"https://www.patreon.com/RoyShilkrot\">Support & Follow</a>";
17
+const char *const PLUGIN_INFO_TEMPLATE_UPDATE_AVAILABLE =
18
+   "<center><a href=\"https://github.com/occ-ai/obs-backgroundremoval/releases\">🚀 Update available! (%1)</a></center>";
19
+
20
 #endif /* CONSTS_H */
21
obs-backgroundremoval-1.1.6.tar.gz/src/enhance-filter.cpp -> obs-backgroundremoval-1.1.13.tar.gz/src/enhance-filter.cpp Changed
56
 
1
@@ -14,6 +14,7 @@
2
 #include <fstream>
3
 #include <new>
4
 #include <mutex>
5
+#include <regex>
6
 
7
 #include <plugin-support.h>
8
 #include "consts.h"
9
@@ -22,6 +23,7 @@
10
 #include "models/ModelTBEFN.h"
11
 #include "models/ModelZeroDCE.h"
12
 #include "models/ModelURetinex.h"
13
+#include "update-checker/update-checker.h"
14
 
15
 struct enhance_filter : public filter_data {
16
    cv::Mat outputBGRA;
17
@@ -73,6 +75,20 @@
18
    obs_property_list_add_string(p_use_gpu, obs_module_text("CoreML"),
19
                     USEGPU_COREML);
20
 #endif
21
+
22
+   // Add a informative text about the plugin
23
+   // replace the placeholder with the current version using std::regex_replace
24
+   std::string basic_info = std::regex_replace(
25
+       PLUGIN_INFO_TEMPLATE, std::regex("%1"), PLUGIN_VERSION);
26
+   // Check for update
27
+   if (get_latest_version() != nullptr) {
28
+       basic_info += std::regex_replace(
29
+           PLUGIN_INFO_TEMPLATE_UPDATE_AVAILABLE, std::regex("%1"),
30
+           get_latest_version());
31
+   }
32
+   obs_properties_add_text(props, "info", basic_info.c_str(),
33
+               OBS_TEXT_INFO);
34
+
35
    return props;
36
 }
37
 
38
@@ -212,7 +228,7 @@
39
            return;
40
        }
41
    } catch (const std::exception &e) {
42
-       blog(LOG_ERROR, "Exception caught: %s", e.what());
43
+       obs_log(LOG_ERROR, "Exception caught: %s", e.what());
44
        return;
45
    }
46
 
47
@@ -257,7 +273,7 @@
48
            tf->outputBGRA.cols, tf->outputBGRA.rows, GS_BGRA, 1,
49
            (const uint8_t **)&tf->outputBGRA.data, 0);
50
        if (!outputTexture) {
51
-           blog(LOG_ERROR, "Failed to create output texture");
52
+           obs_log(LOG_ERROR, "Failed to create output texture");
53
            obs_source_skip_video_filter(tf->source);
54
            return;
55
        }
56
obs-backgroundremoval-1.1.6.tar.gz/src/models/Model.h -> obs-backgroundremoval-1.1.13.tar.gz/src/models/Model.h Changed
78
 
1
@@ -2,6 +2,7 @@
2
 #define MODEL_H
3
 
4
 #include <onnxruntime_cxx_api.h>
5
+#include "plugin-support.h"
6
 
7
 #ifdef _WIN32
8
 #include <wchar.h>
9
@@ -101,10 +102,14 @@
10
            obs_module_file(modelSelection.c_str());
11
 
12
        if (modelFilepath_rawPtr == nullptr) {
13
-           blog(LOG_ERROR,
14
-                "Unable to get model filename %s from plugin.",
15
-                modelSelection.c_str());
16
-           return nullptr;
17
+           obs_log(LOG_ERROR,
18
+               "Unable to get model filename %s from plugin.",
19
+               modelSelection.c_str());
20
+#if _WIN32
21
+           return std::wstring();
22
+#else
23
+           return std::string();
24
+#endif
25
        }
26
 
27
        std::string modelFilepath_s(modelFilepath_rawPtr);
28
@@ -177,9 +182,9 @@
29
        }
30
 
31
        if (inputDims0.size() < 3 || outputDims0.size() < 3) {
32
-           blog(LOG_ERROR,
33
-                "Input or output tensor dims are < 3. input = %d, output = %d",
34
-                (int)inputDims.size(), (int)outputDims.size());
35
+           obs_log(LOG_ERROR,
36
+               "Input or output tensor dims are < 3. input = %d, output = %d",
37
+               (int)inputDims.size(), (int)outputDims.size());
38
            return false;
39
        }
40
 
41
@@ -211,9 +216,9 @@
42
        for (size_t i = 0; i < inputDims.size(); i++) {
43
            inputTensorValues.push_back(std::vector<float>(
44
                vectorProduct(inputDimsi), 0.0f));
45
-           blog(LOG_INFO,
46
-                "Allocated %d sized float-array for input %d",
47
-                (int)inputTensorValuesi.size(), (int)i);
48
+           obs_log(LOG_INFO,
49
+               "Allocated %d sized float-array for input %d",
50
+               (int)inputTensorValuesi.size(), (int)i);
51
            inputTensor.push_back(Ort::Value::CreateTensor<float>(
52
                memoryInfo, inputTensorValuesi.data(),
53
                inputTensorValuesi.size(),
54
@@ -223,9 +228,9 @@
55
        for (size_t i = 0; i < outputDims.size(); i++) {
56
            outputTensorValues.push_back(std::vector<float>(
57
                vectorProduct(outputDimsi), 0.0f));
58
-           blog(LOG_INFO,
59
-                "Allocated %d sized float-array for output %d",
60
-                (int)outputTensorValuesi.size(), (int)i);
61
+           obs_log(LOG_INFO,
62
+               "Allocated %d sized float-array for output %d",
63
+               (int)outputTensorValuesi.size(), (int)i);
64
            outputTensor.push_back(Ort::Value::CreateTensor<float>(
65
                memoryInfo, outputTensorValuesi.data(),
66
                outputTensorValuesi.size(),
67
@@ -297,8 +302,8 @@
68
    {
69
        if (inputNames.size() == 0 || outputNames.size() == 0 ||
70
            inputTensor.size() == 0 || outputTensor.size() == 0) {
71
-           blog(LOG_INFO,
72
-                "Skip network inference. Inputs or outputs are null.");
73
+           obs_log(LOG_INFO,
74
+               "Skip network inference. Inputs or outputs are null.");
75
            return;
76
        }
77
 
78
obs-backgroundremoval-1.1.13.tar.gz/src/models/ModelRMBG.h Added
29
 
1
@@ -0,0 +1,27 @@
2
+#ifndef MODELRMBG_H
3
+#define MODELRMBG_H
4
+
5
+#include "Model.h"
6
+
7
+class ModelRMBG : public ModelBCHW {
8
+public:
9
+   ModelRMBG(/* args */) {}
10
+   ~ModelRMBG() {}
11
+
12
+   bool
13
+   populateInputOutputShapes(const std::unique_ptr<Ort::Session> &session,
14
+                 std::vector<std::vector<int64_t>> &inputDims,
15
+                 std::vector<std::vector<int64_t>> &outputDims)
16
+   {
17
+       ModelBCHW::populateInputOutputShapes(session, inputDims,
18
+                            outputDims);
19
+
20
+       // fix the output width and height to the input width and height
21
+       outputDims0.at(2) = inputDims0.at(2);
22
+       outputDims0.at(3) = inputDims0.at(3);
23
+
24
+       return true;
25
+   }
26
+};
27
+
28
+#endif // MODELRMBG_H
29
obs-backgroundremoval-1.1.6.tar.gz/src/models/ModelRVM.h -> obs-backgroundremoval-1.1.13.tar.gz/src/models/ModelRVM.h Changed
39
 
1
@@ -58,26 +58,29 @@
2
            outputDims.push_back(outputTensorInfo.GetShape());
3
        }
4
 
5
+       const int base_width = 320;
6
+       const int base_height = 192;
7
+
8
        inputDims00 = 1;
9
-       inputDims02 = 192;
10
-       inputDims03 = 192;
11
+       inputDims02 = base_height;
12
+       inputDims03 = base_width;
13
        for (size_t i = 1; i < 5; i++) {
14
            inputDimsi0 = 1;
15
            inputDimsi1 = (i == 1)   ? 16
16
                      : (i == 2) ? 20
17
                      : (i == 3) ? 40
18
                             : 64;
19
-           inputDimsi2 = 192 / (2 << (i - 1));
20
-           inputDimsi3 = 192 / (2 << (i - 1));
21
+           inputDimsi2 = base_height / (2 << (i - 1));
22
+           inputDimsi3 = base_width / (2 << (i - 1));
23
        }
24
 
25
        outputDims00 = 1;
26
-       outputDims02 = 192;
27
-       outputDims03 = 192;
28
+       outputDims02 = base_height;
29
+       outputDims03 = base_width;
30
        for (size_t i = 1; i < 5; i++) {
31
            outputDimsi0 = 1;
32
-           outputDimsi2 = 192 / (2 << (i - 1));
33
-           outputDimsi3 = 192 / (2 << (i - 1));
34
+           outputDimsi2 = base_height / (2 << (i - 1));
35
+           outputDimsi3 = base_width / (2 << (i - 1));
36
        }
37
        return true;
38
    }
39
obs-backgroundremoval-1.1.6.tar.gz/src/obs-utils/obs-config-utils.cpp -> obs-backgroundremoval-1.1.13.tar.gz/src/obs-utils/obs-config-utils.cpp Changed
104
 
1
@@ -1,49 +1,77 @@
2
 #include "obs-config-utils.h"
3
+#include "plugin-support.h"
4
 
5
 #include <obs-module.h>
6
+#include <util/config-file.h>
7
+#include <filesystem>
8
 
9
-int getFlagFromConfig(const char *name, bool *returnValue)
10
+void create_config_folder()
11
 {
12
-   // Check configuration to see if update checks are disabled
13
-   char *config_file = obs_module_file("config.json");
14
-   if (!config_file) {
15
-       blog(LOG_INFO, "Unable to find config file");
16
-       return OBS_BGREMOVAL_CONFIG_FAIL;
17
+   char *config_folder_path = obs_module_config_path("");
18
+   if (config_folder_path == nullptr) {
19
+       obs_log(LOG_ERROR, "Failed to get config folder path");
20
+       return;
21
    }
22
+   std::filesystem::path config_folder_std_path(config_folder_path);
23
+   bfree(config_folder_path);
24
 
25
-   obs_data_t *data = obs_data_create_from_json_file(config_file);
26
-   if (!data) {
27
-       blog(LOG_INFO, "Failed to parse config file");
28
-       return OBS_BGREMOVAL_CONFIG_FAIL;
29
+   // create the folder if it doesn't exist
30
+   if (!std::filesystem::exists(config_folder_std_path)) {
31
+#ifdef _WIN32
32
+       obs_log(LOG_INFO, "Config folder does not exist, creating: %S",
33
+           config_folder_std_path.c_str());
34
+#else
35
+       obs_log(LOG_INFO, "Config folder does not exist, creating: %s",
36
+           config_folder_std_path.c_str());
37
+#endif
38
+       // Create the config folder
39
+       std::filesystem::create_directories(config_folder_std_path);
40
    }
41
+}
42
+
43
+int getConfig(config_t **config)
44
+{
45
+   create_config_folder(); // ensure the config folder exists
46
+
47
+   // Get the config file
48
+   char *config_file_path = obs_module_config_path("config.ini");
49
 
50
-   *returnValue = obs_data_get_bool(data, name);
51
-   obs_data_release(data);
52
+   int ret = config_open(config, config_file_path, CONFIG_OPEN_EXISTING);
53
+   if (ret != CONFIG_SUCCESS) {
54
+       obs_log(LOG_INFO, "Failed to open config file %s",
55
+           config_file_path);
56
+       return OBS_BGREMOVAL_CONFIG_FAIL;
57
+   }
58
 
59
    return OBS_BGREMOVAL_CONFIG_SUCCESS;
60
 }
61
 
62
-int setFlagFromConfig(const char *name, const bool value)
63
+int getFlagFromConfig(const char *name, bool *returnValue, bool defaultValue)
64
 {
65
    // Get the config file
66
-   char *config_file = obs_module_file("config.json");
67
-   if (!config_file) {
68
-       blog(LOG_INFO, "Unable to find config file");
69
+   config_t *config;
70
+   if (getConfig(&config) != OBS_BGREMOVAL_CONFIG_SUCCESS) {
71
+       *returnValue = defaultValue;
72
        return OBS_BGREMOVAL_CONFIG_FAIL;
73
    }
74
 
75
-   // Parse the config file
76
-   obs_data_t *json_data = obs_data_create_from_json_file(config_file);
77
-   if (!json_data) {
78
-       blog(LOG_INFO, "Failed to parse config file");
79
+   *returnValue = config_get_bool(config, "config", name);
80
+   config_close(config);
81
+
82
+   return OBS_BGREMOVAL_CONFIG_SUCCESS;
83
+}
84
+
85
+int setFlagInConfig(const char *name, const bool value)
86
+{
87
+   // Get the config file
88
+   config_t *config;
89
+   if (getConfig(&config) != OBS_BGREMOVAL_CONFIG_SUCCESS) {
90
        return OBS_BGREMOVAL_CONFIG_FAIL;
91
    }
92
 
93
-   // Update the config
94
-   obs_data_set_bool(json_data, name, value);
95
-   obs_data_save_json(json_data, config_file);
96
-
97
-   obs_data_release(json_data);
98
+   config_set_bool(config, "config", name, value);
99
+   config_save(config);
100
+   config_close(config);
101
 
102
    return OBS_BGREMOVAL_CONFIG_SUCCESS;
103
 }
104
obs-backgroundremoval-1.1.6.tar.gz/src/obs-utils/obs-config-utils.h -> obs-backgroundremoval-1.1.13.tar.gz/src/obs-utils/obs-config-utils.h Changed
22
 
1
@@ -11,10 +11,11 @@
2
  *
3
  * @param name The name of the config item.
4
  * @param returnValue The value of the config item.
5
+ * @param defaultValue The default value of the config item.
6
  * @return OBS_BGREMOVAL_CONFIG_SUCCESS if the config item was found,
7
  * OBS_BGREMOVAL_CONFIG_FAIL otherwise.
8
  */
9
-int getFlagFromConfig(const char *name, bool *returnValue);
10
+int getFlagFromConfig(const char *name, bool *returnValue, bool defaultValue);
11
 
12
 /**
13
  * Set a boolean flag in the module configuration file.
14
@@ -24,6 +25,6 @@
15
  * @return OBS_BGREMOVAL_CONFIG_SUCCESS if the config item was found,
16
  * OBS_BGREMOVAL_CONFIG_FAIL otherwise.
17
  */
18
-int setFlagFromConfig(const char *name, const bool value);
19
+int setFlagInConfig(const char *name, const bool value);
20
 
21
 #endif /* OBS_CONFIG_UTILS_H */
22
obs-backgroundremoval-1.1.6.tar.gz/src/ort-utils/ort-session-utils.cpp -> obs-backgroundremoval-1.1.13.tar.gz/src/ort-utils/ort-session-utils.cpp Changed
170
 
1
@@ -5,25 +5,23 @@
2
 #include <coreml_provider_factory.h>
3
 #endif
4
 
5
-#if defined(__linux__) && defined(__x86_64__)
6
-#include <tensorrt_provider_factory.h>
7
-#endif
8
-
9
 #ifdef _WIN32
10
 #include <dml_provider_factory.h>
11
 #include <wchar.h>
12
+#include <windows.h>
13
 #endif // _WIN32
14
 
15
 #include <obs-module.h>
16
 
17
 #include "ort-session-utils.h"
18
 #include "consts.h"
19
+#include "plugin-support.h"
20
 
21
-void createOrtSession(filter_data *tf)
22
+int createOrtSession(filter_data *tf)
23
 {
24
    if (tf->model.get() == nullptr) {
25
-       blog(LOG_ERROR, "Model object is not initialized");
26
-       return;
27
+       obs_log(LOG_ERROR, "Model object is not initialized");
28
+       return OBS_BGREMOVAL_ORT_SESSION_ERROR_INVALID_MODEL;
29
    }
30
 
31
    Ort::SessionOptions sessionOptions;
32
@@ -42,25 +40,29 @@
33
        obs_module_file(tf->modelSelection.c_str());
34
 
35
    if (modelFilepath_rawPtr == nullptr) {
36
-       blog(LOG_ERROR, "Unable to get model filename %s from plugin.",
37
-            tf->modelSelection.c_str());
38
-       return;
39
+       obs_log(LOG_ERROR,
40
+           "Unable to get model filename %s from plugin.",
41
+           tf->modelSelection.c_str());
42
+       return OBS_BGREMOVAL_ORT_SESSION_ERROR_FILE_NOT_FOUND;
43
    }
44
 
45
    std::string modelFilepath_s(modelFilepath_rawPtr);
46
-   bfree(modelFilepath_rawPtr);
47
 
48
 #if _WIN32
49
-   std::wstring modelFilepath_ws(modelFilepath_s.size(), L' ');
50
-   std::copy(modelFilepath_s.begin(), modelFilepath_s.end(),
51
-         modelFilepath_ws.begin());
52
-   tf->modelFilepath = modelFilepath_ws.c_str();
53
+   int outLength = MultiByteToWideChar(
54
+       CP_ACP, MB_PRECOMPOSED, modelFilepath_rawPtr, -1, nullptr, 0);
55
+   tf->modelFilepath = std::wstring(outLength, L'\0');
56
+   MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, modelFilepath_rawPtr, -1,
57
+               tf->modelFilepath.data(), outLength);
58
 #else
59
-   tf->modelFilepath = modelFilepath_s.c_str();
60
+   tf->modelFilepath = std::string(modelFilepath_rawPtr);
61
 #endif
62
 
63
+   bfree(modelFilepath_rawPtr);
64
+
65
    try {
66
-#if defined(__linux__) && defined(__x86_64__)
67
+#if defined(__linux__) && defined(__x86_64__) && \
68
+   !defined(DISABLE_ONNXRUNTIME_GPU)
69
        if (tf->useGPU == USEGPU_TENSORRT) {
70
            Ort::ThrowOnError(
71
                OrtSessionOptionsAppendExecutionProvider_Tensorrt(
72
@@ -88,11 +90,11 @@
73
                    sessionOptions, coreml_flags));
74
        }
75
 #endif
76
-       tf->session.reset(new Ort::Session(*tf->env, tf->modelFilepath,
77
-                          sessionOptions));
78
+       tf->session.reset(new Ort::Session(
79
+           *tf->env, tf->modelFilepath.c_str(), sessionOptions));
80
    } catch (const std::exception &e) {
81
-       blog(LOG_ERROR, "%s", e.what());
82
-       return;
83
+       obs_log(LOG_ERROR, "%s", e.what());
84
+       return OBS_BGREMOVAL_ORT_SESSION_ERROR_STARTUP;
85
    }
86
 
87
    Ort::AllocatorWithDefaultOptions allocator;
88
@@ -102,41 +104,42 @@
89
 
90
    if (!tf->model->populateInputOutputShapes(tf->session, tf->inputDims,
91
                          tf->outputDims)) {
92
-       blog(LOG_ERROR, "Unable to get model input and output shapes");
93
-       return;
94
+       obs_log(LOG_ERROR,
95
+           "Unable to get model input and output shapes");
96
+       return OBS_BGREMOVAL_ORT_SESSION_ERROR_INVALID_INPUT_OUTPUT;
97
    }
98
 
99
    for (size_t i = 0; i < tf->inputNames.size(); i++) {
100
-       blog(LOG_INFO,
101
-            "Model %s input %d: name %s shape (%d dim) %d x %d x %d x %d",
102
-            tf->modelSelection.c_str(), (int)i,
103
-            tf->inputNamesi.get(), (int)tf->inputDimsi.size(),
104
-            (int)tf->inputDimsi0,
105
-            ((int)tf->inputDimsi.size() > 1)
106
-                ? (int)tf->inputDimsi1
107
-                : 0,
108
-            ((int)tf->inputDimsi.size() > 2)
109
-                ? (int)tf->inputDimsi2
110
-                : 0,
111
-            ((int)tf->inputDimsi.size() > 3)
112
-                ? (int)tf->inputDimsi3
113
-                : 0);
114
+       obs_log(LOG_INFO,
115
+           "Model %s input %d: name %s shape (%d dim) %d x %d x %d x %d",
116
+           tf->modelSelection.c_str(), (int)i,
117
+           tf->inputNamesi.get(), (int)tf->inputDimsi.size(),
118
+           (int)tf->inputDimsi0,
119
+           ((int)tf->inputDimsi.size() > 1)
120
+               ? (int)tf->inputDimsi1
121
+               : 0,
122
+           ((int)tf->inputDimsi.size() > 2)
123
+               ? (int)tf->inputDimsi2
124
+               : 0,
125
+           ((int)tf->inputDimsi.size() > 3)
126
+               ? (int)tf->inputDimsi3
127
+               : 0);
128
    }
129
    for (size_t i = 0; i < tf->outputNames.size(); i++) {
130
-       blog(LOG_INFO,
131
-            "Model %s output %d: name %s shape (%d dim) %d x %d x %d x %d",
132
-            tf->modelSelection.c_str(), (int)i,
133
-            tf->outputNamesi.get(), (int)tf->outputDimsi.size(),
134
-            (int)tf->outputDimsi0,
135
-            ((int)tf->outputDimsi.size() > 1)
136
-                ? (int)tf->outputDimsi1
137
-                : 0,
138
-            ((int)tf->outputDimsi.size() > 2)
139
-                ? (int)tf->outputDimsi2
140
-                : 0,
141
-            ((int)tf->outputDimsi.size() > 3)
142
-                ? (int)tf->outputDimsi3
143
-                : 0);
144
+       obs_log(LOG_INFO,
145
+           "Model %s output %d: name %s shape (%d dim) %d x %d x %d x %d",
146
+           tf->modelSelection.c_str(), (int)i,
147
+           tf->outputNamesi.get(), (int)tf->outputDimsi.size(),
148
+           (int)tf->outputDimsi0,
149
+           ((int)tf->outputDimsi.size() > 1)
150
+               ? (int)tf->outputDimsi1
151
+               : 0,
152
+           ((int)tf->outputDimsi.size() > 2)
153
+               ? (int)tf->outputDimsi2
154
+               : 0,
155
+           ((int)tf->outputDimsi.size() > 3)
156
+               ? (int)tf->outputDimsi3
157
+               : 0);
158
    }
159
 
160
    // Allocate buffers
161
@@ -144,6 +147,8 @@
162
                     tf->outputTensorValues,
163
                     tf->inputTensorValues, tf->inputTensor,
164
                     tf->outputTensor);
165
+
166
+   return OBS_BGREMOVAL_ORT_SESSION_SUCCESS;
167
 }
168
 
169
 bool runFilterModelInference(filter_data *tf, const cv::Mat &imageBGRA,
170
obs-backgroundremoval-1.1.6.tar.gz/src/ort-utils/ort-session-utils.h -> obs-backgroundremoval-1.1.13.tar.gz/src/ort-utils/ort-session-utils.h Changed
16
 
1
@@ -5,7 +5,13 @@
2
 
3
 #include "FilterData.h"
4
 
5
-void createOrtSession(filter_data *tf);
6
+#define OBS_BGREMOVAL_ORT_SESSION_ERROR_FILE_NOT_FOUND 1
7
+#define OBS_BGREMOVAL_ORT_SESSION_ERROR_INVALID_MODEL 2
8
+#define OBS_BGREMOVAL_ORT_SESSION_ERROR_INVALID_INPUT_OUTPUT 3
9
+#define OBS_BGREMOVAL_ORT_SESSION_ERROR_STARTUP 5
10
+#define OBS_BGREMOVAL_ORT_SESSION_SUCCESS 0
11
+
12
+int createOrtSession(filter_data *tf);
13
 
14
 bool runFilterModelInference(filter_data *tf, const cv::Mat &imageBGRA,
15
                 cv::Mat &output);
16
obs-backgroundremoval-1.1.6.tar.gz/src/plugin-support.c.in -> obs-backgroundremoval-1.1.13.tar.gz/src/plugin-support.c.in Changed
10
 
1
@@ -18,6 +18,8 @@
2
 
3
 #include <plugin-support.h>
4
 
5
+extern void blogva(int log_level, const char *format, va_list args);
6
+
7
 const char *PLUGIN_NAME = "@CMAKE_PROJECT_NAME@";
8
 const char *PLUGIN_VERSION = "@CMAKE_PROJECT_VERSION@";
9
 
10
obs-backgroundremoval-1.1.6.tar.gz/src/plugin-support.h -> obs-backgroundremoval-1.1.13.tar.gz/src/plugin-support.h Changed
9
 
1
@@ -31,7 +31,6 @@
2
 extern const char *PLUGIN_VERSION;
3
 
4
 void obs_log(int log_level, const char *format, ...);
5
-extern void blogva(int log_level, const char *format, va_list args);
6
 
7
 #ifdef __cplusplus
8
 }
9
obs-backgroundremoval-1.1.6.tar.gz/src/update-checker/github-utils.cpp -> obs-backgroundremoval-1.1.13.tar.gz/src/update-checker/github-utils.cpp Changed
55
 
1
@@ -5,9 +5,10 @@
2
 
3
 #include "Client.hpp"
4
 #include "github-utils.h"
5
+#include "plugin-support.h"
6
 
7
 static const std::string GITHUB_LATEST_RELEASE_URL =
8
-   "https://api.github.com/repos/royshil/obs-backgroundremoval/releases/latest";
9
+   "https://api.github.com/repos/occ-ai/obs-backgroundremoval/releases/latest";
10
 
11
 void github_utils_get_release_information(
12
    std::function<void(github_utils_release_information)> callback)
13
@@ -22,35 +23,22 @@
14
        obs_data_t *data =
15
            obs_data_create_from_json(responseBody.c_str());
16
        if (!data) {
17
-           blog(LOG_INFO, "Failed to parse latest release info");
18
-           callback(
19
-               {OBS_BGREMOVAL_GITHUB_UTILS_ERROR, NULL, NULL});
20
+           obs_log(LOG_INFO,
21
+               "Failed to parse latest release info");
22
+           callback({OBS_BGREMOVAL_GITHUB_UTILS_ERROR, "", ""});
23
            return;
24
        }
25
 
26
        // The version is in the "tag_name" property
27
-       char *version = strdup(obs_data_get_string(data, "tag_name"));
28
-       char *body = strdup(obs_data_get_string(data, "body"));
29
+       std::string version = obs_data_get_string(data, "tag_name");
30
+       std::string body = obs_data_get_string(data, "body");
31
        obs_data_release(data);
32
 
33
        // remove the "v" prefix in version, if it exists
34
        if (version0 == 'v') {
35
-           char *newVersion = (char *)malloc(strlen(version) - 1);
36
-           strcpy(newVersion, version + 1);
37
-           free(version);
38
-           version = newVersion;
39
+           version = version.substr(1);
40
        }
41
 
42
        callback({OBS_BGREMOVAL_GITHUB_UTILS_SUCCESS, body, version});
43
    });
44
 }
45
-
46
-void github_utils_release_information_free(
47
-   struct github_utils_release_information info)
48
-{
49
-   if (info.responseBody != NULL)
50
-       free(info.responseBody);
51
-   if (info.version != NULL)
52
-       free(info.version);
53
-   info.responseCode = OBS_BGREMOVAL_GITHUB_UTILS_ERROR;
54
-}
55
obs-backgroundremoval-1.1.6.tar.gz/src/update-checker/github-utils.h -> obs-backgroundremoval-1.1.13.tar.gz/src/update-checker/github-utils.h Changed
24
 
1
@@ -1,6 +1,7 @@
2
 #pragma once
3
 
4
 #include <functional>
5
+#include <string>
6
 
7
 enum {
8
    OBS_BGREMOVAL_GITHUB_UTILS_SUCCESS = 0,
9
@@ -9,12 +10,9 @@
10
 
11
 struct github_utils_release_information {
12
    int responseCode;
13
-   char *responseBody;
14
-   char *version;
15
+   std::string responseBody;
16
+   std::string version;
17
 };
18
 
19
 void github_utils_get_release_information(
20
    std::function<void(github_utils_release_information)> callback);
21
-
22
-void github_utils_release_information_free(
23
-   struct github_utils_release_information info);
24
obs-backgroundremoval-1.1.6.tar.gz/src/update-checker/update-checker.cpp -> obs-backgroundremoval-1.1.13.tar.gz/src/update-checker/update-checker.cpp Changed
94
 
1
@@ -1,5 +1,4 @@
2
 #include "update-checker.h"
3
-#include "UpdateDialog.hpp"
4
 #include "github-utils.h"
5
 #include "obs-utils/obs-config-utils.h"
6
 
7
@@ -8,45 +7,52 @@
8
 
9
 #include <plugin-support.h>
10
 
11
-#include <QTimer>
12
-
13
-UpdateDialog *update_dialog;
14
-
15
 extern "C" const char *PLUGIN_VERSION;
16
 
17
+static std::string latestVersionForUpdate;
18
+
19
 void check_update(void)
20
 {
21
-   github_utils_get_release_information((github_utils_release_information
22
-                           info) {
23
-       if (info.responseCode == OBS_BGREMOVAL_GITHUB_UTILS_SUCCESS) {
24
-           obs_log(LOG_INFO, "Latest release is %s", info.version);
25
-           bool shouldCheckForUpdates = false;
26
-           if (getFlagFromConfig("check_for_updates",
27
-                         &shouldCheckForUpdates) !=
28
-               OBS_BGREMOVAL_CONFIG_SUCCESS) {
29
-               // Failed to get the config value, assume it's enabled
30
-               shouldCheckForUpdates = true;
31
-           }
32
-
33
-           if (!shouldCheckForUpdates) {
34
-               // Update checks are disabled
35
-               return;
36
-           }
37
-
38
-           if (strcmp(info.version, PLUGIN_VERSION) == 0) {
39
-               // No update available, latest version is the same as the current version
40
-               return;
41
-           }
42
-
43
-           update_dialog = new UpdateDialog(
44
-               info,
45
-               (QWidget *)obs_frontend_get_main_window());
46
-           QTimer::singleShot(2000, update_dialog,
47
-                      &UpdateDialog::exec);
48
-       } else {
49
+   bool shouldCheckForUpdates = false;
50
+   if (getFlagFromConfig("check_for_updates", &shouldCheckForUpdates,
51
+                 true) != OBS_BGREMOVAL_CONFIG_SUCCESS) {
52
+       // Failed to get the config value, assume it's enabled
53
+       shouldCheckForUpdates = true;
54
+       // store the default value
55
+       setFlagInConfig("check_for_updates", shouldCheckForUpdates);
56
+   }
57
+
58
+   if (!shouldCheckForUpdates) {
59
+       // Update checks are disabled
60
+       return;
61
+   }
62
+
63
+   const auto callback = (github_utils_release_information info) {
64
+       if (info.responseCode != OBS_BGREMOVAL_GITHUB_UTILS_SUCCESS) {
65
            obs_log(LOG_INFO,
66
                "failed to get latest release information");
67
+           return;
68
+       }
69
+       obs_log(LOG_INFO, "Latest release is %s", info.version.c_str());
70
+
71
+       if (info.version == PLUGIN_VERSION) {
72
+           // No update available, latest version is the same as the current version
73
+           latestVersionForUpdate.clear();
74
+           return;
75
        }
76
-       github_utils_release_information_free(info);
77
-   });
78
+
79
+       latestVersionForUpdate = info.version;
80
+   };
81
+
82
+   github_utils_get_release_information(callback);
83
+}
84
+
85
+const char *get_latest_version(void)
86
+{
87
+   obs_log(LOG_INFO, "get_latest_version: %s",
88
+       latestVersionForUpdate.c_str());
89
+   if (latestVersionForUpdate.empty()) {
90
+       return nullptr;
91
+   }
92
+   return latestVersionForUpdate.c_str();
93
 }
94
obs-backgroundremoval-1.1.6.tar.gz/src/update-checker/update-checker.h -> obs-backgroundremoval-1.1.13.tar.gz/src/update-checker/update-checker.h Changed
9
 
1
@@ -5,6 +5,7 @@
2
 #endif
3
 
4
 void check_update(void);
5
+const char *get_latest_version(void);
6
 
7
 #ifdef __cplusplus
8
 }
9
obs-backgroundremoval-1.1.6.tar.gz/cmake/BuildMyCurl.cmake Deleted
23
 
1
@@ -1,21 +0,0 @@
2
-if(OS_MACOS)
3
-  set(CURL_USE_OPENSSL OFF)
4
-  set(CURL_USE_SECTRANSP ON)
5
-elseif(OS_WINDOWS)
6
-  set(CURL_USE_OPENSSL OFF)
7
-  set(CURL_USE_SCHANNEL ON)
8
-elseif(OS_LINUX)
9
-  add_compile_options(-fPIC)
10
-  set(CURL_USE_OPENSSL ON)
11
-endif()
12
-set(BUILD_CURL_EXE OFF)
13
-set(BUILD_SHARED_LIBS OFF)
14
-set(HTTP_ONLY OFF)
15
-set(CURL_USE_LIBSSH2 OFF)
16
-add_subdirectory(vendor/curl EXCLUDE_FROM_ALL)
17
-if(OS_MACOS)
18
-  target_compile_options(
19
-    libcurl PRIVATE -Wno-error=ambiguous-macro -Wno-error=deprecated-declarations -Wno-error=unreachable-code
20
-                    -Wno-error=unused-parameter -Wno-error=unused-variable)
21
-endif()
22
-include_directories(SYSTEM ${CMAKE_SOURCE_DIR}/vendor/curl/include)
23
obs-backgroundremoval-1.1.6.tar.gz/cmake/macos/resources/Distribution.xml Deleted
18
 
1
@@ -1,16 +0,0 @@
2
-<?xml version="1.0" encoding="utf-8"?>
3
-<installer-gui-script minSpecVersion="1">
4
-    <pkg-ref id="com.royshilkrot.obs-backgroundremoval"/>
5
-    <options customize="never" require-scripts="false" hostArchitectures="x86_64,arm64"/>
6
-    <choices-outline>
7
-        <line choice="default">
8
-            <line choice="com.royshilkrot.obs-backgroundremoval"/>
9
-        </line>
10
-    </choices-outline>
11
-    <choice id="default"/>
12
-    <choice id="com.royshilkrot.obs-backgroundremoval" visible="false">
13
-        <pkg-ref id="com.royshilkrot.obs-backgroundremoval"/>
14
-    </choice>
15
-    <pkg-ref id="com.royshilkrot.obs-backgroundremoval" version="1.0.0" onConclusion="none">obs-backgroundremoval-flat.pkg</pkg-ref>
16
-    <domains enable_anywhere="false" enable_currentUserHome="true" enable_localSystem="false"/>
17
-</installer-gui-script>
18
obs-backgroundremoval-1.1.6.tar.gz/src/update-checker/UpdateDialog.cpp Deleted
64
 
1
@@ -1,62 +0,0 @@
2
-#include "UpdateDialog.hpp"
3
-#include "obs-utils/obs-config-utils.h"
4
-
5
-#include <obs.h>
6
-#include <obs-module.h>
7
-
8
-#include <QLabel>
9
-#include <QVBoxLayout>
10
-#include <QString>
11
-
12
-static QString dialogContent =
13
-   "<h1>Background Removal - Update available! 🚀</h1>"
14
-   "<p>A new version of the Background Removal plugin (<a "
15
-   "href=\"https://github.com/royshil/obs-backgroundremoval/releases\">v{version}</a>) is "
16
-   "now available for download. We've made some exciting updates and improvements that we think "
17
-   "you'll love. To get the latest features and enhancements, please follow the link below:</p>"
18
-   "<p>Download the latest version from GitHub: <a "
19
-   "href=\"https://github.com/royshil/obs-backgroundremoval/releases\">v{version}</a></p>"
20
-   "<p>Once you've downloaded the new version, install the update as usual, there's no need to "
21
-   "uninstall the previous version.</p>"
22
-   "<p>If you have any questions or need assistance during the update process, feel free to reach out"
23
-   " to our <a href=\"https://github.com/royshil/obs-backgroundremoval/issues\">support team</a>.</p>"
24
-   "<p>Thank you for using our plugin and we hope you enjoy the latest release! 🙏</p>"
25
-   "<h2>Changelog</h2>";
26
-
27
-UpdateDialog::UpdateDialog(
28
-   struct github_utils_release_information latestVersion, QWidget *parent)
29
-   : QDialog(parent), layout(new QVBoxLayout)
30
-{
31
-   setWindowTitle("Background Removal - Update available! 🚀");
32
-   setLayout(layout);
33
-   QLabel *label = new QLabel(dialogContent.replace(
34
-       QString("{version}"), QString(latestVersion.version)));
35
-   label->setOpenExternalLinks(true);
36
-   label->setTextInteractionFlags(Qt::TextBrowserInteraction);
37
-   label->setTextFormat(Qt::RichText);
38
-   label->setWordWrap(true);
39
-   layout->addWidget(label);
40
-
41
-   QScrollArea *scrollArea = new QScrollArea;
42
-   QLabel *scrollAreaLabel =
43
-       new QLabel(QString(latestVersion.responseBody));
44
-   scrollAreaLabel->setOpenExternalLinks(true);
45
-   scrollAreaLabel->setTextInteractionFlags(Qt::TextBrowserInteraction);
46
-   scrollAreaLabel->setTextFormat(Qt::MarkdownText);
47
-   scrollAreaLabel->setWordWrap(true);
48
-   scrollArea->setWidget(scrollAreaLabel);
49
-   scrollArea->setWidgetResizable(true);
50
-   layout->addWidget(scrollArea);
51
-
52
-   // Add a checkbox to disable update checks
53
-   QCheckBox *disableCheckbox = new QCheckBox("Disable update checks");
54
-   layout->addWidget(disableCheckbox);
55
-   connect(disableCheckbox, &QCheckBox::stateChanged, this, (int state) {
56
-       setFlagFromConfig("check_for_updates", state == Qt::Unchecked);
57
-   });
58
-
59
-   // Add a button to close the dialog
60
-   QPushButton *closeButton = new QPushButton("Close");
61
-   layout->addWidget(closeButton);
62
-   connect(closeButton, &QPushButton::clicked, this, &QDialog::close);
63
-}
64
obs-backgroundremoval-1.1.6.tar.gz/src/update-checker/UpdateDialog.hpp Deleted
15
 
1
@@ -1,13 +0,0 @@
2
-#include <QtWidgets>
3
-
4
-#include "github-utils.h"
5
-
6
-class UpdateDialog : public QDialog {
7
-   Q_OBJECT
8
-public:
9
-   UpdateDialog(struct github_utils_release_information latestVersion,
10
-            QWidget *parent = nullptr);
11
-
12
-private:
13
-   QVBoxLayout *layout;
14
-};
15
onnxruntime-linux-x64-gpu-1.15.1.tgz/include/tensorrt_provider_factory.h Deleted
16
 
1
@@ -1,14 +0,0 @@
2
-// Copyright (c) Microsoft Corporation. All rights reserved.
3
-// Licensed under the MIT License.
4
-
5
-#include "onnxruntime_c_api.h"
6
-
7
-#ifdef __cplusplus
8
-extern "C" {
9
-#endif
10
-
11
-ORT_API_STATUS(OrtSessionOptionsAppendExecutionProvider_Tensorrt, _In_ OrtSessionOptions* options, int device_id);
12
-
13
-#ifdef __cplusplus
14
-}
15
-#endif
16
onnxruntime-linux-x64-gpu-1.15.1.tgz/lib/libonnxruntime.so.1.15.1 Deleted
onnxruntime-linux-x64-gpu-1.15.1.tgz/GIT_COMMIT_ID -> onnxruntime-linux-x64-gpu-1.17.1.tgz/GIT_COMMIT_ID Changed
4
 
1
@@ -1,1 +1,1 @@
2
-baeece44ba075009c6bfe95891a8c1b3d4571cb3
3
+8f5c79cb63f09ef1302e85081093a3fe4da1bc7d
4
onnxruntime-linux-x64-gpu-1.15.1.tgz/README.md -> onnxruntime-linux-x64-gpu-1.17.1.tgz/README.md Changed
43
 
1
@@ -6,23 +6,22 @@
2
 
3
 **ONNX Runtime training** can accelerate the model training time on multi-node NVIDIA GPUs for transformer models with a one-line addition for existing PyTorch training scripts. Learn more &rarr;(https://www.onnxruntime.ai/docs/#onnx-runtime-for-training)
4
 
5
-
6
 ## Get Started & Resources
7
 
8
 * **General Information**: onnxruntime.ai(https://onnxruntime.ai)
9
 
10
-* **Usage documention and tutorials**: onnxruntime.ai/docs(https://onnxruntime.ai/docs)
11
+* **Usage documentation and tutorials**: onnxruntime.ai/docs(https://onnxruntime.ai/docs)
12
 
13
 * **YouTube video tutorials**: youtube.com/@ONNXRuntime(https://www.youtube.com/@ONNXRuntime)
14
 
15
 * **Upcoming Release Roadmap**(https://github.com/microsoft/onnxruntime/wiki/Upcoming-Release-Roadmap)
16
 
17
-* **Companion sample repositories**: 
18
+* **Companion sample repositories**:
19
   - ONNX Runtime Inferencing: microsoft/onnxruntime-inference-examples(https://github.com/microsoft/onnxruntime-inference-examples)
20
   - ONNX Runtime Training: microsoft/onnxruntime-training-examples(https://github.com/microsoft/onnxruntime-training-examples)
21
 
22
+## Builtin Pipeline Status
23
 
24
-## Build Pipeline Status
25
 |System|Inference|Training|
26
 |---|---|---|
27
 |Windows|!Build Status(https://dev.azure.com/onnxruntime/onnxruntime/_apis/build/status/Windows%20CPU%20CI%20Pipeline?label=Windows+CPU)(https://dev.azure.com/onnxruntime/onnxruntime/_build/latest?definitionId=9)<br>!Build Status(https://dev.azure.com/onnxruntime/onnxruntime/_apis/build/status/Windows%20GPU%20CI%20Pipeline?label=Windows+GPU)(https://dev.azure.com/onnxruntime/onnxruntime/_build/latest?definitionId=10)<br>!Build Status(https://dev.azure.com/onnxruntime/onnxruntime/_apis/build/status/Windows%20GPU%20TensorRT%20CI%20Pipeline?label=Windows+GPU+TensorRT)(https://dev.azure.com/onnxruntime/onnxruntime/_build/latest?definitionId=47)||
28
@@ -31,8 +30,13 @@
29
 |Android|!Build Status(https://dev.azure.com/onnxruntime/onnxruntime/_apis/build/status/Android%20CI%20Pipeline?label=Android)(https://dev.azure.com/onnxruntime/onnxruntime/_build/latest?definitionId=53)||
30
 |iOS|!Build Status(https://dev.azure.com/onnxruntime/onnxruntime/_apis/build/status/iOS%20CI%20Pipeline?label=iOS)(https://dev.azure.com/onnxruntime/onnxruntime/_build/latest?definitionId=134)||
31
 |Web|!Build Status(https://dev.azure.com/onnxruntime/onnxruntime/_apis/build/status/ONNX%20Runtime%20Web%20CI%20Pipeline?label=Web)(https://dev.azure.com/onnxruntime/onnxruntime/_build/latest?definitionId=161)||
32
-|Other|!Build Status(https://dev.azure.com/onnxruntime/onnxruntime/_apis/build/status/onnxruntime-binary-size-checks-ci-pipeline?repoName=microsoft%2Fonnxruntime&label=Binary+Size+Check)(https://dev.azure.com/onnxruntime/onnxruntime/_build/latest?definitionId=187&repoName=microsoft%2Fonnxruntime)<br>!Build Status(https://dev.azure.com/onnxruntime/onnxruntime/_apis/build/status/onnxruntime-python-checks-ci-pipeline?label=Python+Checks)(https://dev.azure.com/onnxruntime/onnxruntime/_build/latest?definitionId=164)||
33
+|Other|!Build Status(https://dev.azure.com/onnxruntime/onnxruntime/_apis/build/status/onnxruntime-binary-size-checks-ci-pipeline?repoName=microsoft%2Fonnxruntime&label=Binary+Size+Check)(https://dev.azure.com/onnxruntime/onnxruntime/_build/latest?definitionId=187&repoName=microsoft%2Fonnxruntime)||
34
+
35
+## Third-party Pipeline Status
36
 
37
+|System|Inference|Training|
38
+|---|---|---|
39
+|Linux|!Build Status(https://github.com/Ascend/onnxruntime/actions/workflows/build-and-test.yaml/badge.svg)(https://github.com/Ascend/onnxruntime/actions/workflows/build-and-test.yaml)||
40
 
41
 ## Data/Telemetry
42
 
43
onnxruntime-linux-x64-gpu-1.15.1.tgz/ThirdPartyNotices.txt -> onnxruntime-linux-x64-gpu-1.17.1.tgz/ThirdPartyNotices.txt Changed
492
 
1
@@ -6021,4 +6021,488 @@
2
 
3
 Except as contained in this notice, the name of a copyright holder shall not
4
 be used in advertising or otherwise to promote the sale, use or other dealings
5
-in this Software without prior written authorization of the copyright holder.
6
\ No newline at end of file
7
+in this Software without prior written authorization of the copyright holder.
8
+
9
+_____
10
+
11
+Intel neural-compressor
12
+
13
+https://github.com/intel/neural-compressor
14
+
15
+                                 Apache License
16
+                           Version 2.0, January 2004
17
+                        http://www.apache.org/licenses/
18
+
19
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
20
+
21
+   1. Definitions.
22
+
23
+      "License" shall mean the terms and conditions for use, reproduction,
24
+      and distribution as defined by Sections 1 through 9 of this document.
25
+
26
+      "Licensor" shall mean the copyright owner or entity authorized by
27
+      the copyright owner that is granting the License.
28
+
29
+      "Legal Entity" shall mean the union of the acting entity and all
30
+      other entities that control, are controlled by, or are under common
31
+      control with that entity. For the purposes of this definition,
32
+      "control" means (i) the power, direct or indirect, to cause the
33
+      direction or management of such entity, whether by contract or
34
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
35
+      outstanding shares, or (iii) beneficial ownership of such entity.
36
+
37
+      "You" (or "Your") shall mean an individual or Legal Entity
38
+      exercising permissions granted by this License.
39
+
40
+      "Source" form shall mean the preferred form for making modifications,
41
+      including but not limited to software source code, documentation
42
+      source, and configuration files.
43
+
44
+      "Object" form shall mean any form resulting from mechanical
45
+      transformation or translation of a Source form, including but
46
+      not limited to compiled object code, generated documentation,
47
+      and conversions to other media types.
48
+
49
+      "Work" shall mean the work of authorship, whether in Source or
50
+      Object form, made available under the License, as indicated by a
51
+      copyright notice that is included in or attached to the work
52
+      (an example is provided in the Appendix below).
53
+
54
+      "Derivative Works" shall mean any work, whether in Source or Object
55
+      form, that is based on (or derived from) the Work and for which the
56
+      editorial revisions, annotations, elaborations, or other modifications
57
+      represent, as a whole, an original work of authorship. For the purposes
58
+      of this License, Derivative Works shall not include works that remain
59
+      separable from, or merely link (or bind by name) to the interfaces of,
60
+      the Work and Derivative Works thereof.
61
+
62
+      "Contribution" shall mean any work of authorship, including
63
+      the original version of the Work and any modifications or additions
64
+      to that Work or Derivative Works thereof, that is intentionally
65
+      submitted to Licensor for inclusion in the Work by the copyright owner
66
+      or by an individual or Legal Entity authorized to submit on behalf of
67
+      the copyright owner. For the purposes of this definition, "submitted"
68
+      means any form of electronic, verbal, or written communication sent
69
+      to the Licensor or its representatives, including but not limited to
70
+      communication on electronic mailing lists, source code control systems,
71
+      and issue tracking systems that are managed by, or on behalf of, the
72
+      Licensor for the purpose of discussing and improving the Work, but
73
+      excluding communication that is conspicuously marked or otherwise
74
+      designated in writing by the copyright owner as "Not a Contribution."
75
+
76
+      "Contributor" shall mean Licensor and any individual or Legal Entity
77
+      on behalf of whom a Contribution has been received by Licensor and
78
+      subsequently incorporated within the Work.
79
+
80
+   2. Grant of Copyright License. Subject to the terms and conditions of
81
+      this License, each Contributor hereby grants to You a perpetual,
82
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
83
+      copyright license to reproduce, prepare Derivative Works of,
84
+      publicly display, publicly perform, sublicense, and distribute the
85
+      Work and such Derivative Works in Source or Object form.
86
+
87
+   3. Grant of Patent License. Subject to the terms and conditions of
88
+      this License, each Contributor hereby grants to You a perpetual,
89
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
90
+      (except as stated in this section) patent license to make, have made,
91
+      use, offer to sell, sell, import, and otherwise transfer the Work,
92
+      where such license applies only to those patent claims licensable
93
+      by such Contributor that are necessarily infringed by their
94
+      Contribution(s) alone or by combination of their Contribution(s)
95
+      with the Work to which such Contribution(s) was submitted. If You
96
+      institute patent litigation against any entity (including a
97
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
98
+      or a Contribution incorporated within the Work constitutes direct
99
+      or contributory patent infringement, then any patent licenses
100
+      granted to You under this License for that Work shall terminate
101
+      as of the date such litigation is filed.
102
+
103
+   4. Redistribution. You may reproduce and distribute copies of the
104
+      Work or Derivative Works thereof in any medium, with or without
105
+      modifications, and in Source or Object form, provided that You
106
+      meet the following conditions:
107
+
108
+      (a) You must give any other recipients of the Work or
109
+          Derivative Works a copy of this License; and
110
+
111
+      (b) You must cause any modified files to carry prominent notices
112
+          stating that You changed the files; and
113
+
114
+      (c) You must retain, in the Source form of any Derivative Works
115
+          that You distribute, all copyright, patent, trademark, and
116
+          attribution notices from the Source form of the Work,
117
+          excluding those notices that do not pertain to any part of
118
+          the Derivative Works; and
119
+
120
+      (d) If the Work includes a "NOTICE" text file as part of its
121
+          distribution, then any Derivative Works that You distribute must
122
+          include a readable copy of the attribution notices contained
123
+          within such NOTICE file, excluding those notices that do not
124
+          pertain to any part of the Derivative Works, in at least one
125
+          of the following places: within a NOTICE text file distributed
126
+          as part of the Derivative Works; within the Source form or
127
+          documentation, if provided along with the Derivative Works; or,
128
+          within a display generated by the Derivative Works, if and
129
+          wherever such third-party notices normally appear. The contents
130
+          of the NOTICE file are for informational purposes only and
131
+          do not modify the License. You may add Your own attribution
132
+          notices within Derivative Works that You distribute, alongside
133
+          or as an addendum to the NOTICE text from the Work, provided
134
+          that such additional attribution notices cannot be construed
135
+          as modifying the License.
136
+
137
+      You may add Your own copyright statement to Your modifications and
138
+      may provide additional or different license terms and conditions
139
+      for use, reproduction, or distribution of Your modifications, or
140
+      for any such Derivative Works as a whole, provided Your use,
141
+      reproduction, and distribution of the Work otherwise complies with
142
+      the conditions stated in this License.
143
+
144
+   5. Submission of Contributions. Unless You explicitly state otherwise,
145
+      any Contribution intentionally submitted for inclusion in the Work
146
+      by You to the Licensor shall be under the terms and conditions of
147
+      this License, without any additional terms or conditions.
148
+      Notwithstanding the above, nothing herein shall supersede or modify
149
+      the terms of any separate license agreement you may have executed
150
+      with Licensor regarding such Contributions.
151
+
152
+   6. Trademarks. This License does not grant permission to use the trade
153
+      names, trademarks, service marks, or product names of the Licensor,
154
+      except as required for reasonable and customary use in describing the
155
+      origin of the Work and reproducing the content of the NOTICE file.
156
+
157
+   7. Disclaimer of Warranty. Unless required by applicable law or
158
+      agreed to in writing, Licensor provides the Work (and each
159
+      Contributor provides its Contributions) on an "AS IS" BASIS,
160
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
161
+      implied, including, without limitation, any warranties or conditions
162
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
163
+      PARTICULAR PURPOSE. You are solely responsible for determining the
164
+      appropriateness of using or redistributing the Work and assume any
165
+      risks associated with Your exercise of permissions under this License.
166
+
167
+   8. Limitation of Liability. In no event and under no legal theory,
168
+      whether in tort (including negligence), contract, or otherwise,
169
+      unless required by applicable law (such as deliberate and grossly
170
+      negligent acts) or agreed to in writing, shall any Contributor be
171
+      liable to You for damages, including any direct, indirect, special,
172
+      incidental, or consequential damages of any character arising as a
173
+      result of this License or out of the use or inability to use the
174
+      Work (including but not limited to damages for loss of goodwill,
175
+      work stoppage, computer failure or malfunction, or any and all
176
+      other commercial damages or losses), even if such Contributor
177
+      has been advised of the possibility of such damages.
178
+
179
+   9. Accepting Warranty or Additional Liability. While redistributing
180
+      the Work or Derivative Works thereof, You may choose to offer,
181
+      and charge a fee for, acceptance of support, warranty, indemnity,
182
+      or other liability obligations and/or rights consistent with this
183
+      License. However, in accepting such obligations, You may act only
184
+      on Your own behalf and on Your sole responsibility, not on behalf
185
+      of any other Contributor, and only if You agree to indemnify,
186
+      defend, and hold each Contributor harmless for any liability
187
+      incurred by, or claims asserted against, such Contributor by reason
188
+      of your accepting any such warranty or additional liability.
189
+
190
+   END OF TERMS AND CONDITIONS
191
+
192
+   ============================================================================
193
+
194
+   Copyright 2016-2019 Intel Corporation
195
+   Copyright 2018 YANDEX LLC
196
+
197
+   Licensed under the Apache License, Version 2.0 (the "License");
198
+   you may not use this file except in compliance with the License.
199
+   You may obtain a copy of the License at
200
+
201
+       http://www.apache.org/licenses/LICENSE-2.0
202
+
203
+   Unless required by applicable law or agreed to in writing, software
204
+   distributed under the License is distributed on an "AS IS" BASIS,
205
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
206
+   See the License for the specific language governing permissions and
207
+   limitations under the License.
208
+
209
+   This distribution includes third party software ("third party programs").
210
+   This third party software, even if included with the distribution of
211
+   the Intel software, may be governed by separate license terms, including
212
+   without limitation, third party license terms, other Intel software license
213
+   terms, and open source software license terms. These separate license terms
214
+   govern your use of the third party programs as set forth in the
215
+   "THIRD-PARTY-PROGRAMS" file.
216
+
217
+_____
218
+
219
+FlashAttention, https://github.com/Dao-AILab/flash-attention
220
+
221
+BSD 3-Clause License
222
+
223
+Copyright (c) 2022, the respective contributors, as shown by the AUTHORS file.
224
+All rights reserved.
225
+
226
+Redistribution and use in source and binary forms, with or without
227
+modification, are permitted provided that the following conditions are met:
228
+
229
+* Redistributions of source code must retain the above copyright notice, this
230
+  list of conditions and the following disclaimer.
231
+
232
+* Redistributions in binary form must reproduce the above copyright notice,
233
+  this list of conditions and the following disclaimer in the documentation
234
+  and/or other materials provided with the distribution.
235
+
236
+* Neither the name of the copyright holder nor the names of its
237
+  contributors may be used to endorse or promote products derived from
238
+  this software without specific prior written permission.
239
+
240
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
241
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
242
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
243
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
244
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
245
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
246
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
247
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
248
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
249
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
250
+
251
+_____
252
+
253
+composable_kernel
254
+
255
+https://github.com/ROCmSoftwarePlatform/composable_kernel
256
+
257
+Copyright (c) 2018-    , Advanced Micro Devices, Inc. (Chao Liu, Jing Zhang)
258
+Copyright (c) 2019-    , Advanced Micro Devices, Inc. (Letao Qin, Qianfeng Zhang, Liang Huang, Shaojie Wang)
259
+Copyright (c) 2022-    , Advanced Micro Devices, Inc. (Anthony Chang, Chunyu Lai, Illia Silin, Adam Osewski, Poyen Chen, Jehandad Khan)
260
+Copyright (c) 2019-2021, Advanced Micro Devices, Inc. (Hanwen Chang)
261
+Copyright (c) 2019-2020, Advanced Micro Devices, Inc. (Tejash Shah)
262
+Copyright (c) 2020     , Advanced Micro Devices, Inc. (Xiaoyan Zhou)
263
+Copyright (c) 2021-2022, Advanced Micro Devices, Inc. (Jianfeng Yan)
264
+
265
+SPDX-License-Identifier: MIT
266
+Copyright (c) 2018-2023, Advanced Micro Devices, Inc. All rights reserved.
267
+
268
+Permission is hereby granted, free of charge, to any person obtaining a copy
269
+of this software and associated documentation files (the "Software"), to deal
270
+in the Software without restriction, including without limitation the rights
271
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
272
+copies of the Software, and to permit persons to whom the Software is
273
+furnished to do so, subject to the following conditions:
274
+
275
+The above copyright notice and this permission notice shall be included in all
276
+copies or substantial portions of the Software.
277
+
278
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
279
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
280
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
281
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
282
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
283
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
284
+SOFTWARE.
285
+
286
+_____
287
+
288
+neural-speed
289
+
290
+https://github.com/intel/neural-speed
291
+
292
+                                 Apache License
293
+                        http://www.apache.org/licenses/
294
+
295
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
296
+
297
+   1. Definitions.
298
+
299
+      "License" shall mean the terms and conditions for use, reproduction,
300
+      and distribution as defined by Sections 1 through 9 of this document.
301
+
302
+      "Licensor" shall mean the copyright owner or entity authorized by
303
+      the copyright owner that is granting the License.
304
+
305
+      "Legal Entity" shall mean the union of the acting entity and all
306
+      other entities that control, are controlled by, or are under common
307
+      control with that entity. For the purposes of this definition,
308
+      "control" means (i) the power, direct or indirect, to cause the
309
+      direction or management of such entity, whether by contract or
310
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
311
+      outstanding shares, or (iii) beneficial ownership of such entity.
312
+
313
+      "You" (or "Your") shall mean an individual or Legal Entity
314
+      exercising permissions granted by this License.
315
+
316
+      "Source" form shall mean the preferred form for making modifications,
317
+      including but not limited to software source code, documentation
318
+      source, and configuration files.
319
+
320
+      "Object" form shall mean any form resulting from mechanical
321
+      transformation or translation of a Source form, including but
322
+      not limited to compiled object code, generated documentation,
323
+      and conversions to other media types.
324
+
325
+      "Work" shall mean the work of authorship, whether in Source or
326
+      Object form, made available under the License, as indicated by a
327
+      copyright notice that is included in or attached to the work
328
+      (an example is provided in the Appendix below).
329
+
330
+      "Derivative Works" shall mean any work, whether in Source or Object
331
+      form, that is based on (or derived from) the Work and for which the
332
+      editorial revisions, annotations, elaborations, or other modifications
333
+      represent, as a whole, an original work of authorship. For the purposes
334
+      of this License, Derivative Works shall not include works that remain
335
+      separable from, or merely link (or bind by name) to the interfaces of,
336
+      the Work and Derivative Works thereof.
337
+
338
+      "Contribution" shall mean any work of authorship, including
339
+      the original version of the Work and any modifications or additions
340
+      to that Work or Derivative Works thereof, that is intentionally
341
+      submitted to Licensor for inclusion in the Work by the copyright owner
342
+      or by an individual or Legal Entity authorized to submit on behalf of
343
+      the copyright owner. For the purposes of this definition, "submitted"
344
+      means any form of electronic, verbal, or written communication sent
345
+      to the Licensor or its representatives, including but not limited to
346
+      communication on electronic mailing lists, source code control systems,
347
+      and issue tracking systems that are managed by, or on behalf of, the
348
+      Licensor for the purpose of discussing and improving the Work, but
349
+      excluding communication that is conspicuously marked or otherwise
350
+      designated in writing by the copyright owner as "Not a Contribution."
351
+
352
+      "Contributor" shall mean Licensor and any individual or Legal Entity
353
+      on behalf of whom a Contribution has been received by Licensor and
354
+      subsequently incorporated within the Work.
355
+
356
+   2. Grant of Copyright License. Subject to the terms and conditions of
357
+      this License, each Contributor hereby grants to You a perpetual,
358
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
359
+      copyright license to reproduce, prepare Derivative Works of,
360
+      publicly display, publicly perform, sublicense, and distribute the
361
+      Work and such Derivative Works in Source or Object form.
362
+
363
+   3. Grant of Patent License. Subject to the terms and conditions of
364
+      this License, each Contributor hereby grants to You a perpetual,
365
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
366
+      (except as stated in this section) patent license to make, have made,
367
+      use, offer to sell, sell, import, and otherwise transfer the Work,
368
+      where such license applies only to those patent claims licensable
369
+      by such Contributor that are necessarily infringed by their
370
+      Contribution(s) alone or by combination of their Contribution(s)
371
+      with the Work to which such Contribution(s) was submitted. If You
372
+      institute patent litigation against any entity (including a
373
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
374
+      or a Contribution incorporated within the Work constitutes direct
375
+      or contributory patent infringement, then any patent licenses
376
+      granted to You under this License for that Work shall terminate
377
+      as of the date such litigation is filed.
378
+
379
+   4. Redistribution. You may reproduce and distribute copies of the
380
+      Work or Derivative Works thereof in any medium, with or without
381
+      modifications, and in Source or Object form, provided that You
382
+      meet the following conditions:
383
+
384
+      (a) You must give any other recipients of the Work or
385
+          Derivative Works a copy of this License; and
386
+
387
+      (b) You must cause any modified files to carry prominent notices
388
+          stating that You changed the files; and
389
+
390
+      (c) You must retain, in the Source form of any Derivative Works
391
+          that You distribute, all copyright, patent, trademark, and
392
+          attribution notices from the Source form of the Work,
393
+          excluding those notices that do not pertain to any part of
394
+          the Derivative Works; and
395
+
396
+      (d) If the Work includes a "NOTICE" text file as part of its
397
+          distribution, then any Derivative Works that You distribute must
398
+          include a readable copy of the attribution notices contained
399
+          within such NOTICE file, excluding those notices that do not
400
+          pertain to any part of the Derivative Works, in at least one
401
+          of the following places: within a NOTICE text file distributed
402
+          as part of the Derivative Works; within the Source form or
403
+          documentation, if provided along with the Derivative Works; or,
404
+          within a display generated by the Derivative Works, if and
405
+          wherever such third-party notices normally appear. The contents
406
+          of the NOTICE file are for informational purposes only and
407
+          do not modify the License. You may add Your own attribution
408
+          notices within Derivative Works that You distribute, alongside
409
+          or as an addendum to the NOTICE text from the Work, provided
410
+          that such additional attribution notices cannot be construed
411
+          as modifying the License.
412
+
413
+      You may add Your own copyright statement to Your modifications and
414
+      may provide additional or different license terms and conditions
415
+      for use, reproduction, or distribution of Your modifications, or
416
+      for any such Derivative Works as a whole, provided Your use,
417
+      reproduction, and distribution of the Work otherwise complies with
418
+      the conditions stated in this License.
419
+
420
+   5. Submission of Contributions. Unless You explicitly state otherwise,
421
+      any Contribution intentionally submitted for inclusion in the Work
422
+      by You to the Licensor shall be under the terms and conditions of
423
+      this License, without any additional terms or conditions.
424
+      Notwithstanding the above, nothing herein shall supersede or modify
425
+      the terms of any separate license agreement you may have executed
426
+      with Licensor regarding such Contributions.
427
+
428
+   6. Trademarks. This License does not grant permission to use the trade
429
+      names, trademarks, service marks, or product names of the Licensor,
430
+      except as required for reasonable and customary use in describing the
431
+      origin of the Work and reproducing the content of the NOTICE file.
432
+
433
+   7. Disclaimer of Warranty. Unless required by applicable law or
434
+      agreed to in writing, Licensor provides the Work (and each
435
+      Contributor provides its Contributions) on an "AS IS" BASIS,
436
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
437
+      implied, including, without limitation, any warranties or conditions
438
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
439
+      PARTICULAR PURPOSE. You are solely responsible for determining the
440
+      appropriateness of using or redistributing the Work and assume any
441
+      risks associated with Your exercise of permissions under this License.
442
+
443
+   8. Limitation of Liability. In no event and under no legal theory,
444
+      whether in tort (including negligence), contract, or otherwise,
445
+      unless required by applicable law (such as deliberate and grossly
446
+      negligent acts) or agreed to in writing, shall any Contributor be
447
+      liable to You for damages, including any direct, indirect, special,
448
+      incidental, or consequential damages of any character arising as a
449
+      result of this License or out of the use or inability to use the
450
+      Work (including but not limited to damages for loss of goodwill,
451
+      work stoppage, computer failure or malfunction, or any and all
452
+      other commercial damages or losses), even if such Contributor
453
+      has been advised of the possibility of such damages.
454
+
455
+   9. Accepting Warranty or Additional Liability. While redistributing
456
+      the Work or Derivative Works thereof, You may choose to offer,
457
+      and charge a fee for, acceptance of support, warranty, indemnity,
458
+      or other liability obligations and/or rights consistent with this
459
+      License. However, in accepting such obligations, You may act only
460
+      on Your own behalf and on Your sole responsibility, not on behalf
461
+      of any other Contributor, and only if You agree to indemnify,
462
+      defend, and hold each Contributor harmless for any liability
463
+      incurred by, or claims asserted against, such Contributor by reason
464
+      of your accepting any such warranty or additional liability.
465
+
466
+   END OF TERMS AND CONDITIONS
467
+
468
+   ============================================================================
469
+
470
+   Copyright 2016-2019 Intel Corporation
471
+   Copyright 2018 YANDEX LLC
472
+
473
+   Licensed under the Apache License, Version 2.0 (the "License");
474
+   you may not use this file except in compliance with the License.
475
+   You may obtain a copy of the License at
476
+
477
+       http://www.apache.org/licenses/LICENSE-2.0
478
+
479
+   Unless required by applicable law or agreed to in writing, software
480
+   distributed under the License is distributed on an "AS IS" BASIS,
481
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
482
+   See the License for the specific language governing permissions and
483
+   limitations under the License.
484
+
485
+   This distribution includes third party software ("third party programs").
486
+   This third party software, even if included with the distribution of
487
+   the Intel software, may be governed by separate license terms, including
488
+   without limitation, third party license terms, other Intel software license
489
+   terms, and open source software license terms. These separate license terms
490
+   govern your use of the third party programs as set forth in the
491
+   "THIRD-PARTY-PROGRAMS" file.
492
onnxruntime-linux-x64-gpu-1.15.1.tgz/VERSION_NUMBER -> onnxruntime-linux-x64-gpu-1.17.1.tgz/VERSION_NUMBER Changed
4
 
1
@@ -1,1 +1,1 @@
2
-1.15.1
3
+1.17.1
4
onnxruntime-linux-x64-gpu-1.17.1.tgz/include/core Added
2
 
1
+(directory)
2
onnxruntime-linux-x64-gpu-1.17.1.tgz/include/core/providers Added
2
 
1
+(directory)
2
onnxruntime-linux-x64-gpu-1.17.1.tgz/include/core/providers/cuda Added
2
 
1
+(directory)
2
onnxruntime-linux-x64-gpu-1.17.1.tgz/include/core/providers/cuda/cuda_context.h Added
99
 
1
@@ -0,0 +1,97 @@
2
+// Copyright (c) Microsoft Corporation. All rights reserved.
3
+// Licensed under the MIT License.
4
+
5
+// This header is to expose a context for cuda custom ops.
6
+// By the context, a custom cuda operator could fetch existing resources,
7
+// such as cuda stream and cudnn handle, for reusing.
8
+
9
+// For concrete usage, pls find page here:
10
+// https://onnxruntime.ai/docs/reference/operators/add-custom-op.html#custom-ops-for-cuda-and-rocm
11
+
12
+#pragma once
13
+
14
+#define ORT_CUDA_CTX
15
+
16
+#include "cuda_resource.h"
17
+#include "core/providers/custom_op_context.h"
18
+#include <cuda.h>
19
+#include <cuda_runtime.h>
20
+#include <cublas_v2.h>
21
+#include <cudnn.h>
22
+
23
+namespace Ort {
24
+
25
+namespace Custom {
26
+
27
+struct CudaContext : public CustomOpContext {
28
+  cudaStream_t cuda_stream = {};
29
+  cudnnHandle_t cudnn_handle = {};
30
+  cublasHandle_t cublas_handle = {};
31
+  OrtAllocator* deferred_cpu_allocator = {};
32
+  // below are cuda ep options
33
+  int16_t device_id = 0;
34
+  int32_t arena_extend_strategy = 0;
35
+  int32_t cudnn_conv_algo_search = 0;
36
+  bool cudnn_conv_use_max_workspace = true;
37
+  bool cudnn_conv1d_pad_to_nc1d = false;
38
+  bool enable_skip_layer_norm_strict_mode = false;
39
+  bool prefer_nhwc = false;
40
+
41
+  void Init(const OrtKernelContext& kernel_ctx) {
42
+    cuda_stream = FetchResource<cudaStream_t>(kernel_ctx, CudaResource::cuda_stream_t);
43
+    cudnn_handle = FetchResource<cudnnHandle_t>(kernel_ctx, CudaResource::cudnn_handle_t);
44
+    cublas_handle = FetchResource<cublasHandle_t>(kernel_ctx, CudaResource::cublas_handle_t);
45
+    deferred_cpu_allocator = FetchResource<OrtAllocator*>(kernel_ctx, CudaResource::deferred_cpu_allocator_t);
46
+
47
+    device_id = FetchResource<int16_t>(kernel_ctx, CudaResource::device_id_t);
48
+    arena_extend_strategy = FetchResource<int32_t>(kernel_ctx, CudaResource::arena_extend_strategy_t);
49
+    cudnn_conv_algo_search = FetchResource<int32_t>(kernel_ctx, CudaResource::cudnn_conv_algo_search_t);
50
+    cudnn_conv_use_max_workspace = FetchResource<bool>(kernel_ctx, CudaResource::cudnn_conv_use_max_workspace_t);
51
+
52
+    cudnn_conv1d_pad_to_nc1d = FetchResource<bool>(kernel_ctx, CudaResource::cudnn_conv1d_pad_to_nc1d_t);
53
+    enable_skip_layer_norm_strict_mode = FetchResource<bool>(kernel_ctx, CudaResource::enable_skip_layer_norm_strict_mode_t);
54
+    prefer_nhwc = FetchResource<bool>(kernel_ctx, CudaResource::prefer_nhwc_t);
55
+  }
56
+
57
+  template <typename T>
58
+  T FetchResource(const OrtKernelContext& kernel_ctx, CudaResource resource_type) {
59
+    if (sizeof(T) > sizeof(void*)) {
60
+      ORT_CXX_API_THROW("void* is not large enough to hold resource type: " + std::to_string(resource_type), OrtErrorCode::ORT_INVALID_ARGUMENT);
61
+    }
62
+    const auto& ort_api = Ort::GetApi();
63
+    void* resource = {};
64
+    OrtStatus* status = ort_api.KernelContext_GetResource(&kernel_ctx, ORT_CUDA_RESOUCE_VERSION, resource_type, &resource);
65
+    if (status) {
66
+      ORT_CXX_API_THROW("Failed to fetch cuda ep resource, resouce type: " + std::to_string(resource_type), OrtErrorCode::ORT_RUNTIME_EXCEPTION);
67
+    }
68
+    T t = {};
69
+    memcpy(&t, &resource, sizeof(T));
70
+    return t;
71
+  }
72
+
73
+  void* AllocDeferredCpuMem(size_t size) const {
74
+    if (0 == size) {
75
+      return {};
76
+    }
77
+    const auto& ort_api = Ort::GetApi();
78
+    void* mem = {};
79
+    auto status = ort_api.AllocatorAlloc(deferred_cpu_allocator, size, &mem);
80
+    if (status) {
81
+      ORT_CXX_API_THROW("failed to allocate deferred cpu memory", OrtErrorCode::ORT_RUNTIME_EXCEPTION);
82
+    }
83
+    return mem;
84
+  }
85
+
86
+  void FreeDeferredCpuMem(void* mem) const {
87
+    if (mem) {
88
+      const auto& ort_api = Ort::GetApi();
89
+      auto status = ort_api.AllocatorFree(deferred_cpu_allocator, mem);
90
+      if (status) {
91
+        ORT_CXX_API_THROW("failed to free deferred cpu memory", OrtErrorCode::ORT_RUNTIME_EXCEPTION);
92
+      }
93
+    }
94
+  }
95
+};
96
+
97
+}  // namespace Custom
98
+}  // namespace Ort
99
onnxruntime-linux-x64-gpu-1.17.1.tgz/include/core/providers/cuda/cuda_resource.h Added
24
 
1
@@ -0,0 +1,21 @@
2
+// Copyright (c) Microsoft Corporation. All rights reserved.
3
+// Licensed under the MIT License.
4
+
5
+#include "core/providers/resource.h"
6
+
7
+#define ORT_CUDA_RESOUCE_VERSION 3
8
+
9
+enum CudaResource : int {
10
+  cuda_stream_t = cuda_resource_offset,  // 10000
11
+  cudnn_handle_t,
12
+  cublas_handle_t,
13
+  deferred_cpu_allocator_t,
14
+  // below are cuda ep options
15
+  device_id_t,  // 10004
16
+  arena_extend_strategy_t,
17
+  cudnn_conv_algo_search_t,
18
+  cudnn_conv_use_max_workspace_t,
19
+  cudnn_conv1d_pad_to_nc1d_t,
20
+  enable_skip_layer_norm_strict_mode_t,
21
+  prefer_nhwc_t,
22
+};
23
\ No newline at end of file
24
onnxruntime-linux-x64-gpu-1.17.1.tgz/include/core/providers/custom_op_context.h Added
13
 
1
@@ -0,0 +1,10 @@
2
+// Copyright (c) Microsoft Corporation. All rights reserved.
3
+// Licensed under the MIT License.
4
+
5
+#pragma once
6
+
7
+// CustomOpContext defines an interface allowing a custom op to access ep-specific resources.
8
+struct CustomOpContext {
9
+  CustomOpContext() = default;
10
+  virtual ~CustomOpContext(){};
11
+};
12
\ No newline at end of file
13
onnxruntime-linux-x64-gpu-1.17.1.tgz/include/core/providers/resource.h Added
17
 
1
@@ -0,0 +1,14 @@
2
+// Copyright (c) Microsoft Corporation. All rights reserved.
3
+// Licensed under the MIT License.
4
+
5
+#pragma once
6
+
7
+enum ResourceOffset {
8
+  cpu_resource_offset = 0,
9
+  cuda_resource_offset = 10000,
10
+  dml_resource_offset = 20000,
11
+  rocm_resource_offset = 30000,
12
+  // offsets for other ort eps
13
+  custom_ep_resource_offset = 10000000,
14
+  // offsets for customized eps
15
+};
16
\ No newline at end of file
17
onnxruntime-linux-x64-gpu-1.15.1.tgz/include/onnxruntime_c_api.h -> onnxruntime-linux-x64-gpu-1.17.1.tgz/include/onnxruntime_c_api.h Changed
635
 
1
@@ -5,11 +5,11 @@
2
 
3
 /** \mainpage ONNX Runtime
4
  *
5
- * ONNX Runtime is a high-performance inference and training graph execution engine for deeplearning models.
6
+ * ONNX Runtime is a high-performance inference and training graph execution engine for deep learning models.
7
  *
8
  * ONNX Runtime's C, C++ APIs offer an easy to use interface to onboard and execute onnx models.
9
  * - \subpage c_cpp_api "Core C, C++ APIs"
10
- * - \subpage training_c_cpp_api "Training C, C++ APIs for learning on the edge"
11
+ * - \subpage training_c_cpp_api "Training C, C++ APIs for on-device training"
12
  *
13
  * \page c_cpp_api Core C, C++ APIs
14
  * <h1>C</h1>
15
@@ -29,15 +29,16 @@
16
  */
17
 
18
 #pragma once
19
-#include <stdlib.h>
20
+#include <stdbool.h>
21
 #include <stdint.h>
22
+#include <stdlib.h>
23
 #include <string.h>
24
 
25
 /** \brief The API version defined in this header
26
  *
27
  * This value is used by some API functions to behave as this version of the header expects.
28
  */
29
-#define ORT_API_VERSION 15
30
+#define ORT_API_VERSION 17
31
 
32
 #ifdef __cplusplus
33
 extern "C" {
34
@@ -61,6 +62,8 @@
35
 #define _Check_return_
36
 #define _Outptr_result_maybenull_
37
 #define _In_reads_(X)
38
+#define _Inout_updates_(X)
39
+#define _Out_writes_(X)
40
 #define _Inout_updates_all_(X)
41
 #define _Out_writes_bytes_all_(X)
42
 #define _Out_writes_all_(X)
43
@@ -188,7 +191,12 @@
44
   ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT64,      // maps to c type uint64_t
45
   ONNX_TENSOR_ELEMENT_DATA_TYPE_COMPLEX64,   // complex with float32 real and imaginary components
46
   ONNX_TENSOR_ELEMENT_DATA_TYPE_COMPLEX128,  // complex with float64 real and imaginary components
47
-  ONNX_TENSOR_ELEMENT_DATA_TYPE_BFLOAT16     // Non-IEEE floating-point format based on IEEE754 single-precision
48
+  ONNX_TENSOR_ELEMENT_DATA_TYPE_BFLOAT16,    // Non-IEEE floating-point format based on IEEE754 single-precision
49
+  // float 8 types were introduced in onnx 1.14, see https://onnx.ai/onnx/technical/float8.html
50
+  ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT8E4M3FN,    // Non-IEEE floating-point format based on IEEE754 single-precision
51
+  ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT8E4M3FNUZ,  // Non-IEEE floating-point format based on IEEE754 single-precision
52
+  ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT8E5M2,      // Non-IEEE floating-point format based on IEEE754 single-precision
53
+  ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT8E5M2FNUZ   // Non-IEEE floating-point format based on IEEE754 single-precision
54
 } ONNXTensorElementDataType;
55
 
56
 // Synced with onnx TypeProto oneof
57
@@ -292,6 +300,7 @@
58
 ORT_RUNTIME_CLASS(Op);
59
 ORT_RUNTIME_CLASS(OpAttr);
60
 ORT_RUNTIME_CLASS(Logger);
61
+ORT_RUNTIME_CLASS(ShapeInferContext);
62
 
63
 #ifdef _WIN32
64
 typedef _Return_type_success_(return == 0) OrtStatus* OrtStatusPtr;
65
@@ -401,7 +410,8 @@
66
         user_compute_stream{},
67
         default_memory_arena_cfg{},
68
         tunable_op_enable{false},
69
-        tunable_op_tuning_enable{false} {}
70
+        tunable_op_tuning_enable{false},
71
+        tunable_op_max_tuning_duration_ms{} {}
72
 #endif
73
 
74
   /** \brief CUDA device Id
75
@@ -464,6 +474,11 @@
76
    */
77
   int tunable_op_tuning_enable;
78
 
79
+  /** \brief Max tuning duration time limit for each instance of TunableOp.
80
+   *   Defaults to 0 to disable the limit.
81
+   */
82
+  int tunable_op_max_tuning_duration_ms;
83
+
84
 } OrtCUDAProviderOptions;
85
 
86
 /** \brief ROCM Provider Options
87
@@ -482,7 +497,8 @@
88
         user_compute_stream{},
89
         default_memory_arena_cfg{},
90
         tunable_op_enable{false},
91
-        tunable_op_tuning_enable{false} {}
92
+        tunable_op_tuning_enable{false},
93
+        tunable_op_max_tuning_duration_ms{} {}
94
 #endif
95
 
96
   /** \brief ROCM device Id
97
@@ -544,6 +560,11 @@
98
    */
99
   int tunable_op_tuning_enable;
100
 
101
+  /** \brief Max tuning duration time limit for each instance of TunableOp.
102
+   *   Defaults to 0 to disable the limit.
103
+   */
104
+  int tunable_op_max_tuning_duration_ms;
105
+
106
 } OrtROCMProviderOptions;
107
 
108
 /** \brief TensorRT Provider Options
109
@@ -579,9 +600,11 @@
110
  * \see OrtApi::SessionOptionsAppendExecutionProvider_MIGraphX
111
  */
112
 typedef struct OrtMIGraphXProviderOptions {
113
-  int device_id;             // hip device id.
114
-  int migraphx_fp16_enable;  // enable MIGraphX FP16 precision. Default 0 = false, nonzero = true
115
-  int migraphx_int8_enable;  // enable MIGraphX INT8 precision. Default 0 = false, nonzero = true
116
+  int device_id;                                     // hip device id.
117
+  int migraphx_fp16_enable;                          // MIGraphX FP16 precision. Default 0 = false, nonzero = true
118
+  int migraphx_int8_enable;                          // MIGraphX INT8 precision. Default 0 = false, nonzero = true
119
+  int migraphx_use_native_calibration_table;         // MIGraphx INT8 cal table. Default 0 = false, noznero = true
120
+  const char* migraphx_int8_calibration_table_name;  // MIGraphx INT8 calibration table name
121
 } OrtMIGraphXProviderOptions;
122
 
123
 /** \brief OpenVINO Provider Options
124
@@ -591,7 +614,7 @@
125
 typedef struct OrtOpenVINOProviderOptions {
126
 #ifdef __cplusplus
127
   OrtOpenVINOProviderOptions() : device_type{},
128
-                                 enable_vpu_fast_compile{},
129
+                                 enable_npu_fast_compile{},
130
                                  device_id{},
131
                                  num_of_threads{},
132
                                  cache_dir{},
133
@@ -604,7 +627,7 @@
134
    * Valid settings are one of: "CPU_FP32", "CPU_FP16", "GPU_FP32", "GPU_FP16"
135
    */
136
   const char* device_type;
137
-  unsigned char enable_vpu_fast_compile;  ///< 0 = disabled, nonzero = enabled
138
+  unsigned char enable_npu_fast_compile;  ///< 0 = disabled, nonzero = enabled
139
   const char* device_id;
140
   size_t num_of_threads;  ///< 0 = Use default number of threads
141
   const char* cache_dir;  // path is set to empty by default
142
@@ -677,6 +700,15 @@
143
 
144
 typedef OrtStatus*(ORT_API_CALL* RegisterCustomOpsFn)(OrtSessionOptions* options, const OrtApiBase* api);
145
 
146
+/** \brief Callback function for RunAsync
147
+ *
148
+ * \paramin user_data User specific data that passed back to the callback
149
+ * \paramout outputs On succeed, outputs host inference results, on error, the value will be nullptr
150
+ * \paramout num_outputs Number of outputs, on error, the value will be zero
151
+ * \paramout status On error, status will provide details
152
+ */
153
+typedef void (*RunAsyncCallbackFn)(void* user_data, OrtValue** outputs, size_t num_outputs, OrtStatusPtr status);
154
+
155
 /** \brief The C API
156
  *
157
  * All C API functions are defined inside this structure as pointers to functions.
158
@@ -717,6 +749,8 @@
159
 
160
   /** \brief Create an OrtEnv
161
    *
162
+   * \note Invoking this function will return the same instance of the environment as that returned by a previous call
163
+   * to another env creation function; all arguments to this function will be ignored.
164
    * \paramin log_severity_level The log severity level.
165
    * \paramin logid The log identifier.
166
    * \paramout out Returned newly created OrtEnv. Must be freed with OrtApi::ReleaseEnv
167
@@ -727,17 +761,20 @@
168
 
169
   /** \brief Create an OrtEnv
170
    *
171
+   * \note Invoking this function will return the same instance of the environment as that returned by a previous call
172
+   * to another env creation function; all arguments to this function will be ignored. If you want to provide your
173
+   * own logging function, consider setting it using the SetUserLoggingFunction API instead.
174
    * \paramin logging_function A pointer to a logging function.
175
    * \paramin logger_param A pointer to arbitrary data passed as the ::OrtLoggingFunction `param` parameter to
176
-   *                         `logging_function`.
177
+   *                         `logging_function`. This parameter is optional.
178
    * \paramin log_severity_level The log severity level.
179
    * \paramin logid The log identifier.
180
    * \paramout out Returned newly created OrtEnv. Must be freed with OrtApi::ReleaseEnv
181
    *
182
    * \snippet{doc} snippets.dox OrtStatus Return Value
183
    */
184
-  ORT_API2_STATUS(CreateEnvWithCustomLogger, OrtLoggingFunction logging_function, _In_opt_ void* logger_param,
185
-                  OrtLoggingLevel log_severity_level, _In_ const char* logid, _Outptr_ OrtEnv** out);
186
+  ORT_API2_STATUS(CreateEnvWithCustomLogger, _In_ OrtLoggingFunction logging_function, _In_opt_ void* logger_param,
187
+                  _In_ OrtLoggingLevel log_severity_level, _In_ const char* logid, _Outptr_ OrtEnv** out);
188
 
189
   /** \brief Enable Telemetry
190
    *
191
@@ -959,7 +996,7 @@
192
 
193
   /** \brief Set the optimization level to apply when loading a graph
194
    *
195
-   * Please see https://onnxruntime.ai/docs/performance/graph-optimizations.html for an in-depth explanation
196
+   * Please see https://onnxruntime.ai/docs/performance/model-optimizations/graph-optimizations.html for an in-depth explanation
197
    * \paramin,out options The session options object
198
    * \paramin graph_optimization_level The optimization level
199
    *
200
@@ -2728,6 +2765,10 @@
201
    *  crossing which the current chunk is chunked into 2.
202
    * "initial_growth_chunk_size_bytes": (Possible) Size of the second allocation in the arena.
203
    *  Only relevant if arena strategy is `kNextPowerOfTwo`. Use -1 to allow ORT to choose the default.
204
+   * "max_power_of_two_extend_bytes": The maximum enxtend size if arena strategy is `kNextPowerOfTwo`.
205
+   *  It is not an allocation limit, it is only a limit for extention when requested byte is less than the limit.
206
+   *  When requested bytes is more than the limit, allocator will still return as requested.
207
+   *  Use -1 to allow ORT to choose the default 1GB for max_power_of_two_extend_bytes.
208
    *  Ultimately, the allocation size is determined by the allocation memory request.
209
    *  Further allocation sizes are governed by the arena extend strategy.
210
    *
211
@@ -3553,8 +3594,28 @@
212
    *
213
    * QNN supported keys:
214
    *   "backend_path": file path to QNN backend library.
215
-   *   "profiling_level": QNN profiling level, options: "basic", "detailed".
216
+   *   "profiling_level": QNN profiling level, options: "off", "basic", "detailed". Default to off.
217
    *   "rpc_control_latency": QNN RPC control latency.
218
+   *   "vtcm_mb": QNN VTCM size in MB. default to 0(not set).
219
+   *   "htp_performance_mode": QNN performance mode, options: "burst", "balanced", "default", "high_performance",
220
+   *   "high_power_saver", "low_balanced", "extreme_power_saver", "low_power_saver", "power_saver", "sustained_high_performance". Default to "default".
221
+   *   "qnn_saver_path": File path to the QNN Saver backend library. If specified, QNN Saver will be enabled and will
222
+   *   dump QNN API calls to disk for replay/debugging. QNN Saver produces incorrect model inference results and
223
+   *   may alter model/EP partitioning. Use only for debugging.
224
+   *   "qnn_context_priority": QNN context priority, options: "low", "normal", "normal_high", "high". Default to "normal".
225
+   *   "htp_graph_finalization_optimization_mode": Set the optimization mode for graph finalization on the HTP backend. Available options:
226
+   *     - "0": Default.
227
+   *     - "1": Faster preparation time, less optimal graph.
228
+   *     - "2": Longer preparation time, more optimal graph.
229
+   *     - "3": Longest preparation time, most likely even more optimal graph. See QNN SDK documentation for specific details.
230
+   *   "soc_model": The SoC model number. Refer to the QNN SDK documentation for valid values. Defaults to "0" (unknown).
231
+   *   "htp_arch": The minimum HTP architecture the driver will use to select compatible QNN operators. Available options:
232
+   *     - "0": Default (none).
233
+   *     - "68"
234
+   *     - "69"
235
+   *     - "73"
236
+   *     - "75"
237
+   *   "device_id": The ID of the device to use when setting 'htp_arch'. Defaults to "0" (for single device).
238
    *
239
    * SNPE supported keys:
240
    *   "runtime": SNPE runtime engine, options: "CPU", "CPU_FLOAT32", "GPU", "GPU_FLOAT32_16_HYBRID", "GPU_FLOAT16",
241
@@ -3568,6 +3629,7 @@
242
    *   "buffer_type": ITensor or user buffers, options: "ITENSOR", user buffer with different types - "TF8", "TF16", "UINT8", "FLOAT".
243
    *   "ITENSOR" -- default, ITensor which is float only.
244
    *   "TF8" -- quantized model required, "FLOAT" -- for both quantized or non-quantized model
245
+   *   "enable_init_cache": enable SNPE init caching feature, set to 1 to enabled it. Disabled by default.
246
    *   If SNPE is not available (due to a non Snpe enabled build or its dependencies not being installed), this function will fail.
247
    *
248
    * XNNPACK supported keys:
249
@@ -4191,7 +4253,7 @@
250
    */
251
   ORT_API2_STATUS(GetResizedStringTensorElementBuffer, _Inout_ OrtValue* value, _In_ size_t index, _In_ size_t length_in_bytes, _Inout_ char** buffer);
252
 
253
-  /** \brief Get Allocator from KernelContext for a specific memoryInfo.
254
+  /** \brief Get Allocator from KernelContext for a specific memoryInfo. Please use C API ReleaseAllocator to release out object
255
    *
256
    * \paramin context OrtKernelContext instance
257
    * \paramin mem_info OrtMemoryInfo instance
258
@@ -4210,6 +4272,300 @@
259
    * \since Version 1.15.
260
    */
261
   const char*(ORT_API_CALL* GetBuildInfoString)(void);
262
+
263
+  /// \name OrtROCMProviderOptions
264
+  /// @{
265
+
266
+  /** \brief Create an OrtROCMProviderOptions
267
+   *
268
+   * \paramout out Newly created ::OrtROCMProviderOptions. Must be released with OrtApi::ReleaseROCMProviderOptions
269
+   *
270
+   * \snippet{doc} snippets.dox OrtStatus Return Value
271
+   *
272
+   * \since Version 1.16.
273
+   */
274
+  ORT_API2_STATUS(CreateROCMProviderOptions, _Outptr_ OrtROCMProviderOptions** out);
275
+
276
+  /** \brief Set options in a ROCm Execution Provider.
277
+   *
278
+   * Please refer to https://onnxruntime.ai/docs/execution-providers/ROCm-ExecutionProvider.html
279
+   * to know the available keys and values. Key should be in null terminated string format of the member of
280
+   * ::OrtROCMProviderOptions and value should be its related range.
281
+   *
282
+   * For example, key="device_id" and value="0"
283
+   *
284
+   * \paramin rocm_options
285
+   * \paramin provider_options_keys Array of UTF-8 null-terminated string for provider options keys
286
+   * \paramin provider_options_values Array of UTF-8 null-terminated string for provider options values
287
+   * \paramin num_keys Number of elements in the `provider_option_keys` and `provider_options_values` arrays
288
+   *
289
+   * \snippet{doc} snippets.dox OrtStatus Return Value
290
+   *
291
+   * \since Version 1.16.
292
+   */
293
+  ORT_API2_STATUS(UpdateROCMProviderOptions, _Inout_ OrtROCMProviderOptions* rocm_options,
294
+                  _In_reads_(num_keys) const char* const* provider_options_keys,
295
+                  _In_reads_(num_keys) const char* const* provider_options_values,
296
+                  _In_ size_t num_keys);
297
+
298
+  /**
299
+   * Get serialized ROCm provider options string.
300
+   *
301
+   * For example, "device_id=0;arena_extend_strategy=0;......"
302
+   *
303
+   * \param rocm_options - OrtROCMProviderOptions instance
304
+   * \param allocator - a ptr to an instance of OrtAllocator obtained with CreateAllocator() or GetAllocatorWithDefaultOptions()
305
+   *                      the specified allocator will be used to allocate continuous buffers for output strings and lengths.
306
+   * \param ptr - is a UTF-8 null terminated string allocated using 'allocator'. The caller is responsible for using the same allocator to free it.
307
+   *
308
+   * \snippet{doc} snippets.dox OrtStatus Return Value
309
+   *
310
+   * \since Version 1.16.
311
+   */
312
+  ORT_API2_STATUS(GetROCMProviderOptionsAsString, _In_ const OrtROCMProviderOptions* rocm_options, _Inout_ OrtAllocator* allocator, _Outptr_ char** ptr);
313
+
314
+  /** \brief Release an ::OrtROCMProviderOptions
315
+   *
316
+   * \note This is an exception in the naming convention of other Release* functions, as the name of the method does not have the V2 suffix, but the type does
317
+   *
318
+   * \since Version 1.16.
319
+   */
320
+  void(ORT_API_CALL* ReleaseROCMProviderOptions)(_Frees_ptr_opt_ OrtROCMProviderOptions* input);
321
+
322
+  /** \brief Create an allocator with specific type and register it with the ::OrtEnv
323
+   *  This API enhance CreateAndRegisterAllocator that it can create an allocator with specific type, not just CPU allocator
324
+   *  Enables sharing the allocator between multiple sessions that use the same env instance.
325
+   *  Lifetime of the created allocator will be valid for the duration of the environment.
326
+   *  Returns an error if an allocator with the same ::OrtMemoryInfo is already registered.
327
+   *  \paramin env OrtEnv instance
328
+   *  \paramin provider_type ExecutionProvider type
329
+   *  \paramin mem_info OrtMemoryInfo instance
330
+   *  \paramin arena_cfg Arena configuration
331
+   *  \paramin provider_options_keys key of the provider options map
332
+   *  \paramin provider_options_values value of the provider options map
333
+   *  \paramin num_keys Length of the provider options map
334
+   */
335
+  ORT_API2_STATUS(CreateAndRegisterAllocatorV2, _Inout_ OrtEnv* env, _In_ const char* provider_type, _In_ const OrtMemoryInfo* mem_info, _In_ const OrtArenaCfg* arena_cfg,
336
+                  _In_reads_(num_keys) const char* const* provider_options_keys, _In_reads_(num_keys) const char* const* provider_options_values, _In_ size_t num_keys);
337
+
338
+  /** \brief Run the model asynchronously in a thread owned by intra op thread pool
339
+   *
340
+   * \paramin session
341
+   * \paramin run_options If nullptr, will use a default ::OrtRunOptions
342
+   * \paramin input_names Array of null terminated UTF8 encoded strings of the input names
343
+   * \paramin input Array of ::OrtValue%s of the input values
344
+   * \paramin input_len Number of elements in the input_names and inputs arrays
345
+   * \paramin output_names Array of null terminated UTF8 encoded strings of the output names
346
+   * \paramin output_names_len Number of elements in the output_names and outputs array
347
+   * \paramout output OrtValue* array of size output_names_len.
348
+   *             On calling RunAsync, outputi could either be a null or a pointer to a preallocated OrtValue.
349
+   *             Later, the output array will be passed to run_async_callback with all null(s) filled with valid
350
+   *             OrtValue pointer(s) allocated by onnxruntime.
351
+   *             NOTE: it is customer's duty to finally release the output array and each of its member,
352
+   *             regardless of whether the member (OrtValue*) is allocated by onnxruntime or preallocated by the customer.
353
+   * \paramin run_async_callback Callback function on model run completion
354
+   * \paramin user_data User data that pass back to run_async_callback
355
+   */
356
+  ORT_API2_STATUS(RunAsync, _Inout_ OrtSession* session, _In_opt_ const OrtRunOptions* run_options,
357
+                  _In_reads_(input_len) const char* const* input_names,
358
+                  _In_reads_(input_len) const OrtValue* const* input, size_t input_len,
359
+                  _In_reads_(output_names_len) const char* const* output_names, size_t output_names_len,
360
+                  _Inout_updates_all_(output_names_len) OrtValue** output,
361
+                  _In_ RunAsyncCallbackFn run_async_callback, _In_opt_ void* user_data);
362
+
363
+  /**
364
+   * Update TensorRT EP provider option where its data type is pointer, for example 'user_compute_stream'.
365
+   * If the data type of the provider option can be represented by string please use UpdateTensorRTProviderOptions.
366
+   *
367
+   * Note: It's caller's responsibility to properly manage the lifetime of the instance pointed by this pointer.
368
+   *
369
+   * \param tensorrt_options - OrtTensorRTProviderOptionsV2 instance
370
+   * \param key - Name of the provider option
371
+   * \param value - A pointer to the instance that will be assigned to this provider option
372
+   *
373
+   * \since Version 1.16.
374
+   */
375
+  ORT_API2_STATUS(UpdateTensorRTProviderOptionsWithValue, _Inout_ OrtTensorRTProviderOptionsV2* tensorrt_options, _In_ const char* key, _In_ void* value);
376
+
377
+  /**
378
+   * Get TensorRT EP provider option where its data type is pointer.
379
+   * If the data type of the provider option can be represented by string please use GetTensorRTProviderOptionsAsString.
380
+   *
381
+   * \param tensorrt_options - OrtTensorRTProviderOptionsV2 instance
382
+   * \param key - Name of the provider option
383
+   * \param ptr - A pointer to the instance that is kept by the provider option
384
+   *
385
+   * \since Version 1.16.
386
+   */
387
+  ORT_API2_STATUS(GetTensorRTProviderOptionsByName, _In_ const OrtTensorRTProviderOptionsV2* tensorrt_options, _In_ const char* key, _Outptr_ void** ptr);
388
+
389
+  /**
390
+   * Update CUDA EP provider option where its data type is pointer, for example 'user_compute_stream'.
391
+   * If the data type of the provider option can be represented by string please use UpdateCUDAProviderOptions.
392
+   *
393
+   * Note: It's caller's responsibility to properly manage the lifetime of the instance pointed by this pointer.
394
+   *
395
+   * \param cuda_options - OrtCUDAProviderOptionsV2 instance
396
+   * \param key - Name of the provider option
397
+   * \param value - A pointer to the instance that will be assigned to this provider option
398
+   *
399
+   * \since Version 1.16.
400
+   */
401
+  ORT_API2_STATUS(UpdateCUDAProviderOptionsWithValue, _Inout_ OrtCUDAProviderOptionsV2* cuda_options, _In_ const char* key, _In_ void* value);
402
+
403
+  /**
404
+   * Get CUDA EP provider option where its data type is pointer.
405
+   * If the data type of the provider option can be represented by string please use GetCUDAProviderOptionsAsString.
406
+   *
407
+   * \param cuda_options - OrtCUDAProviderOptionsV2 instance
408
+   * \param key - Name of the provider option
409
+   * \param ptr - A pointer to the instance that is kept by the provider option
410
+   *
411
+   * \since Version 1.16.
412
+   */
413
+  ORT_API2_STATUS(GetCUDAProviderOptionsByName, _In_ const OrtCUDAProviderOptionsV2* cuda_options, _In_ const char* key, _Outptr_ void** ptr);
414
+
415
+  /**
416
+   * Get a EP resource.
417
+   * E.g. a cuda stream or a cublas handle
418
+   *
419
+   * \param context - Kernel context
420
+   * \param resouce_version - Version of the resource
421
+   * \param resource_id - Type of resource
422
+   * \param resource - A pointer to returned resource
423
+   *
424
+   * \since Version 1.16.
425
+   */
426
+  ORT_API2_STATUS(KernelContext_GetResource, _In_ const OrtKernelContext* context, _In_ int resouce_version, _In_ int resource_id, _Outptr_ void** resource);
427
+
428
+  /** \brief Set user logging function
429
+   *
430
+   *  By default the logger created by the CreateEnv* functions is used to create the session logger as well.
431
+   *  This function allows a user to override this default session logger with a logger of their own choosing. This way
432
+   *  the user doesn't have to create a separate environment with a custom logger. This addresses the problem when
433
+   *  the user already created an env but now wants to use a different logger for a specific session (for debugging or
434
+   *  other reasons).
435
+   *
436
+   * \paramin options
437
+   * \paramin user_logging_function A pointer to a logging function.
438
+   * \paramin user_logging_param A pointer to arbitrary data passed as the ::OrtLoggingFunction `param` parameter to
439
+   *                         `user_logging_function`. This parameter is optional.
440
+   *
441
+   * \snippet{doc} snippets.dox OrtStatus Return Value
442
+   *
443
+   * \since Version 1.17.
444
+   */
445
+  ORT_API2_STATUS(SetUserLoggingFunction, _Inout_ OrtSessionOptions* options,
446
+                  _In_ OrtLoggingFunction user_logging_function, _In_opt_ void* user_logging_param);
447
+
448
+  /**
449
+   * Get number of input from OrtShapeInferContext
450
+   *
451
+   * \paramin context
452
+   * \paramout out The number of inputs
453
+   *
454
+   * \since Version 1.17.
455
+   */
456
+  ORT_API2_STATUS(ShapeInferContext_GetInputCount, _In_ const OrtShapeInferContext* context, _Out_ size_t* out);
457
+
458
+  /**
459
+   * Get type and shape info of an input
460
+   *
461
+   * \paramin context
462
+   * \paramin index The index of the input
463
+   * \paramout info Type shape info of the input
464
+   *
465
+   * \since Version 1.17.
466
+   */
467
+  ORT_API2_STATUS(ShapeInferContext_GetInputTypeShape, _In_ const OrtShapeInferContext* context, _In_ size_t index, _Outptr_ OrtTensorTypeAndShapeInfo** info);
468
+
469
+  /**
470
+   * Get attribute from OrtShapeInferContext. Note that OrtShapeInferContext is a per-node context, one could only read attribute from current node.
471
+   *
472
+   * \paramin context
473
+   * \paramin attr_name Name of the attribute
474
+   * \paramout attr Handle of the attribute fetched
475
+   *
476
+   * \since Version 1.17.
477
+   */
478
+  ORT_API2_STATUS(ShapeInferContext_GetAttribute, _In_ const OrtShapeInferContext* context, _In_ const char* attr_name, _Outptr_ const OrtOpAttr** attr);
479
+
480
+  /**
481
+   * Set type and shape info of an ouput
482
+   *
483
+   * \paramin context
484
+   * \paramin index The index of the ouput
485
+   * \paramout info Type shape info of the output
486
+   *
487
+   * \since Version 1.17.
488
+   */
489
+  ORT_API2_STATUS(ShapeInferContext_SetOutputTypeShape, _In_ const OrtShapeInferContext* context, _In_ size_t index, _In_ const OrtTensorTypeAndShapeInfo* info);
490
+
491
+  /**
492
+   * Set symbolic shape to type shape info
493
+   *
494
+   * \paramin info Type shape info
495
+   * \paramin dim_params Symbolic strings
496
+   * \paramin dim_params_length Number of strings
497
+   *
498
+   * \since Version 1.17.
499
+   */
500
+  ORT_API2_STATUS(SetSymbolicDimensions, _In_ OrtTensorTypeAndShapeInfo* info, _In_ const char* dim_params, _In_ size_t dim_params_length);
501
+
502
+  /**
503
+   * Read contents of an attribute to data
504
+   *
505
+   * \paramin op_attr
506
+   * \paramin type Attribute type
507
+   * \paramout data Memory address to save raw content of the attribute
508
+   * \paramin len Number of bytes allowed to store in data
509
+   * \paramout out Number of bytes required to save the data when the call failed, or the real number of bytes saved to data on success
510
+   *
511
+   * \since Version 1.17.
512
+   */
513
+  ORT_API2_STATUS(ReadOpAttr, _In_ const OrtOpAttr* op_attr, _In_ OrtOpAttrType type, _Inout_ void* data, _In_ size_t len, _Out_ size_t* out);
514
+
515
+  /** \brief Set whether to use deterministic compute.
516
+   *
517
+   * Default is false. If set to true, this will enable deterministic compute for GPU kernels where possible.
518
+   * Note that this most likely will have a performance cost.
519
+   *
520
+   * \paramin options
521
+   * \paramin value
522
+   *
523
+   * \since Version 1.17.
524
+   */
525
+  ORT_API2_STATUS(SetDeterministicCompute, _Inout_ OrtSessionOptions* options, bool value);
526
+
527
+  /**
528
+   * Run fn in parallel
529
+   *
530
+   * \paramin context
531
+   * \paramin fn Function accepting usr_data and an integer as iterator
532
+   * \paramin total The number of times fn is to be invoked
533
+   * \paramin num_batch Number of batches by which the "total" is to be divided in maximum. When zero, there is no limit
534
+   * \paramin usr_data User data to be passed back to fn
535
+   *
536
+   * \since Version 1.17.
537
+   */
538
+  ORT_API2_STATUS(KernelContext_ParallelFor, _In_ const OrtKernelContext* context, _In_ void (*fn)(void*, size_t), _In_ size_t total, _In_ size_t num_batch, _In_ void* usr_data);
539
+
540
+  /** \brief Append OpenVINO execution provider to the session options
541
+   *
542
+   * If OpenVINO is not available (due to a non OpenVINO enabled build, or if OpenVINO is not installed on the system), this function will fail.
543
+   *
544
+   * \paramin options
545
+   * \paramin provider_options_keys
546
+   * \paramin provider_options_values
547
+   * \paramin num_keys
548
+   *
549
+   * \snippet{doc} snippets.dox OrtStatus Return Value
550
+   */
551
+  ORT_API2_STATUS(SessionOptionsAppendExecutionProvider_OpenVINO_V2,
552
+                  _In_ OrtSessionOptions* options,
553
+                  _In_reads_(num_keys) const char* const* provider_options_keys,
554
+                  _In_reads_(num_keys) const char* const* provider_options_values,
555
+                  _In_ size_t num_keys);
556
 };
557
 
558
 /*
559
@@ -4240,7 +4596,10 @@
560
 struct OrtCustomOp {
561
   uint32_t version;  // Must be initialized to ORT_API_VERSION
562
 
563
-  // This callback creates the kernel, which is a user defined parameter that is passed to the Kernel* callbacks below.
564
+  // This callback creates the kernel, which is a user defined
565
+  // parameter that is passed to the Kernel* callbacks below. It is
566
+  // recommended to use CreateKernelV2 which allows for a safe error
567
+  // propagation by returning an OrtStatusPtr.
568
   void*(ORT_API_CALL* CreateKernel)(_In_ const struct OrtCustomOp* op, _In_ const OrtApi* api,
569
                                     _In_ const OrtKernelInfo* info);
570
 
571
@@ -4256,7 +4615,9 @@
572
   ONNXTensorElementDataType(ORT_API_CALL* GetOutputType)(_In_ const struct OrtCustomOp* op, _In_ size_t index);
573
   size_t(ORT_API_CALL* GetOutputTypeCount)(_In_ const struct OrtCustomOp* op);
574
 
575
-  // Op kernel callbacks
576
+  // Perform a computation step.  It is recommended to use
577
+  // KernelComputeV2 which allows for a safe error propagation by
578
+  // returning an OrtStatusPtr.
579
   void(ORT_API_CALL* KernelCompute)(_In_ void* op_kernel, _In_ OrtKernelContext* context);
580
   void(ORT_API_CALL* KernelDestroy)(_In_ void* op_kernel);
581
 
582
@@ -4288,6 +4649,20 @@
583
   // and false (zero) otherwise.
584
   // Applicable only for custom ops that have a variadic output.
585
   int(ORT_API_CALL* GetVariadicOutputHomogeneity)(_In_ const struct OrtCustomOp* op);
586
+
587
+  // Create the kernel state which is passed to each compute call.
588
+  OrtStatusPtr(ORT_API_CALL* CreateKernelV2)(_In_ const struct OrtCustomOp* op, _In_ const OrtApi* api,
589
+                                             _In_ const OrtKernelInfo* info,
590
+                                             _Out_ void** kernel);
591
+
592
+  // Perform the computation step.
593
+  OrtStatusPtr(ORT_API_CALL* KernelComputeV2)(_In_ void* op_kernel, _In_ OrtKernelContext* context);
594
+
595
+  OrtStatusPtr(ORT_API_CALL* InferOutputShapeFn)(_In_ const struct OrtCustomOp* op, _In_ OrtShapeInferContext*);
596
+
597
+  // Get start range
598
+  int(ORT_API_CALL* GetStartVersion)(_In_ const struct OrtCustomOp* op);
599
+  int(ORT_API_CALL* GetEndVersion)(_In_ const struct OrtCustomOp* op);
600
 };
601
 
602
 /*
603
@@ -4299,6 +4674,16 @@
604
 ORT_API_STATUS(OrtSessionOptionsAppendExecutionProvider_CUDA, _In_ OrtSessionOptions* options, int device_id);
605
 
606
 /*
607
+ * This is the old way to add the ROCm provider to the session, please use
608
+ * SessionOptionsAppendExecutionProvider_ROCM above to access the latest functionality
609
+ * This function always exists, but will only succeed if Onnxruntime was built with
610
+ * HIP support and the ROCm provider shared library exists
611
+ *
612
+ * \param device_id HIP device id, starts from zero.
613
+ */
614
+ORT_API_STATUS(OrtSessionOptionsAppendExecutionProvider_ROCM, _In_ OrtSessionOptions* options, int device_id);
615
+
616
+/*
617
  * This is the old way to add the MIGraphX provider to the session, please use
618
  * SessionOptionsAppendExecutionProvider_MIGraphX above to access the latest functionality
619
  * This function always exists, but will only succeed if Onnxruntime was built with
620
@@ -4318,6 +4703,14 @@
621
  */
622
 ORT_API_STATUS(OrtSessionOptionsAppendExecutionProvider_Dnnl, _In_ OrtSessionOptions* options, int use_arena);
623
 
624
+/*
625
+ * This is the old way to add the TensorRT provider to the session, please use SessionOptionsAppendExecutionProvider_TensorRT_V2 above to access the latest functionality
626
+ * This function always exists, but will only succeed if Onnxruntime was built with TensorRT support and the TensorRT provider shared library exists
627
+ *
628
+ * \param device_id CUDA device id, starts from zero.
629
+ */
630
+ORT_API_STATUS(OrtSessionOptionsAppendExecutionProvider_Tensorrt, _In_ OrtSessionOptions* options, int device_id);
631
+
632
 #ifdef __cplusplus
633
 }
634
 #endif
635
onnxruntime-linux-x64-gpu-1.15.1.tgz/include/onnxruntime_cxx_api.h -> onnxruntime-linux-x64-gpu-1.17.1.tgz/include/onnxruntime_cxx_api.h Changed
887
 
1
@@ -24,6 +24,8 @@
2
 
3
 #pragma once
4
 #include "onnxruntime_c_api.h"
5
+#include "onnxruntime_float16.h"
6
+
7
 #include <cstddef>
8
 #include <cstdio>
9
 #include <array>
10
@@ -142,74 +144,358 @@
11
 std::vector<std::string> GetAvailableProviders();
12
 
13
 /** \brief IEEE 754 half-precision floating point data type
14
- * \details It is necessary for type dispatching to make use of C++ API
15
- * The type is implicitly convertible to/from uint16_t.
16
+ *
17
+ * \details This struct is used for converting float to float16 and back
18
+ * so the user could feed inputs and fetch outputs using these type.
19
+ *
20
  * The size of the structure should align with uint16_t and one can freely cast
21
  * uint16_t buffers to/from Ort::Float16_t to feed and retrieve data.
22
  *
23
- * Generally, you can feed any of your types as float16/blfoat16 data to create a tensor
24
- * on top of it, providing it can form a continuous buffer with 16-bit elements with no padding.
25
- * And you can also feed a array of uint16_t elements directly. For example,
26
- *
27
  * \code{.unparsed}
28
- * uint16_t values = { 15360, 16384, 16896, 17408, 17664};
29
- * constexpr size_t values_length = sizeof(values) / sizeof(values0);
30
- * std::vector<int64_t> dims = {values_length};  // one dimensional example
31
- * Ort::MemoryInfo info("Cpu", OrtDeviceAllocator, 0, OrtMemTypeDefault);
32
- * // Note we are passing bytes count in this api, not number of elements -> sizeof(values)
33
- * auto float16_tensor = Ort::Value::CreateTensor(info, values, sizeof(values),
34
- *                                                dims.data(), dims.size(), ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT16);
35
- * \endcode
36
+ * // This example demonstrates converion from float to float16
37
+ * constexpr float values = {1.f, 2.f, 3.f, 4.f, 5.f};
38
+ * std::vector<Ort::Float16_t> fp16_values;
39
+ * fp16_values.reserve(std::size(values));
40
+ * std::transform(std::begin(values), std::end(values), std::back_inserter(fp16_values),
41
+ *     (float value) { return Ort::Float16_t(value); });
42
  *
43
- * Here is another example, a little bit more elaborate. Let's assume that you use your own float16 type and you want to use
44
- * a templated version of the API above so the type is automatically set based on your type. You will need to supply an extra
45
- * template specialization.
46
- *
47
- * \code{.unparsed}
48
- * namespace yours { struct half {}; } // assume this is your type, define this:
49
- * namespace Ort {
50
- * template<>
51
- * struct TypeToTensorType<yours::half> { static constexpr ONNXTensorElementDataType type = ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT16; };
52
- * } //namespace Ort
53
- *
54
- * std::vector<yours::half> values;
55
- * std::vector<int64_t> dims = {values.size()}; // one dimensional example
56
- * Ort::MemoryInfo info("Cpu", OrtDeviceAllocator, 0, OrtMemTypeDefault);
57
- * // Here we are passing element count -> values.size()
58
- * auto float16_tensor = Ort::Value::CreateTensor<yours::half>(info, values.data(), values.size(), dims.data(), dims.size());
59
- *
60
- *  \endcode
61
- */
62
-struct Float16_t {
63
-  uint16_t value;
64
-  constexpr Float16_t() noexcept : value(0) {}
65
-  constexpr Float16_t(uint16_t v) noexcept : value(v) {}
66
-  constexpr operator uint16_t() const noexcept { return value; }
67
-  constexpr bool operator==(const Float16_t& rhs) const noexcept { return value == rhs.value; };
68
-  constexpr bool operator!=(const Float16_t& rhs) const noexcept { return value != rhs.value; };
69
+ * \endcode
70
+ */
71
+struct Float16_t : onnxruntime_float16::Float16Impl<Float16_t> {
72
+ private:
73
+  /// <summary>
74
+  /// Constructor from a 16-bit representation of a float16 value
75
+  /// No conversion is done here.
76
+  /// </summary>
77
+  /// <param name="v">16-bit representation</param>
78
+  constexpr explicit Float16_t(uint16_t v) noexcept { val = v; }
79
+
80
+ public:
81
+  using Base = onnxruntime_float16::Float16Impl<Float16_t>;
82
+
83
+  /// <summary>
84
+  /// Default constructor
85
+  /// </summary>
86
+  Float16_t() = default;
87
+
88
+  /// <summary>
89
+  /// Explicit conversion to uint16_t representation of float16.
90
+  /// </summary>
91
+  /// <param name="v">uint16_t bit representation of float16</param>
92
+  /// <returns>new instance of Float16_t</returns>
93
+  constexpr static Float16_t FromBits(uint16_t v) noexcept { return Float16_t(v); }
94
+
95
+  /// <summary>
96
+  /// __ctor from float. Float is converted into float16 16-bit representation.
97
+  /// </summary>
98
+  /// <param name="v">float value</param>
99
+  explicit Float16_t(float v) noexcept { val = Base::ToUint16Impl(v); }
100
+
101
+  /// <summary>
102
+  /// Converts float16 to float
103
+  /// </summary>
104
+  /// <returns>float representation of float16 value</returns>
105
+  float ToFloat() const noexcept { return Base::ToFloatImpl(); }
106
+
107
+  /// <summary>
108
+  /// Checks if the value is negative
109
+  /// </summary>
110
+  /// <returns>true if negative</returns>
111
+  using Base::IsNegative;
112
+
113
+  /// <summary>
114
+  /// Tests if the value is NaN
115
+  /// </summary>
116
+  /// <returns>true if NaN</returns>
117
+  using Base::IsNaN;
118
+
119
+  /// <summary>
120
+  /// Tests if the value is finite
121
+  /// </summary>
122
+  /// <returns>true if finite</returns>
123
+  using Base::IsFinite;
124
+
125
+  /// <summary>
126
+  /// Tests if the value represents positive infinity.
127
+  /// </summary>
128
+  /// <returns>true if positive infinity</returns>
129
+  using Base::IsPositiveInfinity;
130
+
131
+  /// <summary>
132
+  /// Tests if the value represents negative infinity
133
+  /// </summary>
134
+  /// <returns>true if negative infinity</returns>
135
+  using Base::IsNegativeInfinity;
136
+
137
+  /// <summary>
138
+  /// Tests if the value is either positive or negative infinity.
139
+  /// </summary>
140
+  /// <returns>True if absolute value is infinity</returns>
141
+  using Base::IsInfinity;
142
+
143
+  /// <summary>
144
+  /// Tests if the value is NaN or zero. Useful for comparisons.
145
+  /// </summary>
146
+  /// <returns>True if NaN or zero.</returns>
147
+  using Base::IsNaNOrZero;
148
+
149
+  /// <summary>
150
+  /// Tests if the value is normal (not zero, subnormal, infinite, or NaN).
151
+  /// </summary>
152
+  /// <returns>True if so</returns>
153
+  using Base::IsNormal;
154
+
155
+  /// <summary>
156
+  /// Tests if the value is subnormal (denormal).
157
+  /// </summary>
158
+  /// <returns>True if so</returns>
159
+  using Base::IsSubnormal;
160
+
161
+  /// <summary>
162
+  /// Creates an instance that represents absolute value.
163
+  /// </summary>
164
+  /// <returns>Absolute value</returns>
165
+  using Base::Abs;
166
+
167
+  /// <summary>
168
+  /// Creates a new instance with the sign flipped.
169
+  /// </summary>
170
+  /// <returns>Flipped sign instance</returns>
171
+  using Base::Negate;
172
+
173
+  /// <summary>
174
+  /// IEEE defines that positive and negative zero are equal, this gives us a quick equality check
175
+  /// for two values by or'ing the private bits together and stripping the sign. They are both zero,
176
+  /// and therefore equivalent, if the resulting value is still zero.
177
+  /// </summary>
178
+  /// <param name="lhs">first value</param>
179
+  /// <param name="rhs">second value</param>
180
+  /// <returns>True if both arguments represent zero</returns>
181
+  using Base::AreZero;
182
+
183
+  /// <summary>
184
+  /// User defined conversion operator. Converts Float16_t to float.
185
+  /// </summary>
186
+  explicit operator float() const noexcept { return ToFloat(); }
187
+
188
+  using Base::operator==;
189
+  using Base::operator!=;
190
+  using Base::operator<;
191
 };
192
 
193
 static_assert(sizeof(Float16_t) == sizeof(uint16_t), "Sizes must match");
194
 
195
 /** \brief bfloat16 (Brain Floating Point) data type
196
- * \details It is necessary for type dispatching to make use of C++ API
197
- * The type is implicitly convertible to/from uint16_t.
198
+ *
199
+ * \details This struct is used for converting float to bfloat16 and back
200
+ * so the user could feed inputs and fetch outputs using these type.
201
+ *
202
  * The size of the structure should align with uint16_t and one can freely cast
203
  * uint16_t buffers to/from Ort::BFloat16_t to feed and retrieve data.
204
  *
205
- * See also code examples for Float16_t above.
206
+ * \code{.unparsed}
207
+ * // This example demonstrates converion from float to float16
208
+ * constexpr float values = {1.f, 2.f, 3.f, 4.f, 5.f};
209
+ * std::vector<Ort::BFloat16_t> bfp16_values;
210
+ * bfp16_values.reserve(std::size(values));
211
+ * std::transform(std::begin(values), std::end(values), std::back_inserter(bfp16_values),
212
+ *     (float value) { return Ort::BFloat16_t(value); });
213
+ *
214
+ * \endcode
215
  */
216
-struct BFloat16_t {
217
-  uint16_t value;
218
-  constexpr BFloat16_t() noexcept : value(0) {}
219
-  constexpr BFloat16_t(uint16_t v) noexcept : value(v) {}
220
-  constexpr operator uint16_t() const noexcept { return value; }
221
-  constexpr bool operator==(const BFloat16_t& rhs) const noexcept { return value == rhs.value; };
222
-  constexpr bool operator!=(const BFloat16_t& rhs) const noexcept { return value != rhs.value; };
223
+struct BFloat16_t : onnxruntime_float16::BFloat16Impl<BFloat16_t> {
224
+ private:
225
+  /// <summary>
226
+  /// Constructor from a uint16_t representation of bfloat16
227
+  /// used in FromBits() to escape overload resolution issue with
228
+  /// constructor from float.
229
+  /// No conversion is done.
230
+  /// </summary>
231
+  /// <param name="v">16-bit bfloat16 value</param>
232
+  constexpr explicit BFloat16_t(uint16_t v) noexcept { val = v; }
233
+
234
+ public:
235
+  using Base = onnxruntime_float16::BFloat16Impl<BFloat16_t>;
236
+
237
+  BFloat16_t() = default;
238
+
239
+  /// <summary>
240
+  /// Explicit conversion to uint16_t representation of bfloat16.
241
+  /// </summary>
242
+  /// <param name="v">uint16_t bit representation of bfloat16</param>
243
+  /// <returns>new instance of BFloat16_t</returns>
244
+  static constexpr BFloat16_t FromBits(uint16_t v) noexcept { return BFloat16_t(v); }
245
+
246
+  /// <summary>
247
+  /// __ctor from float. Float is converted into bfloat16 16-bit representation.
248
+  /// </summary>
249
+  /// <param name="v">float value</param>
250
+  explicit BFloat16_t(float v) noexcept { val = Base::ToUint16Impl(v); }
251
+
252
+  /// <summary>
253
+  /// Converts bfloat16 to float
254
+  /// </summary>
255
+  /// <returns>float representation of bfloat16 value</returns>
256
+  float ToFloat() const noexcept { return Base::ToFloatImpl(); }
257
+
258
+  /// <summary>
259
+  /// Checks if the value is negative
260
+  /// </summary>
261
+  /// <returns>true if negative</returns>
262
+  using Base::IsNegative;
263
+
264
+  /// <summary>
265
+  /// Tests if the value is NaN
266
+  /// </summary>
267
+  /// <returns>true if NaN</returns>
268
+  using Base::IsNaN;
269
+
270
+  /// <summary>
271
+  /// Tests if the value is finite
272
+  /// </summary>
273
+  /// <returns>true if finite</returns>
274
+  using Base::IsFinite;
275
+
276
+  /// <summary>
277
+  /// Tests if the value represents positive infinity.
278
+  /// </summary>
279
+  /// <returns>true if positive infinity</returns>
280
+  using Base::IsPositiveInfinity;
281
+
282
+  /// <summary>
283
+  /// Tests if the value represents negative infinity
284
+  /// </summary>
285
+  /// <returns>true if negative infinity</returns>
286
+  using Base::IsNegativeInfinity;
287
+
288
+  /// <summary>
289
+  /// Tests if the value is either positive or negative infinity.
290
+  /// </summary>
291
+  /// <returns>True if absolute value is infinity</returns>
292
+  using Base::IsInfinity;
293
+
294
+  /// <summary>
295
+  /// Tests if the value is NaN or zero. Useful for comparisons.
296
+  /// </summary>
297
+  /// <returns>True if NaN or zero.</returns>
298
+  using Base::IsNaNOrZero;
299
+
300
+  /// <summary>
301
+  /// Tests if the value is normal (not zero, subnormal, infinite, or NaN).
302
+  /// </summary>
303
+  /// <returns>True if so</returns>
304
+  using Base::IsNormal;
305
+
306
+  /// <summary>
307
+  /// Tests if the value is subnormal (denormal).
308
+  /// </summary>
309
+  /// <returns>True if so</returns>
310
+  using Base::IsSubnormal;
311
+
312
+  /// <summary>
313
+  /// Creates an instance that represents absolute value.
314
+  /// </summary>
315
+  /// <returns>Absolute value</returns>
316
+  using Base::Abs;
317
+
318
+  /// <summary>
319
+  /// Creates a new instance with the sign flipped.
320
+  /// </summary>
321
+  /// <returns>Flipped sign instance</returns>
322
+  using Base::Negate;
323
+
324
+  /// <summary>
325
+  /// IEEE defines that positive and negative zero are equal, this gives us a quick equality check
326
+  /// for two values by or'ing the private bits together and stripping the sign. They are both zero,
327
+  /// and therefore equivalent, if the resulting value is still zero.
328
+  /// </summary>
329
+  /// <param name="lhs">first value</param>
330
+  /// <param name="rhs">second value</param>
331
+  /// <returns>True if both arguments represent zero</returns>
332
+  using Base::AreZero;
333
+
334
+  /// <summary>
335
+  /// User defined conversion operator. Converts BFloat16_t to float.
336
+  /// </summary>
337
+  explicit operator float() const noexcept { return ToFloat(); }
338
+
339
+  // We do not have an inherited impl for the below operators
340
+  // as the internal class implements them a little differently
341
+  bool operator==(const BFloat16_t& rhs) const noexcept;
342
+  bool operator!=(const BFloat16_t& rhs) const noexcept { return !(*this == rhs); }
343
+  bool operator<(const BFloat16_t& rhs) const noexcept;
344
 };
345
 
346
 static_assert(sizeof(BFloat16_t) == sizeof(uint16_t), "Sizes must match");
347
 
348
+/** \brief float8e4m3fn (Float8 Floating Point) data type
349
+ * \details It is necessary for type dispatching to make use of C++ API
350
+ * The type is implicitly convertible to/from uint8_t.
351
+ * See https://onnx.ai/onnx/technical/float8.html for further details.
352
+ */
353
+struct Float8E4M3FN_t {
354
+  uint8_t value;
355
+  constexpr Float8E4M3FN_t() noexcept : value(0) {}
356
+  constexpr Float8E4M3FN_t(uint8_t v) noexcept : value(v) {}
357
+  constexpr operator uint8_t() const noexcept { return value; }
358
+  // nan values are treated like any other value for operator ==, !=
359
+  constexpr bool operator==(const Float8E4M3FN_t& rhs) const noexcept { return value == rhs.value; };
360
+  constexpr bool operator!=(const Float8E4M3FN_t& rhs) const noexcept { return value != rhs.value; };
361
+};
362
+
363
+static_assert(sizeof(Float8E4M3FN_t) == sizeof(uint8_t), "Sizes must match");
364
+
365
+/** \brief float8e4m3fnuz (Float8 Floating Point) data type
366
+ * \details It is necessary for type dispatching to make use of C++ API
367
+ * The type is implicitly convertible to/from uint8_t.
368
+ * See https://onnx.ai/onnx/technical/float8.html for further details.
369
+ */
370
+struct Float8E4M3FNUZ_t {
371
+  uint8_t value;
372
+  constexpr Float8E4M3FNUZ_t() noexcept : value(0) {}
373
+  constexpr Float8E4M3FNUZ_t(uint8_t v) noexcept : value(v) {}
374
+  constexpr operator uint8_t() const noexcept { return value; }
375
+  // nan values are treated like any other value for operator ==, !=
376
+  constexpr bool operator==(const Float8E4M3FNUZ_t& rhs) const noexcept { return value == rhs.value; };
377
+  constexpr bool operator!=(const Float8E4M3FNUZ_t& rhs) const noexcept { return value != rhs.value; };
378
+};
379
+
380
+static_assert(sizeof(Float8E4M3FNUZ_t) == sizeof(uint8_t), "Sizes must match");
381
+
382
+/** \brief float8e5m2 (Float8 Floating Point) data type
383
+ * \details It is necessary for type dispatching to make use of C++ API
384
+ * The type is implicitly convertible to/from uint8_t.
385
+ * See https://onnx.ai/onnx/technical/float8.html for further details.
386
+ */
387
+struct Float8E5M2_t {
388
+  uint8_t value;
389
+  constexpr Float8E5M2_t() noexcept : value(0) {}
390
+  constexpr Float8E5M2_t(uint8_t v) noexcept : value(v) {}
391
+  constexpr operator uint8_t() const noexcept { return value; }
392
+  // nan values are treated like any other value for operator ==, !=
393
+  constexpr bool operator==(const Float8E5M2_t& rhs) const noexcept { return value == rhs.value; };
394
+  constexpr bool operator!=(const Float8E5M2_t& rhs) const noexcept { return value != rhs.value; };
395
+};
396
+
397
+static_assert(sizeof(Float8E5M2_t) == sizeof(uint8_t), "Sizes must match");
398
+
399
+/** \brief float8e5m2fnuz (Float8 Floating Point) data type
400
+ * \details It is necessary for type dispatching to make use of C++ API
401
+ * The type is implicitly convertible to/from uint8_t.
402
+ * See https://onnx.ai/onnx/technical/float8.html for further details.
403
+ */
404
+struct Float8E5M2FNUZ_t {
405
+  uint8_t value;
406
+  constexpr Float8E5M2FNUZ_t() noexcept : value(0) {}
407
+  constexpr Float8E5M2FNUZ_t(uint8_t v) noexcept : value(v) {}
408
+  constexpr operator uint8_t() const noexcept { return value; }
409
+  // nan values are treated like any other value for operator ==, !=
410
+  constexpr bool operator==(const Float8E5M2FNUZ_t& rhs) const noexcept { return value == rhs.value; };
411
+  constexpr bool operator!=(const Float8E5M2FNUZ_t& rhs) const noexcept { return value != rhs.value; };
412
+};
413
+
414
+static_assert(sizeof(Float8E5M2FNUZ_t) == sizeof(uint8_t), "Sizes must match");
415
+
416
 namespace detail {
417
 // This is used internally by the C++ API. This macro is to make it easy to generate overloaded methods for all of the various OrtRelease* functions for every Ort* type
418
 // This can't be done in the C API since C doesn't have function overloading.
419
@@ -433,6 +719,8 @@
420
   Env& UpdateEnvWithCustomLogLevel(OrtLoggingLevel log_severity_level);  ///< Wraps OrtApi::UpdateEnvWithCustomLogLevel
421
 
422
   Env& CreateAndRegisterAllocator(const OrtMemoryInfo* mem_info, const OrtArenaCfg* arena_cfg);  ///< Wraps OrtApi::CreateAndRegisterAllocator
423
+
424
+  Env& CreateAndRegisterAllocatorV2(const std::string& provider_type, const OrtMemoryInfo* mem_info, const std::unordered_map<std::string, std::string>& options, const OrtArenaCfg* arena_cfg);  ///< Wraps OrtApi::CreateAndRegisterAllocatorV2
425
 };
426
 
427
 /** \brief Custom Op Domain
428
@@ -557,6 +845,7 @@
429
   SessionOptionsImpl& SetIntraOpNumThreads(int intra_op_num_threads);                              ///< Wraps OrtApi::SetIntraOpNumThreads
430
   SessionOptionsImpl& SetInterOpNumThreads(int inter_op_num_threads);                              ///< Wraps OrtApi::SetInterOpNumThreads
431
   SessionOptionsImpl& SetGraphOptimizationLevel(GraphOptimizationLevel graph_optimization_level);  ///< Wraps OrtApi::SetSessionGraphOptimizationLevel
432
+  SessionOptionsImpl& SetDeterministicCompute(bool value);                                         ///< Wraps OrtApi::SetDeterministicCompute
433
 
434
   SessionOptionsImpl& EnableCpuMemArena();   ///< Wraps OrtApi::EnableCpuMemArena
435
   SessionOptionsImpl& DisableCpuMemArena();  ///< Wraps OrtApi::DisableCpuMemArena
436
@@ -585,10 +874,12 @@
437
   SessionOptionsImpl& AddInitializer(const char* name, const OrtValue* ort_val);                                             ///< Wraps OrtApi::AddInitializer
438
   SessionOptionsImpl& AddExternalInitializers(const std::vector<std::string>& names, const std::vector<Value>& ort_values);  ///< Wraps OrtApi::AddExternalInitializers
439
 
440
-  SessionOptionsImpl& AppendExecutionProvider_CUDA(const OrtCUDAProviderOptions& provider_options);               ///< Wraps OrtApi::SessionOptionsAppendExecutionProvider_CUDA
441
-  SessionOptionsImpl& AppendExecutionProvider_CUDA_V2(const OrtCUDAProviderOptionsV2& provider_options);          ///< Wraps OrtApi::SessionOptionsAppendExecutionProvider_CUDA_V2
442
-  SessionOptionsImpl& AppendExecutionProvider_ROCM(const OrtROCMProviderOptions& provider_options);               ///< Wraps OrtApi::SessionOptionsAppendExecutionProvider_ROCM
443
-  SessionOptionsImpl& AppendExecutionProvider_OpenVINO(const OrtOpenVINOProviderOptions& provider_options);       ///< Wraps OrtApi::SessionOptionsAppendExecutionProvider_OpenVINO
444
+  SessionOptionsImpl& AppendExecutionProvider_CUDA(const OrtCUDAProviderOptions& provider_options);          ///< Wraps OrtApi::SessionOptionsAppendExecutionProvider_CUDA
445
+  SessionOptionsImpl& AppendExecutionProvider_CUDA_V2(const OrtCUDAProviderOptionsV2& provider_options);     ///< Wraps OrtApi::SessionOptionsAppendExecutionProvider_CUDA_V2
446
+  SessionOptionsImpl& AppendExecutionProvider_ROCM(const OrtROCMProviderOptions& provider_options);          ///< Wraps OrtApi::SessionOptionsAppendExecutionProvider_ROCM
447
+  SessionOptionsImpl& AppendExecutionProvider_OpenVINO(const OrtOpenVINOProviderOptions& provider_options);  ///< Wraps OrtApi::SessionOptionsAppendExecutionProvider_OpenVINO
448
+  ///< Wraps OrtApi::SessionOptionsAppendExecutionProvider_OpenVINO_V2
449
+  SessionOptionsImpl& AppendExecutionProvider_OpenVINO_V2(const std::unordered_map<std::string, std::string>& provider_options = {});
450
   SessionOptionsImpl& AppendExecutionProvider_TensorRT(const OrtTensorRTProviderOptions& provider_options);       ///< Wraps OrtApi::SessionOptionsAppendExecutionProvider_TensorRT
451
   SessionOptionsImpl& AppendExecutionProvider_TensorRT_V2(const OrtTensorRTProviderOptionsV2& provider_options);  ///< Wraps OrtApi::SessionOptionsAppendExecutionProvider_TensorRT
452
   SessionOptionsImpl& AppendExecutionProvider_MIGraphX(const OrtMIGraphXProviderOptions& provider_options);       ///< Wraps OrtApi::SessionOptionsAppendExecutionProvider_MIGraphX
453
@@ -779,6 +1070,28 @@
454
 
455
   void Run(const RunOptions& run_options, const IoBinding&);  ///< Wraps OrtApi::RunWithBinding
456
 
457
+  /** \brief Run the model asynchronously in a thread owned by intra op thread pool
458
+   *
459
+   * Wraps OrtApi::RunAsync
460
+   *
461
+   * \paramin run_options
462
+   * \paramin input_names Array of null terminated UTF8 encoded strings of the input names
463
+   * \paramin input_values Array of Value objects of length input_count
464
+   * \paramin input_count Number of elements in the input_names and inputs arrays
465
+   * \paramin output_names Array of null terminated UTF8 encoded strings of the output names
466
+   * \paramout output_values Array of provided Values to be filled with outputs.
467
+   *             On calling RunAsync, output_valuesi could either be initialized by a null pointer or a preallocated OrtValue*.
468
+   *             Later, on invoking the callback, each output_valuesi of null will be filled with an OrtValue* allocated by onnxruntime.
469
+   *             Then, an OrtValue** pointer will be casted from output_values, and pass to the callback.
470
+   *             NOTE: it is customer's duty to finally release output_values and each of its member,
471
+   *             regardless of whether the member (Ort::Value) is allocated by onnxruntime or preallocated by the customer.
472
+   * \paramin output_count Number of elements in the output_names and outputs array
473
+   * \paramin callback Callback function on model run completion
474
+   * \paramin user_data User data that pass back to the callback
475
+   */
476
+  void RunAsync(const RunOptions& run_options, const char* const* input_names, const Value* input_values, size_t input_count,
477
+                const char* const* output_names, Value* output_values, size_t output_count, RunAsyncCallbackFn callback, void* user_data);
478
+
479
   /** \brief End profiling and return a copy of the profiling file name.
480
    *
481
    * \param allocator to allocate memory for the copy of the string returned
482
@@ -1317,6 +1630,7 @@
483
   static Value CreateTensor(const OrtMemoryInfo* info, T* p_data, size_t p_data_element_count, const int64_t* shape, size_t shape_len);
484
 
485
   /** \brief Creates a tensor with a user supplied buffer. Wraps OrtApi::CreateTensorWithDataAsOrtValue.
486
+   *
487
    * \param info Memory description of where the p_data buffer resides (CPU vs GPU etc).
488
    * \param p_data Pointer to the data buffer.
489
    * \param p_data_byte_count The number of bytes in the data buffer.
490
@@ -1327,7 +1641,12 @@
491
   static Value CreateTensor(const OrtMemoryInfo* info, void* p_data, size_t p_data_byte_count, const int64_t* shape, size_t shape_len,
492
                             ONNXTensorElementDataType type);
493
 
494
-  /** \brief Creates a tensor using a supplied OrtAllocator. Wraps OrtApi::CreateTensorAsOrtValue.
495
+  /** \brief Creates an OrtValue with a tensor using a supplied OrtAllocator. Wraps OrtApi::CreateTensorAsOrtValue.
496
+   *         This overload will allocate the buffer for the tensor  according to the supplied shape and data type.
497
+   *         The allocated buffer will be owned by the returned OrtValue and will be freed when the OrtValue is released.
498
+   *         The input data would need to be copied into the allocated buffer.
499
+   *         This API is not suitable for strings.
500
+   *
501
    * \tparam T The numeric datatype. This API is not suitable for strings.
502
    * \param allocator The allocator to use.
503
    * \param shape Pointer to the tensor shape dimensions.
504
@@ -1336,7 +1655,12 @@
505
   template <typename T>
506
   static Value CreateTensor(OrtAllocator* allocator, const int64_t* shape, size_t shape_len);
507
 
508
-  /** \brief Creates a tensor using a supplied OrtAllocator. Wraps OrtApi::CreateTensorAsOrtValue.
509
+  /** \brief Creates an OrtValue with a tensor using the supplied OrtAllocator.
510
+   *   Wraps OrtApi::CreateTensorAsOrtValue.
511
+   *   The allocated buffer will be owned by the returned OrtValue and will be freed when the OrtValue is released.
512
+   *   The input data would need to be copied into the allocated buffer.
513
+   *   This API is not suitable for strings.
514
+   *
515
    * \param allocator The allocator to use.
516
    * \param shape Pointer to the tensor shape dimensions.
517
    * \param shape_len The number of tensor shape dimensions.
518
@@ -1344,11 +1668,35 @@
519
    */
520
   static Value CreateTensor(OrtAllocator* allocator, const int64_t* shape, size_t shape_len, ONNXTensorElementDataType type);
521
 
522
-  static Value CreateMap(Value& keys, Value& values);       ///< Wraps OrtApi::CreateValue
523
-  static Value CreateSequence(std::vector<Value>& values);  ///< Wraps OrtApi::CreateValue
524
+  /** \brief Creates an OrtValue with a Map Onnx type representation.
525
+   *  The API would ref-count the supplied OrtValues and they will be released
526
+   *  when the returned OrtValue is released. The caller may release keys and values after the call
527
+   *  returns.
528
+   *
529
+   * \param keys an OrtValue containing a tensor with primitive data type keys.
530
+   * \param values an OrtValue that may contain a tensor. Ort currently supports only primitive data type values.
531
+   */
532
+  static Value CreateMap(const Value& keys, const Value& values);  ///< Wraps OrtApi::CreateValue
533
+
534
+  /** \brief Creates an OrtValue with a Sequence Onnx type representation.
535
+   *  The API would ref-count the supplied OrtValues and they will be released
536
+   *  when the returned OrtValue is released. The caller may release the values after the call
537
+   *  returns.
538
+   *
539
+   * \param values a vector of OrtValues that must have the same Onnx value type.
540
+   */
541
+  static Value CreateSequence(const std::vector<Value>& values);  ///< Wraps OrtApi::CreateValue
542
 
543
+  /** \brief Creates an OrtValue wrapping an Opaque type.
544
+   *  This is used for experimental support of non-tensor types.
545
+   *
546
+   * \tparam T - the type of the value.
547
+   * \param domain - zero terminated utf-8 string. Domain of the type.
548
+   * \param type_name - zero terminated utf-8 string. Name of the type.
549
+   * \param value - the value to be wrapped.
550
+   */
551
   template <typename T>
552
-  static Value CreateOpaque(const char* domain, const char* type_name, const T&);  ///< Wraps OrtApi::CreateOpaqueValue
553
+  static Value CreateOpaque(const char* domain, const char* type_name, const T& value);  ///< Wraps OrtApi::CreateOpaqueValue
554
 
555
 #if !defined(DISABLE_SPARSE_TENSORS)
556
   /// <summary>
557
@@ -1710,6 +2058,8 @@
558
   void* GetGPUComputeStream() const;
559
   Logger GetLogger() const;
560
   OrtAllocator* GetAllocator(const OrtMemoryInfo& memory_info) const;
561
+  OrtKernelContext* GetOrtKernelContext() const { return ctx_; }
562
+  void ParallelFor(void (*fn)(void*, size_t), size_t total, size_t num_batch, void* usr_data) const;
563
 
564
  private:
565
   OrtKernelContext* ctx_;
566
@@ -1811,195 +2161,83 @@
567
 };
568
 
569
 /// <summary>
570
-/// This entire structure is deprecated, but we not marking
571
-/// it as a whole yet since we want to preserve for the next release.
572
+/// Provide access to per-node attributes and input shapes, so one could compute and set output shapes.
573
 /// </summary>
574
-struct CustomOpApi {
575
-  CustomOpApi(const OrtApi& api) : api_(api) {}
576
-
577
-  /** \deprecated use Ort::Value::GetTensorTypeAndShape()
578
-   * deprecated
579
-   * This interface produces a pointer that must be released. Not exception safe.
580
-   */
581
-  deprecated("use Ort::Value::GetTensorTypeAndShape()") OrtTensorTypeAndShapeInfo* GetTensorTypeAndShape(_In_ const OrtValue* value);
582
-
583
-  /** \deprecated use Ort::TensorTypeAndShapeInfo::GetElementCount()
584
-   * deprecated
585
-   * This interface is redundant.
586
-   */
587
-  deprecated("use Ort::TensorTypeAndShapeInfo::GetElementCount()") size_t GetTensorShapeElementCount(_In_ const OrtTensorTypeAndShapeInfo* info);
588
-
589
-  /** \deprecated use Ort::TensorTypeAndShapeInfo::GetElementType()
590
-   * deprecated
591
-   * This interface is redundant.
592
-   */
593
-  deprecated("use Ort::TensorTypeAndShapeInfo::GetElementType()") ONNXTensorElementDataType GetTensorElementType(const OrtTensorTypeAndShapeInfo* info);
594
-
595
-  /** \deprecated use Ort::TensorTypeAndShapeInfo::GetDimensionsCount()
596
-   * deprecated
597
-   * This interface is redundant.
598
-   */
599
-  deprecated("use Ort::TensorTypeAndShapeInfo::GetDimensionsCount()") size_t GetDimensionsCount(_In_ const OrtTensorTypeAndShapeInfo* info);
600
+struct ShapeInferContext {
601
+  struct SymbolicInteger {
602
+    SymbolicInteger(int64_t i) : i_(i), is_int_(true){};
603
+    SymbolicInteger(const char* s) : s_(s), is_int_(false){};
604
+    SymbolicInteger(const SymbolicInteger&) = default;
605
+    SymbolicInteger(SymbolicInteger&&) = default;
606
 
607
-  /** \deprecated use Ort::TensorTypeAndShapeInfo::GetShape()
608
-   * deprecated
609
-   * This interface is redundant.
610
-   */
611
-  deprecated("use Ort::TensorTypeAndShapeInfo::GetShape()") void GetDimensions(_In_ const OrtTensorTypeAndShapeInfo* info, _Out_ int64_t* dim_values, size_t dim_values_length);
612
+    SymbolicInteger& operator=(const SymbolicInteger&) = default;
613
+    SymbolicInteger& operator=(SymbolicInteger&&) = default;
614
 
615
-  /** \deprecated
616
-   * deprecated
617
-   * This interface sets dimensions to TensorTypeAndShapeInfo, but has no effect on the OrtValue.
618
-   */
619
-  deprecated("Do not use") void SetDimensions(OrtTensorTypeAndShapeInfo* info, _In_ const int64_t* dim_values, size_t dim_count);
620
+    bool operator==(const SymbolicInteger& dim) const {
621
+      if (is_int_ == dim.is_int_) {
622
+        if (is_int_) {
623
+          return i_ == dim.i_;
624
+        } else {
625
+          return std::string{s_} == std::string{dim.s_};
626
+        }
627
+      }
628
+      return false;
629
+    }
630
 
631
-  /** \deprecated use Ort::Value::GetTensorMutableData()
632
-   * deprecated
633
-   * This interface is redundant.
634
-   */
635
-  template <typename T>
636
-  deprecated("use Ort::Value::GetTensorMutableData()") T* GetTensorMutableData(_Inout_ OrtValue* value);
637
+    bool IsInt() const { return is_int_; }
638
+    int64_t AsInt() const { return i_; }
639
+    const char* AsSym() const { return s_; }
640
 
641
-  /** \deprecated use Ort::Value::GetTensorData()
642
-   * deprecated
643
-   * This interface is redundant.
644
-   */
645
-  template <typename T>
646
-  deprecated("use Ort::Value::GetTensorData()") const T* GetTensorData(_Inout_ const OrtValue* value);
647
+    static constexpr int INVALID_INT_DIM = -2;
648
 
649
-  /** \deprecated use Ort::Value::GetTensorMemoryInfo()
650
-   * deprecated
651
-   * This interface is redundant.
652
-   */
653
-  deprecated("use Ort::Value::GetTensorMemoryInfo()") const OrtMemoryInfo* GetTensorMemoryInfo(_In_ const OrtValue* value);
654
-
655
-  /** \deprecated use Ort::TensorTypeAndShapeInfo::GetShape()
656
-   * deprecated
657
-   * This interface is redundant.
658
-   */
659
-  deprecated("use Ort::TensorTypeAndShapeInfo::GetShape()") std::vector<int64_t> GetTensorShape(const OrtTensorTypeAndShapeInfo* info);
660
+   private:
661
+    union {
662
+      int64_t i_;
663
+      const char* s_;
664
+    };
665
+    bool is_int_;
666
+  };
667
 
668
-  /** \deprecated use TensorTypeAndShapeInfo instances for automatic ownership.
669
-   * deprecated
670
-   * This interface is not exception safe.
671
-   */
672
-  deprecated("use TensorTypeAndShapeInfo") void ReleaseTensorTypeAndShapeInfo(OrtTensorTypeAndShapeInfo* input);
673
-
674
-  /** \deprecated use Ort::KernelContext::GetInputCount
675
-   * deprecated
676
-   * This interface is redundant.
677
-   */
678
-  deprecated("use Ort::KernelContext::GetInputCount") size_t KernelContext_GetInputCount(const OrtKernelContext* context);
679
-
680
-  /** \deprecated use Ort::KernelContext::GetInput
681
-   * deprecated
682
-   * This interface is redundant.
683
-   */
684
-  deprecated("use Ort::KernelContext::GetInput") const OrtValue* KernelContext_GetInput(const OrtKernelContext* context, _In_ size_t index);
685
-
686
-  /** \deprecated use Ort::KernelContext::GetOutputCount
687
-   * deprecated
688
-   * This interface is redundant.
689
-   */
690
-  deprecated("use Ort::KernelContext::GetOutputCount") size_t KernelContext_GetOutputCount(const OrtKernelContext* context);
691
-
692
-  /** \deprecated use Ort::KernelContext::GetOutput
693
-   * deprecated
694
-   * This interface is redundant.
695
-   */
696
-  deprecated("use Ort::KernelContext::GetOutput") OrtValue* KernelContext_GetOutput(OrtKernelContext* context, _In_ size_t index, _In_ const int64_t* dim_values, size_t dim_count);
697
+  using Shape = std::vector<SymbolicInteger>;
698
 
699
-  /** \deprecated use Ort::KernelContext::GetGPUComputeStream
700
-   * deprecated
701
-   * This interface is redundant.
702
-   */
703
-  deprecated("use Ort::KernelContext::GetGPUComputeStream") void* KernelContext_GetGPUComputeStream(const OrtKernelContext* context);
704
+  ShapeInferContext(const OrtApi* ort_api, OrtShapeInferContext* ctx);
705
 
706
-  /** \deprecated use Ort::ThrowOnError()
707
-   * deprecated
708
-   * This interface is redundant.
709
-   */
710
-  deprecated("use Ort::ThrowOnError()") void ThrowOnError(OrtStatus* result);
711
+  const Shape& GetInputShape(size_t indice) const { return input_shapes_.at(indice); }
712
 
713
-  /** \deprecated use Ort::OpAttr
714
-   * deprecated
715
-   * This interface is not exception safe.
716
-   */
717
-  deprecated("use Ort::OpAttr") OrtOpAttr* CreateOpAttr(_In_ const char* name,
718
-                                                            _In_ const void* data,
719
-                                                            _In_ int len,
720
-                                                            _In_ OrtOpAttrType type);
721
+  size_t GetInputCount() const { return input_shapes_.size(); }
722
 
723
-  /** \deprecated use Ort::OpAttr
724
-   * deprecated
725
-   * This interface is not exception safe.
726
-   */
727
-  deprecated("use Ort::OpAttr") void ReleaseOpAttr(_Frees_ptr_opt_ OrtOpAttr* op_attr);
728
+  Status SetOutputShape(size_t indice, const Shape& shape);
729
 
730
-  /** \deprecated use Ort::Op
731
-   * deprecated
732
-   * This interface is not exception safe.
733
-   */
734
-  deprecated("use Ort::Op") OrtOp* CreateOp(_In_ const OrtKernelInfo* info,
735
-                                                _In_z_ const char* op_name,
736
-                                                _In_z_ const char* domain,
737
-                                                int version,
738
-                                                _In_reads_(type_constraint_count) const char** type_constraint_names,
739
-                                                _In_reads_(type_constraint_count) const ONNXTensorElementDataType* type_constraint_values,
740
-                                                int type_constraint_count,
741
-                                                _In_reads_(attr_count) const OrtOpAttr* const* attr_values,
742
-                                                int attr_count,
743
-                                                int input_count,
744
-                                                int output_count);
745
+  int64_t GetAttrInt(const char* attr_name);
746
 
747
-  /** \deprecated use Ort::Op::Invoke
748
-   * deprecated
749
-   * This interface is redundant
750
-   */
751
-  deprecated("use Ort::Op::Invoke") void InvokeOp(_In_ const OrtKernelContext* context,
752
-                                                      _In_ const OrtOp* ort_op,
753
-                                                      _In_ const OrtValue* const* input_values,
754
-                                                      _In_ int input_count,
755
-                                                      _Inout_ OrtValue* const* output_values,
756
-                                                      _In_ int output_count);
757
+  using Ints = std::vector<int64_t>;
758
+  Ints GetAttrInts(const char* attr_name);
759
 
760
-  /** \deprecated use Ort::Op for automatic lifespan management.
761
-   * deprecated
762
-   * This interface is not exception safe.
763
-   */
764
-  deprecated("use Ort::Op") void ReleaseOp(_Frees_ptr_opt_ OrtOp* ort_op);
765
+  float GetAttrFloat(const char* attr_name);
766
 
767
-  /** \deprecated use Ort::KernelInfo for automatic lifespan management or for
768
-   * querying attributes
769
-   * deprecated
770
-   * This interface is redundant
771
-   */
772
-  template <typename T>  // T is only implemented for std::vector<float>, std::vector<int64_t>, float, int64_t, and string
773
-  deprecated("use Ort::KernelInfo::GetAttribute") T KernelInfoGetAttribute(_In_ const OrtKernelInfo* info, _In_ const char* name);
774
+  using Floats = std::vector<float>;
775
+  Floats GetAttrFloats(const char* attr_name);
776
 
777
-  /** \deprecated use Ort::KernelInfo::Copy
778
-   * querying attributes
779
-   * deprecated
780
-   * This interface is not exception safe
781
-   */
782
-  deprecated("use Ort::KernelInfo::Copy") OrtKernelInfo* CopyKernelInfo(_In_ const OrtKernelInfo* info);
783
+  std::string GetAttrString(const char* attr_name);
784
 
785
-  /** \deprecated use Ort::KernelInfo for lifespan management
786
-   * querying attributes
787
-   * deprecated
788
-   * This interface is not exception safe
789
-   */
790
-  deprecated("use Ort::KernelInfo") void ReleaseKernelInfo(_Frees_ptr_opt_ OrtKernelInfo* info_copy);
791
+  using Strings = std::vector<std::string>;
792
+  Strings GetAttrStrings(const char* attr_name);
793
 
794
  private:
795
-  const OrtApi& api_;
796
+  const OrtOpAttr* GetAttrHdl(const char* attr_name) const;
797
+  const OrtApi* ort_api_;
798
+  OrtShapeInferContext* ctx_;
799
+  std::vector<Shape> input_shapes_;
800
 };
801
 
802
-template <typename TOp, typename TKernel>
803
+using ShapeInferFn = Ort::Status (*)(Ort::ShapeInferContext&);
804
+
805
+#define MAX_CUSTOM_OP_END_VER (1UL << 31) - 1
806
+
807
+template <typename TOp, typename TKernel, bool WithStatus = false>
808
 struct CustomOpBase : OrtCustomOp {
809
   CustomOpBase() {
810
     OrtCustomOp::version = ORT_API_VERSION;
811
-    OrtCustomOp::CreateKernel = (const OrtCustomOp* this_, const OrtApi* api, const OrtKernelInfo* info) { return static_cast<const TOp*>(this_)->CreateKernel(*api, info); };
812
     OrtCustomOp::GetName = (const OrtCustomOp* this_) { return static_cast<const TOp*>(this_)->GetName(); };
813
 
814
     OrtCustomOp::GetExecutionProviderType = (const OrtCustomOp* this_) { return static_cast<const TOp*>(this_)->GetExecutionProviderType(); };
815
@@ -2011,7 +2249,6 @@
816
     OrtCustomOp::GetOutputTypeCount = (const OrtCustomOp* this_) { return static_cast<const TOp*>(this_)->GetOutputTypeCount(); };
817
     OrtCustomOp::GetOutputType = (const OrtCustomOp* this_, size_t index) { return static_cast<const TOp*>(this_)->GetOutputType(index); };
818
 
819
-    OrtCustomOp::KernelCompute = (void* op_kernel, OrtKernelContext* context) { static_cast<TKernel*>(op_kernel)->Compute(context); };
820
 #if defined(_MSC_VER) && !defined(__clang__)
821
 #pragma warning(push)
822
 #pragma warning(disable : 26409)
823
@@ -2027,6 +2264,36 @@
824
     OrtCustomOp::GetVariadicInputHomogeneity = (const OrtCustomOp* this_) { return static_cast<int>(static_cast<const TOp*>(this_)->GetVariadicInputHomogeneity()); };
825
     OrtCustomOp::GetVariadicOutputMinArity = (const OrtCustomOp* this_) { return static_cast<const TOp*>(this_)->GetVariadicOutputMinArity(); };
826
     OrtCustomOp::GetVariadicOutputHomogeneity = (const OrtCustomOp* this_) { return static_cast<int>(static_cast<const TOp*>(this_)->GetVariadicOutputHomogeneity()); };
827
+#ifdef __cpp_if_constexpr
828
+    if constexpr (WithStatus) {
829
+#else
830
+    if (WithStatus) {
831
+#endif
832
+      OrtCustomOp::CreateKernelV2 = (const OrtCustomOp* this_, const OrtApi* api, const OrtKernelInfo* info, void** op_kernel) -> OrtStatusPtr {
833
+        return static_cast<const TOp*>(this_)->CreateKernelV2(*api, info, op_kernel);
834
+      };
835
+      OrtCustomOp::KernelComputeV2 = (void* op_kernel, OrtKernelContext* context) -> OrtStatusPtr {
836
+        return static_cast<TKernel*>(op_kernel)->ComputeV2(context);
837
+      };
838
+    } else {
839
+      OrtCustomOp::CreateKernelV2 = nullptr;
840
+      OrtCustomOp::KernelComputeV2 = nullptr;
841
+
842
+      OrtCustomOp::CreateKernel = (const OrtCustomOp* this_, const OrtApi* api, const OrtKernelInfo* info) { return static_cast<const TOp*>(this_)->CreateKernel(*api, info); };
843
+      OrtCustomOp::KernelCompute = (void* op_kernel, OrtKernelContext* context) {
844
+        static_cast<TKernel*>(op_kernel)->Compute(context);
845
+      };
846
+    }
847
+
848
+    SetShapeInferFn<TOp>(0);
849
+
850
+    OrtCustomOp::GetStartVersion = (const OrtCustomOp* this_) {
851
+      return static_cast<const TOp*>(this_)->start_ver_;
852
+    };
853
+
854
+    OrtCustomOp::GetEndVersion = (const OrtCustomOp* this_) {
855
+      return static_cast<const TOp*>(this_)->end_ver_;
856
+    };
857
   }
858
 
859
   // Default implementation of GetExecutionProviderType that returns nullptr to default to the CPU provider
860
@@ -2078,9 +2345,26 @@
861
     return std::vector<std::string>{};
862
   }
863
 
864
+  template <typename C>
865
+  decltype(&C::InferOutputShape) SetShapeInferFn(decltype(&C::InferOutputShape)) {
866
+    OrtCustomOp::InferOutputShapeFn = (const OrtCustomOp*, OrtShapeInferContext* ort_ctx) -> OrtStatusPtr {
867
+      ShapeInferContext ctx(&GetApi(), ort_ctx);
868
+      return C::InferOutputShape(ctx);
869
+    };
870
+    return {};
871
+  }
872
+
873
+  template <typename C>
874
+  void SetShapeInferFn(...) {
875
+    OrtCustomOp::InferOutputShapeFn = {};
876
+  }
877
+
878
  protected:
879
   // Helper function that returns a map of session config entries specified by CustomOpBase::GetSessionConfigKeys.
880
   void GetSessionConfigs(std::unordered_map<std::string, std::string>& out, ConstSessionOptions options) const;
881
+
882
+  int start_ver_ = 1;
883
+  int end_ver_ = MAX_CUSTOM_OP_END_VER;
884
 };
885
 
886
 }  // namespace Ort
887
onnxruntime-linux-x64-gpu-1.15.1.tgz/include/onnxruntime_cxx_inline.h -> onnxruntime-linux-x64-gpu-1.17.1.tgz/include/onnxruntime_cxx_inline.h Changed
570
 
1
@@ -7,6 +7,17 @@
2
 // These are the inline implementations of the C++ header APIs. They're in this separate file as to not clutter
3
 // the main C++ file with implementation details.
4
 
5
+#include <cstring>
6
+#include <functional>
7
+
8
+#define RETURN_ON_API_FAIL(expression) \
9
+  {                                    \
10
+    auto err = (expression);           \
11
+    if (err) {                         \
12
+      return Status(err);              \
13
+    }                                  \
14
+  }
15
+
16
 namespace Ort {
17
 
18
 namespace detail {
19
@@ -114,6 +125,47 @@
20
   static constexpr ONNXTensorElementDataType type = ONNX_TENSOR_ELEMENT_DATA_TYPE_BOOL;
21
 };
22
 
23
+template <>
24
+struct TypeToTensorType<Float8E4M3FN_t> {
25
+  static constexpr ONNXTensorElementDataType type = ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT8E4M3FN;
26
+};
27
+template <>
28
+struct TypeToTensorType<Float8E4M3FNUZ_t> {
29
+  static constexpr ONNXTensorElementDataType type = ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT8E4M3FNUZ;
30
+};
31
+template <>
32
+struct TypeToTensorType<Float8E5M2_t> {
33
+  static constexpr ONNXTensorElementDataType type = ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT8E5M2;
34
+};
35
+template <>
36
+struct TypeToTensorType<Float8E5M2FNUZ_t> {
37
+  static constexpr ONNXTensorElementDataType type = ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT8E5M2FNUZ;
38
+};
39
+
40
+inline bool BFloat16_t::operator==(const BFloat16_t& rhs) const noexcept {
41
+  if (IsNaN() || rhs.IsNaN()) {
42
+    // IEEE defines that NaN is not equal to anything, including itself.
43
+    return false;
44
+  }
45
+  return val == rhs.val;
46
+}
47
+
48
+inline bool BFloat16_t::operator<(const BFloat16_t& rhs) const noexcept {
49
+  if (IsNaN() || rhs.IsNaN()) {
50
+    // IEEE defines that NaN is unordered with respect to everything, including itself.
51
+    return false;
52
+  }
53
+
54
+  const bool left_is_negative = IsNegative();
55
+  if (left_is_negative != rhs.IsNegative()) {
56
+    // When the signs of left and right differ, we know that left is less than right if it is
57
+    // the negative value. The exception to this is if both values are zero, in which case IEEE
58
+    // says they should be equal, even if the signs differ.
59
+    return left_is_negative && !AreZero(*this, rhs);
60
+  }
61
+  return (val != rhs.val) && ((val < rhs.val) ^ left_is_negative);
62
+}
63
+
64
 inline MemoryAllocation::MemoryAllocation(OrtAllocator* allocator, void* p, size_t size)
65
     : allocator_(allocator), p_(p), size_(size) {
66
 }
67
@@ -472,6 +524,21 @@
68
   return *this;
69
 }
70
 
71
+inline Env& Env::CreateAndRegisterAllocatorV2(const std::string& provider_type, const OrtMemoryInfo* mem_info, const std::unordered_map<std::string, std::string>& options, const OrtArenaCfg* arena_cfg) {
72
+  std::vector<const char*> keys, values;
73
+  auto num_entries = options.size();
74
+  if (num_entries > 0) {
75
+    keys.reserve(num_entries);
76
+    values.reserve(num_entries);
77
+    for (const auto& entry : options) {
78
+      keys.push_back(entry.first.c_str());
79
+      values.push_back(entry.second.c_str());
80
+    }
81
+  }
82
+  ThrowOnError(GetApi().CreateAndRegisterAllocatorV2(p_, provider_type.c_str(), mem_info, arena_cfg, keys.data(), values.data(), num_entries));
83
+  return *this;
84
+}
85
+
86
 inline CustomOpDomain::CustomOpDomain(const char* domain) {
87
   ThrowOnError(GetApi().CreateCustomOpDomain(domain, &p_));
88
 }
89
@@ -590,6 +657,12 @@
90
 }
91
 
92
 template <typename T>
93
+inline SessionOptionsImpl<T>& SessionOptionsImpl<T>::SetDeterministicCompute(bool value) {
94
+  ThrowOnError(GetApi().SetDeterministicCompute(this->p_, value));
95
+  return *this;
96
+}
97
+
98
+template <typename T>
99
 inline SessionOptionsImpl<T>& SessionOptionsImpl<T>::SetOptimizedModelFilePath(const ORTCHAR_T* optimized_model_filepath) {
100
   ThrowOnError(GetApi().SetOptimizedModelFilePath(this->p_, optimized_model_filepath));
101
   return *this;
102
@@ -793,6 +866,26 @@
103
 }
104
 
105
 template <typename T>
106
+inline SessionOptionsImpl<T>& SessionOptionsImpl<T>::AppendExecutionProvider_OpenVINO_V2(const std::unordered_map<std::string, std::string>& provider_options) {
107
+  auto num_entries = provider_options.size();
108
+  std::vector<const char*> keys, values;
109
+  if (num_entries > 0) {
110
+    keys.reserve(num_entries);
111
+    values.reserve(num_entries);
112
+
113
+    for (const auto& entry : provider_options) {
114
+      keys.push_back(entry.first.c_str());
115
+      values.push_back(entry.second.c_str());
116
+    }
117
+  }
118
+
119
+  ThrowOnError(GetApi().SessionOptionsAppendExecutionProvider_OpenVINO_V2(this->p_,
120
+                                                                          keys.data(), values.data(), num_entries));
121
+
122
+  return *this;
123
+}
124
+
125
+template <typename T>
126
 inline SessionOptionsImpl<T>& SessionOptionsImpl<T>::RegisterCustomOpsLibrary(const ORTCHAR_T* library_name,
127
                                                                               const CustomOpConfigs& custom_op_configs) {
128
   // Add custom op config entries before registering the custom op library. Otherwise, the config entries _may_ be ignored by
129
@@ -915,6 +1008,16 @@
130
 }
131
 
132
 template <typename T>
133
+inline void SessionImpl<T>::RunAsync(const RunOptions& run_options, const char* const* input_names, const Value* input_values, size_t input_count,
134
+                                     const char* const* output_names, Value* output_values, size_t output_count, RunAsyncCallbackFn callback, void* user_data) {
135
+  auto ort_input_values = reinterpret_cast<const OrtValue* const*>(input_values);
136
+  auto ort_output_values = reinterpret_cast<OrtValue**>(output_values);
137
+  ThrowOnError(GetApi().RunAsync(this->p_, run_options, input_names,
138
+                                 ort_input_values, input_count, output_names, output_count,
139
+                                 ort_output_values, callback, user_data));
140
+}
141
+
142
+template <typename T>
143
 inline AllocatedStringPtr SessionImpl<T>::EndProfilingAllocated(OrtAllocator* allocator) {
144
   char* out = nullptr;
145
   ThrowOnError(GetApi().SessionEndProfiling(this->p_, allocator, &out));
146
@@ -1434,16 +1537,16 @@
147
 }
148
 #endif  // !defined(DISABLE_SPARSE_TENSORS)
149
 
150
-inline Value Value::CreateMap(Value& keys, Value& values) {
151
+inline Value Value::CreateMap(const Value& keys, const Value& values) {
152
   OrtValue* out;
153
-  OrtValue* inputs2 = {keys, values};
154
+  const OrtValue* inputs2 = {keys, values};
155
   ThrowOnError(GetApi().CreateValue(inputs, 2, ONNX_TYPE_MAP, &out));
156
   return Value{out};
157
 }
158
 
159
-inline Value Value::CreateSequence(std::vector<Value>& values) {
160
+inline Value Value::CreateSequence(const std::vector<Value>& values) {
161
   OrtValue* out;
162
-  std::vector<OrtValue*> values_ort{values.data(), values.data() + values.size()};
163
+  std::vector<const OrtValue*> values_ort{values.data(), values.data() + values.size()};
164
   ThrowOnError(GetApi().CreateValue(values_ort.data(), values_ort.size(), ONNX_TYPE_SEQUENCE, &out));
165
   return Value{out};
166
 }
167
@@ -1575,6 +1678,10 @@
168
   return Logger{out};
169
 }
170
 
171
+inline void KernelContext::ParallelFor(void (*fn)(void*, size_t), size_t total, size_t num_batch, void* usr_data) const {
172
+  ThrowOnError(GetApi().KernelContext_ParallelFor(ctx_, fn, total, num_batch, usr_data));
173
+}
174
+
175
 inline OpAttr::OpAttr(const char* name, const void* data, int len, OrtOpAttrType type) {
176
   Ort::ThrowOnError(GetApi().CreateOpAttr(name, data, len, type, &p_));
177
 }
178
@@ -1770,223 +1877,6 @@
179
                                       output_values, static_cast<int>(output_count)));
180
 }
181
 
182
-inline void CustomOpApi::ThrowOnError(OrtStatus* status) {
183
-  Ort::ThrowOnError(status);
184
-}
185
-
186
-template <>
187
-inline float CustomOpApi::KernelInfoGetAttribute<float>(_In_ const OrtKernelInfo* info, _In_ const char* name) {
188
-  float out;
189
-  Ort::ThrowOnError(api_.KernelInfoGetAttribute_float(info, name, &out));
190
-  return out;
191
-}
192
-
193
-template <>
194
-inline int64_t CustomOpApi::KernelInfoGetAttribute<int64_t>(_In_ const OrtKernelInfo* info, _In_ const char* name) {
195
-  int64_t out;
196
-  Ort::ThrowOnError(api_.KernelInfoGetAttribute_int64(info, name, &out));
197
-  return out;
198
-}
199
-
200
-template <>
201
-inline std::string CustomOpApi::KernelInfoGetAttribute<std::string>(_In_ const OrtKernelInfo* info, _In_ const char* name) {
202
-  size_t size = 0;
203
-  std::string out;
204
-
205
-  // Feed nullptr for the data buffer to query the true size of the string attribute
206
-  OrtStatus* status = api_.KernelInfoGetAttribute_string(info, name, nullptr, &size);
207
-
208
-  if (status == nullptr) {
209
-    out.resize(size);
210
-    Ort::ThrowOnError(api_.KernelInfoGetAttribute_string(info, name, &out0, &size));
211
-    out.resize(size - 1);  // remove the terminating character '\0'
212
-  } else {
213
-    Ort::ThrowOnError(status);
214
-  }
215
-  return out;
216
-}
217
-
218
-template <>
219
-inline std::vector<float> CustomOpApi::KernelInfoGetAttribute(_In_ const OrtKernelInfo* info, _In_ const char* name) {
220
-  size_t size = 0;
221
-  std::vector<float> out;
222
-
223
-  // Feed nullptr for the data buffer to query the true size of the attribute
224
-  OrtStatus* status = api_.KernelInfoGetAttributeArray_float(info, name, nullptr, &size);
225
-
226
-  if (status == nullptr) {
227
-    out.resize(size);
228
-    Ort::ThrowOnError(api_.KernelInfoGetAttributeArray_float(info, name, out.data(), &size));
229
-  } else {
230
-    Ort::ThrowOnError(status);
231
-  }
232
-  return out;
233
-}
234
-
235
-template <>
236
-inline std::vector<int64_t> CustomOpApi::KernelInfoGetAttribute(_In_ const OrtKernelInfo* info, _In_ const char* name) {
237
-  size_t size = 0;
238
-  std::vector<int64_t> out;
239
-
240
-  // Feed nullptr for the data buffer to query the true size of the attribute
241
-  OrtStatus* status = api_.KernelInfoGetAttributeArray_int64(info, name, nullptr, &size);
242
-
243
-  if (status == nullptr) {
244
-    out.resize(size);
245
-    Ort::ThrowOnError(api_.KernelInfoGetAttributeArray_int64(info, name, out.data(), &size));
246
-  } else {
247
-    Ort::ThrowOnError(status);
248
-  }
249
-  return out;
250
-}
251
-inline OrtTensorTypeAndShapeInfo* CustomOpApi::GetTensorTypeAndShape(_In_ const OrtValue* value) {
252
-  OrtTensorTypeAndShapeInfo* out;
253
-  Ort::ThrowOnError(api_.GetTensorTypeAndShape(value, &out));
254
-  return out;
255
-}
256
-
257
-inline size_t CustomOpApi::GetTensorShapeElementCount(_In_ const OrtTensorTypeAndShapeInfo* info) {
258
-  size_t out;
259
-  Ort::ThrowOnError(api_.GetTensorShapeElementCount(info, &out));
260
-  return out;
261
-}
262
-
263
-inline ONNXTensorElementDataType CustomOpApi::GetTensorElementType(const OrtTensorTypeAndShapeInfo* info) {
264
-  ONNXTensorElementDataType out;
265
-  Ort::ThrowOnError(api_.GetTensorElementType(info, &out));
266
-  return out;
267
-}
268
-
269
-inline size_t CustomOpApi::GetDimensionsCount(_In_ const OrtTensorTypeAndShapeInfo* info) {
270
-  size_t out;
271
-  Ort::ThrowOnError(api_.GetDimensionsCount(info, &out));
272
-  return out;
273
-}
274
-
275
-inline void CustomOpApi::GetDimensions(_In_ const OrtTensorTypeAndShapeInfo* info, _Out_ int64_t* dim_values, size_t dim_values_length) {
276
-  Ort::ThrowOnError(api_.GetDimensions(info, dim_values, dim_values_length));
277
-}
278
-
279
-inline void CustomOpApi::SetDimensions(OrtTensorTypeAndShapeInfo* info, _In_ const int64_t* dim_values, size_t dim_count) {
280
-  Ort::ThrowOnError(api_.SetDimensions(info, dim_values, dim_count));
281
-}
282
-
283
-template <typename T>
284
-inline T* CustomOpApi::GetTensorMutableData(_Inout_ OrtValue* value) {
285
-  T* data;
286
-  Ort::ThrowOnError(api_.GetTensorMutableData(value, reinterpret_cast<void**>(&data)));
287
-  return data;
288
-}
289
-
290
-inline const OrtMemoryInfo* CustomOpApi::GetTensorMemoryInfo(_In_ const OrtValue* value) {
291
-  const OrtMemoryInfo* mem_info;
292
-  Ort::ThrowOnError(api_.GetTensorMemoryInfo(value, &mem_info));
293
-  return mem_info;
294
-}
295
-
296
-template <typename T>
297
-inline const T* CustomOpApi::GetTensorData(_Inout_ const OrtValue* value) {
298
-  T* data = nullptr;
299
-  Ort::ThrowOnError(api_.GetTensorMutableData(const_cast<OrtValue*>(value), reinterpret_cast<void**>(&data)));
300
-  return data;
301
-}
302
-
303
-inline std::vector<int64_t> CustomOpApi::GetTensorShape(const OrtTensorTypeAndShapeInfo* info) {
304
-  size_t out;
305
-  Ort::ThrowOnError(api_.GetDimensionsCount(info, &out));
306
-  std::vector<int64_t> output(out);
307
-  Ort::ThrowOnError(api_.GetDimensions(info, output.data(), out));
308
-  return output;
309
-}
310
-
311
-inline void CustomOpApi::ReleaseTensorTypeAndShapeInfo(OrtTensorTypeAndShapeInfo* input) {
312
-  api_.ReleaseTensorTypeAndShapeInfo(input);
313
-}
314
-
315
-inline size_t CustomOpApi::KernelContext_GetInputCount(const OrtKernelContext* context) {
316
-  size_t out;
317
-  Ort::ThrowOnError(api_.KernelContext_GetInputCount(context, &out));
318
-  return out;
319
-}
320
-
321
-inline const OrtValue* CustomOpApi::KernelContext_GetInput(const OrtKernelContext* context, _In_ size_t index) {
322
-  const OrtValue* out;
323
-  Ort::ThrowOnError(api_.KernelContext_GetInput(context, index, &out));
324
-  return out;
325
-}
326
-
327
-inline size_t CustomOpApi::KernelContext_GetOutputCount(const OrtKernelContext* context) {
328
-  size_t out;
329
-  Ort::ThrowOnError(api_.KernelContext_GetOutputCount(context, &out));
330
-  return out;
331
-}
332
-
333
-inline OrtValue* CustomOpApi::KernelContext_GetOutput(OrtKernelContext* context, _In_ size_t index,
334
-                                                      _In_ const int64_t* dim_values, size_t dim_count) {
335
-  OrtValue* out;
336
-  Ort::ThrowOnError(api_.KernelContext_GetOutput(context, index, dim_values, dim_count, &out));
337
-  return out;
338
-}
339
-
340
-inline void* CustomOpApi::KernelContext_GetGPUComputeStream(const OrtKernelContext* context) {
341
-  void* out;
342
-  Ort::ThrowOnError(api_.KernelContext_GetGPUComputeStream(context, &out));
343
-  return out;
344
-}
345
-
346
-inline OrtOpAttr* CustomOpApi::CreateOpAttr(_In_ const char* name,
347
-                                            _In_ const void* data,
348
-                                            _In_ int len,
349
-                                            _In_ OrtOpAttrType type) {
350
-  OrtOpAttr* op_attr{};
351
-  Ort::ThrowOnError(api_.CreateOpAttr(name, data, len, type, &op_attr));
352
-  return op_attr;
353
-}
354
-
355
-inline void CustomOpApi::ReleaseOpAttr(_Frees_ptr_opt_ OrtOpAttr* op_attr) {
356
-  api_.ReleaseOpAttr(op_attr);
357
-}
358
-
359
-inline OrtOp* CustomOpApi::CreateOp(_In_ const OrtKernelInfo* info,
360
-                                    _In_z_ const char* op_name,
361
-                                    _In_z_ const char* domain,
362
-                                    int version,
363
-                                    _In_reads_(type_constraint_count) const char** type_constraint_names,
364
-                                    _In_reads_(type_constraint_count) const ONNXTensorElementDataType* type_constraint_values,
365
-                                    int type_constraint_count,
366
-                                    _In_reads_(attr_count) const OrtOpAttr* const* attr_values,
367
-                                    int attr_count,
368
-                                    int input_count,
369
-                                    int output_count) {
370
-  OrtOp* ort_op{};
371
-  Ort::ThrowOnError(api_.CreateOp(info, op_name, domain, version, type_constraint_names, type_constraint_values,
372
-                                  type_constraint_count, attr_values, attr_count, input_count, output_count, &ort_op));
373
-  return ort_op;
374
-}
375
-
376
-inline void CustomOpApi::InvokeOp(_In_ const OrtKernelContext* context,
377
-                                  _In_ const OrtOp* ort_op,
378
-                                  _In_ const OrtValue* const* input_values,
379
-                                  _In_ int input_count,
380
-                                  _Inout_ OrtValue* const* output_values,
381
-                                  _In_ int output_count) {
382
-  Ort::ThrowOnError(api_.InvokeOp(context, ort_op, input_values, input_count, output_values, output_count));
383
-}
384
-
385
-inline void CustomOpApi::ReleaseOp(_Frees_ptr_opt_ OrtOp* ort_op) {
386
-  api_.ReleaseOp(ort_op);
387
-}
388
-
389
-inline OrtKernelInfo* CustomOpApi::CopyKernelInfo(_In_ const OrtKernelInfo* info) {
390
-  OrtKernelInfo* info_copy{};
391
-  Ort::ThrowOnError(api_.CopyKernelInfo(info, &info_copy));
392
-  return info_copy;
393
-}
394
-
395
-inline void CustomOpApi::ReleaseKernelInfo(_Frees_ptr_opt_ OrtKernelInfo* info_copy) {
396
-  api_.ReleaseKernelInfo(info_copy);
397
-}
398
-
399
 inline std::string GetVersionString() {
400
   return OrtGetApiBase()->GetVersionString();
401
 }
402
@@ -2014,9 +1904,9 @@
403
   return available_providers;
404
 }
405
 
406
-template <typename TOp, typename TKernel>
407
-void CustomOpBase<TOp, TKernel>::GetSessionConfigs(std::unordered_map<std::string, std::string>& out,
408
-                                                   ConstSessionOptions options) const {
409
+template <typename TOp, typename TKernel, bool WithStatus>
410
+void CustomOpBase<TOp, TKernel, WithStatus>::GetSessionConfigs(std::unordered_map<std::string, std::string>& out,
411
+                                                               ConstSessionOptions options) const {
412
   const TOp* derived = static_cast<const TOp*>(this);
413
   std::vector<std::string> keys = derived->GetSessionConfigKeys();
414
 
415
@@ -2032,4 +1922,154 @@
416
   }
417
 }
418
 
419
+inline ShapeInferContext::ShapeInferContext(const OrtApi* ort_api,
420
+                                            OrtShapeInferContext* ctx) : ort_api_(ort_api), ctx_(ctx) {
421
+  size_t input_count = 0;
422
+  Ort::ThrowOnError(ort_api_->ShapeInferContext_GetInputCount(ctx_, &input_count));
423
+  for (size_t ith_input = 0; ith_input < input_count; ++ith_input) {
424
+    OrtTensorTypeAndShapeInfo* info{};
425
+    Ort::ThrowOnError(ort_api_->ShapeInferContext_GetInputTypeShape(ctx, ith_input, &info));
426
+    TensorTypeAndShapeInfo type_shape_info(info);
427
+    auto integer_shape = type_shape_info.GetShape();
428
+    std::vector<const char*> symbolic_shape(integer_shape.size(), {});
429
+    type_shape_info.GetSymbolicDimensions(&symbolic_shape0, integer_shape.size());
430
+    Shape shape;
431
+    for (size_t ith = 0; ith < integer_shape.size(); ++ith) {
432
+      if (symbolic_shapeith && std::string{symbolic_shapeith}.size() > 0) {
433
+        shape.emplace_back(symbolic_shapeith);
434
+      } else {
435
+        shape.emplace_back(integer_shapeith);
436
+      }
437
+    }
438
+    input_shapes_.push_back(std::move(shape));
439
+    type_shape_info.release();
440
+  }
441
+}
442
+
443
+inline Status ShapeInferContext::SetOutputShape(size_t indice, const Shape& shape) {
444
+  OrtTensorTypeAndShapeInfo* info = {};
445
+  RETURN_ON_API_FAIL(ort_api_->CreateTensorTypeAndShapeInfo(&info));
446
+
447
+  using InfoPtr = std::unique_ptr<OrtTensorTypeAndShapeInfo, std::function<void(OrtTensorTypeAndShapeInfo*)>>;
448
+
449
+  InfoPtr info_ptr(info, this(OrtTensorTypeAndShapeInfo* obj) {
450
+    ort_api_->ReleaseTensorTypeAndShapeInfo(obj);
451
+  });
452
+
453
+  std::vector<int64_t> integer_dims;
454
+  std::vector<const char*> symbolic_dims;
455
+
456
+  for (const auto dim : shape) {
457
+    if (dim.IsInt()) {
458
+      integer_dims.push_back(dim.IsInt());
459
+      symbolic_dims.push_back("");
460
+    } else {
461
+      if (!dim.AsSym() || std::string{dim.AsSym()}.empty()) {
462
+        ORT_CXX_API_THROW("Symbolic dim must not be an empty string", ORT_INVALID_ARGUMENT);
463
+      }
464
+      integer_dims.push_back(SymbolicInteger::INVALID_INT_DIM);
465
+      symbolic_dims.push_back(dim.AsSym());
466
+    }
467
+  }
468
+
469
+  RETURN_ON_API_FAIL(ort_api_->SetDimensions(info, integer_dims.data(), integer_dims.size()));
470
+  RETURN_ON_API_FAIL(ort_api_->SetSymbolicDimensions(info, symbolic_dims.data(), symbolic_dims.size()));
471
+  RETURN_ON_API_FAIL(ort_api_->ShapeInferContext_SetOutputTypeShape(ctx_, indice, info));
472
+  return Status{nullptr};
473
+}
474
+
475
+inline int64_t ShapeInferContext::GetAttrInt(const char* attr_name) {
476
+  const auto* attr = GetAttrHdl(attr_name);
477
+  int64_t i = {};
478
+  size_t out = {};
479
+  Ort::ThrowOnError(ort_api_->ReadOpAttr(attr, ORT_OP_ATTR_INT, &i, sizeof(i), &out));
480
+  return i;
481
+}
482
+
483
+inline ShapeInferContext::Ints ShapeInferContext::GetAttrInts(const char* attr_name) {
484
+  const auto* attr = GetAttrHdl(attr_name);
485
+  int64_t i = {};
486
+  size_t out = {};
487
+  // first call to get the bytes needed
488
+  auto status = ort_api_->ReadOpAttr(attr, ORT_OP_ATTR_INTS, &i, sizeof(i), &out);
489
+  if (status) {
490
+    size_t num_i = out / sizeof(int64_t);
491
+    ShapeInferContext::Ints ints(num_i, 0);
492
+    Ort::ThrowOnError(ort_api_->ReadOpAttr(attr, ORT_OP_ATTR_INTS, ints.data(), out, &out));
493
+    return ints;
494
+  } else {
495
+    return {i};
496
+  }
497
+}
498
+
499
+inline float ShapeInferContext::GetAttrFloat(const char* attr_name) {
500
+  const auto* attr = GetAttrHdl(attr_name);
501
+  float f = {};
502
+  size_t out = {};
503
+  Ort::ThrowOnError(ort_api_->ReadOpAttr(attr, ORT_OP_ATTR_FLOAT, &f, sizeof(f), &out));
504
+  return f;
505
+}
506
+
507
+inline ShapeInferContext::Floats ShapeInferContext::GetAttrFloats(const char* attr_name) {
508
+  const auto* attr = GetAttrHdl(attr_name);
509
+  float f = {};
510
+  size_t out = {};
511
+  // first call to get the bytes needed
512
+  auto status = ort_api_->ReadOpAttr(attr, ORT_OP_ATTR_FLOATS, &f, sizeof(f), &out);
513
+  if (status) {
514
+    size_t num_f = out / sizeof(float);
515
+    ShapeInferContext::Floats floats(num_f, 0);
516
+    Ort::ThrowOnError(ort_api_->ReadOpAttr(attr, ORT_OP_ATTR_FLOATS, floats.data(), out, &out));
517
+    return floats;
518
+  } else {
519
+    return {f};
520
+  }
521
+}
522
+
523
+inline std::string ShapeInferContext::GetAttrString(const char* attr_name) {
524
+  const auto* attr = GetAttrHdl(attr_name);
525
+  char c = {};
526
+  size_t out = {};
527
+  // first call to get the bytes needed
528
+  auto status = ort_api_->ReadOpAttr(attr, ORT_OP_ATTR_STRING, &c, sizeof(char), &out);
529
+  if (status) {
530
+    std::vector<char> chars(out, '\0');
531
+    Ort::ThrowOnError(ort_api_->ReadOpAttr(attr, ORT_OP_ATTR_STRING, chars.data(), out, &out));
532
+    return {chars.data()};
533
+  } else {
534
+    return {c};
535
+  }
536
+}
537
+
538
+inline ShapeInferContext::Strings ShapeInferContext::GetAttrStrings(const char* attr_name) {
539
+  const auto* attr = GetAttrHdl(attr_name);
540
+  char c = {};
541
+  size_t out = {};
542
+  // first call to get the bytes needed
543
+  auto status = ort_api_->ReadOpAttr(attr, ORT_OP_ATTR_STRINGS, &c, sizeof(char), &out);
544
+  if (status) {
545
+    std::vector<char> chars(out, '\0');
546
+    Ort::ThrowOnError(ort_api_->ReadOpAttr(attr, ORT_OP_ATTR_STRINGS, chars.data(), out, &out));
547
+    ShapeInferContext::Strings strings;
548
+    char* char_st = chars.data();
549
+    char* char_ed = char_st + out;
550
+    while (char_st < char_ed) {
551
+      strings.emplace_back(char_st);
552
+      while (*char_st != '\0') {
553
+        char_st++;
554
+      }
555
+      char_st++;
556
+    }
557
+    return strings;
558
+  } else {
559
+    return {std::string{c}};
560
+  }
561
+}
562
+
563
+inline const OrtOpAttr* ShapeInferContext::GetAttrHdl(const char* attr_name) const {
564
+  const OrtOpAttr* attr_hdl = {};
565
+  Ort::ThrowOnError(ort_api_->ShapeInferContext_GetAttribute(ctx_, attr_name, &attr_hdl));
566
+  return attr_hdl;
567
+}
568
+
569
 }  // namespace Ort
570
onnxruntime-linux-x64-gpu-1.17.1.tgz/include/onnxruntime_float16.h Added
542
 
1
@@ -0,0 +1,540 @@
2
+// Copyright (c) Microsoft Corporation. All rights reserved.
3
+// Licensed under the MIT License.
4
+
5
+#pragma once
6
+
7
+#include <stdint.h>
8
+#include <cmath>
9
+#include <cstring>
10
+#include <limits>
11
+
12
+namespace onnxruntime_float16 {
13
+
14
+namespace detail {
15
+
16
+enum class endian {
17
+#if defined(_WIN32)
18
+  little = 0,
19
+  big = 1,
20
+  native = little,
21
+#elif defined(__GNUC__) || defined(__clang__)
22
+  little = __ORDER_LITTLE_ENDIAN__,
23
+  big = __ORDER_BIG_ENDIAN__,
24
+  native = __BYTE_ORDER__,
25
+#else
26
+#error onnxruntime_float16::detail::endian is not implemented in this environment.
27
+#endif
28
+};
29
+
30
+static_assert(
31
+    endian::native == endian::little || endian::native == endian::big,
32
+    "Only little-endian or big-endian native byte orders are supported.");
33
+
34
+}  // namespace detail
35
+
36
+/// <summary>
37
+/// Shared implementation between public and internal classes. CRTP pattern.
38
+/// </summary>
39
+template <class Derived>
40
+struct Float16Impl {
41
+ protected:
42
+  /// <summary>
43
+  /// Converts from float to uint16_t float16 representation
44
+  /// </summary>
45
+  /// <param name="v"></param>
46
+  /// <returns></returns>
47
+  constexpr static uint16_t ToUint16Impl(float v) noexcept;
48
+
49
+  /// <summary>
50
+  /// Converts float16 to float
51
+  /// </summary>
52
+  /// <returns>float representation of float16 value</returns>
53
+  float ToFloatImpl() const noexcept;
54
+
55
+  /// <summary>
56
+  /// Creates an instance that represents absolute value.
57
+  /// </summary>
58
+  /// <returns>Absolute value</returns>
59
+  uint16_t AbsImpl() const noexcept {
60
+    return static_cast<uint16_t>(val & ~kSignMask);
61
+  }
62
+
63
+  /// <summary>
64
+  /// Creates a new instance with the sign flipped.
65
+  /// </summary>
66
+  /// <returns>Flipped sign instance</returns>
67
+  uint16_t NegateImpl() const noexcept {
68
+    return IsNaN() ? val : static_cast<uint16_t>(val ^ kSignMask);
69
+  }
70
+
71
+ public:
72
+  // uint16_t special values
73
+  static constexpr uint16_t kSignMask = 0x8000U;
74
+  static constexpr uint16_t kBiasedExponentMask = 0x7C00U;
75
+  static constexpr uint16_t kPositiveInfinityBits = 0x7C00U;
76
+  static constexpr uint16_t kNegativeInfinityBits = 0xFC00U;
77
+  static constexpr uint16_t kPositiveQNaNBits = 0x7E00U;
78
+  static constexpr uint16_t kNegativeQNaNBits = 0xFE00U;
79
+  static constexpr uint16_t kEpsilonBits = 0x4170U;
80
+  static constexpr uint16_t kMinValueBits = 0xFBFFU;  // Minimum normal number
81
+  static constexpr uint16_t kMaxValueBits = 0x7BFFU;  // Largest normal number
82
+  static constexpr uint16_t kOneBits = 0x3C00U;
83
+  static constexpr uint16_t kMinusOneBits = 0xBC00U;
84
+
85
+  uint16_t val{0};
86
+
87
+  Float16Impl() = default;
88
+
89
+  /// <summary>
90
+  /// Checks if the value is negative
91
+  /// </summary>
92
+  /// <returns>true if negative</returns>
93
+  bool IsNegative() const noexcept {
94
+    return static_cast<int16_t>(val) < 0;
95
+  }
96
+
97
+  /// <summary>
98
+  /// Tests if the value is NaN
99
+  /// </summary>
100
+  /// <returns>true if NaN</returns>
101
+  bool IsNaN() const noexcept {
102
+    return AbsImpl() > kPositiveInfinityBits;
103
+  }
104
+
105
+  /// <summary>
106
+  /// Tests if the value is finite
107
+  /// </summary>
108
+  /// <returns>true if finite</returns>
109
+  bool IsFinite() const noexcept {
110
+    return AbsImpl() < kPositiveInfinityBits;
111
+  }
112
+
113
+  /// <summary>
114
+  /// Tests if the value represents positive infinity.
115
+  /// </summary>
116
+  /// <returns>true if positive infinity</returns>
117
+  bool IsPositiveInfinity() const noexcept {
118
+    return val == kPositiveInfinityBits;
119
+  }
120
+
121
+  /// <summary>
122
+  /// Tests if the value represents negative infinity
123
+  /// </summary>
124
+  /// <returns>true if negative infinity</returns>
125
+  bool IsNegativeInfinity() const noexcept {
126
+    return val == kNegativeInfinityBits;
127
+  }
128
+
129
+  /// <summary>
130
+  /// Tests if the value is either positive or negative infinity.
131
+  /// </summary>
132
+  /// <returns>True if absolute value is infinity</returns>
133
+  bool IsInfinity() const noexcept {
134
+    return AbsImpl() == kPositiveInfinityBits;
135
+  }
136
+
137
+  /// <summary>
138
+  /// Tests if the value is NaN or zero. Useful for comparisons.
139
+  /// </summary>
140
+  /// <returns>True if NaN or zero.</returns>
141
+  bool IsNaNOrZero() const noexcept {
142
+    auto abs = AbsImpl();
143
+    return (abs == 0 || abs > kPositiveInfinityBits);
144
+  }
145
+
146
+  /// <summary>
147
+  /// Tests if the value is normal (not zero, subnormal, infinite, or NaN).
148
+  /// </summary>
149
+  /// <returns>True if so</returns>
150
+  bool IsNormal() const noexcept {
151
+    auto abs = AbsImpl();
152
+    return (abs < kPositiveInfinityBits)           // is finite
153
+           && (abs != 0)                           // is not zero
154
+           && ((abs & kBiasedExponentMask) != 0);  // is not subnormal (has a non-zero exponent)
155
+  }
156
+
157
+  /// <summary>
158
+  /// Tests if the value is subnormal (denormal).
159
+  /// </summary>
160
+  /// <returns>True if so</returns>
161
+  bool IsSubnormal() const noexcept {
162
+    auto abs = AbsImpl();
163
+    return (abs < kPositiveInfinityBits)           // is finite
164
+           && (abs != 0)                           // is not zero
165
+           && ((abs & kBiasedExponentMask) == 0);  // is subnormal (has a zero exponent)
166
+  }
167
+
168
+  /// <summary>
169
+  /// Creates an instance that represents absolute value.
170
+  /// </summary>
171
+  /// <returns>Absolute value</returns>
172
+  Derived Abs() const noexcept { return Derived::FromBits(AbsImpl()); }
173
+
174
+  /// <summary>
175
+  /// Creates a new instance with the sign flipped.
176
+  /// </summary>
177
+  /// <returns>Flipped sign instance</returns>
178
+  Derived Negate() const noexcept { return Derived::FromBits(NegateImpl()); }
179
+
180
+  /// <summary>
181
+  /// IEEE defines that positive and negative zero are equal, this gives us a quick equality check
182
+  /// for two values by or'ing the private bits together and stripping the sign. They are both zero,
183
+  /// and therefore equivalent, if the resulting value is still zero.
184
+  /// </summary>
185
+  /// <param name="lhs">first value</param>
186
+  /// <param name="rhs">second value</param>
187
+  /// <returns>True if both arguments represent zero</returns>
188
+  static bool AreZero(const Float16Impl& lhs, const Float16Impl& rhs) noexcept {
189
+    return static_cast<uint16_t>((lhs.val | rhs.val) & ~kSignMask) == 0;
190
+  }
191
+
192
+  bool operator==(const Float16Impl& rhs) const noexcept {
193
+    if (IsNaN() || rhs.IsNaN()) {
194
+      // IEEE defines that NaN is not equal to anything, including itself.
195
+      return false;
196
+    }
197
+    return val == rhs.val;
198
+  }
199
+
200
+  bool operator!=(const Float16Impl& rhs) const noexcept { return !(*this == rhs); }
201
+
202
+  bool operator<(const Float16Impl& rhs) const noexcept {
203
+    if (IsNaN() || rhs.IsNaN()) {
204
+      // IEEE defines that NaN is unordered with respect to everything, including itself.
205
+      return false;
206
+    }
207
+
208
+    const bool left_is_negative = IsNegative();
209
+    if (left_is_negative != rhs.IsNegative()) {
210
+      // When the signs of left and right differ, we know that left is less than right if it is
211
+      // the negative value. The exception to this is if both values are zero, in which case IEEE
212
+      // says they should be equal, even if the signs differ.
213
+      return left_is_negative && !AreZero(*this, rhs);
214
+    }
215
+    return (val != rhs.val) && ((val < rhs.val) ^ left_is_negative);
216
+  }
217
+};
218
+
219
+// The following Float16_t conversions are based on the code from
220
+// Eigen library.
221
+
222
+// The conversion routines are Copyright (c) Fabian Giesen, 2016.
223
+// The original license follows:
224
+//
225
+// Copyright (c) Fabian Giesen, 2016
226
+// All rights reserved.
227
+// Redistribution and use in source and binary forms, with or without
228
+// modification, are permitted.
229
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
230
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
231
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
232
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
233
+// HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
234
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
235
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
236
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
237
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
238
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
239
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
240
+
241
+namespace detail {
242
+union float32_bits {
243
+  unsigned int u;
244
+  float f;
245
+};
246
+}  // namespace detail
247
+
248
+template <class Derived>
249
+inline constexpr uint16_t Float16Impl<Derived>::ToUint16Impl(float v) noexcept {
250
+  detail::float32_bits f{};
251
+  f.f = v;
252
+
253
+  constexpr detail::float32_bits f32infty = {255 << 23};
254
+  constexpr detail::float32_bits f16max = {(127 + 16) << 23};
255
+  constexpr detail::float32_bits denorm_magic = {((127 - 15) + (23 - 10) + 1) << 23};
256
+  constexpr unsigned int sign_mask = 0x80000000u;
257
+  uint16_t val = static_cast<uint16_t>(0x0u);
258
+
259
+  unsigned int sign = f.u & sign_mask;
260
+  f.u ^= sign;
261
+
262
+  // NOTE all the integer compares in this function can be safely
263
+  // compiled into signed compares since all operands are below
264
+  // 0x80000000. Important if you want fast straight SSE2 code
265
+  // (since there's no unsigned PCMPGTD).
266
+
267
+  if (f.u >= f16max.u) {                         // result is Inf or NaN (all exponent bits set)
268
+    val = (f.u > f32infty.u) ? 0x7e00 : 0x7c00;  // NaN->qNaN and Inf->Inf
269
+  } else {                                       // (De)normalized number or zero
270
+    if (f.u < (113 << 23)) {                     // resulting FP16 is subnormal or zero
271
+      // use a magic value to align our 10 mantissa bits at the bottom of
272
+      // the float. as long as FP addition is round-to-nearest-even this
273
+      // just works.
274
+      f.f += denorm_magic.f;
275
+
276
+      // and one integer subtract of the bias later, we have our final float!
277
+      val = static_cast<uint16_t>(f.u - denorm_magic.u);
278
+    } else {
279
+      unsigned int mant_odd = (f.u >> 13) & 1;  // resulting mantissa is odd
280
+
281
+      // update exponent, rounding bias part 1
282
+      // Equivalent to `f.u += ((unsigned int)(15 - 127) << 23) + 0xfff`, but
283
+      // without arithmetic overflow.
284
+      f.u += 0xc8000fffU;
285
+      // rounding bias part 2
286
+      f.u += mant_odd;
287
+      // take the bits!
288
+      val = static_cast<uint16_t>(f.u >> 13);
289
+    }
290
+  }
291
+
292
+  val |= static_cast<uint16_t>(sign >> 16);
293
+  return val;
294
+}
295
+
296
+template <class Derived>
297
+inline float Float16Impl<Derived>::ToFloatImpl() const noexcept {
298
+  constexpr detail::float32_bits magic = {113 << 23};
299
+  constexpr unsigned int shifted_exp = 0x7c00 << 13;  // exponent mask after shift
300
+  detail::float32_bits o{};
301
+
302
+  o.u = (val & 0x7fff) << 13;            // exponent/mantissa bits
303
+  unsigned int exp = shifted_exp & o.u;  // just the exponent
304
+  o.u += (127 - 15) << 23;               // exponent adjust
305
+
306
+  // handle exponent special cases
307
+  if (exp == shifted_exp) {   // Inf/NaN?
308
+    o.u += (128 - 16) << 23;  // extra exp adjust
309
+  } else if (exp == 0) {      // Zero/Denormal?
310
+    o.u += 1 << 23;           // extra exp adjust
311
+    o.f -= magic.f;           // re-normalize
312
+  }
313
+
314
+  // Attempt to workaround the Internal Compiler Error on ARM64
315
+  // for bitwise | operator, including std::bitset
316
+#if (defined _MSC_VER) && (defined _M_ARM || defined _M_ARM64 || defined _M_ARM64EC)
317
+  if (IsNegative()) {
318
+    return -o.f;
319
+  }
320
+#else
321
+  // original code:
322
+  o.u |= (val & 0x8000U) << 16U;  // sign bit
323
+#endif
324
+  return o.f;
325
+}
326
+
327
+/// Shared implementation between public and internal classes. CRTP pattern.
328
+template <class Derived>
329
+struct BFloat16Impl {
330
+ protected:
331
+  /// <summary>
332
+  /// Converts from float to uint16_t float16 representation
333
+  /// </summary>
334
+  /// <param name="v"></param>
335
+  /// <returns></returns>
336
+  static uint16_t ToUint16Impl(float v) noexcept;
337
+
338
+  /// <summary>
339
+  /// Converts bfloat16 to float
340
+  /// </summary>
341
+  /// <returns>float representation of bfloat16 value</returns>
342
+  float ToFloatImpl() const noexcept;
343
+
344
+  /// <summary>
345
+  /// Creates an instance that represents absolute value.
346
+  /// </summary>
347
+  /// <returns>Absolute value</returns>
348
+  uint16_t AbsImpl() const noexcept {
349
+    return static_cast<uint16_t>(val & ~kSignMask);
350
+  }
351
+
352
+  /// <summary>
353
+  /// Creates a new instance with the sign flipped.
354
+  /// </summary>
355
+  /// <returns>Flipped sign instance</returns>
356
+  uint16_t NegateImpl() const noexcept {
357
+    return IsNaN() ? val : static_cast<uint16_t>(val ^ kSignMask);
358
+  }
359
+
360
+ public:
361
+  // uint16_t special values
362
+  static constexpr uint16_t kSignMask = 0x8000U;
363
+  static constexpr uint16_t kBiasedExponentMask = 0x7F80U;
364
+  static constexpr uint16_t kPositiveInfinityBits = 0x7F80U;
365
+  static constexpr uint16_t kNegativeInfinityBits = 0xFF80U;
366
+  static constexpr uint16_t kPositiveQNaNBits = 0x7FC1U;
367
+  static constexpr uint16_t kNegativeQNaNBits = 0xFFC1U;
368
+  static constexpr uint16_t kSignaling_NaNBits = 0x7F80U;
369
+  static constexpr uint16_t kEpsilonBits = 0x0080U;
370
+  static constexpr uint16_t kMinValueBits = 0xFF7FU;
371
+  static constexpr uint16_t kMaxValueBits = 0x7F7FU;
372
+  static constexpr uint16_t kRoundToNearest = 0x7FFFU;
373
+  static constexpr uint16_t kOneBits = 0x3F80U;
374
+  static constexpr uint16_t kMinusOneBits = 0xBF80U;
375
+
376
+  uint16_t val{0};
377
+
378
+  BFloat16Impl() = default;
379
+
380
+  /// <summary>
381
+  /// Checks if the value is negative
382
+  /// </summary>
383
+  /// <returns>true if negative</returns>
384
+  bool IsNegative() const noexcept {
385
+    return static_cast<int16_t>(val) < 0;
386
+  }
387
+
388
+  /// <summary>
389
+  /// Tests if the value is NaN
390
+  /// </summary>
391
+  /// <returns>true if NaN</returns>
392
+  bool IsNaN() const noexcept {
393
+    return AbsImpl() > kPositiveInfinityBits;
394
+  }
395
+
396
+  /// <summary>
397
+  /// Tests if the value is finite
398
+  /// </summary>
399
+  /// <returns>true if finite</returns>
400
+  bool IsFinite() const noexcept {
401
+    return AbsImpl() < kPositiveInfinityBits;
402
+  }
403
+
404
+  /// <summary>
405
+  /// Tests if the value represents positive infinity.
406
+  /// </summary>
407
+  /// <returns>true if positive infinity</returns>
408
+  bool IsPositiveInfinity() const noexcept {
409
+    return val == kPositiveInfinityBits;
410
+  }
411
+
412
+  /// <summary>
413
+  /// Tests if the value represents negative infinity
414
+  /// </summary>
415
+  /// <returns>true if negative infinity</returns>
416
+  bool IsNegativeInfinity() const noexcept {
417
+    return val == kNegativeInfinityBits;
418
+  }
419
+
420
+  /// <summary>
421
+  /// Tests if the value is either positive or negative infinity.
422
+  /// </summary>
423
+  /// <returns>True if absolute value is infinity</returns>
424
+  bool IsInfinity() const noexcept {
425
+    return AbsImpl() == kPositiveInfinityBits;
426
+  }
427
+
428
+  /// <summary>
429
+  /// Tests if the value is NaN or zero. Useful for comparisons.
430
+  /// </summary>
431
+  /// <returns>True if NaN or zero.</returns>
432
+  bool IsNaNOrZero() const noexcept {
433
+    auto abs = AbsImpl();
434
+    return (abs == 0 || abs > kPositiveInfinityBits);
435
+  }
436
+
437
+  /// <summary>
438
+  /// Tests if the value is normal (not zero, subnormal, infinite, or NaN).
439
+  /// </summary>
440
+  /// <returns>True if so</returns>
441
+  bool IsNormal() const noexcept {
442
+    auto abs = AbsImpl();
443
+    return (abs < kPositiveInfinityBits)           // is finite
444
+           && (abs != 0)                           // is not zero
445
+           && ((abs & kBiasedExponentMask) != 0);  // is not subnormal (has a non-zero exponent)
446
+  }
447
+
448
+  /// <summary>
449
+  /// Tests if the value is subnormal (denormal).
450
+  /// </summary>
451
+  /// <returns>True if so</returns>
452
+  bool IsSubnormal() const noexcept {
453
+    auto abs = AbsImpl();
454
+    return (abs < kPositiveInfinityBits)           // is finite
455
+           && (abs != 0)                           // is not zero
456
+           && ((abs & kBiasedExponentMask) == 0);  // is subnormal (has a zero exponent)
457
+  }
458
+
459
+  /// <summary>
460
+  /// Creates an instance that represents absolute value.
461
+  /// </summary>
462
+  /// <returns>Absolute value</returns>
463
+  Derived Abs() const noexcept { return Derived::FromBits(AbsImpl()); }
464
+
465
+  /// <summary>
466
+  /// Creates a new instance with the sign flipped.
467
+  /// </summary>
468
+  /// <returns>Flipped sign instance</returns>
469
+  Derived Negate() const noexcept { return Derived::FromBits(NegateImpl()); }
470
+
471
+  /// <summary>
472
+  /// IEEE defines that positive and negative zero are equal, this gives us a quick equality check
473
+  /// for two values by or'ing the private bits together and stripping the sign. They are both zero,
474
+  /// and therefore equivalent, if the resulting value is still zero.
475
+  /// </summary>
476
+  /// <param name="lhs">first value</param>
477
+  /// <param name="rhs">second value</param>
478
+  /// <returns>True if both arguments represent zero</returns>
479
+  static bool AreZero(const BFloat16Impl& lhs, const BFloat16Impl& rhs) noexcept {
480
+    // IEEE defines that positive and negative zero are equal, this gives us a quick equality check
481
+    // for two values by or'ing the private bits together and stripping the sign. They are both zero,
482
+    // and therefore equivalent, if the resulting value is still zero.
483
+    return static_cast<uint16_t>((lhs.val | rhs.val) & ~kSignMask) == 0;
484
+  }
485
+};
486
+
487
+template <class Derived>
488
+inline uint16_t BFloat16Impl<Derived>::ToUint16Impl(float v) noexcept {
489
+  uint16_t result;
490
+  if (std::isnan(v)) {
491
+    result = kPositiveQNaNBits;
492
+  } else {
493
+    auto get_msb_half = (float fl) {
494
+      uint16_t result;
495
+#ifdef __cpp_if_constexpr
496
+      if constexpr (detail::endian::native == detail::endian::little) {
497
+#else
498
+      if (detail::endian::native == detail::endian::little) {
499
+#endif
500
+        std::memcpy(&result, reinterpret_cast<char*>(&fl) + sizeof(uint16_t), sizeof(uint16_t));
501
+      } else {
502
+        std::memcpy(&result, &fl, sizeof(uint16_t));
503
+      }
504
+      return result;
505
+    };
506
+
507
+    uint16_t upper_bits = get_msb_half(v);
508
+    union {
509
+      uint32_t U32;
510
+      float F32;
511
+    };
512
+    F32 = v;
513
+    U32 += (upper_bits & 1) + kRoundToNearest;
514
+    result = get_msb_half(F32);
515
+  }
516
+  return result;
517
+}
518
+
519
+template <class Derived>
520
+inline float BFloat16Impl<Derived>::ToFloatImpl() const noexcept {
521
+  if (IsNaN()) {
522
+    return std::numeric_limits<float>::quiet_NaN();
523
+  }
524
+  float result;
525
+  char* const first = reinterpret_cast<char*>(&result);
526
+  char* const second = first + sizeof(uint16_t);
527
+#ifdef __cpp_if_constexpr
528
+  if constexpr (detail::endian::native == detail::endian::little) {
529
+#else
530
+  if (detail::endian::native == detail::endian::little) {
531
+#endif
532
+    std::memset(first, 0, sizeof(uint16_t));
533
+    std::memcpy(second, &val, sizeof(uint16_t));
534
+  } else {
535
+    std::memcpy(first, &val, sizeof(uint16_t));
536
+    std::memset(second, 0, sizeof(uint16_t));
537
+  }
538
+  return result;
539
+}
540
+
541
+}  // namespace onnxruntime_float16
542
onnxruntime-linux-x64-gpu-1.15.1.tgz/include/onnxruntime_session_options_config_keys.h -> onnxruntime-linux-x64-gpu-1.17.1.tgz/include/onnxruntime_session_options_config_keys.h Changed
97
 
1
@@ -67,20 +67,30 @@
2
 // GeluApproximation has side effects which may change the inference results. It is disabled by default due to this.
3
 static const char* const kOrtSessionOptionsEnableGeluApproximation = "optimization.enable_gelu_approximation";
4
 
5
+// This setting controls whether to enable AheadOfTime function inlining.
6
+// AOT function inlining examines the graph and attempts to inline as many locally defined functions in the model
7
+// as possible with the help of enabled execution providers.
8
+// This can reduce the number of function calls and improve performance because it is done before
9
+// Level1 optimizers and constant folding. However, under some circumstances, when the EPs are not available,
10
+// one can disable the AOT inlining, produce an optimized model and postpone AOT until run time.
11
+// "0": enable; "1": disable.
12
+// Its default value is "0".
13
+static const char* const kOrtSessionOptionsDisableAheadOfTimeFunctionInlining = "session.disable_aot_function_inlining";
14
+
15
 #ifdef ENABLE_TRAINING
16
 // Specifies a list of op types for memory footprint reduction.
17
 // The value should be a ","-delimited list of pair of
18
-// <subgraph string : optimization strategy : number of subgraph to apply>.
19
+// <subgraph string: optimization strategy: number of subgraph to apply>.
20
 // For example, "Gelu+Cast+:1:0,Dropout+:1:1".
21
 //   A valid "subgraph string" should be one subgraph representation output by ORT graph transformations.
22
 //   "optimization strategy" currently has valid values: 0 - disabled, 1 - recompute.
23
 //   "number of subgraph to apply" is used to control how many subgraphs to apply optimization, to avoid "oversaving"
24
 //   the memory.
25
-static const char* const kOrtSessionOptionsMemoryOptimizerEnabler = "optimization.enable_memory_optimizer";
26
+static const char* const kOrtSessionOptionsMemoryOptimizerEnabler = "optimization.memory_optimizer_config";
27
 
28
-// Specifies the level for detecting subgraphs for memory footprint reduction.
29
-// The value should be an integer. The default value is 0.
30
-static const char* const kOrtSessionOptionsMemoryOptimizerProbeLevel = "optimization.enable_memory_probe_recompute_level";
31
+// Specifies the config for detecting subgraphs for memory footprint reduction.
32
+// The value should be a string contains int separated using commas. The default value is "0:0".
33
+static const char* const kOrtSessionOptionsMemoryOptimizerProbeConfig = "optimization.enable_memory_probe_recompute_config";
34
 #endif
35
 
36
 // Enable or disable using device allocator for allocating initialized tensor memory. "1": enable; "0": disable. The default is "0".
37
@@ -165,6 +175,11 @@
38
 // May be useful to expose bugs in models.
39
 static const char* const kOrtSessionOptionsConfigStrictShapeTypeInference = "session.strict_shape_type_inference";
40
 
41
+// "1": every model using a more recent opset than the latest released one will fail
42
+// "0": the model may or may not work if onnxruntime cannot find an implementation, this option
43
+// is used for development purpose.
44
+static const char* const kOrtSessionOptionsConfigStrictAllowReleasedOpsetsOnly = "session.allow_released_opsets_only";
45
+
46
 // The file saves configuration for partitioning node among logic streams
47
 static const char* const kNodePartitionConfigFile = "session.node_partition_config_file";
48
 
49
@@ -197,3 +212,47 @@
50
 //   3) after the L1 transformers are applied to the updated graph.
51
 // The model will be saved to filename post_layout_transform_step_<step_number>.onnx.
52
 static const char* const kDebugLayoutTransformation = "session.debug_layout_transformation";
53
+
54
+// Graph nodes that are not supported by the execution providers (EPs) explicitly added to the session are
55
+// assigned (i.e., "fallback") to the CPU EP by default.
56
+//
57
+// This option allows the user to disable the fallback of unsupported graph nodes to the CPU EP.
58
+// If this option is set to "1", session creation will fail if the execution providers other than the CPU EP cannot
59
+// fully support all of the nodes in the graph.
60
+//
61
+// It is invalid to set this option and explicitly add the CPU EP to the session. In this case, session creation
62
+// will also fail with an error.
63
+//
64
+// Option values:
65
+// - "0": CPU EP fallback is not disabled. DEFAULT
66
+// - "1": CPU EP fallback is disabled.
67
+static const char* const kOrtSessionOptionsDisableCPUEPFallback = "session.disable_cpu_ep_fallback";
68
+
69
+// Use this config when serializing a large model after optimization to specify an external initializers file
70
+static const char* const kOrtSessionOptionsOptimizedModelExternalInitializersFileName =
71
+    "session.optimized_model_external_initializers_file_name";
72
+
73
+// Use this config to control the minimum size of the initializer when externalizing it during serialization
74
+static const char* const kOrtSessionOptionsOptimizedModelExternalInitializersMinSizeInBytes =
75
+    "session.optimized_model_external_initializers_min_size_in_bytes";
76
+
77
+// Enable EP context feature to dump the partitioned graph which includes the EP context into Onnx file.
78
+// The dumped Onnx model with EP context can be used for future inference to avoid the EP graph partitioning/compile overhead.
79
+// "0": disable. (default)
80
+// "1": enable.
81
+static const char* const kOrtSessionOptionEpContextEnable = "ep.context_enable";
82
+
83
+// Specify the file path for the Onnx model which has EP context.
84
+// Default to original_file_name_ctx.onnx if not specified
85
+static const char* const kOrtSessionOptionEpContextFilePath = "ep.context_file_path";
86
+
87
+// Flag to specify whether to dump the EP context into the Onnx model.
88
+// "0": dump the EP context into separate file, keep the file name in the Onnx model.
89
+// "1": dump the EP context into the Onnx model. (default).
90
+static const char* const kOrtSessionOptionEpContextEmbedMode = "ep.context_embed_mode";
91
+
92
+// Gemm fastmath mode provides fp32 gemm acceleration with bfloat16 based matmul.
93
+// Option values:
94
+// - "0": Gemm FastMath mode is not enabled. DEFAULT
95
+// - "1": Gemm FastMath mode is enabled.
96
+static const char* const kOrtSessionOptionsMlasGemmFastMathArm64Bfloat16 = "mlas.enable_gemm_fastmath_arm64_bfloat16";
97
onnxruntime-linux-x64-gpu-1.15.1.tgz/include/onnxruntime_training_c_api.h -> onnxruntime-linux-x64-gpu-1.17.1.tgz/include/onnxruntime_training_c_api.h Changed
200
 
1
@@ -13,7 +13,7 @@
2
  *
3
  * In order to train a model with onnxruntime, the following training artifacts must be generated:
4
  * - The training onnx model
5
- * - The checkpoint directory
6
+ * - The checkpoint file
7
  * - The optimizer onnx model
8
  * - The eval onnx model model (optional)
9
  *
10
@@ -123,9 +123,9 @@
11
   /// \name Accessing The Training Session State
12
   /// @{
13
 
14
-  /** \brief Load a checkpoint state from directory on disk into checkpoint_state.
15
+  /** \brief Load a checkpoint state from a file on disk into checkpoint_state.
16
    *
17
-   * This function will parse a checkpoint directory, pull relevant files and load the training
18
+   * This function will parse a checkpoint file, pull relevant data and load the training
19
    * state into the checkpoint_state. This checkpoint state can then be used to create the
20
    * training session by invoking OrtTrainingApi::CreateTrainingSession. By doing so, the training
21
    * session will resume training from the given checkpoint state.
22
@@ -133,7 +133,7 @@
23
    * training state (including model parameters, its gradients, the optimizer states and the properties).
24
    * As a result, it is required that the checkpoint state outlive the lifetime of the training session.
25
    *
26
-   * \paramin checkpoint_path Path to the checkpoint directory
27
+   * \paramin checkpoint_path Path to the checkpoint file
28
    * \paramout checkpoint_state Checkpoint state that contains the states of the training session.
29
    *
30
    * \snippet{doc} snippets.dox OrtStatus Return Value
31
@@ -142,14 +142,14 @@
32
   ORT_API2_STATUS(LoadCheckpoint, _In_ const ORTCHAR_T* checkpoint_path,
33
                   _Outptr_ OrtCheckpointState** checkpoint_state);
34
 
35
-  /** \brief Save the given state to a checkpoint directory on disk.
36
+  /** \brief Save the given state to a checkpoint file on disk.
37
    *
38
-   * This function serializes the provided checkpoint state to a directory on disk.
39
+   * This function serializes the provided checkpoint state to a file on disk.
40
    * This checkpoint can later be loaded by invoking OrtTrainingApi::LoadCheckpoint to resume
41
    * training from this snapshot of the state.
42
    *
43
    * \paramin checkpoint_state The checkpoint state to save.
44
-   * \paramin checkpoint_path Path to the checkpoint directory.
45
+   * \paramin checkpoint_path Path to the checkpoint file.
46
    * \paramin include_optimizer_state Flag to indicate whether to save the optimizer state or not.
47
    *
48
    * \snippet{doc} snippets.dox OrtStatus Return Value
49
@@ -172,7 +172,7 @@
50
    * - The training onnx model
51
    * - The evaluation onnx model (optional)
52
    * - The optimizer onnx model
53
-   * - The checkpoint directory
54
+   * - The checkpoint file
55
    *
56
    * These artifacts can be generated using the `onnxruntime-training` python utility(https://github.com/microsoft/onnxruntime/blob/main/orttraining/orttraining/python/training/onnxblock/README.md).
57
    *
58
@@ -190,7 +190,29 @@
59
   ORT_API2_STATUS(CreateTrainingSession, _In_ const OrtEnv* env, _In_ const OrtSessionOptions* options,
60
                   _Inout_ OrtCheckpointState* checkpoint_state, _In_ const ORTCHAR_T* train_model_path,
61
                   _In_ const ORTCHAR_T* eval_model_path, _In_ const ORTCHAR_T* optimizer_model_path,
62
-                  _Outptr_ OrtTrainingSession** out);
63
+                  _Outptr_result_maybenull_ OrtTrainingSession** out);
64
+
65
+  /** \brief Create a training session that can be used to begin or resume training.
66
+   * This api provides a way to load all the training artifacts from buffers instead of files.
67
+   *
68
+   * \paramin env Environment to be used for the training session.
69
+   * \paramin options Session options that the user can customize for this training session.
70
+   * \paramin checkpoint_state Training states that the training session uses as a starting point for training.
71
+   * \paramin train_model_data Buffer containing the model data to be used to perform training
72
+   * \paramin train_data_length Length of the buffer containing train_model_data
73
+   * \paramin eval_model_data Buffer containing the model data to be used to perform evaluation
74
+   * \paramin eval_data_length Length of the buffer containing eval_model_data
75
+   * \paramin optim_model_data Buffer containing the model data to be used to perform weight update
76
+   * \paramin optim_data_length Length of the buffer containing optim_model_data
77
+   * \paramout out Created training session.
78
+   *
79
+   */
80
+  ORT_API2_STATUS(CreateTrainingSessionFromBuffer, _In_ const OrtEnv* env,
81
+                  _In_ const OrtSessionOptions* options, _Inout_ OrtCheckpointState* checkpoint_state,
82
+                  _In_ const void* train_model_data, size_t train_data_length,
83
+                  _In_ const void* eval_model_data, size_t eval_data_length,
84
+                  _In_ const void* optim_model_data, size_t optim_data_length,
85
+                  _Outptr_result_maybenull_ OrtTrainingSession** out);
86
 
87
   /// @}
88
 
89
@@ -586,14 +608,14 @@
90
   /// \name Accessing The Training Session State
91
   /// @{
92
 
93
-  /** \brief Adds the given property to the checkpoint state.
94
+  /** \brief Adds or updates the given property to/in the checkpoint state.
95
    *
96
    * Runtime properties such as epoch, training step, best score, and others can be added to the checkpoint
97
-   * state by the user if they desire by calling this function with the appropriate property name and
98
-   * value. The given property name must be unique to be able to successfully add the property.
99
+   * state by the user by calling this function with the corresponding property name and value.
100
+   * The given property name must be unique to be able to successfully add the property.
101
    *
102
    * \paramin checkpoint_state The checkpoint state which should hold the property.
103
-   * \paramin property_name Unique name of the property being added.
104
+   * \paramin property_name Name of the property being added or updated.
105
    * \paramin property_type Type of the property associated with the given name.
106
    * \paramin property_value Property value associated with the given name.
107
    *
108
@@ -610,7 +632,7 @@
109
    * exist in the checkpoint state to be able to retrieve it successfully.
110
    *
111
    * \paramin checkpoint_state The checkpoint state that is currently holding the property.
112
-   * \paramin property_name Unique name of the property being retrieved.
113
+   * \paramin property_name Name of the property being retrieved.
114
    * \paramin allocator Allocator used to allocate the memory for the property_value.
115
    * \paramout property_type Type of the property associated with the given name.
116
    * \paramout property_value Property value associated with the given name.
117
@@ -623,6 +645,82 @@
118
                   _Out_ enum OrtPropertyType* property_type, _Outptr_ void** property_value);
119
 
120
   /// @}
121
+
122
+  /// \name Accessing The Training Session State
123
+  /// @{
124
+
125
+  /** \brief Load a checkpoint state from a buffer into checkpoint_state.
126
+   *
127
+   * This function will parse a checkpoint bytes buffer, pull relevant data and load the training
128
+   * state into the checkpoint_state. This checkpoint state can then be used to create the
129
+   * training session by invoking OrtTrainingApi::CreateTrainingSession. By doing so, the training
130
+   * session will resume training from the given checkpoint state.
131
+   * \note Note that the training session created with a checkpoint state uses this state to store the entire
132
+   * training state (including model parameters, its gradients, the optimizer states and the properties).
133
+   * As a result, it is required that the checkpoint state outlive the lifetime of the training session.
134
+   *
135
+   * \paramin checkpoint_buffer Path to the checkpoint bytes buffer.
136
+   * \paramin num_bytes Number of bytes in the checkpoint buffer.
137
+   * \paramout checkpoint_state Checkpoint state that contains the states of the training session.
138
+   *
139
+   * \snippet{doc} snippets.dox OrtStatus Return Value
140
+   *
141
+   */
142
+  ORT_API2_STATUS(LoadCheckpointFromBuffer, _In_ const void* checkpoint_buffer,
143
+                  _In_ const size_t num_bytes, _Outptr_ OrtCheckpointState** checkpoint_state);
144
+
145
+  /** \brief Retrieves the type and shape information of the parameter associated with the given parameter name.
146
+   *
147
+   * This function retrieves the type and shape of the parameter associated with the given parameter name.
148
+   * The parameter must exist in the checkpoint state to be able to retrieve its type and shape information successfully.
149
+   *
150
+   * \paramin checkpoint_state The checkpoint state.
151
+   * \paramin parameter_name Name of the parameter being retrieved.
152
+   * \paramout parameter_type_and_shape The type and shape of the parameter being retrieved.
153
+   *
154
+   * \snippet{doc} snippets.dox OrtStatus Return Value
155
+   *
156
+   */
157
+  ORT_API2_STATUS(GetParameterTypeAndShape, _In_ const OrtCheckpointState* checkpoint_state,
158
+                  _In_ const char* parameter_name, _Outptr_ OrtTensorTypeAndShapeInfo** parameter_type_and_shape);
159
+
160
+  /** \brief Updates the data associated with the model parameter in the checkpoint state for the given parameter name.
161
+   *
162
+   * This function updates a model parameter in the checkpoint state with the given parameter data.
163
+   * The training session must be already created with the checkpoint state that contains the parameter
164
+   * being updated. The given parameter is copied over to the registered device for the training session.
165
+   * The parameter must exist in the checkpoint state to be able to update it successfully.
166
+   *
167
+   * \paramin checkpoint_state The checkpoint state.
168
+   * \paramin parameter_name Name of the parameter being updated.
169
+   * \paramin parameter The parameter data that should replace the existing parameter data.
170
+   *
171
+   * \snippet{doc} snippets.dox OrtStatus Return Value
172
+   *
173
+   */
174
+  ORT_API2_STATUS(UpdateParameter, _Inout_ OrtCheckpointState* checkpoint_state,
175
+                  _In_ const char* parameter_name, _In_ OrtValue* parameter);
176
+
177
+  /** \brief Gets the data associated with the model parameter from the checkpoint state for the given parameter name.
178
+   *
179
+   * This function retrieves the model parameter data from the checkpoint state for the given parameter name.
180
+   * The parameter is copied over and returned as an OrtValue. The training session must be already created
181
+   * with the checkpoint state that contains the parameter being retrieved.
182
+   * The parameter must exist in the checkpoint state to be able to retrieve it successfully.
183
+   *
184
+   * \paramin checkpoint_state The checkpoint state.
185
+   * \paramin parameter_name Name of the parameter being retrieved.
186
+   * \paramin allocator Allocator used to allocate the memory for the parameter.
187
+   * \paramout parameter The parameter data that is retrieved from the checkpoint state.
188
+   *
189
+   * \snippet{doc} snippets.dox OrtStatus Return Value
190
+   *
191
+   */
192
+  ORT_API2_STATUS(GetParameter, _In_ const OrtCheckpointState* checkpoint_state,
193
+                  _In_ const char* parameter_name, _Inout_ OrtAllocator* allocator,
194
+                  _Outptr_ OrtValue** parameter);
195
+
196
+  /// @}
197
 };
198
 
199
 typedef struct OrtTrainingApi OrtTrainingApi;
200
onnxruntime-linux-x64-gpu-1.15.1.tgz/include/onnxruntime_training_cxx_api.h -> onnxruntime-linux-x64-gpu-1.17.1.tgz/include/onnxruntime_training_cxx_api.h Changed
144
 
1
@@ -71,27 +71,40 @@
2
   /// \name Accessing The Training Session State
3
   /// @{
4
 
5
-  /** \brief Load a checkpoint state from directory on disk into checkpoint_state.
6
+  /** \brief Load a checkpoint state from a file on disk into checkpoint_state.
7
    *
8
-   * This function will parse a checkpoint directory, pull relevant files and load the training
9
+   * This function will parse a checkpoint file, pull relevant data and load the training
10
    * state and return an instance of Ort::CheckpointState. This checkpoint state can then be used to create the
11
    * training session by instantiating Ort::TrainingSession. By doing so, the training session will resume
12
    * training from the given checkpoint state.
13
    *
14
-   * \paramin path_to_checkpoint Path to the checkpoint directory
15
+   * \paramin path_to_checkpoint Path to the checkpoint file
16
    * \return Ort::CheckpointState object which holds the state of the training session parameters.
17
    *
18
    */
19
   static CheckpointState LoadCheckpoint(const std::basic_string<ORTCHAR_T>& path_to_checkpoint);
20
 
21
-  /** \brief Save the given state to a checkpoint directory on disk.
22
+  /** \brief Load a checkpoint state from a buffer.
23
    *
24
-   * This function serializes the provided checkpoint state to a directory on disk.
25
+   * This function will parse a checkpoint buffer, pull relevant data and load the training
26
+   * state and return an instance of Ort::CheckpointState. This checkpoint state can then be used to create the
27
+   * training session by instantiating Ort::TrainingSession. By doing so, the training session will resume
28
+   * training from the given checkpoint state.
29
+   *
30
+   * \paramin buffer Buffer containing the checkpoint data.
31
+   * \return Ort::CheckpointState object which holds the state of the training session parameters.
32
+   *
33
+   */
34
+  static CheckpointState LoadCheckpointFromBuffer(const std::vector<uint8_t>& buffer);
35
+
36
+  /** \brief Save the given state to a checkpoint file on disk.
37
+   *
38
+   * This function serializes the provided checkpoint state to a file on disk.
39
    * This checkpoint can later be loaded by invoking Ort::CheckpointState::LoadCheckpoint to resume
40
    * training from this snapshot of the state.
41
    *
42
    * \paramin checkpoint_state The checkpoint state to save.
43
-   * \paramin path_to_checkpoint Path to the checkpoint directory.
44
+   * \paramin path_to_checkpoint Path to the checkpoint file.
45
    * \paramin include_optimizer_state Flag to indicate whether to save the optimizer state or not.
46
    *
47
    */
48
@@ -99,13 +112,13 @@
49
                              const std::basic_string<ORTCHAR_T>& path_to_checkpoint,
50
                              const bool include_optimizer_state = false);
51
 
52
-  /** \brief Adds the given property to the checkpoint state.
53
+  /** \brief Adds or updates the given property to/in the checkpoint state.
54
    *
55
    * Runtime properties such as epoch, training step, best score, and others can be added to the checkpoint
56
-   * state by the user if they desire by calling this function with the appropriate property name and
57
-   * value. The given property name must be unique to be able to successfully add the property.
58
+   * state by the user by calling this function with the corresponding property name and value.
59
+   * The given property name must be unique to be able to successfully add the property.
60
    *
61
-   * \paramin property_name Unique name of the property being added.
62
+   * \paramin property_name Name of the property being added or updated.
63
    * \paramin property_value Property value associated with the given name.
64
    *
65
    */
66
@@ -116,12 +129,38 @@
67
    * Gets the property value from an existing entry in the checkpoint state. The property must
68
    * exist in the checkpoint state to be able to retrieve it successfully.
69
    *
70
-   * \paramin property_name Unique name of the property being retrieved.
71
+   * \paramin property_name Name of the property being retrieved.
72
    * \return Property value associated with the given property name.
73
    *
74
    */
75
   Property GetProperty(const std::string& property_name);
76
 
77
+  /** \brief Updates the data associated with the model parameter in the checkpoint state for the given parameter name.
78
+   *
79
+   * This function updates a model parameter in the checkpoint state with the given parameter data.
80
+   * The training session must be already created with the checkpoint state that contains the parameter
81
+   * being updated. The given parameter is copied over to the registered device for the training session.
82
+   * The parameter must exist in the checkpoint state to be able to update it successfully.
83
+   *
84
+   * \paramin parameter_name Name of the parameter being updated.
85
+   * \paramin parameter The parameter data that should replace the existing parameter data.
86
+   *
87
+   */
88
+  void UpdateParameter(const std::string& parameter_name, const Value& parameter);
89
+
90
+  /** \brief Gets the data associated with the model parameter from the checkpoint state for the given parameter name.
91
+   *
92
+   * This function retrieves the model parameter data from the checkpoint state for the given parameter name.
93
+   * The parameter is copied over to the provided OrtValue. The training session must be already created
94
+   * with the checkpoint state that contains the parameter being retrieved.
95
+   * The parameter must exist in the checkpoint state to be able to retrieve it successfully.
96
+   *
97
+   * \paramin parameter_name Name of the parameter being retrieved.
98
+   * \return The parameter data that is retrieved from the checkpoint state.
99
+   *
100
+   */
101
+  Value GetParameter(const std::string& parameter_name);
102
+
103
   /// @}
104
 };
105
 
106
@@ -131,7 +170,7 @@
107
  * - The training onnx model
108
  * - The evaluation onnx model (optional)
109
  * - The optimizer onnx model
110
- * - The checkpoint directory
111
+ * - The checkpoint file
112
  *
113
  * These artifacts can be generated using the `onnxruntime-training` python utility(https://github.com/microsoft/onnxruntime/blob/main/orttraining/orttraining/python/training/onnxblock/README.md).
114
  *
115
@@ -163,6 +202,20 @@
116
                   const std::optional<std::basic_string<ORTCHAR_T>>& eval_model_path = std::nullopt,
117
                   const std::optional<std::basic_string<ORTCHAR_T>>& optimizer_model_path = std::nullopt);
118
 
119
+  /** \brief Create a training session that can be used to begin or resume training.
120
+   * This constructor allows the users to load the models from buffers instead of files.
121
+   *
122
+   * \paramin env Env to be used for the training session.
123
+   * \paramin session_options SessionOptions that the user can customize for this training session.
124
+   * \paramin checkpoint_state Training states that the training session uses as a starting point for training.
125
+   * \paramin train_model_data Buffer containing training model data.
126
+   * \paramin eval_model_data Buffer containing evaluation model data.
127
+   * \paramin optim_model_data Buffer containing optimizer model (used for performing weight/parameter update).
128
+   *
129
+   */
130
+  TrainingSession(const Env& env, const SessionOptions& session_options, CheckpointState& checkpoint_state,
131
+                  const std::vector<uint8_t>& train_model_data, const std::vector<uint8_t>& eval_model_data = {},
132
+                  const std::vector<uint8_t>& optim_model_data = {});
133
   /// @}
134
 
135
   /// \name Implementing The Training Loop
136
@@ -181,7 +234,6 @@
137
    * \paramin input_values The user inputs to the training model.
138
    * \return A std::vector of Ort::Value objects that represents the output of the forward pass of the training model.
139
    *
140
-   * \snippet{doc} snippets.dox OrtStatus Return Value
141
    *
142
    */
143
   std::vector<Value> TrainStep(const std::vector<Value>& input_values);
144
onnxruntime-linux-x64-gpu-1.15.1.tgz/include/onnxruntime_training_cxx_inline.h -> onnxruntime-linux-x64-gpu-1.17.1.tgz/include/onnxruntime_training_cxx_inline.h Changed
80
 
1
@@ -24,6 +24,23 @@
2
   ThrowOnError(GetTrainingApi().TrainingSessionGetEvalModelOutputCount(p_, &eval_model_output_count_));
3
 }
4
 
5
+inline TrainingSession::TrainingSession(const Env& env, const SessionOptions& session_options,
6
+                                        CheckpointState& checkpoint_state,
7
+                                        const std::vector<uint8_t>& train_model_data,
8
+                                        const std::vector<uint8_t>& eval_model_data,
9
+                                        const std::vector<uint8_t>& optim_model_data) {
10
+  ThrowOnError(GetTrainingApi().CreateTrainingSessionFromBuffer(
11
+      env, session_options, checkpoint_state,
12
+      train_model_data.data(), train_model_data.size(),
13
+      eval_model_data.data(), eval_model_data.size(),
14
+      optim_model_data.data(), optim_model_data.size(),
15
+      &p_));
16
+
17
+  ThrowOnError(GetTrainingApi().TrainingSessionGetTrainingModelOutputCount(p_, &training_model_output_count_));
18
+
19
+  ThrowOnError(GetTrainingApi().TrainingSessionGetEvalModelOutputCount(p_, &eval_model_output_count_));
20
+}
21
+
22
 inline std::vector<Value> TrainingSession::TrainStep(const std::vector<Value>& input_values) {
23
   std::vector<Value> output_values;
24
   output_values.reserve(training_model_output_count_);
25
@@ -51,7 +68,7 @@
26
   RunOptions run_options;
27
   ThrowOnError(GetTrainingApi().EvalStep(
28
       p_, run_options, input_values.size(), ort_input_values,
29
-      training_model_output_count_, ort_output_values));
30
+      eval_model_output_count_, ort_output_values));
31
 
32
   return output_values;
33
 }
34
@@ -175,6 +192,12 @@
35
   return CheckpointState(checkpoint_state);
36
 }
37
 
38
+inline CheckpointState CheckpointState::LoadCheckpointFromBuffer(const std::vector<uint8_t>& buffer) {
39
+  OrtCheckpointState* checkpoint_state;
40
+  ThrowOnError(GetTrainingApi().LoadCheckpointFromBuffer(buffer.data(), buffer.size(), &checkpoint_state));
41
+  return CheckpointState(checkpoint_state);
42
+}
43
+
44
 inline void CheckpointState::SaveCheckpoint(const CheckpointState& checkpoint_states,
45
                                             const std::basic_string<ORTCHAR_T>& path_to_checkpoint,
46
                                             const bool include_optimizer_state) {
47
@@ -208,9 +231,12 @@
48
     ThrowOnError(GetTrainingApi().AddProperty(p_, property_name.c_str(), OrtPropertyType::OrtFloatProperty, value_p));
49
   } else if (std::holds_alternative<std::string>(property_value)) {
50
     std::string value = std::get<std::string>(property_value);
51
-    auto buffer = std::make_unique<char>(value.length() + 1).release();
52
-    memcpy(buffer, value.c_str(), value.length());
53
-    ThrowOnError(GetTrainingApi().AddProperty(p_, property_name.c_str(), OrtPropertyType::OrtStringProperty, buffer));
54
+    auto buffer = std::make_unique<char>(value.length() + 1);
55
+    memcpy(buffer.get(), value.c_str(), value.length());
56
+    // AddProperty takes a char* and calls PropertyBag::AddProperty which takes a std::string. The data will be
57
+    // copied at that point so buffer can free the local allocation once the call is made.
58
+    ThrowOnError(GetTrainingApi().AddProperty(p_, property_name.c_str(), OrtPropertyType::OrtStringProperty,
59
+                                              buffer.get()));
60
   } else {
61
     ThrowStatus(Status("Unknown property type received.", OrtErrorCode::ORT_INVALID_ARGUMENT));
62
   }
63
@@ -253,4 +279,16 @@
64
   return property;
65
 }
66
 
67
+inline void CheckpointState::UpdateParameter(const std::string& parameter_name, const Value& parameter) {
68
+  ThrowOnError(GetTrainingApi().UpdateParameter(p_, parameter_name.c_str(), parameter));
69
+}
70
+
71
+inline Value CheckpointState::GetParameter(const std::string& parameter_name) {
72
+  AllocatorWithDefaultOptions allocator;
73
+  OrtValue* parameter;
74
+  ThrowOnError(GetTrainingApi().GetParameter(p_, parameter_name.c_str(), allocator, &parameter));
75
+
76
+  return Value{parameter};
77
+}
78
+
79
 }  // namespace Ort
80
onnxruntime-linux-x64-gpu-1.15.1.tgz/lib/libonnxruntime.so -> onnxruntime-linux-x64-gpu-1.17.1.tgz/lib/libonnxruntime.so Changed
3
 
1
-(symlink to libonnxruntime.so.1.15.1)
2
+(symlink to libonnxruntime.so.1.17.1)
3
onnxruntime-linux-x64-gpu-1.17.1.tgz/lib/libonnxruntime.so.1.17.1 Added
onnxruntime-linux-x64-gpu-1.15.1.tgz/lib/libonnxruntime_providers_cuda.so -> onnxruntime-linux-x64-gpu-1.17.1.tgz/lib/libonnxruntime_providers_cuda.so Changed
onnxruntime-linux-x64-gpu-1.15.1.tgz/lib/libonnxruntime_providers_shared.so -> onnxruntime-linux-x64-gpu-1.17.1.tgz/lib/libonnxruntime_providers_shared.so Changed
onnxruntime-linux-x64-gpu-1.15.1.tgz/lib/libonnxruntime_providers_tensorrt.so -> onnxruntime-linux-x64-gpu-1.17.1.tgz/lib/libonnxruntime_providers_tensorrt.so Changed
Refresh

No build results available

Refresh

No rpmlint results available

Request History
antlarr's avatar

antlarr created request about 1 month ago

Fixes build in Tumbleweed

- Update to 1.1.13
- Update onnxruntime to 1.17.1.tgz
- Add patch to fix a cmake error:
* fix-cmake-error.patch

- 1.1.6
- Update to 1.1.13
* Add video_tick function to background filter info
* Update Onnxruntime version and fix Windows compilerconfig
- Update to 1.1.12
* Critical bugfix in the PSNR calculation for image-similarity
skipping in background filter
- Update to 1.1.11
* New! RMBG model from Bria.AI
https://huggingface.co/briaai/RMBG-1.4 - remove background from
any object! (not just human)
* We got rid of the annoying "update available" message in favor
of a more discreet message on the plugin settings.
* Better handling of local file paths on Windows
* more.
- Update to 1.1.10
* This release will fix the Flatpak recipe for Linux after the
dependency bump, as well as removing the start menu option from
the Windows installer.
- Update to 1.1.9
* In this release we bumped versions of OpenCV and ONNXRuntime,
and trying to get rid of the annoying "smart screen" block on
Windows. We're also rolling out releases through AUR, Pacstall


Hillwood Yang's avatar

hillwood accepted request 11 days ago