@100mslive/roomkit-react 0.3.14-alpha.8 → 0.3.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -107,7 +107,7 @@ var __async = (__this, __arguments, generator) => {
107
107
  var define_process_env_default;
108
108
  var init_define_process_env = __esm({
109
109
  "<define:process.env>"() {
110
- define_process_env_default = { GITHUB_STATE: "/home/runner/work/_temp/_runner_file_commands/save_state_27575a21-5737-454e-8e27-786155458b41", npm_package_devDependencies_ts_node: "^10.4.0", npm_package_devDependencies__types_node: "^16.11.17", npm_package_exports___index_css: "./dist/index.css", npm_package_exports___require: "./dist/index.cjs.js", STATS_TRP: "true", DEPLOYMENT_BASEPATH: "/opt/runner", DOTNET_NOLOGO: "1", npm_package_dependencies_screenfull: "^5.1.0", npm_package_dependencies_react_draggable: "^4.4.5", npm_package_dependencies__radix_ui_react_switch: "1.0.0", npm_package_dependencies__100mslive_hms_whiteboard: "0.0.4-alpha.8", USER: "runner", npm_package_devDependencies_jest: "26.6.0", npm_config_version_commit_hooks: "true", npm_config_user_agent: "yarn/1.22.22 npm/? node/v18.20.3 linux x64", npm_config_always_auth: "", NX_WORKSPACE_ROOT: "/home/runner/work/web-sdks/web-sdks", npm_package_scripts_babel: "npx storybook@latest babelrc", CI: "true", npm_package_devDependencies__size_limit_file: "^5.0.3", npm_config_bin_links: "true", npm_config_wrap_output: "", npm_package_dependencies__radix_ui_react_tabs: "1.0.0", npm_package_dependencies__100mslive_react_sdk: "0.10.14-alpha.8", RUNNER_ENVIRONMENT: "github-hosted", GITHUB_ENV: "/home/runner/work/_temp/_runner_file_commands/set_env_27575a21-5737-454e-8e27-786155458b41", PIPX_HOME: "/opt/pipx", npm_node_execpath: "/opt/hostedtoolcache/node/18.20.3/x64/bin/node", npm_config_init_version: "1.0.0", npm_package_dependencies__emoji_mart_react: "^1.0.1", npm_package_dependencies__emoji_mart_data: "^1.0.6", npm_package_dependencies__100mslive_hms_virtual_background: "1.13.14-alpha.8", JAVA_HOME_8_X64: "/usr/lib/jvm/temurin-8-jdk-amd64", NODE_AUTH_TOKEN: "XXXXX-XXXXX-XXXXX-XXXXX", SHLVL: "1", npm_package_dependencies__radix_ui_react_tooltip: "1.0.6", npm_package_dependencies__radix_ui_react_popover: "1.0.6", npm_package_dependencies__100mslive_types_prebuilt: "0.12.9", npm_package_peerDependencies_react: ">=17.0.2 <19.0.0", npm_package_devDependencies__storybook_addon_links: "^7.0.27", npm_package_files_0: "dist", HOME: "/home/runner", npm_package_devDependencies__typescript_eslint_parser: "^5.4.0", npm_package_dependencies__radix_ui_react_dialog: "1.0.4", npm_package_devDependencies__types_react_window: "^1.8.5", npm_package_files_1: "src", npm_package_repository_directory: "packages/roomkit-react", RUNNER_TEMP: "/home/runner/work/_temp", GITHUB_EVENT_PATH: "/home/runner/work/_temp/_github_workflow/event.json", npm_package_scripts_controller: "cd packages/hls-controller && yarn start", npm_package_dependencies__stitches_react: "^1.2.8", JAVA_HOME_11_X64: "/usr/lib/jvm/temurin-11-jdk-amd64", PIPX_BIN_DIR: "/opt/pipx_bin", GITHUB_REPOSITORY_OWNER: "100mslive", npm_package_engines_node: ">=16", npm_package_devDependencies_typedoc_plugin_markdown: "^3.14.0", npm_config_init_license: "MIT", GRADLE_HOME: "/usr/share/gradle-8.8", ANDROID_NDK_LATEST_HOME: "/usr/local/lib/android/sdk/ndk/26.3.11579264", JAVA_HOME_21_X64: "/usr/lib/jvm/temurin-21-jdk-amd64", STATS_RDCL: "true", GITHUB_RETENTION_DAYS: "90", YARN_WRAP_OUTPUT: "false", npm_config_version_tag_prefix: "v", GITHUB_REPOSITORY_OWNER_ID: "73883131", POWERSHELL_DISTRIBUTION_CHANNEL: "GitHub-Actions-ubuntu22", AZURE_EXTENSION_DIR: "/opt/az/azcliextensions", GITHUB_HEAD_REF: "", npm_package_scripts_lint_fix: "yarn lint --fix", npm_config_userconfig: "/home/runner/work/_temp/.npmrc", npm_package_devDependencies__storybook_addon_a11y: "^7.0.27", SYSTEMD_EXEC_PID: "593", npm_package_scripts_postinstall: "husky install && lerna bootstrap", npm_package_devDependencies_husky: "^6.0.0", npm_package_dependencies_recordrtc: "^5.6.2", npm_package_dependencies_eventemitter2: "^6.4.9", npm_package_dependencies__radix_ui_react_label: "1.0.0", npm_package_dependencies__radix_ui_react_dropdown_menu: "2.0.5", npm_package_keywords_0: "100mslive", GITHUB_GRAPHQL_URL: "https://api.github.com/graphql", npm_package_description: "100ms Room Kit provides simple & easy to use UI components to build Live Streaming & Video Conferencing experiences in your apps.", npm_package_devDependencies_typescript: "~4.7.4", npm_package_devDependencies_typedoc: "^0.24.8", npm_package_devDependencies_babel_loader: "^8.2.5", npm_package_keywords_1: "react", GOROOT_1_20_X64: "/opt/hostedtoolcache/go/1.20.14/x64", NVM_DIR: "/home/runner/.nvm", npm_package_readmeFilename: "README.md", npm_package_devDependencies_react: "^18.1.0", npm_package_devDependencies__babel_preset_env: "^7.22.5", npm_package_keywords_2: "prebuilt", DOTNET_SKIP_FIRST_TIME_EXPERIENCE: "1", GOROOT_1_21_X64: "/opt/hostedtoolcache/go/1.21.11/x64", JAVA_HOME_17_X64: "/usr/lib/jvm/temurin-17-jdk-amd64", ImageVersion: "20240616.1.0", npm_package_devDependencies_prettier: "^2.4.1", npm_package_devDependencies_babel_jest: "^26.6.0", npm_package_scripts_dev: "node ../../scripts/dev", npm_package_keywords_3: "roomkit", RUNNER_OS: "Linux", GITHUB_API_URL: "https://api.github.com", GOROOT_1_22_X64: "/opt/hostedtoolcache/go/1.22.4/x64", SWIFT_PATH: "/usr/share/swift/usr/bin", FORCE_COLOR: "true", npm_package_dependencies__radix_ui_react_toast: "1.0.0", npm_package_dependencies__radix_ui_react_radio_group: "1.0.0", npm_package_dependencies__100mslive_hms_noise_cancellation: "0.0.1", npm_package_devDependencies__babel_preset_typescript: "^7.22.5", npm_package_exports___default: "./dist/index.js", RUNNER_USER: "runner", STATS_V3PS: "true", CHROMEWEBDRIVER: "/usr/local/share/chromedriver-linux64", JOURNAL_STREAM: "8:16135", GITHUB_WORKFLOW: "Publish Packages", _: "/usr/local/bin/yarn", npm_package_devDependencies_ts_jest: "26.5.6", npm_package_devDependencies_lerna: "^5.6.2", npm_package_devDependencies__types_jest: "^27.0.3", npm_package_devDependencies__commitlint_config_conventional: "^15.0.0", npm_package_private: "true", npm_package_dependencies__radix_ui_react_accordion: "1.0.0", npm_package_devDependencies__babel_preset_react: "^7.22.5", npm_package_module: "dist/index.js", npm_package_scripts_lint: "eslint -c .eslintrc --no-error-on-unmatched-pattern src --ext .js --ext .jsx --ext .ts --ext .tsx", npm_package_devDependencies__typescript_eslint_eslint_plugin: "^5.4.0", npm_config_registry: "https://registry.yarnpkg.com", npm_package_dependencies_react_window: "^1.8.7", npm_package_dependencies__100mslive_hls_player: "0.3.14-alpha.8", npm_package_devDependencies__types_lodash_merge: "^4.6.6", npm_package_devDependencies__storybook_cli: "^7.0.27", ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE: "/opt/actionarchivecache", STATS_D: "false", GITHUB_RUN_ID: "9613734740", STATS_VMFE: "true", npm_package_workspaces_0: "packages/*", npm_package_scripts_store: "cd packages/hms-video-store && yarn start", npm_package_devDependencies__babel_core: "^7.18.2", npm_package_dependencies_ts_pattern: "4.3.0", npm_package_devDependencies__storybook_addon_interactions: "^7.0.27", npm_package_devDependencies__storybook_addon_actions: "^7.0.27", GITHUB_REF_TYPE: "branch", BOOTSTRAP_HASKELL_NONINTERACTIVE: "1", GITHUB_WORKFLOW_SHA: "16a110b525265ba74c72960c828e6ce933df52cf", GITHUB_BASE_REF: "", ImageOS: "ubuntu22", npm_package_workspaces_1: "examples/*", npm_package_scripts_start: 'concurrently "yarn dev" "yarn types"', npm_config_ignore_scripts: "", NX_TASK_HASH: "b1fde51e3dfa43537b62c313ed425931ffc6c01ee0651880125bf51b6a28d58c", npm_package_exports___import: "./dist/index.js", STATS_BLT: "true", GITHUB_WORKFLOW_REF: "100mslive/web-sdks/.github/workflows/publish.yml@refs/heads/publish-alpha", PERFLOG_LOCATION_SETTING: "RUNNER_PERFLOG", GITHUB_ACTION_REPOSITORY: "", npm_package_scripts_prebuilt: "cd packages/roomkit-react && yarn start", npm_package_devDependencies_postcss_loader: "^6.2.1", npm_package_devDependencies_esbuild_loader: "^4.0.2", PATH: "/tmp/yarn--1718973604964-0.10726757358908445:/home/runner/work/web-sdks/web-sdks/packages/roomkit-react/node_modules/.bin:/home/runner/.config/yarn/link/node_modules/.bin:/home/runner/work/web-sdks/web-sdks/node_modules/.bin:/opt/hostedtoolcache/node/18.20.3/x64/libexec/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/bin/node_modules/npm/bin/node-gyp-bin:/tmp/yarn--1718973604770-0.33744061216691046:/home/runner/work/web-sdks/web-sdks/packages/roomkit-react/node_modules/.bin:/home/runner/.config/yarn/link/node_modules/.bin:/home/runner/work/web-sdks/web-sdks/node_modules/.bin:/opt/hostedtoolcache/node/18.20.3/x64/libexec/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/bin/node_modules/npm/bin/node-gyp-bin:/tmp/yarn--1718973579202-0.226299014918115:/home/runner/work/web-sdks/web-sdks/node_modules/.bin:/home/runner/.config/yarn/link/node_modules/.bin:/home/runner/work/web-sdks/web-sdks/node_modules/.bin:/opt/hostedtoolcache/node/18.20.3/x64/libexec/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/bin/node_modules/npm/bin/node-gyp-bin:/tmp/yarn--1718973579021-0.0699281435738186:/home/runner/work/web-sdks/web-sdks/node_modules/.bin:/home/runner/.config/yarn/link/node_modules/.bin:/home/runner/work/web-sdks/web-sdks/node_modules/.bin:/opt/hostedtoolcache/node/18.20.3/x64/libexec/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/bin/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin", NODE: "/opt/hostedtoolcache/node/18.20.3/x64/bin/node", ANT_HOME: "/usr/share/ant", DOTNET_MULTILEVEL_LOOKUP: "0", RUNNER_TRACKING_ID: "github_7ad3cca2-cc6f-4b07-8c13-cddbd3cd61ad", INVOCATION_ID: "19e1902fb66a4b0faa182d54d9c9486b", NPM_CONFIG_USERCONFIG: "/home/runner/work/_temp/.npmrc", RUNNER_TOOL_CACHE: "/opt/hostedtoolcache", npm_package_scripts_size: "size-limit", npm_package_devDependencies_size_limit: "^5.0.3", npm_package_name: "@100mslive/roomkit-react", npm_package_devDependencies__storybook_react_webpack5: "^7.0.27", npm_package_repository_type: "git", GITHUB_ACTION: "__run_3", GITHUB_RUN_NUMBER: "585", GITHUB_TRIGGERING_ACTOR: "github-actions[bot]", RUNNER_ARCH: "X64", XDG_RUNTIME_DIR: "/run/user/1001", AGENT_TOOLSDIRECTORY: "/opt/hostedtoolcache", npm_package_lint_staged____js_ts_jsx_tsx_: "eslint", npm_package_devDependencies_babel_plugin_istanbul: "^6.1.1", LERNA_PACKAGE_NAME: "@100mslive/roomkit-react", npm_package_dependencies__radix_ui_react_select: "1.0.0", npm_package_size_limit_0_limit: "20 KB", npm_package_devDependencies__commitlint_cli: "^15.0.0", LANG: "C.UTF-8", VCPKG_INSTALLATION_ROOT: "/usr/local/share/vcpkg", npm_package_size_limit_1_limit: "20 KB", npm_package_devDependencies_eslint_plugin_simple_import_sort: "^8.0.0", npm_package_devDependencies_eslint: "^8.9.0", npm_package_dependencies_react_intersection_observer: "^9.4.3", npm_package_devDependencies__types_mdx: "2.0.2", CONDA: "/usr/share/miniconda", RUNNER_NAME: "GitHub Actions 374", XDG_CONFIG_HOME: "/home/runner/.config", STATS_VMD: "true", GITHUB_REF_NAME: "publish-alpha", GITHUB_REPOSITORY: "100mslive/web-sdks", STATS_D_D: "false", npm_lifecycle_script: "rm -rf dist && node ../../scripts/build-webapp", npm_package_size_limit_2_limit: "400 KB", npm_package_resolutions_loader_utils: "^2.0.4", npm_package_devDependencies_dotenv: "^14.2.0", npm_package_dependencies__radix_ui_react_slider: "1.0.0", npm_package_scripts_types_build: "tsc -p tsconfig.json", npm_package_main: "dist/index.cjs.js", STATS_UE: "true", ANDROID_NDK_ROOT: "/usr/local/lib/android/sdk/ndk/25.2.9519653", GITHUB_ACTION_REF: "", DEBIAN_FRONTEND: "noninteractive", npm_package_size_limit_3_limit: "20 KB", npm_package_size_limit_0_path: "packages/hms-video-store/dist/index.cjs.js", npm_package_scripts_cypress_open: "cypress open", npm_package_scripts_lerna_publish: "lerna publish from-package --dist-tag $PUBLISH_FLAG --yes --no-verify-access", npm_package_scripts_test: "yarn build --no-private && lerna run test", npm_package_devDependencies_concurrently: "^6.4.0", npm_config_version_git_message: "v%s", npm_package_dependencies__radix_ui_react_checkbox: "1.0.0", npm_package_dependencies__100mslive_react_icons: "0.10.14-alpha.8", npm_package_scripts_types: "tsc -w", GITHUB_REPOSITORY_ID: "429826515", GITHUB_ACTIONS: "true", npm_lifecycle_event: "build:only", npm_package_version: "0.3.14-alpha.8", npm_package_size_limit_4_limit: "20 KB", npm_package_size_limit_1_path: "packages/hms-video-store/dist/index.js", npm_package_scripts_build_only: "rm -rf dist && node ../../scripts/build-webapp", npm_package_devDependencies__types_react: "^18.1.0", npm_package_sideEffects: "false", npm_package_repository_url: "https://github.com/100mslive/web-sdks.git", npm_package_source: "src/index.ts", GITHUB_REF_PROTECTED: "true", npm_config_argv: '{"remain":[],"cooked":["run","test"],"original":["test"]}', npm_package_size_limit_5_limit: "20 KB", npm_package_size_limit_2_path: "packages/roomkit-react/dist/index.cjs.js", npm_package_scripts_build: "yarn build:only && yarn types:build", npm_package_devDependencies_tslib: "^2.2.0", npm_package_devDependencies_nx: "^14.5.1", npm_package_devDependencies_lint_staged: "^12.0.3", NX_CLI_SET: "true", npm_package_dependencies_uuid: "^8.3.2", npm_package_dependencies_react_virtualized_auto_sizer: "^1.0.7", npm_package_dependencies_lodash_merge: "^4.6.2", npm_package_dependencies_emoji_mart: "^5.2.2", GITHUB_WORKSPACE: "/home/runner/work/web-sdks/web-sdks", ACCEPT_EULA: "Y", GITHUB_JOB: "publish_packages", RUNNER_PERFLOG: "/home/runner/perflog", npm_package_size_limit_6_limit: "150 KB", npm_package_size_limit_3_path: "packages/roomkit-react/dist/index.js", npm_package_devDependencies_cypress: "^9.5.2", GITHUB_SHA: "16a110b525265ba74c72960c828e6ce933df52cf", GITHUB_RUN_ATTEMPT: "1", npm_package_size_limit_7_limit: "100 KB", npm_package_size_limit_4_path: "packages/hms-virtual-background/dist/index.cjs.js", npm_config_version_git_tag: "true", npm_config_version_git_sign: "", npm_package_dependencies_qrcode_react: "^3.1.0", GITHUB_REF: "refs/heads/publish-alpha", GITHUB_ACTOR: "github-actions[bot]", ANDROID_SDK_ROOT: "/usr/local/lib/android/sdk", npm_package_license: "MIT", npm_package_size_limit_5_path: "packages/hms-virtual-background/dist/index.js", npm_config_strict_ssl: "true", LEIN_HOME: "/usr/local/lib/lein", npm_package_size_limit_6_path: "packages/react-icons/dist/index.cjs.js", npm_package_scripts_format: "prettier -w src/**", npm_package_devDependencies_eslint_plugin_prettier: "^4.0.0", npm_package_devDependencies_eslint_config_react_app: "^7.0.0", NX_TASK_TARGET_PROJECT: "@100mslive/roomkit-react", GITHUB_PATH: "/home/runner/work/_temp/_runner_file_commands/add_path_27575a21-5737-454e-8e27-786155458b41", JAVA_HOME: "/usr/lib/jvm/temurin-11-jdk-amd64", PWD: "/home/runner/work/web-sdks/web-sdks/packages/roomkit-react", GITHUB_ACTOR_ID: "41898282", RUNNER_WORKSPACE: "/home/runner/work/web-sdks", npm_execpath: "/usr/local/lib/node_modules/yarn/bin/yarn.js", npm_package_size_limit_7_path: "packages/react-icons/dist/index.js", npm_package_scripts_ybys: "yarn && yarn build --no-private && yarn storybook", npm_package_dependencies__radix_ui_react_progress: "1.0.0", HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS: "3650", STATS_TIS: "mining", GITHUB_EVENT_NAME: "workflow_dispatch", HOMEBREW_NO_AUTO_UPDATE: "1", ANDROID_HOME: "/usr/local/lib/android/sdk", GITHUB_SERVER_URL: "https://github.com", GECKOWEBDRIVER: "/usr/local/share/gecko_driver", LEIN_JAR: "/usr/local/lib/lein/self-installs/leiningen-2.11.2-standalone.jar", GHCUP_INSTALL_BASE_PREFIX: "/usr/local", GITHUB_OUTPUT: "/home/runner/work/_temp/_runner_file_commands/set_output_27575a21-5737-454e-8e27-786155458b41", npm_package_scripts_prestart: "rm -rf dist && yarn types:build", npm_package_author_name: "100ms", EDGEWEBDRIVER: "/usr/local/share/edge_driver", STATS_EXT: "true", npm_package_scripts_build_storybook: "sb build", npm_package_devDependencies_postcss: "^8.4.5", npm_package_devDependencies_esbuild: "^0.18.13", npm_config_save_prefix: "^", npm_config_ignore_optional: "", npm_package_dependencies_worker_timers: "^7.0.40", npm_package_typings: "dist/index.d.ts", ANDROID_NDK: "/usr/local/lib/android/sdk/ndk/25.2.9519653", SGX_AESM_ADDR: "1", CHROME_BIN: "/usr/bin/google-chrome", npm_package_scripts_storybook: "sb dev -p 6006", npm_package_devDependencies_esbuild_plugin_postcss2: "0.1.1", npm_package_dependencies_react_swipeable: "^7.0.1", npm_package_devDependencies_babel_plugin_react_require: "3.1.3", npm_package_devDependencies__storybook_testing_library: "^0.2.0", npm_package_devDependencies__storybook_addon_essentials: "^7.0.27", SELENIUM_JAR_PATH: "/usr/share/java/selenium-server.jar", STATS_EXTP: "https://provjobdsettingscdn.blob.core.windows.net/settings/provjobdsettings-0.5.181+6/provjobd.data", npm_package_scripts_reactsdk: "cd packages/react-sdk && yarn start", npm_package_dependencies_react_use: "^17.4.0", npm_package_dependencies__radix_ui_react_collapsible: "1.0.0", npm_package_devDependencies_storybook_dark_mode: "^3.0.0", npm_package_devDependencies__storybook_react: "^7.0.27", INIT_CWD: "/home/runner/work/web-sdks/web-sdks", ANDROID_NDK_HOME: "/usr/local/lib/android/sdk/ndk/25.2.9519653", GITHUB_STEP_SUMMARY: "/home/runner/work/_temp/_runner_file_commands/step_summary_27575a21-5737-454e-8e27-786155458b41" };
110
+ define_process_env_default = { GITHUB_STATE: "/home/runner/work/_temp/_runner_file_commands/save_state_adf1cb44-4add-420a-8726-a8aa368ea6c1", npm_package_devDependencies_ts_node: "^10.4.0", npm_package_devDependencies__types_node: "^16.11.17", npm_package_exports___index_css: "./dist/index.css", npm_package_exports___require: "./dist/index.cjs.js", STATS_TRP: "true", DEPLOYMENT_BASEPATH: "/opt/runner", DOTNET_NOLOGO: "1", npm_package_dependencies_screenfull: "^5.1.0", npm_package_dependencies_react_draggable: "^4.4.5", npm_package_dependencies__radix_ui_react_switch: "1.0.0", npm_package_dependencies__100mslive_hms_whiteboard: "0.0.4", USER: "runner", npm_package_devDependencies_jest: "26.6.0", npm_config_version_commit_hooks: "true", npm_config_user_agent: "yarn/1.22.22 npm/? node/v18.20.3 linux x64", npm_config_always_auth: "", NX_WORKSPACE_ROOT: "/home/runner/work/web-sdks/web-sdks", npm_package_scripts_babel: "npx storybook@latest babelrc", CI: "true", npm_package_devDependencies__size_limit_file: "^5.0.3", npm_config_bin_links: "true", npm_config_wrap_output: "", npm_package_dependencies__radix_ui_react_tabs: "1.0.0", npm_package_dependencies__100mslive_react_sdk: "0.10.14", RUNNER_ENVIRONMENT: "github-hosted", GITHUB_ENV: "/home/runner/work/_temp/_runner_file_commands/set_env_adf1cb44-4add-420a-8726-a8aa368ea6c1", PIPX_HOME: "/opt/pipx", npm_node_execpath: "/opt/hostedtoolcache/node/18.20.3/x64/bin/node", npm_config_init_version: "1.0.0", npm_package_dependencies__emoji_mart_react: "^1.0.1", npm_package_dependencies__emoji_mart_data: "^1.0.6", npm_package_dependencies__100mslive_hms_virtual_background: "1.13.14", JAVA_HOME_8_X64: "/usr/lib/jvm/temurin-8-jdk-amd64", NODE_AUTH_TOKEN: "XXXXX-XXXXX-XXXXX-XXXXX", SHLVL: "1", npm_package_dependencies__radix_ui_react_tooltip: "1.0.6", npm_package_dependencies__radix_ui_react_popover: "1.0.6", npm_package_dependencies__100mslive_types_prebuilt: "0.12.9", npm_package_peerDependencies_react: ">=17.0.2 <19.0.0", npm_package_devDependencies__storybook_addon_links: "^7.0.27", npm_package_files_0: "dist", HOME: "/home/runner", npm_package_devDependencies__typescript_eslint_parser: "^5.4.0", npm_package_dependencies__radix_ui_react_dialog: "1.0.4", npm_package_devDependencies__types_react_window: "^1.8.5", npm_package_files_1: "src", npm_package_repository_directory: "packages/roomkit-react", RUNNER_TEMP: "/home/runner/work/_temp", GITHUB_EVENT_PATH: "/home/runner/work/_temp/_github_workflow/event.json", npm_package_scripts_controller: "cd packages/hls-controller && yarn start", npm_package_dependencies__stitches_react: "^1.2.8", JAVA_HOME_11_X64: "/usr/lib/jvm/temurin-11-jdk-amd64", PIPX_BIN_DIR: "/opt/pipx_bin", GITHUB_REPOSITORY_OWNER: "100mslive", npm_package_engines_node: ">=16", npm_package_devDependencies_typedoc_plugin_markdown: "^3.14.0", npm_config_init_license: "MIT", GRADLE_HOME: "/usr/share/gradle-8.8", ANDROID_NDK_LATEST_HOME: "/usr/local/lib/android/sdk/ndk/26.3.11579264", JAVA_HOME_21_X64: "/usr/lib/jvm/temurin-21-jdk-amd64", STATS_RDCL: "true", GITHUB_RETENTION_DAYS: "90", YARN_WRAP_OUTPUT: "false", npm_config_version_tag_prefix: "v", GITHUB_REPOSITORY_OWNER_ID: "73883131", POWERSHELL_DISTRIBUTION_CHANNEL: "GitHub-Actions-ubuntu22", AZURE_EXTENSION_DIR: "/opt/az/azcliextensions", GITHUB_HEAD_REF: "", npm_package_scripts_lint_fix: "yarn lint --fix", npm_config_userconfig: "/home/runner/work/_temp/.npmrc", npm_package_devDependencies__storybook_addon_a11y: "^7.0.27", SYSTEMD_EXEC_PID: "590", npm_package_scripts_postinstall: "husky install && lerna bootstrap", npm_package_devDependencies_husky: "^6.0.0", npm_package_dependencies_recordrtc: "^5.6.2", npm_package_dependencies_eventemitter2: "^6.4.9", npm_package_dependencies__radix_ui_react_label: "1.0.0", npm_package_dependencies__radix_ui_react_dropdown_menu: "2.0.5", npm_package_keywords_0: "100mslive", GITHUB_GRAPHQL_URL: "https://api.github.com/graphql", npm_package_description: "100ms Room Kit provides simple & easy to use UI components to build Live Streaming & Video Conferencing experiences in your apps.", npm_package_devDependencies_typescript: "~4.7.4", npm_package_devDependencies_typedoc: "^0.24.8", npm_package_devDependencies_babel_loader: "^8.2.5", npm_package_keywords_1: "react", GOROOT_1_20_X64: "/opt/hostedtoolcache/go/1.20.14/x64", NVM_DIR: "/home/runner/.nvm", npm_package_readmeFilename: "README.md", npm_package_devDependencies_react: "^18.1.0", npm_package_devDependencies__babel_preset_env: "^7.22.5", npm_package_keywords_2: "prebuilt", DOTNET_SKIP_FIRST_TIME_EXPERIENCE: "1", GOROOT_1_21_X64: "/opt/hostedtoolcache/go/1.21.11/x64", JAVA_HOME_17_X64: "/usr/lib/jvm/temurin-17-jdk-amd64", ImageVersion: "20240616.1.0", npm_package_devDependencies_prettier: "^2.4.1", npm_package_devDependencies_babel_jest: "^26.6.0", npm_package_scripts_dev: "node ../../scripts/dev", npm_package_keywords_3: "roomkit", RUNNER_OS: "Linux", GITHUB_API_URL: "https://api.github.com", GOROOT_1_22_X64: "/opt/hostedtoolcache/go/1.22.4/x64", SWIFT_PATH: "/usr/share/swift/usr/bin", FORCE_COLOR: "true", npm_package_dependencies__radix_ui_react_toast: "1.0.0", npm_package_dependencies__radix_ui_react_radio_group: "1.0.0", npm_package_dependencies__100mslive_hms_noise_cancellation: "0.0.1", npm_package_devDependencies__babel_preset_typescript: "^7.22.5", npm_package_exports___default: "./dist/index.js", RUNNER_USER: "runner", STATS_V3PS: "true", CHROMEWEBDRIVER: "/usr/local/share/chromedriver-linux64", JOURNAL_STREAM: "8:17356", GITHUB_WORKFLOW: "Publish Packages", _: "/usr/local/bin/yarn", npm_package_devDependencies_ts_jest: "26.5.6", npm_package_devDependencies_lerna: "^5.6.2", npm_package_devDependencies__types_jest: "^27.0.3", npm_package_devDependencies__commitlint_config_conventional: "^15.0.0", npm_package_private: "true", npm_package_dependencies__radix_ui_react_accordion: "1.0.0", npm_package_devDependencies__babel_preset_react: "^7.22.5", npm_package_module: "dist/index.js", npm_package_scripts_lint: "eslint -c .eslintrc --no-error-on-unmatched-pattern src --ext .js --ext .jsx --ext .ts --ext .tsx", npm_package_devDependencies__typescript_eslint_eslint_plugin: "^5.4.0", npm_config_registry: "https://registry.yarnpkg.com", npm_package_dependencies_react_window: "^1.8.7", npm_package_dependencies__100mslive_hls_player: "0.3.14", npm_package_devDependencies__types_lodash_merge: "^4.6.6", npm_package_devDependencies__storybook_cli: "^7.0.27", ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE: "/opt/actionarchivecache", STATS_D: "false", GITHUB_RUN_ID: "9661682152", STATS_VMFE: "true", npm_package_workspaces_0: "packages/*", npm_package_scripts_store: "cd packages/hms-video-store && yarn start", npm_package_devDependencies__babel_core: "^7.18.2", npm_package_dependencies_ts_pattern: "4.3.0", npm_package_devDependencies__storybook_addon_interactions: "^7.0.27", npm_package_devDependencies__storybook_addon_actions: "^7.0.27", GITHUB_REF_TYPE: "branch", BOOTSTRAP_HASKELL_NONINTERACTIVE: "1", GITHUB_WORKFLOW_SHA: "0e76f9d5dee8b4eec991bda145a3157c5a45593c", GITHUB_BASE_REF: "", ImageOS: "ubuntu22", npm_package_workspaces_1: "examples/*", npm_package_scripts_start: 'concurrently "yarn dev" "yarn types"', npm_config_ignore_scripts: "", NX_TASK_HASH: "47454ed0ee5d58c3391b12a9b53aeb874ce6bb5490bc16eb310b06e384f5e05e", npm_package_exports___import: "./dist/index.js", GITHUB_WORKFLOW_REF: "100mslive/web-sdks/.github/workflows/publish.yml@refs/heads/main", PERFLOG_LOCATION_SETTING: "RUNNER_PERFLOG", GITHUB_ACTION_REPOSITORY: "", npm_package_scripts_prebuilt: "cd packages/roomkit-react && yarn start", npm_package_devDependencies_postcss_loader: "^6.2.1", npm_package_devDependencies_esbuild_loader: "^4.0.2", PATH: "/tmp/yarn--1719315399128-0.44404788583932464:/home/runner/work/web-sdks/web-sdks/packages/roomkit-react/node_modules/.bin:/home/runner/.config/yarn/link/node_modules/.bin:/home/runner/work/web-sdks/web-sdks/node_modules/.bin:/opt/hostedtoolcache/node/18.20.3/x64/libexec/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/bin/node_modules/npm/bin/node-gyp-bin:/tmp/yarn--1719315398936-0.3483133545131931:/home/runner/work/web-sdks/web-sdks/packages/roomkit-react/node_modules/.bin:/home/runner/.config/yarn/link/node_modules/.bin:/home/runner/work/web-sdks/web-sdks/node_modules/.bin:/opt/hostedtoolcache/node/18.20.3/x64/libexec/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/bin/node_modules/npm/bin/node-gyp-bin:/tmp/yarn--1719315373455-0.3101961994568032:/home/runner/work/web-sdks/web-sdks/node_modules/.bin:/home/runner/.config/yarn/link/node_modules/.bin:/home/runner/work/web-sdks/web-sdks/node_modules/.bin:/opt/hostedtoolcache/node/18.20.3/x64/libexec/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/bin/node_modules/npm/bin/node-gyp-bin:/tmp/yarn--1719315373276-0.05068429302590238:/home/runner/work/web-sdks/web-sdks/node_modules/.bin:/home/runner/.config/yarn/link/node_modules/.bin:/home/runner/work/web-sdks/web-sdks/node_modules/.bin:/opt/hostedtoolcache/node/18.20.3/x64/libexec/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/bin/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin", NODE: "/opt/hostedtoolcache/node/18.20.3/x64/bin/node", ANT_HOME: "/usr/share/ant", DOTNET_MULTILEVEL_LOOKUP: "0", RUNNER_TRACKING_ID: "github_773c3b95-d96e-4a9e-b282-40e69d50cd6e", INVOCATION_ID: "16e7598366e54b1c8e6d3f822ca83364", NPM_CONFIG_USERCONFIG: "/home/runner/work/_temp/.npmrc", RUNNER_TOOL_CACHE: "/opt/hostedtoolcache", npm_package_scripts_size: "size-limit", npm_package_devDependencies_size_limit: "^5.0.3", npm_package_name: "@100mslive/roomkit-react", npm_package_devDependencies__storybook_react_webpack5: "^7.0.27", npm_package_repository_type: "git", GITHUB_ACTION: "__run_3", GITHUB_RUN_NUMBER: "589", GITHUB_TRIGGERING_ACTOR: "eswarclynn", RUNNER_ARCH: "X64", XDG_RUNTIME_DIR: "/run/user/1001", AGENT_TOOLSDIRECTORY: "/opt/hostedtoolcache", npm_package_lint_staged____js_ts_jsx_tsx_: "eslint", npm_package_devDependencies_babel_plugin_istanbul: "^6.1.1", LERNA_PACKAGE_NAME: "@100mslive/roomkit-react", npm_package_dependencies__radix_ui_react_select: "1.0.0", npm_package_size_limit_0_limit: "20 KB", npm_package_devDependencies__commitlint_cli: "^15.0.0", LANG: "C.UTF-8", VCPKG_INSTALLATION_ROOT: "/usr/local/share/vcpkg", npm_package_size_limit_1_limit: "20 KB", npm_package_devDependencies_eslint_plugin_simple_import_sort: "^8.0.0", npm_package_devDependencies_eslint: "^8.9.0", npm_package_dependencies_react_intersection_observer: "^9.4.3", npm_package_devDependencies__types_mdx: "2.0.2", CONDA: "/usr/share/miniconda", RUNNER_NAME: "GitHub Actions 362", XDG_CONFIG_HOME: "/home/runner/.config", STATS_VMD: "true", GITHUB_REF_NAME: "main", GITHUB_REPOSITORY: "100mslive/web-sdks", STATS_D_D: "false", npm_lifecycle_script: "rm -rf dist && node ../../scripts/build-webapp", npm_package_size_limit_2_limit: "400 KB", npm_package_resolutions_loader_utils: "^2.0.4", npm_package_devDependencies_dotenv: "^14.2.0", npm_package_dependencies__radix_ui_react_slider: "1.0.0", npm_package_scripts_types_build: "tsc -p tsconfig.json", npm_package_main: "dist/index.cjs.js", STATS_UE: "true", ANDROID_NDK_ROOT: "/usr/local/lib/android/sdk/ndk/25.2.9519653", GITHUB_ACTION_REF: "", DEBIAN_FRONTEND: "noninteractive", npm_package_size_limit_3_limit: "20 KB", npm_package_size_limit_0_path: "packages/hms-video-store/dist/index.cjs.js", npm_package_scripts_cypress_open: "cypress open", npm_package_scripts_lerna_publish: "lerna publish from-package --dist-tag $PUBLISH_FLAG --yes --no-verify-access", npm_package_scripts_test: "yarn build --no-private && lerna run test", npm_package_devDependencies_concurrently: "^6.4.0", npm_config_version_git_message: "v%s", npm_package_dependencies__radix_ui_react_checkbox: "1.0.0", npm_package_dependencies__100mslive_react_icons: "0.10.14", npm_package_scripts_types: "tsc -w", GITHUB_REPOSITORY_ID: "429826515", GITHUB_ACTIONS: "true", npm_lifecycle_event: "build:only", npm_package_version: "0.3.14", npm_package_size_limit_4_limit: "20 KB", npm_package_size_limit_1_path: "packages/hms-video-store/dist/index.js", npm_package_scripts_build_only: "rm -rf dist && node ../../scripts/build-webapp", npm_package_devDependencies__types_react: "^18.1.0", npm_package_sideEffects: "false", npm_package_repository_url: "https://github.com/100mslive/web-sdks.git", npm_package_source: "src/index.ts", GITHUB_REF_PROTECTED: "true", npm_config_argv: '{"remain":[],"cooked":["run","test"],"original":["test"]}', npm_package_size_limit_5_limit: "20 KB", npm_package_size_limit_2_path: "packages/roomkit-react/dist/index.cjs.js", npm_package_scripts_build: "yarn build:only && yarn types:build", npm_package_devDependencies_tslib: "^2.2.0", npm_package_devDependencies_nx: "^14.5.1", npm_package_devDependencies_lint_staged: "^12.0.3", NX_CLI_SET: "true", npm_package_dependencies_uuid: "^8.3.2", npm_package_dependencies_react_virtualized_auto_sizer: "^1.0.7", npm_package_dependencies_lodash_merge: "^4.6.2", npm_package_dependencies_emoji_mart: "^5.2.2", GITHUB_WORKSPACE: "/home/runner/work/web-sdks/web-sdks", ACCEPT_EULA: "Y", GITHUB_JOB: "publish_packages", RUNNER_PERFLOG: "/home/runner/perflog", npm_package_size_limit_6_limit: "150 KB", npm_package_size_limit_3_path: "packages/roomkit-react/dist/index.js", npm_package_devDependencies_cypress: "^9.5.2", GITHUB_SHA: "0e76f9d5dee8b4eec991bda145a3157c5a45593c", GITHUB_RUN_ATTEMPT: "1", npm_package_size_limit_7_limit: "100 KB", npm_package_size_limit_4_path: "packages/hms-virtual-background/dist/index.cjs.js", npm_config_version_git_tag: "true", npm_config_version_git_sign: "", npm_package_dependencies_qrcode_react: "^3.1.0", GITHUB_REF: "refs/heads/main", GITHUB_ACTOR: "eswarclynn", ANDROID_SDK_ROOT: "/usr/local/lib/android/sdk", npm_package_license: "MIT", npm_package_size_limit_5_path: "packages/hms-virtual-background/dist/index.js", npm_config_strict_ssl: "true", LEIN_HOME: "/usr/local/lib/lein", npm_package_size_limit_6_path: "packages/react-icons/dist/index.cjs.js", npm_package_scripts_format: "prettier -w src/**", npm_package_devDependencies_eslint_plugin_prettier: "^4.0.0", npm_package_devDependencies_eslint_config_react_app: "^7.0.0", NX_TASK_TARGET_PROJECT: "@100mslive/roomkit-react", GITHUB_PATH: "/home/runner/work/_temp/_runner_file_commands/add_path_adf1cb44-4add-420a-8726-a8aa368ea6c1", JAVA_HOME: "/usr/lib/jvm/temurin-11-jdk-amd64", PWD: "/home/runner/work/web-sdks/web-sdks/packages/roomkit-react", GITHUB_ACTOR_ID: "64120992", RUNNER_WORKSPACE: "/home/runner/work/web-sdks", npm_execpath: "/usr/local/lib/node_modules/yarn/bin/yarn.js", npm_package_size_limit_7_path: "packages/react-icons/dist/index.js", npm_package_scripts_ybys: "yarn && yarn build --no-private && yarn storybook", npm_package_dependencies__radix_ui_react_progress: "1.0.0", HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS: "3650", STATS_TIS: "mining", GITHUB_EVENT_NAME: "workflow_dispatch", HOMEBREW_NO_AUTO_UPDATE: "1", ANDROID_HOME: "/usr/local/lib/android/sdk", GITHUB_SERVER_URL: "https://github.com", GECKOWEBDRIVER: "/usr/local/share/gecko_driver", LEIN_JAR: "/usr/local/lib/lein/self-installs/leiningen-2.11.2-standalone.jar", GHCUP_INSTALL_BASE_PREFIX: "/usr/local", GITHUB_OUTPUT: "/home/runner/work/_temp/_runner_file_commands/set_output_adf1cb44-4add-420a-8726-a8aa368ea6c1", npm_package_scripts_prestart: "rm -rf dist && yarn types:build", npm_package_author_name: "100ms", EDGEWEBDRIVER: "/usr/local/share/edge_driver", STATS_EXT: "true", npm_package_scripts_build_storybook: "sb build", npm_package_devDependencies_postcss: "^8.4.5", npm_package_devDependencies_esbuild: "^0.18.13", npm_config_save_prefix: "^", npm_config_ignore_optional: "", npm_package_dependencies_worker_timers: "^7.0.40", npm_package_typings: "dist/index.d.ts", ANDROID_NDK: "/usr/local/lib/android/sdk/ndk/25.2.9519653", SGX_AESM_ADDR: "1", CHROME_BIN: "/usr/bin/google-chrome", npm_package_scripts_storybook: "sb dev -p 6006", npm_package_devDependencies_esbuild_plugin_postcss2: "0.1.1", npm_package_dependencies_react_swipeable: "^7.0.1", npm_package_devDependencies_babel_plugin_react_require: "3.1.3", npm_package_devDependencies__storybook_testing_library: "^0.2.0", npm_package_devDependencies__storybook_addon_essentials: "^7.0.27", SELENIUM_JAR_PATH: "/usr/share/java/selenium-server.jar", STATS_EXTP: "https://provjobdsettingscdn.blob.core.windows.net/settings/provjobdsettings-0.5.181+6/provjobd.data", npm_package_scripts_reactsdk: "cd packages/react-sdk && yarn start", npm_package_dependencies_react_use: "^17.4.0", npm_package_dependencies__radix_ui_react_collapsible: "1.0.0", npm_package_devDependencies_storybook_dark_mode: "^3.0.0", npm_package_devDependencies__storybook_react: "^7.0.27", INIT_CWD: "/home/runner/work/web-sdks/web-sdks", ANDROID_NDK_HOME: "/usr/local/lib/android/sdk/ndk/25.2.9519653", GITHUB_STEP_SUMMARY: "/home/runner/work/_temp/_runner_file_commands/step_summary_adf1cb44-4add-420a-8726-a8aa368ea6c1" };
111
111
  }
112
112
  });
113
113
 
@@ -5629,10 +5629,10 @@ var require_ua_parser = __commonJS({
5629
5629
  }
5630
5630
  };
5631
5631
  var rgxMapper = function(ua2, arrays) {
5632
- var i2 = 0, j3, k2, p2, q3, matches, match17;
5632
+ var i2 = 0, j3, k3, p2, q3, matches, match17;
5633
5633
  while (i2 < arrays.length && !matches) {
5634
5634
  var regex = arrays[i2], props = arrays[i2 + 1];
5635
- j3 = k2 = 0;
5635
+ j3 = k3 = 0;
5636
5636
  while (j3 < regex.length && !matches) {
5637
5637
  if (!regex[j3]) {
5638
5638
  break;
@@ -5640,7 +5640,7 @@ var require_ua_parser = __commonJS({
5640
5640
  matches = regex[j3++].exec(ua2);
5641
5641
  if (!!matches) {
5642
5642
  for (p2 = 0; p2 < props.length; p2++) {
5643
- match17 = matches[++k2];
5643
+ match17 = matches[++k3];
5644
5644
  q3 = props[p2];
5645
5645
  if (typeof q3 === OBJ_TYPE && q3.length > 0) {
5646
5646
  if (q3.length === 2) {
@@ -8634,8 +8634,8 @@ var require_grammar = __commonJS({
8634
8634
  var require_parser = __commonJS({
8635
8635
  "../../node_modules/sdp-transform/lib/parser.js"(exports) {
8636
8636
  init_define_process_env();
8637
- var toIntIfInt = function(v3) {
8638
- return String(Number(v3)) === v3 ? Number(v3) : v3;
8637
+ var toIntIfInt = function(v2) {
8638
+ return String(Number(v2)) === v2 ? Number(v2) : v2;
8639
8639
  };
8640
8640
  var attachProperties = function(match17, location, names, rawName) {
8641
8641
  if (rawName && !names) {
@@ -8871,10 +8871,10 @@ var require_react_is_production_min = __commonJS({
8871
8871
  var c3 = b3 ? Symbol.for("react.element") : 60103;
8872
8872
  var d3 = b3 ? Symbol.for("react.portal") : 60106;
8873
8873
  var e = b3 ? Symbol.for("react.fragment") : 60107;
8874
- var f2 = b3 ? Symbol.for("react.strict_mode") : 60108;
8874
+ var f3 = b3 ? Symbol.for("react.strict_mode") : 60108;
8875
8875
  var g2 = b3 ? Symbol.for("react.profiler") : 60114;
8876
8876
  var h2 = b3 ? Symbol.for("react.provider") : 60109;
8877
- var k2 = b3 ? Symbol.for("react.context") : 60110;
8877
+ var k3 = b3 ? Symbol.for("react.context") : 60110;
8878
8878
  var l2 = b3 ? Symbol.for("react.async_mode") : 60111;
8879
8879
  var m2 = b3 ? Symbol.for("react.concurrent_mode") : 60111;
8880
8880
  var n2 = b3 ? Symbol.for("react.forward_ref") : 60112;
@@ -8882,7 +8882,7 @@ var require_react_is_production_min = __commonJS({
8882
8882
  var q3 = b3 ? Symbol.for("react.suspense_list") : 60120;
8883
8883
  var r2 = b3 ? Symbol.for("react.memo") : 60115;
8884
8884
  var t2 = b3 ? Symbol.for("react.lazy") : 60116;
8885
- var v3 = b3 ? Symbol.for("react.block") : 60121;
8885
+ var v2 = b3 ? Symbol.for("react.block") : 60121;
8886
8886
  var w2 = b3 ? Symbol.for("react.fundamental") : 60117;
8887
8887
  var x2 = b3 ? Symbol.for("react.responder") : 60118;
8888
8888
  var y3 = b3 ? Symbol.for("react.scope") : 60119;
@@ -8896,12 +8896,12 @@ var require_react_is_production_min = __commonJS({
8896
8896
  case m2:
8897
8897
  case e:
8898
8898
  case g2:
8899
- case f2:
8899
+ case f3:
8900
8900
  case p2:
8901
8901
  return a11;
8902
8902
  default:
8903
8903
  switch (a11 = a11 && a11.$$typeof, a11) {
8904
- case k2:
8904
+ case k3:
8905
8905
  case n2:
8906
8906
  case t2:
8907
8907
  case r2:
@@ -8921,7 +8921,7 @@ var require_react_is_production_min = __commonJS({
8921
8921
  }
8922
8922
  exports.AsyncMode = l2;
8923
8923
  exports.ConcurrentMode = m2;
8924
- exports.ContextConsumer = k2;
8924
+ exports.ContextConsumer = k3;
8925
8925
  exports.ContextProvider = h2;
8926
8926
  exports.Element = c3;
8927
8927
  exports.ForwardRef = n2;
@@ -8930,14 +8930,14 @@ var require_react_is_production_min = __commonJS({
8930
8930
  exports.Memo = r2;
8931
8931
  exports.Portal = d3;
8932
8932
  exports.Profiler = g2;
8933
- exports.StrictMode = f2;
8933
+ exports.StrictMode = f3;
8934
8934
  exports.Suspense = p2;
8935
8935
  exports.isAsyncMode = function(a11) {
8936
8936
  return A3(a11) || z3(a11) === l2;
8937
8937
  };
8938
8938
  exports.isConcurrentMode = A3;
8939
8939
  exports.isContextConsumer = function(a11) {
8940
- return z3(a11) === k2;
8940
+ return z3(a11) === k3;
8941
8941
  };
8942
8942
  exports.isContextProvider = function(a11) {
8943
8943
  return z3(a11) === h2;
@@ -8964,13 +8964,13 @@ var require_react_is_production_min = __commonJS({
8964
8964
  return z3(a11) === g2;
8965
8965
  };
8966
8966
  exports.isStrictMode = function(a11) {
8967
- return z3(a11) === f2;
8967
+ return z3(a11) === f3;
8968
8968
  };
8969
8969
  exports.isSuspense = function(a11) {
8970
8970
  return z3(a11) === p2;
8971
8971
  };
8972
8972
  exports.isValidElementType = function(a11) {
8973
- return "string" === typeof a11 || "function" === typeof a11 || a11 === e || a11 === m2 || a11 === g2 || a11 === f2 || a11 === p2 || a11 === q3 || "object" === typeof a11 && null !== a11 && (a11.$$typeof === t2 || a11.$$typeof === r2 || a11.$$typeof === h2 || a11.$$typeof === k2 || a11.$$typeof === n2 || a11.$$typeof === w2 || a11.$$typeof === x2 || a11.$$typeof === y3 || a11.$$typeof === v3);
8973
+ return "string" === typeof a11 || "function" === typeof a11 || a11 === e || a11 === m2 || a11 === g2 || a11 === f3 || a11 === p2 || a11 === q3 || "object" === typeof a11 && null !== a11 && (a11.$$typeof === t2 || a11.$$typeof === r2 || a11.$$typeof === h2 || a11.$$typeof === k3 || a11.$$typeof === n2 || a11.$$typeof === w2 || a11.$$typeof === x2 || a11.$$typeof === y3 || a11.$$typeof === v2);
8974
8974
  };
8975
8975
  exports.typeOf = z3;
8976
8976
  }
@@ -12134,12 +12134,12 @@ var formatBytes = (bytes, unit = "B", decimals = 2) => {
12134
12134
  if (!bytes) {
12135
12135
  return "-";
12136
12136
  }
12137
- const k2 = 1024;
12137
+ const k3 = 1024;
12138
12138
  const dm2 = decimals < 0 ? 0 : decimals;
12139
12139
  const sizes = ["", "K", "M", "G", "T", "P", "E", "Z", "Y"].map((size) => size + unit);
12140
- let i2 = Math.floor(Math.log(bytes) / Math.log(k2));
12140
+ let i2 = Math.floor(Math.log(bytes) / Math.log(k3));
12141
12141
  i2 === 0 && i2++;
12142
- return `${parseFloat((bytes / Math.pow(k2, i2)).toFixed(dm2))} ${sizes[i2]}`;
12142
+ return `${parseFloat((bytes / Math.pow(k3, i2)).toFixed(dm2))} ${sizes[i2]}`;
12143
12143
  };
12144
12144
 
12145
12145
  // src/Stats/StyledStats.tsx
@@ -16070,8 +16070,8 @@ var PipManager = class {
16070
16070
  /**
16071
16071
  * @private {boolean} on - whether pip is on/off
16072
16072
  */
16073
- this.callListeners = (on3) => {
16074
- this.listeners.forEach((listener) => listener == null ? void 0 : listener(on3));
16073
+ this.callListeners = (on2) => {
16074
+ this.listeners.forEach((listener) => listener == null ? void 0 : listener(on2));
16075
16075
  };
16076
16076
  this.reset();
16077
16077
  }
@@ -17776,8 +17776,8 @@ var createSelector = createSelectorCreator(defaultMemoize);
17776
17776
  // ../hms-video-store/dist/index.js
17777
17777
  var import_ua_parser_js = __toESM(require_ua_parser());
17778
17778
  var import_lodash3 = __toESM(require_lodash2());
17779
- import { v4 as no } from "uuid";
17780
- import { v4 as ao } from "uuid";
17779
+ import { v4 as co } from "uuid";
17780
+ import { v4 as oo } from "uuid";
17781
17781
 
17782
17782
  // ../../node_modules/webrtc-adapter/src/js/adapter_core.js
17783
17783
  init_define_process_env();
@@ -18208,11 +18208,11 @@ function shimOnTrack(window2) {
18208
18208
  get() {
18209
18209
  return this._ontrack;
18210
18210
  },
18211
- set(f2) {
18211
+ set(f3) {
18212
18212
  if (this._ontrack) {
18213
18213
  this.removeEventListener("track", this._ontrack);
18214
18214
  }
18215
- this.addEventListener("track", this._ontrack = f2);
18215
+ this.addEventListener("track", this._ontrack = f3);
18216
18216
  },
18217
18217
  enumerable: true,
18218
18218
  configurable: true
@@ -19195,12 +19195,12 @@ function shimRemoteStreamsAPI(window2) {
19195
19195
  get() {
19196
19196
  return this._onaddstream;
19197
19197
  },
19198
- set(f2) {
19198
+ set(f3) {
19199
19199
  if (this._onaddstream) {
19200
19200
  this.removeEventListener("addstream", this._onaddstream);
19201
19201
  this.removeEventListener("track", this._onaddstreampoly);
19202
19202
  }
19203
- this.addEventListener("addstream", this._onaddstream = f2);
19203
+ this.addEventListener("addstream", this._onaddstream = f3);
19204
19204
  this.addEventListener("track", this._onaddstreampoly = (e) => {
19205
19205
  e.streams.forEach((stream) => {
19206
19206
  if (!this._remoteStreams) {
@@ -19875,10 +19875,10 @@ var adapter_core_default = adapter;
19875
19875
 
19876
19876
  // ../hms-video-store/dist/index.js
19877
19877
  var import_lodash4 = __toESM(require_lodash2());
19878
- import { v4 as fo } from "uuid";
19879
- import { v4 as ko } from "uuid";
19880
- import { v4 as Ro } from "uuid";
19881
- import { EventEmitter2 as Io } from "eventemitter2";
19878
+ import { v4 as vo } from "uuid";
19879
+ import { v4 as Po } from "uuid";
19880
+ import { v4 as Io } from "uuid";
19881
+ import { EventEmitter2 as Ao } from "eventemitter2";
19882
19882
 
19883
19883
  // ../../node_modules/immer/dist/immer.esm.mjs
19884
19884
  init_define_process_env();
@@ -20012,14 +20012,14 @@ function M(n2, r2, t2) {
20012
20012
  }
20013
20013
  return e.o;
20014
20014
  }
20015
- function A(e, i2, o2, a11, c3, s2, v3) {
20015
+ function A(e, i2, o2, a11, c3, s2, v2) {
20016
20016
  if ("production" !== define_process_env_default.NODE_ENV && c3 === o2 && n(5), r(c3)) {
20017
20017
  var p2 = M(e, c3, s2 && i2 && 3 !== i2.i && !u(i2.R, a11) ? s2.concat(a11) : void 0);
20018
20018
  if (f(o2, a11, p2), !r(p2))
20019
20019
  return;
20020
20020
  e.m = false;
20021
20021
  } else
20022
- v3 && o2.add(c3);
20022
+ v2 && o2.add(c3);
20023
20023
  if (t(c3) && !y(c3)) {
20024
20024
  if (!e.h.D && e._ < 1)
20025
20025
  return;
@@ -20052,8 +20052,8 @@ function N(n2, r2, t2) {
20052
20052
  var e = s(r2) ? b("MapSet").F(r2, t2) : v(r2) ? b("MapSet").T(r2, t2) : n2.O ? function(n3, r3) {
20053
20053
  var t3 = Array.isArray(n3), e2 = { i: t3 ? 1 : 0, A: r3 ? r3.A : _(), P: false, I: false, R: {}, l: r3, t: n3, k: null, o: null, j: null, C: false }, i2 = e2, o2 = en;
20054
20054
  t3 && (i2 = [e2], o2 = on);
20055
- var u2 = Proxy.revocable(i2, o2), a11 = u2.revoke, f2 = u2.proxy;
20056
- return e2.k = f2, e2.j = a11, f2;
20055
+ var u2 = Proxy.revocable(i2, o2), a11 = u2.revoke, f3 = u2.proxy;
20056
+ return e2.k = f3, e2.j = a11, f3;
20057
20057
  }(r2, t2) : b("ES5").J(r2, t2);
20058
20058
  return (t2 ? t2.A : _()).p.push(e), e;
20059
20059
  }
@@ -20186,26 +20186,26 @@ var un = function() {
20186
20186
  });
20187
20187
  };
20188
20188
  }
20189
- var f2;
20189
+ var f3;
20190
20190
  if ("function" != typeof i3 && n(6), void 0 !== o2 && "function" != typeof o2 && n(7), t(r3)) {
20191
- var c3 = w(e2), s2 = N(e2, r3, void 0), v3 = true;
20191
+ var c3 = w(e2), s2 = N(e2, r3, void 0), v2 = true;
20192
20192
  try {
20193
- f2 = i3(s2), v3 = false;
20193
+ f3 = i3(s2), v2 = false;
20194
20194
  } finally {
20195
- v3 ? g(c3) : O(c3);
20195
+ v2 ? g(c3) : O(c3);
20196
20196
  }
20197
- return "undefined" != typeof Promise && f2 instanceof Promise ? f2.then(function(n2) {
20197
+ return "undefined" != typeof Promise && f3 instanceof Promise ? f3.then(function(n2) {
20198
20198
  return j(c3, o2), P3(n2, c3);
20199
20199
  }, function(n2) {
20200
20200
  throw g(c3), n2;
20201
- }) : (j(c3, o2), P3(f2, c3));
20201
+ }) : (j(c3, o2), P3(f3, c3));
20202
20202
  }
20203
20203
  if (!r3 || "object" != typeof r3) {
20204
- if (void 0 === (f2 = i3(r3)) && (f2 = r3), f2 === H && (f2 = void 0), e2.D && d(f2, true), o2) {
20204
+ if (void 0 === (f3 = i3(r3)) && (f3 = r3), f3 === H && (f3 = void 0), e2.D && d(f3, true), o2) {
20205
20205
  var p2 = [], l2 = [];
20206
- b("Patches").M(r3, f2, p2, l2), o2(p2, l2);
20206
+ b("Patches").M(r3, f3, p2, l2), o2(p2, l2);
20207
20207
  }
20208
- return f2;
20208
+ return f3;
20209
20209
  }
20210
20210
  n(21, r3);
20211
20211
  }, this.produceWithPatches = function(n2, r3) {
@@ -20327,42 +20327,42 @@ function create(createState) {
20327
20327
  var vanilla_default = create;
20328
20328
 
20329
20329
  // ../hms-video-store/dist/index.js
20330
- var Kt = __toESM(require_lib());
20331
- import { EventEmitter2 as en2 } from "eventemitter2";
20332
- import { v4 as on2 } from "uuid";
20333
- import { EventEmitter2 as nn2 } from "eventemitter2";
20334
- import cn2 from "eventemitter2";
20335
- import { v4 as dn2 } from "uuid";
20336
- import { v4 as pn2 } from "uuid";
20337
- var qa = Object.defineProperty;
20338
- var ja = Object.defineProperties;
20339
- var Ja = Object.getOwnPropertyDescriptors;
20340
- var ei = Object.getOwnPropertySymbols;
20341
- var Qa = Object.getPrototypeOf;
20330
+ var $t = __toESM(require_lib());
20331
+ import { EventEmitter2 as tn2 } from "eventemitter2";
20332
+ import { v4 as nn2 } from "uuid";
20333
+ import { EventEmitter2 as cn2 } from "eventemitter2";
20334
+ import dn2 from "eventemitter2";
20335
+ import { v4 as ln2 } from "uuid";
20336
+ import { v4 as hn } from "uuid";
20337
+ var ja = Object.defineProperty;
20338
+ var Ja = Object.defineProperties;
20339
+ var Qa = Object.getOwnPropertyDescriptors;
20340
+ var Zt = Object.getOwnPropertySymbols;
20341
+ var za = Object.getPrototypeOf;
20342
20342
  var is = Object.prototype.hasOwnProperty;
20343
20343
  var rs = Object.prototype.propertyIsEnumerable;
20344
- var za = Reflect.get;
20345
- var ts = (a11, e, t2) => e in a11 ? qa(a11, e, { enumerable: true, configurable: true, writable: true, value: t2 }) : a11[e] = t2;
20344
+ var Ya = Reflect.get;
20345
+ var ts = (a11, e, t2) => e in a11 ? ja(a11, e, { enumerable: true, configurable: true, writable: true, value: t2 }) : a11[e] = t2;
20346
20346
  var m = (a11, e) => {
20347
20347
  for (var t2 in e || (e = {}))
20348
20348
  is.call(e, t2) && ts(a11, t2, e[t2]);
20349
- if (ei)
20350
- for (var t2 of ei(e))
20349
+ if (Zt)
20350
+ for (var t2 of Zt(e))
20351
20351
  rs.call(e, t2) && ts(a11, t2, e[t2]);
20352
20352
  return a11;
20353
20353
  };
20354
- var M2 = (a11, e) => ja(a11, Ja(e));
20354
+ var M2 = (a11, e) => Ja(a11, Qa(e));
20355
20355
  var mr = (a11, e) => {
20356
20356
  var t2 = {};
20357
20357
  for (var i2 in a11)
20358
20358
  is.call(a11, i2) && e.indexOf(i2) < 0 && (t2[i2] = a11[i2]);
20359
- if (a11 != null && ei)
20360
- for (var i2 of ei(a11))
20359
+ if (a11 != null && Zt)
20360
+ for (var i2 of Zt(a11))
20361
20361
  e.indexOf(i2) < 0 && rs.call(a11, i2) && (t2[i2] = a11[i2]);
20362
20362
  return t2;
20363
20363
  };
20364
- var Ya = (a11, e) => () => (e || a11((e = { exports: {} }).exports, e), e.exports);
20365
- var J = (a11, e, t2) => za(Qa(a11), t2, e);
20364
+ var Xa = (a11, e) => () => (e || a11((e = { exports: {} }).exports, e), e.exports);
20365
+ var J = (a11, e, t2) => Ya(za(a11), t2, e);
20366
20366
  var c2 = (a11, e, t2) => new Promise((i2, r2) => {
20367
20367
  var s2 = (l2) => {
20368
20368
  try {
@@ -20379,38 +20379,38 @@ var c2 = (a11, e, t2) => new Promise((i2, r2) => {
20379
20379
  }, n2 = (l2) => l2.done ? i2(l2.value) : Promise.resolve(l2.value).then(s2, o2);
20380
20380
  n2((t2 = t2.apply(a11, e)).next());
20381
20381
  });
20382
- var Mr = Ya((Vc, oo) => {
20383
- oo.exports = { version: "0.12.14-alpha.8", license: "MIT", repository: { type: "git", url: "https://github.com/100mslive/web-sdks.git", directory: "packages/hms-video-store" }, main: "dist/index.cjs.js", module: "dist/index.js", typings: "dist/index.d.ts", files: ["dist", "src"], engines: { node: ">=12" }, exports: { ".": { require: "./dist/index.cjs.js", import: "./dist/index.js", default: "./dist/index.js" } }, sideEffects: false, scripts: { prestart: "rm -rf dist && yarn types:build", start: 'concurrently "yarn dev" "yarn types"', dev: "node ../../scripts/dev", "build:only": "node ../../scripts/build", build: "yarn build:only && yarn types:build", types: "tsc -w", "types:build": "tsc -p tsconfig.json", format: "prettier --write src/**/*.ts", test: "jest --maxWorkers=1", "test:watch": "jest --watch", "test:coverage": "jest --coverage", lint: "eslint -c ../../.eslintrc .", "lint:fix": "yarn lint --fix", prepare: "yarn build", size: "size-limit", analyze: "size-limit --why", docs: "rm -rf ./docs && typedoc && rm -f ./docs/README.md && mkdir ./docs/home &&mv ./docs/modules.md ./docs/home/content.md && node ../../scripts/docs-store && npx prettier --write './docs/**/*'" }, name: "@100mslive/hms-video-store", author: "100ms", dependencies: { eventemitter2: "^6.4.9", immer: "^9.0.6", "lodash.isequal": "^4.5.0", reselect: "4.0.0", "sdp-transform": "^2.14.1", "ua-parser-js": "^1.0.1", uuid: "^8.3.2", "webrtc-adapter": "^8.0.0", zustand: "3.5.7" }, devDependencies: { "@types/dom-screen-wake-lock": "^1.0.1", "@types/lodash.isequal": "^4.5.8", "@types/sdp-transform": "^2.4.4", "@types/ua-parser-js": "^0.7.36", "@types/uuid": "^8.3.0", "jest-canvas-mock": "^2.3.1", "jsdom-worker": "^0.3.0", tslib: "^2.2.0" }, description: "@100mslive Core SDK which abstracts the complexities of webRTC while providing a reactive store for data management with a unidirectional data flow", keywords: ["video", "webrtc", "conferencing", "100ms"] };
20382
+ var Mr = Xa((Fc, no) => {
20383
+ no.exports = { version: "0.12.14", license: "MIT", repository: { type: "git", url: "https://github.com/100mslive/web-sdks.git", directory: "packages/hms-video-store" }, main: "dist/index.cjs.js", module: "dist/index.js", typings: "dist/index.d.ts", files: ["dist", "src"], engines: { node: ">=12" }, exports: { ".": { require: "./dist/index.cjs.js", import: "./dist/index.js", default: "./dist/index.js" } }, sideEffects: false, scripts: { prestart: "rm -rf dist && yarn types:build", start: 'concurrently "yarn dev" "yarn types"', dev: "node ../../scripts/dev", "build:only": "node ../../scripts/build", build: "yarn build:only && yarn types:build", types: "tsc -w", "types:build": "tsc -p tsconfig.json", format: "prettier --write src/**/*.ts", test: "jest --maxWorkers=1", "test:watch": "jest --watch", "test:coverage": "jest --coverage", lint: "eslint -c ../../.eslintrc .", "lint:fix": "yarn lint --fix", prepare: "yarn build", size: "size-limit", analyze: "size-limit --why", docs: "rm -rf ./docs && typedoc && rm -f ./docs/README.md && mkdir ./docs/home &&mv ./docs/modules.md ./docs/home/content.md && node ../../scripts/docs-store && npx prettier --write './docs/**/*'" }, name: "@100mslive/hms-video-store", author: "100ms", dependencies: { eventemitter2: "^6.4.9", immer: "^9.0.6", "lodash.isequal": "^4.5.0", reselect: "4.0.0", "sdp-transform": "^2.14.1", "ua-parser-js": "^1.0.1", uuid: "^8.3.2", "webrtc-adapter": "^8.0.0", zustand: "3.5.7" }, devDependencies: { "@types/dom-screen-wake-lock": "^1.0.1", "@types/lodash.isequal": "^4.5.8", "@types/sdp-transform": "^2.4.4", "@types/ua-parser-js": "^0.7.36", "@types/uuid": "^8.3.0", "jest-canvas-mock": "^2.3.1", "jsdom-worker": "^0.3.0", tslib: "^2.2.0" }, description: "@100mslive Core SDK which abstracts the complexities of webRTC while providing a reactive store for data management with a unidirectional data flow", keywords: ["video", "webrtc", "conferencing", "100ms"] };
20384
20384
  });
20385
20385
  var Sr = ((n2) => (n2.Disconnected = "Disconnected", n2.Preview = "Preview", n2.Connecting = "Connecting", n2.Connected = "Connected", n2.Reconnecting = "Reconnecting", n2.Disconnecting = "Disconnecting", n2.Failed = "Failed", n2))(Sr || {});
20386
- var ti = () => ({ room: { id: "", isConnected: false, name: "", peers: [], localPeer: "", roomState: "Disconnected", recording: { browser: { running: false }, server: { running: false }, hls: { running: false } }, rtmp: { running: false }, hls: { running: false, variants: [] }, sessionId: "" }, peers: {}, tracks: {}, playlist: { audio: { list: {}, selection: { id: "", hasPrevious: false, hasNext: false }, progress: 0, volume: 0, currentTime: 0, playbackRate: 1 }, video: { list: {}, selection: { id: "", hasPrevious: false, hasNext: false }, progress: 0, volume: 0, currentTime: 0, playbackRate: 1 } }, messages: { byID: {}, allIDs: [] }, speakers: {}, connectionQualities: {}, settings: { audioInputDeviceId: "", audioOutputDeviceId: "", videoInputDeviceId: "" }, devices: { audioInput: [], audioOutput: [], videoInput: [] }, roles: {}, roleChangeRequests: [], errors: [], sessionStore: {}, templateAppData: {}, polls: {}, whiteboards: {}, hideLocalPeer: false });
20387
- var ii = () => ({ peerStats: {}, remoteTrackStats: {}, localTrackStats: {}, localPeer: { id: "" } });
20388
- var Xa = ((e) => (e.CHAT = "chat", e))(Xa || {});
20386
+ var ei = () => ({ room: { id: "", isConnected: false, name: "", peers: [], localPeer: "", roomState: "Disconnected", recording: { browser: { running: false }, server: { running: false }, hls: { running: false } }, rtmp: { running: false }, hls: { running: false, variants: [] }, sessionId: "" }, peers: {}, tracks: {}, playlist: { audio: { list: {}, selection: { id: "", hasPrevious: false, hasNext: false }, progress: 0, volume: 0, currentTime: 0, playbackRate: 1 }, video: { list: {}, selection: { id: "", hasPrevious: false, hasNext: false }, progress: 0, volume: 0, currentTime: 0, playbackRate: 1 } }, messages: { byID: {}, allIDs: [] }, speakers: {}, connectionQualities: {}, settings: { audioInputDeviceId: "", audioOutputDeviceId: "", videoInputDeviceId: "" }, devices: { audioInput: [], audioOutput: [], videoInput: [] }, roles: {}, roleChangeRequests: [], errors: [], sessionStore: {}, templateAppData: {}, polls: {}, whiteboards: {}, hideLocalPeer: false });
20387
+ var ti = () => ({ peerStats: {}, remoteTrackStats: {}, localTrackStats: {}, localPeer: { id: "" } });
20388
+ var Za = ((e) => (e.CHAT = "chat", e))(Za || {});
20389
20389
  var ss = ((t2) => (t2.INFO = "info", t2.ERROR = "error", t2))(ss || {});
20390
20390
  var gr = ((D2) => (D2.PEER_JOINED = "PEER_JOINED", D2.PEER_LEFT = "PEER_LEFT", D2.PEER_LIST = "PEER_LIST", D2.NEW_MESSAGE = "NEW_MESSAGE", D2.ERROR = "ERROR", D2.RECONNECTING = "RECONNECTING", D2.RECONNECTED = "RECONNECTED", D2.TRACK_ADDED = "TRACK_ADDED", D2.TRACK_REMOVED = "TRACK_REMOVED", D2.TRACK_MUTED = "TRACK_MUTED", D2.TRACK_UNMUTED = "TRACK_UNMUTED", D2.TRACK_DEGRADED = "TRACK_DEGRADED", D2.TRACK_RESTORED = "TRACK_RESTORED", D2.TRACK_DESCRIPTION_CHANGED = "TRACK_DESCRIPTION_CHANGED", D2.ROLE_UPDATED = "ROLE_UPDATED", D2.CHANGE_TRACK_STATE_REQUEST = "CHANGE_TRACK_STATE_REQUEST", D2.CHANGE_MULTI_TRACK_STATE_REQUEST = "CHANGE_MULTI_TRACK_STATE_REQUEST", D2.ROOM_ENDED = "ROOM_ENDED", D2.REMOVED_FROM_ROOM = "REMOVED_FROM_ROOM", D2.DEVICE_CHANGE_UPDATE = "DEVICE_CHANGE_UPDATE", D2.PLAYLIST_TRACK_ENDED = "PLAYLIST_TRACK_ENDED", D2.NAME_UPDATED = "NAME_UPDATED", D2.METADATA_UPDATED = "METADATA_UPDATED", D2.POLL_CREATED = "POLL_CREATED", D2.POLL_STARTED = "POLL_STARTED", D2.POLL_STOPPED = "POLL_STOPPED", D2.POLL_VOTES_UPDATED = "POLL_VOTES_UPDATED", D2.POLLS_LIST = "POLLS_LIST", D2.HAND_RAISE_CHANGED = "HAND_RAISE_CHANGED", D2.TRANSCRIPTION_STATE_UPDATED = "TRANSCRIPTION_STATE_UPDATED", D2))(gr || {});
20391
20391
  var as = ((t2) => (t2.audio = "audio", t2.video = "video", t2))(as || {});
20392
- function Ue(a11, e) {
20392
+ function xe(a11, e) {
20393
20393
  let t2, i2;
20394
20394
  if (e)
20395
20395
  for (let r2 of e.auxiliaryTracks) {
20396
20396
  let s2 = a11[r2];
20397
- Za(s2) && (i2 = pt(s2) ? s2 : i2, t2 = ht(s2) ? s2 : t2);
20397
+ eo(s2) && (i2 = ut(s2) ? s2 : i2, t2 = pt(s2) ? s2 : t2);
20398
20398
  }
20399
20399
  return { video: t2, audio: i2 };
20400
20400
  }
20401
- function pt(a11) {
20401
+ function ut(a11) {
20402
20402
  return a11 && a11.type === "audio";
20403
20403
  }
20404
- function ht(a11) {
20404
+ function pt(a11) {
20405
20405
  return a11 && a11.type === "video";
20406
20406
  }
20407
- function Za(a11) {
20407
+ function eo(a11) {
20408
20408
  return a11 && a11.source === "screen";
20409
20409
  }
20410
- function ri(a11) {
20410
+ function ii(a11) {
20411
20411
  return a11 && a11.source === "audioplaylist";
20412
20412
  }
20413
- function mt(a11) {
20413
+ function ht(a11) {
20414
20414
  return a11 && a11.source === "videoplaylist";
20415
20415
  }
20416
20416
  function os(a11) {
@@ -20422,13 +20422,13 @@ function je(a11, e) {
20422
20422
  function ns(a11, e) {
20423
20423
  return e && a11.tracks[e] ? a11.tracks[e].displayEnabled : false;
20424
20424
  }
20425
- function St(a11) {
20425
+ function mt(a11) {
20426
20426
  var r2;
20427
20427
  let e = false, t2 = false, i2 = false;
20428
20428
  return (r2 = a11 == null ? void 0 : a11.publishParams) != null && r2.allowed && (e = a11.publishParams.allowed.includes("video"), t2 = a11.publishParams.allowed.includes("audio"), i2 = a11.publishParams.allowed.includes("screen")), { video: e, audio: t2, screen: i2 };
20429
20429
  }
20430
20430
  var cs = ((l2) => (l2[l2.VERBOSE = 0] = "VERBOSE", l2[l2.DEBUG = 1] = "DEBUG", l2[l2.INFO = 2] = "INFO", l2[l2.WARN = 3] = "WARN", l2[l2.TIME = 4] = "TIME", l2[l2.TIMEEND = 5] = "TIMEEND", l2[l2.ERROR = 6] = "ERROR", l2[l2.NONE = 7] = "NONE", l2))(cs || {});
20431
- var eo = typeof window != "undefined" && typeof window.expect != "undefined";
20431
+ var to = typeof window != "undefined" && typeof window.expect != "undefined";
20432
20432
  var d2 = class {
20433
20433
  static v(e, ...t2) {
20434
20434
  this.log(0, e, ...t2);
@@ -20494,7 +20494,7 @@ var d2 = class {
20494
20494
  }
20495
20495
  }
20496
20496
  };
20497
- d2.level = eo ? 7 : 0;
20497
+ d2.level = to ? 7 : 0;
20498
20498
  var Je = class {
20499
20499
  constructor(e) {
20500
20500
  this.tracks = new Array();
@@ -20507,9 +20507,9 @@ var Je = class {
20507
20507
  var ge = new import_ua_parser_js.UAParser();
20508
20508
  var O2 = typeof window != "undefined";
20509
20509
  var ds;
20510
- var Be = typeof window == "undefined" && !((ds = ge.getBrowser().name) != null && ds.toLowerCase().includes("electron"));
20511
- var io = () => !Be;
20512
- var tc = io();
20510
+ var Ue = typeof window == "undefined" && !((ds = ge.getBrowser().name) != null && ds.toLowerCase().includes("electron"));
20511
+ var ro = () => !Ue;
20512
+ var ic = ro();
20513
20513
  var Te = () => ge.getDevice().type === "mobile";
20514
20514
  var ps = () => typeof document != "undefined" && document.hidden;
20515
20515
  var Tr = () => {
@@ -20519,7 +20519,7 @@ var Tr = () => {
20519
20519
  var ls;
20520
20520
  var us;
20521
20521
  var hs = ((us = (ls = ge.getBrowser()) == null ? void 0 : ls.name) == null ? void 0 : us.toLowerCase()) === "firefox";
20522
- var si = (a11) => a11 ? `{
20522
+ var ri = (a11) => a11 ? `{
20523
20523
  trackId: ${a11.id};
20524
20524
  kind: ${a11.kind};
20525
20525
  enabled: ${a11.enabled};
@@ -20565,7 +20565,7 @@ var Re = class {
20565
20565
  logIdentifier: ${this.logIdentifier};
20566
20566
  source: ${this.source};
20567
20567
  enabled: ${this.enabled};
20568
- nativeTrack: ${si(this.nativeTrack)};
20568
+ nativeTrack: ${ri(this.nativeTrack)};
20569
20569
  }`;
20570
20570
  }
20571
20571
  };
@@ -20624,16 +20624,16 @@ var Ie = class extends Re {
20624
20624
  }
20625
20625
  };
20626
20626
  var ms = ((i2) => (i2.CUSTOM = "CUSTOM", i2.LOCAL = "LOCAL", i2.HMS = "HMS", i2))(ms || {});
20627
- function ro() {
20627
+ function so() {
20628
20628
  if (O2 && window) {
20629
20629
  let a11 = window.location.hostname;
20630
20630
  return a11 === "localhost" || a11 === "127.0.0.1" ? "LOCAL" : a11.includes("app.100ms.live") ? "HMS" : "CUSTOM";
20631
20631
  }
20632
20632
  return "CUSTOM";
20633
20633
  }
20634
- var Qe = ro();
20635
- var E2 = { WebSocketConnectionErrors: { FAILED_TO_CONNECT: 1e3, WEBSOCKET_CONNECTION_LOST: 1003, ABNORMAL_CLOSE: 1006 }, APIErrors: { SERVER_ERRORS: 2e3, INIT_CONFIG_NOT_AVAILABLE: 2002, ENDPOINT_UNREACHABLE: 2003, INVALID_TOKEN_FORMAT: 2004 }, TracksErrors: { GENERIC_TRACK: 3e3, CANT_ACCESS_CAPTURE_DEVICE: 3001, DEVICE_NOT_AVAILABLE: 3002, DEVICE_IN_USE: 3003, DEVICE_LOST_MIDWAY: 3004, NOTHING_TO_RETURN: 3005, INVALID_VIDEO_SETTINGS: 3006, CODEC_CHANGE_NOT_PERMITTED: 3007, AUTOPLAY_ERROR: 3008, OVER_CONSTRAINED: 3009, NO_AUDIO_DETECTED: 3010, SYSTEM_DENIED_PERMISSION: 3011, CURRENT_TAB_NOT_SHARED: 3012, AUDIO_PLAYBACK_ERROR: 3013, SELECTED_DEVICE_MISSING: 3014 }, WebrtcErrors: { CREATE_OFFER_FAILED: 4001, CREATE_ANSWER_FAILED: 4002, SET_LOCAL_DESCRIPTION_FAILED: 4003, SET_REMOTE_DESCRIPTION_FAILED: 4004, ICE_FAILURE: 4005, ICE_DISCONNECTED: 4006, STATS_FAILED: 4007 }, WebsocketMethodErrors: { SERVER_ERRORS: 5e3, ALREADY_JOINED: 5001, CANNOT_JOIN_PREVIEW_IN_PROGRESS: 5002 }, GenericErrors: { NOT_CONNECTED: 6e3, SIGNALLING: 6001, UNKNOWN: 6002, NOT_READY: 6003, JSON_PARSING_FAILED: 6004, TRACK_METADATA_MISSING: 6005, RTC_TRACK_MISSING: 6006, PEER_METADATA_MISSING: 6007, INVALID_ROLE: 6008, PREVIEW_IN_PROGRESS: 6009, MISSING_MEDIADEVICES: 6010, MISSING_RTCPEERCONNECTION: 6011, LOCAL_STORAGE_ACCESS_DENIED: 6012, VALIDATION_FAILED: 6013 }, PlaylistErrors: { NO_ENTRY_TO_PLAY: 8001, NO_ENTRY_IS_PLAYING: 8002 } };
20636
- var v2 = class a2 extends Error {
20634
+ var Qe = so();
20635
+ var k2 = { WebSocketConnectionErrors: { FAILED_TO_CONNECT: 1e3, WEBSOCKET_CONNECTION_LOST: 1003, ABNORMAL_CLOSE: 1006 }, APIErrors: { SERVER_ERRORS: 2e3, INIT_CONFIG_NOT_AVAILABLE: 2002, ENDPOINT_UNREACHABLE: 2003, INVALID_TOKEN_FORMAT: 2004 }, TracksErrors: { GENERIC_TRACK: 3e3, CANT_ACCESS_CAPTURE_DEVICE: 3001, DEVICE_NOT_AVAILABLE: 3002, DEVICE_IN_USE: 3003, DEVICE_LOST_MIDWAY: 3004, NOTHING_TO_RETURN: 3005, INVALID_VIDEO_SETTINGS: 3006, CODEC_CHANGE_NOT_PERMITTED: 3007, AUTOPLAY_ERROR: 3008, OVER_CONSTRAINED: 3009, NO_AUDIO_DETECTED: 3010, SYSTEM_DENIED_PERMISSION: 3011, CURRENT_TAB_NOT_SHARED: 3012, AUDIO_PLAYBACK_ERROR: 3013, SELECTED_DEVICE_MISSING: 3014 }, WebrtcErrors: { CREATE_OFFER_FAILED: 4001, CREATE_ANSWER_FAILED: 4002, SET_LOCAL_DESCRIPTION_FAILED: 4003, SET_REMOTE_DESCRIPTION_FAILED: 4004, ICE_FAILURE: 4005, ICE_DISCONNECTED: 4006, STATS_FAILED: 4007 }, WebsocketMethodErrors: { SERVER_ERRORS: 5e3, ALREADY_JOINED: 5001, CANNOT_JOIN_PREVIEW_IN_PROGRESS: 5002 }, GenericErrors: { NOT_CONNECTED: 6e3, SIGNALLING: 6001, UNKNOWN: 6002, NOT_READY: 6003, JSON_PARSING_FAILED: 6004, TRACK_METADATA_MISSING: 6005, RTC_TRACK_MISSING: 6006, PEER_METADATA_MISSING: 6007, INVALID_ROLE: 6008, PREVIEW_IN_PROGRESS: 6009, MISSING_MEDIADEVICES: 6010, MISSING_RTCPEERCONNECTION: 6011, LOCAL_STORAGE_ACCESS_DENIED: 6012, VALIDATION_FAILED: 6013 }, PlaylistErrors: { NO_ENTRY_TO_PLAY: 8001, NO_ENTRY_IS_PLAYING: 8002 } };
20636
+ var f2 = class a2 extends Error {
20637
20637
  constructor(t2, i2, r2, s2, o2, n2 = false) {
20638
20638
  super(s2);
20639
20639
  this.code = t2;
@@ -20676,113 +20676,113 @@ function fr(a11) {
20676
20676
  return "NONE";
20677
20677
  }
20678
20678
  }
20679
- var so = ["join", "offer", "answer", "trickle", "on-error", "JOIN"];
20679
+ var ao = ["join", "offer", "answer", "trickle", "on-error", "JOIN"];
20680
20680
  var S2 = { WebSocketConnectionErrors: { FailedToConnect(a11, e = "") {
20681
- return new v2(E2.WebSocketConnectionErrors.FAILED_TO_CONNECT, "WebsocketFailedToConnect", a11, `[WS]: ${e}`, `[WS]: ${e}`);
20681
+ return new f2(k2.WebSocketConnectionErrors.FAILED_TO_CONNECT, "WebsocketFailedToConnect", a11, `[WS]: ${e}`, `[WS]: ${e}`);
20682
20682
  }, WebSocketConnectionLost(a11, e = "") {
20683
- return new v2(E2.WebSocketConnectionErrors.WEBSOCKET_CONNECTION_LOST, "WebSocketConnectionLost", a11, "Network connection lost", e);
20683
+ return new f2(k2.WebSocketConnectionErrors.WEBSOCKET_CONNECTION_LOST, "WebSocketConnectionLost", a11, "Network connection lost", e);
20684
20684
  }, AbnormalClose(a11, e = "") {
20685
- return new v2(E2.WebSocketConnectionErrors.ABNORMAL_CLOSE, "WebSocketAbnormalClose", a11, "Websocket closed abnormally", e);
20685
+ return new f2(k2.WebSocketConnectionErrors.ABNORMAL_CLOSE, "WebSocketAbnormalClose", a11, "Websocket closed abnormally", e);
20686
20686
  } }, APIErrors: { ServerErrors(a11, e, t2 = "", i2 = true) {
20687
- return new v2(a11, "ServerErrors", e, `[${e}]: Server error ${t2}`, t2, i2);
20687
+ return new f2(a11, "ServerErrors", e, `[${e}]: Server error ${t2}`, t2, i2);
20688
20688
  }, EndpointUnreachable(a11, e = "") {
20689
- return new v2(E2.APIErrors.ENDPOINT_UNREACHABLE, "EndpointUnreachable", a11, `Endpoint is not reachable - ${e}`, e);
20689
+ return new f2(k2.APIErrors.ENDPOINT_UNREACHABLE, "EndpointUnreachable", a11, `Endpoint is not reachable - ${e}`, e);
20690
20690
  }, InvalidTokenFormat(a11, e = "") {
20691
- return new v2(E2.APIErrors.INVALID_TOKEN_FORMAT, "InvalidTokenFormat", a11, `Token is not in proper JWT format - ${e}`, e, true);
20691
+ return new f2(k2.APIErrors.INVALID_TOKEN_FORMAT, "InvalidTokenFormat", a11, `Token is not in proper JWT format - ${e}`, e, true);
20692
20692
  }, InitConfigNotAvailable(a11, e = "") {
20693
- return new v2(E2.APIErrors.INIT_CONFIG_NOT_AVAILABLE, "InitError", a11, `[INIT]: ${e}`, `[INIT]: ${e}`);
20693
+ return new f2(k2.APIErrors.INIT_CONFIG_NOT_AVAILABLE, "InitError", a11, `[INIT]: ${e}`, `[INIT]: ${e}`);
20694
20694
  } }, TracksErrors: { GenericTrack(a11, e = "") {
20695
- return new v2(E2.TracksErrors.GENERIC_TRACK, "GenericTrack", a11, `[TRACK]: ${e}`, `[TRACK]: ${e}`);
20695
+ return new f2(k2.TracksErrors.GENERIC_TRACK, "GenericTrack", a11, `[TRACK]: ${e}`, `[TRACK]: ${e}`);
20696
20696
  }, CantAccessCaptureDevice(a11, e, t2 = "") {
20697
- return new v2(E2.TracksErrors.CANT_ACCESS_CAPTURE_DEVICE, "CantAccessCaptureDevice", a11, `User denied permission to access capture device - ${e}`, t2);
20697
+ return new f2(k2.TracksErrors.CANT_ACCESS_CAPTURE_DEVICE, "CantAccessCaptureDevice", a11, `User denied permission to access capture device - ${e}`, t2);
20698
20698
  }, DeviceNotAvailable(a11, e, t2 = "") {
20699
- return new v2(E2.TracksErrors.DEVICE_NOT_AVAILABLE, "DeviceNotAvailable", a11, `[TRACK]: Capture device is no longer available - ${e}`, t2);
20699
+ return new f2(k2.TracksErrors.DEVICE_NOT_AVAILABLE, "DeviceNotAvailable", a11, `[TRACK]: Capture device is no longer available - ${e}`, t2);
20700
20700
  }, DeviceInUse(a11, e, t2 = "") {
20701
- return new v2(E2.TracksErrors.DEVICE_IN_USE, "DeviceInUse", a11, `[TRACK]: Capture device is in use by another application - ${e}`, t2);
20701
+ return new f2(k2.TracksErrors.DEVICE_IN_USE, "DeviceInUse", a11, `[TRACK]: Capture device is in use by another application - ${e}`, t2);
20702
20702
  }, DeviceLostMidway(a11, e, t2 = "") {
20703
- return new v2(E2.TracksErrors.DEVICE_LOST_MIDWAY, "DeviceLostMidway", a11, `Lost access to capture device midway - ${e}`, t2);
20703
+ return new f2(k2.TracksErrors.DEVICE_LOST_MIDWAY, "DeviceLostMidway", a11, `Lost access to capture device midway - ${e}`, t2);
20704
20704
  }, NothingToReturn(a11, e = "", t2 = "There is no media to return. Please select either video or audio or both.") {
20705
- return new v2(E2.TracksErrors.NOTHING_TO_RETURN, "NothingToReturn", a11, t2, e);
20705
+ return new f2(k2.TracksErrors.NOTHING_TO_RETURN, "NothingToReturn", a11, t2, e);
20706
20706
  }, InvalidVideoSettings(a11, e = "") {
20707
- return new v2(E2.TracksErrors.INVALID_VIDEO_SETTINGS, "InvalidVideoSettings", a11, "Cannot enable simulcast when no video settings are provided", e);
20707
+ return new f2(k2.TracksErrors.INVALID_VIDEO_SETTINGS, "InvalidVideoSettings", a11, "Cannot enable simulcast when no video settings are provided", e);
20708
20708
  }, AutoplayBlocked(a11, e = "") {
20709
- return new v2(E2.TracksErrors.AUTOPLAY_ERROR, "AutoplayBlocked", a11, "Autoplay blocked because the user didn't interact with the document first", e);
20709
+ return new f2(k2.TracksErrors.AUTOPLAY_ERROR, "AutoplayBlocked", a11, "Autoplay blocked because the user didn't interact with the document first", e);
20710
20710
  }, CodecChangeNotPermitted(a11, e = "") {
20711
- return new v2(E2.TracksErrors.CODEC_CHANGE_NOT_PERMITTED, "CodecChangeNotPermitted", a11, "Codec can't be changed mid call.", e);
20711
+ return new f2(k2.TracksErrors.CODEC_CHANGE_NOT_PERMITTED, "CodecChangeNotPermitted", a11, "Codec can't be changed mid call.", e);
20712
20712
  }, OverConstrained(a11, e, t2 = "") {
20713
- return new v2(E2.TracksErrors.OVER_CONSTRAINED, "OverConstrained", a11, `[TRACK]: Requested constraints cannot be satisfied with the device hardware - ${e}`, t2);
20713
+ return new f2(k2.TracksErrors.OVER_CONSTRAINED, "OverConstrained", a11, `[TRACK]: Requested constraints cannot be satisfied with the device hardware - ${e}`, t2);
20714
20714
  }, NoAudioDetected(a11, e = "Please check the mic or use another audio input") {
20715
- return new v2(E2.TracksErrors.NO_AUDIO_DETECTED, "NoAudioDetected", a11, "No audio input detected from microphone", e);
20715
+ return new f2(k2.TracksErrors.NO_AUDIO_DETECTED, "NoAudioDetected", a11, "No audio input detected from microphone", e);
20716
20716
  }, SystemDeniedPermission(a11, e, t2 = "") {
20717
- return new v2(E2.TracksErrors.SYSTEM_DENIED_PERMISSION, "SystemDeniedPermission", a11, `Operating System denied permission to access capture device - ${e}`, t2);
20717
+ return new f2(k2.TracksErrors.SYSTEM_DENIED_PERMISSION, "SystemDeniedPermission", a11, `Operating System denied permission to access capture device - ${e}`, t2);
20718
20718
  }, CurrentTabNotShared() {
20719
- return new v2(E2.TracksErrors.CURRENT_TAB_NOT_SHARED, "CurrentTabNotShared", "TRACK", "The app requires you to share the current tab", "You must screen share the current tab in order to proceed");
20719
+ return new f2(k2.TracksErrors.CURRENT_TAB_NOT_SHARED, "CurrentTabNotShared", "TRACK", "The app requires you to share the current tab", "You must screen share the current tab in order to proceed");
20720
20720
  }, AudioPlaybackError(a11) {
20721
- return new v2(E2.TracksErrors.AUDIO_PLAYBACK_ERROR, "Audio playback error", "TRACK", a11, a11);
20721
+ return new f2(k2.TracksErrors.AUDIO_PLAYBACK_ERROR, "Audio playback error", "TRACK", a11, a11);
20722
20722
  }, SelectedDeviceMissing(a11) {
20723
- return new v2(E2.TracksErrors.SELECTED_DEVICE_MISSING, "SelectedDeviceMissing", "TRACK", `Could not detect selected ${a11} device`, `Please check connection to the ${a11} device`, false);
20723
+ return new f2(k2.TracksErrors.SELECTED_DEVICE_MISSING, "SelectedDeviceMissing", "TRACK", `Could not detect selected ${a11} device`, `Please check connection to the ${a11} device`, false);
20724
20724
  } }, WebrtcErrors: { CreateOfferFailed(a11, e = "") {
20725
- return new v2(E2.WebrtcErrors.CREATE_OFFER_FAILED, "CreateOfferFailed", a11, `[${a11.toString()}]: Failed to create offer. `, e);
20725
+ return new f2(k2.WebrtcErrors.CREATE_OFFER_FAILED, "CreateOfferFailed", a11, `[${a11.toString()}]: Failed to create offer. `, e);
20726
20726
  }, CreateAnswerFailed(a11, e = "") {
20727
- return new v2(E2.WebrtcErrors.CREATE_ANSWER_FAILED, "CreateAnswerFailed", a11, `[${a11.toString()}]: Failed to create answer. `, e);
20727
+ return new f2(k2.WebrtcErrors.CREATE_ANSWER_FAILED, "CreateAnswerFailed", a11, `[${a11.toString()}]: Failed to create answer. `, e);
20728
20728
  }, SetLocalDescriptionFailed(a11, e = "") {
20729
- return new v2(E2.WebrtcErrors.SET_LOCAL_DESCRIPTION_FAILED, "SetLocalDescriptionFailed", a11, `[${a11.toString()}]: Failed to set offer. `, e);
20729
+ return new f2(k2.WebrtcErrors.SET_LOCAL_DESCRIPTION_FAILED, "SetLocalDescriptionFailed", a11, `[${a11.toString()}]: Failed to set offer. `, e);
20730
20730
  }, SetRemoteDescriptionFailed(a11, e = "") {
20731
- return new v2(E2.WebrtcErrors.SET_REMOTE_DESCRIPTION_FAILED, "SetRemoteDescriptionFailed", a11, `[${a11.toString()}]: Failed to set answer. `, e, true);
20731
+ return new f2(k2.WebrtcErrors.SET_REMOTE_DESCRIPTION_FAILED, "SetRemoteDescriptionFailed", a11, `[${a11.toString()}]: Failed to set answer. `, e, true);
20732
20732
  }, ICEFailure(a11, e = "", t2 = false) {
20733
- return new v2(E2.WebrtcErrors.ICE_FAILURE, "ICEFailure", a11, `[${a11.toString()}]: Ice connection state FAILED`, e, t2);
20733
+ return new f2(k2.WebrtcErrors.ICE_FAILURE, "ICEFailure", a11, `[${a11.toString()}]: Ice connection state FAILED`, e, t2);
20734
20734
  }, ICEDisconnected(a11, e = "") {
20735
- return new v2(E2.WebrtcErrors.ICE_DISCONNECTED, "ICEDisconnected", a11, `[${a11.toString()}]: Ice connection state DISCONNECTED`, e);
20735
+ return new f2(k2.WebrtcErrors.ICE_DISCONNECTED, "ICEDisconnected", a11, `[${a11.toString()}]: Ice connection state DISCONNECTED`, e);
20736
20736
  }, StatsFailed(a11, e = "") {
20737
- return new v2(E2.WebrtcErrors.STATS_FAILED, "StatsFailed", a11, `Failed to WebRTC get stats - ${e}`, e);
20737
+ return new f2(k2.WebrtcErrors.STATS_FAILED, "StatsFailed", a11, `Failed to WebRTC get stats - ${e}`, e);
20738
20738
  } }, WebsocketMethodErrors: { ServerErrors(a11, e, t2) {
20739
- return new v2(a11, "ServerErrors", e, t2, t2, so.includes(e));
20739
+ return new f2(a11, "ServerErrors", e, t2, t2, ao.includes(e));
20740
20740
  }, AlreadyJoined(a11, e = "") {
20741
- return new v2(E2.WebsocketMethodErrors.ALREADY_JOINED, "AlreadyJoined", a11, "[JOIN]: You have already joined this room.", e);
20741
+ return new f2(k2.WebsocketMethodErrors.ALREADY_JOINED, "AlreadyJoined", a11, "[JOIN]: You have already joined this room.", e);
20742
20742
  }, CannotJoinPreviewInProgress(a11, e = "") {
20743
- return new v2(E2.WebsocketMethodErrors.CANNOT_JOIN_PREVIEW_IN_PROGRESS, "CannotJoinPreviewInProgress", a11, "[JOIN]: Cannot join if preview is in progress", e);
20743
+ return new f2(k2.WebsocketMethodErrors.CANNOT_JOIN_PREVIEW_IN_PROGRESS, "CannotJoinPreviewInProgress", a11, "[JOIN]: Cannot join if preview is in progress", e);
20744
20744
  } }, GenericErrors: { NotConnected(a11, e = "") {
20745
- return new v2(E2.GenericErrors.NOT_CONNECTED, "NotConnected", a11, "Client is not connected", e);
20745
+ return new f2(k2.GenericErrors.NOT_CONNECTED, "NotConnected", a11, "Client is not connected", e);
20746
20746
  }, Signalling(a11, e) {
20747
- return new v2(E2.GenericErrors.SIGNALLING, "Signalling", a11, `Unknown signalling error: ${a11.toString()} ${e} `, e);
20747
+ return new f2(k2.GenericErrors.SIGNALLING, "Signalling", a11, `Unknown signalling error: ${a11.toString()} ${e} `, e);
20748
20748
  }, Unknown(a11, e) {
20749
- return new v2(E2.GenericErrors.UNKNOWN, "Unknown", a11, `Unknown exception: ${e}`, e);
20749
+ return new f2(k2.GenericErrors.UNKNOWN, "Unknown", a11, `Unknown exception: ${e}`, e);
20750
20750
  }, NotReady(a11, e = "") {
20751
- return new v2(E2.GenericErrors.NOT_READY, "NotReady", a11, e, e);
20751
+ return new f2(k2.GenericErrors.NOT_READY, "NotReady", a11, e, e);
20752
20752
  }, JsonParsingFailed(a11, e, t2 = "") {
20753
- return new v2(E2.GenericErrors.JSON_PARSING_FAILED, "JsonParsingFailed", a11, `Failed to parse JSON message - ${e}`, t2);
20753
+ return new f2(k2.GenericErrors.JSON_PARSING_FAILED, "JsonParsingFailed", a11, `Failed to parse JSON message - ${e}`, t2);
20754
20754
  }, TrackMetadataMissing(a11, e = "") {
20755
- return new v2(E2.GenericErrors.TRACK_METADATA_MISSING, "TrackMetadataMissing", a11, "Track Metadata Missing", e);
20755
+ return new f2(k2.GenericErrors.TRACK_METADATA_MISSING, "TrackMetadataMissing", a11, "Track Metadata Missing", e);
20756
20756
  }, RTCTrackMissing(a11, e = "") {
20757
- return new v2(E2.GenericErrors.RTC_TRACK_MISSING, "RTCTrackMissing", a11, "RTC Track missing", e);
20757
+ return new f2(k2.GenericErrors.RTC_TRACK_MISSING, "RTCTrackMissing", a11, "RTC Track missing", e);
20758
20758
  }, PeerMetadataMissing(a11, e = "") {
20759
- return new v2(E2.GenericErrors.PEER_METADATA_MISSING, "PeerMetadataMissing", a11, "Peer Metadata Missing", e);
20759
+ return new f2(k2.GenericErrors.PEER_METADATA_MISSING, "PeerMetadataMissing", a11, "Peer Metadata Missing", e);
20760
20760
  }, ValidationFailed(a11, e) {
20761
- return new v2(E2.GenericErrors.VALIDATION_FAILED, "ValidationFailed", "VALIDATION", a11, e ? JSON.stringify(e) : "");
20761
+ return new f2(k2.GenericErrors.VALIDATION_FAILED, "ValidationFailed", "VALIDATION", a11, e ? JSON.stringify(e) : "");
20762
20762
  }, InvalidRole(a11, e) {
20763
- return new v2(E2.GenericErrors.INVALID_ROLE, "InvalidRole", a11, "Invalid role. Join with valid role", e, true);
20763
+ return new f2(k2.GenericErrors.INVALID_ROLE, "InvalidRole", a11, "Invalid role. Join with valid role", e, true);
20764
20764
  }, PreviewAlreadyInProgress(a11, e = "") {
20765
- return new v2(E2.GenericErrors.PREVIEW_IN_PROGRESS, "PreviewAlreadyInProgress", a11, "[Preview]: Cannot join if preview is in progress", e);
20765
+ return new f2(k2.GenericErrors.PREVIEW_IN_PROGRESS, "PreviewAlreadyInProgress", a11, "[Preview]: Cannot join if preview is in progress", e);
20766
20766
  }, LocalStorageAccessDenied(a11 = "Access to localStorage has been denied") {
20767
- return new v2(E2.GenericErrors.LOCAL_STORAGE_ACCESS_DENIED, "LocalStorageAccessDenied", "NONE", "LocalStorageAccessDenied", a11);
20767
+ return new f2(k2.GenericErrors.LOCAL_STORAGE_ACCESS_DENIED, "LocalStorageAccessDenied", "NONE", "LocalStorageAccessDenied", a11);
20768
20768
  }, MissingMediaDevices() {
20769
- return new v2(E2.GenericErrors.MISSING_MEDIADEVICES, "MissingMediaDevices", "JOIN", "navigator.mediaDevices is undefined. 100ms SDK won't work on this website as WebRTC is not supported on HTTP endpoints(missing navigator.mediaDevices). Please ensure you're using the SDK either on localhost or a valid HTTPS endpoint.", "", true);
20769
+ return new f2(k2.GenericErrors.MISSING_MEDIADEVICES, "MissingMediaDevices", "JOIN", "navigator.mediaDevices is undefined. 100ms SDK won't work on this website as WebRTC is not supported on HTTP endpoints(missing navigator.mediaDevices). Please ensure you're using the SDK either on localhost or a valid HTTPS endpoint.", "", true);
20770
20770
  }, MissingRTCPeerConnection() {
20771
- return new v2(E2.GenericErrors.MISSING_RTCPEERCONNECTION, "MissingRTCPeerConnection", "JOIN", "RTCPeerConnection which is a core requirement for WebRTC call was not found, this could be due to an unsupported browser or browser extensions blocking WebRTC", "", true);
20771
+ return new f2(k2.GenericErrors.MISSING_RTCPEERCONNECTION, "MissingRTCPeerConnection", "JOIN", "RTCPeerConnection which is a core requirement for WebRTC call was not found, this could be due to an unsupported browser or browser extensions blocking WebRTC", "", true);
20772
20772
  } }, MediaPluginErrors: { PlatformNotSupported(a11, e = "") {
20773
- return new v2(7001, "PlatformNotSupported", a11, "Check HMS Docs to see the list of supported platforms", e);
20773
+ return new f2(7001, "PlatformNotSupported", a11, "Check HMS Docs to see the list of supported platforms", e);
20774
20774
  }, InitFailed(a11, e = "") {
20775
- return new v2(7002, "InitFailed", a11, "Plugin init failed", e);
20775
+ return new f2(7002, "InitFailed", a11, "Plugin init failed", e);
20776
20776
  }, ProcessingFailed(a11, e = "") {
20777
- return new v2(7003, "ProcessingFailed", a11, "Plugin processing failed", e);
20777
+ return new f2(7003, "ProcessingFailed", a11, "Plugin processing failed", e);
20778
20778
  }, AddAlreadyInProgress(a11, e = "") {
20779
- return new v2(7004, "AddAlreadyInProgress", a11, "Plugin add already in progress", e);
20779
+ return new f2(7004, "AddAlreadyInProgress", a11, "Plugin add already in progress", e);
20780
20780
  }, DeviceNotSupported(a11, e = "") {
20781
- return new v2(7005, "DeviceNotSupported", a11, "Check HMS Docs to see the list of supported devices", e);
20781
+ return new f2(7005, "DeviceNotSupported", a11, "Check HMS Docs to see the list of supported devices", e);
20782
20782
  } }, PlaylistErrors: { NoEntryToPlay(a11, e) {
20783
- return new v2(E2.PlaylistErrors.NO_ENTRY_TO_PLAY, "NoEntryToPlay", a11, "Reached end of playlist", e);
20783
+ return new f2(k2.PlaylistErrors.NO_ENTRY_TO_PLAY, "NoEntryToPlay", a11, "Reached end of playlist", e);
20784
20784
  }, NoEntryPlaying(a11, e) {
20785
- return new v2(E2.PlaylistErrors.NO_ENTRY_IS_PLAYING, "NoEntryIsPlaying", a11, "No entry is playing at this time", e);
20785
+ return new f2(k2.PlaylistErrors.NO_ENTRY_IS_PLAYING, "NoEntryIsPlaying", a11, "No entry is playing at this time", e);
20786
20786
  } } };
20787
20787
  var vr = class {
20788
20788
  constructor() {
@@ -20845,28 +20845,28 @@ var le = class {
20845
20845
  };
20846
20846
  var gs = () => {
20847
20847
  let a11, e = new le("hms-analytics-deviceId"), t2 = e.get();
20848
- return t2 ? a11 = t2 : (a11 = ao(), e.set(a11)), a11;
20848
+ return t2 ? a11 = t2 : (a11 = oo(), e.set(a11)), a11;
20849
20849
  };
20850
20850
  var Ts = "[VALIDATIONS]";
20851
20851
  function oe(a11) {
20852
20852
  return a11 != null;
20853
20853
  }
20854
- var gt = () => {
20854
+ var St = () => {
20855
20855
  if (!oe(RTCPeerConnection)) {
20856
20856
  let a11 = S2.GenericErrors.MissingRTCPeerConnection();
20857
20857
  throw d2.e(Ts, a11), a11;
20858
20858
  }
20859
20859
  };
20860
- var Tt = () => {
20860
+ var gt = () => {
20861
20861
  if (!oe(navigator.mediaDevices)) {
20862
20862
  let a11 = S2.GenericErrors.MissingMediaDevices();
20863
20863
  throw d2.e(Ts, a11), a11;
20864
20864
  }
20865
20865
  };
20866
20866
  var fs = Mr().version;
20867
- function ft(a11 = "prod", e) {
20867
+ function Tt(a11 = "prod", e) {
20868
20868
  let t2 = "web", i2 = Qe !== "LOCAL" && a11 === "prod" ? "prod" : "debug";
20869
- if (Be)
20869
+ if (Ue)
20870
20870
  return vs({ os: "web_nodejs", os_version: process.version, sdk: t2, sdk_version: fs, env: i2, domain: Qe, is_prebuilt: !!(e != null && e.isPrebuilt), framework: "node", framework_version: process.version, framework_sdk_version: e == null ? void 0 : e.sdkVersion });
20871
20871
  let r2 = ge.getOS(), s2 = ge.getDevice(), o2 = ge.getBrowser(), n2 = yr(`web_${r2.name}`), l2 = r2.version || "", u2 = yr(`${o2.name}_${o2.version}`), p2 = u2;
20872
20872
  return s2.type && (p2 = `${yr(`${s2.vendor}_${s2.type}`)}/${u2}`), vs({ os: n2, os_version: l2, sdk: t2, sdk_version: fs, device_model: p2, env: i2, domain: Qe, is_prebuilt: !!(e != null && e.isPrebuilt), framework: e == null ? void 0 : e.type, framework_version: e == null ? void 0 : e.version, framework_sdk_version: e == null ? void 0 : e.sdkVersion });
@@ -20877,8 +20877,8 @@ function yr(a11) {
20877
20877
  var vs = (a11, e = ",") => Object.keys(a11).filter((t2) => oe(a11[t2])).map((t2) => `${t2}:${a11[t2]}`).join(e);
20878
20878
  var H2 = class {
20879
20879
  constructor({ name: e, level: t2, properties: i2, includesPII: r2, timestamp: s2 }) {
20880
- this.metadata = { peer: {}, userAgent: ft() };
20881
- this.name = e, this.level = t2, this.includesPII = r2 || false, this.properties = i2 || {}, this.timestamp = s2 || (/* @__PURE__ */ new Date()).getTime(), this.event_id = no(), this.device_id = gs();
20880
+ this.metadata = { peer: {}, userAgent: Tt() };
20881
+ this.name = e, this.level = t2, this.includesPII = r2 || false, this.properties = i2 || {}, this.timestamp = s2 || (/* @__PURE__ */ new Date()).getTime(), this.event_id = co(), this.device_id = gs();
20882
20882
  }
20883
20883
  toSignalParams() {
20884
20884
  return { name: this.name, info: M2(m({}, this.properties), { timestamp: this.timestamp, domain: Qe }), timestamp: (/* @__PURE__ */ new Date()).getTime() };
@@ -20977,7 +20977,7 @@ var y2 = class {
20977
20977
  return e = m(m({}, i2), e), e;
20978
20978
  }
20979
20979
  static getErrorProperties(e) {
20980
- return e ? e instanceof v2 ? e.toAnalyticsProperties() : { error_name: e.name, error_message: e.message, error_description: e.cause } : {};
20980
+ return e ? e instanceof f2 ? e.toAnalyticsProperties() : { error_name: e.name, error_message: e.message, error_description: e.cause } : {};
20981
20981
  }
20982
20982
  };
20983
20983
  y2.KEY_REQUESTED_AT = "requested_at", y2.KEY_RESPONDED_AT = "responded_at";
@@ -21040,7 +21040,7 @@ var ne = class {
21040
21040
  return new H2({ name: l2, level: u2, properties: p2 });
21041
21041
  }
21042
21042
  };
21043
- var ai = class {
21043
+ var si = class {
21044
21044
  constructor(e) {
21045
21045
  this.eventBus = e;
21046
21046
  this.TAG = "[AudioPluginsAnalytics]";
@@ -21084,14 +21084,14 @@ var ai = class {
21084
21084
  delete this.addedTimestamps[e], delete this.initTime[e], delete this.pluginAdded[e], delete this.pluginSampleRate[e];
21085
21085
  }
21086
21086
  };
21087
- var co = 48e3;
21088
- var lo = () => navigator.userAgent.indexOf("Firefox") !== -1;
21089
- var vt = class {
21087
+ var lo = 48e3;
21088
+ var uo = () => navigator.userAgent.indexOf("Firefox") !== -1;
21089
+ var ft = class {
21090
21090
  constructor(e, t2, i2) {
21091
21091
  this.eventBus = t2;
21092
21092
  this.TAG = "[AudioPluginsManager]";
21093
21093
  this.pluginAddInProgress = false;
21094
- this.hmsTrack = e, this.pluginsMap = /* @__PURE__ */ new Map(), this.analytics = new ai(t2), this.createAudioContext(), this.room = i2;
21094
+ this.hmsTrack = e, this.pluginsMap = /* @__PURE__ */ new Map(), this.analytics = new si(t2), this.createAudioContext(), this.room = i2;
21095
21095
  }
21096
21096
  getPlugins() {
21097
21097
  return Array.from(this.pluginsMap.keys());
@@ -21250,14 +21250,14 @@ var vt = class {
21250
21250
  });
21251
21251
  }
21252
21252
  createAudioContext() {
21253
- this.audioContext || (lo() ? this.audioContext = new AudioContext() : this.audioContext = new AudioContext({ sampleRate: co }));
21253
+ this.audioContext || (uo() ? this.audioContext = new AudioContext() : this.audioContext = new AudioContext({ sampleRate: lo }));
21254
21254
  }
21255
21255
  };
21256
- function uo(a11, e) {
21256
+ function po(a11, e) {
21257
21257
  let t2 = a11.toLowerCase();
21258
21258
  return t2.includes("device not found") ? S2.TracksErrors.DeviceNotAvailable("TRACK", e, a11) : t2.includes("permission denied") ? S2.TracksErrors.CantAccessCaptureDevice("TRACK", e, a11) : S2.TracksErrors.GenericTrack("TRACK", a11);
21259
21259
  }
21260
- function po(a11, e = "") {
21260
+ function ho(a11, e = "") {
21261
21261
  if (adapter_core_default.browserDetails.browser === "chrome" && a11.name === "NotAllowedError" && a11.message.includes("denied by system"))
21262
21262
  return S2.TracksErrors.SystemDeniedPermission("TRACK", e, a11.message);
21263
21263
  if (adapter_core_default.browserDetails.browser === "firefox" && a11.name === "NotFoundError") {
@@ -21276,11 +21276,11 @@ function po(a11, e = "") {
21276
21276
  case "TypeError":
21277
21277
  return S2.TracksErrors.NothingToReturn("TRACK", a11.message);
21278
21278
  default:
21279
- return uo(a11.message, e);
21279
+ return po(a11.message, e);
21280
21280
  }
21281
21281
  }
21282
21282
  function Ae(a11, e) {
21283
- let t2 = po(a11, e);
21283
+ let t2 = ho(a11, e);
21284
21284
  return t2.addNativeError(a11), t2;
21285
21285
  }
21286
21286
  function ys(a11) {
@@ -21380,7 +21380,7 @@ function Es() {
21380
21380
  };
21381
21381
  })) };
21382
21382
  }
21383
- function oi(a11, e = 300) {
21383
+ function ai(a11, e = 300) {
21384
21384
  let t2;
21385
21385
  return function(...i2) {
21386
21386
  clearTimeout(t2), t2 = void 0;
@@ -21390,9 +21390,9 @@ function oi(a11, e = 300) {
21390
21390
  }, e);
21391
21391
  };
21392
21392
  }
21393
- var mo = 35;
21394
- var So = 5;
21395
- var ni = class {
21393
+ var So = 35;
21394
+ var go = 5;
21395
+ var oi = class {
21396
21396
  constructor(e, t2, i2) {
21397
21397
  this.track = e;
21398
21398
  this.audioLevelEvent = t2;
@@ -21441,7 +21441,7 @@ var ni = class {
21441
21441
  });
21442
21442
  }
21443
21443
  sendAudioLevel(e = 0) {
21444
- if (e = e > mo ? e : 0, Math.abs(this.audioLevel - e) > So) {
21444
+ if (e = e > So ? e : 0, Math.abs(this.audioLevel - e) > go) {
21445
21445
  this.audioLevel = e;
21446
21446
  let i2 = { track: this.track, audioLevel: this.audioLevel };
21447
21447
  this.audioLevelEvent.publish(i2);
@@ -21487,8 +21487,9 @@ var Rs = ((t2) => (t2.DVR = "dvr", t2.NO_DVR = "no-dvr", t2))(Rs || {});
21487
21487
  var Is = ((i2) => (i2.REGULAR = "regular", i2.SCREEN = "screen", i2.COMPOSITE = "composite", i2))(Is || {});
21488
21488
  var As = ((r2) => (r2.INITIALISED = "initialised", r2.STARTED = "started", r2.STOPPED = "stopped", r2.FAILED = "failed", r2))(As || {});
21489
21489
  var Hs = ((e) => (e.CAPTION = "caption", e))(Hs || {});
21490
- var Ve = { f: "high", h: "medium", q: "low" };
21491
- var Cs = ((i2) => (i2.videoInput = "videoInput", i2.audioInput = "audioInput", i2.audioOutput = "audioOutput", i2))(Cs || {});
21490
+ var Be = { f: "high", h: "medium", q: "low" };
21491
+ var Cs = ((t2) => (t2.VOICE = "voice", t2.MUSIC = "music", t2))(Cs || {});
21492
+ var Ls = ((i2) => (i2.videoInput = "videoInput", i2.audioInput = "audioInput", i2.audioOutput = "audioOutput", i2))(Ls || {});
21492
21493
  var ee = class {
21493
21494
  constructor() {
21494
21495
  this._volume = 1;
@@ -21515,18 +21516,18 @@ var ee = class {
21515
21516
  return this._deviceId = e, this;
21516
21517
  }
21517
21518
  audioMode(e = "voice") {
21518
- return this._audioMode = e, this._audioMode === "music" && (this._maxBitrate = 320), this;
21519
+ return this._audioMode = e, this._audioMode === "music" ? this._maxBitrate = 320 : this._maxBitrate = 32, this;
21519
21520
  }
21520
21521
  advanced(e) {
21521
21522
  return this._advanced = e, this;
21522
21523
  }
21523
21524
  build() {
21524
- return new Fe(this._volume, this._codec, this._maxBitrate, this._deviceId, this._advanced, this._audioMode);
21525
+ return new Ve(this._volume, this._codec, this._maxBitrate, this._deviceId, this._advanced, this._audioMode);
21525
21526
  }
21526
21527
  };
21527
- var Fe = class {
21528
+ var Ve = class {
21528
21529
  constructor(e, t2, i2, r2, s2, o2) {
21529
- this.volume = e, this.codec = t2, this.maxBitrate = i2, this.deviceId = r2, this.advanced = s2, this.audioMode = o2, this.audioMode === "music" && (this.maxBitrate = 320);
21530
+ this.volume = e, this.codec = t2, this.maxBitrate = i2, this.deviceId = r2, this.advanced = s2, this.audioMode = o2, this.audioMode === "music" ? this.maxBitrate = 320 : this.maxBitrate = 32;
21530
21531
  }
21531
21532
  toConstraints() {
21532
21533
  return { deviceId: this.deviceId, advanced: this.audioMode === "music" ? [] : this.advanced };
@@ -21573,10 +21574,10 @@ var z2 = class {
21573
21574
  return this._facingMode = e, this;
21574
21575
  }
21575
21576
  build() {
21576
- return new Ge(this._width, this._height, this._codec, this._maxFramerate, this._deviceId, this._advanced, this._maxBitrate, this._facingMode);
21577
+ return new Fe(this._width, this._height, this._codec, this._maxFramerate, this._deviceId, this._advanced, this._maxBitrate, this._facingMode);
21577
21578
  }
21578
21579
  };
21579
- var Ge = class {
21580
+ var Fe = class {
21580
21581
  constructor(e, t2, i2, r2, s2, o2, n2, l2) {
21581
21582
  this.width = e, this.height = t2, this.codec = i2, this.maxFramerate = r2, this.maxBitrate = n2, this.deviceId = s2, this.advanced = o2, this.facingMode = l2;
21582
21583
  }
@@ -21629,7 +21630,7 @@ var ze = class {
21629
21630
  return this.audio && (e = m(m({}, this.audio.toAnalyticsProperties()), e)), this.video && (e = m(m({}, this.video.toAnalyticsProperties()), e)), e;
21630
21631
  }
21631
21632
  };
21632
- function Ds(a11, e) {
21633
+ function ws(a11, e) {
21633
21634
  return function(i2) {
21634
21635
  return !(0, import_lodash3.default)(a11[i2], e[i2]);
21635
21636
  };
@@ -21651,17 +21652,17 @@ var ce = class a3 extends Ie {
21651
21652
  yield this.transceiver.sender.replaceTrack(this.processedTrack || this.nativeTrack);
21652
21653
  });
21653
21654
  this.handleSettingsChange = (t3) => c2(this, null, function* () {
21654
- let i3 = this.stream, r3 = Ds(t3, this.settings);
21655
+ let i3 = this.stream, r3 = ws(t3, this.settings);
21655
21656
  (r3("maxBitrate") || r3("audioMode")) && t3.maxBitrate && (yield i3.setMaxBitrateAndFramerate(this, t3)), (r3("advanced") || r3("audioMode")) && (yield this.replaceTrackWith(t3));
21656
21657
  });
21657
21658
  this.handleDeviceChange = (t3, i3 = false) => c2(this, null, function* () {
21658
- if (Ds(t3, this.settings)("deviceId")) {
21659
+ if (ws(t3, this.settings)("deviceId")) {
21659
21660
  this.manuallySelectedDeviceId = i3 ? this.manuallySelectedDeviceId : t3.deviceId, d2.d(this.TAG, "device change", "manual selection:", this.manuallySelectedDeviceId, "new device:", t3.deviceId), yield this.replaceTrackWith(t3);
21660
21661
  let s3 = this.nativeTrack.getSettings().groupId;
21661
21662
  !i3 && t3.deviceId && (Q2.updateSelection("audioInput", { deviceId: t3.deviceId, groupId: s3 }), this.eventBus.deviceChange.publish({ isUserSelection: true, type: "audioInput", selection: { deviceId: t3.deviceId, groupId: s3 } }));
21662
21663
  }
21663
21664
  });
21664
- t2.tracks.push(this), this.settings = o2, o2.deviceId !== i2.getSettings().deviceId && !ue(i2) && (this.settings = this.buildNewSettings({ deviceId: i2.getSettings().deviceId })), this.pluginsManager = new vt(this, s2, n2), this.setFirstTrackId(i2.id), Tr() && O2 && document.addEventListener("visibilitychange", this.handleVisibilityChange);
21665
+ t2.tracks.push(this), this.settings = o2, o2.deviceId !== i2.getSettings().deviceId && !ue(i2) && (this.settings = this.buildNewSettings({ deviceId: i2.getSettings().deviceId })), this.pluginsManager = new ft(this, s2, n2), this.setFirstTrackId(i2.id), Tr() && O2 && document.addEventListener("visibilitychange", this.handleVisibilityChange);
21665
21666
  }
21666
21667
  getManuallySelectedDeviceId() {
21667
21668
  return this.manuallySelectedDeviceId;
@@ -21727,7 +21728,7 @@ var ce = class a3 extends Ie {
21727
21728
  });
21728
21729
  }
21729
21730
  initAudioLevelMonitor() {
21730
- this.audioLevelMonitor && this.destroyAudioLevelMonitor(), d2.d(this.TAG, "Monitor Audio Level for", this, this.getMediaTrackSettings().deviceId), this.audioLevelMonitor = new ni(this, this.eventBus.trackAudioLevelUpdate, this.eventBus.localAudioSilence), this.audioLevelMonitor.start(), this.audioLevelMonitor.detectSilence();
21731
+ this.audioLevelMonitor && this.destroyAudioLevelMonitor(), d2.d(this.TAG, "Monitor Audio Level for", this, this.getMediaTrackSettings().deviceId), this.audioLevelMonitor = new oi(this, this.eventBus.trackAudioLevelUpdate, this.eventBus.localAudioSilence), this.audioLevelMonitor.start(), this.audioLevelMonitor.detectSilence();
21731
21732
  }
21732
21733
  destroyAudioLevelMonitor() {
21733
21734
  var t2;
@@ -21747,7 +21748,7 @@ var ce = class a3 extends Ie {
21747
21748
  }
21748
21749
  buildNewSettings(t2) {
21749
21750
  let { volume: i2, codec: r2, maxBitrate: s2, deviceId: o2, advanced: n2, audioMode: l2 } = m(m({}, this.settings), t2);
21750
- return new Fe(i2, r2, s2, o2, n2, l2);
21751
+ return new Ve(i2, r2, s2, o2, n2, l2);
21751
21752
  }
21752
21753
  };
21753
21754
  var se = class a4 extends Ie {
@@ -21815,10 +21816,10 @@ var Ye = class extends Re {
21815
21816
  this.sinkCount > 0 && this.sinkCount--;
21816
21817
  }
21817
21818
  };
21818
- var Mt = { none: -1, low: 0, medium: 1, high: 2 };
21819
- var To = 0.5;
21820
- var ws = (a11, e) => {
21821
- let t2 = "high", i2 = e.width > e.height ? "width" : "height", r2 = [...a11].sort((o2, n2) => Mt[o2.layer] - Mt[n2.layer]), s2 = e[i2] * ((window == null ? void 0 : window.devicePixelRatio) || 1);
21819
+ var vt = { none: -1, low: 0, medium: 1, high: 2 };
21820
+ var fo = 0.5;
21821
+ var _s = (a11, e) => {
21822
+ let t2 = "high", i2 = e.width > e.height ? "width" : "height", r2 = [...a11].sort((o2, n2) => vt[o2.layer] - vt[n2.layer]), s2 = e[i2] * ((window == null ? void 0 : window.devicePixelRatio) || 1);
21822
21823
  for (let o2 = 0; o2 < r2.length; o2++) {
21823
21824
  let { resolution: n2, layer: l2 } = r2[o2], u2 = n2[i2];
21824
21825
  if (s2 <= u2) {
@@ -21826,7 +21827,7 @@ var ws = (a11, e) => {
21826
21827
  break;
21827
21828
  } else {
21828
21829
  let p2 = r2[o2 + 1], h2 = p2 ? p2.resolution[i2] : Number.POSITIVE_INFINITY;
21829
- if ((s2 - u2) / (h2 - u2) < To) {
21830
+ if ((s2 - u2) / (h2 - u2) < fo) {
21830
21831
  t2 = l2;
21831
21832
  break;
21832
21833
  }
@@ -21861,7 +21862,7 @@ var Rr = class {
21861
21862
  return e || d2.w(this.TAG, "IntersectionObserver is not supported, fallback will be used instead"), e;
21862
21863
  }
21863
21864
  };
21864
- var _s = new Rr();
21865
+ var Ns = new Rr();
21865
21866
  var Ir = class {
21866
21867
  constructor() {
21867
21868
  this.TAG = "[HMSResizeObserverWrapper]";
@@ -21875,7 +21876,7 @@ var Ir = class {
21875
21876
  (t2 = this.resizeObserver) == null || t2.unobserve(e), this.listeners.delete(e);
21876
21877
  };
21877
21878
  this.createObserver = () => {
21878
- this.isSupported() && !this.resizeObserver && (this.resizeObserver = new ResizeObserver(oi(this.handleResize, 300)));
21879
+ this.isSupported() && !this.resizeObserver && (this.resizeObserver = new ResizeObserver(ai(this.handleResize, 300)));
21879
21880
  };
21880
21881
  this.handleResize = (e) => {
21881
21882
  var t2;
@@ -21889,7 +21890,7 @@ var Ir = class {
21889
21890
  return e || d2.w(this.TAG, "Resize Observer is not supported"), e;
21890
21891
  }
21891
21892
  };
21892
- var Ns = new Ir();
21893
+ var Os = new Ir();
21893
21894
  var Xe = class {
21894
21895
  constructor(e) {
21895
21896
  this.track = e;
@@ -21913,7 +21914,7 @@ var Xe = class {
21913
21914
  e2.srcObject = null, e2.removeEventListener("pause", this.resumeVideoPlayback), (t2 = this.resizeObserver) == null || t2.unobserve(e2), (i2 = this.intersectionObserver) == null || i2.unobserve(e2);
21914
21915
  }), this.videoElements.clear(), this.resizeObserver = void 0, this.intersectionObserver = void 0;
21915
21916
  };
21916
- this.init(), this.id = fo();
21917
+ this.init(), this.id = vo();
21917
21918
  }
21918
21919
  updateSinks(e = false) {
21919
21920
  for (let t2 of this.videoElements)
@@ -21933,7 +21934,7 @@ var Xe = class {
21933
21934
  return Array.from(this.videoElements);
21934
21935
  }
21935
21936
  init() {
21936
- O2 && (this.resizeObserver = Ns, this.intersectionObserver = _s);
21937
+ O2 && (this.resizeObserver = Os, this.intersectionObserver = Ns);
21937
21938
  }
21938
21939
  isElementInViewport(e) {
21939
21940
  let t2 = e.offsetTop, i2 = e.offsetLeft, r2 = e.offsetWidth, s2 = e.offsetHeight, { hidden: o2 } = e, { opacity: n2, display: l2 } = getComputedStyle(e);
@@ -21953,8 +21954,8 @@ var Xe = class {
21953
21954
  let { width: r2, height: s2 } = i2;
21954
21955
  if (r2 === 0 || s2 === 0)
21955
21956
  continue;
21956
- let o2 = ws(this.track.getSimulcastDefinitions(), { width: r2, height: s2 });
21957
- e ? e = Mt[o2] > Mt[e] ? o2 : e : e = o2;
21957
+ let o2 = _s(this.track.getSimulcastDefinitions(), { width: r2, height: s2 });
21958
+ e ? e = vt[o2] > vt[e] ? o2 : e : e = o2;
21958
21959
  }
21959
21960
  e && (d2.d(this.TAG, `selecting max layer ${e} for the track`, `${this.track}`), yield this.track.setPreferredLayer(e));
21960
21961
  });
@@ -21962,7 +21963,7 @@ var Xe = class {
21962
21963
  };
21963
21964
  var Ar = ((t2) => (t2.TRANSFORM = "TRANSFORM", t2.ANALYZE = "ANALYZE", t2))(Ar || {});
21964
21965
  var Hr = ((t2) => (t2["2D"] = "2d", t2.WEBGL = "webgl", t2.WEBGL2 = "webgl2", t2))(Hr || {});
21965
- var yt = class {
21966
+ var Mt = class {
21966
21967
  constructor() {
21967
21968
  this.total = 0;
21968
21969
  this.count = 0;
@@ -21981,10 +21982,10 @@ var Ze = class {
21981
21982
  constructor(e) {
21982
21983
  this.eventBus = e;
21983
21984
  this.TAG = "[VideoPluginsAnalytics]";
21984
- this.initTime = {}, this.preProcessingAvgs = new yt(), this.addedTimestamps = {}, this.processingAvgs = {}, this.pluginAdded = {}, this.pluginInputFrameRate = {}, this.pluginFrameRate = {};
21985
+ this.initTime = {}, this.preProcessingAvgs = new Mt(), this.addedTimestamps = {}, this.processingAvgs = {}, this.pluginAdded = {}, this.pluginInputFrameRate = {}, this.pluginFrameRate = {};
21985
21986
  }
21986
21987
  added(e, t2, i2) {
21987
- this.pluginAdded[e] = true, this.addedTimestamps[e] = Date.now(), this.initTime[e] = 0, this.processingAvgs[e] = new yt(), t2 && (this.pluginInputFrameRate[e] = t2, this.pluginFrameRate[e] = i2 || t2), this.eventBus.analytics.publish(ne.added(e, this.addedTimestamps[e]));
21988
+ this.pluginAdded[e] = true, this.addedTimestamps[e] = Date.now(), this.initTime[e] = 0, this.processingAvgs[e] = new Mt(), t2 && (this.pluginInputFrameRate[e] = t2, this.pluginFrameRate[e] = i2 || t2), this.eventBus.analytics.publish(ne.added(e, this.addedTimestamps[e]));
21988
21989
  }
21989
21990
  removed(e) {
21990
21991
  var t2;
@@ -22041,10 +22042,10 @@ var Ze = class {
22041
22042
  delete this.addedTimestamps[e], delete this.initTime[e], delete this.processingAvgs[e], delete this.pluginAdded[e], delete this.pluginInputFrameRate[e], delete this.pluginFrameRate[e];
22042
22043
  }
22043
22044
  };
22044
- var Os = 24;
22045
- var vo = 320;
22046
- var Mo = 240;
22047
- var kt = class {
22045
+ var xs = 24;
22046
+ var Mo = 320;
22047
+ var yo = 240;
22048
+ var yt = class {
22048
22049
  constructor(e, t2) {
22049
22050
  this.TAG = "[VideoPluginsManager]";
22050
22051
  this.pluginsLoopRunning = false;
@@ -22088,7 +22089,7 @@ var kt = class {
22088
22089
  d2.w(this.TAG, `plugin - ${e.getName()} already added.`);
22089
22090
  return;
22090
22091
  }
22091
- let r2 = this.hmsTrack.getMediaTrackSettings().frameRate || Os, s2 = 0;
22092
+ let r2 = this.hmsTrack.getMediaTrackSettings().frameRate || xs, s2 = 0;
22092
22093
  t2 && t2 > 0 ? (d2.i(this.TAG, `adding plugin ${e.getName()} with framerate ${t2}`), t2 < r2 && (s2 = Math.ceil(r2 / t2) - 1), this.analytics.added(i2, r2, t2)) : (d2.i(this.TAG, `adding plugin ${e.getName()}`), this.analytics.added(i2, r2)), d2.i(this.TAG, "numFrames to skip processing", s2), this.pluginNumFramesToSkip[i2] = s2, this.pluginNumFramesSkipped[i2] = s2, this.validateAndThrow(i2, e);
22093
22094
  try {
22094
22095
  if (yield this.analytics.initWithTime(i2, () => c2(this, null, function* () {
@@ -22176,7 +22177,7 @@ var kt = class {
22176
22177
  pluginsLoop() {
22177
22178
  return c2(this, null, function* () {
22178
22179
  for (; this.pluginsLoopRunning; ) {
22179
- let e = this.hmsTrack.getMediaTrackSettings().frameRate || Os, t2 = Math.floor(1e3 / e);
22180
+ let e = this.hmsTrack.getMediaTrackSettings().frameRate || xs, t2 = Math.floor(1e3 / e);
22180
22181
  if (!this.hmsTrack.enabled || this.hmsTrack.nativeTrack.readyState === "ended") {
22181
22182
  this.pluginsLoopState === "running" && this.resetCanvases(), this.pluginsLoopState = "paused", yield this.reusableWorker.sleep(t2);
22182
22183
  continue;
@@ -22252,7 +22253,7 @@ var kt = class {
22252
22253
  return c2(this, null, function* () {
22253
22254
  if (!this.inputCanvas || !this.inputVideo)
22254
22255
  return;
22255
- let { width: e = vo, height: t2 = Mo } = this.hmsTrack.getMediaTrackSettings();
22256
+ let { width: e = Mo, height: t2 = yo } = this.hmsTrack.getMediaTrackSettings();
22256
22257
  this.inputCanvas.height !== t2 && (this.inputCanvas.height = t2), this.inputCanvas.width !== e && (this.inputCanvas.width = e), this.inputCanvas.getContext("2d").drawImage(this.inputVideo, 0, 0, e, t2);
22257
22258
  });
22258
22259
  }
@@ -22267,7 +22268,7 @@ var kt = class {
22267
22268
  return this.pluginNumFramesSkipped[e] < this.pluginNumFramesToSkip[e] ? (this.pluginNumFramesSkipped[e]++, t2 = true) : (t2 = false, this.pluginNumFramesSkipped[e] = 0), t2;
22268
22269
  }
22269
22270
  };
22270
- var ci = class {
22271
+ var ni = class {
22271
22272
  constructor(e, t2) {
22272
22273
  this.TAG = "[MediaStreamPluginsManager]";
22273
22274
  this.plugins = /* @__PURE__ */ new Set(), this.analytics = new Ze(e), this.room = t2;
@@ -22311,8 +22312,8 @@ var ci = class {
22311
22312
  return Array.from(this.plugins).map((e) => e.getName());
22312
22313
  }
22313
22314
  };
22314
- var yo = ["init_response_time", "ws_connect_time", "on_policy_change_time", "local_audio_track_time", "local_video_track_time", "peer_list_time", "room_state_time", "join_response_time"];
22315
- var di = class {
22315
+ var ko = ["init_response_time", "ws_connect_time", "on_policy_change_time", "local_audio_track_time", "local_video_track_time", "peer_list_time", "room_state_time", "join_response_time"];
22316
+ var ci = class {
22316
22317
  constructor() {
22317
22318
  this.eventPerformanceMeasures = {};
22318
22319
  }
@@ -22332,7 +22333,7 @@ var di = class {
22332
22333
  return (t2 = this.eventPerformanceMeasures[e]) == null ? void 0 : t2.duration;
22333
22334
  }
22334
22335
  getTimes(...e) {
22335
- return [...yo, ...e].reduce((t2, i2) => M2(m({}, t2), { [i2]: this.getTimeTaken(i2) }), {});
22336
+ return [...ko, ...e].reduce((t2, i2) => M2(m({}, t2), { [i2]: this.getTimeTaken(i2) }), {});
22336
22337
  }
22337
22338
  cleanup() {
22338
22339
  this.eventPerformanceMeasures = {};
@@ -22340,7 +22341,7 @@ var di = class {
22340
22341
  };
22341
22342
  var Cr = { isAudioMuted: false, isVideoMuted: false, audioInputDeviceId: "default", audioOutputDeviceId: "default", videoDeviceId: "default" };
22342
22343
  var pe;
22343
- var li;
22344
+ var di;
22344
22345
  var ve = class a5 {
22345
22346
  constructor(e, t2, i2, r2, s2) {
22346
22347
  this.store = e;
@@ -22353,7 +22354,6 @@ var ve = class a5 {
22353
22354
  }
22354
22355
  getTracksToPublish() {
22355
22356
  return c2(this, arguments, function* (e = Cr) {
22356
- var T, g2, f2, P7;
22357
22357
  let t2 = this.getAVTrackSettings(e);
22358
22358
  if (!t2)
22359
22359
  return [];
@@ -22361,13 +22361,13 @@ var ve = class a5 {
22361
22361
  if (u2 && p2)
22362
22362
  return [];
22363
22363
  let h2 = { audio: i2 && !n2 && (e.isAudioMuted ? "empty" : true), video: r2 && !o2 && (e.isVideoMuted ? "empty" : true) };
22364
- h2.audio && ((T = this.analyticsTimer) == null || T.start("local_audio_track_time")), h2.video && ((g2 = this.analyticsTimer) == null || g2.start("local_video_track_time"));
22364
+ h2.audio && this.analyticsTimer.start("local_audio_track_time"), h2.video && this.analyticsTimer.start("local_video_track_time");
22365
22365
  try {
22366
22366
  d2.d(this.TAG, "Init Local Tracks", { fetchTrackOptions: h2 }), s2 = yield this.getLocalTracks(h2, t2, l2);
22367
- } catch (k2) {
22368
- s2 = yield this.retryGetLocalTracks(k2, t2, h2, l2);
22367
+ } catch (T) {
22368
+ s2 = yield this.retryGetLocalTracks(T, t2, h2, l2);
22369
22369
  }
22370
- return h2.audio && ((f2 = this.analyticsTimer) == null || f2.end("local_audio_track_time")), h2.video && ((P7 = this.analyticsTimer) == null || P7.end("local_video_track_time")), o2 && r2 && !u2 && s2.push(o2), n2 && i2 && !p2 && s2.push(n2), s2;
22370
+ return h2.audio && this.analyticsTimer.end("local_audio_track_time"), h2.video && this.analyticsTimer.end("local_video_track_time"), o2 && r2 && !u2 && s2.push(o2), n2 && i2 && !p2 && s2.push(n2), s2;
22371
22371
  });
22372
22372
  }
22373
22373
  getLocalTracks() {
@@ -22398,8 +22398,8 @@ var ve = class a5 {
22398
22398
  r2.srcObject = e, r2.addEventListener("loadedmetadata", () => c2(this, null, function* () {
22399
22399
  let { videoWidth: l2, videoHeight: u2 } = r2, p2 = i2.screen, h2 = p2.width * p2.height, T = l2 / u2, g2 = p2.width / p2.height;
22400
22400
  if (T > g2) {
22401
- let f2 = t2.video, P7 = T / g2, k2 = Math.sqrt(P7);
22402
- l2 * u2 > h2 ? (f2.width = l2 / k2, f2.height = u2 / k2) : (f2.height = u2 * k2, f2.width = l2 * k2), yield e.getVideoTracks()[0].applyConstraints(f2);
22401
+ let v2 = t2.video, E2 = T / g2, P7 = Math.sqrt(E2);
22402
+ l2 * u2 > h2 ? (v2.width = l2 / P7, v2.height = u2 / P7) : (v2.height = u2 * P7, v2.width = l2 * P7), yield e.getVideoTracks()[0].applyConstraints(v2);
22403
22403
  }
22404
22404
  }));
22405
22405
  });
@@ -22417,16 +22417,16 @@ var ve = class a5 {
22417
22417
  d2.d("retrieving screenshare with ", { config: i2 }, { constraints: s2 }), o2 = yield navigator.mediaDevices.getDisplayMedia(s2), t2 && (yield this.optimizeScreenShareConstraint(o2, s2));
22418
22418
  } catch (g2) {
22419
22419
  d2.w(this.TAG, "error in getting screenshare - ", g2);
22420
- let f2 = Ae(g2, "screen");
22421
- throw this.eventBus.analytics.publish(y2.publish({ error: f2, devices: this.deviceManager.getDevices(), settings: new ze(r2 == null ? void 0 : r2.video, r2 == null ? void 0 : r2.audio, false) })), f2;
22420
+ let v2 = Ae(g2, "screen");
22421
+ throw this.eventBus.analytics.publish(y2.publish({ error: v2, devices: this.deviceManager.getDevices(), settings: new ze(r2 == null ? void 0 : r2.video, r2 == null ? void 0 : r2.audio, false) })), v2;
22422
22422
  }
22423
- let n2 = [], l2 = new We(o2), u2 = o2.getVideoTracks()[0], p2 = new F(l2, u2, "screen", this.eventBus, r2 == null ? void 0 : r2.video, this.store.getRoom());
22423
+ let n2 = [], l2 = new Ge(o2), u2 = o2.getVideoTracks()[0], p2 = new F(l2, u2, "screen", this.eventBus, r2 == null ? void 0 : r2.video, this.store.getRoom());
22424
22424
  p2.setSimulcastDefinitons(this.store.getSimulcastDefinitionsForPeer(this.store.getLocalPeer(), "screen"));
22425
22425
  try {
22426
22426
  let g2 = this.validateCurrentTabCapture(p2, i2.forceCurrentTab);
22427
22427
  p2.isCurrentTab = g2, yield p2.cropTo(i2.cropTarget);
22428
22428
  } catch (g2) {
22429
- throw o2.getTracks().forEach((f2) => f2.stop()), g2;
22429
+ throw o2.getTracks().forEach((v2) => v2.stop()), g2;
22430
22430
  }
22431
22431
  n2.push(p2);
22432
22432
  let h2 = o2.getAudioTracks()[0];
@@ -22439,7 +22439,7 @@ var ve = class a5 {
22439
22439
  }
22440
22440
  setScreenCaptureHandleConfig(e) {
22441
22441
  var t2;
22442
- !((t2 = navigator.mediaDevices) != null && t2.setCaptureHandleConfig) || this.isInIframe() || (e = e || {}, Object.assign(e, { handle: ko(), exposeOrigin: false, permittedOrigins: [window.location.origin] }), d2.d("setting capture handle - ", e.handle), navigator.mediaDevices.setCaptureHandleConfig(e), this.captureHandleIdentifier = e.handle);
22442
+ !((t2 = navigator.mediaDevices) != null && t2.setCaptureHandleConfig) || this.isInIframe() || (e = e || {}, Object.assign(e, { handle: Po(), exposeOrigin: false, permittedOrigins: [window.location.origin] }), d2.d("setting capture handle - ", e.handle), navigator.mediaDevices.setCaptureHandleConfig(e), this.captureHandleIdentifier = e.handle);
22443
22443
  }
22444
22444
  validateCurrentTabCapture(e, t2) {
22445
22445
  let i2 = e.getCaptureHandle(), r2 = !!(this.captureHandleIdentifier && (i2 == null ? void 0 : i2.handle) === this.captureHandleIdentifier);
@@ -22459,7 +22459,7 @@ var ve = class a5 {
22459
22459
  static getEmptyVideoTrack(e) {
22460
22460
  var n2, l2, u2;
22461
22461
  let t2 = ((n2 = e == null ? void 0 : e.getSettings()) == null ? void 0 : n2.width) || 320, i2 = ((l2 = e == null ? void 0 : e.getSettings()) == null ? void 0 : l2.height) || 240, r2 = 1;
22462
- pe || (pe = document.createElement("canvas"), pe.width = t2, pe.height = i2, (u2 = pe.getContext("2d")) == null || u2.fillRect(0, 0, t2, i2)), li || (li = setInterval(() => {
22462
+ pe || (pe = document.createElement("canvas"), pe.width = t2, pe.height = i2, (u2 = pe.getContext("2d")) == null || u2.fillRect(0, 0, t2, i2)), di || (di = setInterval(() => {
22463
22463
  let p2 = pe == null ? void 0 : pe.getContext("2d");
22464
22464
  p2 && p2.fillRect(0, 0, 1, 1);
22465
22465
  }, 1e3 / r2));
@@ -22473,7 +22473,7 @@ var ve = class a5 {
22473
22473
  return r2.enabled = false, r2;
22474
22474
  }
22475
22475
  static cleanup() {
22476
- clearInterval(li), li = void 0, pe = void 0;
22476
+ clearInterval(di), di = void 0, pe = void 0;
22477
22477
  }
22478
22478
  getAVTracks(e) {
22479
22479
  return c2(this, null, function* () {
@@ -22500,16 +22500,16 @@ var ve = class a5 {
22500
22500
  }
22501
22501
  retryGetLocalTracks(e, t2, i2, r2) {
22502
22502
  return c2(this, null, function* () {
22503
- if (e instanceof v2 && e.action === "TRACK") {
22503
+ if (e instanceof f2 && e.action === "TRACK") {
22504
22504
  this.observer.onFailure(e);
22505
- let s2 = e.code === E2.TracksErrors.OVER_CONSTRAINED, o2 = e.message.includes("audio"), n2 = e.message.includes("video");
22505
+ let s2 = e.code === k2.TracksErrors.OVER_CONSTRAINED, o2 = e.message.includes("audio"), n2 = e.message.includes("video");
22506
22506
  if (s2) {
22507
- let l2 = new De().video(new Ge()).audio(new Fe()).build();
22507
+ let l2 = new De().video(new Fe()).audio(new Ve()).build();
22508
22508
  d2.w(this.TAG, "Fetch AV Tracks failed with overconstrained error", { fetchTrackOptions: i2 }, { error: e });
22509
22509
  try {
22510
22510
  return yield this.getLocalTracks(i2, l2, r2);
22511
22511
  } catch (u2) {
22512
- let p2 = u2 instanceof v2 ? u2.nativeError : u2, h2 = u2;
22512
+ let p2 = u2 instanceof f2 ? u2.nativeError : u2, h2 = u2;
22513
22513
  if ((p2 == null ? void 0 : p2.name) === "OverconstrainedError") {
22514
22514
  let T = S2.TracksErrors.GenericTrack("TRACK", "Overconstrained error after dropping all constraints");
22515
22515
  T.addNativeError(p2), h2 = T;
@@ -22575,7 +22575,7 @@ var ve = class a5 {
22575
22575
  }
22576
22576
  createHMSLocalTracks(e, t2, i2) {
22577
22577
  let r2 = e.find((n2) => n2.kind === "video"), s2 = e.find((n2) => n2.kind === "audio");
22578
- i2 ? e.forEach((n2) => i2 == null ? void 0 : i2.nativeStream.addTrack(n2)) : i2 = new We(new MediaStream(e));
22578
+ i2 ? e.forEach((n2) => i2 == null ? void 0 : i2.nativeStream.addTrack(n2)) : i2 = new Ge(new MediaStream(e));
22579
22579
  let o2 = [];
22580
22580
  if (s2 && (t2 != null && t2.audio)) {
22581
22581
  let n2 = new ce(i2, s2, "regular", this.eventBus, t2.audio, this.store.getRoom());
@@ -22588,7 +22588,7 @@ var ve = class a5 {
22588
22588
  return o2;
22589
22589
  }
22590
22590
  };
22591
- function xs(a11, e) {
22591
+ function Us(a11, e) {
22592
22592
  return function(i2) {
22593
22593
  return !(0, import_lodash4.default)(a11[i2], e[i2]);
22594
22594
  };
@@ -22611,10 +22611,10 @@ var F = class a6 extends Ye {
22611
22611
  });
22612
22612
  this.buildNewSettings = (t3) => {
22613
22613
  let { width: i3, height: r3, codec: s3, maxFramerate: o3, maxBitrate: n3, deviceId: l2, advanced: u2, facingMode: p2 } = m(m({}, this.settings), t3);
22614
- return new Ge(i3, r3, s3, o3, l2, u2, n3, p2);
22614
+ return new Fe(i3, r3, s3, o3, l2, u2, n3, p2);
22615
22615
  };
22616
22616
  this.handleSettingsChange = (t3) => c2(this, null, function* () {
22617
- let i3 = this.stream, r3 = xs(t3, this.settings);
22617
+ let i3 = this.stream, r3 = Us(t3, this.settings);
22618
22618
  if (r3("maxBitrate") && t3.maxBitrate && (yield i3.setMaxBitrateAndFramerate(this)), r3("width") || r3("height") || r3("advanced"))
22619
22619
  if (this.source === "video") {
22620
22620
  let s3 = yield this.replaceTrackWith(t3);
@@ -22623,7 +22623,7 @@ var F = class a6 extends Ye {
22623
22623
  yield this.nativeTrack.applyConstraints(t3.toConstraints());
22624
22624
  });
22625
22625
  this.handleDeviceChange = (t3, i3 = false) => c2(this, null, function* () {
22626
- if (xs(t3, this.settings)("deviceId") && this.source === "regular") {
22626
+ if (Us(t3, this.settings)("deviceId") && this.source === "regular") {
22627
22627
  if (this.enabled) {
22628
22628
  delete t3.facingMode;
22629
22629
  let o3 = yield this.replaceTrackWith(t3);
@@ -22639,7 +22639,7 @@ var F = class a6 extends Ye {
22639
22639
  this.handleVisibilityChange = () => c2(this, null, function* () {
22640
22640
  document.visibilityState === "hidden" && this.source === "regular" ? (this.enabledStateBeforeBackground = this.enabled, this.nativeTrack.enabled = false, this.replaceSenderTrack(this.nativeTrack)) : (this.nativeTrack.enabled = this.enabledStateBeforeBackground, this.replaceSenderTrack(this.processedTrack || this.nativeTrack)), this.eventBus.localVideoEnabled.publish({ enabled: this.nativeTrack.enabled, track: this });
22641
22641
  });
22642
- t2.tracks.push(this), this.setVideoHandler(new Xe(this)), this.settings = o2, o2.deviceId !== i2.getSettings().deviceId && i2.enabled && (this.settings = this.buildNewSettings({ deviceId: i2.getSettings().deviceId })), this.pluginsManager = new kt(this, s2), this.mediaStreamPluginsManager = new ci(s2, n2), this.setFirstTrackId(this.trackId), O2 && Te() && document.addEventListener("visibilitychange", this.handleVisibilityChange);
22642
+ t2.tracks.push(this), this.setVideoHandler(new Xe(this)), this.settings = o2, o2.deviceId !== i2.getSettings().deviceId && i2.enabled && (this.settings = this.buildNewSettings({ deviceId: i2.getSettings().deviceId })), this.pluginsManager = new yt(this, s2), this.mediaStreamPluginsManager = new ni(s2, n2), this.setFirstTrackId(this.trackId), O2 && Te() && document.addEventListener("visibilitychange", this.handleVisibilityChange);
22643
22643
  }
22644
22644
  setSimulcastDefinitons(t2) {
22645
22645
  this._layerDefinitions = t2;
@@ -22795,19 +22795,19 @@ var F = class a6 extends Ye {
22795
22795
  }
22796
22796
  };
22797
22797
  var et = "renegotiation-callback-id";
22798
- var ui = "ion-sfu";
22798
+ var li = "ion-sfu";
22799
22799
  var tt = "SUBSCRIBE_ICE_CONNECTION_CALLBACK_ID";
22800
- var Us = "https://event.100ms.live/v2/client/report";
22801
- var Bs = "https://event-nonprod.100ms.live/v2/client/report";
22802
- var Pt = Math.pow(2, 31) - 1;
22800
+ var Bs = "https://event.100ms.live/v2/client/report";
22801
+ var Vs = "https://event-nonprod.100ms.live/v2/client/report";
22802
+ var kt = Math.pow(2, 31) - 1;
22803
22803
  var G2 = { DEVICE_CHANGE: "device-change", LOCAL_AUDIO_ENABLED: "local-audio-enabled", LOCAL_VIDEO_ENABLED: "local-video-enabled", STATS_UPDATE: "stats-update", RTC_STATS_UPDATE: "rtc-stats-update", TRACK_DEGRADED: "track-degraded", TRACK_RESTORED: "track-restored", TRACK_AUDIO_LEVEL_UPDATE: "track-audio-level-update", LOCAL_AUDIO_SILENCE: "local-audio-silence", ANALYTICS: "analytics", AUDIO_PLUGIN_FAILED: "audio-plugin-failed", POLICY_CHANGE: "policy-change", LOCAL_ROLE_UPDATE: "local-role-update", AUDIO_TRACK_UPDATE: "audio-track-update", AUDIO_TRACK_ADDED: "audio-track-added", AUDIO_TRACK_REMOVED: "audio-track-removed", AUTOPLAY_ERROR: "autoplay-error", LEAVE: "leave" };
22804
- var Vs = "2.5";
22805
- var Fs = "20240521";
22804
+ var Fs = "2.5";
22805
+ var Gs = "20240521";
22806
22806
  var Me = "_handraise";
22807
22807
  var Dr = 1e3;
22808
22808
  var wr = 64;
22809
- var Gs = "https://whiteboard.100ms.live";
22810
- var Ws = "https://whiteboard-qa.100ms.live";
22809
+ var Ws = "https://whiteboard.100ms.live";
22810
+ var $s = "https://whiteboard-qa.100ms.live";
22811
22811
  var U2 = class a7 extends Ye {
22812
22812
  constructor(t2, i2, r2) {
22813
22813
  super(t2, i2, r2);
@@ -22936,7 +22936,7 @@ var _r = class {
22936
22936
  e.time = (/* @__PURE__ */ new Date()).toISOString().split("T")[1], this.history.push(e);
22937
22937
  }
22938
22938
  };
22939
- var We = class extends Je {
22939
+ var Ge = class extends Je {
22940
22940
  constructor() {
22941
22941
  super(...arguments);
22942
22942
  this.TAG = "[HMSLocalStream]";
@@ -22982,7 +22982,7 @@ var We = class extends Je {
22982
22982
  d2.d(this.TAG, "Simulcast enabled with layers", i2), r2.push(...i2);
22983
22983
  else {
22984
22984
  let s2 = { active: this.nativeStream.active };
22985
- t2.settings.maxBitrate && !Be && (s2.maxBitrate = t2.settings.maxBitrate), r2.push(s2);
22985
+ t2.settings.maxBitrate && !Ue && (s2.maxBitrate = t2.settings.maxBitrate), r2.push(s2);
22986
22986
  }
22987
22987
  return r2;
22988
22988
  }
@@ -23024,7 +23024,7 @@ var fe = class extends Je {
23024
23024
  return this.audio;
23025
23025
  }
23026
23026
  };
23027
- var $s = (a11, e, t2, i2) => c2(void 0, null, function* () {
23027
+ var Ks = (a11, e, t2, i2) => c2(void 0, null, function* () {
23028
23028
  var o2;
23029
23029
  let r2, s2 = {};
23030
23030
  if ((o2 = e.transceiver) != null && o2.sender.track) {
@@ -23046,11 +23046,11 @@ var $s = (a11, e, t2, i2) => c2(void 0, null, function* () {
23046
23046
  break;
23047
23047
  }
23048
23048
  }), Object.keys(m({}, l2)).forEach((p2) => {
23049
- var k2, w2;
23050
- let h2 = (k2 = l2[p2]) == null ? void 0 : k2.codecId, T = h2 ? n2[h2] : void 0, g2;
23049
+ var P7, w2;
23050
+ let h2 = (P7 = l2[p2]) == null ? void 0 : P7.codecId, T = h2 ? n2[h2] : void 0, g2;
23051
23051
  T && (g2 = T.substring(T.indexOf("/") + 1));
23052
- let f2 = M2(m({}, l2[p2]), { rid: (w2 = l2[p2]) == null ? void 0 : w2.rid }), P7 = u2[f2.ssrc];
23053
- s2[p2] = M2(m({}, f2), { bitrate: Et("bytesSent", f2, i2 == null ? void 0 : i2[p2]), packetsLost: P7 == null ? void 0 : P7.packetsLost, jitter: P7 == null ? void 0 : P7.jitter, roundTripTime: P7 == null ? void 0 : P7.roundTripTime, totalRoundTripTime: P7 == null ? void 0 : P7.totalRoundTripTime, peerName: t2, peerID: e.peerId, enabled: e.enabled, codec: g2 });
23052
+ let v2 = M2(m({}, l2[p2]), { rid: (w2 = l2[p2]) == null ? void 0 : w2.rid }), E2 = u2[v2.ssrc];
23053
+ s2[p2] = M2(m({}, v2), { bitrate: Pt("bytesSent", v2, i2 == null ? void 0 : i2[p2]), packetsLost: E2 == null ? void 0 : E2.packetsLost, jitter: E2 == null ? void 0 : E2.jitter, roundTripTime: E2 == null ? void 0 : E2.roundTripTime, totalRoundTripTime: E2 == null ? void 0 : E2.totalRoundTripTime, peerName: t2, peerID: e.peerId, enabled: e.enabled, codec: g2 });
23054
23054
  });
23055
23055
  } catch (n2) {
23056
23056
  a11.analytics.publish(y2.rtcStatsFailed(S2.WebrtcErrors.StatsFailed("TRACK", `Error getting local track stats ${e.trackId} - ${n2.message}`))), d2.w("[HMSWebrtcStats]", "Error in getting local track stats", e, n2, n2.name);
@@ -23058,7 +23058,7 @@ var $s = (a11, e, t2, i2) => c2(void 0, null, function* () {
23058
23058
  return s2;
23059
23059
  }
23060
23060
  });
23061
- var Ks = (a11, e, t2, i2) => c2(void 0, null, function* () {
23061
+ var qs = (a11, e, t2, i2) => c2(void 0, null, function* () {
23062
23062
  var l2;
23063
23063
  let r2;
23064
23064
  try {
@@ -23066,10 +23066,10 @@ var Ks = (a11, e, t2, i2) => c2(void 0, null, function* () {
23066
23066
  } catch (u2) {
23067
23067
  a11.analytics.publish(y2.rtcStatsFailed(S2.WebrtcErrors.StatsFailed("TRACK", `Error getting remote track stats ${e.trackId} - ${u2.message}`))), d2.w("[HMSWebrtcStats]", "Error in getting remote track stats", e, u2);
23068
23068
  }
23069
- let s2 = Eo(r2), o2 = Et("bytesReceived", s2, i2), n2 = Nr("packetsLost", s2, i2);
23069
+ let s2 = bo(r2), o2 = Pt("bytesReceived", s2, i2), n2 = Nr("packetsLost", s2, i2);
23070
23070
  return s2 != null && s2.remote && Object.assign(s2.remote, { packetsLostRate: Nr("packetsLost", s2.remote, i2 == null ? void 0 : i2.remote) }), s2 && M2(m({}, s2), { bitrate: o2, packetsLostRate: n2, peerID: e.peerId, enabled: e.enabled, peerName: t2, codec: s2.codec });
23071
23071
  });
23072
- var Eo = (a11) => {
23072
+ var bo = (a11) => {
23073
23073
  let e, t2, i2 = {};
23074
23074
  a11 == null || a11.forEach((o2) => {
23075
23075
  switch (o2.type) {
@@ -23093,10 +23093,10 @@ var Eo = (a11) => {
23093
23093
  return r2 && (s2 = r2.substring(r2.indexOf("/") + 1)), e && Object.assign(e, { remote: t2, codec: s2 });
23094
23094
  };
23095
23095
  var Or = (a11, e, t2) => {
23096
- let i2 = bo(e), r2 = Et(a11 === "publish" ? "bytesSent" : "bytesReceived", i2, t2 && t2[a11]);
23096
+ let i2 = Ro(e), r2 = Pt(a11 === "publish" ? "bytesSent" : "bytesReceived", i2, t2 && t2[a11]);
23097
23097
  return i2 && Object.assign(i2, { bitrate: r2 });
23098
23098
  };
23099
- var bo = (a11) => {
23099
+ var Ro = (a11) => {
23100
23100
  let e;
23101
23101
  return a11 == null || a11.forEach((t2) => {
23102
23102
  t2.type === "transport" && (e = a11 == null ? void 0 : a11.get(t2.selectedCandidatePairId));
@@ -23104,20 +23104,20 @@ var bo = (a11) => {
23104
23104
  t2.type === "candidate-pair" && t2.selected && (e = t2);
23105
23105
  }), e;
23106
23106
  };
23107
- var qs = (a11) => {
23107
+ var js = (a11) => {
23108
23108
  let e = { packetsLost: 0, jitter: 0 };
23109
23109
  return a11 == null || a11.forEach((t2) => {
23110
23110
  t2.packetsLost && (e.packetsLost += t2.packetsLost), t2.jitter > e.jitter && (e.jitter = t2.jitter);
23111
23111
  }), e;
23112
23112
  };
23113
- var js = (a11, e) => Array.from(new Set(a11.concat(e)));
23114
- var Et = (a11, e, t2) => Nr(a11, e, t2) * 8;
23113
+ var Js = (a11, e) => Array.from(new Set(a11.concat(e)));
23114
+ var Pt = (a11, e, t2) => Nr(a11, e, t2) * 8;
23115
23115
  var Nr = (a11, e, t2) => {
23116
23116
  let i2 = e && e[a11], r2 = t2 ? t2[a11] : null;
23117
23117
  return [e, t2, oe(i2), oe(r2)].every((o2) => !!o2) ? xr(i2, r2, e == null ? void 0 : e.timestamp, t2 == null ? void 0 : t2.timestamp) * 1e3 : 0;
23118
23118
  };
23119
23119
  var xr = (a11, e, t2, i2) => oe(a11) && oe(e) && t2 && i2 ? (a11 - e) / (t2 - i2) : 0;
23120
- var pi = class {
23120
+ var ui = class {
23121
23121
  constructor(e, t2, i2) {
23122
23122
  this.getStats = e;
23123
23123
  this.store = t2;
@@ -23134,20 +23134,20 @@ var pi = class {
23134
23134
  yield this.updateLocalPeerStats(), yield this.updateLocalTrackStats(), yield this.updateRemoteTrackStats();
23135
23135
  });
23136
23136
  this.updateLocalPeerStats = () => c2(this, null, function* () {
23137
- var p2, h2, T, g2, f2, P7;
23137
+ var p2, h2, T, g2, v2, E2;
23138
23138
  let e2 = this.getLocalPeerStats(), t3;
23139
23139
  try {
23140
23140
  t3 = yield (h2 = (p2 = this.getStats).publish) == null ? void 0 : h2.call(p2);
23141
- } catch (k2) {
23142
- this.eventBus.analytics.publish(y2.rtcStatsFailed(S2.WebrtcErrors.StatsFailed("PUBLISH", k2.message))), d2.w(this.TAG, "Error in getting publish stats", k2);
23141
+ } catch (P7) {
23142
+ this.eventBus.analytics.publish(y2.rtcStatsFailed(S2.WebrtcErrors.StatsFailed("PUBLISH", P7.message))), d2.w(this.TAG, "Error in getting publish stats", P7);
23143
23143
  }
23144
23144
  let i3 = t3 && Or("publish", t3, e2), r3;
23145
23145
  try {
23146
23146
  r3 = yield (g2 = (T = this.getStats).subscribe) == null ? void 0 : g2.call(T);
23147
- } catch (k2) {
23148
- this.eventBus.analytics.publish(y2.rtcStatsFailed(S2.WebrtcErrors.StatsFailed("SUBSCRIBE", k2.message))), d2.w(this.TAG, "Error in getting subscribe stats", k2);
23147
+ } catch (P7) {
23148
+ this.eventBus.analytics.publish(y2.rtcStatsFailed(S2.WebrtcErrors.StatsFailed("SUBSCRIBE", P7.message))), d2.w(this.TAG, "Error in getting subscribe stats", P7);
23149
23149
  }
23150
- let s2 = r3 && Or("subscribe", r3, e2), { packetsLost: o2, jitter: n2 } = qs(r3), l2 = xr(o2, (f2 = e2 == null ? void 0 : e2.subscribe) == null ? void 0 : f2.packetsLost, s2 == null ? void 0 : s2.timestamp, (P7 = e2 == null ? void 0 : e2.subscribe) == null ? void 0 : P7.timestamp), u2 = s2 && Object.assign(s2, { packetsLostRate: l2, jitter: n2, packetsLost: o2 });
23150
+ let s2 = r3 && Or("subscribe", r3, e2), { packetsLost: o2, jitter: n2 } = js(r3), l2 = xr(o2, (v2 = e2 == null ? void 0 : e2.subscribe) == null ? void 0 : v2.packetsLost, s2 == null ? void 0 : s2.timestamp, (E2 = e2 == null ? void 0 : e2.subscribe) == null ? void 0 : E2.timestamp), u2 = s2 && Object.assign(s2, { packetsLostRate: l2, jitter: n2, packetsLost: o2 });
23151
23151
  this.peerStats[this.localPeerID] = { publish: i3, subscribe: u2 };
23152
23152
  });
23153
23153
  this.updateRemoteTrackStats = () => c2(this, null, function* () {
@@ -23157,17 +23157,17 @@ var pi = class {
23157
23157
  t3.includes(r3) || delete this.remoteTrackStats[r3];
23158
23158
  });
23159
23159
  for (let r3 of e2) {
23160
- let s2 = r3.peerId && ((i3 = this.store.getPeerById(r3.peerId)) == null ? void 0 : i3.name), o2 = this.getRemoteTrackStats(r3.trackId), n2 = yield Ks(this.eventBus, r3, s2, o2);
23160
+ let s2 = r3.peerId && ((i3 = this.store.getPeerById(r3.peerId)) == null ? void 0 : i3.name), o2 = this.getRemoteTrackStats(r3.trackId), n2 = yield qs(this.eventBus, r3, s2, o2);
23161
23161
  n2 && (this.remoteTrackStats[r3.trackId] = n2);
23162
23162
  }
23163
23163
  });
23164
23164
  this.updateLocalTrackStats = () => c2(this, null, function* () {
23165
23165
  var i3;
23166
- let e2 = this.store.getLocalPeerTracks().reduce((r3, s2) => (r3[s2.getTrackIDBeingSent()] = s2, r3), {}), t3 = js(Object.keys(this.localTrackStats), Object.keys(e2));
23166
+ let e2 = this.store.getLocalPeerTracks().reduce((r3, s2) => (r3[s2.getTrackIDBeingSent()] = s2, r3), {}), t3 = Js(Object.keys(this.localTrackStats), Object.keys(e2));
23167
23167
  for (let r3 of t3) {
23168
23168
  let s2 = e2[r3];
23169
23169
  if (s2) {
23170
- let o2 = (i3 = this.store.getLocalPeer()) == null ? void 0 : i3.name, n2 = yield $s(this.eventBus, s2, o2, this.localTrackStats[r3]);
23170
+ let o2 = (i3 = this.store.getLocalPeer()) == null ? void 0 : i3.name, n2 = yield Ks(this.eventBus, s2, o2, this.localTrackStats[r3]);
23171
23171
  n2 && (this.localTrackStats[r3] = n2);
23172
23172
  } else
23173
23173
  delete this.localTrackStats[r3];
@@ -23177,7 +23177,7 @@ var pi = class {
23177
23177
  this.localPeerID = (r2 = this.store.getLocalPeer()) == null ? void 0 : r2.peerId;
23178
23178
  }
23179
23179
  };
23180
- var hi = class {
23180
+ var pi = class {
23181
23181
  constructor(e, t2, i2, r2) {
23182
23182
  this.store = e;
23183
23183
  this.eventBus = t2;
@@ -23207,7 +23207,7 @@ var hi = class {
23207
23207
  }
23208
23208
  setPeerConnections({ publish: e, subscribe: t2 }) {
23209
23209
  var i2, r2;
23210
- this.publishConnection = e, this.subscribeConnection = t2, this.hmsStats = new pi({ publish: (i2 = this.publishConnection) == null ? void 0 : i2.getStats.bind(this.publishConnection), subscribe: (r2 = this.subscribeConnection) == null ? void 0 : r2.getStats.bind(this.subscribeConnection) }, this.store, this.eventBus);
23210
+ this.publishConnection = e, this.subscribeConnection = t2, this.hmsStats = new ui({ publish: (i2 = this.publishConnection) == null ? void 0 : i2.getStats.bind(this.publishConnection), subscribe: (r2 = this.subscribeConnection) == null ? void 0 : r2.getStats.bind(this.subscribeConnection) }, this.store, this.eventBus);
23211
23211
  }
23212
23212
  start() {
23213
23213
  return c2(this, null, function* () {
@@ -23274,8 +23274,8 @@ var it = class {
23274
23274
  };
23275
23275
  var rt = class {
23276
23276
  };
23277
- rt.makePeerId = () => Ro();
23278
- var $e = class extends it {
23277
+ rt.makePeerId = () => Io();
23278
+ var We = class extends it {
23279
23279
  constructor(t2) {
23280
23280
  super(M2(m({}, t2), { peerId: rt.makePeerId(), isLocal: true }));
23281
23281
  this.isLocal = true;
@@ -23298,7 +23298,7 @@ var $e = class extends it {
23298
23298
  }`;
23299
23299
  }
23300
23300
  };
23301
- var bt = class extends it {
23301
+ var Et = class extends it {
23302
23302
  constructor(t2) {
23303
23303
  super(M2(m({}, t2), { isLocal: false }));
23304
23304
  this.isLocal = false;
@@ -23307,8 +23307,8 @@ var bt = class extends it {
23307
23307
  this.fromRoomState = !!t2.fromRoomState;
23308
23308
  }
23309
23309
  };
23310
- var he = (a11, e) => new bt({ peerId: a11.peer_id, name: a11.info.name, role: e.getPolicyForRole(a11.role), customerUserId: a11.info.user_id, metadata: a11.info.data, groups: a11.groups, type: a11.info.type });
23311
- var mi = class {
23310
+ var he = (a11, e) => new Et({ peerId: a11.peer_id, name: a11.info.name, role: e.getPolicyForRole(a11.role), customerUserId: a11.info.user_id, metadata: a11.info.data, groups: a11.groups, type: a11.info.type });
23311
+ var hi = class {
23312
23312
  constructor(e, t2, i2) {
23313
23313
  this.transport = e;
23314
23314
  this.store = t2;
@@ -23374,7 +23374,7 @@ var st = class {
23374
23374
  });
23375
23375
  }
23376
23376
  };
23377
- var we = class extends Io {
23377
+ var we = class extends Ao {
23378
23378
  on(e, t2) {
23379
23379
  return super.on(e, t2);
23380
23380
  }
@@ -23388,7 +23388,7 @@ var we = class extends Io {
23388
23388
  return super.listeners(e);
23389
23389
  }
23390
23390
  };
23391
- var Si = class extends we {
23391
+ var mi = class extends we {
23392
23392
  constructor() {
23393
23393
  super(...arguments);
23394
23394
  this.audioElement = null;
@@ -23440,7 +23440,7 @@ var Si = class extends we {
23440
23440
  }), this.audioContextManager = new st(t2), t2;
23441
23441
  }
23442
23442
  };
23443
- var gi = class extends we {
23443
+ var Si = class extends we {
23444
23444
  constructor() {
23445
23445
  super(...arguments);
23446
23446
  this.TAG = "[PlaylistVideoManager]";
@@ -23514,13 +23514,13 @@ var gi = class extends we {
23514
23514
  this.canvas || (this.canvas = document.createElement("canvas"), this.canvasContext = this.canvas.getContext("2d"));
23515
23515
  }
23516
23516
  };
23517
- var Ti = { audio: { list: [], currentIndex: -1, isAutoplayOn: true }, video: { list: [], currentIndex: -1, isAutoplayOn: true } };
23518
- var Rt = class extends we {
23517
+ var gi = { audio: { list: [], currentIndex: -1, isAutoplayOn: true }, video: { list: [], currentIndex: -1, isAutoplayOn: true } };
23518
+ var bt = class extends we {
23519
23519
  constructor(t2, i2) {
23520
23520
  super();
23521
23521
  this.sdk = t2;
23522
23522
  this.eventBus = i2;
23523
- this.state = { audio: m({}, Ti.audio), video: m({}, Ti.video) };
23523
+ this.state = { audio: m({}, gi.audio), video: m({}, gi.video) };
23524
23524
  this.TAG = "[PlaylistManager]";
23525
23525
  this.handlePausePlaylist = (r2) => c2(this, [r2], function* ({ enabled: t3, track: i3 }) {
23526
23526
  var o2;
@@ -23530,12 +23530,12 @@ var Rt = class extends we {
23530
23530
  i3.source === "audioplaylist" && (s2 = "audio"), i3.source === "videoplaylist" && (s2 = "video"), s2 && ((o2 = this.getElement(s2)) == null || o2.pause());
23531
23531
  });
23532
23532
  this.addTrack = (t3, i3) => c2(this, null, function* () {
23533
- yield this.sdk.addTrack(t3, i3), d2.d(this.TAG, "Playlist track added", si(t3));
23533
+ yield this.sdk.addTrack(t3, i3), d2.d(this.TAG, "Playlist track added", ri(t3));
23534
23534
  });
23535
23535
  this.removeTrack = (t3) => c2(this, null, function* () {
23536
23536
  yield this.sdk.removeTrack(t3, true), d2.d(this.TAG, "Playlist track removed", t3);
23537
23537
  });
23538
- this.audioManager = new Si(), this.videoManager = new gi(), this.addListeners();
23538
+ this.audioManager = new mi(), this.videoManager = new Si(), this.addListeners();
23539
23539
  }
23540
23540
  getList(t2 = "audio") {
23541
23541
  return this.state[t2].list;
@@ -23658,7 +23658,7 @@ var Rt = class extends we {
23658
23658
  });
23659
23659
  }
23660
23660
  cleanup() {
23661
- this.state = { audio: m({}, Ti.audio), video: m({}, Ti.video) }, this.eventBus.localAudioEnabled.unsubscribe(this.handlePausePlaylist), this.eventBus.localVideoEnabled.unsubscribe(this.handlePausePlaylist), this.audioManager.stop(), this.videoManager.stop();
23661
+ this.state = { audio: m({}, gi.audio), video: m({}, gi.video) }, this.eventBus.localAudioEnabled.unsubscribe(this.handlePausePlaylist), this.eventBus.localVideoEnabled.unsubscribe(this.handlePausePlaylist), this.audioManager.stop(), this.videoManager.stop();
23662
23662
  }
23663
23663
  onProgress(t2) {
23664
23664
  this.videoManager.on("progress", () => {
@@ -23736,34 +23736,34 @@ var Rt = class extends we {
23736
23736
  }
23737
23737
  };
23738
23738
  var B2 = (a11) => a11.room;
23739
- var Ao = (a11) => a11.errors;
23740
- var Wh = createSelector(Ao, (a11) => a11.length === 0 ? null : a11.at(-1));
23741
- var $h = createSelector(B2, (a11) => a11.id);
23739
+ var Ho = (a11) => a11.errors;
23740
+ var Kh = createSelector(Ho, (a11) => a11.length === 0 ? null : a11.at(-1));
23741
+ var qh = createSelector(B2, (a11) => a11.id);
23742
23742
  var K = (a11) => a11.peers;
23743
- var fi = (a11) => a11.messages.byID;
23744
- var Js = (a11) => a11.messages.allIDs;
23743
+ var Ti = (a11) => a11.messages.byID;
23744
+ var Qs = (a11) => a11.messages.allIDs;
23745
23745
  var N2 = (a11) => a11.tracks;
23746
- var Qs = (a11) => a11.settings;
23746
+ var zs = (a11) => a11.settings;
23747
23747
  var Ur = (a11) => a11.appData;
23748
- var Ho = (a11) => a11.speakers;
23748
+ var Co = (a11) => a11.speakers;
23749
23749
  var _e = createSelector([B2], (a11) => a11 && a11.isConnected);
23750
- var jh = createSelector([_e, B2], (a11, e) => a11 ? e.peerCount !== void 0 ? e.peerCount || 1 : e.peers.length : Math.max(e.peerCount !== void 0 ? e.peerCount : e.peers.length - 1, 0));
23751
- var Co = (a11) => a11.hideLocalPeer;
23752
- var me = createSelector([B2, K, Co], (a11, e, t2) => t2 ? a11.peers.filter((i2) => a11.localPeer !== i2).map((i2) => e[i2]) : a11.peers.map((i2) => e[i2]));
23753
- var Lo = createSelector(N2, (a11) => Object.values(a11));
23750
+ var Qh = createSelector([_e, B2], (a11, e) => a11 ? e.peerCount !== void 0 ? e.peerCount || 1 : e.peers.length : Math.max(e.peerCount !== void 0 ? e.peerCount : e.peers.length - 1, 0));
23751
+ var Lo = (a11) => a11.hideLocalPeer;
23752
+ var me = createSelector([B2, K, Lo], (a11, e, t2) => t2 ? a11.peers.filter((i2) => a11.localPeer !== i2).map((i2) => e[i2]) : a11.peers.map((i2) => e[i2]));
23753
+ var Do = createSelector(N2, (a11) => Object.values(a11));
23754
23754
  var te = createSelector(B2, K, (a11, e) => e[a11.localPeer]);
23755
23755
  var ye = createSelector(B2, (a11) => a11.localPeer);
23756
- var Jh = createSelector(te, (a11) => a11 == null ? void 0 : a11.name);
23757
- var Qh = createSelector(te, (a11) => a11 == null ? void 0 : a11.roleName);
23756
+ var zh = createSelector(te, (a11) => a11 == null ? void 0 : a11.name);
23757
+ var Yh = createSelector(te, (a11) => a11 == null ? void 0 : a11.roleName);
23758
23758
  var ae = createSelector(te, (a11) => a11 == null ? void 0 : a11.audioTrack);
23759
23759
  var Y2 = createSelector(te, (a11) => a11 == null ? void 0 : a11.videoTrack);
23760
- var Do = createSelector(te, (a11) => a11 == null ? void 0 : a11.auxiliaryTracks);
23761
- var zs = createSelector([ae, Y2, Do], (a11, e, t2) => {
23760
+ var wo = createSelector(te, (a11) => a11 == null ? void 0 : a11.auxiliaryTracks);
23761
+ var Ys = createSelector([ae, Y2, wo], (a11, e, t2) => {
23762
23762
  let i2 = t2 ? [...t2] : [];
23763
23763
  return a11 && i2.unshift(a11), e && i2.unshift(e), i2;
23764
23764
  });
23765
- var zh = createSelector(me, (a11) => a11.filter((e) => !e.isLocal));
23766
- var Yh = createSelector(K, Ho, (a11, e) => {
23765
+ var Xh = createSelector(me, (a11) => a11.filter((e) => !e.isLocal));
23766
+ var Zh = createSelector(K, Co, (a11, e) => {
23767
23767
  let t2 = Object.entries(e).sort((i2, r2) => {
23768
23768
  var n2, l2;
23769
23769
  let s2 = ((n2 = i2[1]) == null ? void 0 : n2.audioLevel) || 0;
@@ -23780,115 +23780,115 @@ var Br = (a11) => {
23780
23780
  let e = te(a11);
23781
23781
  return je(a11, e == null ? void 0 : e.videoTrack);
23782
23782
  };
23783
- var Ys = (a11) => {
23783
+ var Xs = (a11) => {
23784
23784
  let e = te(a11);
23785
23785
  return ns(a11, e == null ? void 0 : e.videoTrack);
23786
23786
  };
23787
23787
  var Vr = createSelector(te, N2, (a11, e) => {
23788
- let { video: t2, audio: i2 } = Ue(e, a11);
23788
+ let { video: t2, audio: i2 } = xe(e, a11);
23789
23789
  return !!(t2 || i2);
23790
23790
  });
23791
- var wo = createSelector(K, N2, (a11, e) => {
23791
+ var _o = createSelector(K, N2, (a11, e) => {
23792
23792
  let t2;
23793
23793
  for (let i2 in a11) {
23794
- let r2 = a11[i2], { video: s2, audio: o2 } = Ue(e, r2);
23794
+ let r2 = a11[i2], { video: s2, audio: o2 } = xe(e, r2);
23795
23795
  if (s2)
23796
23796
  return r2;
23797
23797
  o2 && !t2 && (t2 = r2);
23798
23798
  }
23799
23799
  return t2;
23800
23800
  });
23801
- var Zh = createSelector(wo, (a11) => !!a11);
23802
- var em = createSelector(K, N2, (a11, e) => {
23801
+ var tm = createSelector(_o, (a11) => !!a11);
23802
+ var im = createSelector(K, N2, (a11, e) => {
23803
23803
  for (let t2 in a11) {
23804
- let i2 = a11[t2], { audio: r2, video: s2 } = Ue(e, i2);
23804
+ let i2 = a11[t2], { audio: r2, video: s2 } = xe(e, i2);
23805
23805
  if (!s2 && r2)
23806
23806
  return i2;
23807
23807
  }
23808
23808
  });
23809
- var tm = createSelector(K, N2, (a11, e) => {
23809
+ var rm = createSelector(K, N2, (a11, e) => {
23810
23810
  let t2 = [], i2 = [];
23811
23811
  for (let r2 in a11) {
23812
- let s2 = a11[r2], { video: o2, audio: n2 } = Ue(e, s2);
23812
+ let s2 = a11[r2], { video: o2, audio: n2 } = xe(e, s2);
23813
23813
  o2 ? t2.push(s2) : n2 && i2.push(s2);
23814
23814
  }
23815
23815
  return t2.concat(i2);
23816
23816
  });
23817
- var im = createSelector(K, N2, (a11, e) => {
23817
+ var sm = createSelector(K, N2, (a11, e) => {
23818
23818
  for (let t2 in e) {
23819
23819
  let i2 = e[t2];
23820
- if (mt(i2) && ht(i2) && i2.peerId)
23820
+ if (ht(i2) && pt(i2) && i2.peerId)
23821
23821
  return a11[i2.peerId];
23822
23822
  }
23823
23823
  });
23824
- var rm = createSelector(K, N2, (a11, e) => {
23824
+ var am = createSelector(K, N2, (a11, e) => {
23825
23825
  for (let t2 in e) {
23826
23826
  let i2 = e[t2];
23827
- if (ri(i2) && i2.peerId)
23827
+ if (ii(i2) && i2.peerId)
23828
23828
  return a11[i2.peerId];
23829
23829
  }
23830
23830
  });
23831
- var sm = createSelector(Lo, (a11) => a11.filter(os));
23832
- var am = createSelector(Js, (a11) => a11.length);
23833
- var om = createSelector(fi, (a11) => Object.values(a11).filter((e) => !e.read).length);
23834
- var It = createSelector(Js, fi, (a11, e) => {
23831
+ var om = createSelector(Do, (a11) => a11.filter(os));
23832
+ var nm = createSelector(Qs, (a11) => a11.length);
23833
+ var cm = createSelector(Ti, (a11) => Object.values(a11).filter((e) => !e.read).length);
23834
+ var Rt = createSelector(Qs, Ti, (a11, e) => {
23835
23835
  let t2 = [];
23836
23836
  return a11.forEach((i2) => {
23837
23837
  t2.push(e[i2]);
23838
23838
  }), t2;
23839
23839
  });
23840
- var _o = createSelector(It, (a11) => a11.filter((e) => {
23840
+ var No = createSelector(Rt, (a11) => a11.filter((e) => {
23841
23841
  var t2;
23842
23842
  return !e.recipientPeer && !(e.recipientRoles && ((t2 = e.recipientRoles) == null ? void 0 : t2.length) > 0);
23843
23843
  }));
23844
- var nm = createSelector(_o, (a11) => a11.filter((e) => !e.read).length);
23844
+ var dm = createSelector(No, (a11) => a11.filter((e) => !e.read).length);
23845
23845
  var ie = createSelector([B2], (a11) => a11 && a11.roomState);
23846
- var Xs = createSelector(ie, (a11) => a11 === "Preview");
23847
- var cm = createSelector(B2, (a11) => a11.roomState !== "Disconnected");
23848
- var dm = createSelector(B2, (a11) => !a11.transcriptions || a11.transcriptions.length <= 0 ? false : a11.transcriptions.some((e) => e.mode === "caption" && e.state === "started"));
23846
+ var Zs = createSelector(ie, (a11) => a11 === "Preview");
23847
+ var lm = createSelector(B2, (a11) => a11.roomState !== "Disconnected");
23848
+ var um = createSelector(B2, (a11) => !a11.transcriptions || a11.transcriptions.length <= 0 ? false : a11.transcriptions.some((e) => e.mode === "caption" && e.state === "started"));
23849
23849
  var Se = (a11) => a11.roles;
23850
- var lm = createSelector([Se], (a11) => Object.keys(a11));
23850
+ var pm = createSelector([Se], (a11) => Object.keys(a11));
23851
23851
  var at = createSelector([te, Se], (a11, e) => a11 != null && a11.roleName ? e[a11.roleName] : null);
23852
- var No = (a11) => {
23852
+ var Oo = (a11) => {
23853
23853
  var e;
23854
23854
  return (e = a11.preview) == null ? void 0 : e.asRole;
23855
23855
  };
23856
- var Zs = createSelector([No, Se], (a11, e) => a11 ? e[a11] : null);
23857
- var um = createSelector([at], (a11) => {
23856
+ var ea = createSelector([Oo, Se], (a11, e) => a11 ? e[a11] : null);
23857
+ var hm = createSelector([at], (a11) => {
23858
23858
  var e;
23859
23859
  return (e = a11 == null ? void 0 : a11.subscribeParams) != null && e.subscribeToRoles ? a11.subscribeParams.subscribeToRoles.length > 0 : false;
23860
23860
  });
23861
- var ea = createSelector(at, (a11) => a11 == null ? void 0 : a11.permissions);
23862
- var pm = createSelector(B2, (a11) => a11.recording);
23863
- var hm = createSelector(B2, (a11) => a11.rtmp);
23864
- var mm = createSelector(B2, (a11) => a11.hls);
23865
- var Sm = createSelector(B2, (a11) => a11.transcriptions);
23866
- var gm = createSelector(B2, (a11) => a11.sessionId);
23867
- var Tm = createSelector(B2, (a11) => a11.startedAt);
23868
- var fm = createSelector(B2, (a11) => !!a11.isLargeRoom);
23869
- var vm = createSelector(B2, (a11) => !!a11.isEffectsEnabled);
23870
- var Mm = createSelector(B2, (a11) => a11.effectsKey);
23871
- var ta = (a11) => a11.polls;
23872
- var Em = createSelector(me, (a11) => a11.filter((e) => e.isHandRaised));
23873
- var Oo = (a11) => a11.whiteboards;
23874
- var bm = createSelector(Oo, (a11) => Object.values(a11)[0]);
23875
- var ra = (a11 = "audio") => (e) => e.playlist[a11].list;
23861
+ var ta = createSelector(at, (a11) => a11 == null ? void 0 : a11.permissions);
23862
+ var mm = createSelector(B2, (a11) => a11.recording);
23863
+ var Sm = createSelector(B2, (a11) => a11.rtmp);
23864
+ var gm = createSelector(B2, (a11) => a11.hls);
23865
+ var Tm = createSelector(B2, (a11) => a11.transcriptions);
23866
+ var fm = createSelector(B2, (a11) => a11.sessionId);
23867
+ var vm = createSelector(B2, (a11) => a11.startedAt);
23868
+ var Mm = createSelector(B2, (a11) => !!a11.isLargeRoom);
23869
+ var ym = createSelector(B2, (a11) => !!a11.isEffectsEnabled);
23870
+ var km = createSelector(B2, (a11) => a11.effectsKey);
23871
+ var ia = (a11) => a11.polls;
23872
+ var Rm = createSelector(me, (a11) => a11.filter((e) => e.isHandRaised));
23873
+ var xo = (a11) => a11.whiteboards;
23874
+ var Im = createSelector(xo, (a11) => Object.values(a11)[0]);
23875
+ var sa = (a11 = "audio") => (e) => e.playlist[a11].list;
23876
23876
  var Fr = (a11 = "audio") => (e) => e.playlist[a11].selection;
23877
- var sa = (a11 = "audio") => (e) => e.playlist[a11].progress;
23878
- var aa = (a11 = "audio") => (e) => e.playlist[a11].currentTime;
23879
- var oa = (a11 = "audio") => (e) => e.playlist[a11].playbackRate;
23880
- var na = (a11 = "audio") => (e) => e.playlist[a11].volume;
23881
- var ca = (a11 = "audio") => createSelector(ra(a11), (e) => Object.values(e));
23882
- var da = (a11 = "audio") => createSelector(ra(a11), Fr(a11), (e, t2) => {
23877
+ var aa = (a11 = "audio") => (e) => e.playlist[a11].progress;
23878
+ var oa = (a11 = "audio") => (e) => e.playlist[a11].currentTime;
23879
+ var na = (a11 = "audio") => (e) => e.playlist[a11].playbackRate;
23880
+ var ca = (a11 = "audio") => (e) => e.playlist[a11].volume;
23881
+ var da = (a11 = "audio") => createSelector(sa(a11), (e) => Object.values(e));
23882
+ var la = (a11 = "audio") => createSelector(sa(a11), Fr(a11), (e, t2) => {
23883
23883
  if (t2.id)
23884
23884
  return e[t2.id];
23885
23885
  });
23886
- var la = { selection: Fr("audio"), progress: sa("audio"), currentTime: aa("audio"), playbackRate: oa("audio"), volume: na("audio"), list: ca("audio"), selectedItem: da("audio") };
23887
- var ua = { selection: Fr("video"), progress: sa("video"), currentTime: aa("video"), playbackRate: oa("video"), volume: na("video"), list: ca("video"), selectedItem: da("video") };
23886
+ var ua = { selection: Fr("audio"), progress: aa("audio"), currentTime: oa("audio"), playbackRate: na("audio"), volume: ca("audio"), list: da("audio"), selectedItem: la("audio") };
23887
+ var pa = { selection: Fr("video"), progress: aa("video"), currentTime: oa("video"), playbackRate: na("video"), volume: ca("video"), list: da("video"), selectedItem: la("video") };
23888
23888
  function A2(a11) {
23889
23889
  return (e) => (t2) => a11(t2, e);
23890
23890
  }
23891
- var At = "HMS-Store:";
23891
+ var It = "HMS-Store:";
23892
23892
  var b2 = class {
23893
23893
  static v(e, ...t2) {
23894
23894
  this.log(0, e, ...t2);
@@ -23918,23 +23918,23 @@ var b2 = class {
23918
23918
  if (!(this.level.valueOf() > e.valueOf()))
23919
23919
  switch (e) {
23920
23920
  case 0: {
23921
- console.log(At, ...t2);
23921
+ console.log(It, ...t2);
23922
23922
  break;
23923
23923
  }
23924
23924
  case 1: {
23925
- console.debug(At, ...t2);
23925
+ console.debug(It, ...t2);
23926
23926
  break;
23927
23927
  }
23928
23928
  case 2: {
23929
- console.info(At, ...t2);
23929
+ console.info(It, ...t2);
23930
23930
  break;
23931
23931
  }
23932
23932
  case 3: {
23933
- console.warn(At, ...t2);
23933
+ console.warn(It, ...t2);
23934
23934
  break;
23935
23935
  }
23936
23936
  case 6: {
23937
- console.error(At, ...t2);
23937
+ console.error(It, ...t2);
23938
23938
  break;
23939
23939
  }
23940
23940
  case 4: {
@@ -23956,131 +23956,131 @@ var b2 = class {
23956
23956
  };
23957
23957
  b2.level = 0;
23958
23958
  var Gr = (a11, e) => e;
23959
- var Ht = (a11, e) => e;
23960
- var pa = (a11, e) => e;
23961
- var xo = (a11, e) => e;
23959
+ var At = (a11, e) => e;
23960
+ var ha = (a11, e) => e;
23962
23961
  var Uo = (a11, e) => e;
23962
+ var Bo = (a11, e) => e;
23963
23963
  var q2 = createSelector([K, Gr], (a11, e) => e ? a11[e] : null);
23964
- var Wr = createSelector([N2, Ht], (a11, e) => e ? a11[e] : null);
23965
- var Bo = createSelector([N2, Ht], (a11, e) => {
23964
+ var Wr = createSelector([N2, At], (a11, e) => e ? a11[e] : null);
23965
+ var Vo = createSelector([N2, At], (a11, e) => {
23966
23966
  if (!e)
23967
23967
  return null;
23968
23968
  let t2 = a11[e];
23969
23969
  return (t2 == null ? void 0 : t2.type) === "video" ? t2 : null;
23970
23970
  });
23971
- var Vo = createSelector([N2, Ht], (a11, e) => {
23971
+ var Fo = createSelector([N2, At], (a11, e) => {
23972
23972
  if (!e)
23973
23973
  return null;
23974
23974
  let t2 = a11[e];
23975
23975
  return (t2 == null ? void 0 : t2.type) === "audio" ? t2 : null;
23976
23976
  });
23977
- var Fo = createSelector([N2, Ht], (a11, e) => {
23977
+ var Go = createSelector([N2, At], (a11, e) => {
23978
23978
  if (!e)
23979
23979
  return null;
23980
23980
  let t2 = a11[e];
23981
23981
  return (t2 == null ? void 0 : t2.type) === "audio" && (t2 == null ? void 0 : t2.source) === "screen" ? t2 : null;
23982
23982
  });
23983
- var Go = createSelector([N2, Ht], (a11, e) => {
23983
+ var Wo = createSelector([N2, At], (a11, e) => {
23984
23984
  if (!e)
23985
23985
  return null;
23986
23986
  let t2 = a11[e];
23987
23987
  return (t2 == null ? void 0 : t2.type) === "video" && (t2 == null ? void 0 : t2.source) === "screen" ? t2 : null;
23988
23988
  });
23989
- var Wo = createSelector([ta, Uo], (a11, e) => e ? a11[e] : null);
23989
+ var $o = createSelector([ia, Bo], (a11, e) => e ? a11[e] : null);
23990
23990
  var X2 = A2(q2);
23991
- var Om = A2(createSelector([Ur, xo], (a11, e) => {
23991
+ var Um = A2(createSelector([Ur, Uo], (a11, e) => {
23992
23992
  if (a11)
23993
23993
  return e ? a11[e] : a11;
23994
23994
  }));
23995
- function xm(a11) {
23995
+ function Bm(a11) {
23996
23996
  return (e) => {
23997
23997
  if (e.sessionStore)
23998
23998
  return a11 ? e.sessionStore[a11] : e.sessionStore;
23999
23999
  };
24000
24000
  }
24001
- var Bm = A2(createSelector(q2, (a11) => a11 == null ? void 0 : a11.name));
24002
- var Vm = A2(createSelector(q2, (a11) => a11 == null ? void 0 : a11.type));
24003
- var vi = A2(Wr);
24004
- var ha = A2(Bo);
24005
- var Fm = A2(Vo);
24006
- var Gm = A2(Fo);
24007
- var Wm = A2(Go);
24008
- var $o = A2((a11, e) => {
24001
+ var Fm = A2(createSelector(q2, (a11) => a11 == null ? void 0 : a11.name));
24002
+ var Gm = A2(createSelector(q2, (a11) => a11 == null ? void 0 : a11.type));
24003
+ var fi = A2(Wr);
24004
+ var ma = A2(Vo);
24005
+ var Wm = A2(Fo);
24006
+ var $m = A2(Go);
24007
+ var Km = A2(Wo);
24008
+ var Ko = A2((a11, e) => {
24009
24009
  let t2 = q2(a11, e);
24010
24010
  if (t2 && t2.videoTrack && t2.videoTrack !== "")
24011
24011
  return a11.tracks[t2.videoTrack];
24012
24012
  });
24013
- var Ko = A2((a11, e) => {
24013
+ var qo = A2((a11, e) => {
24014
24014
  let t2 = q2(a11, e);
24015
24015
  if (t2 && t2.audioTrack && t2.audioTrack !== "")
24016
24016
  return a11.tracks[t2.audioTrack];
24017
24017
  });
24018
- var Km = A2((a11, e) => {
24018
+ var jm = A2((a11, e) => {
24019
24019
  let t2 = q2(a11, e);
24020
24020
  return (t2 == null ? void 0 : t2.auxiliaryTracks.map((i2) => a11.tracks[i2])) || [];
24021
24021
  });
24022
- var ma = (a11, e) => e ? a11.speakers[e] : null;
24023
- var qm = A2(createSelector(ma, (a11) => (a11 == null ? void 0 : a11.audioLevel) || 0));
24024
- var qo = (a11, e) => {
24025
- let t2 = Ko(e)(a11);
24026
- return ma(a11, t2 == null ? void 0 : t2.id);
24027
- };
24028
- var jm = A2(createSelector(qo, (a11) => (a11 == null ? void 0 : a11.audioLevel) || 0));
24029
- var Jm = A2((a11, e) => {
24022
+ var Sa = (a11, e) => e ? a11.speakers[e] : null;
24023
+ var Jm = A2(createSelector(Sa, (a11) => (a11 == null ? void 0 : a11.audioLevel) || 0));
24024
+ var jo = (a11, e) => {
24025
+ let t2 = qo(e)(a11);
24026
+ return Sa(a11, t2 == null ? void 0 : t2.id);
24027
+ };
24028
+ var Qm = A2(createSelector(jo, (a11) => (a11 == null ? void 0 : a11.audioLevel) || 0));
24029
+ var zm = A2((a11, e) => {
24030
24030
  if (e)
24031
24031
  return a11.connectionQualities[e];
24032
24032
  });
24033
- var Qm = A2((a11, e) => {
24033
+ var Ym = A2((a11, e) => {
24034
24034
  let t2 = q2(a11, e);
24035
24035
  if (t2) {
24036
- let i2 = t2 == null ? void 0 : t2.auxiliaryTracks.find((r2) => pt(a11.tracks[r2]));
24036
+ let i2 = t2 == null ? void 0 : t2.auxiliaryTracks.find((r2) => ut(a11.tracks[r2]));
24037
24037
  return i2 ? a11.tracks[i2] : void 0;
24038
24038
  }
24039
24039
  });
24040
- var zm = A2(createSelector(N2, q2, (a11, e) => {
24040
+ var Xm = A2(createSelector(N2, q2, (a11, e) => {
24041
24041
  let t2 = e == null ? void 0 : e.auxiliaryTracks.find((i2) => {
24042
24042
  let r2 = a11[i2];
24043
- return mt(r2) && ht(r2);
24043
+ return ht(r2) && pt(r2);
24044
24044
  });
24045
24045
  return t2 ? a11[t2] : void 0;
24046
24046
  }));
24047
- var Ym = A2(createSelector(N2, q2, (a11, e) => {
24047
+ var Zm = A2(createSelector(N2, q2, (a11, e) => {
24048
24048
  let t2 = e == null ? void 0 : e.auxiliaryTracks.find((i2) => {
24049
24049
  let r2 = a11[i2];
24050
- return mt(r2) && pt(r2);
24050
+ return ht(r2) && ut(r2);
24051
24051
  });
24052
24052
  return t2 ? a11[t2] : void 0;
24053
24053
  }));
24054
- var Xm = A2(createSelector(N2, q2, (a11, e) => {
24054
+ var eS = A2(createSelector(N2, q2, (a11, e) => {
24055
24055
  let t2 = e == null ? void 0 : e.auxiliaryTracks.find((i2) => {
24056
24056
  let r2 = a11[i2];
24057
- return ri(r2) && pt(r2);
24057
+ return ii(r2) && ut(r2);
24058
24058
  });
24059
24059
  return t2 ? a11[t2] : void 0;
24060
24060
  }));
24061
- var Sa = A2(createSelector(N2, q2, (a11, e) => Ue(a11, e)));
24062
- var ga = (a11) => createSelector(Sa(a11), (e) => e.audio);
24063
- var eS = A2((a11, e) => {
24061
+ var ga = A2(createSelector(N2, q2, (a11, e) => xe(a11, e)));
24062
+ var Ta = (a11) => createSelector(ga(a11), (e) => e.audio);
24063
+ var iS = A2((a11, e) => {
24064
24064
  let t2 = q2(a11, e);
24065
24065
  return je(a11, t2 == null ? void 0 : t2.audioTrack);
24066
24066
  });
24067
- var tS = A2((a11, e) => {
24067
+ var rS = A2((a11, e) => {
24068
24068
  let t2 = q2(a11, e);
24069
24069
  return je(a11, t2 == null ? void 0 : t2.videoTrack);
24070
24070
  });
24071
- var Ta = A2((a11, e) => {
24071
+ var fa = A2((a11, e) => {
24072
24072
  if (e && a11.tracks[e])
24073
24073
  return a11.tracks[e].volume === 0;
24074
24074
  });
24075
- var iS = A2((a11, e) => {
24075
+ var sS = A2((a11, e) => {
24076
24076
  let t2 = q2(a11, e);
24077
- return Ta(t2 == null ? void 0 : t2.audioTrack)(a11);
24077
+ return fa(t2 == null ? void 0 : t2.audioTrack)(a11);
24078
24078
  });
24079
- var rS = A2((a11, e) => {
24080
- let t2 = ga(e)(a11);
24081
- return Ta(t2 == null ? void 0 : t2.id)(a11);
24079
+ var aS = A2((a11, e) => {
24080
+ let t2 = Ta(e)(a11);
24081
+ return fa(t2 == null ? void 0 : t2.id)(a11);
24082
24082
  });
24083
- var fa = A2((a11, e) => {
24083
+ var va = A2((a11, e) => {
24084
24084
  let t2 = Wr(a11, e);
24085
24085
  if (t2) {
24086
24086
  if (t2.type !== "audio") {
@@ -24090,15 +24090,15 @@ var fa = A2((a11, e) => {
24090
24090
  return t2.volume;
24091
24091
  }
24092
24092
  });
24093
- var sS = A2((a11, e) => {
24093
+ var oS = A2((a11, e) => {
24094
24094
  let t2 = q2(a11, e);
24095
- return fa(t2 == null ? void 0 : t2.audioTrack)(a11);
24095
+ return va(t2 == null ? void 0 : t2.audioTrack)(a11);
24096
24096
  });
24097
- var aS = A2((a11, e) => {
24098
- let t2 = ga(e)(a11);
24099
- return fa(t2 == null ? void 0 : t2.id)(a11);
24097
+ var nS = A2((a11, e) => {
24098
+ let t2 = Ta(e)(a11);
24099
+ return va(t2 == null ? void 0 : t2.id)(a11);
24100
24100
  });
24101
- var oS = A2((a11, e) => {
24101
+ var cS = A2((a11, e) => {
24102
24102
  let t2 = Wr(a11, e);
24103
24103
  if (t2) {
24104
24104
  if (t2.type !== "video") {
@@ -24108,54 +24108,54 @@ var oS = A2((a11, e) => {
24108
24108
  return t2.layer;
24109
24109
  }
24110
24110
  });
24111
- var va = createSelector([It, ye, Gr], (a11, e, t2) => {
24111
+ var Ma = createSelector([Rt, ye, Gr], (a11, e, t2) => {
24112
24112
  if (t2)
24113
24113
  return a11.filter((i2) => {
24114
24114
  var r2;
24115
24115
  return !i2.recipientPeer && !((r2 = i2.recipientRoles) != null && r2.length) || i2.sender && ![e, t2].includes(i2.sender) ? false : [e, t2].includes(i2.recipientPeer);
24116
24116
  });
24117
24117
  });
24118
- var Ma = createSelector([It, pa], (a11, e) => {
24118
+ var ya = createSelector([Rt, ha], (a11, e) => {
24119
24119
  if (e)
24120
24120
  return a11.filter((t2) => {
24121
24121
  var i2, r2;
24122
24122
  return (i2 = t2.recipientRoles) != null && i2.length ? (r2 = t2.recipientRoles) == null ? void 0 : r2.includes(e) : false;
24123
24123
  });
24124
24124
  });
24125
- var jo = createSelector(It, (a11) => a11.filter((e) => {
24125
+ var Jo = createSelector(Rt, (a11) => a11.filter((e) => {
24126
24126
  var t2;
24127
24127
  return !e.recipientPeer && !((t2 = e.recipientRoles) != null && t2.length);
24128
24128
  }));
24129
- var Jo = createSelector([Ma, pa], (a11) => a11 ? a11.filter((e) => !e.read).length : 0);
24130
- var Qo = createSelector([va, Gr], (a11) => a11 ? a11.filter((e) => !e.read).length : 0);
24131
- var nS = createSelector(jo, (a11) => a11.filter((e) => !e.read).length);
24132
- var cS = A2(va);
24133
- var dS = A2(Ma);
24134
- var lS = A2(Jo);
24135
- var uS = A2(Qo);
24136
- var ya = A2(Wo);
24137
- var PS = createSelector([K, N2], (a11, e) => Object.values(a11).map((i2) => {
24129
+ var Qo = createSelector([ya, ha], (a11) => a11 ? a11.filter((e) => !e.read).length : 0);
24130
+ var zo = createSelector([Ma, Gr], (a11) => a11 ? a11.filter((e) => !e.read).length : 0);
24131
+ var dS = createSelector(Jo, (a11) => a11.filter((e) => !e.read).length);
24132
+ var lS = A2(Ma);
24133
+ var uS = A2(ya);
24134
+ var pS = A2(Qo);
24135
+ var hS = A2(zo);
24136
+ var ka = A2($o);
24137
+ var bS = createSelector([K, N2], (a11, e) => Object.values(a11).map((i2) => {
24138
24138
  var r2;
24139
24139
  return { peer: i2, isAudioEnabled: i2.audioTrack ? (r2 = e[i2.audioTrack]) == null ? void 0 : r2.enabled : false };
24140
24140
  }));
24141
- var zo = (a11) => a11.roleChangeRequests[0] || null;
24142
- var ES = createSelector([zo, K, Se], (a11, e, t2) => a11 ? { requestedBy: a11.requestedBy ? e[a11.requestedBy] : void 0, role: t2[a11.roleName], token: a11.token } : null);
24143
- var bS = createSelector([at], (a11) => St(a11));
24144
- var RS = createSelector([Zs], (a11) => St(a11));
24145
- var Xo = createSelector([Y2, N2], (a11, e) => {
24141
+ var Yo = (a11) => a11.roleChangeRequests[0] || null;
24142
+ var RS = createSelector([Yo, K, Se], (a11, e, t2) => a11 ? { requestedBy: a11.requestedBy ? e[a11.requestedBy] : void 0, role: t2[a11.roleName], token: a11.token } : null);
24143
+ var IS = createSelector([at], (a11) => mt(a11));
24144
+ var AS = createSelector([ea], (a11) => mt(a11));
24145
+ var Zo = createSelector([Y2, N2], (a11, e) => {
24146
24146
  let t2 = null;
24147
24147
  return a11 && (t2 = e[a11]), (t2 == null ? void 0 : t2.plugins) || [];
24148
24148
  });
24149
- var Zo = createSelector([ae, N2], (a11, e) => {
24149
+ var en2 = createSelector([ae, N2], (a11, e) => {
24150
24150
  let t2 = null;
24151
24151
  return a11 && (t2 = e[a11]), (t2 == null ? void 0 : t2.plugins) || [];
24152
24152
  });
24153
- var yi = { 0: "PEER_JOINED", 1: "PEER_LEFT", 8: "ROLE_UPDATED", 10: "NAME_UPDATED", 11: "METADATA_UPDATED", 12: "HAND_RAISE_CHANGED" };
24154
- var Ct = { 0: "TRACK_ADDED", 1: "TRACK_REMOVED", 2: "TRACK_MUTED", 3: "TRACK_UNMUTED", 5: "TRACK_DEGRADED", 6: "TRACK_RESTORED", 4: "TRACK_DESCRIPTION_CHANGED" };
24155
- var ki = { 0: "POLL_CREATED", 1: "POLL_STARTED", 2: "POLL_STOPPED", 4: "POLL_VOTES_UPDATED", 3: "POLLS_LIST" };
24156
- var ka = { TRANSCRIPTION_STATE_UPDATED: "TRANSCRIPTION_STATE_UPDATED" };
24153
+ var Mi = { 0: "PEER_JOINED", 1: "PEER_LEFT", 8: "ROLE_UPDATED", 10: "NAME_UPDATED", 11: "METADATA_UPDATED", 12: "HAND_RAISE_CHANGED" };
24154
+ var Ht = { 0: "TRACK_ADDED", 1: "TRACK_REMOVED", 2: "TRACK_MUTED", 3: "TRACK_UNMUTED", 5: "TRACK_DEGRADED", 6: "TRACK_RESTORED", 4: "TRACK_DESCRIPTION_CHANGED" };
24155
+ var yi = { 0: "POLL_CREATED", 1: "POLL_STARTED", 2: "POLL_STOPPED", 4: "POLL_VOTES_UPDATED", 3: "POLLS_LIST" };
24156
+ var Pa = { TRANSCRIPTION_STATE_UPDATED: "TRANSCRIPTION_STATE_UPDATED" };
24157
24157
  var $r = "hmsNotification";
24158
- var Pi = class {
24158
+ var ki = class {
24159
24159
  constructor(e) {
24160
24160
  this.id = 0;
24161
24161
  this.onNotification = (e2, t2) => {
@@ -24171,7 +24171,7 @@ var Pi = class {
24171
24171
  this.eventEmitter.removeListener($r, i2);
24172
24172
  };
24173
24173
  };
24174
- this.store = e, this.eventEmitter = new en2({ maxListeners: Object.keys(gr).length });
24174
+ this.store = e, this.eventEmitter = new tn2({ maxListeners: Object.keys(gr).length });
24175
24175
  }
24176
24176
  sendPlaylistTrackEnded(e) {
24177
24177
  let t2 = this.createNotification("PLAYLIST_TRACK_ENDED", e, "info");
@@ -24194,14 +24194,14 @@ var Pi = class {
24194
24194
  this.emitEvent(t2);
24195
24195
  }
24196
24196
  sendPeerUpdate(e, t2) {
24197
- let i2 = this.store.getState(X2(t2 == null ? void 0 : t2.id)) || t2, r2 = yi[e];
24197
+ let i2 = this.store.getState(X2(t2 == null ? void 0 : t2.id)) || t2, r2 = Mi[e];
24198
24198
  if (r2 && i2) {
24199
24199
  let s2 = this.createNotification(r2, i2, "info");
24200
24200
  this.emitEvent(s2);
24201
24201
  }
24202
24202
  }
24203
24203
  sendTrackUpdate(e, t2) {
24204
- let i2 = this.store.getState(vi(t2)), r2 = Ct[e];
24204
+ let i2 = this.store.getState(fi(t2)), r2 = Ht[e];
24205
24205
  if (r2) {
24206
24206
  let s2 = this.createNotification(r2, i2, "info");
24207
24207
  this.emitEvent(s2);
@@ -24232,14 +24232,14 @@ var Pi = class {
24232
24232
  this.emitEvent(t2);
24233
24233
  }
24234
24234
  sendPollUpdate(e, t2) {
24235
- let i2 = ki[e], r2 = this.store.getState(ya(t2));
24235
+ let i2 = yi[e], r2 = this.store.getState(ka(t2));
24236
24236
  if (i2) {
24237
24237
  let s2 = this.createNotification(i2, r2, "info");
24238
24238
  this.emitEvent(s2);
24239
24239
  }
24240
24240
  }
24241
24241
  sendTranscriptionUpdate(e) {
24242
- let t2 = this.createNotification(ka.TRANSCRIPTION_STATE_UPDATED, e, "info");
24242
+ let t2 = this.createNotification(Pa.TRANSCRIPTION_STATE_UPDATED, e, "info");
24243
24243
  this.emitEvent(t2);
24244
24244
  }
24245
24245
  emitEvent(e) {
@@ -24249,7 +24249,7 @@ var Pi = class {
24249
24249
  return this.id++, { id: this.id, type: e, message: r2, data: t2, severity: i2 };
24250
24250
  }
24251
24251
  };
24252
- var Ei = class {
24252
+ var Pi = class {
24253
24253
  constructor(e) {
24254
24254
  this.queuedUpdates = {};
24255
24255
  this.timers = {};
@@ -24276,39 +24276,39 @@ var Ei = class {
24276
24276
  delete this.queuedUpdates[e], window && this.timers[e] && (window.clearTimeout(this.timers[e]), delete this.timers[e]);
24277
24277
  }
24278
24278
  };
24279
- function Pa(a11) {
24279
+ function Ea(a11) {
24280
24280
  return a11 instanceof se || a11 instanceof U2;
24281
24281
  }
24282
- var Ea = (a11, e) => {
24283
- let t2 = Lt(Object.keys(a11), Object.keys(e));
24282
+ var ba = (a11, e) => {
24283
+ let t2 = Ct(Object.keys(a11), Object.keys(e));
24284
24284
  for (let i2 of t2) {
24285
24285
  let r2 = a11[i2], s2 = e[i2];
24286
- Ke(r2, s2) ? (re(r2.auxiliaryTracks, s2.auxiliaryTracks) && (s2.auxiliaryTracks = r2.auxiliaryTracks), r2.groups && re(r2.groups, s2.groups) && (s2.groups = r2.groups), Object.assign(r2, s2)) : jr(r2, s2) ? delete a11[i2] : bi(r2, s2) && (a11[i2] = s2);
24286
+ $e(r2, s2) ? (re(r2.auxiliaryTracks, s2.auxiliaryTracks) && (s2.auxiliaryTracks = r2.auxiliaryTracks), r2.groups && re(r2.groups, s2.groups) && (s2.groups = r2.groups), Object.assign(r2, s2)) : jr(r2, s2) ? delete a11[i2] : Ei(r2, s2) && (a11[i2] = s2);
24287
24287
  }
24288
24288
  };
24289
- var ba = (a11, e) => {
24290
- let t2 = Lt(Object.keys(a11), Object.keys(e));
24289
+ var Ra = (a11, e) => {
24290
+ let t2 = Ct(Object.keys(a11), Object.keys(e));
24291
24291
  for (let i2 of t2) {
24292
24292
  let r2 = a11[i2], s2 = e[i2];
24293
- Ke(r2, s2) ? (qr(r2, s2), Object.assign(r2, s2)) : jr(r2, s2) ? delete a11[i2] : bi(r2, s2) && (a11[i2] = s2);
24293
+ $e(r2, s2) ? (qr(r2, s2), Object.assign(r2, s2)) : jr(r2, s2) ? delete a11[i2] : Ei(r2, s2) && (a11[i2] = s2);
24294
24294
  }
24295
24295
  };
24296
- var Ra = (a11, e) => {
24297
- let t2 = Lt(Object.keys(a11), Object.keys(e));
24296
+ var Ia = (a11, e) => {
24297
+ let t2 = Ct(Object.keys(a11), Object.keys(e));
24298
24298
  for (let i2 of t2) {
24299
24299
  let r2 = a11[i2], s2 = e[i2];
24300
- Ke(r2, s2) ? (r2.questions && re(r2.questions, s2.questions) && (s2.questions = r2.questions), Object.assign(r2, s2)) : bi(r2, s2) && (a11[i2] = s2);
24300
+ $e(r2, s2) ? (r2.questions && re(r2.questions, s2.questions) && (s2.questions = r2.questions), Object.assign(r2, s2)) : Ei(r2, s2) && (a11[i2] = s2);
24301
24301
  }
24302
24302
  };
24303
24303
  var Kr = (a11, e) => {
24304
- let t2 = Lt(Object.keys(a11), Object.keys(e));
24304
+ let t2 = Ct(Object.keys(a11), Object.keys(e));
24305
24305
  for (let i2 of t2) {
24306
24306
  let r2 = a11[i2], s2 = e[i2];
24307
- Ke(r2, s2) ? Object.assign(r2, s2) : jr(r2, s2) ? delete a11[i2] : bi(r2, s2) && (a11[i2] = s2);
24307
+ $e(r2, s2) ? Object.assign(r2, s2) : jr(r2, s2) ? delete a11[i2] : Ei(r2, s2) && (a11[i2] = s2);
24308
24308
  }
24309
24309
  };
24310
- var Ia = (a11, e, t2) => {
24311
- let i2 = t2.reduce((s2, o2) => (s2[o2.firstTrackId] = Object.values(e[o2.getTrackIDBeingSent()] || {}).sort((n2, l2) => !n2.rid || !l2.rid ? 0 : n2.rid < l2.rid ? -1 : 1), s2), {}), r2 = Lt(Object.keys(a11), Object.keys(i2));
24310
+ var Aa = (a11, e, t2) => {
24311
+ let i2 = t2.reduce((s2, o2) => (s2[o2.firstTrackId] = Object.values(e[o2.getTrackIDBeingSent()] || {}).sort((n2, l2) => !n2.rid || !l2.rid ? 0 : n2.rid < l2.rid ? -1 : 1), s2), {}), r2 = Ct(Object.keys(a11), Object.keys(i2));
24312
24312
  for (let s2 of r2) {
24313
24313
  if (!i2[s2]) {
24314
24314
  delete a11[s2];
@@ -24320,9 +24320,9 @@ var Ia = (a11, e, t2) => {
24320
24320
  var qr = (a11, e) => {
24321
24321
  a11.plugins && re(a11.plugins, e.plugins) && (e.plugins = a11.plugins), a11.type === "video" && a11.layerDefinitions && re(a11.layerDefinitions, e.layerDefinitions) && (e.layerDefinitions = a11.layerDefinitions);
24322
24322
  };
24323
- var Ke = (a11, e) => a11 && e;
24323
+ var $e = (a11, e) => a11 && e;
24324
24324
  var jr = (a11, e) => a11 && !e;
24325
- var bi = (a11, e) => !a11 && e;
24325
+ var Ei = (a11, e) => !a11 && e;
24326
24326
  var re = (a11, e) => {
24327
24327
  if (a11 === e || a11.length === 0 && (e == null ? void 0 : e.length) === 0)
24328
24328
  return true;
@@ -24333,7 +24333,7 @@ var re = (a11, e) => {
24333
24333
  return false;
24334
24334
  return true;
24335
24335
  };
24336
- var Lt = (a11, e) => {
24336
+ var Ct = (a11, e) => {
24337
24337
  let t2 = /* @__PURE__ */ new Set();
24338
24338
  for (let i2 of a11)
24339
24339
  t2.add(i2);
@@ -24418,7 +24418,7 @@ var _2 = class a8 {
24418
24418
  return { recording: { browser: m({ running: false }, e == null ? void 0 : e.browser), server: m({ running: false }, e == null ? void 0 : e.server), hls: m({ running: false }, e == null ? void 0 : e.hls) }, rtmp: m({ running: false }, t2), hls: { variants: ((s2 = i2 == null ? void 0 : i2.variants) == null ? void 0 : s2.map((o2) => o2)) || [], running: !!(i2 != null && i2.running), error: i2 == null ? void 0 : i2.error }, transcriptions: r2 || [] };
24419
24419
  }
24420
24420
  };
24421
- var Dt = class {
24421
+ var Lt = class {
24422
24422
  constructor(e, t2, i2, r2) {
24423
24423
  this.playlistManager = e;
24424
24424
  this.syncPlaylistState = i2;
@@ -24436,7 +24436,7 @@ var Dt = class {
24436
24436
  }
24437
24437
  pause() {
24438
24438
  return c2(this, null, function* () {
24439
- let e = this.type === "audio" ? la : ua, t2 = this.store.getState(e.selection);
24439
+ let e = this.type === "audio" ? ua : pa, t2 = this.store.getState(e.selection);
24440
24440
  if (!t2.id) {
24441
24441
  b2.w("No item is currently playing to pause");
24442
24442
  return;
@@ -24489,7 +24489,7 @@ var Dt = class {
24489
24489
  });
24490
24490
  }
24491
24491
  };
24492
- var Ri = class {
24492
+ var bi = class {
24493
24493
  constructor(e, t2) {
24494
24494
  this.sdk = e;
24495
24495
  this.setLocally = t2;
@@ -24516,7 +24516,7 @@ var Ri = class {
24516
24516
  });
24517
24517
  }
24518
24518
  };
24519
- var Ii = class {
24519
+ var Ri = class {
24520
24520
  constructor(e, t2) {
24521
24521
  this.intervalMs = 100, this.shouldMonitor = false, this.hasStarted = false, this.unsubs = [], this.analysers = {}, this.store = e, this.actions = t2;
24522
24522
  }
@@ -24592,11 +24592,11 @@ var Ii = class {
24592
24592
  return Math.ceil(Math.min(Math.max(s2 * 100, 0), 100));
24593
24593
  }
24594
24594
  };
24595
- var Aa = 2e4;
24596
- var Ha = 1e4;
24595
+ var Ha = 2e4;
24596
+ var Ca = 1e4;
24597
24597
  var ot = { name: "diagnostics-role", priority: 1, publishParams: { allowed: ["audio", "video"], audio: { bitRate: 32, codec: "opus" }, video: { bitRate: 100, codec: "vp8", frameRate: 30, height: 720, width: 1280 }, screen: { bitRate: 100, codec: "vp8", frameRate: 10, height: 1080, width: 1920 } }, subscribeParams: { subscribeToRoles: [], maxSubsBitRate: 3200 }, permissions: { browserRecording: false, changeRole: false, endRoom: false, hlsStreaming: false, mute: false, pollRead: false, pollWrite: false, removeOthers: false, rtmpStreaming: false, unmute: false } };
24598
- var Ca = "https://100ms.live/test-audio.wav";
24599
- var Ai = class {
24598
+ var La = "https://100ms.live/test-audio.wav";
24599
+ var Ii = class {
24600
24600
  constructor() {
24601
24601
  this.networkScores = [];
24602
24602
  this.lastPushedAt = 0;
@@ -24616,13 +24616,13 @@ var Ai = class {
24616
24616
  return this.networkScores.reduce((e, t2) => e + t2, 0) / this.networkScores.length;
24617
24617
  }
24618
24618
  };
24619
- var tn2 = (a11) => !!a11 && !isNaN(a11);
24619
+ var rn2 = (a11) => !!a11 && !isNaN(a11);
24620
24620
  var de = (a11) => a11[a11.length - 1];
24621
24621
  var Ne = (a11, e) => {
24622
- let t2 = a11.filter((i2) => tn2(e(i2)));
24622
+ let t2 = a11.filter((i2) => rn2(e(i2)));
24623
24623
  return t2.reduce((i2, r2) => i2 + (e(r2) || 0), 0) / t2.length;
24624
24624
  };
24625
- var Hi = class {
24625
+ var Ai = class {
24626
24626
  constructor(e) {
24627
24627
  this.sdk = e;
24628
24628
  this.peerStatsList = [];
@@ -24633,36 +24633,36 @@ var Hi = class {
24633
24633
  }
24634
24634
  handleStatsUpdate(e) {
24635
24635
  return c2(this, null, function* () {
24636
- var n2, l2, u2, p2, h2, T, g2, f2;
24636
+ var n2, l2, u2, p2, h2, T, g2, v2;
24637
24637
  let t2 = e.getLocalPeerStats();
24638
24638
  t2 && this.peerStatsList.push(t2);
24639
24639
  let i2 = (u2 = (l2 = (n2 = this.sdk.getLocalPeer()) == null ? void 0 : n2.audioTrack) == null ? void 0 : l2.nativeTrack) == null ? void 0 : u2.id, r2 = (T = (h2 = (p2 = this.sdk.getLocalPeer()) == null ? void 0 : p2.videoTrack) == null ? void 0 : h2.nativeTrack) == null ? void 0 : T.id, s2 = e.getLocalTrackStats();
24640
24640
  s2 && (i2 && this.localAudioTrackStatsList.push(s2[i2]), r2 && this.localVideoTrackStatsList.push(s2[r2]));
24641
- let o2 = yield (f2 = (g2 = this.sdk.getWebrtcInternals()) == null ? void 0 : g2.getSubscribePeerConnection()) == null ? void 0 : f2.getStats();
24642
- o2 == null || o2.forEach((P7) => {
24643
- if (P7.type === "inbound-rtp") {
24644
- let k2 = P7.kind === "audio" ? this.remoteAudioTrackStatsList : this.remoteVideoTrackStatsList, w2 = Et("bytesReceived", P7, de(k2));
24645
- k2.push(M2(m({}, P7), { bitrate: w2 }));
24641
+ let o2 = yield (v2 = (g2 = this.sdk.getWebrtcInternals()) == null ? void 0 : g2.getSubscribePeerConnection()) == null ? void 0 : v2.getStats();
24642
+ o2 == null || o2.forEach((E2) => {
24643
+ if (E2.type === "inbound-rtp") {
24644
+ let P7 = E2.kind === "audio" ? this.remoteAudioTrackStatsList : this.remoteVideoTrackStatsList, w2 = Pt("bytesReceived", E2, de(P7));
24645
+ P7.push(M2(m({}, E2), { bitrate: w2 }));
24646
24646
  }
24647
24647
  });
24648
24648
  });
24649
24649
  }
24650
24650
  buildReport() {
24651
- var T, g2, f2, P7, k2, w2, xe, Zt;
24652
- let e = (T = de(this.peerStatsList)) == null ? void 0 : T.publish, t2 = (g2 = de(this.peerStatsList)) == null ? void 0 : g2.subscribe, i2 = e != null && e.responsesReceived ? ((e == null ? void 0 : e.totalRoundTripTime) || 0) / e.responsesReceived : 0, r2 = t2 != null && t2.responsesReceived ? ((t2 == null ? void 0 : t2.totalRoundTripTime) || 0) / t2.responsesReceived : 0, s2 = Number(((i2 + r2) / 2 * 1e3).toFixed(2)), o2 = ((f2 = de(this.remoteAudioTrackStatsList)) == null ? void 0 : f2.packetsReceived) || 0, n2 = ((P7 = de(this.remoteVideoTrackStatsList)) == null ? void 0 : P7.packetsReceived) || 0, l2 = this.localAudioTrackStatsList.map((x2) => x2 ? Ne(Object.values(x2), ($) => $.bitrate) : 0), u2 = this.localVideoTrackStatsList.map((x2) => x2 ? Ne(Object.values(x2), ($) => $.bitrate) : 0), p2 = de(this.localAudioTrackStatsList), h2 = de(this.localVideoTrackStatsList);
24651
+ var T, g2, v2, E2, P7, w2, Oe, Xt;
24652
+ let e = (T = de(this.peerStatsList)) == null ? void 0 : T.publish, t2 = (g2 = de(this.peerStatsList)) == null ? void 0 : g2.subscribe, i2 = e != null && e.responsesReceived ? ((e == null ? void 0 : e.totalRoundTripTime) || 0) / e.responsesReceived : 0, r2 = t2 != null && t2.responsesReceived ? ((t2 == null ? void 0 : t2.totalRoundTripTime) || 0) / t2.responsesReceived : 0, s2 = Number(((i2 + r2) / 2 * 1e3).toFixed(2)), o2 = ((v2 = de(this.remoteAudioTrackStatsList)) == null ? void 0 : v2.packetsReceived) || 0, n2 = ((E2 = de(this.remoteVideoTrackStatsList)) == null ? void 0 : E2.packetsReceived) || 0, l2 = this.localAudioTrackStatsList.map((x2) => x2 ? Ne(Object.values(x2), ($) => $.bitrate) : 0), u2 = this.localVideoTrackStatsList.map((x2) => x2 ? Ne(Object.values(x2), ($) => $.bitrate) : 0), p2 = de(this.localAudioTrackStatsList), h2 = de(this.localVideoTrackStatsList);
24653
24653
  return { combined: { roundTripTime: s2, packetsReceived: o2 + n2, packetsLost: (t2 == null ? void 0 : t2.packetsLost) || 0, bytesSent: (e == null ? void 0 : e.bytesSent) || 0, bytesReceived: (t2 == null ? void 0 : t2.bytesReceived) || 0, bitrateSent: Ne(this.peerStatsList, (x2) => {
24654
24654
  var $;
24655
24655
  return ($ = x2.publish) == null ? void 0 : $.bitrate;
24656
24656
  }), bitrateReceived: Ne(this.peerStatsList, (x2) => {
24657
24657
  var $;
24658
24658
  return ($ = x2.subscribe) == null ? void 0 : $.bitrate;
24659
- }) }, audio: { roundTripTime: s2, packetsReceived: o2, packetsLost: ((k2 = de(this.remoteAudioTrackStatsList)) == null ? void 0 : k2.packetsLost) || 0, bytesReceived: ((w2 = de(this.remoteAudioTrackStatsList)) == null ? void 0 : w2.bytesReceived) || 0, bitrateSent: Ne(l2, (x2) => x2), bitrateReceived: Ne(this.remoteAudioTrackStatsList, (x2) => x2.bitrate), bytesSent: p2 ? Object.values(p2).reduce((x2, $) => x2 + ($.bytesSent || 0), 0) : 0 }, video: { roundTripTime: s2, packetsLost: ((xe = de(this.remoteVideoTrackStatsList)) == null ? void 0 : xe.packetsLost) || 0, bytesReceived: ((Zt = de(this.remoteVideoTrackStatsList)) == null ? void 0 : Zt.bytesReceived) || 0, packetsReceived: n2, bitrateSent: Ne(u2, (x2) => x2), bitrateReceived: Ne(this.remoteVideoTrackStatsList, (x2) => x2.bitrate), bytesSent: h2 ? Object.values(h2).reduce((x2, $) => x2 + ($.bytesSent || 0), 0) : 0 } };
24659
+ }) }, audio: { roundTripTime: s2, packetsReceived: o2, packetsLost: ((P7 = de(this.remoteAudioTrackStatsList)) == null ? void 0 : P7.packetsLost) || 0, bytesReceived: ((w2 = de(this.remoteAudioTrackStatsList)) == null ? void 0 : w2.bytesReceived) || 0, bitrateSent: Ne(l2, (x2) => x2), bitrateReceived: Ne(this.remoteAudioTrackStatsList, (x2) => x2.bitrate), bytesSent: p2 ? Object.values(p2).reduce((x2, $) => x2 + ($.bytesSent || 0), 0) : 0 }, video: { roundTripTime: s2, packetsLost: ((Oe = de(this.remoteVideoTrackStatsList)) == null ? void 0 : Oe.packetsLost) || 0, bytesReceived: ((Xt = de(this.remoteVideoTrackStatsList)) == null ? void 0 : Xt.bytesReceived) || 0, packetsReceived: n2, bitrateSent: Ne(u2, (x2) => x2), bitrateReceived: Ne(this.remoteVideoTrackStatsList, (x2) => x2.bitrate), bytesSent: h2 ? Object.values(h2).reduce((x2, $) => x2 + ($.bytesSent || 0), 0) : 0 } };
24660
24660
  }
24661
24661
  };
24662
- var rn2 = ((n2) => (n2[n2.STARTING = 0] = "STARTING", n2[n2.INIT_FETCHED = 1] = "INIT_FETCHED", n2[n2.SIGNAL_CONNECTED = 2] = "SIGNAL_CONNECTED", n2[n2.ICE_ESTABLISHED = 3] = "ICE_ESTABLISHED", n2[n2.MEDIA_CAPTURED = 4] = "MEDIA_CAPTURED", n2[n2.MEDIA_PUBLISHED = 5] = "MEDIA_PUBLISHED", n2[n2.COMPLETED = 6] = "COMPLETED", n2))(rn2 || {});
24663
- var La;
24662
+ var sn2 = ((n2) => (n2[n2.STARTING = 0] = "STARTING", n2[n2.INIT_FETCHED = 1] = "INIT_FETCHED", n2[n2.SIGNAL_CONNECTED = 2] = "SIGNAL_CONNECTED", n2[n2.ICE_ESTABLISHED = 3] = "ICE_ESTABLISHED", n2[n2.MEDIA_CAPTURED = 4] = "MEDIA_CAPTURED", n2[n2.MEDIA_PUBLISHED = 5] = "MEDIA_PUBLISHED", n2[n2.COMPLETED = 6] = "COMPLETED", n2))(sn2 || {});
24664
24663
  var Da;
24665
- var Ci = class {
24664
+ var wa;
24665
+ var Hi = class {
24666
24666
  constructor(e, t2, i2, r2) {
24667
24667
  this.sdk = e;
24668
24668
  this.sdkListener = t2;
@@ -24679,7 +24679,7 @@ var Ci = class {
24679
24679
  this.isVideoTrackCaptured = false;
24680
24680
  this.isAudioTrackPublished = false;
24681
24681
  this.isVideoTrackPublished = false;
24682
- this.cqsCalculator = new Ai();
24682
+ this.cqsCalculator = new Ii();
24683
24683
  this.timestamp = Date.now();
24684
24684
  this.onRoomUpdate = this.sdkListener.onRoomUpdate.bind(this.sdkListener);
24685
24685
  this.onPeerUpdate = this.sdkListener.onPeerUpdate.bind(this.sdkListener);
@@ -24690,9 +24690,9 @@ var Ci = class {
24690
24690
  this.onChangeTrackStateRequest = this.sdkListener.onChangeTrackStateRequest.bind(this.sdkListener);
24691
24691
  this.onChangeMultiTrackStateRequest = this.sdkListener.onChangeMultiTrackStateRequest.bind(this.sdkListener);
24692
24692
  this.onRemovedFromRoom = this.sdkListener.onRemovedFromRoom.bind(this.sdkListener);
24693
- this.onNetworkQuality = (La = this.sdkListener.onNetworkQuality) == null ? void 0 : La.bind(this.sdkListener);
24693
+ this.onNetworkQuality = (Da = this.sdkListener.onNetworkQuality) == null ? void 0 : Da.bind(this.sdkListener);
24694
24694
  this.onPreview = this.sdkListener.onPreview.bind(this.sdkListener);
24695
- this.onDeviceChange = (Da = this.sdkListener.onDeviceChange) == null ? void 0 : Da.bind(this.sdkListener);
24695
+ this.onDeviceChange = (wa = this.sdkListener.onDeviceChange) == null ? void 0 : wa.bind(this.sdkListener);
24696
24696
  this.onSessionStoreUpdate = this.sdkListener.onSessionStoreUpdate.bind(this.sdkListener);
24697
24697
  this.onPollsUpdate = this.sdkListener.onPollsUpdate.bind(this.sdkListener);
24698
24698
  this.onWhiteboardUpdate = this.sdkListener.onWhiteboardUpdate.bind(this.sdkListener);
@@ -24703,7 +24703,7 @@ var Ci = class {
24703
24703
  });
24704
24704
  this.cqsCalculator.pushScore(t3 == null ? void 0 : t3.downlinkQuality);
24705
24705
  };
24706
- this.statsCollector = new Hi(e), this.state = 0;
24706
+ this.statsCollector = new Ai(e), this.state = 0;
24707
24707
  }
24708
24708
  get state() {
24709
24709
  return this._state;
@@ -24744,7 +24744,7 @@ var Ci = class {
24744
24744
  var t2, i2;
24745
24745
  this.sdkListener.onJoin(e), (t2 = this.sdk.getWebrtcInternals()) == null || t2.onStatsChange((r2) => this.statsCollector.handleStatsUpdate(r2)), (i2 = this.sdk.getWebrtcInternals()) == null || i2.start(), this.cleanupTimer = window.setTimeout(() => {
24746
24746
  this.cleanupAndReport();
24747
- }, Aa);
24747
+ }, Ha);
24748
24748
  }
24749
24749
  onError(e) {
24750
24750
  this.sdkListener.onError(e), this.errors.push(e), e != null && e.isTerminal && this.cleanupAndReport();
@@ -24769,7 +24769,7 @@ var Ci = class {
24769
24769
  }
24770
24770
  cleanupAndReport() {
24771
24771
  var e;
24772
- clearTimeout(this.cleanupTimer), this.cleanupTimer = void 0, this.state === 5 && this.errors.length === 0 && (this.state = 6), (e = this.completionCallback) == null || e.call(this, this.buildReport()), this.sdk.leave();
24772
+ clearTimeout(this.cleanupTimer), this.cleanupTimer = void 0, this.state === 5 && (this.state = 6), (e = this.completionCallback) == null || e.call(this, this.buildReport()), this.sdk.leave();
24773
24773
  }
24774
24774
  buildReport() {
24775
24775
  this.cqsCalculator.addPendingCQSTillNow();
@@ -24777,7 +24777,7 @@ var Ci = class {
24777
24777
  return { testTimestamp: this.timestamp, connectivityState: this.state, errors: this.errors, signallingReport: { isConnected: this.wsConnected, isInitConnected: this.initConnected, websocketUrl: this.websocketURL }, mediaServerReport: { stats: t2, connectionQualityScore: e, isPublishICEConnected: this.isPublishICEConnected, isSubscribeICEConnected: this.isSubscribeICEConnected, publishICECandidatePairSelected: this.selectedPublishICECandidate, subscribeICECandidatePairSelected: this.selectedSubscribeICECandidate, publishIceCandidatesGathered: this.gatheredPublishICECandidates, subscribeIceCandidatesGathered: this.gatheredSubscribeICECandidates } };
24778
24778
  }
24779
24779
  };
24780
- var Oe = class {
24780
+ var Ke = class {
24781
24781
  constructor(e) {
24782
24782
  this.recording = { server: { running: false }, browser: { running: false }, hls: { running: false } };
24783
24783
  this.rtmp = { running: false };
@@ -24786,7 +24786,7 @@ var Oe = class {
24786
24786
  this.id = e;
24787
24787
  }
24788
24788
  };
24789
- var Li = (a11, e, t2) => c2(void 0, null, function* () {
24789
+ var Ci = (a11, e, t2) => c2(void 0, null, function* () {
24790
24790
  let r2 = Error("something went wrong during fetch");
24791
24791
  for (let s2 = 0; s2 < 4; s2++)
24792
24792
  try {
@@ -24799,33 +24799,19 @@ var Li = (a11, e, t2) => c2(void 0, null, function* () {
24799
24799
  }
24800
24800
  throw ["Failed to fetch", "NetworkError"].some((s2) => r2.message.includes(s2)) ? S2.APIErrors.EndpointUnreachable("GET_TOKEN", r2.message) : r2;
24801
24801
  });
24802
- function nt(a11) {
24803
- if (!a11 || a11.length === 0)
24804
- throw S2.APIErrors.InvalidTokenFormat("INIT", "Token cannot be an empty string or undefined or null");
24805
- let e = a11.split(".");
24806
- if (e.length !== 3)
24807
- throw S2.APIErrors.InvalidTokenFormat("INIT", "Expected 3 '.' separate fields - header, payload and signature respectively");
24808
- let t2 = atob(e[1]);
24809
- try {
24810
- let i2 = JSON.parse(t2);
24811
- return { roomId: i2.room_id, userId: i2.user_id, role: i2.role };
24812
- } catch (i2) {
24813
- throw S2.APIErrors.InvalidTokenFormat("INIT", `couldn't parse to json - ${i2.message}`);
24814
- }
24815
- }
24816
- var wt = class {
24802
+ var Dt = class {
24817
24803
  constructor(e, t2) {
24818
24804
  this.sdk = e;
24819
24805
  this.sdkListener = t2;
24820
- this.recordedAudio = Ca;
24821
- this.initSdkWithLocalPeer();
24806
+ this.recordedAudio = La;
24807
+ this.sdk.setIsDiagnostics(true), this.initSdkWithLocalPeer();
24822
24808
  }
24823
24809
  get localPeer() {
24824
24810
  var e;
24825
24811
  return (e = this.sdk) == null ? void 0 : e.store.getLocalPeer();
24826
24812
  }
24827
24813
  checkBrowserSupport() {
24828
- Tt(), gt();
24814
+ gt(), St();
24829
24815
  }
24830
24816
  requestPermission(e) {
24831
24817
  return c2(this, null, function* () {
@@ -24854,7 +24840,7 @@ var wt = class {
24854
24840
  (t2 = (e = this.localPeer) == null ? void 0 : e.videoTrack) == null || t2.cleanup(), this.localPeer && (this.localPeer.videoTrack = void 0);
24855
24841
  }
24856
24842
  startMicCheck(s2) {
24857
- return c2(this, arguments, function* ({ inputDevice: e, onError: t2, onStop: i2, time: r2 = Ha }) {
24843
+ return c2(this, arguments, function* ({ inputDevice: e, onError: t2, onStop: i2, time: r2 = Ca }) {
24858
24844
  var u2, p2, h2, T;
24859
24845
  this.initSdkWithLocalPeer((g2) => {
24860
24846
  this.stopMicCheck(), t2 == null || t2(g2);
@@ -24869,9 +24855,9 @@ var wt = class {
24869
24855
  this.mediaRecorder.ondataavailable = function(g2) {
24870
24856
  n2.push(g2.data);
24871
24857
  }, this.mediaRecorder.onstop = () => {
24872
- var f2, P7;
24873
- let g2 = new Blob(n2, { type: (f2 = this.mediaRecorder) == null ? void 0 : f2.mimeType });
24874
- this.recordedAudio = URL.createObjectURL(g2), (P7 = this.onStopMicCheck) == null || P7.call(this);
24858
+ var v2, E2;
24859
+ let g2 = new Blob(n2, { type: (v2 = this.mediaRecorder) == null ? void 0 : v2.mimeType });
24860
+ this.recordedAudio = URL.createObjectURL(g2), (E2 = this.onStopMicCheck) == null || E2.call(this);
24875
24861
  }, this.mediaRecorder.start();
24876
24862
  let l2 = setTimeout(() => {
24877
24863
  this.stopMicCheck();
@@ -24890,14 +24876,13 @@ var wt = class {
24890
24876
  }
24891
24877
  startConnectivityCheck(e, t2, i2) {
24892
24878
  return c2(this, null, function* () {
24893
- var o2;
24894
24879
  if (!this.sdk)
24895
24880
  throw new Error("SDK not found");
24896
- this.connectivityCheck = new Ci(this.sdk, this.sdkListener, e, t2);
24897
- let r2 = yield this.getAuthToken(i2), { roomId: s2 } = nt(r2);
24898
- yield this.sdk.leave(), (o2 = this.sdk) == null || o2.store.setRoom(new Oe(s2)), yield this.sdk.join({ authToken: r2, userName: "diagonistic-test", initEndpoint: "https://qa-in2-ipv6.100ms.live/init" }, this.connectivityCheck), this.sdk.addConnectionQualityListener({ onConnectionQualityUpdate: (n2) => {
24899
- var l2;
24900
- (l2 = this.connectivityCheck) == null || l2.handleConnectionQualityUpdate(n2);
24881
+ this.connectivityCheck = new Hi(this.sdk, this.sdkListener, e, t2);
24882
+ let r2 = yield this.getAuthToken(i2);
24883
+ yield this.sdk.leave(), yield this.sdk.join({ authToken: r2, userName: "diagnostics-test" }, this.connectivityCheck), this.sdk.addConnectionQualityListener({ onConnectionQualityUpdate: (s2) => {
24884
+ var o2;
24885
+ (o2 = this.connectivityCheck) == null || o2.handleConnectionQualityUpdate(s2);
24901
24886
  } });
24902
24887
  });
24903
24888
  }
@@ -24912,16 +24897,16 @@ var wt = class {
24912
24897
  this.sdkListener && ((r2 = this.sdk) == null || r2.initStoreAndManagers(M2(m({}, this.sdkListener), { onError: (n2) => {
24913
24898
  e == null || e(n2), this.sdkListener.onError(n2);
24914
24899
  } })));
24915
- let t2 = new $e({ name: "diagnostics-peer", role: ot, type: "regular" });
24900
+ let t2 = new We({ name: "diagnostics-peer", role: ot, type: "regular" });
24916
24901
  (s2 = this.sdk) == null || s2.store.addPeer(t2);
24917
- let i2 = new Oe("diagnostics-room");
24902
+ let i2 = new Ke("diagnostics-room");
24918
24903
  this.sdk.store.setRoom(i2), this.sdkListener.onRoomUpdate("ROOM_PEER_COUNT_UPDATED", i2), (o2 = this.sdk) == null || o2.deviceManager.init(true);
24919
24904
  }
24920
24905
  getAuthToken(e) {
24921
24906
  return c2(this, null, function* () {
24922
- let t2 = new URL("https://api-nonprod.100ms.live/v2/diagnostics/token");
24907
+ let t2 = new URL("https://api.100ms.live/v2/diagnostics/token");
24923
24908
  e && t2.searchParams.append("region", e);
24924
- let i2 = yield Li(t2.toString(), { method: "GET" }, [429, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511]), r2 = yield i2.json();
24909
+ let i2 = yield Ci(t2.toString(), { method: "GET" }, [429, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511]), r2 = yield i2.json();
24925
24910
  if (!i2.ok)
24926
24911
  throw S2.APIErrors.ServerErrors(r2.code, "GET_TOKEN", r2.message, false);
24927
24912
  let { token: s2 } = r2;
@@ -24941,7 +24926,7 @@ var wt = class {
24941
24926
  });
24942
24927
  }
24943
24928
  };
24944
- var Di = class {
24929
+ var Li = class {
24945
24930
  constructor(e, t2, i2) {
24946
24931
  this.isRoomJoinCalled = false;
24947
24932
  this.ignoredMessageTypes = [];
@@ -24956,7 +24941,7 @@ var Di = class {
24956
24941
  }, e2);
24957
24942
  };
24958
24943
  this.sendPeerUpdateNotification = (e2, t3) => {
24959
- let i3 = this.store.getState(X2(t3.peerId)), r2 = yi[e2] || "peerUpdate";
24944
+ let i3 = this.store.getState(X2(t3.peerId)), r2 = Mi[e2] || "peerUpdate";
24960
24945
  if (e2 === 8)
24961
24946
  this.syncRoomState(r2), this.updateMidCallPreviewRoomState(e2, t3);
24962
24947
  else if ([0, 1].includes(e2))
@@ -24967,14 +24952,14 @@ var Di = class {
24967
24952
  let s2 = _2.convertPeer(t3);
24968
24953
  this.setState((o2) => {
24969
24954
  let n2 = o2.peers[s2.id];
24970
- Ke(n2, s2) && (re(n2.auxiliaryTracks, s2.auxiliaryTracks) && (n2.auxiliaryTracks = s2.auxiliaryTracks), Object.assign(n2, s2)), i3 = s2;
24955
+ $e(n2, s2) && (re(n2.auxiliaryTracks, s2.auxiliaryTracks) && (n2.auxiliaryTracks = s2.auxiliaryTracks), Object.assign(n2, s2)), i3 = s2;
24971
24956
  }, r2);
24972
24957
  }
24973
24958
  this.hmsNotifications.sendPeerUpdate(e2, i3);
24974
24959
  };
24975
24960
  this.getSDKHMSPeer = (e2) => this.sdk.getPeerMap()[e2];
24976
24961
  this.setState = (e2, t3) => this.store.namedSetState(e2, t3);
24977
- this.store = e, this.sdk = t2, this.hmsNotifications = i2, this.sessionStore = new Ri(this.sdk, this.setSessionStoreValueLocally.bind(this)), this.actionBatcher = new Ei(e);
24962
+ this.store = e, this.sdk = t2, this.hmsNotifications = i2, this.sessionStore = new bi(this.sdk, this.setSessionStoreValueLocally.bind(this)), this.actionBatcher = new Pi(e);
24978
24963
  }
24979
24964
  getLocalTrack(e) {
24980
24965
  return this.sdk.store.getLocalPeerTracks().find((t2) => t2.trackId === e);
@@ -25017,7 +25002,7 @@ var Di = class {
25017
25002
  b2.d("layer none will be ignored");
25018
25003
  return;
25019
25004
  }
25020
- if (((r2 = this.store.getState(ha(e))) == null ? void 0 : r2.preferredLayer) === t2) {
25005
+ if (((r2 = this.store.getState(ma(e))) == null ? void 0 : r2.preferredLayer) === t2) {
25021
25006
  b2.d(`preferred layer is already ${t2}`);
25022
25007
  return;
25023
25008
  }
@@ -25359,7 +25344,7 @@ var Di = class {
25359
25344
  }
25360
25345
  endRoom(e, t2) {
25361
25346
  return c2(this, null, function* () {
25362
- let i2 = this.store.getState(ea);
25347
+ let i2 = this.store.getState(ta);
25363
25348
  if (!(i2 != null && i2.endRoom)) {
25364
25349
  b2.w("You are not allowed to perform this action - endRoom");
25365
25350
  return;
@@ -25448,7 +25433,7 @@ var Di = class {
25448
25433
  return c2(this, null, function* () {
25449
25434
  if (typeof e == "string") {
25450
25435
  let i2 = this.getTrackById(e);
25451
- i2 && Pa(i2) ? yield this.sdk.changeTrackState(i2, t2) : this.logPossibleInconsistency(`No remote track with ID ${e} found for change track state`);
25436
+ i2 && Ea(i2) ? yield this.sdk.changeTrackState(i2, t2) : this.logPossibleInconsistency(`No remote track with ID ${e} found for change track state`);
25452
25437
  } else
25453
25438
  Array.isArray(e) && e.forEach((i2) => this.setRemoteTrackEnabled(i2, t2));
25454
25439
  });
@@ -25478,16 +25463,16 @@ var Di = class {
25478
25463
  }
25479
25464
  enableBeamSpeakerLabelsLogging() {
25480
25465
  return c2(this, null, function* () {
25481
- this.beamSpeakerLabelsLogger || (b2.i("enabling beam speaker labels logging"), this.beamSpeakerLabelsLogger = new Ii(this.store, this), yield this.beamSpeakerLabelsLogger.start());
25466
+ this.beamSpeakerLabelsLogger || (b2.i("enabling beam speaker labels logging"), this.beamSpeakerLabelsLogger = new Ri(this.store, this), yield this.beamSpeakerLabelsLogger.start());
25482
25467
  });
25483
25468
  }
25484
25469
  initDiagnostics() {
25485
- let e = new wt(this.sdk, { onJoin: this.onJoin.bind(this), onPreview: this.onPreview.bind(this), onRoomUpdate: this.onRoomUpdate.bind(this), onPeerUpdate: this.onPeerUpdate.bind(this), onTrackUpdate: this.onTrackUpdate.bind(this), onMessageReceived: this.onMessageReceived.bind(this), onError: this.onError.bind(this), onReconnected: this.onReconnected.bind(this), onReconnecting: this.onReconnecting.bind(this), onRoleChangeRequest: this.onRoleChangeRequest.bind(this), onRoleUpdate: this.onRoleUpdate.bind(this), onDeviceChange: this.onDeviceChange.bind(this), onChangeTrackStateRequest: this.onChangeTrackStateRequest.bind(this), onChangeMultiTrackStateRequest: this.onChangeMultiTrackStateRequest.bind(this), onRemovedFromRoom: this.onRemovedFromRoom.bind(this), onNetworkQuality: this.onNetworkQuality.bind(this), onSessionStoreUpdate: this.onSessionStoreUpdate.bind(this), onPollsUpdate: this.onPollsUpdate.bind(this), onWhiteboardUpdate: this.onWhiteboardUpdate.bind(this) });
25470
+ let e = new Dt(this.sdk, { onJoin: this.onJoin.bind(this), onPreview: this.onPreview.bind(this), onRoomUpdate: this.onRoomUpdate.bind(this), onPeerUpdate: this.onPeerUpdate.bind(this), onTrackUpdate: this.onTrackUpdate.bind(this), onMessageReceived: this.onMessageReceived.bind(this), onError: this.onError.bind(this), onReconnected: this.onReconnected.bind(this), onReconnecting: this.onReconnecting.bind(this), onRoleChangeRequest: this.onRoleChangeRequest.bind(this), onRoleUpdate: this.onRoleUpdate.bind(this), onDeviceChange: this.onDeviceChange.bind(this), onChangeTrackStateRequest: this.onChangeTrackStateRequest.bind(this), onChangeMultiTrackStateRequest: this.onChangeMultiTrackStateRequest.bind(this), onRemovedFromRoom: this.onRemovedFromRoom.bind(this), onNetworkQuality: this.onNetworkQuality.bind(this), onSessionStoreUpdate: this.onSessionStoreUpdate.bind(this), onPollsUpdate: this.onPollsUpdate.bind(this), onWhiteboardUpdate: this.onWhiteboardUpdate.bind(this) });
25486
25471
  return this.sdk.addAudioListener({ onAudioLevelUpdate: this.onAudioLevelUpdate.bind(this) }), this.sdk.addConnectionQualityListener({ onConnectionQualityUpdate: this.onConnectionQualityUpdate.bind(this) }), e;
25487
25472
  }
25488
25473
  resetState(e = "resetState") {
25489
25474
  this.isRoomJoinCalled = false, b2.cleanup(), this.setState((t2) => {
25490
- Object.assign(t2, ti());
25475
+ Object.assign(t2, ei());
25491
25476
  }, e);
25492
25477
  }
25493
25478
  sdkJoinWithListeners(e) {
@@ -25532,7 +25517,7 @@ var Di = class {
25532
25517
  this.setSessionStoreValueLocally(e, "sessionStoreUpdate");
25533
25518
  }
25534
25519
  onPollsUpdate(e, t2) {
25535
- let i2 = ki[e];
25520
+ let i2 = yi[e];
25536
25521
  this.setState((r2) => {
25537
25522
  let s2 = t2.reduce((o2, n2) => {
25538
25523
  var l2;
@@ -25541,7 +25526,7 @@ var Di = class {
25541
25526
  return M2(m({}, u2), { answer: u2.answer ? m({}, u2.answer) : void 0, options: (p2 = u2.options) == null ? void 0 : p2.map((T) => m({}, T)), responses: (h2 = u2.responses) == null ? void 0 : h2.map((T) => m({}, T)) });
25542
25527
  }) }), o2;
25543
25528
  }, {});
25544
- Ra(r2.polls, s2);
25529
+ Ia(r2.polls, s2);
25545
25530
  }, i2), t2.forEach((r2) => this.hmsNotifications.sendPollUpdate(e, r2.id));
25546
25531
  }
25547
25532
  onWhiteboardUpdate(e) {
@@ -25569,26 +25554,26 @@ var Di = class {
25569
25554
  e = `${e}_fullSync`, b2.time(`store-sync-${e}`);
25570
25555
  let t2 = {}, i2 = [], r2 = {}, s2 = {}, o2 = {}, n2, l2 = this.sdk.getPeers();
25571
25556
  for (let g2 of l2) {
25572
- let f2 = _2.convertPeer(g2);
25573
- t2[f2.id] = f2, i2.push(f2.id), o2[f2.id] = { peerID: f2.id, downlinkQuality: g2.networkQuality || -1 };
25574
- let P7 = [g2.audioTrack, g2.videoTrack, ...g2.auxiliaryTracks];
25575
- for (let k2 of P7) {
25576
- if (!k2)
25557
+ let v2 = _2.convertPeer(g2);
25558
+ t2[v2.id] = v2, i2.push(v2.id), o2[v2.id] = { peerID: v2.id, downlinkQuality: g2.networkQuality || -1 };
25559
+ let E2 = [g2.audioTrack, g2.videoTrack, ...g2.auxiliaryTracks];
25560
+ for (let P7 of E2) {
25561
+ if (!P7)
25577
25562
  continue;
25578
- let w2 = _2.convertTrack(k2);
25563
+ let w2 = _2.convertTrack(P7);
25579
25564
  r2[w2.id] = w2;
25580
25565
  }
25581
25566
  if (g2.isLocal) {
25582
- let k2 = g2;
25583
- n2 = this.getPreviewFields(k2), Object.assign(s2, this.getMediaSettings(k2));
25567
+ let P7 = g2;
25568
+ n2 = this.getPreviewFields(P7), Object.assign(s2, this.getMediaSettings(P7));
25584
25569
  }
25585
25570
  }
25586
25571
  let u2 = this.sdk.getRecordingState(), p2 = this.sdk.getRTMPState(), h2 = this.sdk.getHLSState(), T = this.sdk.getTranscriptionState();
25587
25572
  this.setState((g2) => {
25588
- var k2;
25573
+ var P7;
25589
25574
  g2.room.peers = i2;
25590
- let f2 = g2.peers, P7 = g2.tracks;
25591
- Ea(f2, t2), ba(P7, r2), Object.assign(g2.settings, s2), g2.room.isConnected && Object.assign(g2.connectionQualities, o2), (k2 = g2.preview) != null && k2.localPeer && (n2 != null && n2.localPeer) ? Object.assign(g2.preview, n2) : g2.preview = n2, Object.assign(g2.roles, _2.convertRoles(this.sdk.getRoles())), Object.assign(g2.playlist, _2.convertPlaylist(this.sdk.getPlaylistManager())), Object.assign(g2.room, _2.convertRecordingStreamingState(u2, p2, h2, T)), Object.assign(g2.templateAppData, this.sdk.getTemplateAppData());
25575
+ let v2 = g2.peers, E2 = g2.tracks;
25576
+ ba(v2, t2), Ra(E2, r2), Object.assign(g2.settings, s2), g2.room.isConnected && Object.assign(g2.connectionQualities, o2), (P7 = g2.preview) != null && P7.localPeer && (n2 != null && n2.localPeer) ? Object.assign(g2.preview, n2) : g2.preview = n2, Object.assign(g2.roles, _2.convertRoles(this.sdk.getRoles())), Object.assign(g2.playlist, _2.convertPlaylist(this.sdk.getPlaylistManager())), Object.assign(g2.room, _2.convertRecordingStreamingState(u2, p2, h2, T)), Object.assign(g2.templateAppData, this.sdk.getTemplateAppData());
25592
25577
  }, e), b2.timeEnd(`store-sync-${e}`);
25593
25578
  }
25594
25579
  onPreview(e) {
@@ -25599,7 +25584,7 @@ var Di = class {
25599
25584
  }
25600
25585
  onJoin(e) {
25601
25586
  let t2 = this.sdk.getPlaylistManager();
25602
- this.audioPlaylist = new Dt(t2, "audio", this.syncPlaylistState.bind(this), this.store), this.videoPlaylist = new Dt(t2, "video", this.syncRoomState.bind(this), this.store), this.syncRoomState("joinSync"), this.setState((i2) => {
25587
+ this.audioPlaylist = new Lt(t2, "audio", this.syncPlaylistState.bind(this), this.store), this.videoPlaylist = new Lt(t2, "video", this.syncRoomState.bind(this), this.store), this.syncRoomState("joinSync"), this.setState((i2) => {
25603
25588
  var r2;
25604
25589
  Object.assign(i2.room, _2.convertRoom(e, (r2 = this.sdk.getLocalPeer()) == null ? void 0 : r2.peerId)), i2.room.isConnected = true, i2.room.roomState = "Connected";
25605
25590
  }, "joined"), t2.onProgress(this.setProgress), t2.onNewTrackStart((i2) => {
@@ -25641,13 +25626,13 @@ var Di = class {
25641
25626
  if (e === 1)
25642
25627
  this.hmsNotifications.sendTrackUpdate(e, t2.trackId), this.handleTrackRemove(t2, i2);
25643
25628
  else if ([0, 1].includes(e)) {
25644
- let r2 = Ct[e];
25629
+ let r2 = Ht[e];
25645
25630
  this.syncRoomState(r2), this.hmsNotifications.sendTrackUpdate(e, t2.trackId);
25646
25631
  } else {
25647
- let r2 = Ct[e] || "trackUpdate", s2 = _2.convertTrack(t2);
25632
+ let r2 = Ht[e] || "trackUpdate", s2 = _2.convertTrack(t2);
25648
25633
  this.setState((o2) => {
25649
25634
  let n2 = o2.tracks[s2.id];
25650
- Ke(n2, s2) && (qr(n2, s2), Object.assign(n2, s2));
25635
+ $e(n2, s2) && (qr(n2, s2), Object.assign(n2, s2));
25651
25636
  }, r2), this.hmsNotifications.sendTrackUpdate(e, t2.trackId);
25652
25637
  }
25653
25638
  }
@@ -25684,7 +25669,7 @@ var Di = class {
25684
25669
  }
25685
25670
  onChangeTrackStateRequest(e) {
25686
25671
  var s2;
25687
- let t2 = this.store.getState(X2((s2 = e.requestedBy) == null ? void 0 : s2.peerId)), i2 = this.getStoreLocalTrackIDfromSDKTrack(e.track), r2 = this.store.getState(vi(i2));
25672
+ let t2 = this.store.getState(X2((s2 = e.requestedBy) == null ? void 0 : s2.peerId)), i2 = this.getStoreLocalTrackIDfromSDKTrack(e.track), r2 = this.store.getState(fi(i2));
25688
25673
  if (!r2)
25689
25674
  return this.logPossibleInconsistency(`Not found track for which track state change was requested, ${e.track}`);
25690
25675
  e.enabled || this.syncRoomState("changeTrackStateRequest"), this.hmsNotifications.sendChangeTrackStateRequest({ requestedBy: t2 || void 0, track: r2, enabled: e.enabled });
@@ -25717,7 +25702,7 @@ var Di = class {
25717
25702
  i2.room.roomState = "Failed", i2.errors.push(t2);
25718
25703
  }, "errorTerminal")) : this.store.getState().errors.length < 50 && this.setState((r2) => {
25719
25704
  r2.errors.push(t2);
25720
- }, "error"), this.syncRoomState("errorSync"), this.hmsNotifications.sendError(t2), b2.e("received error from sdk", t2 instanceof v2 ? `${t2}` : t2);
25705
+ }, "error"), this.syncRoomState("errorSync"), this.hmsNotifications.sendError(t2), b2.e("received error from sdk", t2 instanceof f2 ? `${t2}` : t2);
25721
25706
  }
25722
25707
  handleTrackRemove(e, t2) {
25723
25708
  this.setState((i2) => {
@@ -25754,7 +25739,7 @@ var Di = class {
25754
25739
  }
25755
25740
  getMediaSettings(e) {
25756
25741
  var s2;
25757
- let t2 = this.store.getState(Qs), i2 = e.audioTrack, r2 = e.videoTrack;
25742
+ let t2 = this.store.getState(zs), i2 = e.audioTrack, r2 = e.videoTrack;
25758
25743
  return { audioInputDeviceId: (i2 == null ? void 0 : i2.settings.deviceId) || t2.audioInputDeviceId, videoInputDeviceId: (r2 == null ? void 0 : r2.settings.deviceId) || t2.videoInputDeviceId, audioOutputDeviceId: (s2 = this.sdk.getAudioOutput().getDevice()) == null ? void 0 : s2.deviceId };
25759
25744
  }
25760
25745
  getPreviewFields(e) {
@@ -25777,7 +25762,7 @@ var Di = class {
25777
25762
  let t2 = this.store.getState(te);
25778
25763
  if ((t2 == null ? void 0 : t2.videoTrack) !== e)
25779
25764
  return false;
25780
- let i2 = this.store.getState(Ys), r2 = this.store.getState(Br);
25765
+ let i2 = this.store.getState(Xs), r2 = this.store.getState(Br);
25781
25766
  return i2 && !r2;
25782
25767
  }
25783
25768
  logPossibleInconsistency(e) {
@@ -25837,13 +25822,13 @@ var Di = class {
25837
25822
  this.syncRoomState("roleUpdate");
25838
25823
  }
25839
25824
  getStoreLocalTrackIDfromSDKTrack(e) {
25840
- return this.store.getState(zs).find((i2) => {
25825
+ return this.store.getState(Ys).find((i2) => {
25841
25826
  var r2;
25842
25827
  return ((r2 = this.getTrackById(i2)) == null ? void 0 : r2.trackId) === e.trackId;
25843
25828
  });
25844
25829
  }
25845
25830
  updateMidCallPreviewRoomState(e, t2) {
25846
- t2.isLocal && e === 8 && this.store.getState(Xs) && this.setState((i2) => {
25831
+ t2.isLocal && e === 8 && this.store.getState(Zs) && this.setState((i2) => {
25847
25832
  i2.room.roomState = "Connected";
25848
25833
  }, "midCallPreviewCompleted");
25849
25834
  }
@@ -25856,8 +25841,8 @@ var Di = class {
25856
25841
  }, t2);
25857
25842
  }
25858
25843
  };
25859
- var wi = (a11) => O2 ? `${a11} ${document.title}` : a11;
25860
- var _i = class {
25844
+ var Di = (a11) => O2 ? `${a11} ${document.title}` : a11;
25845
+ var wi = class {
25861
25846
  constructor(e, t2) {
25862
25847
  this.eventBus = e;
25863
25848
  this.listener = t2;
@@ -25879,8 +25864,8 @@ var _i = class {
25879
25864
  try {
25880
25865
  let g2 = false;
25881
25866
  for (; !g2; ) {
25882
- let { value: f2, done: P7 } = yield h2.read();
25883
- g2 = P7, f2 && (n2 += f2.byteLength, this.sendScore({ scoreMap: r2, downloadedSize: n2, startTime: o2 }));
25867
+ let { value: v2, done: E2 } = yield h2.read();
25868
+ g2 = E2, v2 && (n2 += v2.byteLength, this.sendScore({ scoreMap: r2, downloadedSize: n2, startTime: o2 }));
25884
25869
  }
25885
25870
  } catch (g2) {
25886
25871
  g2.name !== "AbortError" && d2.d(this.TAG, g2);
@@ -25912,7 +25897,7 @@ var _i = class {
25912
25897
  e !== this.score && (this.score = e, (i2 = (t2 = this.listener) == null ? void 0 : t2.onNetworkQuality) == null || i2.call(t2, e));
25913
25898
  }
25914
25899
  };
25915
- var _t = class {
25900
+ var wt = class {
25916
25901
  constructor(e, t2, i2, r2, s2, o2) {
25917
25902
  this.store = e;
25918
25903
  this.transport = t2;
@@ -25926,8 +25911,8 @@ var _t = class {
25926
25911
  r3 && (yield this.diffRolesAndPublishTracks({ oldRole: e2, newRole: t3 }), (s3 = this.listener) == null || s3.onPeerUpdate(8, r3));
25927
25912
  });
25928
25913
  this.diffRolesAndPublishTracks = (i3) => c2(this, [i3], function* ({ oldRole: e2, newRole: t3 }) {
25929
- var g2, f2, P7, k2, w2, xe;
25930
- let r3 = new Set(e2.publishParams.allowed), s3 = new Set(t3.publishParams.allowed), o3 = this.removeTrack(r3, s3, "video"), n2 = this.removeTrack(r3, s3, "audio"), l2 = this.removeTrack(r3, s3, "screen"), u2 = this.hasSimulcastDifference((g2 = e2.publishParams.simulcast) == null ? void 0 : g2.video, (f2 = t3.publishParams.simulcast) == null ? void 0 : f2.video), p2 = this.hasSimulcastDifference((P7 = e2.publishParams.simulcast) == null ? void 0 : P7.screen, (k2 = t3.publishParams.simulcast) == null ? void 0 : k2.screen), h2 = (xe = (w2 = this.store.getLocalPeer()) == null ? void 0 : w2.videoTrack) == null ? void 0 : xe.enabled;
25914
+ var g2, v2, E2, P7, w2, Oe;
25915
+ let r3 = new Set(e2.publishParams.allowed), s3 = new Set(t3.publishParams.allowed), o3 = this.removeTrack(r3, s3, "video"), n2 = this.removeTrack(r3, s3, "audio"), l2 = this.removeTrack(r3, s3, "screen"), u2 = this.hasSimulcastDifference((g2 = e2.publishParams.simulcast) == null ? void 0 : g2.video, (v2 = t3.publishParams.simulcast) == null ? void 0 : v2.video), p2 = this.hasSimulcastDifference((E2 = e2.publishParams.simulcast) == null ? void 0 : E2.screen, (P7 = t3.publishParams.simulcast) == null ? void 0 : P7.screen), h2 = (Oe = (w2 = this.store.getLocalPeer()) == null ? void 0 : w2.videoTrack) == null ? void 0 : Oe.enabled;
25931
25916
  yield this.removeAudioTrack(n2), yield this.removeVideoTracks(o3 || u2), yield this.removeScreenTracks(l2 || p2);
25932
25917
  let T = this.getSettings();
25933
25918
  u2 && (T.isVideoMuted = !h2), yield this.publish(T), yield this.syncDevices(T, t3);
@@ -26007,7 +25992,7 @@ var Jr = class {
26007
25992
  this.addEventToStorage(e);
26008
25993
  return;
26009
25994
  }
26010
- let t2 = { event: e.name, payload: e.properties, event_id: String(e.timestamp), peer: e.metadata.peer, timestamp: e.timestamp, device_id: e.device_id, cluster: { websocket_url: this.websocketURL } }, i2 = this.env === "prod" ? Us : Bs;
25995
+ let t2 = { event: e.name, payload: e.properties, event_id: String(e.timestamp), peer: e.metadata.peer, timestamp: e.timestamp, device_id: e.device_id, cluster: { websocket_url: this.websocketURL } }, i2 = this.env === "prod" ? Bs : Vs;
26011
25996
  fetch(i2, { method: "POST", headers: { "Content-Type": "application/json", Authorization: `Bearer ${e.metadata.token}`, user_agent_v2: e.metadata.userAgent }, body: JSON.stringify(t2) }).then((r2) => {
26012
25997
  if (r2.status === 401) {
26013
25998
  this.removeFromStorage(e);
@@ -26034,12 +26019,12 @@ var Jr = class {
26034
26019
  }
26035
26020
  };
26036
26021
  var Pe = new Jr();
26037
- var Nt = class {
26022
+ var _t = class {
26038
26023
  constructor(e) {
26039
26024
  this.type = e.type, this.source = e.source || "regular", this.description = "", e instanceof Re ? (this.mute = !e.enabled, this.track_id = e.publishedTrackId, this.stream_id = e.stream.id) : (this.mute = e.mute, this.track_id = e.track_id, this.stream_id = e.stream_id);
26040
26025
  }
26041
26026
  };
26042
- var Ot = class {
26027
+ var Nt = class {
26043
26028
  constructor() {
26044
26029
  this.TAG = "[Store]:";
26045
26030
  this.knownRoles = {};
@@ -26050,7 +26035,7 @@ var Ot = class {
26050
26035
  this.roleDetailsArrived = false;
26051
26036
  this.env = "prod";
26052
26037
  this.simulcastEnabled = false;
26053
- this.userAgent = ft(this.env);
26038
+ this.userAgent = Tt(this.env);
26054
26039
  this.polls = /* @__PURE__ */ new Map();
26055
26040
  this.whiteboards = /* @__PURE__ */ new Map();
26056
26041
  this.addPermissionToRole = (e, t2, i2, r2) => {
@@ -26170,7 +26155,7 @@ var Ot = class {
26170
26155
  return this.userAgent;
26171
26156
  }
26172
26157
  createAndSetUserAgent(e) {
26173
- this.userAgent = ft(this.env, e);
26158
+ this.userAgent = Tt(this.env, e);
26174
26159
  }
26175
26160
  setRoom(e) {
26176
26161
  this.room = e;
@@ -26242,7 +26227,7 @@ var Ot = class {
26242
26227
  return [];
26243
26228
  let i2 = this.getPolicyForRole(e.role.name).publishParams, r2, s2, o2;
26244
26229
  return t2 === "regular" ? (r2 = (n2 = i2.simulcast) == null ? void 0 : n2.video, s2 = i2.video.width, o2 = i2.video.height) : t2 === "screen" && (r2 = (l2 = i2.simulcast) == null ? void 0 : l2.screen, s2 = i2.screen.width, o2 = i2.screen.height), ((u2 = r2 == null ? void 0 : r2.layers) == null ? void 0 : u2.map((p2) => {
26245
- let h2 = Ve[p2.rid], T = { width: Math.floor(s2 / p2.scaleResolutionDownBy), height: Math.floor(o2 / p2.scaleResolutionDownBy) };
26230
+ let h2 = Be[p2.rid], T = { width: Math.floor(s2 / p2.scaleResolutionDownBy), height: Math.floor(o2 / p2.scaleResolutionDownBy) };
26246
26231
  return { layer: h2, resolution: T };
26247
26232
  })) || [];
26248
26233
  }
@@ -26310,7 +26295,7 @@ var Ot = class {
26310
26295
  t2.startsWith("prod") ? i2 = "prod" : t2.startsWith("qa") ? i2 = "qa" : t2.startsWith("dev") && (i2 = "dev"), this.env = i2, Pe.setEnv(i2);
26311
26296
  }
26312
26297
  };
26313
- var Ni = class {
26298
+ var _i = class {
26314
26299
  constructor() {
26315
26300
  this.TAG = "[WakeLockManager]";
26316
26301
  this.wakeLock = null;
@@ -26344,7 +26329,7 @@ var Ni = class {
26344
26329
  });
26345
26330
  }
26346
26331
  };
26347
- var Oi = class {
26332
+ var Ni = class {
26348
26333
  constructor(e) {
26349
26334
  this.store = e;
26350
26335
  this.bufferSize = 100;
@@ -26386,8 +26371,8 @@ var Oi = class {
26386
26371
  e.metadata.token = (r2 = this.store.getConfig()) == null ? void 0 : r2.authToken, e.metadata.peer = { session_id: t2 == null ? void 0 : t2.sessionId, room_id: t2 == null ? void 0 : t2.id, room_name: t2 == null ? void 0 : t2.name, template_id: t2 == null ? void 0 : t2.templateId, joined_at: (s2 = t2 == null ? void 0 : t2.joinedAt) == null ? void 0 : s2.getTime(), session_started_at: (o2 = t2 == null ? void 0 : t2.startedAt) == null ? void 0 : o2.getTime(), role: (n2 = i2 == null ? void 0 : i2.role) == null ? void 0 : n2.name, user_name: i2 == null ? void 0 : i2.name, user_data: i2 == null ? void 0 : i2.metadata, peer_id: i2 == null ? void 0 : i2.peerId }, Pe.sendEvent(e);
26387
26372
  }
26388
26373
  };
26389
- var wa = { autoplayFailed: void 0, initialized: false, autoplayCheckPromise: void 0 };
26390
- var xt = class {
26374
+ var _a7 = { autoplayFailed: void 0, initialized: false, autoplayCheckPromise: void 0 };
26375
+ var Ot = class {
26391
26376
  constructor(e, t2, i2) {
26392
26377
  this.store = e;
26393
26378
  this.deviceManager = t2;
@@ -26395,7 +26380,7 @@ var xt = class {
26395
26380
  this.autoPausedTracks = /* @__PURE__ */ new Set();
26396
26381
  this.TAG = "[AudioSinkManager]:";
26397
26382
  this.volume = 100;
26398
- this.state = m({}, wa);
26383
+ this.state = m({}, _a7);
26399
26384
  this.timer = null;
26400
26385
  this.autoUnpauseTimer = null;
26401
26386
  this.earpieceSelected = false;
@@ -26498,11 +26483,11 @@ var xt = class {
26498
26483
  return;
26499
26484
  this.state.initialized = true;
26500
26485
  let t2 = document.createElement("div");
26501
- t2.id = `HMS-SDK-audio-sink-${on2()}`, (e && document.getElementById(e) || document.body).append(t2), this.audioSink = t2, d2.d(this.TAG, "audio sink created", this.audioSink);
26486
+ t2.id = `HMS-SDK-audio-sink-${nn2()}`, (e && document.getElementById(e) || document.body).append(t2), this.audioSink = t2, d2.d(this.TAG, "audio sink created", this.audioSink);
26502
26487
  }
26503
26488
  cleanup() {
26504
26489
  var e;
26505
- (e = this.audioSink) == null || e.remove(), this.audioSink = void 0, this.timer && (clearInterval(this.timer), this.timer = null), this.autoUnpauseTimer && (clearInterval(this.autoUnpauseTimer), this.autoUnpauseTimer = null), this.eventBus.audioTrackAdded.unsubscribe(this.handleTrackAdd), this.eventBus.audioTrackRemoved.unsubscribe(this.handleTrackRemove), this.eventBus.audioTrackUpdate.unsubscribe(this.handleTrackUpdate), this.eventBus.deviceChange.unsubscribe(this.handleAudioDeviceChange), this.autoPausedTracks = /* @__PURE__ */ new Set(), this.state = m({}, wa);
26490
+ (e = this.audioSink) == null || e.remove(), this.audioSink = void 0, this.timer && (clearInterval(this.timer), this.timer = null), this.autoUnpauseTimer && (clearInterval(this.autoUnpauseTimer), this.autoUnpauseTimer = null), this.eventBus.audioTrackAdded.unsubscribe(this.handleTrackAdd), this.eventBus.audioTrackRemoved.unsubscribe(this.handleTrackRemove), this.eventBus.audioTrackUpdate.unsubscribe(this.handleTrackUpdate), this.eventBus.deviceChange.unsubscribe(this.handleAudioDeviceChange), this.autoPausedTracks = /* @__PURE__ */ new Set(), this.state = m({}, _a7);
26506
26491
  }
26507
26492
  playAudioFor(e) {
26508
26493
  return c2(this, null, function* () {
@@ -26525,7 +26510,7 @@ var xt = class {
26525
26510
  });
26526
26511
  }
26527
26512
  };
26528
- var xi = class {
26513
+ var Oi = class {
26529
26514
  constructor(e) {
26530
26515
  this.eventBus = e;
26531
26516
  this.pluginUsage = /* @__PURE__ */ new Map();
@@ -26564,7 +26549,7 @@ var xi = class {
26564
26549
  this.eventBus.analytics.subscribe((t2) => this.updatePluginUsageData(t2));
26565
26550
  }
26566
26551
  };
26567
- var Ut = class {
26552
+ var xt = class {
26568
26553
  constructor(e, t2) {
26569
26554
  this.store = e;
26570
26555
  this.eventBus = t2;
@@ -26602,7 +26587,7 @@ var Ut = class {
26602
26587
  let e2 = this.store.getLocalPeer();
26603
26588
  !((s2 = (r2 = this.store.getConfig()) == null ? void 0 : r2.settings) == null ? void 0 : s2.videoDeviceId) && (e2 != null && e2.videoTrack) && (yield e2.videoTrack.setSettings({ deviceId: (o2 = this.videoInput[0]) == null ? void 0 : o2.deviceId }, true)), !((l2 = (n2 = this.store.getConfig()) == null ? void 0 : n2.settings) == null ? void 0 : l2.audioInputDeviceId) && (e2 != null && e2.audioTrack) && (yield e2.audioTrack.setSettings({ deviceId: (u2 = this.audioInput[0]) == null ? void 0 : u2.deviceId }, true));
26604
26589
  });
26605
- this.handleDeviceChange = oi(() => c2(this, null, function* () {
26590
+ this.handleDeviceChange = ai(() => c2(this, null, function* () {
26606
26591
  yield this.enumerateDevices(), this.logDevices("After Device Change");
26607
26592
  let e2 = this.store.getLocalPeer();
26608
26593
  yield this.setOutputDevice(true), yield this.handleAudioInputDeviceChange(e2 == null ? void 0 : e2.audioTrack), yield this.handleVideoInputDeviceChange(e2 == null ? void 0 : e2.videoTrack), this.eventBus.analytics.publish(y2.deviceChange({ selection: this.getCurrentSelection(), type: "change", devices: this.getDevices() }));
@@ -26708,7 +26693,7 @@ var Ut = class {
26708
26693
  d2.d(this.TAG, e, JSON.stringify({ videoInput: [...this.videoInput], audioInput: [...this.audioInput], audioOutput: [...this.audioOutput], selected: this.getCurrentSelection() }, null, 4));
26709
26694
  }
26710
26695
  };
26711
- var Ui = class {
26696
+ var xi = class {
26712
26697
  constructor(e, t2) {
26713
26698
  this.deviceManager = e;
26714
26699
  this.audioSinkManager = t2;
@@ -26755,9 +26740,9 @@ var V = class {
26755
26740
  };
26756
26741
  }
26757
26742
  };
26758
- var Bt = class {
26743
+ var Ut = class {
26759
26744
  constructor() {
26760
- this.eventEmitter = new nn2();
26745
+ this.eventEmitter = new cn2();
26761
26746
  this.analytics = new V(G2.ANALYTICS, this.eventEmitter);
26762
26747
  this.deviceChange = new V(G2.DEVICE_CHANGE, this.eventEmitter);
26763
26748
  this.localAudioEnabled = new V(G2.LOCAL_AUDIO_ENABLED, this.eventEmitter);
@@ -26777,7 +26762,7 @@ var Bt = class {
26777
26762
  this.leave = new V(G2.LEAVE, this.eventEmitter);
26778
26763
  }
26779
26764
  };
26780
- var Bi = class {
26765
+ var Ui = class {
26781
26766
  constructor(e, t2, i2) {
26782
26767
  this.store = e;
26783
26768
  this.listener = t2;
@@ -26795,7 +26780,7 @@ var Bi = class {
26795
26780
  (n2 = this.listener) == null || n2.onPeerUpdate(5, null);
26796
26781
  }
26797
26782
  };
26798
- var Vi = class {
26783
+ var Bi = class {
26799
26784
  constructor(e) {
26800
26785
  this.listener = e;
26801
26786
  this.TAG = "[BroadcastManager]";
@@ -26808,7 +26793,7 @@ var Vi = class {
26808
26793
  d2.d(this.TAG, `Received Message from sender=${(t2 = e == null ? void 0 : e.peer) == null ? void 0 : t2.peer_id}: ${e}`), (i2 = this.listener) == null || i2.onMessageReceived(e);
26809
26794
  }
26810
26795
  };
26811
- var Fi = class {
26796
+ var Vi = class {
26812
26797
  constructor(e, t2) {
26813
26798
  this.store = e;
26814
26799
  this.listener = t2;
@@ -26822,7 +26807,7 @@ var Fi = class {
26822
26807
  (r2 = this.listener) == null || r2.onConnectionQualityUpdate(i2);
26823
26808
  }
26824
26809
  };
26825
- var ct = class {
26810
+ var nt = class {
26826
26811
  constructor(e, t2, i2) {
26827
26812
  this.store = e;
26828
26813
  this.eventBus = t2;
@@ -26954,7 +26939,7 @@ var ct = class {
26954
26939
  return t2.mute !== i2.mute ? (r2 = i2.mute ? 2 : 3, e.type === "audio" && this.eventBus.audioTrackUpdate.publish({ track: e, enabled: !i2.mute })) : t2.description !== i2.description && (r2 = 4), r2;
26955
26940
  }
26956
26941
  };
26957
- var Gi = class extends ct {
26942
+ var Fi = class extends nt {
26958
26943
  constructor(t2, i2, r2, s2) {
26959
26944
  super(t2, i2, s2);
26960
26945
  this.transport = r2;
@@ -26994,7 +26979,7 @@ var Gi = class extends ct {
26994
26979
  return r2 && ((l2 = (o2 = (s2 = i2 == null ? void 0 : i2.role) == null ? void 0 : s2.subscribeParams) == null ? void 0 : o2.subscribeToRoles) == null ? void 0 : l2.includes((n2 = r2.role) == null ? void 0 : n2.name));
26995
26980
  }
26996
26981
  };
26997
- var Wi = class {
26982
+ var Gi = class {
26998
26983
  constructor(e, t2, i2, r2) {
26999
26984
  this.store = e;
27000
26985
  this.peerManager = t2;
@@ -27061,7 +27046,7 @@ var Wi = class {
27061
27046
  }
27062
27047
  };
27063
27048
  var C = (a11) => a11 ? new Date(a11) : void 0;
27064
- var $i = class {
27049
+ var Wi = class {
27065
27050
  constructor(e, t2, i2) {
27066
27051
  this.store = e;
27067
27052
  this.trackManager = t2;
@@ -27160,7 +27145,7 @@ var $i = class {
27160
27145
  });
27161
27146
  }
27162
27147
  };
27163
- var Ki = class {
27148
+ var $i = class {
27164
27149
  constructor(e, t2) {
27165
27150
  this.store = e;
27166
27151
  this.eventBus = t2;
@@ -27184,11 +27169,11 @@ var Ki = class {
27184
27169
  }
27185
27170
  }
27186
27171
  };
27187
- var Vt = (a11, e, t2) => {
27188
- let i2 = t2 === "qa" ? Ws : Gs, r2 = new URL(i2);
27172
+ var Bt = (a11, e, t2) => {
27173
+ let i2 = t2 === "qa" ? $s : Ws, r2 = new URL(i2);
27189
27174
  return r2.searchParams.set("endpoint", `https://${e}`), r2.searchParams.set("token", a11), r2.toString();
27190
27175
  };
27191
- var qi = class {
27176
+ var Ki = class {
27192
27177
  constructor(e, t2, i2) {
27193
27178
  this.transport = e;
27194
27179
  this.store = t2;
@@ -27206,7 +27191,7 @@ var qi = class {
27206
27191
  let t2 = this.store.getWhiteboard(e == null ? void 0 : e.id), i2 = t2 == null ? void 0 : t2.id;
27207
27192
  if (t2 || (i2 = (yield this.transport.signal.createWhiteboard(this.getCreateOptionsWithDefaults(e))).id), !i2)
27208
27193
  throw new Error(`Whiteboard ID: ${i2} not found`);
27209
- let r2 = yield this.transport.signal.getWhiteboard({ id: i2 }), s2 = M2(m({}, t2), { title: e == null ? void 0 : e.title, attributes: e == null ? void 0 : e.attributes, id: r2.id, url: Vt(r2.token, r2.addr, this.store.getEnv()), token: r2.token, addr: r2.addr, owner: r2.owner, permissions: r2.permissions || [], open: true });
27194
+ let r2 = yield this.transport.signal.getWhiteboard({ id: i2 }), s2 = M2(m({}, t2), { title: e == null ? void 0 : e.title, attributes: e == null ? void 0 : e.attributes, id: r2.id, url: Bt(r2.token, r2.addr, this.store.getEnv()), token: r2.token, addr: r2.addr, owner: r2.owner, permissions: r2.permissions || [], open: true });
27210
27195
  this.store.setWhiteboard(s2), (o2 = this.listener) == null || o2.onWhiteboardUpdate(s2);
27211
27196
  });
27212
27197
  }
@@ -27231,7 +27216,7 @@ var qi = class {
27231
27216
  let e = this.store.getWhiteboards();
27232
27217
  for (let s2 of e.values())
27233
27218
  if (s2.url) {
27234
- let o2 = yield this.transport.signal.getWhiteboard({ id: s2.id }), n2 = this.store.getLocalPeer(), u2 = (n2 == null ? void 0 : n2.customerUserId) === o2.owner ? (i2 = (t2 = n2.role) == null ? void 0 : t2.permissions.whiteboard) == null ? void 0 : i2.includes("admin") : o2.permissions.length > 0, p2 = M2(m({}, s2), { id: o2.id, url: Vt(o2.token, o2.addr, this.store.getEnv()), token: o2.token, addr: o2.addr, owner: o2.owner, permissions: o2.permissions, open: u2 });
27219
+ let o2 = yield this.transport.signal.getWhiteboard({ id: s2.id }), n2 = this.store.getLocalPeer(), u2 = (n2 == null ? void 0 : n2.customerUserId) === o2.owner ? (i2 = (t2 = n2.role) == null ? void 0 : t2.permissions.whiteboard) == null ? void 0 : i2.includes("admin") : o2.permissions.length > 0, p2 = M2(m({}, s2), { id: o2.id, url: Bt(o2.token, o2.addr, this.store.getEnv()), token: o2.token, addr: o2.addr, owner: o2.owner, permissions: o2.permissions, open: u2 });
27235
27220
  this.store.setWhiteboard(p2), (r2 = this.listener) == null || r2.onWhiteboardUpdate(p2);
27236
27221
  }
27237
27222
  });
@@ -27245,12 +27230,12 @@ var qi = class {
27245
27230
  }), { title: (e == null ? void 0 : e.title) || `${(o2 = this.store.getRoom()) == null ? void 0 : o2.id} Whiteboard`, reader: (e == null ? void 0 : e.reader) || i2, writer: (e == null ? void 0 : e.writer) || r2, admin: (e == null ? void 0 : e.admin) || s2 };
27246
27231
  }
27247
27232
  };
27248
- var Ft = class {
27233
+ var Vt = class {
27249
27234
  constructor(e, t2, i2) {
27250
27235
  this.transport = e;
27251
27236
  this.store = t2;
27252
27237
  this.listener = i2;
27253
- this.whiteboard = new qi(e, t2, i2);
27238
+ this.whiteboard = new Ki(e, t2, i2);
27254
27239
  }
27255
27240
  setListener(e) {
27256
27241
  this.listener = e, this.whiteboard.setListener(e);
@@ -27260,7 +27245,7 @@ var Ft = class {
27260
27245
  var o2, n2;
27261
27246
  let t2 = { customerID: "userid", peerID: "peerid", userName: "username" }, { poll_id: i2 } = yield this.transport.signal.setPollInfo(M2(m({}, e), { mode: e.mode ? t2[e.mode] : void 0, poll_id: e.id, vote: e.rolesThatCanVote, responses: e.rolesThatCanViewResponses }));
27262
27247
  e.id || (e.id = i2), Array.isArray(e.questions) && (yield this.addQuestionsToPoll(e.id, e.questions));
27263
- let r2 = yield this.transport.signal.getPollQuestions({ poll_id: e.id, index: 0, count: 50 }), s2 = ji(M2(m({}, e), { poll_id: e.id, state: "created", created_by: (o2 = this.store.getLocalPeer()) == null ? void 0 : o2.peerId }));
27248
+ let r2 = yield this.transport.signal.getPollQuestions({ poll_id: e.id, index: 0, count: 50 }), s2 = qi(M2(m({}, e), { poll_id: e.id, state: "created", created_by: (o2 = this.store.getLocalPeer()) == null ? void 0 : o2.peerId }));
27264
27249
  s2.questions = r2.questions.map(({ question: l2, options: u2, answer: p2 }) => M2(m({}, l2), { options: u2, answer: p2 })), (n2 = this.listener) == null || n2.onPollsUpdate(0, [s2]);
27265
27250
  });
27266
27251
  }
@@ -27313,8 +27298,8 @@ var Ft = class {
27313
27298
  var h2, T;
27314
27299
  let p2 = (h2 = e == null ? void 0 : e.questions) == null ? void 0 : h2.find((g2) => g2.index === n2.question);
27315
27300
  if (p2) {
27316
- let g2 = { id: n2.response_id, questionIndex: n2.question, option: n2.option, options: n2.options, text: n2.text, responseFinal: u2, peer: { peerid: l2.peerid, userHash: l2.hash, userid: l2.userid, username: l2.username }, skipped: n2.skipped, type: n2.type, update: n2.update }, f2 = p2.responses && !t2 ? [...p2.responses] : [];
27317
- (T = r2.questions) != null && T[n2.question - 1] && (r2.questions[n2.question - 1].responses = [...f2, g2]);
27301
+ let g2 = { id: n2.response_id, questionIndex: n2.question, option: n2.option, options: n2.options, text: n2.text, responseFinal: u2, peer: { peerid: l2.peerid, userHash: l2.hash, userid: l2.userid, username: l2.username }, skipped: n2.skipped, type: n2.type, update: n2.update }, v2 = p2.responses && !t2 ? [...p2.responses] : [];
27302
+ (T = r2.questions) != null && T[n2.question - 1] && (r2.questions[n2.question - 1].responses = [...v2, g2]);
27318
27303
  }
27319
27304
  }), this.store.setPoll(r2), (o2 = this.listener) == null || o2.onPollsUpdate(4, [r2]);
27320
27305
  });
@@ -27328,10 +27313,10 @@ var Ft = class {
27328
27313
  r2 = [...l2.polls, ...r2, ...u2.polls];
27329
27314
  }
27330
27315
  for (let l2 of r2) {
27331
- let u2 = yield this.transport.signal.getPollQuestions({ poll_id: l2.poll_id, index: 0, count: 50 }), p2 = ji(l2), h2 = this.store.getPoll(l2.poll_id);
27332
- p2.questions = u2.questions.map(({ question: T, options: g2, answer: f2 }, P7) => {
27333
- var k2, w2;
27334
- return M2(m({}, T), { options: g2, answer: f2, responses: (w2 = (k2 = h2 == null ? void 0 : h2.questions) == null ? void 0 : k2[P7]) == null ? void 0 : w2.responses });
27316
+ let u2 = yield this.transport.signal.getPollQuestions({ poll_id: l2.poll_id, index: 0, count: 50 }), p2 = qi(l2), h2 = this.store.getPoll(l2.poll_id);
27317
+ p2.questions = u2.questions.map(({ question: T, options: g2, answer: v2 }, E2) => {
27318
+ var P7, w2;
27319
+ return M2(m({}, T), { options: g2, answer: v2, responses: (w2 = (P7 = h2 == null ? void 0 : h2.questions) == null ? void 0 : P7[E2]) == null ? void 0 : w2.responses });
27335
27320
  }), t2.push(p2), this.store.setPoll(p2);
27336
27321
  }
27337
27322
  return (n2 = this.listener) == null || n2.onPollsUpdate(3, t2), t2;
@@ -27354,11 +27339,11 @@ var Ft = class {
27354
27339
  return i2;
27355
27340
  }
27356
27341
  };
27357
- var ji = (a11) => {
27342
+ var qi = (a11) => {
27358
27343
  let e = { userid: "customerID", peerid: "peerID", username: "userName" };
27359
27344
  return { id: a11.poll_id, title: a11.title, startedBy: a11.started_by, createdBy: a11.created_by, anonymous: a11.anonymous, type: a11.type, duration: a11.duration, locked: a11.locked, mode: a11.mode ? e[a11.mode] : void 0, visibility: a11.visibility, rolesThatCanVote: a11.vote || [], rolesThatCanViewResponses: a11.responses || [], state: a11.state, stoppedBy: a11.stopped_by, startedAt: C(a11.started_at), stoppedAt: C(a11.stopped_at), createdAt: C(a11.created_at) };
27360
27345
  };
27361
- var Ji = class {
27346
+ var ji = class {
27362
27347
  constructor(e, t2, i2) {
27363
27348
  this.store = e;
27364
27349
  this.transport = t2;
@@ -27391,7 +27376,7 @@ var Ji = class {
27391
27376
  (i2 = this.listener) == null || i2.onPollsUpdate(1, [o2]);
27392
27377
  return;
27393
27378
  }
27394
- let n2 = yield this.transport.signal.getPollQuestions({ poll_id: s2.poll_id, index: 0, count: 50 }), l2 = ji(s2);
27379
+ let n2 = yield this.transport.signal.getPollQuestions({ poll_id: s2.poll_id, index: 0, count: 50 }), l2 = qi(s2);
27395
27380
  l2.questions = n2.questions.map(({ question: u2, options: p2, answer: h2 }) => M2(m({}, u2), { options: p2, answer: h2 })), yield this.updatePollResponses(l2, true), t2.push(l2), this.store.setPoll(l2);
27396
27381
  }
27397
27382
  (r2 = this.listener) == null || r2.onPollsUpdate(1, t2);
@@ -27451,7 +27436,7 @@ var Ji = class {
27451
27436
  });
27452
27437
  }
27453
27438
  };
27454
- var Qi = class {
27439
+ var Ji = class {
27455
27440
  constructor(e, t2) {
27456
27441
  this.store = e;
27457
27442
  this.listener = t2;
@@ -27512,7 +27497,7 @@ var Qi = class {
27512
27497
  return e && (s2 = s2.filter((o2) => o2.type === e)), t2 && (s2 = s2.filter((o2) => o2.source === t2)), s2.filter((o2) => o2.enabled !== i2);
27513
27498
  }
27514
27499
  };
27515
- var zi = class {
27500
+ var Qi = class {
27516
27501
  constructor(e, t2) {
27517
27502
  this.store = e;
27518
27503
  this.listener = t2;
@@ -27665,11 +27650,11 @@ var zi = class {
27665
27650
  toSdkError(e) {
27666
27651
  if (!(e != null && e.code))
27667
27652
  return;
27668
- let t2 = e.message || "error in streaming/recording", i2 = new v2(e.code, "ServerErrors", "NONE", t2, t2);
27653
+ let t2 = e.message || "error in streaming/recording", i2 = new f2(e.code, "ServerErrors", "NONE", t2, t2);
27669
27654
  return d2.e(this.TAG, "error in streaming/recording", i2), i2;
27670
27655
  }
27671
27656
  };
27672
- var Yi = class {
27657
+ var zi = class {
27673
27658
  constructor(e, t2) {
27674
27659
  this.store = e;
27675
27660
  this.listener = t2;
@@ -27683,7 +27668,7 @@ var Yi = class {
27683
27668
  (i2 = this.listener) == null || i2.onSessionStoreUpdate(t2);
27684
27669
  }
27685
27670
  };
27686
- var Xi = class {
27671
+ var Yi = class {
27687
27672
  constructor(e, t2, i2) {
27688
27673
  this.store = e;
27689
27674
  this.transport = t2;
@@ -27708,13 +27693,13 @@ var Xi = class {
27708
27693
  o2.url = i2 == null ? void 0 : i2.url, o2.token = i2 == null ? void 0 : i2.token, o2.addr = i2 == null ? void 0 : i2.addr, o2.permissions = i2 == null ? void 0 : i2.permissions;
27709
27694
  else {
27710
27695
  let l2 = yield this.transport.signal.getWhiteboard({ id: e.id });
27711
- o2.url = Vt(l2.token, l2.addr, this.store.getEnv()), o2.token = l2.token, o2.addr = l2.addr, o2.permissions = l2.permissions, o2.open = l2.permissions.length > 0;
27696
+ o2.url = Bt(l2.token, l2.addr, this.store.getEnv()), o2.token = l2.token, o2.addr = l2.addr, o2.permissions = l2.permissions, o2.open = l2.permissions.length > 0;
27712
27697
  }
27713
27698
  this.store.setWhiteboard(o2), (n2 = this.listener) == null || n2.onWhiteboardUpdate(o2);
27714
27699
  });
27715
27700
  }
27716
27701
  };
27717
- var Zi = class {
27702
+ var Xi = class {
27718
27703
  constructor(e, t2, i2, r2, s2, o2) {
27719
27704
  this.store = e;
27720
27705
  this.transport = i2;
@@ -27741,7 +27726,7 @@ var Zi = class {
27741
27726
  this.peerManager.handlePeerInfoUpdate({ peer: i3, name: e2, data: t3 });
27742
27727
  };
27743
27728
  let n2 = this.transport.isFlagEnabled("onDemandTracks");
27744
- this.trackManager = n2 ? new Gi(this.store, t2, this.transport, this.listener) : new ct(this.store, t2, this.listener), this.peerManager = new $i(this.store, this.trackManager, this.listener), this.peerListManager = new Wi(this.store, this.peerManager, this.trackManager, this.listener), this.broadcastManager = new Vi(this.listener), this.policyChangeManager = new Ki(this.store, t2), this.requestManager = new Qi(this.store, this.listener), this.activeSpeakerManager = new Bi(this.store, this.listener, this.audioListener), this.connectionQualityManager = new Fi(this.store, this.connectionQualityListener), this.roomUpdateManager = new zi(this.store, this.listener), this.sessionMetadataManager = new Yi(this.store, this.listener), this.pollsManager = new Ji(this.store, this.transport, this.listener), this.whiteboardManager = new Xi(this.store, this.transport, this.listener);
27729
+ this.trackManager = n2 ? new Fi(this.store, t2, this.transport, this.listener) : new nt(this.store, t2, this.listener), this.peerManager = new Wi(this.store, this.trackManager, this.listener), this.peerListManager = new Gi(this.store, this.peerManager, this.trackManager, this.listener), this.broadcastManager = new Bi(this.listener), this.policyChangeManager = new $i(this.store, t2), this.requestManager = new Ji(this.store, this.listener), this.activeSpeakerManager = new Ui(this.store, this.listener, this.audioListener), this.connectionQualityManager = new Vi(this.store, this.connectionQualityListener), this.roomUpdateManager = new Qi(this.store, this.listener), this.sessionMetadataManager = new zi(this.store, this.listener), this.pollsManager = new ji(this.store, this.transport, this.listener), this.whiteboardManager = new Yi(this.store, this.transport, this.listener);
27745
27730
  }
27746
27731
  setListener(e) {
27747
27732
  this.listener = e, this.trackManager.listener = e, this.peerManager.listener = e, this.peerListManager.listener = e, this.broadcastManager.listener = e, this.requestManager.listener = e, this.activeSpeakerManager.listener = e, this.roomUpdateManager.listener = e, this.sessionMetadataManager.listener = e, this.pollsManager.listener = e, this.whiteboardManager.listener = e;
@@ -27793,7 +27778,7 @@ var Zi = class {
27793
27778
  }
27794
27779
  }
27795
27780
  };
27796
- var er = class {
27781
+ var Zi = class {
27797
27782
  constructor(e) {
27798
27783
  this.transport = e;
27799
27784
  this.observedKeys = /* @__PURE__ */ new Set();
@@ -27833,7 +27818,7 @@ var er = class {
27833
27818
  });
27834
27819
  }
27835
27820
  };
27836
- var tr = class {
27821
+ var er = class {
27837
27822
  constructor(e, t2, i2 = "", r2 = "", s2 = "https://prod-init.100ms.live/init", o2 = false, n2) {
27838
27823
  this.authToken = e;
27839
27824
  this.peerId = t2;
@@ -27845,16 +27830,16 @@ var tr = class {
27845
27830
  }
27846
27831
  };
27847
27832
  var j2 = ((s2) => (s2[s2.ConnectFailed = 0] = "ConnectFailed", s2[s2.SignalDisconnect = 1] = "SignalDisconnect", s2[s2.JoinWSMessageFailed = 2] = "JoinWSMessageFailed", s2[s2.PublishIceConnectionFailed = 3] = "PublishIceConnectionFailed", s2[s2.SubscribeIceConnectionFailed = 4] = "SubscribeIceConnectionFailed", s2))(j2 || {});
27848
- var _a7 = { 0: [], 1: [], 2: [1], 3: [1], 4: [1] };
27849
- var ir = ((n2) => (n2.Disconnected = "Disconnected", n2.Connecting = "Connecting", n2.Joined = "Joined", n2.Preview = "Preview", n2.Failed = "Failed", n2.Reconnecting = "Reconnecting", n2.Leaving = "Leaving", n2))(ir || {});
27850
- var rr = class {
27833
+ var Na = { 0: [], 1: [], 2: [1], 3: [1], 4: [1] };
27834
+ var tr = ((n2) => (n2.Disconnected = "Disconnected", n2.Connecting = "Connecting", n2.Joined = "Joined", n2.Preview = "Preview", n2.Failed = "Failed", n2.Reconnecting = "Reconnecting", n2.Leaving = "Leaving", n2))(tr || {});
27835
+ var ir = class {
27851
27836
  constructor(e) {
27852
27837
  this.promise = new Promise((t2, i2) => {
27853
27838
  this.resolve = t2, this.reject = i2, e(t2, i2);
27854
27839
  });
27855
27840
  }
27856
27841
  };
27857
- var sr = class {
27842
+ var rr = class {
27858
27843
  constructor(e, t2) {
27859
27844
  this.onStateChange = e;
27860
27845
  this.sendEvent = t2;
@@ -27881,18 +27866,18 @@ var sr = class {
27881
27866
  d2.d(this.TAG, `schedule: Already a task for ${j2[e]} scheduled, waiting for its completion`), yield g2.promise;
27882
27867
  return;
27883
27868
  }
27884
- let f2 = new rr((P7, k2) => {
27869
+ let v2 = new ir((E2, P7) => {
27885
27870
  });
27886
- this.inProgress.set(e, f2), this.sendEvent(t2, e);
27871
+ this.inProgress.set(e, v2), this.sendEvent(t2, e);
27887
27872
  }
27888
- let u2 = false, p2 = _a7[e];
27873
+ let u2 = false, p2 = Na[e];
27889
27874
  for (let g2 in p2) {
27890
- let f2 = p2[parseInt(g2)];
27875
+ let v2 = p2[parseInt(g2)];
27891
27876
  try {
27892
- let P7 = this.inProgress.get(f2);
27893
- P7 && (d2.d(this.TAG, `schedule: Suspending retry task of ${j2[e]}, waiting for ${j2[f2]} to recover`), yield P7.promise, d2.d(this.TAG, `schedule: Resuming retry task ${j2[e]} as it's dependency ${j2[f2]} is recovered`));
27894
- } catch (P7) {
27895
- d2.d(this.TAG, `schedule: Stopping retry task of ${j2[e]} as it's dependency ${j2[f2]} failed to recover`), u2 = true;
27877
+ let E2 = this.inProgress.get(v2);
27878
+ E2 && (d2.d(this.TAG, `schedule: Suspending retry task of ${j2[e]}, waiting for ${j2[v2]} to recover`), yield E2.promise, d2.d(this.TAG, `schedule: Resuming retry task ${j2[e]} as it's dependency ${j2[v2]} is recovered`));
27879
+ } catch (E2) {
27880
+ d2.d(this.TAG, `schedule: Stopping retry task of ${j2[e]} as it's dependency ${j2[v2]} failed to recover`), u2 = true;
27896
27881
  break;
27897
27882
  }
27898
27883
  }
@@ -27942,7 +27927,7 @@ var sr = class {
27942
27927
  });
27943
27928
  }
27944
27929
  };
27945
- var ar = class extends Ce {
27930
+ var sr = class extends Ce {
27946
27931
  constructor() {
27947
27932
  super(100);
27948
27933
  this.localStorage = new le("hms-analytics");
@@ -27963,7 +27948,7 @@ var ar = class extends Ce {
27963
27948
  });
27964
27949
  }
27965
27950
  };
27966
- var or = class {
27951
+ var ar = class {
27967
27952
  constructor() {
27968
27953
  this.TAG = "[AnalyticsTransport]";
27969
27954
  }
@@ -27993,14 +27978,14 @@ var or = class {
27993
27978
  }
27994
27979
  }
27995
27980
  };
27996
- var nr = class extends or {
27981
+ var or = class extends ar {
27997
27982
  constructor(t2) {
27998
27983
  super();
27999
27984
  this.transportProvider = t2;
28000
- this.failedEvents = new ar();
27985
+ this.failedEvents = new sr();
28001
27986
  }
28002
27987
  };
28003
- var dt = class {
27988
+ var ct = class {
28004
27989
  constructor(e, t2, i2, r2) {
28005
27990
  this.store = e;
28006
27991
  this.eventBus = t2;
@@ -28035,7 +28020,7 @@ var dt = class {
28035
28020
  });
28036
28021
  }
28037
28022
  };
28038
- var lt = class {
28023
+ var dt = class {
28039
28024
  constructor({ track: e, ssrc: t2, rid: i2, kind: r2, sampleWindowSize: s2 }) {
28040
28025
  this.samples = [];
28041
28026
  this.tempStats = [];
@@ -28078,10 +28063,10 @@ var lt = class {
28078
28063
  return this.tempStats.reduce((r2, s2) => r2 + ((s2[e] || 0) > t2 ? 1 : 0), 0);
28079
28064
  }
28080
28065
  };
28081
- var cr = (a11, e) => a11 && e && (a11.frameWidth !== e.frameWidth || a11.frameHeight !== e.frameHeight);
28082
- var dr = (a11, e) => a11 && e && a11.enabled !== e.enabled;
28083
- var Gt = (a11) => Object.entries(a11).filter(([, e]) => e !== void 0).reduce((e, [t2, i2]) => (e[t2] = i2, e), {});
28084
- var Wt = class extends dt {
28066
+ var nr = (a11, e) => a11 && e && (a11.frameWidth !== e.frameWidth || a11.frameHeight !== e.frameHeight);
28067
+ var cr = (a11, e) => a11 && e && a11.enabled !== e.enabled;
28068
+ var Ft = (a11) => Object.entries(a11).filter(([, e]) => e !== void 0).reduce((e, [t2, i2]) => (e[t2] = i2, e), {});
28069
+ var Gt = class extends ct {
28085
28070
  constructor() {
28086
28071
  super(...arguments);
28087
28072
  this.trackAnalytics = /* @__PURE__ */ new Map();
@@ -28101,16 +28086,16 @@ var Wt = class extends dt {
28101
28086
  Object.keys(r2).forEach((s2) => {
28102
28087
  let o2 = r2[s2], n2 = this.store.getLocalPeerTracks().find((l2) => l2.getTrackIDBeingSent() === s2);
28103
28088
  Object.keys(o2).forEach((l2) => {
28104
- var g2, f2, P7;
28089
+ var g2, v2, E2;
28105
28090
  let u2 = o2[l2];
28106
28091
  if (!n2)
28107
28092
  return;
28108
- let p2 = this.getTrackIdentifier(n2.trackId, u2), h2 = M2(m({}, u2), { availableOutgoingBitrate: (f2 = (g2 = t2.getLocalPeerStats()) == null ? void 0 : g2.publish) == null ? void 0 : f2.availableOutgoingBitrate });
28093
+ let p2 = this.getTrackIdentifier(n2.trackId, u2), h2 = M2(m({}, u2), { availableOutgoingBitrate: (v2 = (g2 = t2.getLocalPeerStats()) == null ? void 0 : g2.publish) == null ? void 0 : v2.availableOutgoingBitrate });
28109
28094
  if (p2 && this.trackAnalytics.has(p2))
28110
- (P7 = this.trackAnalytics.get(p2)) == null || P7.pushTempStat(h2);
28095
+ (E2 = this.trackAnalytics.get(p2)) == null || E2.pushTempStat(h2);
28111
28096
  else if (n2) {
28112
- let k2 = new zr({ track: n2, sampleWindowSize: this.sampleWindowSize, rid: u2.rid, ssrc: u2.ssrc.toString(), kind: u2.kind });
28113
- k2.pushTempStat(h2), this.trackAnalytics.set(this.getTrackIdentifier(n2.trackId, u2), k2);
28097
+ let P7 = new zr({ track: n2, sampleWindowSize: this.sampleWindowSize, rid: u2.rid, ssrc: u2.ssrc.toString(), kind: u2.kind });
28098
+ P7.pushTempStat(h2), this.trackAnalytics.set(this.getTrackIdentifier(n2.trackId, u2), P7);
28114
28099
  }
28115
28100
  let T = this.trackAnalytics.get(p2);
28116
28101
  T != null && T.shouldCreateSample() && (i2 = true);
@@ -28121,22 +28106,22 @@ var Wt = class extends dt {
28121
28106
  return i2.rid ? `${t2}:${i2.rid}` : t2;
28122
28107
  }
28123
28108
  };
28124
- var zr = class extends lt {
28109
+ var zr = class extends dt {
28125
28110
  constructor() {
28126
28111
  super(...arguments);
28127
28112
  this.samples = [];
28128
28113
  this.collateSample = () => {
28129
28114
  let t2 = this.getLatestStat(), i2 = t2.qualityLimitationDurations, r2 = i2 && { bandwidth_sec: i2.bandwidth, cpu_sec: i2.cpu, other_sec: i2.other }, s2 = t2.frameHeight ? { height_px: this.getLatestStat().frameHeight, width_px: this.getLatestStat().frameWidth } : void 0, o2 = this.calculateAverage("jitter", false), n2 = o2 ? Math.round(o2 * 1e3) : void 0, l2 = this.calculateAverage("roundTripTime", false), u2 = l2 ? Math.round(l2 * 1e3) : void 0;
28130
- return Gt({ timestamp: Date.now(), avg_available_outgoing_bitrate_bps: this.calculateAverage("availableOutgoingBitrate"), avg_bitrate_bps: this.calculateAverage("bitrate"), avg_fps: this.calculateAverage("framesPerSecond"), total_packets_lost: this.getLatestStat().packetsLost, total_packets_sent: this.getLatestStat().packetsSent, total_packet_sent_delay_sec: parseFloat(this.calculateDifferenceForSample("totalPacketSendDelay").toFixed(4)), total_fir_count: this.calculateDifferenceForSample("firCount"), total_pli_count: this.calculateDifferenceForSample("pliCount"), total_nack_count: this.calculateDifferenceForSample("nackCount"), avg_jitter_ms: n2, avg_round_trip_time_ms: u2, total_quality_limitation: r2, resolution: s2 });
28115
+ return Ft({ timestamp: Date.now(), avg_available_outgoing_bitrate_bps: this.calculateAverage("availableOutgoingBitrate"), avg_bitrate_bps: this.calculateAverage("bitrate"), avg_fps: this.calculateAverage("framesPerSecond"), total_packets_lost: this.getLatestStat().packetsLost, total_packets_sent: this.getLatestStat().packetsSent, total_packet_sent_delay_sec: parseFloat(this.calculateDifferenceForSample("totalPacketSendDelay").toFixed(4)), total_fir_count: this.calculateDifferenceForSample("firCount"), total_pli_count: this.calculateDifferenceForSample("pliCount"), total_nack_count: this.calculateDifferenceForSample("nackCount"), avg_jitter_ms: n2, avg_round_trip_time_ms: u2, total_quality_limitation: r2, resolution: s2 });
28131
28116
  };
28132
28117
  this.shouldCreateSample = () => {
28133
28118
  let t2 = this.tempStats.length, i2 = this.tempStats[t2 - 1], r2 = this.tempStats[t2 - 2];
28134
- return t2 === 30 || dr(i2, r2) || i2.kind === "video" && cr(i2, r2);
28119
+ return t2 === 30 || cr(i2, r2) || i2.kind === "video" && nr(i2, r2);
28135
28120
  };
28136
28121
  this.toAnalytics = () => ({ track_id: this.track_id, ssrc: this.ssrc, source: this.source, rid: this.rid, samples: this.samples });
28137
28122
  }
28138
28123
  };
28139
- var $t = class extends dt {
28124
+ var Wt = class extends ct {
28140
28125
  constructor() {
28141
28126
  super(...arguments);
28142
28127
  this.trackAnalytics = /* @__PURE__ */ new Map();
@@ -28154,20 +28139,20 @@ var $t = class extends dt {
28154
28139
  handleStatsUpdate(t2) {
28155
28140
  let i2 = t2.getAllRemoteTracksStats(), r2 = false;
28156
28141
  Object.keys(i2).forEach((s2) => {
28157
- var f2, P7;
28158
- let o2 = this.store.getTrackById(s2), n2 = i2[s2], l2 = (f2 = this.trackAnalytics.get(s2)) == null ? void 0 : f2.getLatestStat(), p2 = ((k2, w2) => {
28159
- let xe = (w2 == null ? void 0 : w2.jitterBufferDelay) || 0, Zt = (w2 == null ? void 0 : w2.jitterBufferEmittedCount) || 0, x2 = ((k2 == null ? void 0 : k2.jitterBufferDelay) || 0) - xe, $ = ((k2 == null ? void 0 : k2.jitterBufferEmittedCount) || 0) - Zt;
28142
+ var v2, E2;
28143
+ let o2 = this.store.getTrackById(s2), n2 = i2[s2], l2 = (v2 = this.trackAnalytics.get(s2)) == null ? void 0 : v2.getLatestStat(), p2 = ((P7, w2) => {
28144
+ let Oe = (w2 == null ? void 0 : w2.jitterBufferDelay) || 0, Xt = (w2 == null ? void 0 : w2.jitterBufferEmittedCount) || 0, x2 = ((P7 == null ? void 0 : P7.jitterBufferDelay) || 0) - Oe, $ = ((P7 == null ? void 0 : P7.jitterBufferEmittedCount) || 0) - Xt;
28160
28145
  return $ > 0 ? x2 * 1e3 / $ : (w2 == null ? void 0 : w2.calculatedJitterBufferDelay) || 0;
28161
28146
  })(n2, l2), h2 = this.calculateAvSyncForStat(n2, t2), T = M2(m({}, n2), { calculatedJitterBufferDelay: p2, avSync: h2 });
28162
28147
  if (n2.kind === "video") {
28163
- let k2 = o2.getPreferredLayerDefinition();
28164
- T.expectedFrameHeight = k2 == null ? void 0 : k2.resolution.height, T.expectedFrameWidth = k2 == null ? void 0 : k2.resolution.width;
28148
+ let P7 = o2.getPreferredLayerDefinition();
28149
+ T.expectedFrameHeight = P7 == null ? void 0 : P7.resolution.height, T.expectedFrameWidth = P7 == null ? void 0 : P7.resolution.width;
28165
28150
  }
28166
28151
  if (this.trackAnalytics.has(s2))
28167
- (P7 = this.trackAnalytics.get(s2)) == null || P7.pushTempStat(T);
28152
+ (E2 = this.trackAnalytics.get(s2)) == null || E2.pushTempStat(T);
28168
28153
  else if (o2) {
28169
- let k2 = new Xr({ track: o2, sampleWindowSize: this.sampleWindowSize, ssrc: n2.ssrc.toString(), kind: n2.kind });
28170
- k2.pushTempStat(T), this.trackAnalytics.set(s2, k2);
28154
+ let P7 = new Xr({ track: o2, sampleWindowSize: this.sampleWindowSize, ssrc: n2.ssrc.toString(), kind: n2.kind });
28155
+ P7.pushTempStat(T), this.trackAnalytics.set(s2, P7);
28171
28156
  }
28172
28157
  let g2 = this.trackAnalytics.get(s2);
28173
28158
  g2 != null && g2.shouldCreateSample() && (r2 = true);
@@ -28178,42 +28163,42 @@ var $t = class extends dt {
28178
28163
  return;
28179
28164
  let r2 = this.store.getPeerById(t2.peerID), s2 = r2 == null ? void 0 : r2.audioTrack, o2 = r2 == null ? void 0 : r2.videoTrack;
28180
28165
  if (!(s2 && o2 && s2.enabled && o2.enabled))
28181
- return Pt;
28166
+ return kt;
28182
28167
  let l2 = i2.getRemoteTrackStats(s2.trackId);
28183
28168
  if (!l2)
28184
- return Pt;
28169
+ return kt;
28185
28170
  if (l2.estimatedPlayoutTimestamp)
28186
28171
  return l2.estimatedPlayoutTimestamp - t2.estimatedPlayoutTimestamp;
28187
28172
  }
28188
28173
  };
28189
- var Xr = class extends lt {
28174
+ var Xr = class extends dt {
28190
28175
  constructor() {
28191
28176
  super(...arguments);
28192
28177
  this.samples = [];
28193
28178
  this.collateSample = () => {
28194
28179
  let t2 = this.getLatestStat(), i2 = this.getFirstStat(), r2 = { timestamp: Date.now(), total_pli_count: this.calculateDifferenceForSample("pliCount"), total_nack_count: this.calculateDifferenceForSample("nackCount"), avg_jitter_buffer_delay: this.calculateAverage("calculatedJitterBufferDelay", false) };
28195
28180
  if (t2.kind === "video")
28196
- return Gt(M2(m({}, r2), { avg_av_sync_ms: this.calculateAvgAvSyncForSample(), avg_frames_received_per_sec: this.calculateDifferenceAverage("framesReceived"), avg_frames_dropped_per_sec: this.calculateDifferenceAverage("framesDropped"), avg_frames_decoded_per_sec: this.calculateDifferenceAverage("framesDecoded"), frame_width: this.calculateAverage("frameWidth"), frame_height: this.calculateAverage("frameHeight"), expected_frame_width: this.calculateAverage("expectedFrameWidth"), expected_frame_height: this.calculateAverage("expectedFrameHeight"), pause_count: this.calculateDifferenceForSample("pauseCount"), pause_duration_seconds: this.calculateDifferenceForSample("totalPausesDuration"), freeze_count: this.calculateDifferenceForSample("freezeCount"), freeze_duration_seconds: this.calculateDifferenceForSample("totalFreezesDuration") }));
28181
+ return Ft(M2(m({}, r2), { avg_av_sync_ms: this.calculateAvgAvSyncForSample(), avg_frames_received_per_sec: this.calculateDifferenceAverage("framesReceived"), avg_frames_dropped_per_sec: this.calculateDifferenceAverage("framesDropped"), avg_frames_decoded_per_sec: this.calculateDifferenceAverage("framesDecoded"), frame_width: this.calculateAverage("frameWidth"), frame_height: this.calculateAverage("frameHeight"), expected_frame_width: this.calculateAverage("expectedFrameWidth"), expected_frame_height: this.calculateAverage("expectedFrameHeight"), pause_count: this.calculateDifferenceForSample("pauseCount"), pause_duration_seconds: this.calculateDifferenceForSample("totalPausesDuration"), freeze_count: this.calculateDifferenceForSample("freezeCount"), freeze_duration_seconds: this.calculateDifferenceForSample("totalFreezesDuration") }));
28197
28182
  {
28198
28183
  let s2 = (t2.concealedSamples || 0) - (t2.silentConcealedSamples || 0) - ((i2.concealedSamples || 0) - (i2.silentConcealedSamples || 0));
28199
- return Gt(M2(m({}, r2), { audio_level: this.calculateInstancesOfHigh("audioLevel", 0.05), audio_concealed_samples: s2, audio_total_samples_received: this.calculateDifferenceForSample("totalSamplesReceived"), audio_concealment_events: this.calculateDifferenceForSample("concealmentEvents"), fec_packets_discarded: this.calculateDifferenceForSample("fecPacketsDiscarded"), fec_packets_received: this.calculateDifferenceForSample("fecPacketsReceived"), total_samples_duration: this.calculateDifferenceForSample("totalSamplesDuration"), total_packets_received: this.calculateDifferenceForSample("packetsReceived"), total_packets_lost: this.calculateDifferenceForSample("packetsLost") }));
28184
+ return Ft(M2(m({}, r2), { audio_level: this.calculateInstancesOfHigh("audioLevel", 0.05), audio_concealed_samples: s2, audio_total_samples_received: this.calculateDifferenceForSample("totalSamplesReceived"), audio_concealment_events: this.calculateDifferenceForSample("concealmentEvents"), fec_packets_discarded: this.calculateDifferenceForSample("fecPacketsDiscarded"), fec_packets_received: this.calculateDifferenceForSample("fecPacketsReceived"), total_samples_duration: this.calculateDifferenceForSample("totalSamplesDuration"), total_packets_received: this.calculateDifferenceForSample("packetsReceived"), total_packets_lost: this.calculateDifferenceForSample("packetsLost") }));
28200
28185
  }
28201
28186
  };
28202
28187
  this.shouldCreateSample = () => {
28203
28188
  let t2 = this.tempStats.length, i2 = this.tempStats[t2 - 1], r2 = this.tempStats[t2 - 2];
28204
- return t2 === 10 || dr(i2, r2) || i2.kind === "video" && cr(i2, r2);
28189
+ return t2 === 10 || cr(i2, r2) || i2.kind === "video" && nr(i2, r2);
28205
28190
  };
28206
28191
  this.toAnalytics = () => ({ track_id: this.track_id, ssrc: this.ssrc, source: this.source, rid: this.rid, samples: this.samples });
28207
28192
  }
28208
28193
  calculateAvgAvSyncForSample() {
28209
- let i2 = this.tempStats.map((r2) => r2.avSync).filter((r2) => r2 !== void 0 && r2 !== Pt);
28210
- return i2.length === 0 ? Pt : i2.reduce((r2, s2) => r2 + s2, 0) / i2.length;
28194
+ let i2 = this.tempStats.map((r2) => r2.avSync).filter((r2) => r2 !== void 0 && r2 !== kt);
28195
+ return i2.length === 0 ? kt : i2.reduce((r2, s2) => r2 + s2, 0) / i2.length;
28211
28196
  }
28212
28197
  };
28213
- var ur = ((t2) => (t2[t2.Publish = 0] = "Publish", t2[t2.Subscribe = 1] = "Subscribe", t2))(ur || {});
28214
- function Na(a11, e) {
28198
+ var lr = ((t2) => (t2[t2.Publish = 0] = "Publish", t2[t2.Subscribe = 1] = "Subscribe", t2))(lr || {});
28199
+ function Oa(a11, e) {
28215
28200
  var r2;
28216
- let t2 = Kt.parse(a11.sdp);
28201
+ let t2 = $t.parse(a11.sdp);
28217
28202
  if (!((r2 = t2.origin) != null && r2.username.startsWith("mozilla")))
28218
28203
  return a11;
28219
28204
  let i2 = e ? Array.from(e.values()) : [];
@@ -28221,16 +28206,16 @@ function Na(a11, e) {
28221
28206
  var l2, u2, p2;
28222
28207
  let o2 = (l2 = s2.msid) == null ? void 0 : l2.split(" ")[0], n2 = (u2 = i2.find((h2) => h2.type === s2.type && h2.stream_id === o2)) == null ? void 0 : u2.track_id;
28223
28208
  n2 && (s2.msid = (p2 = s2.msid) == null ? void 0 : p2.replace(/\s(.+)/, ` ${n2}`));
28224
- }), { type: a11.type, sdp: Kt.write(t2) };
28209
+ }), { type: a11.type, sdp: $t.write(t2) };
28225
28210
  }
28226
- function Oa(a11, e) {
28211
+ function xa(a11, e) {
28227
28212
  var s2;
28228
28213
  if (!(a11 != null && a11.sdp) || !e)
28229
28214
  return;
28230
- let i2 = Kt.parse(a11.sdp).media.find((o2) => oe(o2.mid) && parseInt(o2.mid) === parseInt(e));
28215
+ let i2 = $t.parse(a11.sdp).media.find((o2) => oe(o2.mid) && parseInt(o2.mid) === parseInt(e));
28231
28216
  return (s2 = i2 == null ? void 0 : i2.msid) == null ? void 0 : s2.split(" ")[1];
28232
28217
  }
28233
- function xa(a11) {
28218
+ function Ua(a11) {
28234
28219
  return a11.sdp.includes("usedtx=1") ? a11 : { type: a11.type, sdp: a11.sdp.replace("useinbandfec=1", "useinbandfec=1;usedtx=1") };
28235
28220
  }
28236
28221
  var Ee = "[HMSConnection]";
@@ -28255,7 +28240,7 @@ var qe = class {
28255
28240
  return c2(this, null, function* () {
28256
28241
  try {
28257
28242
  let i2 = yield this.nativeConnection.createOffer(t2);
28258
- return d2.d(Ee, `[role=${this.role}] createOffer offer=${JSON.stringify(i2, null, 1)}`), xa(Na(i2, e));
28243
+ return d2.d(Ee, `[role=${this.role}] createOffer offer=${JSON.stringify(i2, null, 1)}`), Ua(Oa(i2, e));
28259
28244
  } catch (i2) {
28260
28245
  throw S2.WebrtcErrors.CreateOfferFailed(this.action, i2.message);
28261
28246
  }
@@ -28311,13 +28296,13 @@ var qe = class {
28311
28296
  let i2 = (r2 = t2.track) == null ? void 0 : r2.kind;
28312
28297
  if (t2.transport) {
28313
28298
  let s2 = t2.transport.iceTransport, o2 = () => {
28314
- typeof s2.getSelectedCandidatePair == "function" && (this.selectedCandidatePair = s2.getSelectedCandidatePair(), this.selectedCandidatePair && (this.observer.onSelectedCandidatePairChange(this.selectedCandidatePair), d2.d(Ee, `${ur[this.role]} connection`, `selected ${i2 || "unknown"} candidate pair`, JSON.stringify(this.selectedCandidatePair, null, 2))));
28299
+ typeof s2.getSelectedCandidatePair == "function" && (this.selectedCandidatePair = s2.getSelectedCandidatePair(), this.selectedCandidatePair && (this.observer.onSelectedCandidatePairChange(this.selectedCandidatePair), d2.d(Ee, `${lr[this.role]} connection`, `selected ${i2 || "unknown"} candidate pair`, JSON.stringify(this.selectedCandidatePair, null, 2))));
28315
28300
  };
28316
28301
  typeof s2.onselectedcandidatepairchange == "function" && (s2.onselectedcandidatepairchange = o2), o2();
28317
28302
  }
28318
28303
  });
28319
28304
  } catch (e) {
28320
- d2.w(Ee, `Error in logging selected ice candidate pair for ${ur[this.role]} connection`, e);
28305
+ d2.w(Ee, `Error in logging selected ice candidate pair for ${lr[this.role]} connection`, e);
28321
28306
  }
28322
28307
  }
28323
28308
  removeTrack(e) {
@@ -28350,11 +28335,11 @@ var qe = class {
28350
28335
  return this.nativeConnection.getReceivers();
28351
28336
  }
28352
28337
  };
28353
- var qt = class extends qe {
28338
+ var Kt = class extends qe {
28354
28339
  constructor(t2, i2, r2) {
28355
28340
  super(0, t2);
28356
28341
  this.TAG = "[HMSPublishConnection]";
28357
- this.observer = r2, this.nativeConnection = new RTCPeerConnection(i2), this.channel = this.nativeConnection.createDataChannel(ui, { protocol: "SCTP" }), this.channel.onerror = (s2) => d2.e(this.TAG, `publish data channel onerror ${s2}`, s2), this.nativeConnection.onicecandidate = ({ candidate: s2 }) => {
28342
+ this.observer = r2, this.nativeConnection = new RTCPeerConnection(i2), this.channel = this.nativeConnection.createDataChannel(li, { protocol: "SCTP" }), this.channel.onerror = (s2) => d2.e(this.TAG, `publish data channel onerror ${s2}`, s2), this.nativeConnection.onicecandidate = ({ candidate: s2 }) => {
28358
28343
  s2 && (this.observer.onIceCandidate(s2), t2.trickle(this.role, s2));
28359
28344
  }, this.nativeConnection.oniceconnectionstatechange = () => {
28360
28345
  this.observer.onIceConnectionChange(this.nativeConnection.iceConnectionState);
@@ -28374,7 +28359,7 @@ var qt = class extends qe {
28374
28359
  });
28375
28360
  }
28376
28361
  };
28377
- var jt = class {
28362
+ var qt = class {
28378
28363
  constructor(e, t2, i2 = "") {
28379
28364
  this.TAG = "[HMSDataChannel]";
28380
28365
  this.nativeChannel = e, this.observer = t2, this.metadata = i2, e.onmessage = (r2) => {
@@ -28397,7 +28382,7 @@ var jt = class {
28397
28382
  this.nativeChannel.close();
28398
28383
  }
28399
28384
  };
28400
- var Jt = class a9 extends qe {
28385
+ var jt = class a9 extends qe {
28401
28386
  constructor(t2, i2, r2, s2) {
28402
28387
  super(1, t2);
28403
28388
  this.isFlagEnabled = r2;
@@ -28405,7 +28390,7 @@ var Jt = class a9 extends qe {
28405
28390
  this.remoteStreams = /* @__PURE__ */ new Map();
28406
28391
  this.MAX_RETRIES = 3;
28407
28392
  this.pendingMessageQueue = [];
28408
- this.eventEmitter = new cn2({ maxListeners: 60 });
28393
+ this.eventEmitter = new dn2({ maxListeners: 60 });
28409
28394
  this.handlePendingApiMessages = () => {
28410
28395
  this.eventEmitter.emit("open", true), this.pendingMessageQueue.length > 0 && (d2.d(this.TAG, "Found pending message queue, sending messages"), this.pendingMessageQueue.forEach((t3) => this.sendOverApiDataChannel(t3)), this.pendingMessageQueue.length = 0);
28411
28396
  };
@@ -28444,7 +28429,7 @@ var Jt = class a9 extends qe {
28444
28429
  }, this.nativeConnection.onconnectionstatechange = () => {
28445
28430
  this.observer.onConnectionStateChange(this.nativeConnection.connectionState);
28446
28431
  }, this.nativeConnection.ondatachannel = (t2) => {
28447
- t2.channel.label === ui && (this.apiChannel = new jt(t2.channel, { onMessage: (i2) => {
28432
+ t2.channel.label === li && (this.apiChannel = new qt(t2.channel, { onMessage: (i2) => {
28448
28433
  this.eventEmitter.emit("message", i2), this.observer.onApiChannelMessage(i2);
28449
28434
  } }, `role=${this.role}`), t2.channel.onopen = this.handlePendingApiMessages);
28450
28435
  }, this.nativeConnection.onicecandidate = (t2) => {
@@ -28470,7 +28455,7 @@ var Jt = class a9 extends qe {
28470
28455
  });
28471
28456
  let s2 = this.remoteStreams.get(r2), o2 = t2.track.kind === "audio" ? se : U2, n2 = new o2(s2, t2.track);
28472
28457
  t2.track.kind === "video" && s2.setVideoLayerLocally("none", "addTrack", "subscribeConnection"), n2.transceiver = t2.transceiver;
28473
- let l2 = Oa(this.remoteDescription, (u2 = t2.transceiver) == null ? void 0 : u2.mid);
28458
+ let l2 = xa(this.remoteDescription, (u2 = t2.transceiver) == null ? void 0 : u2.mid);
28474
28459
  l2 && n2.setSdpTrackId(l2), s2.tracks.push(n2), this.observer.onTrackAdd(n2);
28475
28460
  };
28476
28461
  }
@@ -28479,7 +28464,7 @@ var Jt = class a9 extends qe {
28479
28464
  }
28480
28465
  sendOverApiDataChannelWithResponse(t2, i2) {
28481
28466
  return c2(this, null, function* () {
28482
- let r2 = dn2();
28467
+ let r2 = ln2();
28483
28468
  if (t2.method === "prefer-video-track-state" && this.isFlagEnabled("disableVideoTrackAutoUnsubscribe") && t2.params.max_spatial_layer === "none")
28484
28469
  return d2.d(this.TAG, "video auto unsubscribe is disabled, request is ignored"), { id: r2 };
28485
28470
  let s2 = JSON.stringify(m({ id: i2 || r2, jsonrpc: "2.0" }, t2));
@@ -28493,9 +28478,9 @@ var Jt = class a9 extends qe {
28493
28478
  });
28494
28479
  }
28495
28480
  };
28496
- var Ua = (a11, e) => !e || e.length === 0 ? a11 : e.map((i2) => ({ urls: i2.urls, credentialType: "password", credential: i2.password, username: i2.userName }));
28497
- var pr = "[InitService]";
28498
- var Qt = class {
28481
+ var Ba = (a11, e) => !e || e.length === 0 ? a11 : e.map((i2) => ({ urls: i2.urls, credentialType: "password", credential: i2.password, username: i2.userName }));
28482
+ var ur = "[InitService]";
28483
+ var Jt = class {
28499
28484
  static handleError(e, t2) {
28500
28485
  switch (e.status) {
28501
28486
  case 404:
@@ -28508,16 +28493,16 @@ var Qt = class {
28508
28493
  }
28509
28494
  static fetchInitConfig(n2) {
28510
28495
  return c2(this, arguments, function* ({ token: e, peerId: t2, userAgent: i2, initEndpoint: r2 = "https://prod-init.100ms.live", region: s2 = "", iceServers: o2 }) {
28511
- d2.d(pr, `fetchInitConfig: initEndpoint=${r2} token=${e} peerId=${t2} region=${s2} `);
28512
- let l2 = ln2(r2, t2, i2, s2);
28496
+ d2.d(ur, `fetchInitConfig: initEndpoint=${r2} token=${e} peerId=${t2} region=${s2} `);
28497
+ let l2 = un2(r2, t2, i2, s2);
28513
28498
  try {
28514
28499
  let u2 = yield fetch(l2, { headers: { Authorization: `Bearer ${e}` } });
28515
28500
  try {
28516
28501
  let p2 = yield u2.clone().json();
28517
- return this.handleError(u2, p2), d2.d(pr, `config is ${JSON.stringify(p2, null, 2)}`), un2(p2, o2);
28502
+ return this.handleError(u2, p2), d2.d(ur, `config is ${JSON.stringify(p2, null, 2)}`), pn2(p2, o2);
28518
28503
  } catch (p2) {
28519
28504
  let h2 = yield u2.text();
28520
- throw d2.e(pr, "json error", p2.message, h2), p2 instanceof v2 ? p2 : S2.APIErrors.ServerErrors(u2.status, "INIT", p2.message);
28505
+ throw d2.e(ur, "json error", p2.message, h2), p2 instanceof f2 ? p2 : S2.APIErrors.ServerErrors(u2.status, "INIT", p2.message);
28521
28506
  }
28522
28507
  } catch (u2) {
28523
28508
  let p2 = u2;
@@ -28526,20 +28511,20 @@ var Qt = class {
28526
28511
  });
28527
28512
  }
28528
28513
  };
28529
- function ln2(a11, e, t2, i2) {
28514
+ function un2(a11, e, t2, i2) {
28530
28515
  try {
28531
28516
  let r2 = new URL("/init", a11);
28532
28517
  return i2 && i2.trim().length > 0 && r2.searchParams.set("region", i2.trim()), r2.searchParams.set("peer_id", e), r2.searchParams.set("user_agent_v2", t2), r2.toString();
28533
28518
  } catch (r2) {
28534
28519
  let s2 = r2;
28535
- throw d2.e(pr, s2.name, s2.message), s2;
28520
+ throw d2.e(ur, s2.name, s2.message), s2;
28536
28521
  }
28537
28522
  }
28538
- function un2(a11, e) {
28523
+ function pn2(a11, e) {
28539
28524
  var t2;
28540
- return M2(m({}, a11), { rtcConfiguration: M2(m({}, a11.rtcConfiguration), { iceServers: Ua((t2 = a11.rtcConfiguration) == null ? void 0 : t2.ice_servers, e) }) });
28525
+ return M2(m({}, a11), { rtcConfiguration: M2(m({}, a11.rtcConfiguration), { iceServers: Ba((t2 = a11.rtcConfiguration) == null ? void 0 : t2.ice_servers, e) }) });
28541
28526
  }
28542
- var zt = class {
28527
+ var Qt = class {
28543
28528
  constructor(e) {
28544
28529
  this.TAG = "[SIGNAL]: ";
28545
28530
  this.pongResponseTimes = new Ce(5);
@@ -28577,14 +28562,14 @@ var zt = class {
28577
28562
  internalCall(e, t2) {
28578
28563
  return c2(this, null, function* () {
28579
28564
  var s2;
28580
- let i2 = pn2(), r2 = { method: e, params: t2, id: i2, jsonrpc: "2.0" };
28565
+ let i2 = hn(), r2 = { method: e, params: t2, id: i2, jsonrpc: "2.0" };
28581
28566
  (s2 = this.socket) == null || s2.send(JSON.stringify(r2));
28582
28567
  try {
28583
28568
  return yield new Promise((n2, l2) => {
28584
28569
  this.callbacks.set(i2, { resolve: n2, reject: l2, metadata: { method: e } });
28585
28570
  });
28586
28571
  } catch (o2) {
28587
- if (o2 instanceof v2)
28572
+ if (o2 instanceof f2)
28588
28573
  throw o2;
28589
28574
  let n2 = o2;
28590
28575
  throw S2.WebsocketMethodErrors.ServerErrors(Number(n2.code), fr(e), n2.message);
@@ -28904,14 +28889,14 @@ var zt = class {
28904
28889
  });
28905
28890
  }
28906
28891
  };
28907
- var Ba = () => {
28892
+ var Va = () => {
28908
28893
  if (!O2 || typeof navigator.connection == "undefined")
28909
28894
  return;
28910
28895
  let a11 = navigator.connection;
28911
28896
  return { downlink: a11.downlink, downlinkMax: a11.downlinkMax, effectiveType: a11.effectiveType, rtt: a11.rtt, saveData: a11.saveData, type: a11.type };
28912
28897
  };
28913
28898
  var I2 = "[HMSTransport]:";
28914
- var Yt = class {
28899
+ var zt = class {
28915
28900
  constructor(e, t2, i2, r2, s2, o2, n2) {
28916
28901
  this.observer = e;
28917
28902
  this.deviceManager = t2;
@@ -28940,7 +28925,7 @@ var Yt = class {
28940
28925
  } catch (t3) {
28941
28926
  d2.d(I2, "[role=SUBSCRIBE] onOffer renegotiation FAILED \u274C", t3), this.state = "Failed";
28942
28927
  let i3;
28943
- t3 instanceof v2 ? i3 = t3 : i3 = S2.GenericErrors.Unknown("PUBLISH", t3.message), this.observer.onFailure(i3), this.eventBus.analytics.publish(y2.subscribeFail(i3));
28928
+ t3 instanceof f2 ? i3 = t3 : i3 = S2.GenericErrors.Unknown("PUBLISH", t3.message), this.observer.onFailure(i3), this.eventBus.analytics.publish(y2.subscribeFail(i3));
28944
28929
  }
28945
28930
  }), onTrickle: (e2) => c2(this, null, function* () {
28946
28931
  let t3 = e2.target === 0 ? this.publishConnection : this.subscribeConnection;
@@ -28950,7 +28935,7 @@ var Yt = class {
28950
28935
  }), onFailure: (e2) => {
28951
28936
  this.joinParameters && this.retryScheduler.schedule({ category: 1, error: e2, task: this.retrySignalDisconnectTask, originalState: this.state });
28952
28937
  }, onOffline: (e2) => c2(this, null, function* () {
28953
- d2.d(I2, "socket offline", ir[this.state]);
28938
+ d2.d(I2, "socket offline", tr[this.state]);
28954
28939
  try {
28955
28940
  this.state !== "Leaving" && this.joinParameters && this.retryScheduler.schedule({ category: 1, error: S2.WebSocketConnectionErrors.WebSocketConnectionLost("RECONNECT_SIGNAL", e2), task: this.retrySignalDisconnectTask, originalState: this.state });
28956
28941
  } catch (t3) {
@@ -28958,12 +28943,12 @@ var Yt = class {
28958
28943
  }
28959
28944
  }), onOnline: () => {
28960
28945
  var e2;
28961
- d2.d(I2, "socket online", ir[this.state]), this.analyticsSignalTransport.flushFailedEvents((e2 = this.store.getLocalPeer()) == null ? void 0 : e2.peerId);
28946
+ d2.d(I2, "socket online", tr[this.state]), this.analyticsSignalTransport.flushFailedEvents((e2 = this.store.getLocalPeer()) == null ? void 0 : e2.peerId);
28962
28947
  }, onNetworkOnline: () => {
28963
28948
  this.analyticsEventsService.flushFailedClientEvents();
28964
28949
  } };
28965
- this.signal = new zt(this.signalObserver);
28966
- this.analyticsSignalTransport = new nr(this.signal);
28950
+ this.signal = new Qt(this.signalObserver);
28951
+ this.analyticsSignalTransport = new or(this.signal);
28967
28952
  this.publishDtlsStateTimer = 0;
28968
28953
  this.lastPublishDtlsState = "new";
28969
28954
  this.publishConnectionObserver = { onRenegotiationNeeded: () => c2(this, null, function* () {
@@ -28988,8 +28973,8 @@ var Yt = class {
28988
28973
  }), onConnectionStateChange: (e2) => c2(this, null, function* () {
28989
28974
  var i3, r3, s3, o3, n3, l3, u3, p3;
28990
28975
  (e2 === "disconnected" ? d2.w.bind(d2) : d2.d.bind(d2))(I2, `Publish connection state change: ${e2}`), e2 === "connected" && ((i3 = this.connectivityListener) == null || i3.onICESuccess(true), (r3 = this.publishConnection) == null || r3.handleSelectedIceCandidatePairs()), e2 === "disconnected" && setTimeout(() => {
28991
- var h2, T, g2, f2, P7, k2, w2;
28992
- ((h2 = this.publishConnection) == null ? void 0 : h2.connectionState) === "disconnected" && this.handleIceConnectionFailure(0, S2.WebrtcErrors.ICEDisconnected("PUBLISH", `local candidate - ${(f2 = (g2 = (T = this.publishConnection) == null ? void 0 : T.selectedCandidatePair) == null ? void 0 : g2.local) == null ? void 0 : f2.candidate}; remote candidate - ${(w2 = (k2 = (P7 = this.publishConnection) == null ? void 0 : P7.selectedCandidatePair) == null ? void 0 : k2.remote) == null ? void 0 : w2.candidate}`));
28976
+ var h2, T, g2, v2, E2, P7, w2;
28977
+ ((h2 = this.publishConnection) == null ? void 0 : h2.connectionState) === "disconnected" && this.handleIceConnectionFailure(0, S2.WebrtcErrors.ICEDisconnected("PUBLISH", `local candidate - ${(v2 = (g2 = (T = this.publishConnection) == null ? void 0 : T.selectedCandidatePair) == null ? void 0 : g2.local) == null ? void 0 : v2.candidate}; remote candidate - ${(w2 = (P7 = (E2 = this.publishConnection) == null ? void 0 : E2.selectedCandidatePair) == null ? void 0 : P7.remote) == null ? void 0 : w2.candidate}`));
28993
28978
  }, 5e3), e2 === "failed" && (yield this.handleIceConnectionFailure(0, S2.WebrtcErrors.ICEFailure("PUBLISH", `local candidate - ${(n3 = (o3 = (s3 = this.publishConnection) == null ? void 0 : s3.selectedCandidatePair) == null ? void 0 : o3.local) == null ? void 0 : n3.candidate}; remote candidate - ${(p3 = (u3 = (l3 = this.publishConnection) == null ? void 0 : l3.selectedCandidatePair) == null ? void 0 : u3.remote) == null ? void 0 : p3.candidate}`)));
28994
28979
  }), onIceCandidate: (e2) => {
28995
28980
  var t3;
@@ -29013,8 +28998,8 @@ var Yt = class {
29013
28998
  }), onConnectionStateChange: (e2) => c2(this, null, function* () {
29014
28999
  var i3, r3, s3, o3, n3, l3;
29015
29000
  (e2 === "disconnected" ? d2.w.bind(d2) : d2.d.bind(d2))(I2, `Subscribe connection state change: ${e2}`), e2 === "failed" && (yield this.handleIceConnectionFailure(1, S2.WebrtcErrors.ICEFailure("SUBSCRIBE", `local candidate - ${(s3 = (r3 = (i3 = this.subscribeConnection) == null ? void 0 : i3.selectedCandidatePair) == null ? void 0 : r3.local) == null ? void 0 : s3.candidate}; remote candidate - ${(l3 = (n3 = (o3 = this.subscribeConnection) == null ? void 0 : o3.selectedCandidatePair) == null ? void 0 : n3.remote) == null ? void 0 : l3.candidate}`))), e2 === "disconnected" && setTimeout(() => {
29016
- var u3, p3, h2, T, g2, f2, P7;
29017
- ((u3 = this.subscribeConnection) == null ? void 0 : u3.connectionState) === "disconnected" && this.handleIceConnectionFailure(1, S2.WebrtcErrors.ICEDisconnected("SUBSCRIBE", `local candidate - ${(T = (h2 = (p3 = this.subscribeConnection) == null ? void 0 : p3.selectedCandidatePair) == null ? void 0 : h2.local) == null ? void 0 : T.candidate}; remote candidate - ${(P7 = (f2 = (g2 = this.subscribeConnection) == null ? void 0 : g2.selectedCandidatePair) == null ? void 0 : f2.remote) == null ? void 0 : P7.candidate}`));
29001
+ var u3, p3, h2, T, g2, v2, E2;
29002
+ ((u3 = this.subscribeConnection) == null ? void 0 : u3.connectionState) === "disconnected" && this.handleIceConnectionFailure(1, S2.WebrtcErrors.ICEDisconnected("SUBSCRIBE", `local candidate - ${(T = (h2 = (p3 = this.subscribeConnection) == null ? void 0 : p3.selectedCandidatePair) == null ? void 0 : h2.local) == null ? void 0 : T.candidate}; remote candidate - ${(E2 = (v2 = (g2 = this.subscribeConnection) == null ? void 0 : g2.selectedCandidatePair) == null ? void 0 : v2.remote) == null ? void 0 : E2.candidate}`));
29018
29003
  }, 5e3), e2 === "connected" && this.handleSubscribeConnectionConnected();
29019
29004
  }), onIceCandidate: (e2) => {
29020
29005
  var t3;
@@ -29053,13 +29038,13 @@ var Yt = class {
29053
29038
  return this.signal.trackUpdate(this.trackStates), e2;
29054
29039
  });
29055
29040
  var u2, p2;
29056
- this.webrtcInternals = new hi(this.store, this.eventBus, (u2 = this.publishConnection) == null ? void 0 : u2.nativeConnection, (p2 = this.subscribeConnection) == null ? void 0 : p2.nativeConnection);
29041
+ this.webrtcInternals = new pi(this.store, this.eventBus, (u2 = this.publishConnection) == null ? void 0 : u2.nativeConnection, (p2 = this.subscribeConnection) == null ? void 0 : p2.nativeConnection);
29057
29042
  let l2 = (h2, T) => c2(this, null, function* () {
29058
29043
  h2 !== this.state && (this.state = h2, yield this.observer.onStateChange(this.state, T));
29059
29044
  });
29060
- this.retryScheduler = new sr(l2, this.sendErrorAnalyticsEvent.bind(this)), this.eventBus.statsUpdate.subscribe((h2) => {
29061
- var g2, f2;
29062
- let T = ((f2 = (g2 = h2.getLocalPeerStats()) == null ? void 0 : g2.subscribe) == null ? void 0 : f2.bitrate) || 0;
29045
+ this.retryScheduler = new rr(l2, this.sendErrorAnalyticsEvent.bind(this)), this.eventBus.statsUpdate.subscribe((h2) => {
29046
+ var g2, v2;
29047
+ let T = ((v2 = (g2 = h2.getLocalPeerStats()) == null ? void 0 : g2.subscribe) == null ? void 0 : v2.bitrate) || 0;
29063
29048
  this.maxSubscribeBitrate = Math.max(this.maxSubscribeBitrate, T);
29064
29049
  }), this.eventBus.localAudioEnabled.subscribe(({ track: h2 }) => this.trackUpdate(h2)), this.eventBus.localVideoEnabled.subscribe(({ track: h2 }) => this.trackUpdate(h2));
29065
29050
  }
@@ -29095,11 +29080,11 @@ var Yt = class {
29095
29080
  }
29096
29081
  connect(e, t2, i2, r2, s2 = false, o2) {
29097
29082
  return c2(this, null, function* () {
29098
- this.setTransportStateForConnect(), this.joinParameters = new tr(e, i2, r2.name, r2.metaData, t2, s2, o2);
29083
+ this.setTransportStateForConnect(), this.joinParameters = new er(e, i2, r2.name, r2.metaData, t2, s2, o2);
29099
29084
  try {
29100
29085
  return yield this.internalConnect(e, t2, i2, o2);
29101
29086
  } catch (n2) {
29102
- if (n2 instanceof v2 && ([E2.WebSocketConnectionErrors.WEBSOCKET_CONNECTION_LOST, E2.WebSocketConnectionErrors.FAILED_TO_CONNECT, E2.WebSocketConnectionErrors.ABNORMAL_CLOSE, E2.APIErrors.ENDPOINT_UNREACHABLE].includes(n2.code) || n2.code.toString().startsWith("5") || n2.code.toString().startsWith("429"))) {
29087
+ if (n2 instanceof f2 && ([k2.WebSocketConnectionErrors.WEBSOCKET_CONNECTION_LOST, k2.WebSocketConnectionErrors.FAILED_TO_CONNECT, k2.WebSocketConnectionErrors.ABNORMAL_CLOSE, k2.APIErrors.ENDPOINT_UNREACHABLE].includes(n2.code) || n2.code.toString().startsWith("5") || n2.code.toString().startsWith("429"))) {
29103
29088
  let u2 = () => c2(this, null, function* () {
29104
29089
  return yield this.internalConnect(e, t2, i2, o2), !!(this.initConfig && this.initConfig.endpoint);
29105
29090
  });
@@ -29149,13 +29134,13 @@ var Yt = class {
29149
29134
  trackUpdate(e) {
29150
29135
  let i2 = Array.from(this.trackStates.values()).find((r2) => e.type === r2.type && e.source === r2.source);
29151
29136
  if (i2) {
29152
- let r2 = new Nt(M2(m({}, i2), { mute: !e.enabled }));
29137
+ let r2 = new _t(M2(m({}, i2), { mute: !e.enabled }));
29153
29138
  this.trackStates.set(i2.track_id, r2), d2.d(I2, "Track Update", this.trackStates, e), this.signal.trackUpdate(/* @__PURE__ */ new Map([[i2.track_id, r2]]));
29154
29139
  }
29155
29140
  }
29156
29141
  publishTrack(e) {
29157
29142
  return c2(this, null, function* () {
29158
- e.publishedTrackId = e.getTrackIDBeingSent(), d2.d(I2, `\u23F3 publishTrack: trackId=${e.trackId}, toPublishTrackId=${e.publishedTrackId}`, `${e}`), this.trackStates.set(e.publishedTrackId, new Nt(e));
29143
+ e.publishedTrackId = e.getTrackIDBeingSent(), d2.d(I2, `\u23F3 publishTrack: trackId=${e.trackId}, toPublishTrackId=${e.publishedTrackId}`, `${e}`), this.trackStates.set(e.publishedTrackId, new _t(e));
29159
29144
  let t2 = new Promise((s2, o2) => {
29160
29145
  this.callbacks.set(et, { promise: { resolve: s2, reject: o2 }, action: "PUBLISH", extra: {} });
29161
29146
  }), i2 = e.stream;
@@ -29193,7 +29178,7 @@ var Yt = class {
29193
29178
  });
29194
29179
  }
29195
29180
  createPeerConnections() {
29196
- this.initConfig && (this.publishConnection || (this.publishConnection = new qt(this.signal, this.initConfig.rtcConfiguration, this.publishConnectionObserver)), this.subscribeConnection || (this.subscribeConnection = new Jt(this.signal, this.initConfig.rtcConfiguration, this.isFlagEnabled.bind(this), this.subscribeConnectionObserver)));
29181
+ this.initConfig && (this.publishConnection || (this.publishConnection = new Kt(this.signal, this.initConfig.rtcConfiguration, this.publishConnectionObserver)), this.subscribeConnection || (this.subscribeConnection = new jt(this.signal, this.initConfig.rtcConfiguration, this.isFlagEnabled.bind(this), this.subscribeConnectionObserver)));
29197
29182
  }
29198
29183
  negotiateJoinWithRetry(s2) {
29199
29184
  return c2(this, arguments, function* ({ name: e, data: t2, autoSubscribeVideo: i2, isWebRTC: r2 = true }) {
@@ -29201,7 +29186,7 @@ var Yt = class {
29201
29186
  yield this.negotiateJoin({ name: e, data: t2, autoSubscribeVideo: i2, isWebRTC: r2 });
29202
29187
  } catch (o2) {
29203
29188
  d2.e(I2, "Join negotiation failed \u274C", o2);
29204
- let n2 = o2 instanceof v2 ? o2 : S2.WebsocketMethodErrors.ServerErrors(500, "JOIN", `Websocket join error - ${o2.message}`), l2 = parseInt(`${n2.code / 100}`) === 5 || [E2.WebSocketConnectionErrors.WEBSOCKET_CONNECTION_LOST, 429].includes(n2.code);
29189
+ let n2 = o2 instanceof f2 ? o2 : S2.WebsocketMethodErrors.ServerErrors(500, "JOIN", `Websocket join error - ${o2.message}`), l2 = parseInt(`${n2.code / 100}`) === 5 || [k2.WebSocketConnectionErrors.WEBSOCKET_CONNECTION_LOST, 429].includes(n2.code);
29205
29190
  if (n2.code === 410 && (n2.isTerminal = true), l2) {
29206
29191
  this.joinRetryCount = 0, n2.isTerminal = false;
29207
29192
  let u2 = () => c2(this, null, function* () {
@@ -29267,7 +29252,7 @@ var Yt = class {
29267
29252
  this.callbacks.delete(et), d2.timeEnd("renegotiation-offer-exchange"), yield this.publishConnection.setRemoteDescription(r2), t2.promise.resolve(true), d2.d(I2, "[role=PUBLISH] onRenegotiationNeeded DONE \u2705");
29268
29253
  } catch (i2) {
29269
29254
  let r2;
29270
- i2 instanceof v2 ? r2 = i2 : r2 = S2.GenericErrors.Unknown("PUBLISH", i2.message), t2.promise.reject(r2), d2.d(I2, "[role=PUBLISH] onRenegotiationNeeded FAILED \u274C");
29255
+ i2 instanceof f2 ? r2 = i2 : r2 = S2.GenericErrors.Unknown("PUBLISH", i2.message), t2.promise.reject(r2), d2.d(I2, "[role=PUBLISH] onRenegotiationNeeded FAILED \u274C");
29271
29256
  }
29272
29257
  }
29273
29258
  });
@@ -29283,7 +29268,7 @@ var Yt = class {
29283
29268
  d2.d(I2, "connect: started \u23F0");
29284
29269
  let s2 = /* @__PURE__ */ new Date();
29285
29270
  try {
29286
- this.analyticsTimer.start("init_response_time"), this.initConfig = yield Qt.fetchInitConfig({ token: e, peerId: i2, userAgent: this.store.getUserAgent(), initEndpoint: t2, iceServers: r2 }), (o2 = this.connectivityListener) == null || o2.onInitSuccess(this.initConfig.endpoint);
29271
+ this.analyticsTimer.start("init_response_time"), this.initConfig = yield Jt.fetchInitConfig({ token: e, peerId: i2, userAgent: this.store.getUserAgent(), initEndpoint: t2, iceServers: r2 }), (o2 = this.connectivityListener) == null || o2.onInitSuccess(this.initConfig.endpoint);
29287
29272
  let u2 = this.store.getRoom();
29288
29273
  return u2 && (u2.effectsKey = (n2 = this.initConfig.config.vb) == null ? void 0 : n2.effectsKey, u2.isEffectsEnabled = this.isFlagEnabled("effectsSDKEnabled"), u2.isHipaaEnabled = this.isFlagEnabled("hipaa"), u2.isNoiseCancellationEnabled = this.isFlagEnabled("noiseCancellation")), this.analyticsTimer.end("init_response_time"), Pe.setWebsocketEndpoint(this.initConfig.endpoint), this.validateNotDisconnected("post init"), yield this.openSignal(e, i2), this.observer.onConnected(), (l2 = this.connectivityListener) == null || l2.onSignallingSuccess(), this.store.setSimulcastEnabled(this.isFlagEnabled("simulcast")), d2.d(I2, "Adding Analytics Transport: JsonRpcSignal"), this.analyticsEventsService.setTransport(this.analyticsSignalTransport), this.analyticsEventsService.flush(), this.initConfig;
29289
29274
  } catch (u2) {
@@ -29301,7 +29286,7 @@ var Yt = class {
29301
29286
  throw S2.APIErrors.InitConfigNotAvailable("INIT", "Init Config not found");
29302
29287
  d2.d(I2, "\u23F3 internal connect: connecting to ws endpoint", this.initConfig.endpoint);
29303
29288
  let i2 = new URL(this.initConfig.endpoint);
29304
- i2.searchParams.set("peer", t2), i2.searchParams.set("token", e), i2.searchParams.set("user_agent_v2", this.store.getUserAgent()), i2.searchParams.set("protocol_version", Vs), i2.searchParams.set("protocol_spec", Fs), this.endpoint = i2.toString(), this.analyticsTimer.start("ws_connect_time"), yield this.signal.open(this.endpoint), this.analyticsTimer.end("ws_connect_time"), this.analyticsTimer.start("on_policy_change_time"), this.analyticsTimer.start("room_state_time"), d2.d(I2, "\u2705 internal connect: connected to ws endpoint");
29289
+ i2.searchParams.set("peer", t2), i2.searchParams.set("token", e), i2.searchParams.set("user_agent_v2", this.store.getUserAgent()), i2.searchParams.set("protocol_version", Fs), i2.searchParams.set("protocol_spec", Gs), this.endpoint = i2.toString(), this.analyticsTimer.start("ws_connect_time"), yield this.signal.open(this.endpoint), this.analyticsTimer.end("ws_connect_time"), this.analyticsTimer.start("on_policy_change_time"), this.analyticsTimer.start("room_state_time"), d2.d(I2, "\u2705 internal connect: connected to ws endpoint");
29305
29290
  });
29306
29291
  }
29307
29292
  initRtcStatsMonitor() {
@@ -29312,7 +29297,7 @@ var Yt = class {
29312
29297
  }
29313
29298
  initStatsAnalytics() {
29314
29299
  var e, t2;
29315
- this.isFlagEnabled("publishStats") && (this.publishStatsAnalytics = new Wt(this.store, this.eventBus, this.getValueFromInitConfig("publishStats", "maxSampleWindowSize", 30), this.getValueFromInitConfig("publishStats", "maxSamplePushInterval", 300)), (e = this.getWebrtcInternals()) == null || e.start()), this.isFlagEnabled("subscribeStats") && (this.subscribeStatsAnalytics = new $t(this.store, this.eventBus, this.getValueFromInitConfig("subscribeStats", "maxSampleWindowSize", 10), this.getValueFromInitConfig("subscribeStats", "maxSamplePushInterval", 60)), (t2 = this.getWebrtcInternals()) == null || t2.start());
29300
+ this.isFlagEnabled("publishStats") && (this.publishStatsAnalytics = new Gt(this.store, this.eventBus, this.getValueFromInitConfig("publishStats", "maxSampleWindowSize", 30), this.getValueFromInitConfig("publishStats", "maxSamplePushInterval", 300)), (e = this.getWebrtcInternals()) == null || e.start()), this.isFlagEnabled("subscribeStats") && (this.subscribeStatsAnalytics = new Wt(this.store, this.eventBus, this.getValueFromInitConfig("subscribeStats", "maxSampleWindowSize", 10), this.getValueFromInitConfig("subscribeStats", "maxSamplePushInterval", 60)), (t2 = this.getWebrtcInternals()) == null || t2.start());
29316
29301
  }
29317
29302
  getValueFromInitConfig(e, t2, i2) {
29318
29303
  var r2, s2;
@@ -29367,17 +29352,32 @@ var Yt = class {
29367
29352
  }
29368
29353
  getAdditionalAnalyticsProperties() {
29369
29354
  var o2, n2, l2, u2, p2, h2, T, g2;
29370
- let e = Ba(), t2 = typeof document != "undefined" && document.hidden, i2 = this.store.getRemoteVideoTracks().filter((f2) => f2.degraded).length, r2 = (u2 = (l2 = (n2 = (o2 = this.getWebrtcInternals()) == null ? void 0 : o2.getCurrentStats()) == null ? void 0 : n2.getLocalPeerStats()) == null ? void 0 : l2.publish) == null ? void 0 : u2.bitrate, s2 = (g2 = (T = (h2 = (p2 = this.getWebrtcInternals()) == null ? void 0 : p2.getCurrentStats()) == null ? void 0 : h2.getLocalPeerStats()) == null ? void 0 : T.subscribe) == null ? void 0 : g2.bitrate;
29355
+ let e = Va(), t2 = typeof document != "undefined" && document.hidden, i2 = this.store.getRemoteVideoTracks().filter((v2) => v2.degraded).length, r2 = (u2 = (l2 = (n2 = (o2 = this.getWebrtcInternals()) == null ? void 0 : o2.getCurrentStats()) == null ? void 0 : n2.getLocalPeerStats()) == null ? void 0 : l2.publish) == null ? void 0 : u2.bitrate, s2 = (g2 = (T = (h2 = (p2 = this.getWebrtcInternals()) == null ? void 0 : p2.getCurrentStats()) == null ? void 0 : h2.getLocalPeerStats()) == null ? void 0 : T.subscribe) == null ? void 0 : g2.bitrate;
29371
29356
  return { network_info: e, document_hidden: t2, num_degraded_tracks: i2, bitrate: { publish: r2, subscribe: s2 }, max_sub_bitrate: this.maxSubscribeBitrate, recent_pong_response_times: this.signal.getPongResponseTimes(), transport_state: this.state };
29372
29357
  }
29373
29358
  };
29374
- var Fa = { published: false, isInitialised: false, isReconnecting: false, isPreviewInProgress: false, isPreviewCalled: false, isJoinInProgress: false, deviceManagersInitialised: false };
29359
+ function pr(a11) {
29360
+ if (!a11 || a11.length === 0)
29361
+ throw S2.APIErrors.InvalidTokenFormat("INIT", "Token cannot be an empty string or undefined or null");
29362
+ let e = a11.split(".");
29363
+ if (e.length !== 3)
29364
+ throw S2.APIErrors.InvalidTokenFormat("INIT", "Expected 3 '.' separate fields - header, payload and signature respectively");
29365
+ let t2 = atob(e[1]);
29366
+ try {
29367
+ let i2 = JSON.parse(t2);
29368
+ return { roomId: i2.room_id, userId: i2.user_id, role: i2.role };
29369
+ } catch (i2) {
29370
+ throw S2.APIErrors.InvalidTokenFormat("INIT", `couldn't parse to json - ${i2.message}`);
29371
+ }
29372
+ }
29373
+ var Ga = { published: false, isInitialised: false, isReconnecting: false, isPreviewInProgress: false, isPreviewCalled: false, isJoinInProgress: false, deviceManagersInitialised: false };
29375
29374
  var hr = class {
29376
29375
  constructor() {
29377
29376
  this.TAG = "[HMSSdk]:";
29378
29377
  this.transportState = "Disconnected";
29379
- this.analyticsTimer = new di();
29380
- this.sdkState = m({}, Fa);
29378
+ this.analyticsTimer = new ci();
29379
+ this.sdkState = m({}, Ga);
29380
+ this.isDiagnostics = false;
29381
29381
  this.playlistSettings = { video: { bitrate: Dr }, audio: { bitrate: wr } };
29382
29382
  this.handleAutoplayError = (e) => {
29383
29383
  var t2, i2;
@@ -29446,7 +29446,7 @@ var hr = class {
29446
29446
  var s2, o2, n2, l2;
29447
29447
  if (e.error && e.type) {
29448
29448
  let u2 = e.type.includes("audio") ? (s2 = this.localPeer) == null ? void 0 : s2.audioTrack : (o2 = this.localPeer) == null ? void 0 : o2.videoTrack;
29449
- (n2 = this.errorListener) == null || n2.onError(e.error), [E2.TracksErrors.CANT_ACCESS_CAPTURE_DEVICE, E2.TracksErrors.DEVICE_IN_USE, E2.TracksErrors.DEVICE_NOT_AVAILABLE].includes(e.error.code) && u2 && (u2.setEnabled(false), (l2 = this.listener) == null || l2.onTrackUpdate(2, u2, this.localPeer));
29449
+ (n2 = this.errorListener) == null || n2.onError(e.error), [k2.TracksErrors.CANT_ACCESS_CAPTURE_DEVICE, k2.TracksErrors.DEVICE_IN_USE, k2.TracksErrors.DEVICE_NOT_AVAILABLE].includes(e.error.code) && u2 && (u2.setEnabled(false), (l2 = this.listener) == null || l2.onTrackUpdate(2, u2, this.localPeer));
29450
29450
  }
29451
29451
  })();
29452
29452
  };
@@ -29461,7 +29461,7 @@ var hr = class {
29461
29461
  this.sendAudioPresenceFailed = () => {
29462
29462
  var t2;
29463
29463
  let e = S2.TracksErrors.NoAudioDetected("PREVIEW");
29464
- d2.w(this.TAG, "Audio Presence Failure", this.transportState, e), (t2 = this.listener) == null || t2.onError(e);
29464
+ d2.w(this.TAG, "Audio Presence Failure", this.transportState, e), this.isDiagnostics && ((t2 = this.listener) == null || t2.onError(e));
29465
29465
  };
29466
29466
  this.sendJoinAnalyticsEvent = (e = false, t2) => {
29467
29467
  this.eventBus.analytics.publish(y2.join(M2(m({ error: t2 }, this.analyticsTimer.getTimes()), { time: this.analyticsTimer.getTimeTaken("join_time"), is_preview_called: e, retries_join: this.transport.joinRetryCount })));
@@ -29470,11 +29470,11 @@ var hr = class {
29470
29470
  this.eventBus.analytics.publish(y2.preview(M2(m({ error: e }, this.analyticsTimer.getTimes()), { time: this.analyticsTimer.getTimeTaken("preview_time") })));
29471
29471
  };
29472
29472
  this.sendAnalyticsEvent = (e) => {
29473
- this.listener.onInitSuccess || this.analyticsEventsService.queue(e).flush();
29473
+ this.isDiagnostics || this.analyticsEventsService.queue(e).flush();
29474
29474
  };
29475
29475
  }
29476
29476
  initNotificationManager() {
29477
- this.notificationManager || (this.notificationManager = new Zi(this.store, this.eventBus, this.transport, this.listener, this.audioListener));
29477
+ this.notificationManager || (this.notificationManager = new Xi(this.store, this.eventBus, this.transport, this.listener, this.audioListener));
29478
29478
  }
29479
29479
  initStoreAndManagers(e) {
29480
29480
  var t2, i2;
@@ -29482,7 +29482,7 @@ var hr = class {
29482
29482
  (i2 = this.notificationManager) == null || i2.setListener(this.listener), this.audioSinkManager.setListener(this.listener), this.interactivityCenter.setListener(this.listener);
29483
29483
  return;
29484
29484
  }
29485
- this.sdkState.isInitialised = true, this.store = new Ot(), this.eventBus = new Bt(), this.pluginUsageTracker = new xi(this.eventBus), this.wakeLockManager = new Ni(), this.networkTestManager = new _i(this.eventBus, this.listener), this.playlistManager = new Rt(this, this.eventBus), this.deviceManager = new Ut(this.store, this.eventBus), this.audioSinkManager = new xt(this.store, this.deviceManager, this.eventBus), this.audioOutput = new Ui(this.deviceManager, this.audioSinkManager), this.audioSinkManager.setListener(this.listener), this.eventBus.autoplayError.subscribe(this.handleAutoplayError), this.localTrackManager = new ve(this.store, this.observer, this.deviceManager, this.eventBus, this.analyticsTimer), this.analyticsEventsService = new Oi(this.store), this.transport = new Yt(this.observer, this.deviceManager, this.store, this.eventBus, this.analyticsEventsService, this.analyticsTimer, this.pluginUsageTracker), e.onInitSuccess && this.transport.setConnectivityListener(e), this.sessionStore = new er(this.transport), this.interactivityCenter = new Ft(this.transport, this.store, this.listener), this.eventBus.analytics.subscribe(this.sendAnalyticsEvent), this.eventBus.deviceChange.subscribe(this.handleDeviceChange), this.eventBus.audioPluginFailed.subscribe(this.handleAudioPluginError);
29485
+ this.sdkState.isInitialised = true, this.store = new Nt(), this.eventBus = new Ut(), this.pluginUsageTracker = new Oi(this.eventBus), this.wakeLockManager = new _i(), this.networkTestManager = new wi(this.eventBus, this.listener), this.playlistManager = new bt(this, this.eventBus), this.deviceManager = new xt(this.store, this.eventBus), this.audioSinkManager = new Ot(this.store, this.deviceManager, this.eventBus), this.audioOutput = new xi(this.deviceManager, this.audioSinkManager), this.audioSinkManager.setListener(this.listener), this.eventBus.autoplayError.subscribe(this.handleAutoplayError), this.localTrackManager = new ve(this.store, this.observer, this.deviceManager, this.eventBus, this.analyticsTimer), this.analyticsEventsService = new Ni(this.store), this.transport = new zt(this.observer, this.deviceManager, this.store, this.eventBus, this.analyticsEventsService, this.analyticsTimer, this.pluginUsageTracker), "onInitSuccess" in e && this.transport.setConnectivityListener(e), this.sessionStore = new Zi(this.transport), this.interactivityCenter = new Vt(this.transport, this.store, this.listener), this.eventBus.analytics.subscribe(this.sendAnalyticsEvent), this.eventBus.deviceChange.subscribe(this.handleDeviceChange), this.eventBus.audioPluginFailed.subscribe(this.handleAudioPluginError);
29486
29486
  }
29487
29487
  validateJoined(e) {
29488
29488
  if (!this.localPeer)
@@ -29529,7 +29529,7 @@ var hr = class {
29529
29529
  return this.interactivityCenter;
29530
29530
  }
29531
29531
  getPeerListIterator(e) {
29532
- return new mi(this.transport, this.store, e);
29532
+ return new hi(this.transport, this.store, e);
29533
29533
  }
29534
29534
  updatePlaylistSettings(e) {
29535
29535
  e.video && Object.assign(this.playlistSettings.video, e.video), e.audio && Object.assign(this.playlistSettings.audio, e.audio);
@@ -29540,7 +29540,7 @@ var hr = class {
29540
29540
  }
29541
29541
  preview(e, t2) {
29542
29542
  return c2(this, null, function* () {
29543
- if (Tt(), gt(), this.sdkState.isPreviewInProgress)
29543
+ if (gt(), St(), this.sdkState.isPreviewInProgress)
29544
29544
  return Promise.reject(S2.GenericErrors.PreviewAlreadyInProgress("PREVIEW", "Preview already called"));
29545
29545
  if (["Joined", "Reconnecting"].includes(this.transportState))
29546
29546
  return this.midCallPreview(e.asRole, e.settings);
@@ -29600,17 +29600,17 @@ var hr = class {
29600
29600
  join(e, t2) {
29601
29601
  return c2(this, null, function* () {
29602
29602
  var l2, u2, p2, h2, T, g2;
29603
- if (Tt(), gt(), this.sdkState.isPreviewInProgress)
29603
+ if (gt(), St(), this.sdkState.isPreviewInProgress)
29604
29604
  throw S2.GenericErrors.NotReady("JOIN", "Preview is in progress, can't join");
29605
29605
  this.analyticsTimer.start("join_time"), this.sdkState.isJoinInProgress = true;
29606
- let { roomId: i2, userId: r2, role: s2 } = nt(e.authToken), o2 = ((u2 = (l2 = this.localPeer) == null ? void 0 : l2.asRole) == null ? void 0 : u2.name) || ((h2 = (p2 = this.localPeer) == null ? void 0 : p2.role) == null ? void 0 : h2.name);
29606
+ let { roomId: i2, userId: r2, role: s2 } = pr(e.authToken), o2 = ((u2 = (l2 = this.localPeer) == null ? void 0 : l2.asRole) == null ? void 0 : u2.name) || ((h2 = (p2 = this.localPeer) == null ? void 0 : p2.role) == null ? void 0 : h2.name);
29607
29607
  (T = this.networkTestManager) == null || T.stop(), this.commonSetup(e, i2, t2), this.removeDevicesFromConfig(e), this.store.setConfig(e), this.store.createAndSetUserAgent(this.frameworkInfo), He.resumeContext();
29608
29608
  let n2 = this.store.getConfig();
29609
- n2 != null && n2.autoManageWakeLock && this.wakeLockManager.acquireLock(), this.localPeer ? (this.localPeer.name = e.userName, this.localPeer.role = this.store.getPolicyForRole(s2), this.localPeer.customerUserId = r2, this.localPeer.metadata = e.metaData, delete this.localPeer.asRole) : this.createAndAddLocalPeerToStore(e, s2, r2), this.roleChangeManager = new _t(this.store, this.transport, this.deviceManager, this.getAndPublishTracks.bind(this), this.removeTrack.bind(this), this.listener), this.eventBus.localRoleUpdate.subscribe(this.handleLocalRoleUpdate), d2.d(this.TAG, `\u23F3 Joining room ${i2}`), d2.time(`join-room-${i2}`);
29609
+ n2 != null && n2.autoManageWakeLock && this.wakeLockManager.acquireLock(), this.localPeer ? (this.localPeer.name = e.userName, this.localPeer.role = this.store.getPolicyForRole(s2), this.localPeer.customerUserId = r2, this.localPeer.metadata = e.metaData, delete this.localPeer.asRole) : this.createAndAddLocalPeerToStore(e, s2, r2), this.roleChangeManager = new wt(this.store, this.transport, this.deviceManager, this.getAndPublishTracks.bind(this), this.removeTrack.bind(this), this.listener), this.eventBus.localRoleUpdate.subscribe(this.handleLocalRoleUpdate), d2.d(this.TAG, `\u23F3 Joining room ${i2}`), d2.time(`join-room-${i2}`);
29610
29610
  try {
29611
29611
  yield this.transport.join(e.authToken, this.localPeer.peerId, { name: e.userName, metaData: e.metaData }, e.initEndpoint, e.autoVideoSubscribe, e.iceServers), d2.d(this.TAG, `\u2705 Joined room ${i2}`), this.analyticsTimer.start("peer_list_time"), yield this.notifyJoin(), this.sdkState.isJoinInProgress = false, yield this.publish(e.settings, o2);
29612
- } catch (f2) {
29613
- throw this.analyticsTimer.end("join_time"), this.sdkState.isJoinInProgress = false, (g2 = this.listener) == null || g2.onError(f2), this.sendJoinAnalyticsEvent(this.sdkState.isPreviewCalled, f2), d2.e(this.TAG, "Unable to join room", f2), f2;
29612
+ } catch (v2) {
29613
+ throw this.analyticsTimer.end("join_time"), this.sdkState.isJoinInProgress = false, (g2 = this.listener) == null || g2.onError(v2), this.sendJoinAnalyticsEvent(this.sdkState.isPreviewCalled, v2), d2.e(this.TAG, "Unable to join room", v2), v2;
29614
29614
  }
29615
29615
  d2.timeEnd(`join-room-${i2}`);
29616
29616
  });
@@ -29620,7 +29620,7 @@ var hr = class {
29620
29620
  }
29621
29621
  cleanup() {
29622
29622
  var e, t2, i2;
29623
- this.cleanDeviceManagers(), this.eventBus.analytics.unsubscribe(this.sendAnalyticsEvent), this.analyticsTimer.cleanup(), Q2.cleanup(), this.playlistManager.cleanup(), (e = this.wakeLockManager) == null || e.cleanup(), ve.cleanup(), this.notificationManager = void 0, d2.cleanup(), this.sdkState = m({}, Fa), this.localPeer && ((t2 = this.localPeer.audioTrack) == null || t2.cleanup(), this.localPeer.audioTrack = void 0, (i2 = this.localPeer.videoTrack) == null || i2.cleanup(), this.localPeer.videoTrack = void 0), this.store.cleanup(), this.listener = void 0, this.roleChangeManager && this.eventBus.localRoleUpdate.unsubscribe(this.handleLocalRoleUpdate);
29623
+ this.cleanDeviceManagers(), this.eventBus.analytics.unsubscribe(this.sendAnalyticsEvent), this.analyticsTimer.cleanup(), Q2.cleanup(), this.playlistManager.cleanup(), (e = this.wakeLockManager) == null || e.cleanup(), ve.cleanup(), this.notificationManager = void 0, d2.cleanup(), this.sdkState = m({}, Ga), this.localPeer && ((t2 = this.localPeer.audioTrack) == null || t2.cleanup(), this.localPeer.audioTrack = void 0, (i2 = this.localPeer.videoTrack) == null || i2.cleanup(), this.localPeer.videoTrack = void 0), this.store.cleanup(), this.listener = void 0, this.roleChangeManager && this.eventBus.localRoleUpdate.unsubscribe(this.handleLocalRoleUpdate);
29624
29624
  }
29625
29625
  leave(e) {
29626
29626
  return this.internalLeave(e);
@@ -29643,7 +29643,7 @@ var hr = class {
29643
29643
  return c2(this, null, function* () {
29644
29644
  let i2 = (t2 || {}).endpoint || "https://auth.100ms.live/v2/token";
29645
29645
  this.analyticsTimer.start("GET_TOKEN");
29646
- let r2 = yield Li(i2, { method: "POST", body: JSON.stringify({ code: e.roomCode, user_id: e.userId }) }, [429, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511]), s2 = yield r2.json();
29646
+ let r2 = yield Ci(i2, { method: "POST", body: JSON.stringify({ code: e.roomCode, user_id: e.userId }) }, [429, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511]), s2 = yield r2.json();
29647
29647
  if (this.analyticsTimer.end("GET_TOKEN"), !r2.ok)
29648
29648
  throw S2.APIErrors.ServerErrors(s2.code, "GET_TOKEN", s2.message, false);
29649
29649
  let { token: o2 } = s2;
@@ -29770,7 +29770,7 @@ var hr = class {
29770
29770
  throw S2.GenericErrors.NotConnected("VALIDATION", "No local peer present, cannot addTrack");
29771
29771
  if (this.localPeer.auxiliaryTracks.find((g2) => g2.trackId === e.id))
29772
29772
  return;
29773
- let r2 = e.kind, s2 = new MediaStream([e]), o2 = new We(s2), n2 = r2 === "audio" ? ce : F, l2 = new n2(o2, e, t2, this.eventBus);
29773
+ let r2 = e.kind, s2 = new MediaStream([e]), o2 = new Ge(s2), n2 = r2 === "audio" ? ce : F, l2 = new n2(o2, e, t2, this.eventBus);
29774
29774
  this.setPlaylistSettings({ track: e, hmsTrack: l2, source: t2 }), yield (u2 = this.transport) == null ? void 0 : u2.publish([l2]), l2.peerId = (p2 = this.localPeer) == null ? void 0 : p2.peerId, (h2 = this.localPeer) == null || h2.auxiliaryTracks.push(l2), (T = this.listener) == null || T.onTrackUpdate(0, l2, this.localPeer);
29775
29775
  });
29776
29776
  }
@@ -29801,6 +29801,9 @@ var hr = class {
29801
29801
  var t2;
29802
29802
  (t2 = this.notificationManager) == null || t2.setConnectionQualityListener(e);
29803
29803
  }
29804
+ setIsDiagnostics(e) {
29805
+ this.isDiagnostics = e;
29806
+ }
29804
29807
  changeRole(e, t2, i2 = false) {
29805
29808
  return c2(this, null, function* () {
29806
29809
  var r2;
@@ -30013,7 +30016,7 @@ var hr = class {
30013
30016
  publish(e, t2) {
30014
30017
  return c2(this, null, function* () {
30015
30018
  var i2, r2, s2;
30016
- if ([this.store.getPublishParams(), !this.sdkState.published, !Be].every((o2) => !!o2)) {
30019
+ if ([this.store.getPublishParams(), !this.sdkState.published, !Ue].every((o2) => !!o2)) {
30017
30020
  let o2 = t2 && t2 !== ((r2 = (i2 = this.localPeer) == null ? void 0 : i2.role) == null ? void 0 : r2.name) ? () => {
30018
30021
  var n2;
30019
30022
  return (n2 = this.roleChangeManager) == null ? void 0 : n2.diffRolesAndPublishTracks({ oldRole: this.store.getPolicyForRole(t2), newRole: this.localPeer.role });
@@ -30091,7 +30094,7 @@ var hr = class {
30091
30094
  }
30092
30095
  setUpPreview(e, t2) {
30093
30096
  this.sdkState.isPreviewCalled = true, this.sdkState.isPreviewInProgress = true;
30094
- let { roomId: i2, userId: r2, role: s2 } = nt(e.authToken);
30097
+ let { roomId: i2, userId: r2, role: s2 } = pr(e.authToken);
30095
30098
  this.commonSetup(e, i2, t2), this.store.setConfig(e), this.store.createAndSetUserAgent(this.frameworkInfo), this.createAndAddLocalPeerToStore(e, s2, r2, e.asRole);
30096
30099
  }
30097
30100
  setPlaylistSettings(r2) {
@@ -30112,11 +30115,11 @@ var hr = class {
30112
30115
  });
30113
30116
  }
30114
30117
  createAndAddLocalPeerToStore(e, t2, i2, r2) {
30115
- let s2 = this.store.getPolicyForRole(t2), o2 = r2 ? this.store.getPolicyForRole(r2) : void 0, n2 = new $e({ name: e.userName || "", customerUserId: i2, metadata: e.metaData || "", role: s2, asRole: o2 || s2, type: "regular" });
30118
+ let s2 = this.store.getPolicyForRole(t2), o2 = r2 ? this.store.getPolicyForRole(r2) : void 0, n2 = new We({ name: e.userName || "", customerUserId: i2, metadata: e.metaData || "", role: s2, asRole: o2 || s2, type: "regular" });
30116
30119
  this.store.addPeer(n2);
30117
30120
  }
30118
30121
  commonSetup(e, t2, i2) {
30119
- this.stringifyMetadata(e), e.initEndpoint || (e.initEndpoint = "https://prod-init.100ms.live"), this.initStoreAndManagers(i2), this.store.getRoom() || this.store.setRoom(new Oe(t2));
30122
+ this.stringifyMetadata(e), e.initEndpoint || (e.initEndpoint = "https://prod-init.100ms.live"), this.initStoreAndManagers(i2), this.store.getRoom() || this.store.setRoom(new Ke(t2));
30120
30123
  }
30121
30124
  removeDevicesFromConfig(e) {
30122
30125
  this.store.getConfig() && e.settings && (delete e.settings.audioOutputDeviceId, delete e.settings.videoDeviceId, delete e.settings.audioInputDeviceId);
@@ -30139,11 +30142,11 @@ var hr = class {
30139
30142
  e.source === "audioplaylist" ? this.playlistManager.stop("audio") : e.source === "videoplaylist" && this.playlistManager.stop("video");
30140
30143
  }
30141
30144
  };
30142
- var ut = class a10 {
30145
+ var lt = class a10 {
30143
30146
  constructor(e, t2, i2) {
30144
- this.getStats = () => (this.stats || (this.stats = new Xt(this.store, this.sdk)), this.stats);
30147
+ this.getStats = () => (this.stats || (this.stats = new Yt(this.store, this.sdk)), this.stats);
30145
30148
  this.getDiagnosticsSDK = () => (this.diagnostics || (this.diagnostics = this.actions.initDiagnostics()), this.diagnostics);
30146
- e ? this.store = e : this.store = a10.createNewHMSStore(wi("HMSStore"), ti), i2 ? this.notifications = i2 : this.notifications = new Pi(this.store), t2 ? this.actions = t2 : (this.sdk = new hr(), this.actions = new Di(this.store, this.sdk, this.notifications)), this.actions.setFrameworkInfo({ type: "js", sdkVersion: Mr().version }), this.initialTriggerOnSubscribe = false, O2 && (window.__hms = this);
30149
+ e ? this.store = e : this.store = a10.createNewHMSStore(Di("HMSStore"), ei), i2 ? this.notifications = i2 : this.notifications = new ki(this.store), t2 ? this.actions = t2 : (this.sdk = new hr(), this.actions = new Li(this.store, this.sdk, this.notifications)), this.actions.setFrameworkInfo({ type: "js", sdkVersion: Mr().version }), this.initialTriggerOnSubscribe = false, O2 && (window.__hms = this);
30147
30150
  }
30148
30151
  triggerOnSubscribe() {
30149
30152
  this.initialTriggerOnSubscribe || (a10.makeStoreTriggerOnSubscribe(this.store), this.initialTriggerOnSubscribe = true);
@@ -30220,22 +30223,22 @@ var ut = class a10 {
30220
30223
  };
30221
30224
  }
30222
30225
  };
30223
- var Wa = (a11, e, t2) => {
30226
+ var $a = (a11, e, t2) => {
30224
30227
  let i2;
30225
- t2.getState(ie) === "Connected" && (i2 = Ga(a11, e, t2)), t2.subscribe((r2) => {
30226
- ["Connected", "Reconnecting"].includes(r2) ? i2 || (i2 = Ga(a11, e, t2)) : ["Disconnected", "Failed"].includes(r2) && i2 && (yn(e, r2), i2(), i2 = void 0);
30228
+ t2.getState(ie) === "Connected" && (i2 = Wa(a11, e, t2)), t2.subscribe((r2) => {
30229
+ ["Connected", "Reconnecting"].includes(r2) ? i2 || (i2 = Wa(a11, e, t2)) : ["Disconnected", "Failed"].includes(r2) && i2 && (kn(e, r2), i2(), i2 = void 0);
30227
30230
  }, ie);
30228
30231
  };
30229
- var Ga = (a11, e, t2) => {
30232
+ var Wa = (a11, e, t2) => {
30230
30233
  var s2, o2;
30231
- let i2 = vn2(t2, e);
30234
+ let i2 = Mn(t2, e);
30232
30235
  (s2 = a11.getWebrtcInternals()) == null || s2.start();
30233
- let r2 = (o2 = a11.getWebrtcInternals()) == null ? void 0 : o2.onStatsChange((n2) => Mn(e, n2, t2, a11));
30236
+ let r2 = (o2 = a11.getWebrtcInternals()) == null ? void 0 : o2.onStatsChange((n2) => yn(e, n2, t2, a11));
30234
30237
  return () => {
30235
30238
  i2(), r2 && r2();
30236
30239
  };
30237
30240
  };
30238
- var vn2 = (a11, e) => {
30241
+ var Mn = (a11, e) => {
30239
30242
  let t2, i2, r2;
30240
30243
  return a11.getState(ye) ? e.namedSetState((s2) => {
30241
30244
  s2.localPeer.id = a11.getState(ye);
@@ -30259,7 +30262,7 @@ var vn2 = (a11, e) => {
30259
30262
  t2 == null || t2(), i2 == null || i2(), r2 == null || r2();
30260
30263
  };
30261
30264
  };
30262
- var Mn = (a11, e, t2, i2) => {
30265
+ var yn = (a11, e, t2, i2) => {
30263
30266
  let r2 = t2.getState(N2);
30264
30267
  a11.namedSetState((s2) => {
30265
30268
  let o2 = t2.getState(ye), n2 = {}, l2 = Object.keys(r2).filter((p2) => r2[p2].peerId !== o2);
@@ -30269,19 +30272,19 @@ var Mn = (a11, e, t2, i2) => {
30269
30272
  }
30270
30273
  Kr(s2.remoteTrackStats, n2);
30271
30274
  let u2 = { [o2]: e.getLocalPeerStats() };
30272
- Kr(s2.peerStats, u2), Ia(s2.localTrackStats, e.getLocalTrackStats(), i2.store.getLocalPeerTracks());
30275
+ Kr(s2.peerStats, u2), Aa(s2.localTrackStats, e.getLocalTrackStats(), i2.store.getLocalPeerTracks());
30273
30276
  }, "webrtc-stats");
30274
30277
  };
30275
- var yn = (a11, e = "resetState") => {
30278
+ var kn = (a11, e = "resetState") => {
30276
30279
  a11.namedSetState((t2) => {
30277
- Object.assign(t2, ii());
30280
+ Object.assign(t2, ti());
30278
30281
  }, e);
30279
30282
  };
30280
- var Xt = class {
30283
+ var Yt = class {
30281
30284
  constructor(e, t2) {
30282
30285
  this.hmsStore = e;
30283
30286
  this.sdk = t2;
30284
- this.store = ut.createNewHMSStore(wi("HMSStatsStore"), ii), this.getState = this.store.getState, this.subscribe = this.store.subscribe, this.getPublishPeerConnection = () => new Promise((i2) => {
30287
+ this.store = lt.createNewHMSStore(Di("HMSStatsStore"), ti), this.getState = this.store.getState, this.subscribe = this.store.subscribe, this.getPublishPeerConnection = () => new Promise((i2) => {
30285
30288
  var r2, s2;
30286
30289
  this.hmsStore.getState(ie) === "Connected" ? i2((s2 = (r2 = this.sdk) == null ? void 0 : r2.getWebrtcInternals()) == null ? void 0 : s2.getPublishPeerConnection()) : this.hmsStore.subscribe((o2) => {
30287
30290
  var n2, l2;
@@ -30293,65 +30296,65 @@ var Xt = class {
30293
30296
  var n2, l2;
30294
30297
  o2 === "Connected" && i2((l2 = (n2 = this.sdk) == null ? void 0 : n2.getWebrtcInternals()) == null ? void 0 : l2.getSubscribePeerConnection());
30295
30298
  }, ie);
30296
- }), this.sdk && Wa(this.sdk, this.store, this.hmsStore);
30299
+ }), this.sdk && $a(this.sdk, this.store, this.hmsStore);
30297
30300
  }
30298
30301
  };
30299
- var kn = (a11) => a11.localPeer.id;
30300
- var Pn = (a11) => a11.localPeer.audioTrack;
30301
- var En = (a11) => a11.localPeer.videoTrack;
30302
- var bn = (a11, e) => e;
30303
- var $a = (a11, e) => e;
30304
- var Rn = (a11) => a11.remoteTrackStats;
30305
- var Ka = (a11) => a11.peerStats;
30302
+ var Pn = (a11) => a11.localPeer.id;
30303
+ var En = (a11) => a11.localPeer.audioTrack;
30304
+ var bn = (a11) => a11.localPeer.videoTrack;
30305
+ var Rn = (a11, e) => e;
30306
+ var Ka = (a11, e) => e;
30307
+ var In = (a11) => a11.remoteTrackStats;
30308
+ var qa = (a11) => a11.peerStats;
30306
30309
  var Zr = (a11) => a11.localTrackStats;
30307
- var be = createSelector([Ka, kn], (a11, e) => a11[e]);
30308
- var In = createSelector(be, (a11) => {
30310
+ var be = createSelector([qa, Pn], (a11, e) => a11[e]);
30311
+ var An = createSelector(be, (a11) => {
30309
30312
  var e;
30310
30313
  return (e = a11 == null ? void 0 : a11.subscribe) == null ? void 0 : e.packetsLost;
30311
30314
  });
30312
- var An = createSelector(be, (a11) => {
30315
+ var Hn = createSelector(be, (a11) => {
30313
30316
  var e;
30314
30317
  return (e = a11 == null ? void 0 : a11.subscribe) == null ? void 0 : e.jitter;
30315
30318
  });
30316
- var Hn = createSelector(be, (a11) => {
30319
+ var Cn = createSelector(be, (a11) => {
30317
30320
  var e;
30318
30321
  return (e = a11 == null ? void 0 : a11.publish) == null ? void 0 : e.bitrate;
30319
30322
  });
30320
- var Cn = createSelector(be, (a11) => {
30323
+ var Ln = createSelector(be, (a11) => {
30321
30324
  var e;
30322
30325
  return (e = a11 == null ? void 0 : a11.subscribe) == null ? void 0 : e.bitrate;
30323
30326
  });
30324
- var Ln = createSelector(be, (a11) => {
30327
+ var Dn = createSelector(be, (a11) => {
30325
30328
  var e;
30326
30329
  return (e = a11 == null ? void 0 : a11.publish) == null ? void 0 : e.availableOutgoingBitrate;
30327
30330
  });
30328
- var Dn = createSelector(be, (a11) => {
30331
+ var wn = createSelector(be, (a11) => {
30329
30332
  var e;
30330
30333
  return (e = a11 == null ? void 0 : a11.subscribe) == null ? void 0 : e.availableIncomingBitrate;
30331
30334
  });
30332
- var wn = createSelector(be, (a11) => {
30335
+ var _n = createSelector(be, (a11) => {
30333
30336
  var e;
30334
30337
  return (e = a11 == null ? void 0 : a11.publish) == null ? void 0 : e.bytesSent;
30335
30338
  });
30336
- var _n = createSelector(be, (a11) => {
30339
+ var Nn = createSelector(be, (a11) => {
30337
30340
  var e;
30338
30341
  return (e = a11 == null ? void 0 : a11.subscribe) == null ? void 0 : e.bytesReceived;
30339
30342
  });
30340
- var Nn = createSelector([Ka, bn], (a11, e) => e ? a11[e] : void 0);
30341
- var On = createSelector([Rn, $a], (a11, e) => e ? a11[e] : void 0);
30342
- var es = createSelector([Zr, $a], (a11, e) => e ? a11[e] : void 0);
30343
- var xn = A2(Nn);
30343
+ var On = createSelector([qa, Rn], (a11, e) => e ? a11[e] : void 0);
30344
+ var xn = createSelector([In, Ka], (a11, e) => e ? a11[e] : void 0);
30345
+ var es = createSelector([Zr, Ka], (a11, e) => e ? a11[e] : void 0);
30344
30346
  var Un = A2(On);
30345
- var Bn = createSelector([Zr, Pn], (a11, e) => {
30347
+ var Bn = A2(xn);
30348
+ var Vn = createSelector([Zr, En], (a11, e) => {
30346
30349
  var t2;
30347
30350
  return e ? (t2 = a11[e]) == null ? void 0 : t2[0] : void 0;
30348
30351
  });
30349
- var Vn = A2(createSelector(es, (a11) => a11 == null ? void 0 : a11[0]));
30350
- var Fn = createSelector([Zr, En], (a11, e) => {
30352
+ var Fn = A2(createSelector(es, (a11) => a11 == null ? void 0 : a11[0]));
30353
+ var Gn = createSelector([Zr, bn], (a11, e) => {
30351
30354
  var t2;
30352
30355
  return e ? (t2 = a11[e]) == null ? void 0 : t2[0] : void 0;
30353
30356
  });
30354
- var Gn = A2(createSelector(es, (a11) => a11));
30357
+ var Wn = A2(createSelector(es, (a11) => a11));
30355
30358
 
30356
30359
  // src/Prebuilt/components/Header/StreamActions.tsx
30357
30360
  import {
@@ -36175,7 +36178,7 @@ var Chat = () => {
36175
36178
  const listRef = useRef24(null);
36176
36179
  const hmsActions2 = useHMSActions41();
36177
36180
  const vanillaStore = useHMSVanillaStore10();
36178
- const { enabled: isChatEnabled = true } = useHMSStore62(xm("chatState" /* CHAT_STATE */)) || {};
36181
+ const { enabled: isChatEnabled = true } = useHMSStore62(Bm("chatState" /* CHAT_STATE */)) || {};
36179
36182
  const isMobile = useMedia19(config.media.md);
36180
36183
  const isMobileHLSStream = useMobileHLSStream();
36181
36184
  const isLandscapeStream = useLandscapeHLSStream();
@@ -36265,7 +36268,7 @@ var NewMessageIndicator = ({
36265
36268
  scrollToBottom,
36266
36269
  listRef
36267
36270
  }) => {
36268
- const unreadCount = useHMSStore62(om);
36271
+ const unreadCount = useHMSStore62(cm);
36269
36272
  if (!unreadCount || !listRef.current) {
36270
36273
  return null;
36271
36274
  }
@@ -37384,12 +37387,12 @@ var VBPicker = ({ backgroundMedia = [] }) => {
37384
37387
  const [blurAmount, setBlurAmount] = useState56(VBHandler.getBlurAmount() || 0.5);
37385
37388
  const roomState = useHMSStore70(selectRoomState4);
37386
37389
  const isLargeRoom = useHMSStore70(selectIsLargeRoom3);
37387
- const isEffectsEnabled = useHMSStore70(vm);
37388
- const effectsKey = useHMSStore70(Mm);
37390
+ const isEffectsEnabled = useHMSStore70(ym);
37391
+ const effectsKey = useHMSStore70(km);
37389
37392
  const isMobile = useMedia23(config.media.md);
37390
37393
  const [loadingEffects, setLoadingEffects] = useSetAppDataByKey(APP_DATA.loadingEffects);
37391
37394
  const isPluginAdded = useHMSStore70(selectIsLocalVideoPluginPresent(((_a8 = VBHandler) == null ? void 0 : _a8.getName()) || ""));
37392
- const background = useHMSStore70(Om(APP_DATA.background));
37395
+ const background = useHMSStore70(Um(APP_DATA.background));
37393
37396
  const mediaList = backgroundMedia.length ? backgroundMedia.map((media) => media.url || "") : defaultMedia2;
37394
37397
  const inPreview = roomState === HMSRoomState4.Preview;
37395
37398
  const showVideoTile = isVideoOn && isLargeRoom && !inPreview;
@@ -39761,7 +39764,7 @@ var useCloseScreenshareWhiteboard = () => {
39761
39764
  };
39762
39765
 
39763
39766
  // src/Prebuilt/layouts/VideoStreamingSection.tsx
39764
- var HLSView = React155.lazy(() => import("./HLSView-C7QKK3HT.js"));
39767
+ var HLSView = React155.lazy(() => import("./HLSView-67SFNI2P.js"));
39765
39768
  var VideoStreamingSection = ({
39766
39769
  screenType,
39767
39770
  elements,
@@ -42106,7 +42109,7 @@ import React183, { useContext as useContext5 } from "react";
42106
42109
 
42107
42110
  // src/Diagnostics/hms.ts
42108
42111
  init_define_process_env();
42109
- var hms = new ut();
42112
+ var hms = new lt();
42110
42113
  var hmsStore = hms.getStore();
42111
42114
  var hmsActions = hms.getActions();
42112
42115
  var hmsNotifications = hms.getNotifications();
@@ -42593,7 +42596,7 @@ var ConnectivityTestReport = ({
42593
42596
  return /* @__PURE__ */ React187.createElement(React187.Fragment, null, /* @__PURE__ */ React187.createElement(TestContainer, null, /* @__PURE__ */ React187.createElement(Text, { css: { c: "$on_primary_medium" } }, "Connectivity test has been completed."), /* @__PURE__ */ React187.createElement(SignallingResult, { result: result == null ? void 0 : result.signallingReport }), /* @__PURE__ */ React187.createElement(MediaServerResult, { result: result == null ? void 0 : result.mediaServerReport }), /* @__PURE__ */ React187.createElement(AudioStats, { stats: (_b7 = (_a8 = result == null ? void 0 : result.mediaServerReport) == null ? void 0 : _a8.stats) == null ? void 0 : _b7.audio }), /* @__PURE__ */ React187.createElement(VideoStats, { stats: (_d = (_c = result == null ? void 0 : result.mediaServerReport) == null ? void 0 : _c.stats) == null ? void 0 : _d.video })), /* @__PURE__ */ React187.createElement(Footer3, { result, restart: startTest, error }));
42594
42597
  }
42595
42598
  if (progress !== void 0) {
42596
- return /* @__PURE__ */ React187.createElement(TestContainer, { css: { textAlign: "center" } }, /* @__PURE__ */ React187.createElement(Text, { css: { c: "$primary_bright" } }, /* @__PURE__ */ React187.createElement(Loading, { size: "3.5rem", color: "currentColor" })), /* @__PURE__ */ React187.createElement(Text, { variant: "h6", css: { mt: "$8" } }, "Checking your connection..."), /* @__PURE__ */ React187.createElement(
42599
+ return /* @__PURE__ */ React187.createElement(TestContainer, { css: { textAlign: "center" } }, /* @__PURE__ */ React187.createElement(Text, { css: { c: "$primary_bright", textAlign: "center" } }, /* @__PURE__ */ React187.createElement(Loading, { size: "3.5rem", color: "currentColor" })), /* @__PURE__ */ React187.createElement(Text, { variant: "h6", css: { mt: "$8" } }, "Checking your connection..."), /* @__PURE__ */ React187.createElement(
42597
42600
  Text,
42598
42601
  {
42599
42602
  variant: "body2",
@@ -42934,4 +42937,4 @@ object-assign/index.js:
42934
42937
  @license MIT
42935
42938
  *)
42936
42939
  */
42937
- //# sourceMappingURL=chunk-EODBFJ5Y.js.map
42940
+ //# sourceMappingURL=chunk-VCXILOW6.js.map