Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package element-web for openSUSE:Factory checked in at 2022-09-21 14:43:22 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/element-web (Old) and /work/SRC/openSUSE:Factory/.element-web.new.2083 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "element-web" Wed Sep 21 14:43:22 2022 rev:19 rq:1005167 version:1.11.5 Changes: -------- --- /work/SRC/openSUSE:Factory/element-web/element-web.changes 2022-09-01 22:12:34.184473648 +0200 +++ /work/SRC/openSUSE:Factory/.element-web.new.2083/element-web.changes 2022-09-21 14:44:22.250065230 +0200 @@ -1,0 +2,21 @@ +Wed Sep 14 09:12:15 UTC 2022 - Dominik Heidler <dheid...@suse.de> + +- Version 1.11.5 + * Features + * Device manager - hide unverified security recommendation when only current session is unverified ([\#9228](https://github.com/matrix-org/matrix-react-sdk/pull/9228)). Contributed by @kerryarchibald. + * Device manager - scroll to filtered list from security recommendations ([\#9227](https://github.com/matrix-org/matrix-react-sdk/pull/9227)). Contributed by @kerryarchibald. + * Device manager - updated dropdown style in filtered device list ([\#9226](https://github.com/matrix-org/matrix-react-sdk/pull/9226)). Contributed by @kerryarchibald. + * Device manager - device type and verification icons on device tile ([\#9197](https://github.com/matrix-org/matrix-react-sdk/pull/9197)). Contributed by @kerryarchibald. + + * Bug Fixes + * Description of DM room with more than two other people is now being displayed correctly ([\#9231](https://github.com/matrix-org/matrix-react-sdk/pull/9231)). Fixes #23094. + * Fix voice messages with multiple composers ([\#9208](https://github.com/matrix-org/matrix-react-sdk/pull/9208)). Fixes #23023. Contributed by @grimhilt. + * Fix suggested rooms going missing ([\#9236](https://github.com/matrix-org/matrix-react-sdk/pull/9236)). Fixes #23190. + * Fix tooltip infinitely recursing ([\#9235](https://github.com/matrix-org/matrix-react-sdk/pull/9235)). Fixes matrix-org/element-web-rageshakes#15107, matrix-org/element-web-rageshakes#15093 matrix-org/element-web-rageshakes#15092 and matrix-org/element-web-rageshakes#15077. + * Fix plain text export saving ([\#9230](https://github.com/matrix-org/matrix-react-sdk/pull/9230)). Contributed by @jryans. + * Add missing space in SecurityRoomSettingsTab ([\#9222](https://github.com/matrix-org/matrix-react-sdk/pull/9222)). Contributed by @gefgu. + * Make use of js-sdk roomNameGenerator to handle i18n for generated room names ([\#9209](https://github.com/matrix-org/matrix-react-sdk/pull/9209)). Fixes #21369. + * Fix progress bar regression throughout the app ([\#9219](https://github.com/matrix-org/matrix-react-sdk/pull/9219)). Fixes #23121. + * Reuse empty string & space string logic for event types in devtools ([\#9218](https://github.com/matrix-org/matrix-react-sdk/pull/9218)). Fixes #23115. + +------------------------------------------------------------------- Old: ---- element-web-1.11.4.tar.gz New: ---- element-web-1.11.5.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ element-web.spec ++++++ --- /var/tmp/diff_new_pack.Em8AFH/_old 2022-09-21 14:44:24.126070128 +0200 +++ /var/tmp/diff_new_pack.Em8AFH/_new 2022-09-21 14:44:24.130070139 +0200 @@ -17,7 +17,7 @@ Name: element-web -Version: 1.11.4 +Version: 1.11.5 Release: 0 Summary: A glossy Matrix collaboration client - web files License: Apache-2.0 ++++++ element-web-1.11.4.tar.gz -> element-web-1.11.5.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/element-web-1.11.4/.github/workflows/backport.yml new/element-web-1.11.5/.github/workflows/backport.yml --- old/element-web-1.11.4/.github/workflows/backport.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/element-web-1.11.5/.github/workflows/backport.yml 2022-09-13 14:05:08.000000000 +0200 @@ -0,0 +1,30 @@ +name: Backport +on: + pull_request_target: + types: + - closed + - labeled + branches: + - develop + +jobs: + backport: + name: Backport + runs-on: ubuntu-latest + # Only react to merged PRs for security reasons. + # See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target. + if: > + github.event.pull_request.merged + && ( + github.event.action == 'closed' + || ( + github.event.action == 'labeled' + && contains(github.event.label.name, 'backport') + ) + ) + steps: + - uses: tibdex/backport@v2 + with: + labels_template: "<%= JSON.stringify(labels) %>" + # We can't use GITHUB_TOKEN here or CI won't run on the new PR + github_token: ${{ secrets.ELEMENT_BOT_TOKEN }} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/element-web-1.11.4/.github/workflows/build_develop.yml new/element-web-1.11.5/.github/workflows/build_develop.yml --- old/element-web-1.11.4/.github/workflows/build_develop.yml 2022-08-31 17:44:24.000000000 +0200 +++ new/element-web-1.11.5/.github/workflows/build_develop.yml 2022-09-13 14:05:08.000000000 +0200 @@ -35,8 +35,21 @@ SENTRY_ORG: element SENTRY_PROJECT: riot-web - - run: mv dist/element-*.tar.gz webapp.tar.gz - + - run: mv dist/element-*.tar.gz dist/develop.tar.gz + + # We keep the latest develop.tar.gz as the artifact uploaded later expires after 24 and requires auth to download + # Element Desktop's fetch script uses this tarball to fetch latest develop to build Nightlies. + - name: Deploy develop.tar.gz to Github Pages + uses: JamesIves/github-pages-deploy-action@v4 + with: + folder: dist + + - uses: actions/upload-artifact@v3 + with: + name: webapp + path: dist/develop.tar.gz + retention-days: 1 + - name: Wait for other steps to succeed uses: lewagon/wait-on-check-action@v1.0.0 with: @@ -45,9 +58,3 @@ repo-token: ${{ secrets.GITHUB_TOKEN }} wait-interval: 10 check-regexp: ^((?!SonarQube|issues|board).)*$ - - - uses: actions/upload-artifact@v3 - with: - name: webapp - path: webapp.tar.gz - retention-days: 1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/element-web-1.11.4/.github/workflows/static_analysis.yaml new/element-web-1.11.5/.github/workflows/static_analysis.yaml --- old/element-web-1.11.4/.github/workflows/static_analysis.yaml 2022-08-31 17:44:24.000000000 +0200 +++ new/element-web-1.11.5/.github/workflows/static_analysis.yaml 2022-09-13 14:05:08.000000000 +0200 @@ -79,3 +79,38 @@ - name: Dead Code Analysis run: "yarn run analyse:unused-exports" + + tsc-strict: + name: Typescript Strict Error Checker + if: github.event_name == 'pull_request' + runs-on: ubuntu-latest + permissions: + pull-requests: read + checks: write + steps: + - uses: actions/checkout@v3 + + - name: Get diff lines + id: diff + uses: Equip-Collaboration/diff-line-numbers@v1.0.0 + with: + include: '["\\.tsx?$"]' + + - name: Detecting files changed + id: files + uses: futuratrepadeira/changed-files@v3.2.1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + pattern: '^.*\.tsx?$' + + - uses: t3chguy/typescript-check-action@main + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + use-check: false + check-fail-mode: added + output-behaviour: annotate + ts-extra-args: '--strict' + files-changed: ${{ steps.files.outputs.files_updated }} + files-added: ${{ steps.files.outputs.files_created }} + files-deleted: ${{ steps.files.outputs.files_deleted }} + line-numbers: ${{ steps.diff.outputs.lineNumbers }} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/element-web-1.11.4/.github/workflows/triage-labelled.yml new/element-web-1.11.5/.github/workflows/triage-labelled.yml --- old/element-web-1.11.4/.github/workflows/triage-labelled.yml 2022-08-31 17:44:24.000000000 +0200 +++ new/element-web-1.11.5/.github/workflows/triage-labelled.yml 2022-09-13 14:05:08.000000000 +0200 @@ -115,12 +115,12 @@ env: PROJECT_ID: "PN_kwDOAM0swc1HvQ" GITHUB_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }} - - move_voice-message_issues: - name: A-Voice Messages to voice message board + + Search_issues_to_board: + name: Search issues to project board runs-on: ubuntu-latest if: > - contains(github.event.issue.labels.*.name, 'A-Voice Messages') + contains(github.event.issue.labels.*.name, 'A-New-Search-Experience') steps: - uses: octokit/graphql-action@v2.x with: @@ -136,14 +136,14 @@ projectid: ${{ env.PROJECT_ID }} contentid: ${{ github.event.issue.node_id }} env: - PROJECT_ID: "PN_kwDOAM0swc2KCw" + PROJECT_ID: "PN_kwDOAM0swc4ADtaO" GITHUB_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }} - move_threads_issues: - name: A-Threads to Thread board + move_voice-message_issues: + name: A-Voice Messages to voice message board runs-on: ubuntu-latest if: > - contains(github.event.issue.labels.*.name, 'A-Threads') + contains(github.event.issue.labels.*.name, 'A-Voice Messages') steps: - uses: octokit/graphql-action@v2.x with: @@ -159,9 +159,8 @@ projectid: ${{ env.PROJECT_ID }} contentid: ${{ github.event.issue.node_id }} env: - PROJECT_ID: "PN_kwDOAM0swc0rRA" + PROJECT_ID: "PN_kwDOAM0swc2KCw" GITHUB_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }} - move_message_bubbles_issues: name: A-Message-Bubbles to Message bubbles board runs-on: ubuntu-latest diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/element-web-1.11.4/CHANGELOG.md new/element-web-1.11.5/CHANGELOG.md --- old/element-web-1.11.4/CHANGELOG.md 2022-08-31 17:44:24.000000000 +0200 +++ new/element-web-1.11.5/CHANGELOG.md 2022-09-13 14:05:08.000000000 +0200 @@ -1,6 +1,32 @@ +Changes in [1.11.5](https://github.com/vector-im/element-web/releases/tag/v1.11.5) (2022-09-13) +=============================================================================================== + +## ??? Features + * Device manager - hide unverified security recommendation when only current session is unverified ([\#9228](https://github.com/matrix-org/matrix-react-sdk/pull/9228)). Contributed by @kerryarchibald. + * Device manager - scroll to filtered list from security recommendations ([\#9227](https://github.com/matrix-org/matrix-react-sdk/pull/9227)). Contributed by @kerryarchibald. + * Device manager - updated dropdown style in filtered device list ([\#9226](https://github.com/matrix-org/matrix-react-sdk/pull/9226)). Contributed by @kerryarchibald. + * Device manager - device type and verification icons on device tile ([\#9197](https://github.com/matrix-org/matrix-react-sdk/pull/9197)). Contributed by @kerryarchibald. + +## ???? Bug Fixes + * Description of DM room with more than two other people is now being displayed correctly ([\#9231](https://github.com/matrix-org/matrix-react-sdk/pull/9231)). Fixes #23094. + * Fix voice messages with multiple composers ([\#9208](https://github.com/matrix-org/matrix-react-sdk/pull/9208)). Fixes #23023. Contributed by @grimhilt. + * Fix suggested rooms going missing ([\#9236](https://github.com/matrix-org/matrix-react-sdk/pull/9236)). Fixes #23190. + * Fix tooltip infinitely recursing ([\#9235](https://github.com/matrix-org/matrix-react-sdk/pull/9235)). Fixes matrix-org/element-web-rageshakes#15107, matrix-org/element-web-rageshakes#15093 matrix-org/element-web-rageshakes#15092 and matrix-org/element-web-rageshakes#15077. + * Fix plain text export saving ([\#9230](https://github.com/matrix-org/matrix-react-sdk/pull/9230)). Contributed by @jryans. + * Add missing space in SecurityRoomSettingsTab ([\#9222](https://github.com/matrix-org/matrix-react-sdk/pull/9222)). Contributed by @gefgu. + * Make use of js-sdk roomNameGenerator to handle i18n for generated room names ([\#9209](https://github.com/matrix-org/matrix-react-sdk/pull/9209)). Fixes #21369. + * Fix progress bar regression throughout the app ([\#9219](https://github.com/matrix-org/matrix-react-sdk/pull/9219)). Fixes #23121. + * Reuse empty string & space string logic for event types in devtools ([\#9218](https://github.com/matrix-org/matrix-react-sdk/pull/9218)). Fixes #23115. + Changes in [1.11.4](https://github.com/vector-im/element-web/releases/tag/v1.11.4) (2022-08-31) =============================================================================================== +## ???? Security +* Fixes for [CVE-2022-36059](https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=CVE%2D2022%2D36059) and [CVE-2022-36060](https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=CVE%2D2022%2D36060) + +Learn more about what we've been up to at https://element.io/blog/element-web-desktop-1-11-4-a-security-update-deferred-dms-and-more/ +Find more details of the vulnerabilities at https://matrix.org/blog/2022/08/31/security-releases-matrix-js-sdk-19-4-0-and-matrix-react-sdk-3-53-0 + ## ??? Features * Device manager - scroll to filtered list from security recommendations ([\#9227](https://github.com/matrix-org/matrix-react-sdk/pull/9227)). Contributed by @kerryarchibald. * Device manager - updated dropdown style in filtered device list ([\#9226](https://github.com/matrix-org/matrix-react-sdk/pull/9226)). Contributed by @kerryarchibald. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/element-web-1.11.4/CONTRIBUTING.md new/element-web-1.11.5/CONTRIBUTING.md --- old/element-web-1.11.4/CONTRIBUTING.md 2022-08-31 17:44:24.000000000 +0200 +++ new/element-web-1.11.5/CONTRIBUTING.md 2022-09-13 14:05:08.000000000 +0200 @@ -1,4 +1,283 @@ -Contributing code to Element -============================ +Contributing code to Element Web +================================ -Element follows the same pattern as the [matrix-js-sdk](https://github.com/matrix-org/matrix-js-sdk/blob/develop/CONTRIBUTING.md). +Everyone is welcome to contribute code to Element Web, provided that they are +willing to license their contributions under the same license as the project +itself. We follow a simple 'inbound=outbound' model for contributions: the act +of submitting an 'inbound' contribution means that the contributor agrees to +license the code under the same terms as the project's overall 'outbound' +license - in this case, Apache Software License v2 (see +[LICENSE](LICENSE)). + +How to contribute +----------------- + +The preferred and easiest way to contribute changes to the project is to fork +it on github, and then create a pull request to ask us to pull your changes +into our repo (https://help.github.com/articles/using-pull-requests/) + +We use GitHub's pull request workflow to review the contribution, and either +ask you to make any refinements needed or merge it and make them ourselves. + +Things that should go into your PR description: + * A changelog entry in the `Notes` section (see below) + * References to any bugs fixed by the change (in GitHub's `Fixes` notation) + * Describe the why and what is changing in the PR description so it's easy for + onlookers and reviewers to onboard and context switch. This information is + also helpful when we come back to look at this in 6 months and ask "why did + we do it like that?" we have a chance of finding out. + * Why didn't it work before? Why does it work now? What use cases does it + unlock? + * If you find yourself adding information on how the code works or why you + chose to do it the way you did, make sure this information is instead + written as comments in the code itself. + * Sometimes a PR can change considerably as it is developed. In this case, + the description should be updated to reflect the most recent state of + the PR. (It can be helpful to retain the old content under a suitable + heading, for additional context.) + * Include both **before** and **after** screenshots to easily compare and discuss + what's changing. + * Include a step-by-step testing strategy so that a reviewer can check out the + code locally and easily get to the point of testing your change. + * Add comments to the diff for the reviewer that might help them to understand + why the change is necessary or how they might better understand and review it. + +We rely on information in pull request to populate the information that goes into +the changelogs our users see, both for Element Web itself and other projects on +which it is based. This is picked up from both labels on the pull request and +the `Notes:` annotation in the description. By default, the PR title will be +used for the changelog entry, but you can specify more options, as follows. + +To add a longer, more detailed description of the change for the changelog: + + +*Fix llama herding bug* + +``` +Notes: Fix a bug (https://github.com/matrix-org/notaproject/issues/123) where the 'Herd' button would not herd more than 8 Llamas if the moon was in the waxing gibbous phase +``` + +For some PRs, it's not useful to have an entry in the user-facing changelog (this is +the default for PRs labelled with `T-Task`): + +*Remove outdated comment from `Ungulates.ts`* +``` +Notes: none +``` + +Sometimes, you're fixing a bug in a downstream project, in which case you want +an entry in that project's changelog. You can do that too: + +*Fix another herding bug* +``` +Notes: Fix a bug where the `herd()` function would only work on Tuesdays +element-web notes: Fix a bug where the 'Herd' button only worked on Tuesdays +``` + +This example is for Element Web. You can specify: + * matrix-react-sdk + * element-web + * element-desktop + +If your PR introduces a breaking change, use the `Notes` section in the same +way, additionally adding the `X-Breaking-Change` label (see below). There's no need +to specify in the notes that it's a breaking change - this will be added +automatically based on the label - but remember to tell the developer how to +migrate: + +*Remove legacy class* + +``` +Notes: Remove legacy `Camelopard` class. `Giraffe` should be used instead. +``` + +Other metadata can be added using labels. + * `X-Breaking-Change`: A breaking change - adding this label will mean the change causes a *major* version bump. + * `T-Enhancement`: A new feature - adding this label will mean the change causes a *minor* version bump. + * `T-Defect`: A bug fix (in either code or docs). + * `T-Task`: No user-facing changes, eg. code comments, CI fixes, refactors or tests. Won't have a changelog entry unless you specify one. + +If you don't have permission to add labels, your PR reviewer(s) can work with you +to add them: ask in the PR description or comments. + +We use continuous integration, and all pull requests get automatically tested: +if your change breaks the build, then the PR will show that there are failed +checks, so please check back after a few minutes. + +Tests +----- +Your PR should include tests. + +For new user facing features in `matrix-js-sdk`, `matrix-react-sdk` or `element-web`, you +must include: + +1. Comprehensive unit tests written in Jest. These are located in `/test`. +2. "happy path" end-to-end tests. + These are located in `/cypress/e2e` in `matrix-react-sdk`, and + are run using `element-web`. Ideally, you would also include tests for edge + and error cases. + +Unit tests are expected even when the feature is in labs. It's good practice +to write tests alongside the code as it ensures the code is testable from +the start, and gives you a fast feedback loop while you're developing the +functionality. End-to-end tests should be added prior to the feature +leaving labs, but don't have to be present from the start (although it might +be beneficial to have some running early, so you can test things faster). + +For bugs in those repos, your change must include at least one unit test or +end-to-end test; which is best depends on what sort of test most concisely +exercises the area. + +Changes to must be accompanied by unit tests written in Jest. +These are located in `/spec/` in `matrix-js-sdk` or `/test/` in `element-web` +and `matrix-react-sdk`. + +When writing unit tests, please aim for a high level of test coverage +for new code - 80% or greater. If you cannot achieve that, please document +why it's not possible in your PR. + +Some sections of code are not sensible to add coverage for, such as those +which explicitly inhibit noisy logging for tests. Which can be hidden using +an istanbul magic comment as [documented here][1]. See example: +```javascript +/* istanbul ignore if */ +if (process.env.NODE_ENV !== "test") { + logger.error("Log line that is noisy enough in tests to want to skip"); +} +``` + +Tests validate that your change works as intended and also document +concisely what is being changed. Ideally, your new tests fail +prior to your change, and succeed once it has been applied. You may +find this simpler to achieve if you write the tests first. + +If you're spiking some code that's experimental and not being used to support +production features, exceptions can be made to requirements for tests. +Note that tests will still be required in order to ship the feature, and it's +strongly encouraged to think about tests early in the process, as adding +tests later will become progressively more difficult. + +If you're not sure how to approach writing tests for your change, ask for help +in [#element-dev](https://matrix.to/#/#element-dev:matrix.org). + +Code style +---------- +Element Web aims to target TypeScript/ES6. All new files should be written in +TypeScript and existing files should use ES6 principles where possible. + +Members should not be exported as a default export in general - it causes problems +with the architecture of the SDK (index file becomes less clear) and could +introduce naming problems (as default exports get aliased upon import). In +general, avoid using `export default`. + +The remaining code style is documented in [code_style.md](./code_style.md). +Contributors are encouraged to it and follow the principles set out there. + +Please ensure your changes match the cosmetic style of the existing project, +and ***never*** mix cosmetic and functional changes in the same commit, as it +makes it horribly hard to review otherwise. + +Attribution +----------- +Everyone who contributes anything to Matrix is welcome to be listed in the +AUTHORS.rst file for the project in question. Please feel free to include a +change to AUTHORS.rst in your pull request to list yourself and a short +description of the area(s) you've worked on. Also, we sometimes have swag to +give away to contributors - if you feel that Matrix-branded apparel is missing +from your life, please mail us your shipping address to matrix at matrix.org +and we'll try to fix it :) + +Sign off +-------- +In order to have a concrete record that your contribution is intentional +and you agree to license it under the same terms as the project's license, we've +adopted the same lightweight approach that the Linux Kernel +(https://www.kernel.org/doc/Documentation/SubmittingPatches), Docker +(https://github.com/docker/docker/blob/master/CONTRIBUTING.md), and many other +projects use: the DCO (Developer Certificate of Origin: +http://developercertificate.org/). This is a simple declaration that you wrote +the contribution or otherwise have the right to contribute it to Matrix: + +``` +Developer Certificate of Origin +Version 1.1 + +Copyright (C) 2004, 2006 The Linux Foundation and its contributors. +660 York Street, Suite 102, +San Francisco, CA 94110 USA + +Everyone is permitted to copy and distribute verbatim copies of this +license document, but changing it is not allowed. + +Developer's Certificate of Origin 1.1 + +By making a contribution to this project, I certify that: + +(a) The contribution was created in whole or in part by me and I + have the right to submit it under the open source license + indicated in the file; or + +(b) The contribution is based upon previous work that, to the best + of my knowledge, is covered under an appropriate open source + license and I have the right under that license to submit that + work with modifications, whether created in whole or in part + by me, under the same open source license (unless I am + permitted to submit under a different license), as indicated + in the file; or + +(c) The contribution was provided directly to me by some other + person who certified (a), (b) or (c) and I have not modified + it. + +(d) I understand and agree that this project and the contribution + are public and that a record of the contribution (including all + personal information I submit with it, including my sign-off) is + maintained indefinitely and may be redistributed consistent with + this project or the open source license(s) involved. +``` + +If you agree to this for your contribution, then all that's needed is to +include the line in your commit or pull request comment: + +``` +Signed-off-by: Your Name <y...@email.example.org> +``` + +We accept contributions under a legally identifiable name, such as your name on +government documentation or common-law names (names claimed by legitimate usage +or repute). Unfortunately, we cannot accept anonymous contributions at this +time. + +Git allows you to add this signoff automatically when using the `-s` flag to +`git commit`, which uses the name and email set in your `user.name` and +`user.email` git configs. + +If you forgot to sign off your commits before making your pull request and are +on Git 2.17+ you can mass signoff using rebase: + +``` +git rebase --signoff origin/develop +``` + +Review expectations +=================== + +See https://github.com/vector-im/element-meta/wiki/Review-process + + +Merge Strategy +============== + +The preferred method for merging pull requests is squash merging to keep the +commit history trim, but it is up to the discretion of the team member merging +the change. We do not support rebase merges due to `allchange` being unable to +handle them. When merging make sure to leave the default commit title, or +at least leave the PR number at the end in brackets like by default. +When stacking pull requests, you may wish to do the following: + +1. Branch from develop to your branch (branch1), push commits onto it and open a pull request +2. Branch from your base branch (branch1) to your work branch (branch2), push commits and open a pull request configuring the base to be branch1, saying in the description that it is based on your other PR. +3. Merge the first PR using a merge commit otherwise your stacked PR will need a rebase. Github will automatically adjust the base branch of your other PR to be develop. + + +[1]: https://github.com/gotwarlost/istanbul/blob/master/ignoring-code-for-coverage.md diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/element-web-1.11.4/code_style.md new/element-web-1.11.5/code_style.md --- old/element-web-1.11.4/code_style.md 1970-01-01 01:00:00.000000000 +0100 +++ new/element-web-1.11.5/code_style.md 2022-09-13 14:05:08.000000000 +0200 @@ -0,0 +1,455 @@ +# Element Web/Desktop code style guide + +This code style applies to projects which the element-web team directly maintains or is reasonably +adjacent to. As of writing, these are: + +* element-desktop +* element-web +* matrix-react-sdk +* matrix-js-sdk + +Other projects might extend this code style for increased strictness. For example, matrix-events-sdk +has stricter code organization to reduce the maintenance burden. These projects will declare their code +style within their own repos. + +Note that some requirements will be layer-specific. Where the requirements don't make sense for the +project, they are used to the best of their ability, used in spirit, or ignored if not applicable, +in that order. + +## Guiding principles + +1. We want the lint rules to feel natural for most team members. No one should have to think too much + about the linter. +2. We want to stay relatively close to [industry standards](https://google.github.io/styleguide/tsguide.html) + to make onboarding easier. +3. We describe what good code looks like rather than point out bad examples. We do this to avoid + excessively punishing people for writing code which fails the linter. +4. When something isn't covered by the style guide, we come up with a reasonable rule rather than + claim that it "passes the linter". We update the style guide and linter accordingly. +5. While we aim to improve readability, understanding, and other aspects of the code, we deliberately + do not let solely our personal preferences drive decisions. +6. We aim to have an understandable guide. + +## Coding practices + +1. Lint rules enforce decisions made by this guide. The lint rules and this guide are kept in + perfect sync. +2. Commit messages are descriptive for the changes. When the project supports squash merging, + only the squashed commit needs to have a descriptive message. +3. When there is disagreement with a code style approved by the linter, a PR is opened against + the lint rules rather than making exceptions on the responsible code PR. +4. Rules which are intentionally broken (via eslint-ignore, @ts-ignore, etc) have a comment + included in the immediate vicinity for why. Determination of whether this is valid applies at + code review time. +5. When editing a file, nearby code is updated to meet the modern standards. "Nearby" is subjective, + but should be whatever is reasonable at review time. Such an example might be to update the + class's code style, but not the file's. + 1. These changes should be minor enough to include in the same commit without affecting a code + reviewer's job. + +## All code + +Unless otherwise specified, the following applies to all code: + +1. 120 character limit per line. Match existing code in the file if it is using a lower guide. +2. A tab/indentation is 4 spaces. +3. Newlines are Unix. +4. A file has a single empty line at the end. +5. Lines are trimmed of all excess whitespace, including blank lines. +6. Long lines are broken up for readability. + +## TypeScript / JavaScript {#typescript-javascript} + +1. Write TypeScript. Turn JavaScript into TypeScript when working in the area. +2. Use named exports. +3. Break long lines to appear as follows: + + ```typescript + // Function arguments + function doThing( + arg1: string, + arg2: string, + arg3: string, + ): boolean { + return !!arg1 + && !!arg2 + && !!arg3; + } + + // Calling a function + doThing( + "String 1", + "String 2", + "String 3", + ); + + // Reduce line verbosity when possible/reasonable + doThing( + "String1", "String 2", + "A much longer string 3", + ); + + // Chaining function calls + something.doThing() + .doOtherThing() + .doMore() + .somethingElse(it => + useIt(it) + ); + ``` +4. Use semicolons for block/line termination. + 1. Except when defining interfaces, classes, and non-arrow functions specifically. +5. When a statement's body is a single line, it may be written without curly braces, so long as the body is placed on + the same line as the statement. + + ```typescript + if (x) doThing(); + ``` +6. Blocks for `if`, `for`, `switch` and so on must have a space surrounding the condition, but not + within the condition. + + ```typescript + if (x) { + doThing(); + } + ``` +7. Mixing of logical operands requires brackets to explicitly define boolean logic. + + ```typescript + if ((a > b && b > c) || (d < e)) return true; + ``` +8. Ternaries use the same rules as `if` statements, plus the following: + + ```typescript + // Single line is acceptable + const val = a > b ? doThing() : doOtherThing(); + + // Multiline is also okay + const val = a > b + ? doThing() + : doOtherThing(); + + // Use brackets when using multiple conditions. + // Maximum 3 conditions, prefer 2 or less. + const val = (a > b && b > c) ? doThing() : doOtherThing(); + ``` +9. lowerCamelCase is used for function and variable naming. +10. UpperCamelCase is used for general naming. +11. Interface names should not be marked with an uppercase `I`. +12. One variable declaration per line. +13. If a variable is not receiving a value on declaration, its type must be defined. + + ```typescript + let errorMessage: Optional<string>; + ``` +14. Objects, arrays, enums and so on must have each line terminated with a comma: + + ```typescript + const obj = { + prop: 1, + else: 2, + }; + + const arr = [ + "one", + "two", + ]; + + enum Thing { + Foo, + Bar, + } + + doThing( + "arg1", + "arg2", + ); + ``` +15. Objects can use shorthand declarations, including mixing of types. + + ```typescript + { + room, + prop: this.prop, + } + // ... or ... + { room, prop: this.prop } + ``` +16. Object keys should always be non-strings when possible. + + ```typescript + { + property: "value", + "m.unavoidable": true, + [EventType.RoomMessage]: true, + } + ``` +17. Explicitly cast to a boolean. + + ```typescript + !!stringVar || Boolean(stringVar) + ``` +18. Use `switch` statements when checking against more than a few enum-like values. +19. Use `const` for constants, `let` for mutability. +20. Describe types exhaustively (ensure noImplictAny would pass). + 1. Notable exceptions are arrow functions used as parameters, when a void return type is + obvious, and when declaring and assigning a variable in the same line. +21. Declare member visibility (public/private/protected). +22. Private members are private and not prefixed unless required for naming conflicts. + 1. Convention is to use an underscore or the word "internal" to denote conflicted member names. + 2. "Conflicted" typically refers to a getter which wants the same name as the underlying variable. +23. Prefer readonly members over getters backed by a variable, unless an internal setter is required. +24. Prefer Interfaces for object definitions, and types for parameter-value-only declarations. + 1. Note that an explicit type is optional if not expected to be used outside of the function call, + unlike in this example: + + ```typescript + interface MyObject { + hasString: boolean; + } + + type Options = MyObject | string; + + function doThing(arg: Options) { + // ... + } + ``` +25. Variables/properties which are `public static` should also be `readonly` when possible. +26. Interface and type properties are terminated with semicolons, not commas. +27. Prefer arrow formatting when declaring functions for interfaces/types: + + ```typescript + interface Test { + myCallback: (arg: string) => Promise<void>; + } + ``` +28. Prefer a type definition over an inline type. For example, define an interface. +29. Always prefer to add types or declare a type over the use of `any`. Prefer inferred types + when they are not `any`. + 1. When using `any`, a comment explaining why must be present. +30. `import` should be used instead of `require`, as `require` does not have types. +31. Export only what can be reused. +32. Prefer a type like `Optional<X>` (`type Optional<T> = T | null | undefined`) instead + of truly optional parameters. + 1. A notable exception is when the likelihood of a bug is minimal, such as when a function + takes an argument that is more often not required than required. An example where the + `?` operator is inappropriate is when taking a room ID: typically the caller should + supply the room ID if it knows it, otherwise deliberately acknowledge that it doesn't + have one with `null`. + + ```typescript + function doThingWithRoom( + thing: string, + room: Optional<string>, // require the caller to specify + ) { + // ... + } + ``` +33. There should be approximately one interface, class, or enum per file unless the file is named + "types.ts", "global.d.ts", or ends with "-types.ts". + 1. The file name should match the interface, class, or enum name. +34. Bulk functions can be declared in a single file, though named as "foo-utils.ts" or "utils/foo.ts". +35. Imports are grouped by external module imports first, then by internal imports. +36. File ordering is not strict, but should generally follow this sequence: + 1. Licence header + 2. Imports + 3. Constants + 4. Enums + 5. Interfaces + 6. Functions + 7. Classes + 1. Public/protected/private static properties + 2. Public/protected/private properties + 3. Constructors + 4. Public/protected/private getters & setters + 5. Protected and abstract functions + 6. Public/private functions + 7. Public/protected/private static functions +37. Variable names should be noticeably unique from their types. For example, "str: string" instead + of "string: string". +38. Use double quotes to enclose strings. You may use single quotes if the string contains double quotes. + + ```typescript + const example1 = "simple string"; + const example2 = 'string containing "double quotes"'; + ``` +39. Prefer async-await to promise-chaining + + ```typescript + async function () { + const result = await anotherAsyncFunction(); + // ... + } + ``` + +## React + +Inheriting all the rules of TypeScript, the following additionally apply: + +1. Types for lifecycle functions are not required (render, componentDidMount, and so on). +2. Class components must always have a `Props` interface declared immediately above them. It can be + empty if the component accepts no props. +3. Class components should have an `State` interface declared immediately above them, but after `Props`. +4. Props and State should not be exported. Use `React.ComponentProps<typeof ComponentNameHere>` + instead. +5. One component per file, except when a component is a utility component specifically for the "primary" + component. The utility component should not be exported. +6. Exported constants, enums, interfaces, functions, etc must be separate from files containing components + or stores. +7. Stores should use a singleton pattern with a static instance property: + + ```typescript + class FooStore { + public static readonly instance = new FooStore(); + + // or if the instance can't be created eagerly: + private static _instance: FooStore; + public static get instance(): FooStore { + if (!FooStore._instance) { + FooStore._instance = new FooStore(); + } + return FooStore._instance; + } + } + ``` +8. Stores must support using an alternative MatrixClient and dispatcher instance. +9. Utilities which require JSX must be split out from utilities which do not. This is to prevent import + cycles during runtime where components accidentally include more of the app than they intended. +10. Interdependence between stores should be kept to a minimum. Break functions and constants out to utilities + if at all possible. +11. A component should only use CSS class names in line with the component name. + 1. When knowingly using a class name from another component, document it. +12. Break components over multiple lines like so: + + ```typescript + function render() { + return <Component + prop1="test" + prop2={this.state.variable} + />; + + // or + + return ( + <Component + prop1="test" + prop2={this.state.variable} + /> + ); + + // or if children are needed (infer parens usage) + + return <Component + prop1="test" + prop2={this.state.variable} + >{ _t("Short string here") }</Component>; + + + + return <Component + prop1="test" + prop2={this.state.variable} + > + { _t("Longer string here") } + </Component>; + } + ``` +13. Curly braces within JSX should be padded with a space, however properties on those components should not. + See above code example. +14. Functions used as properties should either be defined on the class or stored in a variable. They should not + be inline unless mocking/short-circuiting the value. +15. Prefer hooks (functional components) over class components. Be consistent with the existing area if unsure + which should be used. + 1. Unless the component is considered a "structure", in which case use classes. +16. Write more views than structures. Structures are chunks of functionality like MatrixChat while views are + isolated components. +17. Components should serve a single, or near-single, purpose. +18. Prefer to derive information from component properties rather than establish state. +19. Do not use `React.Component::forceUpdate`. + +## Stylesheets (\*.pcss = PostCSS + Plugins) + +Note: We use PostCSS + some plugins to process our styles. It looks like SCSS, but actually it is not. + +1. Class names must be prefixed with "mx_". +2. Class names should denote the component which defines them, followed by any context: + 1. mx_MyFoo + 2. mx_MyFoo_avatar + 3. mx_MyFoo_avatar--user +3. Use the `$font` and `$spacing` variables instead of manual values. +4. Keep indentation/nesting to a minimum. Maximum suggested nesting is 5 layers. +5. Use the whole class name instead of shortcuts: + + ```scss + .mx_MyFoo { + & .mx_MyFoo_avatar { // instead of &_avatar + // ... + } + } + ``` +6. Break multiple selectors over multiple lines this way: + + ```scss + .mx_MyFoo, + .mx_MyBar, + .mx_MyFooBar { + // ... + } + ``` +7. Non-shared variables should use $lowerCamelCase. Shared variables use $dashed-naming. +8. Overrides to Z indexes, adjustments of dimensions/padding with pixels, and so on should all be + documented for what the values mean: + + ```scss + .mx_MyFoo { + width: calc(100% - 12px); // 12px for read receipts + top: -2px; // visually centred vertically + z-index: 10; // above user avatar, but below dialogs + } + ``` +9. Avoid the use of `!important`. If necessary, add a comment. + +## Tests + +1. Tests must be written in TypeScript. +2. Jest mocks are declared below imports, but above everything else. +3. Use the following convention template: + + ```typescript + // Describe the class, component, or file name. + describe("FooComponent", () => { + // all test inspecific variables go here + + beforeEach(() => { + // exclude if not used. + }); + + afterEach(() => { + // exclude if not used. + }); + + // Use "it should..." terminology + it("should call the correct API", async () => { + // test-specific variables go here + + // function calls/state changes go here + + // expectations go here + }); + }); + + // If the file being tested is a utility class: + describe("foo-utils", () => { + describe("firstUtilFunction", () => { + it("should...", async () => { + // ... + }); + }); + + describe("secondUtilFunction", () => { + it("should...", async () => { + // ... + }); + }); + }); + ``` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/element-web-1.11.4/package.json new/element-web-1.11.5/package.json --- old/element-web-1.11.4/package.json 2022-08-31 17:44:24.000000000 +0200 +++ new/element-web-1.11.5/package.json 2022-09-13 14:05:08.000000000 +0200 @@ -1,6 +1,6 @@ { "name": "element-web", - "version": "1.11.4", + "version": "1.11.5", "description": "A feature-rich client for Matrix.org", "author": "New Vector Ltd.", "repository": { @@ -61,8 +61,8 @@ "gfm.css": "^1.1.2", "jsrsasign": "^10.5.25", "katex": "^0.12.0", - "matrix-js-sdk": "19.4.0", - "matrix-react-sdk": "3.53.0", + "matrix-js-sdk": "19.5.0", + "matrix-react-sdk": "3.54.0", "matrix-widget-api": "^1.0.0", "prop-types": "^15.7.2", "react": "17.0.2", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/element-web-1.11.4/release.sh new/element-web-1.11.5/release.sh --- old/element-web-1.11.4/release.sh 2022-08-31 17:44:24.000000000 +0200 +++ new/element-web-1.11.5/release.sh 2022-09-13 14:05:08.000000000 +0200 @@ -1,68 +1,9 @@ #!/bin/bash # # Script to perform a release of element-web. -# -# Requires github-changelog-generator; to install, do -# pip install git+https://github.com/matrix-org/github-changelog-generator.git set -e -orig_args=$@ - -# chomp any args starting with '-' as these need to go -# through to the release script and otherwise we'll get -# confused about what the version arg is. -while [[ "$1" == -* ]]; do - shift -done - -cd `dirname $0` - -for i in matrix-js-sdk matrix-react-sdk -do - echo "Checking version of $i..." - depver=`cat package.json | jq -r .dependencies[\"$i\"]` - latestver=`yarn info -s $i dist-tags.next` - if [ "$depver" != "$latestver" ] - then - echo "The latest version of $i is $latestver but package.json depends on $depver." - echo -n "Type 'u' to auto-upgrade, 'c' to continue anyway, or 'a' to abort:" - read resp - if [ "$resp" != "u" ] && [ "$resp" != "c" ] - then - echo "Aborting." - exit 1 - fi - if [ "$resp" == "u" ] - then - echo "Upgrading $i to $latestver..." - yarn add -E $i@$latestver - git add -u - git commit -m "Upgrade $i to $latestver" - fi - fi -done - -./node_modules/matrix-js-sdk/release.sh -n "$orig_args" - -release="${1#v}" -tag="v${release}" -prerelease=0 -# We check if this build is a prerelease by looking to -# see if the version has a hyphen in it. Crude, -# but semver doesn't support postreleases so anything -# with a hyphen is a prerelease. -echo $release | grep -q '-' && prerelease=1 +cd "$(dirname "$0")" -if [ $prerelease -eq 0 ] -then - # For a release, reset SDK deps back to the `develop` branch. - for i in matrix-js-sdk matrix-react-sdk - do - echo "Resetting $i to develop branch..." - yarn add github:matrix-org/$i#develop - git add -u - git commit -m "Reset $i back to develop branch" - done - git push origin develop -fi +./node_modules/matrix-js-sdk/release.sh "$@" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/element-web-1.11.4/release_config.yaml new/element-web-1.11.5/release_config.yaml --- old/element-web-1.11.4/release_config.yaml 2022-08-31 17:44:24.000000000 +0200 +++ new/element-web-1.11.5/release_config.yaml 2022-09-13 14:05:08.000000000 +0200 @@ -2,3 +2,5 @@ subprojects: matrix-react-sdk: includeByDefault: true + matrix-js-sdk: + includeByDefault: false diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/element-web-1.11.4/scripts/docker-package.sh new/element-web-1.11.5/scripts/docker-package.sh --- old/element-web-1.11.4/scripts/docker-package.sh 2022-08-31 17:44:24.000000000 +0200 +++ new/element-web-1.11.5/scripts/docker-package.sh 2022-09-13 14:05:08.000000000 +0200 @@ -7,8 +7,10 @@ DIR=$(dirname "$0") -# If we're not using custom SDKs and on a branch other than master, generate a version akin go develop.element.io -if [[ $USE_CUSTOM_SDKS == false ]] && [[ $BRANCH != 'master' ]] +# If the branch comes out as HEAD then we're probably checked out to a tag, so if the thing is *not* +# coming out as HEAD then we're on a branch. When we're on a branch, we want to resolve ourselves to +# a few SHAs rather than a version. +if [[ $BRANCH != HEAD && ! $BRANCH =~ heads/v.+ ]] then DIST_VERSION=$("$DIR"/get-version-from-git.sh) fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/element-web-1.11.4/src/i18n/strings/de_DE.json new/element-web-1.11.5/src/i18n/strings/de_DE.json --- old/element-web-1.11.4/src/i18n/strings/de_DE.json 2022-08-31 17:44:24.000000000 +0200 +++ new/element-web-1.11.5/src/i18n/strings/de_DE.json 2022-09-13 14:05:08.000000000 +0200 @@ -5,7 +5,7 @@ "Sign In": "Anmelden", "Create Account": "Konto erstellen", "Explore rooms": "R??ume erkunden", - "Unexpected error preparing the app. See console for details.": "Unerwarteter Fehler bei der Vorbereitung der App. Siehe in die Konsole f??r mehr Details.", + "Unexpected error preparing the app. See console for details.": "Unerwarteter Fehler bei der Vorbereitung der App; mehr Details in der Konsole.", "Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.": "Ung??ltige Konfiguration: Es kann nur eine der Optionen default_server_config, default_server_name oder default_hs_url angegeben werden.", "Invalid configuration: no default server specified.": "Ung??ltige Konfiguration: Es wurde kein Standardserver angegeben.", "The message from the parser is: %(message)s": "Die Nachricht des Parsers ist: %(message)s", @@ -21,7 +21,7 @@ "You can continue using your current browser, but some or all features may not work and the look and feel of the application may be incorrect.": "Du kannst deinen aktuellen Browser weiterhin verwenden. Es ist aber m??glich, dass nicht alles richtig funktioniert oder das Aussehen der App inkorrekt ist.", "I understand the risks and wish to continue": "Ich verstehe die Risiken und m??chte fortfahren", "Your Element is misconfigured": "Dein Element ist falsch konfiguriert", - "Your Element configuration contains invalid JSON. Please correct the problem and reload the page.": "Deine Elementkonfiguration enth??lt ung??ltiges JSON. Bitte korrigiere das Problem und lade die Seite neu.", + "Your Element configuration contains invalid JSON. Please correct the problem and reload the page.": "Deine Element-Konfiguration enth??lt ung??ltiges JSON. Bitte korrigiere das Problem und lade die Seite neu.", "Download Completed": "Herunterladen fertiggestellt", "Open": "??ffnen", "%(brand)s uses advanced browser features which aren't supported by your current browser.": "%(brand)s verwendet erweiterte Browserfunktionen, die von deinem Browser nicht unterst??tzt werden.", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/element-web-1.11.4/src/vector/jitsi/index.ts new/element-web-1.11.5/src/vector/jitsi/index.ts --- old/element-web-1.11.4/src/vector/jitsi/index.ts 2022-08-31 17:44:24.000000000 +0200 +++ new/element-web-1.11.5/src/vector/jitsi/index.ts 2022-09-13 14:05:08.000000000 +0200 @@ -1,5 +1,5 @@ /* -Copyright 2020 New Vector Ltd. +Copyright 2020-2022 New Vector Ltd. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -18,8 +18,11 @@ import { IOpenIDCredentials, IWidgetApiRequest, + IWidgetApiRequestData, + IWidgetApiResponseData, VideoConferenceCapabilities, WidgetApi, + WidgetApiAction, } from "matrix-widget-api"; import { ElementWidgetActions } from "matrix-react-sdk/src/stores/widgets/ElementWidgetActions"; import { logger } from "matrix-js-sdk/src/logger"; @@ -58,9 +61,7 @@ let meetApi: any; // JitsiMeetExternalAPI let skipOurWelcomeScreen = false; -const ack = (ev: CustomEvent<IWidgetApiRequest>) => widgetApi.transport.reply(ev.detail, {}); - -(async function() { +const setupCompleted = (async () => { try { // Queue a config.json lookup asap, so we can use it later on. We want this to be concurrent with // other setup work and therefore do not block. @@ -90,24 +91,88 @@ } // Set this up as early as possible because Element will be hitting it almost immediately. - let readyPromise: Promise<[void, void]>; + let widgetApiReady: Promise<void>; if (parentUrl && widgetId) { const parentOrigin = new URL(qsParam('parentUrl')).origin; widgetApi = new WidgetApi(qsParam("widgetId"), parentOrigin); + + widgetApiReady = new Promise<void>(resolve => widgetApi.once("ready", resolve)); widgetApi.requestCapabilities(VideoConferenceCapabilities); - readyPromise = Promise.all([ - new Promise<void>(resolve => { - widgetApi.once(`action:${ElementWidgetActions.ClientReady}`, ev => { - ev.preventDefault(); - resolve(); - widgetApi.transport.reply(ev.detail, {}); - }); - }), - new Promise<void>(resolve => { - widgetApi.once("ready", () => resolve()); - }), - ]); widgetApi.start(); + + const handleAction = ( + action: WidgetApiAction, + handler: (request: IWidgetApiRequestData) => void, + ): void => { + widgetApi.on(`action:${action}`, async (ev: CustomEvent<IWidgetApiRequest>) => { + ev.preventDefault(); + await setupCompleted; + + let response: IWidgetApiResponseData; + try { + await handler(ev.detail.data); + response = {}; + } catch (e) { + if (e instanceof Error) { + response = { error: { message: e.message } }; + } else { + throw e; + } + } + + await widgetApi.transport.reply(ev.detail, response); + }); + }; + + handleAction(ElementWidgetActions.JoinCall, async ({ audioInput, videoInput }) => { + joinConference(audioInput as string | null, videoInput as string | null); + }); + handleAction(ElementWidgetActions.HangupCall, async ({ force }) => { + if (force === true) { + meetApi?.dispose(); + notifyHangup(); + meetApi = null; + closeConference(); + } else { + meetApi?.executeCommand('hangup'); + } + }); + handleAction(ElementWidgetActions.MuteAudio, async () => { + if (meetApi && !await meetApi.isAudioMuted()) { + meetApi.executeCommand('toggleAudio'); + } + }); + handleAction(ElementWidgetActions.UnmuteAudio, async () => { + if (meetApi && await meetApi.isAudioMuted()) { + meetApi.executeCommand('toggleAudio'); + } + }); + handleAction(ElementWidgetActions.MuteVideo, async () => { + if (meetApi && !await meetApi.isVideoMuted()) { + meetApi.executeCommand('toggleVideo'); + } + }); + handleAction(ElementWidgetActions.UnmuteVideo, async () => { + if (meetApi && await meetApi.isVideoMuted()) { + meetApi.executeCommand('toggleVideo'); + } + }); + handleAction(ElementWidgetActions.TileLayout, async () => { + meetApi?.executeCommand('setTileView', true); + }); + handleAction(ElementWidgetActions.SpotlightLayout, async () => { + meetApi?.executeCommand('setTileView', false); + }); + handleAction(ElementWidgetActions.StartLiveStream, async ({ rtmpStreamKey }) => { + if (!meetApi) throw new Error("Conference not joined"); + meetApi.executeCommand('startRecording', { + mode: 'stream', + // this looks like it should be rtmpStreamKey but we may be on too old + // a version of jitsi meet + //rtmpStreamKey, + youtubeStreamKey: rtmpStreamKey, + }); + }); } else { logger.warn("No parent URL or no widget ID - assuming no widget API is available"); } @@ -136,7 +201,7 @@ toggleConferenceVisibility(skipOurWelcomeScreen); if (widgetApi) { - await readyPromise; + await widgetApiReady; // See https://github.com/matrix-org/prosody-mod-auth-matrix-user-verification if (jitsiAuth === JITSI_OPENIDTOKEN_JWT_AUTH) { @@ -144,99 +209,6 @@ openIdToken = await widgetApi.requestOpenIDConnectToken(); logger.log("Got OpenID Connect token"); } - - widgetApi.on(`action:${ElementWidgetActions.JoinCall}`, - (ev: CustomEvent<IWidgetApiRequest>) => { - ev.preventDefault(); - const { audioDevice, videoDevice } = ev.detail.data; - joinConference(audioDevice as string | null, videoDevice as string | null); - ack(ev); - }, - ); - widgetApi.on(`action:${ElementWidgetActions.HangupCall}`, - (ev: CustomEvent<IWidgetApiRequest>) => { - ev.preventDefault(); - meetApi?.executeCommand('hangup'); - ack(ev); - }, - ); - widgetApi.on(`action:${ElementWidgetActions.ForceHangupCall}`, - (ev: CustomEvent<IWidgetApiRequest>) => { - ev.preventDefault(); - meetApi?.dispose(); - notifyHangup(); - meetApi = null; - closeConference(); - ack(ev); - }, - ); - widgetApi.on(`action:${ElementWidgetActions.MuteAudio}`, - async (ev: CustomEvent<IWidgetApiRequest>) => { - ev.preventDefault(); - if (meetApi && !await meetApi.isAudioMuted()) { - meetApi.executeCommand('toggleAudio'); - } - ack(ev); - }, - ); - widgetApi.on(`action:${ElementWidgetActions.UnmuteAudio}`, - async (ev: CustomEvent<IWidgetApiRequest>) => { - ev.preventDefault(); - if (meetApi && await meetApi.isAudioMuted()) { - meetApi.executeCommand('toggleAudio'); - } - ack(ev); - }, - ); - widgetApi.on(`action:${ElementWidgetActions.MuteVideo}`, - async (ev: CustomEvent<IWidgetApiRequest>) => { - ev.preventDefault(); - if (meetApi && !await meetApi.isVideoMuted()) { - meetApi.executeCommand('toggleVideo'); - } - ack(ev); - }, - ); - widgetApi.on(`action:${ElementWidgetActions.UnmuteVideo}`, - async (ev: CustomEvent<IWidgetApiRequest>) => { - ev.preventDefault(); - if (meetApi && await meetApi.isVideoMuted()) { - meetApi.executeCommand('toggleVideo'); - } - ack(ev); - }, - ); - widgetApi.on(`action:${ElementWidgetActions.TileLayout}`, - (ev: CustomEvent<IWidgetApiRequest>) => { - ev.preventDefault(); - meetApi?.executeCommand('setTileView', true); - ack(ev); - }, - ); - widgetApi.on(`action:${ElementWidgetActions.SpotlightLayout}`, - (ev: CustomEvent<IWidgetApiRequest>) => { - ev.preventDefault(); - meetApi?.executeCommand('setTileView', false); - ack(ev); - }, - ); - widgetApi.on(`action:${ElementWidgetActions.StartLiveStream}`, - (ev: CustomEvent<IWidgetApiRequest>) => { - ev.preventDefault(); - if (meetApi) { - meetApi.executeCommand('startRecording', { - mode: 'stream', - // this looks like it should be rtmpStreamKey but we may be on too old - // a version of jitsi meet - //rtmpStreamKey: ev.detail.data.rtmpStreamKey, - youtubeStreamKey: ev.detail.data.rtmpStreamKey, - }); - ack(ev); - } else { - widgetApi.transport.reply(ev.detail, { error: { message: "Conference not joined" } }); - } - }, - ); } // Now that everything should be set up, skip to the Jitsi splash screen if needed @@ -245,13 +217,6 @@ } enableJoinButton(); // always enable the button - - // Inform the client that we're ready to receive events - try { - await widgetApi?.transport.send(ElementWidgetActions.WidgetReady, {}); - } catch (e) { - logger.error(e); - } } catch (e) { logger.error("Error setting up Jitsi widget", e); document.getElementById("widgetActionContainer").innerText = "Failed to load Jitsi widget"; @@ -346,11 +311,11 @@ } // event handler bound in HTML -// An audio device of undefined instructs Jitsi to start unmuted with whatever -// audio device it can find, while a device of null instructs it to start muted, -// and a non-nullish device specifies the label of a specific device to use. -// Same for video devices. -function joinConference(audioDevice?: string | null, videoDevice?: string | null) { +// An audio input of undefined instructs Jitsi to start unmuted with whatever +// audio input it can find, while an input of null instructs it to start muted, +// and a non-nullish input specifies the label of a specific device to use. +// Same for video inputs. +function joinConference(audioInput?: string | null, videoInput?: string | null) { let jwt; if (jitsiAuth === JITSI_OPENIDTOKEN_JWT_AUTH) { if (!openIdToken?.access_token) { // eslint-disable-line camelcase @@ -376,8 +341,8 @@ parentNode: document.querySelector("#jitsiContainer"), roomName: conferenceId, devices: { - audioInput: audioDevice, - videoInput: videoDevice, + audioInput, + videoInput, }, userInfo: { displayName, @@ -392,8 +357,8 @@ configOverwrite: { subject: roomName, startAudioOnly, - startWithAudioMuted: audioDevice === null, - startWithVideoMuted: videoDevice === null, + startWithAudioMuted: audioInput === null, + startWithVideoMuted: videoInput === null, // Request some log levels for inclusion in rageshakes // Ideally we would capture all possible log levels, but this can // cause Jitsi Meet to try to post various circular data structures diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/element-web-1.11.4/yarn.lock new/element-web-1.11.5/yarn.lock --- old/element-web-1.11.4/yarn.lock 2022-08-31 17:44:24.000000000 +0200 +++ new/element-web-1.11.5/yarn.lock 2022-09-13 14:05:08.000000000 +0200 @@ -7961,10 +7961,10 @@ resolved "https://registry.yarnpkg.com/matrix-events-sdk/-/matrix-events-sdk-0.0.1-beta.7.tgz#5ffe45eba1f67cc8d7c2377736c728b322524934" integrity sha512-9jl4wtWanUFSy2sr2lCjErN/oC8KTAtaeaozJtrgot1JiQcEI4Rda9OLgQ7nLKaqb4Z/QUx/fR3XpDzm5Jy1JA== -matrix-js-sdk@19.4.0: - version "19.4.0" - resolved "https://registry.yarnpkg.com/matrix-js-sdk/-/matrix-js-sdk-19.4.0.tgz#ea333ec3b7893ea953bd1ac00c0ce1108fffc0d0" - integrity sha512-B8Mm4jCsCHaMaChcdM3VhZDVKrn0nMSDtYvHmS15Iu8Pe0G4qmIpk2AoADBAL9U9yN3pCqvs3TDXaQhM8UxRRA== +matrix-js-sdk@19.5.0: + version "19.5.0" + resolved "https://registry.yarnpkg.com/matrix-js-sdk/-/matrix-js-sdk-19.5.0.tgz#debc8e92b2e73204c8d5bc9a128a2d0ec0a92ade" + integrity sha512-WTmXMwyhGjUVv3eR71P9wdZj4qqNPgzg9Ud7V6kB3avhZJTZlIpNdHuldXXUdPJ8WTDKY+/yDtEFLIg8pj2Q8A== dependencies: "@babel/runtime" "^7.12.5" another-json "^0.2.0" @@ -7985,10 +7985,10 @@ dependencies: expect "^28.1.0" -matrix-react-sdk@3.53.0: - version "3.53.0" - resolved "https://registry.yarnpkg.com/matrix-react-sdk/-/matrix-react-sdk-3.53.0.tgz#eb102d0c9f740735a9385bf8dddc9a27f3ec6bab" - integrity sha512-852TdcXKEQsBu9jTCDvXRdkk8czhOzpPcUvqlJbJiFy5jFTRMCsUqYqBYuFip09/e61q8KHMfKfOWslyT8DKFw== +matrix-react-sdk@3.54.0: + version "3.54.0" + resolved "https://registry.yarnpkg.com/matrix-react-sdk/-/matrix-react-sdk-3.54.0.tgz#fadff4178a3cac87542b15a760c12bec2b41a00d" + integrity sha512-RpbXNUA7nRov67FP/bXZkuJR2z59vmkJ10HPKoOl2aj0ry1nvrjWItIVcr+JVe51tGzV/quFm1NVFd9Z3x7lsQ== dependencies: "@babel/runtime" "^7.12.5" "@matrix-org/analytics-events" "^0.2.0" @@ -8028,7 +8028,7 @@ maplibre-gl "^1.15.2" matrix-encrypt-attachment "^1.0.3" matrix-events-sdk "^0.0.1-beta.7" - matrix-js-sdk "19.4.0" + matrix-js-sdk "19.5.0" matrix-widget-api "^1.0.0" minimist "^1.2.5" opus-recorder "^8.0.3" ++++++ jitsi_external_api.min.js ++++++ --- /var/tmp/diff_new_pack.Em8AFH/_old 2022-09-21 14:44:24.374070776 +0200 +++ /var/tmp/diff_new_pack.Em8AFH/_new 2022-09-21 14:44:24.378070786 +0200 @@ -1,5 +1,5 @@ /*! For license information please see external_api.min.js.LICENSE.txt */ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.JitsiMeetExternalAPI=t():e.JitsiMeetExternalAPI=t()}(self,(function(){return(()=>{var e={754:(e,t,n)=>{"use strict";n.d(t,{default:()=>I});var i=n(620),r=n.n(i);class s extends i{constructor(){var e,t;super(...arguments),t={},(e="_storage")in this?Object.defineProperty(this,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):this[e]=t}clear(){this._storage={}}get length(){return Object.keys(this._storage).length}getItem(e){return this._storage[e]}setItem(e,t){this._storage[e]=t}removeItem(e){delete this._storage[e]}key(e){const t=Object.keys(this._storage);if(!(t.length<=e))return t[e]}serialize(){return JSON.stringify(this._storage)}}const o=new class extends i{constructor(){super();try{this._storage=window.localStorage,this._localStorageDisabled=!1}catch(e){}this._storage||(console.warn("Local storage is disabled ."),this._storage=new s,this._localStorageDisabled=!0)}isLocalStorageDisabled(){return this._localStorageDisabled}clear(){this._storage.clear(),this.emit("changed")}get length(){return this._storage.length}getItem(e){return this._storage.getItem(e)}setItem(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this._storage.setItem(e,t),n||this.emit("changed")}removeItem(e){this._storage.removeItem(e),this.emit("changed")}key(e){return this._storage.key(e)}serialize(){if(this.isLocalStorageDisabled())return this._storage.serialize();const e=this._storage.length,t={};for(let n=0;n<e;n++){const e=this._storage.key(n);t[e]=this._storage.getItem(e)}return JSON.stringify(t)}};var a=n(571);function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";console.error(t,e),window.onerror&&window.onerror(t,null,null,null,e)}n(415);const l=["__proto__","constructor","prototype"];function d(e){const t=new RegExp("^([a-z][a-z0-9\\.\\+-]*:)+","gi"),n=t.exec(e);if(n){let i=n[n.length-1].toLowerCase();"http:"!==i&&"https:"!==i&&(i="https:"),(e=e.substring(t.lastIndex)).startsWith("//")&&(e=i+e)}return e}function h(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=[];for(const n in e)try{t.push(`${n}=${encodeURIComponent(JSON.stringify(e[n]))}`)}catch(e){console.warn(`Error encoding ${n}: ${e}`)}return t}function u(e){const t={toString:p};let n,i,r;if(e=e.replace(/\s/g,""),n=new RegExp("^([a-z][a-z0-9\\.\\+-]*:)","gi"),i=n.exec(e),i&&(t.protocol=i[1].toLowerCase(),e=e.substring(n.lastIndex)),n=new RegExp("^(//[^/?#]+)","gi"),i=n.exec(e),i){let r=i[1].substring(2);e=e.substring(n.lastIndex);const s=r.indexOf("@");-1!==s&&(r=r.substring(s+1)),t.host=r;const o=r.lastIndexOf(":");-1!==o&&(t.port=r.substring(o+1),r=r.substring(0,o)),t.hostname=r}if(n=new RegExp("^([^?#]*)","gi"),i=n.exec(e),i&&(r=i[1],e=e.substring(n.lastIndex)),r?r.startsWith("/")||(r=`/${r}`):r="/",t.pathname=r,e.startsWith("?")){let n=e.indexOf("#",1);-1===n&&(n =e.length),t.search=e.substring(0,n),e=e.substring(n)}else t.search="";return t.hash=e.startsWith("#")?e:"",t}function p(e){const{hash:t,host:n,pathname:i,protocol:r,search:s}=e||this;let o="";return r&&(o+=r),n&&(o+=`//${n}`),o+=i||"/",s&&(o+=s),t&&(o+=t),o}function g(e){let t;t=e.serverURL&&e.room?new URL(e.room,e.serverURL).toString():e.room?e.room:e.url||"";const n=u(d(t));if(!n.protocol){let t=e.protocol||e.scheme;t&&(t.endsWith(":")||(t+=":"),n.protocol=t)}let{pathname:i}=n;if(!n.host){const t=e.domain||e.host||e.hostname;if(t){const{host:e,hostname:r,pathname:s,port:o}=u(d(`org.jitsi.meet://${t}`));e&&(n.host=e,n.hostname=r,n.port=o),"/"===i&&"/"!==s&&(i=s)}}const r=e.roomName||e.room;!r||!n.pathname.endsWith("/")&&n.pathname.endsWith(`/${r}`)||(i.endsWith("/")||(i+="/"),i+=r),n.pathname=i;const{jwt:s}=e;if(s){let{search:e}=n;-1===e.indexOf("?jwt=")&&-1===e.indexOf("&jwt=")&&(e.startsWith("?")||(e=`?${e}`),1===e.length||(e+="&"),e+=`jwt=${s}`,n.search=e)}let{hash:o}=n;for(con st t of["config","interfaceConfig","devices","userInfo","appData"]){const n=h(e[`${t}Overwrite`]||e[t]||e[`${t}Override`]);if(n.length){let e=`${t}.${n.join(`&${t}.`)}`;o.length?e=`&${e}`:o="#",o+=e}}return n.hash=o,n.toString()||void 0}const f={window:window.opener||window.parent},m="message";class v{constructor(){let{postisOptions:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.postis=function(e){var t,n=e.scope,i=e.window,r=e.windowForEventListening||window,s=e.allowedOrigin,o={},a=[],c={},l=!1,d="__ready__",h=function(e){var t;try{t=JSON.parse(e.data)}catch(e){return}if((!s||e.origin===s)&&t&&t.postis&&t.scope===n){var i=o[t.method];if(i)for(var r=0;r<i.length;r++)i[r].call(null,t.params);else c[t.method]=c[t.method]||[],c[t.method].push(t.params)}};r.addEventListener("message",h,!1);var u={listen:function(e,t){o[e]=o[e]||[],o[e].push(t);var n=c[e];if(n)for(var i=o[e],r=0;r<i.length;r++)for(var s=0;s<n.length;s++)i[r].call(null,n[s]);delete c[e]},send:function( e){var t=e.method;(l||e.method===d)&&i&&"function"==typeof i.postMessage?i.postMessage(JSON.stringify({postis:!0,scope:n,method:t,params:e.params}),"*"):a.push(e)},ready:function(e){l?e():setTimeout((function(){u.ready(e)}),50)},destroy:function(e){clearInterval(t),l=!1,r&&"function"==typeof r.removeEventListener&&r.removeEventListener("message",h),e&&e()}},p=+new Date+Math.random()+"";return t=setInterval((function(){u.send({method:d,params:p})}),50),u.listen(d,(function(e){if(e===p){clearInterval(t),l=!0;for(var n=0;n<a.length;n++)u.send(a[n]);a=[]}else u.send({method:d,params:e})})),u}({...f,...e}),this._receiveCallback=()=>{},this.postis.listen(m,(e=>this._receiveCallback(e)))}dispose(){this.postis.destroy()}send(e){this.postis.send({method:m,params:e})}setReceiveCallback(e){this._receiveCallback=e}}const y="request",_="response";class b{constructor(){let{backend:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._listeners=new Map,this._requestID=0,this._response Handlers=new Map,this._unprocessedMessages=new Set,this.addListener=this.on,e&&this.setBackend(e)}_disposeBackend(){this._backend&&(this._backend.dispose(),this._backend=null)}_onMessageReceived(e){if(e.type===_){const t=this._responseHandlers.get(e.id);t&&(t(e),this._responseHandlers.delete(e.id))}else e.type===y?this.emit("request",e.data,((t,n)=>{this._backend.send({type:_,error:n,id:e.id,result:t})})):this.emit("event",e.data)}dispose(){this._responseHandlers.clear(),this._unprocessedMessages.clear(),this.removeAllListeners(),this._disposeBackend()}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];const r=this._listeners.get(e);let s=!1;return r&&r.size&&r.forEach((e=>{s=e(...n)||s})),s||this._unprocessedMessages.add(n),s}on(e,t){let n=this._listeners.get(e);return n||(n=new Set,this._listeners.set(e,n)),n.add(t),this._unprocessedMessages.forEach((e=>{t(...e)&&this._unprocessedMessages.delete(e)})),this}removeAllListeners(e){return e?this. _listeners.delete(e):this._listeners.clear(),this}removeListener(e,t){const n=this._listeners.get(e);return n&&n.delete(t),this}sendEvent(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._backend&&this._backend.send({type:"event",data:e})}sendRequest(e){if(!this._backend)return Promise.reject(new Error("No transport backend defined!"));this._requestID++;const t=this._requestID;return new Promise(((n,i)=>{this._responseHandlers.set(t,(e=>{let{error:t,result:r}=e;void 0!==r?n(r):i(void 0!==t?t:new Error("Unexpected response format!"))})),this._backend.send({type:y,data:e,id:t})}))}setBackend(e){this._disposeBackend(),this._backend=e,this._backend.setReceiveCallback(this._onMessageReceived.bind(this))}}(function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"hash";const i="search"===n?e.search:e.hash,r={},s=i&&i.substr(1).split("&")||[];if("hash"===n&&1===s.length){const e=s[0];if(e.starts With("/")&&1===e.split("&").length)return r}return s.forEach((e=>{const n=e.split("="),i=n[0];if(!i||i.split(".").some((e=>l.includes(e))))return;let s;try{if(s=n[1],!t){const e=decodeURIComponent(s).replace(/\\&/,"&");s="undefined"===e?void 0:a.parse(e)}}catch(e){return void c(e,`Failed to parse URL parameter value: ${String(s)}`)}r[i]=s})),r})(window.location).jitsi_meet_external_api_id;(window.JitsiMeetJS||(window.JitsiMeetJS={}),window.JitsiMeetJS.app||(window.JitsiMeetJS.app={}),window.JitsiMeetJS.app).setExternalTransportBackend=e=>undefined.setBackend(e);var w=n(860);const L=n.n(w)().getLogger("modules/API/external/functions.js");function x(e,t){return e.sendRequest({type:"devices",name:"setDevice",device:t})}const E=["css/all.css","libs/alwaysontop.min.js"],C={answerKnockingParticipant:"answer-knocking-participant",approveVideo:"approve-video",askToUnmute:"ask-to-unmute",avatarUrl:"avatar-url",cancelPrivateChat:"cancel-private-chat",displayName:"display-name",e2eeKey:"e2ee-k ey",email:"email",toggleLobby:"toggle-lobby",hangup:"video-hangup",initiatePrivateChat:"initiate-private-chat",kickParticipant:"kick-participant",muteEveryone:"mute-everyone",overwriteConfig:"overwrite-config",password:"password",pinParticipant:"pin-participant",rejectParticipant:"reject-participant",resizeLargeVideo:"resize-large-video",sendChatMessage:"send-chat-message",sendEndpointTextMessage:"send-endpoint-text-message",sendTones:"send-tones",setFollowMe:"set-follow-me",setLargeVideoParticipant:"set-large-video-participant",setMediaEncryptionKey:"set-media-encryption-key",setParticipantVolume:"set-participant-volume",setTileView:"set-tile-view",setVideoQuality:"set-video-quality",startRecording:"start-recording",startShareVideo:"start-share-video",stopRecording:"stop-recording",stopShareVideo:"stop-share-video",subject:"subject",submitFeedback:"submit-feedback",toggleAudio:"toggle-audio",toggleCamera:"toggle-camera",toggleCameraMirror:"toggle-camera-mirror",toggleChat:"toggle-c hat",toggleE2EE:"toggle-e2ee",toggleFilmStrip:"toggle-film-strip",toggleModeration:"toggle-moderation",toggleRaiseHand:"toggle-raise-hand",toggleShareAudio:"toggle-share-audio",toggleShareScreen:"toggle-share-screen",toggleTileView:"toggle-tile-view",toggleVirtualBackgroundDialog:"toggle-virtual-background",toggleVideo:"toggle-video"},k={"avatar-changed":"avatarChanged","audio-availability-changed":"audioAvailabilityChanged","audio-mute-status-changed":"audioMuteStatusChanged","browser-support":"browserSupport","camera-error":"cameraError","chat-updated":"chatUpdated","content-sharing-participants-changed":"contentSharingParticipantsChanged","data-channel-opened":"dataChannelOpened","device-list-changed":"deviceListChanged","display-name-change":"displayNameChange","email-change":"emailChange","error-occurred":"errorOccurred","endpoint-text-message-received":"endpointTextMessageReceived","feedback-submitted":"feedbackSubmitted","feedback-prompt-displayed":"feedbackPromptDisplayed"," filmstrip-display-changed":"filmstripDisplayChanged","incoming-message":"incomingMessage","knocking-participant":"knockingParticipant",log:"log","mic-error":"micError","moderation-participant-approved":"moderationParticipantApproved","moderation-participant-rejected":"moderationParticipantRejected","moderation-status-changed":"moderationStatusChanged","mouse-enter":"mouseEnter","mouse-leave":"mouseLeave","mouse-move":"mouseMove","outgoing-message":"outgoingMessage","participant-joined":"participantJoined","participant-kicked-out":"participantKickedOut","participant-left":"participantLeft","participant-role-changed":"participantRoleChanged","password-required":"passwordRequired","proxy-connection-event":"proxyConnectionEvent","raise-hand-updated":"raiseHandUpdated","recording-link-available":"recordingLinkAvailable","recording-status-changed":"recordingStatusChanged","video-ready-to-close":"readyToClose","video-conference-joined":"videoConferenceJoined","video-conference-left":"video ConferenceLeft","video-availability-changed":"videoAvailabilityChanged","video-mute-status-changed":"videoMuteStatusChanged","video-quality-changed":"videoQualityChanged","screen-sharing-status-changed":"screenSharingStatusChanged","dominant-speaker-changed":"dominantSpeakerChanged","subject-change":"subjectChange","suspend-detected":"suspendDetected","tile-view-changed":"tileViewChanged","toolbar-button-clicked":"toolbarButtonClicked"};let O=0;function S(e,t){e._numberOfParticipants+=t}function R(e){let t;return"string"==typeof e&&null!==String(e).match(/([0-9]*\.?[0-9]+)(em|pt|px|%)$/)?t=e:"number"==typeof e&&(t=`${e}px`),t}class I extends(r()){constructor(e){super();for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];const{roomName:r="",width:s="100%",height:a="100%",parentNode:c=document.body,configOverwrite:l={},interfaceConfigOverwrite:d={},jwt:h,onload:u,invitees:p,devices:f,userInfo:m,e2eeKey:y}=function(e){if(!e.length)return{};switch(typeof e[ 0]){case"string":case"undefined":{const[t,n,i,r,s,o,a,c]=e;return{roomName:t,width:n,height:i,parentNode:r,configOverwrite:s,interfaceConfigOverwrite:o,jwt:a,onload:c}}case"object":return e[0];default:throw new Error("Can't parse the arguments!")}}(n),_=o.getItem("jitsiLocalStorage");this._parentNode=c,this._url=function(e){return g({...arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},url:`https://${e}/#jitsi_meet_external_api_id=${O}`})}(e,{configOverwrite:l,interfaceConfigOverwrite:d,jwt:h,roomName:r,devices:f,userInfo:m,appData:{localStorageContent:_}}),this._createIFrame(a,s,u),this._transport=new b({backend:new v({postisOptions:{allowedOrigin:new URL(this._url).origin,scope:`jitsi_meet_external_api_${O}`,window:this._frame.contentWindow}})}),Array.isArray(p)&&p.length>0&&this.invite(p),this._tmpE2EEKey=y,this._isLargeVideoVisible=!0,this._numberOfParticipants=0,this._participants={},this._myUserID=void 0,this._onStageParticipant=void 0,this._setupListeners(),O++}_creat eIFrame(e,t,n){const i=`jitsiConferenceFrame${O}`;this._frame=document.createElement("iframe"),this._frame.allow="camera; microphone; display-capture; autoplay; clipboard-write",this._frame.src=this._url,this._frame.name=i,this._frame.id=i,this._setSize(e,t),this._frame.setAttribute("allowFullScreen","true"),this._frame.style.border=0,n&&(this._frame.onload=n),this._frame=this._parentNode.appendChild(this._frame)}_getAlwaysOnTopResources(){const e=this._frame.contentWindow,t=e.document;let n="";const i=t.querySelector("base");if(i&&i.href)n=i.href;else{const{protocol:t,host:i}=e.location;n=`${t}//${i}`}return E.map((e=>new URL(e,n).href))}_getFormattedDisplayName(e){const{formattedDisplayName:t}=this._participants[e]||{};return t}_getOnStageParticipant(){return this._onStageParticipant}_getLargeVideo(){const e=this.getIFrame();if(this._isLargeVideoVisible&&e&&e.contentWindow&&e.contentWindow.document)return e.contentWindow.document.getElementById("largeVideo")}_getParticipantVideo(e ){const t=this.getIFrame();if(t&&t.contentWindow&&t.contentWindow.document)return void 0===e||e===this._myUserID?t.contentWindow.document.getElementById("localVideo_container"):t.contentWindow.document.querySelector(`#participant_${e} video`)}_setSize(e,t){const n=R(e),i=R(t);void 0!==n&&(this._height=e,this._frame.style.height=n),void 0!==i&&(this._width=t,this._frame.style.width=i)}_setupListeners(){this._transport.on("event",(e=>{let{name:t,...n}=e;const i=n.id;switch(t){case"video-conference-joined":void 0!==this._tmpE2EEKey&&(this.executeCommand(C.e2eeKey,this._tmpE2EEKey),this._tmpE2EEKey=void 0),this._myUserID=i,this._participants[i]={avatarURL:n.avatarURL};case"participant-joined":this._participants[i]=this._participants[i]||{},this._participants[i].displayName=n.displayName,this._participants[i].formattedDisplayName=n.formattedDisplayName,S(this,1);break;case"participant-left":S(this,-1),delete this._participants[i];break;case"display-name-change":{const e=this._participant s[i];e&&(e.displayName=n.displayname,e.formattedDisplayName=n.formattedDisplayName);break}case"email-change":{const e=this._participants[i];e&&(e.email=n.email);break}case"avatar-changed":{const e=this._participants[i];e&&(e.avatarURL=n.avatarURL);break}case"on-stage-participant-changed":this._onStageParticipant=i,this.emit("largeVideoChanged");break;case"large-video-visibility-changed":this._isLargeVideoVisible=n.isVisible,this.emit("largeVideoChanged");break;case"video-conference-left":S(this,-1),delete this._participants[this._myUserID];break;case"video-quality-changed":this._videoQuality=n.videoQuality;break;case"local-storage-changed":return o.setItem("jitsiLocalStorage",n.localStorageContent),!0}const r=k[t];return!!r&&(this.emit(r,n),!0)}))}addEventListener(e,t){this.on(e,t)}addEventListeners(e){for(const t in e)this.addEventListener(t,e[t])}captureLargeVideoScreenshot(){return this._transport.sendRequest({name:"capture-largevideo-screenshot"})}dispose(){this.emit("_willDispo se"),this._transport.dispose(),this.removeAllListeners(),this._frame&&this._frame.parentNode&&this._frame.parentNode.removeChild(this._frame)}executeCommand(e){if(e in C){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];this._transport.sendEvent({data:n,name:C[e]})}else console.error("Not supported command name.")}executeCommands(e){for(const t in e)this.executeCommand(t,e[t])}getAvailableDevices(){return function(e){return e.sendRequest({type:"devices",name:"getAvailableDevices"}).catch((e=>(L.error(e),{})))}(this._transport)}getContentSharingParticipants(){return this._transport.sendRequest({name:"get-content-sharing-participants"})}getCurrentDevices(){return function(e){return e.sendRequest({type:"devices",name:"getCurrentDevices"}).catch((e=>(L.error(e),{})))}(this._transport)}getCustomAvatarBackgrounds(){return this._transport.sendRequest({name:"get-custom-avatar-backgrounds"})}getLivestreamUrl(){return this._transport.sendRequest({name:"get-liv estream-url"})}getParticipantsInfo(){const e=Object.keys(this._participants),t=Object.values(this._participants);return t.forEach(((t,n)=>{t.participantId=e[n]})),t}getVideoQuality(){return this._videoQuality}isAudioAvailable(){return this._transport.sendRequest({name:"is-audio-available"})}isDeviceChangeAvailable(e){return function(e,t){return e.sendRequest({deviceType:t,type:"devices",name:"isDeviceChangeAvailable"})}(this._transport,e)}isDeviceListAvailable(){return function(e){return e.sendRequest({type:"devices",name:"isDeviceListAvailable"})}(this._transport)}isMultipleAudioInputSupported(){return function(e){return e.sendRequest({type:"devices",name:"isMultipleAudioInputSupported"})}(this._transport)}invite(e){return Array.isArray(e)&&0!==e.length?this._transport.sendRequest({name:"invite",invitees:e}):Promise.reject(new TypeError("Invalid Argument"))}isAudioMuted(){return this._transport.sendRequest({name:"is-audio-muted"})}isModerationOn(e){return this._transport.sendReques t({name:"is-moderation-on",mediaType:e})}isParticipantForceMuted(e,t){return this._transport.sendRequest({name:"is-participant-force-muted",participantId:e,mediaType:t})}isSharingScreen(){return this._transport.sendRequest({name:"is-sharing-screen"})}getAvatarURL(e){const{avatarURL:t}=this._participants[e]||{};return t}getDeploymentInfo(){return this._transport.sendRequest({name:"deployment-info"})}getDisplayName(e){const{displayName:t}=this._participants[e]||{};return t}getEmail(e){const{email:t}=this._participants[e]||{};return t}getIFrame(){return this._frame}getNumberOfParticipants(){return this._numberOfParticipants}isVideoAvailable(){return this._transport.sendRequest({name:"is-video-available"})}isVideoMuted(){return this._transport.sendRequest({name:"is-video-muted"})}pinParticipant(e){this.executeCommand("pinParticipant",e)}removeEventListener(e){this.removeAllListeners(e)}removeEventListeners(e){e.forEach((e=>this.removeEventListener(e)))}resizeLargeVideo(e,t){e<=this._wid th&&t<=this._height&&this.executeCommand("resizeLargeVideo",e,t)}sendProxyConnectionEvent(e){this._transport.sendEvent({data:[e],name:"proxy-connection-event"})}setAudioInputDevice(e,t){return function(e,t,n){return x(e,{id:n,kind:"audioinput",label:t})}(this._transport,e,t)}setAudioOutputDevice(e,t){return function(e,t,n){return x(e,{id:n,kind:"audiooutput",label:t})}(this._transport,e,t)}setLargeVideoParticipant(e){this.executeCommand("setLargeVideoParticipant",e)}setVideoInputDevice(e,t){return function(e,t,n){return x(e,{id:n,kind:"videoinput",label:t})}(this._transport,e,t)}startRecording(e){this.executeCommand("startRecording",e)}stopRecording(e){this.executeCommand("stopRecording",e)}toggleE2EE(e){this.executeCommand("toggleE2EE",e)}async setMediaEncryptionKey(e){const{key:t,index:n}=e;if(t){const e=await crypto.subtle.exportKey("raw",t);this.executeCommand("setMediaEncryptionKey",JSON.stringify({exportedKey:Array.from(new Uint8Array(e)),index:n}))}else this.executeCommand("s etMediaEncryptionKey",JSON.stringify({exportedKey:!1,index:n}))}}},872:(e,t,n)=>{e.exports=n(754).default},571:(e,t)=>{"use strict";const n=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*\:/;t.parse=function(e){const i="object"==typeof(arguments.length<=1?void 0:arguments[1])&&(arguments.length<=1?void 0:arguments[1]),r=(arguments.length<=1?0:arguments.length-1)>1||!i?arguments.length<=1?void 0:arguments[1]:void 0,s=(arguments.length<=1?0:arguments.length-1)>1&&(arguments.length<=2?void 0:arguments[2])||i||{},o=JSON.parse(e,r);return"ignore"===s.protoAction?o:o&&"object"==typeof o&&e.match(n)?(t.scan(o,s),o):o},t.scan=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[e];for(;n.length;){const e=n;n=[];for(const i of e){if(Object.prototype.hasOwnProperty.call(i,"__proto__")){if("remove"!==t.protoAction)throw new SyntaxError("Object contains forbidden prototype pro perty");delete i.__proto__}for(const e in i){const t=i[e];t&&"object"==typeof t&&n.push(i[e])}}}},t.safeParse=function(e,n){try{return t.parse(e,n)}catch(e){return null}}},369:(e,t,n)=>{var i=n(7);function r(e,t){this.logStorage=e,this.stringifyObjects=!(!t||!t.stringifyObjects)&&t.stringifyObjects,this.storeInterval=t&&t.storeInterval?t.storeInterval:3e4,this.maxEntryLength=t&&t.maxEntryLength?t.maxEntryLength:1e4,Object.keys(i.levels).forEach(function(e){this[i.levels[e]]=function(){this._log.apply(this,arguments)}.bind(this,e)}.bind(this)),this.storeLogsIntervalID=null,this.queue=[],this.totalLen=0,this.outputCache=[]}r.prototype.stringify=function(e){try{return JSON.stringify(e)}catch(e){return"[object with circular refs?]"}},r.prototype.formatLogMessage=function(e){for(var t="",n=1,r=arguments.length;n<r;n++){var s=arguments[n];!this.stringifyObjects&&e!==i.levels.ERROR||"object"!=typeof s||(s=this.stringify(s)),t+=s,n!==r-1&&(t+=" ")}return t.length?t:null},r.prototype._log=fu nction(){var e=arguments[1],t=this.formatLogMessage.apply(this,arguments);if(t){var n=this.queue[this.queue.length-1],i=n&&n.text;i===t?n.count+=1:(this.queue.push({text:t,timestamp:e,count:1}),this.totalLen+=t.length)}this.totalLen>=this.maxEntryLength&&this._flush(!0,!0)},r.prototype.start=function(){this._reschedulePublishInterval()},r.prototype._reschedulePublishInterval=function(){this.storeLogsIntervalID&&(window.clearTimeout(this.storeLogsIntervalID),this.storeLogsIntervalID=null),this.storeLogsIntervalID=window.setTimeout(this._flush.bind(this,!1,!0),this.storeInterval)},r.prototype.flush=function(){this._flush(!1,!0)},r.prototype._flush=function(e,t){this.totalLen>0&&(this.logStorage.isReady()||e)&&(this.logStorage.isReady()?(this.outputCache.length&&(this.outputCache.forEach(function(e){this.logStorage.storeLogs(e)}.bind(this)),this.outputCache=[]),this.logStorage.storeLogs(this.queue)):this.outputCache.push(this.queue),this.queue=[],this.totalLen=0),t&&this._reschedulePub lishInterval()},r.prototype.stop=function(){this._flush(!1,!1)},e.exports=r},7:e=>{var t={trace:0,debug:1,info:2,log:3,warn:4,error:5};o.consoleTransport=console;var n=[o.consoleTransport];o.addGlobalTransport=function(e){-1===n.indexOf(e)&&n.push(e)},o.removeGlobalTransport=function(e){var t=n.indexOf(e);-1!==t&&n.splice(t,1)};var i={};function r(){var e={methodName:"",fileLocation:"",line:null,column:null},t=new Error,n=t.stack?t.stack.split("\n"):[];if(!n||n.length<3)return e;var i=null;return n[3]&&(i=n[3].match(/\s*at\s*(.+?)\s*\((\S*)\s*:(\d*)\s*:(\d*)\)/)),!i||i.length<=4?(0===n[2].indexOf("log@")?e.methodName=n[3].substr(0,n[3].indexOf("@")):e.methodName=n[2].substr(0,n[2].indexOf("@")),e):(e.methodName=i[1],e.fileLocation=i[2],e.line=i[3],e.column=i[4],e)}function s(){var e=arguments[0],s=arguments[1],o=Array.prototype.slice.call(arguments,2);if(!(t[s]<e.level))for(var a=!(e.options.disableCallerInfo||i.disableCallerInfo)&&r(),c=n.concat(e.transports),l=0;l<c.length;l++){va r d=c[l],h=d[s];if(h&&"function"==typeof h){var u=[];u.push((new Date).toISOString()),e.id&&u.push("["+e.id+"]"),a&&a.methodName.length>1&&u.push("<"+a.methodName+">: ");var p=u.concat(o);h.bind(d).apply(d,p)}}}function o(e,n,i,r){this.id=n,this.options=r||{},this.transports=i,this.transports||(this.transports=[]),this.level=t[e];for(var o=Object.keys(t),a=0;a<o.length;a++)this[o[a]]=s.bind(null,this,o[a])}o.setGlobalOptions=function(e){i=e||{}},o.prototype.setLevel=function(e){this.level=t[e]},e.exports=o,o.levels={TRACE:"trace",DEBUG:"debug",INFO:"info",LOG:"log",WARN:"warn",ERROR:"error"}},860:(e,t,n)=>{var i=n(7),r=n(369),s={},o=[],a=i.levels.TRACE;e.exports={addGlobalTransport:function(e){i.addGlobalTransport(e)},removeGlobalTransport:function(e){i.removeGlobalTransport(e)},setGlobalOptions:function(e){i.setGlobalOptions(e)},getLogger:function(e,t,n){var r=new i(a,e,t,n);return e?(s[e]=s[e]||[],s[e].push(r)):o.push(r),r},setLogLevelById:function(e,t){for(var n=t?s[t]||[]:o,i=0; i<n.length;i++)n[i].setLevel(e)},setLogLevel:function(e){a=e;for(var t=0;t<o.length;t++)o[t].setLevel(e);for(var n in s){var i=s[n]||[];for(t=0;t<i.length;t++)i[t].setLevel(e)}},levels:i.levels,LogCollector:r}},415:e=>{function t(){return new DOMException("The request is not allowed","NotAllowedError")}e.exports=async function(e){try{await async function(e){if(!navigator.clipboard)throw t();return navigator.clipboard.writeText(e)}(e)}catch(n){try{await async function(e){const n=document.createElement("span");n.textContent=e,n.style.whiteSpace="pre",n.style.webkitUserSelect="auto",n.style.userSelect="all",document.body.appendChild(n);const i=window.getSelection(),r=window.document.createRange();i.removeAllRanges(),r.selectNode(n),i.addRange(r);let s=!1;try{s=window.document.execCommand("copy")}finally{i.removeAllRanges(),window.document.body.removeChild(n)}if(!s)throw t()}(e)}catch(e){throw e||n||t()}}}},620:e=>{"use strict";var t,n="object"==typeof Reflect?Reflect:null,i=n&&"functio n"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var r=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,e.exports.once=function(e,t){return new Promise((function(n,i){function r(n){e.removeListener(t,s),i(n)}function s(){"function"==typeof e.removeListener&&e.removeListener("error",r),n([].slice.call(arguments))}f(e,t,s,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&f(e,"error",t,{once:!0})}(e,r)}))},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var o=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListen ers?s.defaultMaxListeners:e._maxListeners}function l(e,t,n,i){var r,s,o,l;if(a(n),void 0===(s=e._events)?(s=e._events=Object.create(null),e._eventsCount=0):(void 0!==s.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),s=e._events),o=s[t]),void 0===o)o=s[t]=n,++e._eventsCount;else if("function"==typeof o?o=s[t]=i?[n,o]:[o,n]:i?o.unshift(n):o.push(n),(r=c(e))>0&&o.length>r&&!o.warned){o.warned=!0;var d=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");d.name="MaxListenersExceededWarning",d.emitter=e,d.type=t,d.count=o.length,l=d,console&&console.warn&&console.warn(l)}return e}function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function h(e,t,n){var i={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},r=d.bind(i);return r.listener=n,i. wrapFn=r,r}function u(e,t,n){var i=e._events;if(void 0===i)return[];var r=i[t];return void 0===r?[]:"function"==typeof r?n?[r.listener||r]:[r]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(r):g(r,r.length)}function p(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function g(e,t){for(var n=new Array(t),i=0;i<t;++i)n[i]=e[i];return n}function f(e,t,n,i){if("function"==typeof e.on)i.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function r(s){i.once&&e.removeEventListener(t,r),n(s)}))}}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(e){if("number"!=typeof e||e<0||r(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative n umber. Received '+e+".");o=e}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||r(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return c(this)},s.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,s=this._events;if(void 0!==s)r=r&&void 0===s.error;else if(!r)return!1;if(r){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var c=s[e];if(void 0===c)return!1;if("function"==typeof c)i(c,this,t);else{var l=c.length,d=g(c,l);for(n=0;n<l;++n)i(d[n],this,t)}return!0},s.prototype.addListener=function(e,t ){return l(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return l(this,e,t,!0)},s.prototype.once=function(e,t){return a(t),this.on(e,h(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,h(this,e,t)),this},s.prototype.removeListener=function(e,t){var n,i,r,s,o;if(a(t),void 0===(i=this._events))return this;if(void 0===(n=i[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(r=-1,s=n.length-1;s>=0;s--)if(n[s]===t||n[s].listener===t){o=n[s].listener,r=s;break}if(r<0)return this;0===r?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,r),1===n.length&&(i[e]=n[0]),void 0!==i.removeListener&&this.emit("removeListener",e,o||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){va r t,n,i;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var r,s=Object.keys(n);for(i=0;i<s.length;++i)"removeListener"!==(r=s[i])&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(i=t.length-1;i>=0;i--)this.removeListener(e,t[i]);return this},s.prototype.listeners=function(e){return u(this,e,!0)},s.prototype.rawListeners=function(e){return u(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},s.prototype.listenerCount=p,s.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}}},t={};function n(i){var r=t[i];if(void 0!==r) return r.exports;var s=t[i]={exports:{}};return e[i](s,s.exports,n),s.exports}return n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n(872)})()})); +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.JitsiMeetExternalAPI=t():e.JitsiMeetExternalAPI=t()}(self,(function(){return(()=>{var e={816:(e,t,n)=>{"use strict";n.d(t,{default:()=>S});var i=n(620),r=n.n(i);class s extends i{constructor(){var e,t;super(...arguments),t={},(e="_storage")in this?Object.defineProperty(this,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):this[e]=t}clear(){this._storage={}}get length(){return Object.keys(this._storage).length}getItem(e){return this._storage[e]}setItem(e,t){this._storage[e]=t}removeItem(e){delete this._storage[e]}key(e){const t=Object.keys(this._storage);if(!(t.length<=e))return t[e]}serialize(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(0===e.length)return JSON.stringify(this._storage);const t={...this._storage};return e.forEach((e=>{delete t[e]})),JSON.stringify(t)}}const o=new class ext ends i{constructor(){super();try{this._storage=window.localStorage,this._localStorageDisabled=!1}catch(e){}this._storage||(console.warn("Local storage is disabled."),this._storage=new s,this._localStorageDisabled=!0)}isLocalStorageDisabled(){return this._localStorageDisabled}clear(){this._storage.clear(),this.emit("changed")}get length(){return this._storage.length}getItem(e){return this._storage.getItem(e)}setItem(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this._storage.setItem(e,t),n||this.emit("changed")}removeItem(e){this._storage.removeItem(e),this.emit("changed")}key(e){return this._storage.key(e)}serialize(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(this.isLocalStorageDisabled())return this._storage.serialize(e);const t=this._storage.length,n={};for(let i=0;i<t;i++){const t=this._storage.key(i);e.includes(t)||(n[t]=this._storage.getItem(t))}return JSON.stringify(n)}};var a=n(571);n(415);const c=["__proto__","constructor","proto type"];function l(e){const t=new RegExp("^([a-z][a-z0-9\\.\\+-]*:)+","gi"),n=t.exec(e);if(n){let i=n[n.length-1].toLowerCase();"http:"!==i&&"https:"!==i&&(i="https:"),(e=e.substring(t.lastIndex)).startsWith("//")&&(e=i+e)}return e}function d(e={}){const t=[];for(const n in e)try{t.push(`${n}=${encodeURIComponent(JSON.stringify(e[n]))}`)}catch(e){console.warn(`Error encoding ${n}: ${e}`)}return t}function u(e){const t={toString:h};let n,i,r;if(e=e.replace(/\s/g,""),n=new RegExp("^([a-z][a-z0-9\\.\\+-]*:)","gi"),i=n.exec(e),i&&(t.protocol=i[1].toLowerCase(),e=e.substring(n.lastIndex)),n=new RegExp("^(//[^/?#]+)","gi"),i=n.exec(e),i){let r=i[1].substring(2);e=e.substring(n.lastIndex);const s=r.indexOf("@");-1!==s&&(r=r.substring(s+1)),t.host=r;const o=r.lastIndexOf(":");-1!==o&&(t.port=r.substring(o+1),r=r.substring(0,o)),t.hostname=r}if(n=new RegExp("^([^?#]*)","gi"),i=n.exec(e),i&&(r=i[1],e=e.substring(n.lastIndex)),r?r.startsWith("/")||(r=`/${r}`):r="/",t.pathname=r,e.startsWith("?" )){let n=e.indexOf("#",1);-1===n&&(n=e.length),t.search=e.substring(0,n),e=e.substring(n)}else t.search="";return t.hash=e.startsWith("#")?e:"",t}function h(e){const{hash:t,host:n,pathname:i,protocol:r,search:s}=e||this;let o="";return r&&(o+=r),n&&(o+=`//${n}`),o+=i||"/",s&&(o+=s),t&&(o+=t),o}function p(e){let t;t=e.serverURL&&e.room?new URL(e.room,e.serverURL).toString():e.room?e.room:e.url||"";const n=u(l(t));if(!n.protocol){let t=e.protocol||e.scheme;t&&(t.endsWith(":")||(t+=":"),n.protocol=t)}let{pathname:i}=n;if(!n.host){const t=e.domain||e.host||e.hostname;if(t){const{host:e,hostname:r,pathname:s,port:o}=u(l(`org.jitsi.meet://${t}`));e&&(n.host=e,n.hostname=r,n.port=o),"/"===i&&"/"!==s&&(i=s)}}const r=e.roomName||e.room;!r||!n.pathname.endsWith("/")&&n.pathname.endsWith(`/${r}`)||(i.endsWith("/")||(i+="/"),i+=r),n.pathname=i;const{jwt:s,lang:o,release:a}=e,c=new URLSearchParams(n.search);s&&c.set("jwt",s);const{defaultLanguage:h}=e.configOverwrite||{};(o||h)&&c.set("lang",o|| h),a&&c.set("release",a);const p=c.toString();p&&(n.search=`?${p}`);let{hash:g}=n;for(const t of["config","interfaceConfig","devices","userInfo","appData"]){const n=d(e[`${t}Overwrite`]||e[t]||e[`${t}Override`]);if(n.length){let e=`${t}.${n.join(`&${t}.`)}`;g.length?e=`&${e}`:g="#",g+=e}}return n.hash=g,n.toString()||void 0}const g={window:window.opener||window.parent},m="message";class f{constructor(){let{postisOptions:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.postis=function(e){var t,n=e.scope,i=e.window,r=e.windowForEventListening||window,s=e.allowedOrigin,o={},a=[],c={},l=!1,d="__ready__",u=function(e){var t;try{t=JSON.parse(e.data)}catch(e){return}if((!s||e.origin===s)&&t&&t.postis&&t.scope===n){var i=o[t.method];if(i)for(var r=0;r<i.length;r++)i[r].call(null,t.params);else c[t.method]=c[t.method]||[],c[t.method].push(t.params)}};r.addEventListener("message",u,!1);var h={listen:function(e,t){o[e]=o[e]||[],o[e].push(t);var n=c[e];if(n)for(var i=o[e],r=0;r <i.length;r++)for(var s=0;s<n.length;s++)i[r].call(null,n[s]);delete c[e]},send:function(e){var t=e.method;(l||e.method===d)&&i&&"function"==typeof i.postMessage?i.postMessage(JSON.stringify({postis:!0,scope:n,method:t,params:e.params}),"*"):a.push(e)},ready:function(e){l?e():setTimeout((function(){h.ready(e)}),50)},destroy:function(e){clearInterval(t),l=!1,r&&"function"==typeof r.removeEventListener&&r.removeEventListener("message",u),e&&e()}},p=+new Date+Math.random()+"";return t=setInterval((function(){h.send({method:d,params:p})}),50),h.listen(d,(function(e){if(e===p){clearInterval(t),l=!0;for(var n=0;n<a.length;n++)h.send(a[n]);a=[]}else h.send({method:d,params:e})})),h}({...g,...e}),this._receiveCallback=()=>{},this.postis.listen(m,(e=>this._receiveCallback(e)))}dispose(){this.postis.destroy()}send(e){this.postis.send({method:m,params:e})}setReceiveCallback(e){this._receiveCallback=e}}const v="request",y="response";class _{constructor(){let{backend:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._listeners=new Map,this._requestID=0,this._responseHandlers=new Map,this._unprocessedMessages=new Set,this.addListener=this.on,e&&this.setBackend(e)}_disposeBackend(){this._backend&&(this._backend.dispose(),this._backend=null)}_onMessageReceived(e){if(e.type===y){const t=this._responseHandlers.get(e.id);t&&(t(e),this._responseHandlers.delete(e.id))}else e.type===v?this.emit("request",e.data,((t,n)=>{this._backend.send({type:y,error:n,id:e.id,result:t})})):this.emit("event",e.data)}dispose(){this._responseHandlers.clear(),this._unprocessedMessages.clear(),this.removeAllListeners(),this._disposeBackend()}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];const r=this._listeners.get(e);let s=!1;return r&&r.size&&r.forEach((e=>{s=e(...n)||s})),s||this._unprocessedMessages.add(n),s}on(e,t){let n=this._listeners.get(e);return n||(n=new Set,this._listeners.set(e,n)),n.add(t),this._unprocessedMessages.forEach((e=>{ t(...e)&&this._unprocessedMessages.delete(e)})),this}removeAllListeners(e){return e?this._listeners.delete(e):this._listeners.clear(),this}removeListener(e,t){const n=this._listeners.get(e);return n&&n.delete(t),this}sendEvent(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._backend&&this._backend.send({type:"event",data:e})}sendRequest(e){if(!this._backend)return Promise.reject(new Error("No transport backend defined!"));this._requestID++;const t=this._requestID;return new Promise(((n,i)=>{this._responseHandlers.set(t,(e=>{let{error:t,result:r}=e;void 0!==r?n(r):i(void 0!==t?t:new Error("Unexpected response format!"))})),this._backend.send({type:v,data:e,id:t})}))}setBackend(e){this._disposeBackend(),this._backend=e,this._backend.setReceiveCallback(this._onMessageReceived.bind(this))}}(function(e,t=!1,n="hash"){"string"==typeof e&&(e=new URL(e));const i="search"===n?e.search:e.hash,r={},s=i&&i.substr(1).split("&")||[];if("hash"===n&&1===s.length){const e=s[0] ;if(e.startsWith("/")&&1===e.split("&").length)return r}return s.forEach((e=>{const n=e.split("="),i=n[0];if(!i||i.split(".").some((e=>c.includes(e))))return;let s;try{if(s=n[1],!t){const e=decodeURIComponent(s).replace(/\\&/,"&");s="undefined"===e?void 0:a.parse(e)}}catch(e){return void function(e,t=""){console.error(t,e),window.onerror&&window.onerror(t,void 0,void 0,void 0,e)}(e,`Failed to parse URL parameter value: ${String(s)}`)}r[i]=s})),r})(window.location).jitsi_meet_external_api_id;(window.JitsiMeetJS||(window.JitsiMeetJS={}),window.JitsiMeetJS.app||(window.JitsiMeetJS.app={}),window.JitsiMeetJS.app).setExternalTransportBackend=e=>undefined.setBackend(e);var b=n(860);const w=n.n(b)().getLogger("modules/API/external/functions.js");function L(e,t){return e.sendRequest({type:"devices",name:"setDevice",device:t})}const k=["css/all.css","libs/alwaysontop.min.js"],E={addBreakoutRoom:"add-breakout-room",answerKnockingParticipant:"answer-knocking-participant",approveVideo:"approve- video",askToUnmute:"ask-to-unmute",autoAssignToBreakoutRooms:"auto-assign-to-breakout-rooms",avatarUrl:"avatar-url",cancelPrivateChat:"cancel-private-chat",closeBreakoutRoom:"close-breakout-room",displayName:"display-name",e2eeKey:"e2ee-key",email:"email",grantModerator:"grant-moderator",hangup:"video-hangup",hideNotification:"hide-notification",initiatePrivateChat:"initiate-private-chat",joinBreakoutRoom:"join-breakout-room",localSubject:"local-subject",kickParticipant:"kick-participant",muteEveryone:"mute-everyone",overwriteConfig:"overwrite-config",overwriteNames:"overwrite-names",password:"password",pinParticipant:"pin-participant",rejectParticipant:"reject-participant",removeBreakoutRoom:"remove-breakout-room",resizeLargeVideo:"resize-large-video",sendChatMessage:"send-chat-message",sendEndpointTextMessage:"send-endpoint-text-message",sendParticipantToRoom:"send-participant-to-room",sendTones:"send-tones",setFollowMe:"set-follow-me",setLargeVideoParticipant:"set-large-video-par ticipant",setMediaEncryptionKey:"set-media-encryption-key",setNoiseSuppressionEnabled:"set-noise-suppression-enabled",setParticipantVolume:"set-participant-volume",setSubtitles:"set-subtitles",setTileView:"set-tile-view",setVideoQuality:"set-video-quality",showNotification:"show-notification",startRecording:"start-recording",startShareVideo:"start-share-video",stopRecording:"stop-recording",stopShareVideo:"stop-share-video",subject:"subject",submitFeedback:"submit-feedback",toggleAudio:"toggle-audio",toggleCamera:"toggle-camera",toggleCameraMirror:"toggle-camera-mirror",toggleChat:"toggle-chat",toggleE2EE:"toggle-e2ee",toggleFilmStrip:"toggle-film-strip",toggleLobby:"toggle-lobby",toggleModeration:"toggle-moderation",toggleNoiseSuppression:"toggle-noise-suppression",toggleParticipantsPane:"toggle-participants-pane",toggleRaiseHand:"toggle-raise-hand",toggleShareScreen:"toggle-share-screen",toggleSubtitles:"toggle-subtitles",toggleTileView:"toggle-tile-view",toggleVirtualBackgroundDi alog:"toggle-virtual-background",toggleVideo:"toggle-video"},x={"avatar-changed":"avatarChanged","audio-availability-changed":"audioAvailabilityChanged","audio-mute-status-changed":"audioMuteStatusChanged","breakout-rooms-updated":"breakoutRoomsUpdated","browser-support":"browserSupport","camera-error":"cameraError","chat-updated":"chatUpdated","content-sharing-participants-changed":"contentSharingParticipantsChanged","data-channel-opened":"dataChannelOpened","device-list-changed":"deviceListChanged","display-name-change":"displayNameChange","email-change":"emailChange","error-occurred":"errorOccurred","endpoint-text-message-received":"endpointTextMessageReceived","face-landmark-detected":"faceLandmarkDetected","feedback-submitted":"feedbackSubmitted","feedback-prompt-displayed":"feedbackPromptDisplayed","filmstrip-display-changed":"filmstripDisplayChanged","iframe-dock-state-changed":"iframeDockStateChanged","incoming-message":"incomingMessage","knocking-participant":"knockingParti cipant",log:"log","mic-error":"micError","moderation-participant-approved":"moderationParticipantApproved","moderation-participant-rejected":"moderationParticipantRejected","moderation-status-changed":"moderationStatusChanged","mouse-enter":"mouseEnter","mouse-leave":"mouseLeave","mouse-move":"mouseMove","outgoing-message":"outgoingMessage","participant-joined":"participantJoined","participant-kicked-out":"participantKickedOut","participant-left":"participantLeft","participant-role-changed":"participantRoleChanged","participants-pane-toggled":"participantsPaneToggled","password-required":"passwordRequired","proxy-connection-event":"proxyConnectionEvent","raise-hand-updated":"raiseHandUpdated","recording-link-available":"recordingLinkAvailable","recording-status-changed":"recordingStatusChanged","video-ready-to-close":"readyToClose","video-conference-joined":"videoConferenceJoined","video-conference-left":"videoConferenceLeft","video-availability-changed":"videoAvailabilityChanged"," video-mute-status-changed":"videoMuteStatusChanged","video-quality-changed":"videoQualityChanged","screen-sharing-status-changed":"screenSharingStatusChanged","dominant-speaker-changed":"dominantSpeakerChanged","subject-change":"subjectChange","suspend-detected":"suspendDetected","tile-view-changed":"tileViewChanged","toolbar-button-clicked":"toolbarButtonClicked"};let C=0;function R(e,t){e._numberOfParticipants+=t}function O(e){let t;return"string"==typeof e&&null!==String(e).match(/([0-9]*\.?[0-9]+)(em|pt|px|%)$/)?t=e:"number"==typeof e&&(t=`${e}px`),t}class S extends(r()){constructor(e){super();for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];const{roomName:r="",width:s="100%",height:a="100%",parentNode:c=document.body,configOverwrite:l={},interfaceConfigOverwrite:d={},jwt:u,lang:h,onload:g,invitees:m,devices:v,userInfo:y,e2eeKey:b,release:w}=function(e){if(!e.length)return{};switch(typeof e[0]){case"string":case"undefined":{const[t,n,i,r,s,o,a,c, l]=e;return{roomName:t,width:n,height:i,parentNode:r,configOverwrite:s,interfaceConfigOverwrite:o,jwt:a,onload:c,lang:l}}case"object":return e[0];default:throw new Error("Can't parse the arguments!")}}(n),L=o.getItem("jitsiLocalStorage");this._parentNode=c,this._url=function(e){return p({...arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},url:`https://${e}/#jitsi_meet_external_api_id=${C}`})}(e,{configOverwrite:l,interfaceConfigOverwrite:d,jwt:u,lang:h,roomName:r,devices:v,userInfo:y,appData:{localStorageContent:L},release:w}),this._createIFrame(a,s,g),this._transport=new _({backend:new f({postisOptions:{allowedOrigin:new URL(this._url).origin,scope:`jitsi_meet_external_api_${C}`,window:this._frame.contentWindow}})}),Array.isArray(m)&&m.length>0&&this.invite(m),this._tmpE2EEKey=b,this._isLargeVideoVisible=!0,this._numberOfParticipants=0,this._participants={},this._myUserID=void 0,this._onStageParticipant=void 0,this._setupListeners(),C++}_createIFrame(e,t,n){const i=`jitsiC onferenceFrame${C}`;this._frame=document.createElement("iframe"),this._frame.allow="camera; microphone; display-capture; autoplay; clipboard-write",this._frame.src=this._url,this._frame.name=i,this._frame.id=i,this._setSize(e,t),this._frame.setAttribute("allowFullScreen","true"),this._frame.style.border=0,n&&(this._frame.onload=n),this._frame=this._parentNode.appendChild(this._frame)}_getAlwaysOnTopResources(){const e=this._frame.contentWindow,t=e.document;let n="";const i=t.querySelector("base");if(i&&i.href)n=i.href;else{const{protocol:t,host:i}=e.location;n=`${t}//${i}`}return k.map((e=>new URL(e,n).href))}_getFormattedDisplayName(e){const{formattedDisplayName:t}=this._participants[e]||{};return t}_getOnStageParticipant(){return this._onStageParticipant}_getLargeVideo(){const e=this.getIFrame();if(this._isLargeVideoVisible&&e&&e.contentWindow&&e.contentWindow.document)return e.contentWindow.document.getElementById("largeVideo")}_getParticipantVideo(e){const t=this.getIFrame();if( t&&t.contentWindow&&t.contentWindow.document)return void 0===e||e===this._myUserID?t.contentWindow.document.getElementById("localVideo_container"):t.contentWindow.document.querySelector(`#participant_${e} video`)}_setSize(e,t){const n=O(e),i=O(t);void 0!==n&&(this._height=e,this._frame.style.height=n),void 0!==i&&(this._width=t,this._frame.style.width=i)}_setupListeners(){this._transport.on("event",(e=>{let{name:t,...n}=e;const i=n.id;switch(t){case"video-conference-joined":void 0!==this._tmpE2EEKey&&(this.executeCommand(E.e2eeKey,this._tmpE2EEKey),this._tmpE2EEKey=void 0),this._myUserID=i,this._participants[i]={avatarURL:n.avatarURL};case"participant-joined":this._participants[i]=this._participants[i]||{},this._participants[i].displayName=n.displayName,this._participants[i].formattedDisplayName=n.formattedDisplayName,R(this,1);break;case"participant-left":R(this,-1),delete this._participants[i];break;case"display-name-change":{const e=this._participants[i];e&&(e.displayName=n.displ ayname,e.formattedDisplayName=n.formattedDisplayName);break}case"email-change":{const e=this._participants[i];e&&(e.email=n.email);break}case"avatar-changed":{const e=this._participants[i];e&&(e.avatarURL=n.avatarURL);break}case"on-stage-participant-changed":this._onStageParticipant=i,this.emit("largeVideoChanged");break;case"large-video-visibility-changed":this._isLargeVideoVisible=n.isVisible,this.emit("largeVideoChanged");break;case"video-conference-left":R(this,-1),delete this._participants[this._myUserID];break;case"video-quality-changed":this._videoQuality=n.videoQuality;break;case"local-storage-changed":return o.setItem("jitsiLocalStorage",n.localStorageContent),!0}const r=x[t];return!!r&&(this.emit(r,n),!0)}))}addEventListener(e,t){this.on(e,t)}addEventListeners(e){for(const t in e)this.addEventListener(t,e[t])}captureLargeVideoScreenshot(){return this._transport.sendRequest({name:"capture-largevideo-screenshot"})}dispose(){this.emit("_willDispose"),this._transport.dispose() ,this.removeAllListeners(),this._frame&&this._frame.parentNode&&this._frame.parentNode.removeChild(this._frame)}executeCommand(e){if(e in E){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];this._transport.sendEvent({data:n,name:E[e]})}else console.error("Not supported command name.")}executeCommands(e){for(const t in e)this.executeCommand(t,e[t])}getAvailableDevices(){return function(e){return e.sendRequest({type:"devices",name:"getAvailableDevices"}).catch((e=>(w.error(e),{})))}(this._transport)}getContentSharingParticipants(){return this._transport.sendRequest({name:"get-content-sharing-participants"})}getCurrentDevices(){return function(e){return e.sendRequest({type:"devices",name:"getCurrentDevices"}).catch((e=>(w.error(e),{})))}(this._transport)}getCustomAvatarBackgrounds(){return this._transport.sendRequest({name:"get-custom-avatar-backgrounds"})}getLivestreamUrl(){return this._transport.sendRequest({name:"get-livestream-url"})}getParticipants Info(){const e=Object.keys(this._participants),t=Object.values(this._participants);return t.forEach(((t,n)=>{t.participantId=e[n]})),t}getVideoQuality(){return this._videoQuality}isAudioAvailable(){return this._transport.sendRequest({name:"is-audio-available"})}isDeviceChangeAvailable(e){return function(e,t){return e.sendRequest({deviceType:t,type:"devices",name:"isDeviceChangeAvailable"})}(this._transport,e)}isDeviceListAvailable(){return function(e){return e.sendRequest({type:"devices",name:"isDeviceListAvailable"})}(this._transport)}isMultipleAudioInputSupported(){return function(e){return e.sendRequest({type:"devices",name:"isMultipleAudioInputSupported"})}(this._transport)}invite(e){return Array.isArray(e)&&0!==e.length?this._transport.sendRequest({name:"invite",invitees:e}):Promise.reject(new TypeError("Invalid Argument"))}isAudioMuted(){return this._transport.sendRequest({name:"is-audio-muted"})}isAudioDisabled(){return this._transport.sendRequest({name:"is-audio-disabled"})} isModerationOn(e){return this._transport.sendRequest({name:"is-moderation-on",mediaType:e})}isParticipantForceMuted(e,t){return this._transport.sendRequest({name:"is-participant-force-muted",participantId:e,mediaType:t})}isParticipantsPaneOpen(){return this._transport.sendRequest({name:"is-participants-pane-open"})}isSharingScreen(){return this._transport.sendRequest({name:"is-sharing-screen"})}isStartSilent(){return this._transport.sendRequest({name:"is-start-silent"})}getAvatarURL(e){const{avatarURL:t}=this._participants[e]||{};return t}getDeploymentInfo(){return this._transport.sendRequest({name:"deployment-info"})}getDisplayName(e){const{displayName:t}=this._participants[e]||{};return t}getEmail(e){const{email:t}=this._participants[e]||{};return t}getIFrame(){return this._frame}getNumberOfParticipants(){return this._numberOfParticipants}isVideoAvailable(){return this._transport.sendRequest({name:"is-video-available"})}isVideoMuted(){return this._transport.sendRequest({name:"is-v ideo-muted"})}listBreakoutRooms(){return this._transport.sendRequest({name:"list-breakout-rooms"})}pinParticipant(e){this.executeCommand("pinParticipant",e)}removeEventListener(e){this.removeAllListeners(e)}removeEventListeners(e){e.forEach((e=>this.removeEventListener(e)))}resizeLargeVideo(e,t){e<=this._width&&t<=this._height&&this.executeCommand("resizeLargeVideo",e,t)}sendProxyConnectionEvent(e){this._transport.sendEvent({data:[e],name:"proxy-connection-event"})}setAudioInputDevice(e,t){return function(e,t,n){return L(e,{id:n,kind:"audioinput",label:t})}(this._transport,e,t)}setAudioOutputDevice(e,t){return function(e,t,n){return L(e,{id:n,kind:"audiooutput",label:t})}(this._transport,e,t)}setLargeVideoParticipant(e){this.executeCommand("setLargeVideoParticipant",e)}setVideoInputDevice(e,t){return function(e,t,n){return L(e,{id:n,kind:"videoinput",label:t})}(this._transport,e,t)}startRecording(e){this.executeCommand("startRecording",e)}stopRecording(e){this.executeCommand("stopRe cording",e)}toggleE2EE(e){this.executeCommand("toggleE2EE",e)}async setMediaEncryptionKey(e){const{key:t,index:n}=e;if(t){const e=await crypto.subtle.exportKey("raw",t);this.executeCommand("setMediaEncryptionKey",JSON.stringify({exportedKey:Array.from(new Uint8Array(e)),index:n}))}else this.executeCommand("setMediaEncryptionKey",JSON.stringify({exportedKey:!1,index:n}))}}},872:(e,t,n)=>{e.exports=n(816).default},571:(e,t)=>{"use strict";const n=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*\:/;t.parse=function(e){const i="object"==typeof(arguments.length<=1?void 0:arguments[1])&&(arguments.length<=1?void 0:arguments[1]),r=(arguments.length<=1?0:arguments.length-1)>1||!i?arguments.length<=1?void 0:arguments[1]:void 0,s=(arguments.length<=1?0:arguments.length-1)>1&&(arguments.length<=2?void 0:arguments[2])||i||{},o=JSON.parse(e,r);return"ignore"===s.protoAction?o:o&&"object"==typeof o&&e.mat ch(n)?(t.scan(o,s),o):o},t.scan=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[e];for(;n.length;){const e=n;n=[];for(const i of e){if(Object.prototype.hasOwnProperty.call(i,"__proto__")){if("remove"!==t.protoAction)throw new SyntaxError("Object contains forbidden prototype property");delete i.__proto__}for(const e in i){const t=i[e];t&&"object"==typeof t&&n.push(i[e])}}}},t.safeParse=function(e,n){try{return t.parse(e,n)}catch(e){return null}}},369:(e,t,n)=>{var i=n(7);function r(e,t){this.logStorage=e,this.stringifyObjects=!(!t||!t.stringifyObjects)&&t.stringifyObjects,this.storeInterval=t&&t.storeInterval?t.storeInterval:3e4,this.maxEntryLength=t&&t.maxEntryLength?t.maxEntryLength:1e4,Object.keys(i.levels).forEach(function(e){this[i.levels[e]]=function(){this._log.apply(this,arguments)}.bind(this,e)}.bind(this)),this.storeLogsIntervalID=null,this.queue=[],this.totalLen=0,this.outputCache=[]}r.prototype.stringify=function(e){try{return JSON.stringify (e)}catch(e){return"[object with circular refs?]"}},r.prototype.formatLogMessage=function(e){for(var t="",n=1,r=arguments.length;n<r;n++){var s=arguments[n];!this.stringifyObjects&&e!==i.levels.ERROR||"object"!=typeof s||(s=this.stringify(s)),t+=s,n!==r-1&&(t+=" ")}return t.length?t:null},r.prototype._log=function(){var e=arguments[1],t=this.formatLogMessage.apply(this,arguments);if(t){var n=this.queue[this.queue.length-1],i=n&&n.text;i===t?n.count+=1:(this.queue.push({text:t,timestamp:e,count:1}),this.totalLen+=t.length)}this.totalLen>=this.maxEntryLength&&this._flush(!0,!0)},r.prototype.start=function(){this._reschedulePublishInterval()},r.prototype._reschedulePublishInterval=function(){this.storeLogsIntervalID&&(window.clearTimeout(this.storeLogsIntervalID),this.storeLogsIntervalID=null),this.storeLogsIntervalID=window.setTimeout(this._flush.bind(this,!1,!0),this.storeInterval)},r.prototype.flush=function(){this._flush(!1,!0)},r.prototype._flush=function(e,t){this.totalLen>0&&(th is.logStorage.isReady()||e)&&(this.logStorage.isReady()?(this.outputCache.length&&(this.outputCache.forEach(function(e){this.logStorage.storeLogs(e)}.bind(this)),this.outputCache=[]),this.logStorage.storeLogs(this.queue)):this.outputCache.push(this.queue),this.queue=[],this.totalLen=0),t&&this._reschedulePublishInterval()},r.prototype.stop=function(){this._flush(!1,!1)},e.exports=r},7:e=>{var t={trace:0,debug:1,info:2,log:3,warn:4,error:5};o.consoleTransport=console;var n=[o.consoleTransport];o.addGlobalTransport=function(e){-1===n.indexOf(e)&&n.push(e)},o.removeGlobalTransport=function(e){var t=n.indexOf(e);-1!==t&&n.splice(t,1)};var i={};function r(){var e={methodName:"",fileLocation:"",line:null,column:null},t=new Error,n=t.stack?t.stack.split("\n"):[];if(!n||n.length<3)return e;var i=null;return n[3]&&(i=n[3].match(/\s*at\s*(.+?)\s*\((\S*)\s*:(\d*)\s*:(\d*)\)/)),!i||i.length<=4?(0===n[2].indexOf("log@")?e.methodName=n[3].substr(0,n[3].indexOf("@")):e.methodName=n[2].substr(0,n[2 ].indexOf("@")),e):(e.methodName=i[1],e.fileLocation=i[2],e.line=i[3],e.column=i[4],e)}function s(){var e=arguments[0],s=arguments[1],o=Array.prototype.slice.call(arguments,2);if(!(t[s]<e.level))for(var a=!(e.options.disableCallerInfo||i.disableCallerInfo)&&r(),c=n.concat(e.transports),l=0;l<c.length;l++){var d=c[l],u=d[s];if(u&&"function"==typeof u){var h=[];h.push((new Date).toISOString()),e.id&&h.push("["+e.id+"]"),a&&a.methodName.length>1&&h.push("<"+a.methodName+">: ");var p=h.concat(o);u.bind(d).apply(d,p)}}}function o(e,n,i,r){this.id=n,this.options=r||{},this.transports=i,this.transports||(this.transports=[]),this.level=t[e];for(var o=Object.keys(t),a=0;a<o.length;a++)this[o[a]]=s.bind(null,this,o[a])}o.setGlobalOptions=function(e){i=e||{}},o.prototype.setLevel=function(e){this.level=t[e]},e.exports=o,o.levels={TRACE:"trace",DEBUG:"debug",INFO:"info",LOG:"log",WARN:"warn",ERROR:"error"}},860:(e,t,n)=>{var i=n(7),r=n(369),s={},o=[],a=i.levels.TRACE;e.exports={addGlobalTranspo rt:function(e){i.addGlobalTransport(e)},removeGlobalTransport:function(e){i.removeGlobalTransport(e)},setGlobalOptions:function(e){i.setGlobalOptions(e)},getLogger:function(e,t,n){var r=new i(a,e,t,n);return e?(s[e]=s[e]||[],s[e].push(r)):o.push(r),r},setLogLevelById:function(e,t){for(var n=t?s[t]||[]:o,i=0;i<n.length;i++)n[i].setLevel(e)},setLogLevel:function(e){a=e;for(var t=0;t<o.length;t++)o[t].setLevel(e);for(var n in s){var i=s[n]||[];for(t=0;t<i.length;t++)i[t].setLevel(e)}},levels:i.levels,LogCollector:r}},415:e=>{function t(){return new DOMException("The request is not allowed","NotAllowedError")}e.exports=async function(e){try{await async function(e){if(!navigator.clipboard)throw t();return navigator.clipboard.writeText(e)}(e)}catch(n){try{await async function(e){const n=document.createElement("span");n.textContent=e,n.style.whiteSpace="pre",n.style.webkitUserSelect="auto",n.style.userSelect="all",document.body.appendChild(n);const i=window.getSelection(),r=window.document .createRange();i.removeAllRanges(),r.selectNode(n),i.addRange(r);let s=!1;try{s=window.document.execCommand("copy")}finally{i.removeAllRanges(),window.document.body.removeChild(n)}if(!s)throw t()}(e)}catch(e){throw e||n||t()}}}},620:e=>{"use strict";var t,n="object"==typeof Reflect?Reflect:null,i=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var r=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,e.exports.once=function(e,t){return new Promise((function(n,i){function r(n){e.removeListener(t,s),i(n)}function s(){"function"==typeof e.removeListener&&e.removeListener("error",r),n([].slice.call(arguments))}m(e,t,s,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&m(e,"error",t,{o nce:!0})}(e,r)}))},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var o=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function l(e,t,n,i){var r,s,o,l;if(a(n),void 0===(s=e._events)?(s=e._events=Object.create(null),e._eventsCount=0):(void 0!==s.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),s=e._events),o=s[t]),void 0===o)o=s[t]=n,++e._eventsCount;else if("function"==typeof o?o=s[t]=i?[n,o]:[o,n]:i?o.unshift(n):o.push(n),(r=c(e))>0&&o.length>r&&!o.warned){o.warned=!0;var d=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");d.name="MaxListenersExceededWarning",d.emitter=e,d.type=t,d.count=o.length,l=d,console&&console.warn&&console.warn(l)}retur n e}function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function u(e,t,n){var i={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},r=d.bind(i);return r.listener=n,i.wrapFn=r,r}function h(e,t,n){var i=e._events;if(void 0===i)return[];var r=i[t];return void 0===r?[]:"function"==typeof r?n?[r.listener||r]:[r]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(r):g(r,r.length)}function p(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function g(e,t){for(var n=new Array(t),i=0;i<t;++i)n[i]=e[i];return n}function m(e,t,n,i){if("function"==typeof e.on)i.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEv entListener(t,(function r(s){i.once&&e.removeEventListener(t,r),n(s)}))}}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(e){if("number"!=typeof e||e<0||r(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");o=e}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||r(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return c(this)},s.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,s=this._events;if(void 0!==s)r=r&&void 0===s.error;else if(!r)return!1;if(r){var o; if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var c=s[e];if(void 0===c)return!1;if("function"==typeof c)i(c,this,t);else{var l=c.length,d=g(c,l);for(n=0;n<l;++n)i(d[n],this,t)}return!0},s.prototype.addListener=function(e,t){return l(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return l(this,e,t,!0)},s.prototype.once=function(e,t){return a(t),this.on(e,u(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,u(this,e,t)),this},s.prototype.removeListener=function(e,t){var n,i,r,s,o;if(a(t),void 0===(i=this._events))return this;if(void 0===(n=i[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(r=-1,s=n.length-1;s>=0;s--)if(n[s]===t||n[s].listener===t){o=n [s].listener,r=s;break}if(r<0)return this;0===r?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,r),1===n.length&&(i[e]=n[0]),void 0!==i.removeListener&&this.emit("removeListener",e,o||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,n,i;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var r,s=Object.keys(n);for(i=0;i<s.length;++i)"removeListener"!==(r=s[i])&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(i=t.length-1;i>=0;i--)this.removeListener(e,t[i]);return this},s.prototype.listeners=function(e){return h(this,e,!0)},s.proto type.rawListeners=function(e){return h(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},s.prototype.listenerCount=p,s.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}}},t={};function n(i){var r=t[i];if(void 0!==r)return r.exports;var s=t[i]={exports:{}};return e[i](s,s.exports,n),s.exports}return n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n(872)})()})); //# sourceMappingURL=external_api.min.js.map (No newline at EOF) ++++++ npm-packages-offline-cache.tar.gz ++++++ /work/SRC/openSUSE:Factory/element-web/npm-packages-offline-cache.tar.gz /work/SRC/openSUSE:Factory/.element-web.new.2083/npm-packages-offline-cache.tar.gz differ: char 13, line 1