diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c095713ebda..1fe52f66e15 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -92,6 +92,9 @@ jobs: python: runs-on: ubuntu-latest + environment: pypi + permissions: + id-token: write steps: - name: Checkout repository @@ -113,11 +116,7 @@ jobs: run: python -m build - name: Publish Python package - if: github.event_name == 'release' - env: - PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }} - PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }} - run: twine upload --disable-progress-bar -u ${PYPI_USERNAME} -p ${PYPI_PASSWORD} dist/* + uses: pypa/gh-action-pypi-publish@release/v1 docker: runs-on: ubuntu-latest diff --git a/CHANGELOG b/CHANGELOG index faa55886947..d86d63c91ac 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,44 @@ +mkdocs-material-9.7.0 (2025-11-11) + +⚠️ Material for MkDocs is now in maintenance mode + +This is the last release of Material for MkDocs that will receive new features. +Going forward, the Material for MkDocs team focuses on Zensical, a next-gen +static site generator built from first principles. We will provide critical +bug fixes and security updates for Material for MkDocs for 12 months at least. + +Read the full announcement on our blog: +https://squidfunk.github.io/mkdocs-material/blog/2025/11/05/zensical/ + +This release includes all features that were previously exclusive to the +Insiders edition. These features are now freely available to everyone. + +Note on deprecated plugins: The projects and typeset plugins are included in +this release, but must be considered deprecated. Both plugins proved +unsustainable to maintain and represent architectural dead ends. They are +provided as-is without ongoing support. + +Changes: + +- Added support for pinned blog posts and author profiles +- Added support for customizing pagination for blog index pages +- Added support for customizing blog category sort order +- Added support for staying on page when switching languages +- Added support for disabling tags in table of contents +- Added support for nested tags and shadow tags +- Added support for footnote tooltips +- Added support for instant previews +- Added support for instant prefetching +- Added support for custom social card layouts +- Added support for custom social card background images +- Added support for selectable rangs in code blocks +- Added support for custom selectors for code annotations +- Added support for configurable log level in privacy plugin +- Added support for processing of external links in privacy plugin +- Added support for automatic image optimization via optimize plugin +- Added support for navigation paths (breadcrumbs) +- Fixed #8519: Vector accents do not render when using KaTeX + mkdocs-material-9.6.23 (2025-11-01) * Updated Burmese translation diff --git a/Dockerfile b/Dockerfile index f0d0fb451c0..d0e79c39980 100644 --- a/Dockerfile +++ b/Dockerfile @@ -33,9 +33,9 @@ WORKDIR /tmp # Copy files necessary for build COPY material material COPY package.json package.json +COPY pyproject.toml pyproject.toml COPY README.md README.md COPY *requirements.txt ./ -COPY pyproject.toml pyproject.toml # Perform build and cleanup artifacts and caches RUN \ @@ -48,6 +48,7 @@ RUN \ git-fast-import \ jpeg-dev \ openssh \ + pngquant \ tini \ zlib-dev \ && \ @@ -64,6 +65,7 @@ RUN \ if [ "${WITH_PLUGINS}" = "true" ]; then \ pip install --no-cache-dir \ mkdocs-material[recommended] \ + mkdocs-material[git] \ mkdocs-material[imaging]; \ fi \ && \ diff --git a/docs/blog/posts/insiders-now-free-for-everyone.md b/docs/blog/posts/insiders-now-free-for-everyone.md new file mode 100644 index 00000000000..13eecf8f39b --- /dev/null +++ b/docs/blog/posts/insiders-now-free-for-everyone.md @@ -0,0 +1,202 @@ +--- +date: 2025-11-11 +authors: + - squidfunk + - alexvoss + - katharinalisalin + - pawamoy +categories: + - General +description: > + We just released 9.7.0 – the final version of Material for MkDocs, which includes all features that were previously exclusive to sponsors +title: Insiders – Now free for everyone +slug: insiders-now-free-for-everyone +--- + +# Material for MkDocs Insiders – Now free for everyone + +__[9.7.0], the final version of Material for MkDocs, includes all features that were previously exclusive to sponsors, making Material for MkDocs Insiders available to everyone!__ + +As we're shifting our efforts to [Zensical], Material for MkDocs is entering [maintenance mode]. This means that while we'll continue to fix critical bugs and security issues for 12 month at least, no new features will be added to Material for MkDocs. + +We're also discontinuing our sponsorware model, saying [goodbye to GitHub Sponsors]. If you were a sponsor of our work, you already received an email mentioning that your sponsorship was cancelled. As one of the numerous individuals and organizations sponsoring Material for MkDocs over the past years – thank you! Your continued support has been invaluable. + +Now, we want everyone to benefit from all features we have developed for Material for MkDocs, which is why we're making all Insiders features available to everyone! + +This is the logical next step in our journey as we focus on Zensical – our next-generation static site generator built from the ground up to overcome MkDocs' technical limitations. Zensical is fully [Open Source, licensed under MIT], maintains [compatibility with Material for MkDocs], and can build your existing projects with minimal changes. + +In the coming months, we'll close the [feature parity] gap, bringing the expressiveness of Material for MkDocs to Zensical. + +_You can subscribe to [our newsletter] to stay in the loop_. + + + + [9.7.0]: ../../changelog/index.md#9.7.0 + [Zensical]: https://zensical.org + [maintenance mode]: https://github.com/squidfunk/mkdocs-material/issues/8523 + [goodbye to GitHub Sponsors]: zensical.md#goodbye-github-sponsors + [compatibility with Material for MkDocs]: zensical.md#maximum-compatibility + [Open Source, licensed under MIT]: https://zensical.org/about/license/ + [feature parity]: https://zensical.org/compatibility/features/ + [our newsletter]: https://zensical.org/about/newsletter/ + +--- + +__This is the third article in a four-part series:__ + +1. [Transforming Material for MkDocs] +2. [Zensical – A modern static site generator built by the creators of Material for MkDocs] +3. Material for MkDocs Insiders – Now free for everyone +4. A path forward for our community coming November 18, 2025 + + [Transforming Material for MkDocs]: transforming-material-for-mkdocs.md + [Zensical – A modern static site generator built by the creators of Material for MkDocs]: zensical.md + +## Available features + +Our sponsors have enjoyed exclusive access to the following premium features +for quite some time. With the release of [9.7.0], all these features are now available to everyone: + +
+ +- [x] [Blog plugin: pinned posts] +- [x] [Instant previews] +- [x] [Footnote tooltips] +- [x] [Tags plugin: advanced settings] +- [x] [Tags plugin: nested tags] +- [x] [Tags plugin: shadow tags] +- [x] [Stay on page when switching languages] +- [x] [Blog plugin: author profiles] +- [x] [Blog plugin: advanced settings] +- [x] [Projects plugin] +- [x] [Instant prefetching] +- [x] [Social plugin: custom layouts] +- [x] [Social plugin: background images] +- [x] [Code range selection] +- [x] [Code annotations: custom selectors] +- [x] [Privacy plugin: advanced settings] +- [x] [Optimize plugin] +- [x] [Navigation path] (Breadcrumbs) +- [x] [Typeset plugin] +- [x] [Privacy plugin: external links] + +
+ + [Optimize plugin]: ../../plugins/optimize.md + [Navigation path]: ../../setup/setting-up-navigation.md#navigation-path + [Blog plugin: advanced settings]: ../../setup/setting-up-a-blog.md#advanced-settings + [Blog plugin: author profiles]: ../../setup/setting-up-a-blog.md#adding-author-profiles + [Blog plugin: pinned posts]: ../../setup/setting-up-a-blog.md#pinning-a-post + [Instant prefetching]: ../../setup/setting-up-navigation.md#instant-prefetching + [Typeset plugin]: ../../plugins/typeset.md + [Footnote tooltips]: ../../reference/footnotes.md#footnote-tooltips + [Privacy plugin: external links]: ../../plugins/privacy.md#external-links + [Privacy plugin: advanced settings]: ../../setup/ensuring-data-privacy.md#advanced-settings + [Instant previews]: ../../setup/setting-up-navigation.md#instant-previews + [Social plugin: custom layouts]: ../../setup/setting-up-social-cards.md#customization + [Social plugin: background images]: ../../plugins/social.md#option.background_image + [Code range selection]: ../../reference/code-blocks.md#code-selection-button + [Code annotations: custom selectors]: ../../reference/code-blocks.md#custom-selectors + [Stay on page when switching languages]: ../../setup/changing-the-language.md#stay-on-page + [Projects plugin]: ../../plugins/projects.md + [Tags plugin: nested tags]: ../../setup/setting-up-tags.md#nested-tags + [Tags plugin: shadow tags]: ../../setup/setting-up-tags.md#shadow-tags + [Tags plugin: advanced settings]: ../../setup/setting-up-tags.md#advanced-settings + +!!! tip "[mkdocstrings Insiders is now free] as well" + + With [Timothée joining the Zensical team], he announced that all features previously reserved to his sponsors as part of [mkdocstrings] Insiders are now free for everyone as well! + + [mkdocstrings Insiders is now free]: https://pawamoy.github.io/posts/sunsetting-the-sponsorware-strategy/ + [Timothée joining the Zensical team]: zensical.md#were-growing-our-team + [mkdocstrings]: https://mkdocstrings.github.io/ + +## How to upgrade + +You can upgrade with the following command: + +``` +pip install --upgrade mkdocs-material +``` + +## Switching from Insiders + +If you've been a user of Insiders, we recommend to switch to the community edition as soon as possible, as it includes all Insiders features. This will make it much easier to handle third-party contributions, since no personal access tokens are necessary. + +__From now on, bug fixes that we make to Material for MkDocs will only be released to the community edition. Security vulnerabilities will be fixed in both editions.__ + +Thus, please adjust your `requirements.txt` and GitHub Actions workflows: + +```diff +- pip install git+https://${GH_TOKEN}@github.com/squidfunk/mkdocs-material-insiders. git ++ pip install mkdocs-material + +``` + +The Insiders repository itself will remain available for the next 6 months. When you build your project with Insiders, it will now show an informational message pointing to this blog post. + +- __On February 1, 2026, this message will be turned into a warning__. +- __On May 1, 2026, the Insiders repository will be deleted__. + +## Sunsetting preparation + +Entering [maintenance mode], we're preparing Material for MkDocs for sunsetting. + +!!! warning "Material for MkDocs is now in maintenance mode" + + We want to be transparent about the risks of staying on Material for MkDocs. With [MkDocs unmaintained] and facing fundamental supply chain concerns, we cannot guarantee Material for MkDocs will continue working reliably in the future. We're aware that transitioning takes time, which is why we commit to support it at least for the next 12 months, fixing critical bugs and security vulnerabilities as needed, but the path forward is with Zensical. + + If documentation plays a critical role in your organization, and you're worried how this might affect your business, consider joining [Zensical Spark](https://zensical.org/spark/), or feel free to schedule a call by reaching out at contact@zensical.org. + + [MkDocs unmaintained]: https://github.com/squidfunk/mkdocs-material/discussions/8461 + +### Deprecations + +While we release all features to the general public, at the same time, we're deprecating the [Projects plugin] and the [Typeset plugin] due to maintainability issues. This means that these plugins will not receive any further updates, including no more bug fixes. + +The reason for this decision is that both plugins rely on too many workarounds to make them work with MkDocs, and subsequently have been key motivators to create [Zensical]. If you rely on these plugins, and they work for your use case, you can of course continue to use them. + +__With Zensical, we'll be shipping proper [sub-project support], including [internationalization] and [versioning], designing these features together with our professional users in [Zensical Spark].__ + + [Zensical Spark]: https://zensical.org/spark/ + [sub-project support]: https://zensical.org/about/roadmap/#subprojects + [internationalization]: https://zensical.org/about/roadmap/#internationalization + [versioning]: https://zensical.org/about/roadmap/#versioning + +### Version ranges + +Material for MkDocs has used semver version ranges for dependencies to ensure compatibility. With the advent of [9.7.0], we're switching from semver to minimal version ranges. This provides more flexibility in dependency resolution, specifically to allow users to use newer versions of dependencies that include important bug fixes or security patches. + +### Security + +We will not transfer ownership of the Material for MkDocs repository to another individual or organization. The repository and PyPI package will remain under the ownership of @squidfunk, which preserves the trusted supply chain our users depend on. + +Thus, if you wish to take on maintenance of Material for MkDocs, please create a fork. + +## Looking ahead + +### Achieving sustainability + +Where Material for MkDocs relied on sponsorware, Zensical takes a new approach, +to ensure it evolves to meet the needs of organizations building complex, enterprise-scale documentation. + +[Zensical Spark] is a collaborative space where professional users have a direct voice in shaping Zensical's future. Through a [structured design process] and together with our Zensical Spark members, we identify opportunities, validate proposals, and define priorities – turning their real-world documentation challenges into features that benefit the entire community. + +Reach out at contact@zensical.org to schedule a call to learn more about Zensical Spark, discuss your organization's needs, and how it helps us to make Zensical sustainable. + + [Zensical Spark]: https://zensical.org/spark/ + [structured design process]: https://zensical.org/spark/methodology/#our-approach + +### Our commitment to you + +If you're currently using Material for MkDocs, there's no need to rush. We're committed to keeping it secure and functional for the next 12 months while we focus our efforts on [Zensical]. + +The [9.7.0] release marks a significant shift – every Insiders feature is now available to everyone, with no sponsorship required. As we build [Zensical], each of these features will be rearchitected and improved. Zensical is entirely free and Open Source, ensuring the entire community benefits from our work without barriers. + +When you're ready to explore what's next, [Zensical is compatible with Material for MkDocs] and designed to be a natural evolution of the ideas and principles you already know. + +_If you loved Material for MkDocs and are excited about Zensical, we'll be providing new methods to support our work in the coming months, with the possibility of getting exclusive goodies._ + +_Subscribe to [our newsletter] to stay in the loop._ + + [Zensical is compatible with Material for MkDocs]: zensical.md#maximum-compatibility diff --git a/docs/blog/posts/transforming-material-for-mkdocs.md b/docs/blog/posts/transforming-material-for-mkdocs.md index 66376193ff9..be855a87b44 100644 --- a/docs/blog/posts/transforming-material-for-mkdocs.md +++ b/docs/blog/posts/transforming-material-for-mkdocs.md @@ -28,11 +28,12 @@ _Please note that this post includes several technical details in the footnotes, __This is the first article in a four-part series:__ 1. Transforming Material for MkDocs -2. [Zensical – A modern static site generator built by the creators of Material for MkDocs]. -3. What happens to the features in Insiders coming November 11, 2025 +2. [Zensical – A modern static site generator built by the creators of Material for MkDocs] +3. [Material for MkDocs Insiders – Now free for everyone] 4. A path forward for our community coming November 18, 2025 - [Zensical – A modern static site generator built by the creators of Material for MkDocs]: ./zensical.md + [Zensical – A modern static site generator built by the creators of Material for MkDocs]: zensical.md + [Material for MkDocs Insiders – Now free for everyone]: insiders-now-free-for-everyone.md ## A success story diff --git a/docs/blog/posts/zensical.md b/docs/blog/posts/zensical.md index fcd9f0614fd..873d5ad9617 100644 --- a/docs/blog/posts/zensical.md +++ b/docs/blog/posts/zensical.md @@ -42,11 +42,12 @@ _You can subscribe to [our newsletter] to stay in the loop_. __This is the second article in a four-part series:__ 1. [Transforming Material for MkDocs] -2. Zensical – A modern static site generator built by the creators of Material for MkDocs. -3. What happens to the features in Insiders coming November 11, 2025 +2. Zensical – A modern static site generator built by the creators of Material for MkDocs +3. [Material for MkDocs Insiders – Now free for everyone] 4. A path forward for our community coming November 18, 2025 - [Transforming Material for MkDocs]: ./transforming-material-for-mkdocs.md + [Transforming Material for MkDocs]: transforming-material-for-mkdocs.md + [Material for MkDocs Insiders – Now free for everyone]: insiders-now-free-for-everyone.md ## Why Zensical? diff --git a/docs/changelog/index.md b/docs/changelog/index.md index d18bb67ef5e..1c9ae46cb86 100644 --- a/docs/changelog/index.md +++ b/docs/changelog/index.md @@ -2,6 +2,53 @@ ## Material for MkDocs +### 9.7.0 November 11, 2025 { id="9.7.0" } + +!!! warning "Material for MkDocs is now in maintenance mode" + + This is the last release of Material for MkDocs that will receive new features. + Going forward, the Material for MkDocs team focuses on [Zensical], a next-gen + static site generator built from first principles. We will provide critical + bug fixes and security updates for Material for MkDocs for 12 months at least. + + [Read the full announcement on our blog] + +This release includes all features that were previously exclusive to the +Insiders edition. These features are now freely available to everyone. + +__Note on deprecated plugins__: The [projects] and [typeset] plugins are +included in this release, but must be considered deprecated. Both plugins +proved unsustainable to maintain and represent architectural dead ends. They +are provided as-is without ongoing support. + +__Changes__: + +- Added support for projects plugin (for compat, now deprecated) +- Added support for typeset plugin (for compat, now deprecated) +- Added support for pinned blog posts and author profiles +- Added support for customizing pagination for blog index pages +- Added support for customizing blog category sort order +- Added support for staying on page when switching languages +- Added support for disabling tags in table of contents +- Added support for nested tags and shadow tags +- Added support for footnote tooltips +- Added support for instant previews +- Added support for instant prefetching +- Added support for custom social card layouts +- Added support for custom social card background images +- Added support for selectable rangs in code blocks +- Added support for custom selectors for code annotations +- Added support for configurable log level in privacy plugin +- Added support for processing of external links in privacy plugin +- Added support for automatic image optimization via optimize plugin +- Added support for navigation paths (breadcrumbs) +- Fixed #8519: Vector accents do not render when using KaTeX + + [Zensical]: https://zensical.org + [Read the full announcement on our blog]: ../blog/posts/zensical.md + [projects]: ../plugins/projects.md + [typeset]: ../plugins/typeset.md + ### 9.6.23 November 1, 2025 { id="9.6.23" } - Updated Burmese translation diff --git a/docs/contributing/making-a-pull-request.md b/docs/contributing/making-a-pull-request.md index 8dca0bfb2f1..6f1f0e19a5c 100644 --- a/docs/contributing/making-a-pull-request.md +++ b/docs/contributing/making-a-pull-request.md @@ -86,27 +86,25 @@ sequenceDiagram ``` 1. The first step is that you create a fork of the Material for MkDocs - repository, either [mkdocs-material] or [mkdocs-material-insiders] - (only accessible to sponsors). This provides you with a repository that you - can push changes to. Note that it is not possible to have more than one fork - of a given repository at any point in time. So, the fork you create will be - *the* fork you have. + repository. This provides you with a repository that you can push changes to. + Note that it is not possible to have more than one fork of a given repository + at any point in time. So, the fork you create will be *the* fork you have. -2. Once it is made, clone it to your local machine so you can start working on +1. Once it is made, clone it to your local machine so you can start working on your changes. -3. All contributions should be made through a 'topic branch' with a name that +2. All contributions should be made through a 'topic branch' with a name that describes the work being done. This allows you to have more than one piece of work in progress and, if you are working with the public version, also shows others clearly that the code contained is work in progress. The topic branch will be relatively short-lived and will disappear at the end, when your changes have been incorporated into the codebase. -4. If you intend to make any code changes, as opposed to working on +3. If you intend to make any code changes, as opposed to working on documentation only, you will need to [set up a development environment](#setting-up-a-development-environment). -5. Next comes the iterative process of making edits, committing them to your +4. Next comes the iterative process of making edits, committing them to your clone. Please commit in sensible chunks that constitute a piece of work instead of committing everything in one go. @@ -116,23 +114,23 @@ sequenceDiagram reviewer in mind when committing. In particular, make sure to write meaningful commit messages. -6. Push your work up to your fork regularly. +5. Push your work up to your fork regularly. -7. You should also keep an eye on changes in the Material for MkDocs repository +6. You should also keep an eye on changes in the Material for MkDocs repository you cloned. This is especially important if you work takes a while. Please try and merge any concurrent changes into your fork and into your branch regularly. You *must* do this at least once before creating a pull request, so make your life easier and do it more often so as to minimize the risk of conflicting changes. -8. Once you are happy that your changes are in a state that you can describe +7. Once you are happy that your changes are in a state that you can describe them in a *draft* pull request, you should create this. Make sure to reference any previous discussions or issues that gave rise to your work. Creating a draft is a good way to get *early* feedback on your work from the maintainer or others. You can explicitly request reviews at points where you think this would be important. -9. Review your work as if you were the reviewer and fix any issues with your +8. Review your work as if you were the reviewer and fix any issues with your work so far. Look critically at the diffs of the files that you have changed. In particular, pay attention to whether the changes are as small as possible and whether you have follow the general coding style used in the project. @@ -144,8 +142,6 @@ sequenceDiagram folder. You may also want to make sure that relevant examples from the [examples repository] still build fine. -[mkdocs-material]: https://github.com/squidfunk/mkdocs-material -[mkdocs-material-insiders]: https://github.com/squidfunk/mkdocs-material-insiders/ [examples repository]: https://github.com/mkdocs-material/examples ### Finalizing @@ -243,22 +239,13 @@ repositories on GitHub. This is so that you have a repository on GitHub that you can push changes to (only maintainers and collaborators have write access to the original repositories). -Fork the [repository for the public version] if you want to make changes to -code that is in the public version or if you want to make changes to the -documentation. It is a good idea to change the name of the repository by -appending `-fork` so that people who come across it know that they have found a -temporary fork rather then the original or a permanent fork of the project. -You may also want to add a description that clarifies what the repository is for. +Fork the [repository] if you want to make changes to code or to the documentation. +It is a good idea to change the name of the repository by appending `-fork` so +that people who come across it know that they have found a temporary fork rather +than the original or a permanent fork of the project. You may also want to add +a description that clarifies what the repository is for. -[repository for the public version]: https://github.com/squidfunk/mkdocs-material - -To make changes to functionality available only within the Insiders version, -fork [the Insiders repository]. Note that the fork will be a private repository. -Please respect the [terms of the Insiders program] and the spirit of the -Sponsorware approach used to maintain and develop Material for MkDocs. - -[the Insiders repository]: https://github.com/squidfunk/mkdocs-material-insiders/ -[terms of the Insiders program]: https://squidfunk.github.io/mkdocs-material/insiders/license/#fair-use-policy +[repository]: https://github.com/squidfunk/mkdocs-material ### Setting up a development environment @@ -346,21 +333,13 @@ to build a project to serve as a test suite. It can double as documentation that shows how your new feature is meant to work. - Test with relevant examples from the [Material for MkDocs Examples] - repository. Note that to build all examples in one go you need the projects - plugin from Insiders but you can always build the examples individually - using the public version. + repository. [smoke tests]: https://en.wikipedia.org/wiki/Smoke_testing_(software) [minimal reproduction]: https://squidfunk.github.io/mkdocs-material/guides/creating-a-reproduction/ [Material for MkDocs Examples]: https://github.com/mkdocs-material/examples -- Ideally, also test the examples in the [examples repository]. If you are -working on the Insiders edition of Material for MkDocs, you can simply start a -build at the top level and the [projects plugin] will build all of the examples -for you. If you are on the public version, you will need to build each -sub-project individually. We appreciate that this is a growing collection of -examples and you may want to prioritize those that are most relevant to the -functionality you change. +- Ideally, also test the examples in the [examples repository]. [examples repository]: https://github.com/mkdocs-material/examples [projects plugin]: https://squidfunk.github.io/mkdocs-material/plugins/projects/ diff --git a/docs/conventions.md b/docs/conventions.md index a9da90ed1f7..54b561918b3 100644 --- a/docs/conventions.md +++ b/docs/conventions.md @@ -8,24 +8,12 @@ This documentation use some symbols for illustration purposes. Before you read on, please make sure you've made yourself familiar with the following list of conventions: -### – Sponsors only { data-toc-label="Sponsors only" } - -The pumping heart symbol denotes that a specific feature or behavior is only -available to sponsors via [Insiders]. Make sure that you have access to -[Insiders] if you want to use the feature. - ### – Version { data-toc-label="Version" } The tag symbol in conjunction with a version number denotes when a specific feature or behavior was added. Make sure you're at least on this version if you want to use it. -### – Version (Insiders) { data-toc-label="Version (Insiders)" } - -The tag symbol with a heart in conjunction with a version number denotes that a -specific feature or behavior was added to the [Insiders] version of Material for -MkDocs. - ### – Default value { #default data-toc-label="Default value" } Some properties in `mkdocs.yml` have default values for when the author does not @@ -89,6 +77,3 @@ added by the author. Besides plugins, there are some utilities that build on top of MkDocs in order to provide extended functionality, like for example support for versioning. - - [Insiders]: insiders/index.md - diff --git a/docs/customization.md b/docs/customization.md index e7f7ac81b1c..8d5f8d7bd67 100644 --- a/docs/customization.md +++ b/docs/customization.md @@ -262,37 +262,12 @@ directly in the source of the theme and recompile it. ### Environment setup -First, clone the repository for the edition you want to work on. If -you want to clone the Insiders repository, you need to become a -sponsor first to gain access. +First, clone the repository: - [Insiders]: insiders/index.md - -=== "Material for MkDocs" - - ``` - git clone https://github.com/squidfunk/mkdocs-material - cd mkdocs-material - ``` - -=== "Insiders" - - You will need to have a GitHub access token [as described in the - Insiders documentation] and make it available in the `$GH_TOKEN` - variable. - - ``` sh - git clone https://${GH_TOKEN}@github.com/squidfunk/mkdocs-material-insiders.git # (1)! - ``` - - 1. If you are using SSH keys for authenticating with GitHub, you can - clone Insiders with this command: - - ``` - git clone git@github.com:squidfunk/mkdocs-material-insiders.git - ``` - - [as described in the Insiders documentation]: insiders/getting-started.md#requirements +``` +git clone https://github.com/squidfunk/mkdocs-material +cd mkdocs-material +``` Next, create a new [Python virtual environment][venv] and [activate][venv-activate] it: @@ -321,25 +296,15 @@ source venv/bin/activate Then, install all Python dependencies: -=== "Material for MkDocs" - - ``` - pip install -e ".[recommended]" - pip install nodeenv - ``` - -=== "Insiders" - - ``` - pip install -e ".[recommended, imaging]" - pip install nodeenv - ``` - - In addition, you will need to install the `cairo` and `pngquant` libraries in your - system, as described in the [image processing] requirements guide. +``` +pip install -e ".[git, recommended, imaging]" +pip install nodeenv +``` - [image processing]: plugins/requirements/image-processing.md +In addition, you will need to install the `cairo` and `pngquant` libraries in your +system, as described in the [image processing] requirements guide. +[image processing]: plugins/requirements/image-processing.md Finally, install the [Node.js] LTS version into the Python virtual environment and install all Node.js dependencies: diff --git a/docs/enterprise-support.md b/docs/enterprise-support.md deleted file mode 100644 index bd027ffe97a..00000000000 --- a/docs/enterprise-support.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -status: new ---- - -# Enterprise Feedback - -We highly value the insights of our enterprise users, and we're eager to hear -from you. Your feedback is immensely valuable to us. If you're utilizing -Material for MkDocs in an enterprise context and would like to share your -experiences with us, we'd love to connect and discuss: - -- What you are building with it -- What aspects you like about it -- What challenges you are facing -- What could be improved - -## Let's Connect - -To schedule a convenient appointment, please reach out to us via email at -contact@squidfunk.com and provide us with the following details: - -- Your company's name -- How you are using Material for MkDocs -- Any specific questions or topics you'd like to address - -Once we have this information, we'll promptly get in touch with you to arrange -a 30-minute call. Please note that this call is exclusively intended for -enterprise users and is not meant for technical support. Instead, it's an -opportunity for us to engage in a casual conversation to better understand your -unique needs. - -We look forward to our discussion! diff --git a/docs/getting-started.md b/docs/getting-started.md index b5e0b3dd04d..b58a7579abb 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -133,28 +133,13 @@ The following plugins are bundled with the Docker image: Material for MkDocs only bundles selected plugins in order to keep the size of the official image small. If the plugin you want to use is not included, - you can add them easily: + you can add them easily. Create a `Dockerfile` and extend the official image: - === "Material for MkDocs" - - Create a `Dockerfile` and extend the official image: - - ``` Dockerfile title="Dockerfile" - FROM squidfunk/mkdocs-material - RUN pip install mkdocs-macros-plugin - RUN pip install mkdocs-glightbox - ``` - - === "Insiders" - - Clone or fork the Insiders repository, and create a file called - `user-requirements.txt` in the root of the repository. Then, add the - plugins that should be installed to the file, e.g.: - - ``` txt title="user-requirements.txt" - mkdocs-macros-plugin - mkdocs-glightbox - ``` + ``` Dockerfile title="Dockerfile" + FROM squidfunk/mkdocs-material + RUN pip install mkdocs-macros-plugin + RUN pip install mkdocs-glightbox + ``` Next, build the image with the following command: diff --git a/docs/plugins/blog.md b/docs/plugins/blog.md index a76db4b7d1a..3ea555a5080 100644 --- a/docs/plugins/blog.md +++ b/docs/plugins/blog.md @@ -758,8 +758,7 @@ The following placeholders are available: #### - - + Use this setting to enable or disable pagination for archive pages. The value @@ -776,8 +775,7 @@ plugins: #### - - + Use this setting to change the number of posts rendered per archive page. The @@ -920,8 +918,7 @@ plugins: #### - - + Use this setting to specify a custom function for sorting categories. For @@ -942,8 +939,7 @@ that can be compared while sorting, i.e., a string or number. #### - - + Use this setting to reverse the order in which categories are sorted. By @@ -983,8 +979,7 @@ this list. Posts can be assigned to categories by using the [`categories`] #### - - + Use this setting to enable or disable pagination for category pages. The value @@ -1001,8 +996,7 @@ plugins: #### - - + Use this setting to change the number of posts rendered per category page. The @@ -1102,8 +1096,7 @@ The provided path is resolved from the [`docs` directory][mkdocs.docs_dir]. #### - - + Use this setting to enable or disable automatically generated author profiles. @@ -1120,8 +1113,7 @@ plugins: #### - - + Use this setting to change the title of the authors section the plugin adds to @@ -1138,8 +1130,7 @@ plugins: #### - - + Use this setting to change the format string that is used when generating @@ -1171,8 +1162,7 @@ The following placeholders are available: #### - - + Use this setting to enable or disable pagination for author profiles. The value @@ -1189,8 +1179,7 @@ plugins: #### - - + Use this setting to change the number of posts rendered per archive page. The @@ -1207,8 +1196,7 @@ plugins: #### - - + Use this setting to leverage the table of contents to display post titles on all @@ -1595,8 +1583,7 @@ draft: true #### - - + @@ -1618,8 +1605,7 @@ pin: true #### - - + diff --git a/docs/plugins/optimize.md b/docs/plugins/optimize.md index 231c31eda87..6b30e1a4993 100644 --- a/docs/plugins/optimize.md +++ b/docs/plugins/optimize.md @@ -10,13 +10,7 @@ The optimize plugin automatically identifies and optimizes all media files when As a result, your site loads significantly faster and yields better rankings in search engines. ---- - - __Sponsors only__ – this plugin is currently reserved to -[our awesome sponsors]. - [building your project]: ../creating-your-site.md#building-your-site - [our awesome sponsors]: ../insiders/index.md ## Objective @@ -83,8 +77,7 @@ build pipelines tailored to your project: ## Configuration - - + @@ -118,8 +111,7 @@ The following settings are available: #### - - + Use this setting to enable or disable the plugin when [building your project]. @@ -138,8 +130,7 @@ This configuration enables the plugin only during continuous integration (CI). #### - - + With more CPUs available, the plugin can do more work in parallel, and thus @@ -169,8 +160,7 @@ The following settings are available for caching: #### - - + Use this setting to instruct the plugin to bypass the cache, in order to @@ -188,8 +178,7 @@ plugins: #### - - + It is normally not necessary to specify this setting, except for when you want @@ -224,8 +213,7 @@ The following settings are available for optimization: #### - - + Use this setting to enable or disable media file optimization. Currently, @@ -243,8 +231,7 @@ plugins: #### - - + Use this setting to enable or disable the optimization of `.png` files. It's @@ -261,8 +248,7 @@ plugins: #### - - + Use this setting to specify the speed/quality tradeoff that [pngquant] applies @@ -291,8 +277,7 @@ A factor of `10` has 5% lower quality, but is 8x faster than the default `3`. #### - - + Use this setting to specify whether [pngquant] should strip optional metadata @@ -311,8 +296,7 @@ plugins: #### - - + Use this setting to enable or disable the optimization of `.jpg` files. It's @@ -329,8 +313,7 @@ plugins: #### - - + Use this setting to specify the image quality that [Pillow] applies when @@ -347,8 +330,7 @@ plugins: #### - - + Use this setting to specify whether [Pillow] should use progressive encoding @@ -367,8 +349,7 @@ plugins: #### - - + Use this setting to enable media file optimization for specific directories @@ -390,8 +371,7 @@ in the `screenshots` folder and its subfolders inside the [`docs` directory] #### - - + Use this setting to disable media file optimization for specific directories @@ -417,8 +397,7 @@ The following settings are available for reporting: #### - - + Use this setting to control whether the plugin should print the number of bytes @@ -434,8 +413,7 @@ plugins: #### - - + Use this setting to control whether the plugin should print the total number of diff --git a/docs/plugins/privacy.md b/docs/plugins/privacy.md index 910bca03758..d68f3b9d5d5 100644 --- a/docs/plugins/privacy.md +++ b/docs/plugins/privacy.md @@ -221,8 +221,7 @@ The following settings are available for logging: #### - - + Use this setting to control whether the plugin should display log messages when @@ -238,8 +237,7 @@ plugins: #### - - + Use this setting to control the log level that the plugin should employ when @@ -356,8 +354,7 @@ This configuration stores the downloaded copies at `my/custom/dir` in the #### - - + Use this setting to enable downloading of external assets for specific origins, @@ -375,8 +372,7 @@ plugins: #### - - + Use this setting to disable downloading of external assets for specific origins, @@ -415,8 +411,7 @@ The following settings are available for external links: #### - - + Use this setting to instruct the plugin to parse and process external links to @@ -436,8 +431,7 @@ plugins: #### - - + Use this setting to specify additional attributes that should be added to @@ -455,8 +449,7 @@ plugins: #### - - + It is normally not recommended to change this setting, as it will automatically diff --git a/docs/plugins/projects.md b/docs/plugins/projects.md index c7327abc639..5a36247c114 100644 --- a/docs/plugins/projects.md +++ b/docs/plugins/projects.md @@ -1,6 +1,7 @@ --- title: Built-in projects plugin icon: material/folder-open +status: deprecated --- # Built-in projects plugin @@ -10,12 +11,20 @@ distinct projects, build them concurrently and preview them together as one. This is particularly useful when creating a multi-language project, but can also be used to split very large projects into smaller parts. ---- +!!! bug "The built-in projects plugin is deprecated" + + [Material for MkDocs is in maintenance mode]. The projects plugin, which was + formely part of the [Insiders] edition, was released in , the last release that includes all features from the Insiders edition. + Unfortunately, the projects plugin turned out impossible to maintain, and + was one of the key motivators to create [Zensical]. + + --- - __Sponsors only__ – this plugin is currently reserved to -[our awesome sponsors]. + __If you're considering the projects plugin, please be aware that known issues will not be fixed.__ - [our awesome sponsors]: ../insiders/index.md + [Material for MkDocs is in maintenance mode]: https://github.com/squidfunk/mkdocs-material/issues/8523 + [Zensical]: ../blog/posts/zensical.md + [Insiders]: ../insiders/index.md ## Objective @@ -70,8 +79,7 @@ and building more comfortable. ## Configuration - - + @@ -97,8 +105,7 @@ The following settings are available: #### - - + Use this setting to enable or disable the plugin when [building your project]. @@ -119,8 +126,7 @@ This configuration enables the plugin only during continuous integration (CI). #### - - + With more CPUs available, the plugin can do more work in parallel, and thus @@ -150,8 +156,7 @@ The following settings are available for caching: #### - - + Use this setting to instruct the plugin to bypass the cache, in order to @@ -169,8 +174,7 @@ plugins: #### - - + It is normally not necessary to specify this setting, except for when you want @@ -191,8 +195,7 @@ The following settings are available for logging: #### - - + Use this setting to control whether the plugin should display log messages from @@ -209,8 +212,7 @@ plugins: #### - - + Use this setting to control the log level that the plugin should employ when @@ -266,8 +268,7 @@ The following settings are available for projects: #### - - + Use this setting to enable or disable building of projects. Currently, the @@ -285,8 +286,7 @@ plugins: #### - - + Use this setting to change the folder where your projects are located. It's @@ -309,8 +309,7 @@ The provided path is resolved from the root directory. #### - - + Use this setting to change the location or name of configuration files the @@ -358,8 +357,7 @@ The provided path is resolved from the [`projects` directory] #### - - + Use this setting to transform the configuration of each project as read from @@ -414,8 +412,7 @@ The following settings are available for hoisting: #### - - + Use this setting to enable or disable hoisting of themes files to the main diff --git a/docs/plugins/social.md b/docs/plugins/social.md index 123d2dc09fe..d7aa8eb5db7 100644 --- a/docs/plugins/social.md +++ b/docs/plugins/social.md @@ -143,8 +143,7 @@ This configuration enables the plugin only during continuous integration (CI). #### - - + With more CPUs available, the plugin can do more work in parallel, and thus @@ -174,8 +173,7 @@ The following settings are available for caching: #### - - + Use this setting to instruct the plugin to bypass the cache, in order to @@ -220,8 +218,7 @@ The following settings are available for logging: #### - - + Use this setting to control whether the plugin should only log errors when @@ -238,8 +235,7 @@ plugins: #### - - + Use this setting to control the log level that the plugin should employ when @@ -323,8 +319,7 @@ This configuration stores the generated images at `my/custom/dir` in the #### - - + If you want to build a [custom social card layout][custom layouts], use this @@ -360,8 +355,7 @@ The provided path is resolved from the root directory. #### - - + The plugin ships a growing list of [`default` layouts][default layouts] for @@ -434,8 +428,7 @@ defining which parts of your layout can be parametrized. The [`default` layouts] #### - - + Use this setting to enable social card generation for subsections of your @@ -457,8 +450,7 @@ contained in the `blog` folder and its subfolders inside the [`docs` directory] #### - - + Use this setting to disable social card generation for subsections of your @@ -488,8 +480,7 @@ The following settings are available for debugging: #### - - + Use this setting to enable a special mode for debugging your layout, which @@ -507,8 +498,7 @@ plugins: #### - - + By default, the plugin automatically disables [`debug`][config.debug] mode when @@ -528,8 +518,7 @@ be a safety net. #### - - + When [`debug`][config.debug] mode is enabled, this setting specifies whether a @@ -546,8 +535,7 @@ plugins: #### - - + Use this setting to specify the step size of the dot grid in pixels, if enabled, @@ -564,8 +552,7 @@ plugins: #### - - + Use this setting to specify the color of the outlines that are added to each @@ -600,8 +587,7 @@ The following properties are available: #### - - + @@ -622,8 +608,7 @@ social: #### - - + @@ -645,8 +630,7 @@ social: #### - - + @@ -669,8 +653,7 @@ Setting an option to `#!yaml null` resets the option. ### Layouts - - + While it is possible and simple to build [custom layouts], the plugin ships several predefined layouts, all of which are prefixed with `default`. The @@ -871,8 +854,7 @@ plugins: #### - - + Use this option to define a background image for the generated social card. Note @@ -985,8 +967,7 @@ no further configuration needed. #### - - + Use this option to change the font variant used to generate the social card. @@ -1008,8 +989,7 @@ plugin is instructed to use combinations like `Condensed Regular` or #### - - + Use this option to change the logo that is used in the generated social card. @@ -1032,8 +1012,7 @@ The provided path is resolved from the root directory. #### - - + Use this option to change the title of the generated social card. This overrides @@ -1053,8 +1032,7 @@ plugins: #### - - + Use this option to change the description of the generated social card. This diff --git a/docs/plugins/tags.md b/docs/plugins/tags.md index bd1262e31c6..b1ac54068c9 100644 --- a/docs/plugins/tags.md +++ b/docs/plugins/tags.md @@ -232,8 +232,7 @@ The following placeholders are available: #### - - + @@ -251,8 +250,7 @@ plugins: #### - - + @@ -531,8 +529,7 @@ Using this setting, listings must now be referenced as such: #### - - + Use this setting to enable or disable tags showing up in the table of contents. @@ -553,8 +550,7 @@ The following settings are available for shadow tags: #### - - + Use this setting to specify whether the plugin should include shadow tags on @@ -581,8 +577,7 @@ deploy previews: #### - - + Use this setting to control whether the plugin should include shadow tags on @@ -601,8 +596,7 @@ plugins: #### - - + The plugin allows to specify a predefined list of shadow tags which can be @@ -621,8 +615,7 @@ plugins: #### - - + Use this setting to specify a string that is checked as a prefix for each tag. @@ -639,8 +632,7 @@ plugins: #### - - + Use this setting to specify a string that is checked as a suffix for each tag. @@ -662,8 +654,7 @@ The following settings are available for exporting: #### - - + Use this setting to control whether the plugin creates a `tags.json` file @@ -680,8 +671,7 @@ plugins: #### - - + Use this setting to change the path of the file where the exported tags are @@ -700,8 +690,7 @@ The provided path is resolved from the [`site` directory][mkdocs.site_dir]. #### - - + This setting is solely provided for convenience to disable the rendering of tags @@ -796,8 +785,7 @@ embedded in: #### - - + This setting specifies whether the listing should include shadow tags, which @@ -830,8 +818,7 @@ basis: #### - - + This setting specifies whether the listing should render tags inside the table diff --git a/docs/plugins/typeset.md b/docs/plugins/typeset.md index 3216ca6690a..dcde2971348 100644 --- a/docs/plugins/typeset.md +++ b/docs/plugins/typeset.md @@ -1,6 +1,7 @@ --- title: Built-in typeset plugin icon: material/format-title +status: deprecated --- # Built-in typeset plugin @@ -10,12 +11,20 @@ headlines within the navigation and table of contents. This means that code blocks, icons, emojis and any other inline formatting can be rendered exactly as defined in the page's content. ---- +!!! bug "The built-in typeset plugin is deprecated" + + [Material for MkDocs is in maintenance mode]. The typeset plugin, which was + formely part of the [Insiders] edition, was released in , the last release that includes all features from the Insiders edition. + Unfortunately, the typeset plugin turned out impossible to maintain, and + was one of the key motivators to create [Zensical]. + + --- - __Sponsors only__ – this plugin is currently reserved to -[our awesome sponsors]. + __If you're considering the typeset plugin, please be aware that known issues will not be fixed.__ - [our awesome sponsors]: ../insiders/index.md + [Material for MkDocs is in maintenance mode]: https://github.com/squidfunk/mkdocs-material/issues/8523 + [Zensical]: ../blog/posts/zensical.md + [Insiders]: ../insiders/index.md ## Objective @@ -44,8 +53,7 @@ interfere with other plugins. ## Configuration - - + @@ -72,8 +80,7 @@ The following settings are available: #### - - + Use this setting to enable or disable the plugin when [building your project]. diff --git a/docs/publishing-your-site.md b/docs/publishing-your-site.md index 539241a163e..86651b98f75 100644 --- a/docs/publishing-your-site.md +++ b/docs/publishing-your-site.md @@ -19,114 +19,64 @@ documentation. At the root of your repository, create a new GitHub Actions workflow, e.g. `.github/workflows/ci.yml`, and copy and paste the following contents: -=== "Material for MkDocs" - - ``` yaml - name: ci # (1)! - on: - push: - branches: - - master # (2)! - - main - permissions: - contents: write - jobs: - deploy: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Configure Git Credentials - run: | - git config user.name github-actions[bot] - git config user.email 41898282+github-actions[bot]@users.noreply.github.com - - uses: actions/setup-python@v5 - with: - python-version: 3.x - - run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV # (3)! - - uses: actions/cache@v4 - with: - key: mkdocs-material-${{ env.cache_id }} - path: ~/.cache # (4)! - restore-keys: | - mkdocs-material- - - run: pip install mkdocs-material # (5)! - - run: mkdocs gh-deploy --force - ``` +``` yaml +name: ci # (1)! +on: + push: + branches: + - master # (2)! + - main +permissions: + contents: write +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Configure Git Credentials + run: | + git config user.name github-actions[bot] + git config user.email 41898282+github-actions[bot]@users.noreply.github.com + - uses: actions/setup-python@v5 + with: + python-version: 3.x + - run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV # (3)! + - uses: actions/cache@v4 + with: + key: mkdocs-material-${{ env.cache_id }} + path: ~/.cache # (4)! + restore-keys: | + mkdocs-material- + - run: pip install mkdocs-material # (5)! + - run: mkdocs gh-deploy --force +``` - 1. You can change the name to your liking. - - 2. At some point, GitHub renamed `master` to `main`. If your default branch - is named `master`, you can safely remove `main`, vice versa. - - 3. Store the `cache_id` environmental variable to access it later during cache - `key` creation. The name is case-sensitive, so be sure to align it with `${{ env.cache_id }}`. - - - The `--utc` option makes sure that each workflow runner uses the same time zone. - - The `%V` format assures a cache update once a week. - - You can change the format to `%F` to have daily cache updates. - - You can read the [manual page] to learn more about the formatting options of the `date` command. - - 4. Some Material for MkDocs plugins use [caching] to speed up repeated - builds, and store the results in the `~/.cache` directory. - - 5. This is the place to install further [MkDocs plugins] or Markdown - extensions with `pip` to be used during the build: - - ``` sh - pip install \ - mkdocs-material \ - mkdocs-awesome-pages-plugin \ - ... - ``` - -=== "Insiders" - - ``` yaml - name: ci - on: - push: - branches: - - master - - main - permissions: - contents: write - jobs: - deploy: - runs-on: ubuntu-latest - if: github.event.repository.fork == false - steps: - - uses: actions/checkout@v4 - - name: Configure Git Credentials - run: | - git config user.name github-actions[bot] - git config user.email 41898282+github-actions[bot]@users.noreply.github.com - - uses: actions/setup-python@v5 - with: - python-version: 3.x - - run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV - - uses: actions/cache@v4 - with: - key: mkdocs-material-${{ env.cache_id }} - path: ~/.cache # (1)! - restore-keys: | - mkdocs-material- - - run: apt-get install pngquant # (2)! - - run: pip install git+https://${GH_TOKEN}@github.com/squidfunk/mkdocs-material-insiders.git - - run: mkdocs gh-deploy --force - env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} # (3)! - ``` +1. You can change the name to your liking. + +2. At some point, GitHub renamed `master` to `main`. If your default branch + is named `master`, you can safely remove `main`, vice versa. - 1. Some Material for MkDocs plugins use [caching] to speed up repeated - builds, and store the results in the `~/.cache` directory. +3. Store the `cache_id` environmental variable to access it later during cache + `key` creation. The name is case-sensitive, so be sure to align it with `${{ env.cache_id }}`. - 2. This step is only necessary if you want to use the - [built-in optimize plugin] to automatically compress images. + - The `--utc` option makes sure that each workflow runner uses the same time zone. + - The `%V` format assures a cache update once a week. + - You can change the format to `%F` to have daily cache updates. - 3. Remember to set the `GH_TOKEN` repository secret to the value of your - [personal access token] when deploying [Insiders], which can be done - using [GitHub secrets]. + You can read the [manual page] to learn more about the formatting options of the `date` command. + +4. Some Material for MkDocs plugins use [caching] to speed up repeated + builds, and store the results in the `~/.cache` directory. + +5. This is the place to install further [MkDocs plugins] or Markdown + extensions with `pip` to be used during the build: + + ``` sh + pip install \ + mkdocs-material \ + mkdocs-awesome-pages-plugin \ + ... + ``` Now, when a new commit is pushed to either the `master` or `main` branches, the static site is automatically built and deployed. Push your changes to see @@ -143,7 +93,6 @@ To publish your site on a custom domain, please refer to the [MkDocs documentati [GitHub Actions]: https://github.com/features/actions [MkDocs plugins]: https://github.com/mkdocs/mkdocs/wiki/MkDocs-Plugins [personal access token]: https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token - [Insiders]: insiders/index.md [built-in optimize plugin]: plugins/optimize.md [GitHub secrets]: https://docs.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets [publishing source branch]: https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site @@ -175,55 +124,26 @@ by using the [GitLab CI] task runner. At the root of your repository, create a task definition named `.gitlab-ci.yml` and copy and paste the following contents: -=== "Material for MkDocs" - - ``` yaml - pages: - stage: deploy - image: python:latest - script: - - pip install mkdocs-material - - mkdocs build --site-dir public - cache: - key: ${CI_COMMIT_REF_SLUG} - paths: - - ~/.cache/ # (1)! - artifacts: - paths: - - public - rules: - - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' - ``` - - 1. Some Material for MkDocs plugins use [caching] to speed up repeated - builds, and store the results in the `~/.cache` directory. - -=== "Insiders" - - ``` yaml - pages: - stage: deploy - image: python:latest - script: # (1)! - - pip install git+https://${GH_TOKEN}@github.com/squidfunk/mkdocs-material-insiders.git - - mkdocs build --site-dir public - cache: - key: ${CI_COMMIT_REF_SLUG} - paths: - - ~/.cache/ # (2)! - artifacts: - paths: - - public - rules: - - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' - ``` - - 1. Remember to set the `GH_TOKEN` repository secret to the value of your - [personal access token] when deploying [Insiders], which can be done - using [masked custom variables]. +``` yaml +pages: + stage: deploy + image: python:latest + script: + - pip install mkdocs-material + - mkdocs build --site-dir public + cache: + key: ${CI_COMMIT_REF_SLUG} + paths: + - ~/.cache/ # (1)! + artifacts: + paths: + - public + rules: + - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' +``` - 2. Some Material for MkDocs plugins use [caching] to speed up repeated - builds, and store the results in the `~/.cache` directory. +1. Some Material for MkDocs plugins use [caching] to speed up repeated + builds, and store the results in the `~/.cache` directory. Now, when a new commit is pushed to the [default branch] (typically `master` or `main`), the static site is automatically built and deployed. Commit and push diff --git a/docs/reference/code-blocks.md b/docs/reference/code-blocks.md index 414057a2597..7342733395b 100644 --- a/docs/reference/code-blocks.md +++ b/docs/reference/code-blocks.md @@ -86,8 +86,7 @@ theme: ### Code selection button - - + Code blocks can include a button to allow for the selection of line ranges by @@ -163,8 +162,7 @@ theme: #### Custom selectors - - + Normally, code annotations can only be [placed in comments], as comments can be diff --git a/docs/reference/content-tabs.md b/docs/reference/content-tabs.md index ded76bea170..264743a4b0a 100644 --- a/docs/reference/content-tabs.md +++ b/docs/reference/content-tabs.md @@ -46,8 +46,7 @@ open in a new tab: === "... or even me" You can copy the link of the tab and create a link on the same or any other -page. For example, you can [jump to the third tab above this paragraph][tab_1] -or to the [publishing guide for Insiders][tab_2]. +page. For example, you can [jump to the third tab above this paragraph][tab_1]. !!! tip "Readable anchor links" @@ -66,7 +65,6 @@ or to the [publishing guide for Insiders][tab_2]. Fore more information, please [see the extension guide][slugification]. [tab_1]: #anchor-links--or-even-me - [tab_2]: ../publishing-your-site.md#with-github-actions-insiders [Python Markdown Extensions]: https://facelessuser.github.io/pymdown-extensions/ [slugification]: ../setup/extensions/python-markdown-extensions.md#+pymdownx.tabbed.slugify diff --git a/docs/reference/footnotes.md b/docs/reference/footnotes.md index ad1c1b8bd31..7f45d0a68fc 100644 --- a/docs/reference/footnotes.md +++ b/docs/reference/footnotes.md @@ -28,13 +28,12 @@ See additional configuration options: ### Footnote tooltips - - + -[Insiders] allows to render footnotes as inline tooltips, so the user can read -the footnote without leaving the context of the document. Footnote tooltips can -be enabled in `mkdocs.yml` with: +Footnotes can be rendered as inline tooltips, so the user can read the footnote +without leaving the context of the document. Footnote tooltips can be enabled +in `mkdocs.yml` with: ``` yaml theme: @@ -46,8 +45,6 @@ __Footnote tooltips are enabled on our documentation__, so to try it out, you can just hover or focus any footnote on this page or any other page of our documentation. - [Insiders]: ../insiders/index.md - ## Usage ### Adding footnote references diff --git a/docs/reference/index.md b/docs/reference/index.md index d13590c2f27..a278dab8d4c 100644 --- a/docs/reference/index.md +++ b/docs/reference/index.md @@ -87,7 +87,6 @@ icon: material/emoticon-happy # (1)! - [Insiders]: ../insiders/index.md [icon search]: icons-emojis.md#search [navigation tabs]: ../setup/setting-up-navigation.md#navigation-tabs diff --git a/docs/setup/adding-a-git-repository.md b/docs/setup/adding-a-git-repository.md index 6ddbc0fce30..cf347f7e2df 100644 --- a/docs/setup/adding-a-git-repository.md +++ b/docs/setup/adding-a-git-repository.md @@ -321,7 +321,6 @@ The other configuration options of this extension are not officially supported by Material for MkDocs, which is why they may yield unexpected results. Use them at your own risk. - [Insiders]: ../insiders/index.md [git-committers]: https://github.com/ojacques/mkdocs-git-committers-plugin-2 [environment variable]: https://www.mkdocs.org/user-guide/configuration/#environment-variables [rate limits]: https://docs.github.com/en/rest/overview/resources-in-the-rest-api#rate-limiting diff --git a/docs/setup/building-an-optimized-site.md b/docs/setup/building-an-optimized-site.md index ac356eae365..3b133ee7fda 100644 --- a/docs/setup/building-an-optimized-site.md +++ b/docs/setup/building-an-optimized-site.md @@ -11,8 +11,7 @@ further useful automatic optimization techniques. ### Built-in projects plugin - - + @@ -89,8 +88,7 @@ extra: ### Built-in optimize plugin - - + diff --git a/docs/setup/changing-the-colors.md b/docs/setup/changing-the-colors.md index c306c4b63d8..bcaffff22b2 100644 --- a/docs/setup/changing-the-colors.md +++ b/docs/setup/changing-the-colors.md @@ -309,8 +309,6 @@ Material for MkDocs will now change the color palette each time the operating system switches between light and dark appearance, even when the user doesn't reload the site. - [Insiders]: ../insiders/index.md - ## Customization ### Custom colors diff --git a/docs/setup/changing-the-language.md b/docs/setup/changing-the-language.md index 054ef83fbc2..2ee216e7a10 100644 --- a/docs/setup/changing-the-language.md +++ b/docs/setup/changing-the-language.md @@ -99,35 +99,19 @@ The following properties are available for each alternate language: #### Stay on page - - + -[Insiders] improves the user experience when switching between languages, e.g., -if language `en` and `de` contain a page with the same path name, the user will -stay on the current page: +When switching between languages, e.g., if language `en` and `de` contain a page +with the same path name, the user will stay on the current page: -=== "Insiders" - - ``` - docs.example.com/en/ -> docs.example.com/de/ - docs.example.com/en/foo/ -> docs.example.com/de/foo/ - docs.example.com/en/bar/ -> docs.example.com/de/bar/ - ``` - -=== "Material for MkDocs" - - ``` - docs.example.com/en/ -> docs.example.com/de/ - docs.example.com/en/foo/ -> docs.example.com/de/ - docs.example.com/en/bar/ -> docs.example.com/de/ - ``` - -No configuration is necessary. We're working hard on improving multi-language -support in 2024, including making switching between languages even more seamless -in the future. +``` +docs.example.com/en/ -> docs.example.com/de/ +docs.example.com/en/foo/ -> docs.example.com/de/foo/ +docs.example.com/en/bar/ -> docs.example.com/de/bar/ +``` - [Insiders]: ../insiders/index.md +No configuration is necessary. ### Directionality diff --git a/docs/setup/ensuring-data-privacy.md b/docs/setup/ensuring-data-privacy.md index 3f4f1c757bc..113562c3e40 100644 --- a/docs/setup/ensuring-data-privacy.md +++ b/docs/setup/ensuring-data-privacy.md @@ -170,7 +170,7 @@ For a list of all settings, please consult the [plugin documentation]. when you want to host assets like images outside of your git repository in another location to keep them fresh and your repository lean. - Additionally, as of , the + Additionally, as of , the built-in privacy plugin was entirely rewritten and now works perfectly with the [built-in optimize plugin], which means that external assets can be passed through the same optimization pipeline as the rest of your @@ -279,24 +279,6 @@ For a list of all settings, please consult the [plugin documentation]. [built-in privacy plugin]: ../plugins/privacy.md [preconnect]: https://developer.mozilla.org/en-US/docs/Web/Performance/dns-prefetch -#### Advanced settings - - - - -The following advanced settings are currently reserved to our [sponsors] -[Insiders]. They are entirely optional, and don't affect the functionality of -the blog, but can be helpful for customizations: - -- [`log`][config.log] -- [`log_level`][config.log_level] - -We'll add more settings here, as we discover new use cases. - - [Insiders]: ../insiders/index.md - [config.log]: ../plugins/privacy.md#config.log - [config.log_level]: ../plugins/privacy.md#config.log_level - ## Customization ### Custom cookies diff --git a/docs/setup/setting-up-a-blog.md b/docs/setup/setting-up-a-blog.md index baabf57c654..180a21e452a 100644 --- a/docs/setup/setting-up-a-blog.md +++ b/docs/setup/setting-up-a-blog.md @@ -49,40 +49,7 @@ nav: For a list of all settings, please consult the [plugin documentation]. [plugin documentation]: ../plugins/blog.md - -#### Advanced settings - - - - -The following advanced settings are currently reserved to our [sponsors] -[Insiders]. They are entirely optional, and don't affect the functionality of -the blog, but can be helpful for customizations: - -- [`archive_pagination`][config.archive_pagination] -- [`archive_pagination_per_page`][config.archive_pagination_per_page] -- [`categories_sort_by`][config.categories_sort_by] -- [`categories_sort_reverse`][config.categories_sort_reverse] -- [`categories_pagination`][config.categories_pagination] -- [`categories_pagination_per_page`][config.categories_pagination_per_page] -- [`authors_profiles_pagination`][config.authors_profiles_pagination] -- [`authors_profiles_pagination_per_page`][config.authors_profiles_pagination_per_page] - -We'll add more settings here, as we discover new use cases. - - [Insiders]: ../insiders/index.md [built-in blog plugin]: ../plugins/blog.md - [built-in plugins]: ../insiders/getting-started.md#built-in-plugins - [start writing your first post]: #writing-your-first-post - - [config.archive_pagination]: ../plugins/blog.md#config.archive_pagination - [config.archive_pagination_per_page]: ../plugins/blog.md#config.archive_pagination_per_page - [config.categories_sort_by]: ../plugins/blog.md#config.categories_sort_by - [config.categories_sort_reverse]: ../plugins/blog.md#config.categories_sort_reverse - [config.categories_pagination]: ../plugins/blog.md#config.categories_pagination - [config.categories_pagination_per_page]: ../plugins/blog.md#config.categories_pagination_per_page - [config.authors_profiles_pagination]: ../plugins/blog.md#config.authors_profiles_pagination - [config.authors_profiles_pagination_per_page]: ../plugins/blog.md#config.authors_profiles_pagination_per_page ### RSS @@ -359,8 +326,7 @@ authors: #### Adding author profiles - - + If you wish to add a dedicated page for each author, you can enable author @@ -521,8 +487,7 @@ all links are correct. #### Pinning a post - - + If you want to pin a post to the top of the index page, as well as the archive diff --git a/docs/setup/setting-up-navigation.md b/docs/setup/setting-up-navigation.md index c9a61bab07c..ff8bf559f4d 100644 --- a/docs/setup/setting-up-navigation.md +++ b/docs/setup/setting-up-navigation.md @@ -52,8 +52,7 @@ especially useful for large documentation sites. #### Instant prefetching - - + @@ -93,8 +92,7 @@ experience. ### Instant previews - - + @@ -125,8 +123,7 @@ with the `data-preview` attribute: #### Automatic previews - - + @@ -337,8 +334,7 @@ theme: ### Navigation path Breadcrumbs { id=navigation-path } - - + @@ -542,8 +538,7 @@ hide: ### Hiding the navigation path - - + While the [navigation path] is rendered above the main headline, sometimes, it diff --git a/docs/setup/setting-up-social-cards.md b/docs/setup/setting-up-social-cards.md index 53fc620f0ca..af270e1a9fe 100644 --- a/docs/setup/setting-up-social-cards.md +++ b/docs/setup/setting-up-social-cards.md @@ -127,7 +127,7 @@ comes with CJK characters, e.g. one from the `Noto Sans` font family: ### Changing the layout - + @@ -154,7 +154,7 @@ the [built-in meta plugin]. ### Parametrizing the layout - + @@ -181,7 +181,7 @@ the [built-in meta plugin]. ### Disabling social cards - + @@ -200,15 +200,9 @@ social: ## Customization - - + -[Insiders] ships a ground up rewrite of the [built-in social plugin] and -introduces a brand new layout system based on a combination of YAML and -[Jinja templates] – the same engine Material for MkDocs uses for HTML -templating – allowing for the creation of complex custom layouts: -
@@ -256,9 +250,9 @@ just once, substantially accelerating card generation. The generated cards are cached to ensure they are only regenerated when their contents change. Layouts are written in YAML syntax. Before starting to create a custom layout, -it is a good idea to [study the pre-designed layouts] (link to [Insiders] -repository), in order to get a better understanding of how they work. Then, -create a new layout and reference it in `mkdocs.yml`: +it is a good idea to [study the pre-designed layouts], in order to get a better +understanding of how they work. Then, create a new layout and reference it in +`mkdocs.yml`: === ":octicons-file-code-16: `layouts/custom.yml`" @@ -284,11 +278,10 @@ haven't defined any layers, the cards are transparent. The following sections explain how to create custom layouts. - [Insiders]: ../insiders/index.md [built-in social plugin]: ../plugins/social.md [Google Fonts]: https://fonts.google.com/ [Jinja templates]: https://jinja.palletsprojects.com/en/3.1.x/ - [study the pre-designed layouts]: https://github.com/squidfunk/mkdocs-material-insiders/tree/master/src/plugins/social/layouts + [study the pre-designed layouts]: https://github.com/squidfunk/mkdocs-material/tree/master/src/plugins/social/layouts ### Size and offset @@ -318,7 +311,7 @@ useful for alignment and composition. #### Origin - + The `origin` for the `x` and `y` values can be changed, so that the layer is diff --git a/docs/setup/setting-up-tags.md b/docs/setup/setting-up-tags.md index af4877a6e43..ce28e55b944 100644 --- a/docs/setup/setting-up-tags.md +++ b/docs/setup/setting-up-tags.md @@ -27,25 +27,6 @@ For a list of all settings, please consult the [plugin documentation]. [plugin documentation]: ../plugins/tags.md -#### Advanced settings - - - - - -The following advanced settings are currently reserved to our [sponsors] -[Insiders]. They are entirely optional, and only add additional capabilities to -the tags plugin: - - -- [`listings_toc`][config.listings_toc] - -We'll add more settings here in the near future. - - [Insiders]: ../insiders/index.md - [config.listings_layout]: ../plugins/tags.md#config.listings_layout - [config.listings_toc]: ../plugins/tags.md#config.listings_toc - ### Tag icons and identifiers @@ -200,15 +181,6 @@ arbitrary content before and after the marker: ### Advanced features -[Insiders] ships a __ground up rewrite of the tags plugin__ which is infinitely -more powerful than the current version in the community edition. It allows -for an arbitrary number of tags indexes (listings), [scoped listings], -[shadow tags], [nested tags], and much more. - - [scoped listings]: #scoped-listings - [shadow tags]: #shadow-tags - [nested tags]: #nested-tags - #### Configurable listings @@ -252,8 +224,7 @@ See the [listing configuration] for all options. #### Scoped listings - - + If your documentation is large, you might want to consider using scoped listings @@ -283,8 +254,7 @@ You can now use: #### Shadow tags - - + Shadow tags are tags that are solely meant to organization, which can be @@ -308,14 +278,12 @@ This is an excellent opportunity for using tags for structuring. #### Nested tags - - + -[Insiders] ships support for nested tags. The -[`tags_hierarchy_separator`][config.tags_hierarchy_separator] allows to create -hierarchies of tags, e.g., `Foo/Bar`. Nested tags will be rendered as children -of the parent tag: +The [`tags_hierarchy_separator`][config.tags_hierarchy_separator] allows to +create hierarchies of tags, e.g., `Foo/Bar`. Nested tags will be rendered as +children of the parent tag: ``` yaml plugins: diff --git a/docs/setup/setting-up-the-footer.md b/docs/setup/setting-up-the-footer.md index 35194f27ba4..2d45ae41d8a 100644 --- a/docs/setup/setting-up-the-footer.md +++ b/docs/setup/setting-up-the-footer.md @@ -147,11 +147,6 @@ extra: Thousands of hours went into this project, most of them without any financial return. - Thus, if you remove this notice, please consider [sponsoring][Insiders] the - project. __Thank you__ :octicons-heart-fill-24:{ .mdx-heart .mdx-insiders } - - [Insiders]: ../insiders/index.md - ## Usage ### Hiding prev/next links diff --git a/docs/tutorials/blogs/basic.md b/docs/tutorials/blogs/basic.md index f02548c4675..507ff75ef16 100644 --- a/docs/tutorials/blogs/basic.md +++ b/docs/tutorials/blogs/basic.md @@ -179,11 +179,10 @@ header to indicate that a post is still in draft form. stage. Remember to remove the `draft` setting in the header when it is time to publish it. -If you are using the [Insiders Edition], you can also create -a folder to keep your drafts in and use the [Meta plugin] to add the -`draft` header setting to all the posts in that folder. This has the advantage -that it is easier to see which posts are still in draft form. We will cover the -Meta plugin later on. +You can also create a folder to keep your drafts in and use the [Meta plugin] +to add the `draft` header setting to all the posts in that folder. This has the +advantage that it is easier to see which posts are still in draft form. We will +cover the Meta plugin later on. [Meta plugin]: ../../plugins/meta.md @@ -232,11 +231,10 @@ your readers will take the read the post. ### Pinning Sometimes, blog authors want to 'pin' a specific post so that it will always -appear at the top of the index page, no matter what else gets published. If you -are using the [Insiders Edition], you can achieve this by adding the `pin` -attribute in the page header: +appear at the top of the index page, no matter what else gets published. You can +achieve this by adding the `pin` attribute in the page header: -!!! example "Pin a post " +!!! example "Pin a post" Add the `pin` attribute to your first blog post: @@ -261,7 +259,7 @@ will want to provide links from blog posts into your other content. One way you can do this is to have a related links section. The blog plugin can create one for you if you provide link targets in your page header: -!!! example "Add a related links section " +!!! example "Add a related links section" Add the following to a blog post: @@ -320,7 +318,7 @@ together so that they are not only flagged as drafts but also easier to find. (Otherwise, you would need to inspect the page headers or trace back from the output to the files to figure out which posts are drafts.) -!!! example "Drafts using the Meta plugin " +!!! example "Drafts using the Meta plugin" You first need to activate the plugin in your `mkdocs.yaml`: @@ -356,7 +354,6 @@ output to the files to figure out which posts are drafts.) post from draft status to published, simply move it outside `drafts/`. [meta]: ../../plugins/meta.md -[Insiders Edition]: ../../insiders/index.md ## What's next? diff --git a/docs/tutorials/blogs/navigation.md b/docs/tutorials/blogs/navigation.md index 762f99ebea8..9d870b88320 100644 --- a/docs/tutorials/blogs/navigation.md +++ b/docs/tutorials/blogs/navigation.md @@ -323,11 +323,10 @@ the page header. Note that `authors` is a list, so you can specify multiple authors. -With the Insiders edition, you can create custom author index pages that -can highlight the contributions of an author as well as provide additional -information about them. +You can create custom author index pages that can highlight the contributions +of an author as well as provide additional information about them. -!!! example "Add author page " +!!! example "Add author page" First, you need to enable author profiles in the `mkdocs.yml`: diff --git a/docs/tutorials/index.md b/docs/tutorials/index.md index ddfd04dba95..cebccc2f2f1 100644 --- a/docs/tutorials/index.md +++ b/docs/tutorials/index.md @@ -11,18 +11,7 @@ gain not only an understanding of how to use Material for MkDocs, but also a template for your own projects. For convenience, these templates are also available as template repositories on GitHub. -The tutorials assume that you have installed either the [public version] or the -[Insiders edition] of Material for MkDocs and that you have worked through the -[creating your site] setup guide. - -Note that where the features we use require the Insiders edition, we mark these -with the heart icon: If you are using the public version -then you can skip these steps. Sometimes there will be ways of achieving the -same goal that differ between the public version and the Insider edition. In -that case, we will show them in a tabbed view so you can see one or the other. - [public version]: ../getting-started.md -[Insiders edition]: ../insiders/getting-started.md [creating your site]: ../creating-your-site.md !!! note "Feedback wanted!" diff --git a/docs/tutorials/social/basic.md b/docs/tutorials/social/basic.md index 62e476e7360..3b416b929c6 100644 --- a/docs/tutorials/social/basic.md +++ b/docs/tutorials/social/basic.md @@ -43,8 +43,8 @@ the `head` element, including one entry that points to the image. The social plugin has configuration options for changing aspects such as colors, images, fonts, logos, the title, even the description. You can configure them -for all social cards in the `mkdocs.yml` and, in the Insiders Edition, they can -be overridden in the page header for individual pages. +for all social cards in the `mkdocs.yml` and, they can be overridden in the page +header for individual pages. !!! example "Change the background color" @@ -106,17 +106,13 @@ so this is where you should make the `layouts` directory and place the background image. The default site of the social cards included with the plugin is 1200x630 pixels, so choose an image that size or one that scales well to it. -## Additional layouts and styles +## Additional layouts and styles - - -The Insiders Edition provides additional layouts as well as the option to -configure different styles for different (kinds of) pages. - -The Insiders Edition comes with a number of additional layouts for the social -cards. For example, the `default/variant` layout adds a page icon to the card. -You can use this to distinguish social cards visually, depending on what kind -of page you are sharing. +The social plugin provides additional layouts as well as the option to configure +different styles for different (kinds of) pages. It comes with a number of +additional layouts for the social cards. For example, the `default/variant` +layout adds a page icon to the card. You can use this to distinguish social +cards visually, depending on what kind of page you are sharing. For example, imagine you have a set of pages that advertise events and you want to include a calendar icon as a visual indication that a card advertises an @@ -167,14 +163,11 @@ page. If that is not what you want then you will need to modify the social card template to gets its icons from another source. You can learn how to do this in the [custom social cards tutorial](custom.md). -## Per-page settings - - +## Per-page settings -With the Insiders Edition, you can customize the card layout for each -page by adding settings to the page header. You have effectively done this -in the previous exercise, but using the meta plugin to affect a whole set of -pages. +You can customize the card layout for each page by adding settings to the page +header. You have effectively done this in the previous exercise, but using the +meta plugin to affect a whole set of pages. Say that in addition to regular events you also have the odd webinar and for this you want to set a different icon and also set the description to @@ -196,10 +189,9 @@ indicate that the event is part of the webinar series. ## What's next? -With the Insiders Edition, you can also define custom layouts if the -configuration options introduced above as not enough to meet your needs. -Continue to the [custom social cards tutorial](custom.md) if you want to -find out how to do this. +You can also define custom layouts if the configuration options introduced above +as not enough to meet your needs. Continue to the +[custom social cards tutorial](custom.md) if you want to find out how to do this. Social cards are particularly useful for blog posts. If you have a blog, you need to do nothing more than to turn on both plugins to create social cards diff --git a/docs/tutorials/social/custom.md b/docs/tutorials/social/custom.md index fdc08d26f2f..f650fb91035 100644 --- a/docs/tutorials/social/custom.md +++ b/docs/tutorials/social/custom.md @@ -1,6 +1,6 @@ # Custom cards -The Insiders Edition allows you to define custom layouts for your social cards +The social plugin allows you to define custom layouts for your social cards to suit your specific needs if the configuration options are not enough. For example, you may want to define a social card to advertise a new release of your product. It should have an icon indicating a launch announcement as @@ -12,7 +12,7 @@ You can either design a custom layout from scratch or use an existing layout as the basis that you add to or otherwise modify. In this tutorial, you will use the default layout as the basis. -!!! example "Copy default layout to customize " +!!! example "Copy default layout to customize" Copy the default social card layout from your installation of Material for MkDocs to a new directory `layouts`. The instructions below assume you @@ -53,7 +53,7 @@ assumes you have a changelog page with information about each release. Add the version number of the latest version to the page header (so it does not need to be parsed out of the Markdown content): -!!! example "Defining the release data " +!!! example "Defining the release data" Create a page `docs/changelog.md` with the following content: @@ -139,4 +139,4 @@ If you do not have a blog yet, why not check out the [blog tutorials](../index.md#blogs) and learn how to set one up? The social plugin will help you draw attention to your posts on social media. -Check out the [other tutorials](../index.md) we have prepared for you. \ No newline at end of file +Check out the [other tutorials](../index.md) we have prepared for you. diff --git a/giscus.json b/giscus.json deleted file mode 100644 index d88dfcb1c90..00000000000 --- a/giscus.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "origins": ["https://squidfunk.github.io"] -} diff --git a/material/__init__.py b/material/__init__.py index 12efd1d135f..1259c5ba181 100644 --- a/material/__init__.py +++ b/material/__init__.py @@ -18,4 +18,4 @@ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. -__version__ = "9.6.23" +__version__ = "9.7.0" diff --git a/material/extensions/preview.py b/material/extensions/preview.py new file mode 100644 index 00000000000..17c29361ce8 --- /dev/null +++ b/material/extensions/preview.py @@ -0,0 +1,223 @@ +# Copyright (c) 2016-2025 Martin Donath + +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: + +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. + +from __future__ import annotations + +import logging + +from material.utilities.filter import FileFilter, FilterConfig +from mkdocs.structure.pages import _RelativePathTreeprocessor +from markdown import Extension, Markdown +from markdown.treeprocessors import Treeprocessor +from mkdocs.exceptions import ConfigurationError +from urllib.parse import urlparse +from xml.etree.ElementTree import Element + +# ----------------------------------------------------------------------------- +# Classes +# ----------------------------------------------------------------------------- + +class PreviewProcessor(Treeprocessor): + """ + A Markdown treeprocessor to enable instant previews on links. + + Note that this treeprocessor is dependent on the `relpath` treeprocessor + registered programmatically by MkDocs before rendering a page. + """ + + def __init__(self, md: Markdown, config: dict): + """ + Initialize the treeprocessor. + + Arguments: + md: The Markdown instance. + config: The configuration. + """ + super().__init__(md) + self.config = config + + def run(self, root: Element): + """ + Run the treeprocessor. + + Arguments: + root: The root element of the parsed Markdown document. + """ + at = self.md.treeprocessors.get_index_for_name("relpath") + + # Hack: Python Markdown has no notion of where it is, i.e., which file + # is being processed. This seems to be a deliberate design decision, as + # it is not possible to access the file path of the current page, but + # it might also be an oversight that is now impossible to fix. However, + # since this extension is only useful in the context of Material for + # MkDocs, we can assume that the _RelativePathTreeprocessor is always + # present, telling us the file path of the current page. If that ever + # changes, we would need to wrap this extension in a plugin, but for + # the time being we are sneaky and will probably get away with it. + processor = self.md.treeprocessors[at] + if not isinstance(processor, _RelativePathTreeprocessor): + raise TypeError("Relative path processor not registered") + + # Normalize configurations + configurations = self.config["configurations"] + configurations.append({ + "sources": self.config.get("sources"), + "targets": self.config.get("targets") + }) + + # Walk through all configurations - @todo refactor so that we don't + # iterate multiple times over the same elements + for configuration in configurations: + + # Skip, if the configuration defines nothing – we could also fix + # this in the file filter, but we first fix it here and check if + # it generalizes well enough to other inclusion/exclusion sites, + # because here, it would hinder the ability to automaticaly + # include all sources, while excluding specific targets. + if ( + not configuration.get("sources") and + not configuration.get("targets") + ): + continue + + # Skip if page should not be considered + filter = get_filter(configuration, "sources") + if not filter(processor.file): + continue + + # Walk through all links and add preview attributes + filter = get_filter(configuration, "targets") + for el in root.iter("a"): + href = el.get("href") + if not href: + continue + + # Skip footnotes + if "footnote-ref" in el.get("class", ""): + continue + + # Skip external links + url = urlparse(href) + if url.scheme or url.netloc: + continue + + # Add preview attribute to internal links + for path in processor._possible_target_uris( + processor.file, url.path, + processor.config.use_directory_urls + ): + target = processor.files.get_file_from_path(path) + if not target: + continue + + # Include, if filter matches + if filter(target): + el.set("data-preview", "") + +# ----------------------------------------------------------------------------- + +class PreviewExtension(Extension): + """ + A Markdown extension to enable instant previews on links. + + This extensions allows to automatically add the `data-preview` attribute to + internal links matching specific criteria, so Material for MkDocs renders a + nice preview on hover as part of a tooltip. It is the recommended way to + add previews to links in a programmatic way. + """ + + def __init__(self, *args, **kwargs): + """ + """ + self.config = { + "configurations": [[], "Filter configurations"], + "sources": [{}, "Link sources"], + "targets": [{}, "Link targets"] + } + super().__init__(*args, **kwargs) + + def extendMarkdown(self, md: Markdown): + """ + Register Markdown extension. + + Arguments: + md: The Markdown instance. + """ + md.registerExtension(self) + + # Create and register treeprocessor - we use the same priority as the + # `relpath` treeprocessor, the latter of which is guaranteed to run + # after our treeprocessor, so we can check the original Markdown URIs + # before they are resolved to URLs. + processor = PreviewProcessor(md, self.getConfigs()) + md.treeprocessors.register(processor, "preview", 0) + +# ----------------------------------------------------------------------------- +# Functions +# ----------------------------------------------------------------------------- + +def get_filter(settings: dict, key: str): + """ + Get file filter from settings. + + Arguments: + settings: The settings. + key: The key in the settings. + + Returns: + The file filter. + """ + config = FilterConfig() + config.load_dict(settings.get(key) or {}) + + # Validate filter configuration + errors, warnings = config.validate() + for _, w in warnings: + log.warning( + f"Error reading filter configuration in '{key}':\n" + f"{w}" + ) + for _, e in errors: + raise ConfigurationError( + f"Error reading filter configuration in '{key}':\n" + f"{e}" + ) + + # Return file filter + return FileFilter(config = config) # type: ignore + +def makeExtension(**kwargs): + """ + Register Markdown extension. + + Arguments: + **kwargs: Configuration options. + + Returns: + The Markdown extension. + """ + return PreviewExtension(**kwargs) + +# ----------------------------------------------------------------------------- +# Data +# ----------------------------------------------------------------------------- + +# Set up logging +log = logging.getLogger("mkdocs.material.extensions.preview") diff --git a/material/overrides/assets/javascripts/custom.95054b18.min.js b/material/overrides/assets/javascripts/custom.a0168cc8.min.js similarity index 99% rename from material/overrides/assets/javascripts/custom.95054b18.min.js rename to material/overrides/assets/javascripts/custom.a0168cc8.min.js index 8dc33457f2a..ef2c72611ed 100644 --- a/material/overrides/assets/javascripts/custom.95054b18.min.js +++ b/material/overrides/assets/javascripts/custom.a0168cc8.min.js @@ -1,5 +1,5 @@ "use strict";(()=>{var go=Object.create;var Ar=Object.defineProperty;var wo=Object.getOwnPropertyDescriptor;var So=Object.getOwnPropertyNames,et=Object.getOwnPropertySymbols,Eo=Object.getPrototypeOf,tt=Object.prototype.hasOwnProperty,Oo=Object.prototype.propertyIsEnumerable;var rt=(e,r,t)=>r in e?Ar(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,Je=(e,r)=>{for(var t in r||(r={}))tt.call(r,t)&&rt(e,t,r[t]);if(et)for(var t of et(r))Oo.call(r,t)&&rt(e,t,r[t]);return e};var Me=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports);var To=(e,r,t,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of So(r))!tt.call(e,n)&&n!==t&&Ar(e,n,{get:()=>r[n],enumerable:!(o=wo(r,n))||o.enumerable});return e};var ot=(e,r,t)=>(t=e!=null?go(Eo(e)):{},To(r||!e||!e.__esModule?Ar(t,"default",{value:e,enumerable:!0}):t,e));var De=Me(Z=>{(function(){var e,r,t,o,n,i,f,u,c,a,s,p,d,l,m,h,b,w,E,k;k=150,a=20,E=150,c=.75,Z.score=function(v,x,S){var T,y,g,_;return y=S.preparedQuery,T=S.allowErrors,T||n(v,y.core_lw,y.core_up)?(_=v.toLowerCase(),g=r(v,_,y),Math.ceil(g)):0},Z.isMatch=n=function(v,x,S){var T,y,g,_,W,U,L;if(g=v.length,_=x.length,!g||_>g)return!1;for(T=-1,y=-1;++y<_;){for(W=x.charCodeAt(y),U=S.charCodeAt(y);++T-1)return m(v,x,de,te,fe,Q,N);for(Ae=new Array(Q),W=new Array(Q),_r=w(Q,N),V=Math.ceil(c*Q)+5,re=V,L=!0,M=-1;++Mce&&(ce=Ke),U=0,te[M]===Or)if(Tr=u(j,v,x),U=_>0?_:d(v,x,de,te,j,M,Tr),g=Er+p(j,M,Tr,y,U),g>ce)ce=g,re=V;else{if(ye&&--re<=0)return Math.max(ce,Ae[Q-1])*_r;ye=!1}Er=Ke,_=W[M],W[M]=U,Ae[M]=ce}}return ce=Ae[Q-1],ce*_r},Z.isWordStart=u=function(v,x,S){var T,y;return v===0?!0:(T=x[v],y=x[v-1],i(y)||T!==S[v]&&y===S[v-1])},Z.isWordEnd=f=function(v,x,S,T){var y,g;return v===T-1?!0:(y=x[v],g=x[v+1],i(g)||y===S[v]&&g!==S[v+1])},i=function(v){return v===" "||v==="."||v==="-"||v==="_"||v==="/"||v==="\\"},b=function(v){var x;return vy?T:y)+10):g+k*y},Z.scoreConsecutives=d=function(v,x,S,T,y,g,_){var W,U,L,j,M,N,V;for(U=v.length,j=S.length,L=U-y,M=j-g,W=L-1&&(M=u(L,v,x),M&&(y=L))),U=-1,j=0;++U1&&L>1))return t;for(y=0,V=0,re=0,M=0,_=-1,W=-1;++W-1){V++;continue}else break;for(;++_12*W)return!1;for(g=-1;++g<_;)if(u(g,v,x)&&++y>T)return!1;return!0}}).call(Z)});var wr=Me(Qe=>{(function(){var e,r,t,o,n,i,f,u,c,a;a=De(),i=a.isMatch,e=a.computeScore,u=a.scoreSize,c=20,t=2.5,Qe.score=function(s,p,d){var l,m,h,b;return m=d.preparedQuery,l=d.allowErrors,l||i(s,m.core_lw,m.core_up)?(b=s.toLowerCase(),h=e(s,b,m),h=f(s,b,h,d),Math.ceil(h)):0},f=function(s,p,d,l){var m,h,b,w,E,k,v,x,S,T;if(d===0)return 0;for(S=l.preparedQuery,T=l.useExtensionBonus,x=l.pathSeparator,E=s.length-1;s[E]===x;)E--;if(b=s.lastIndexOf(x,E),v=E-b,k=1,T&&(k+=n(p,S.ext,b,E,2),d*=k),b===-1)return d;for(w=S.depth;b>-1&&w-- >0;)b=s.lastIndexOf(x,b-1);return h=b===-1?d:k*e(s.slice(b+1,E+1),p.slice(b+1,E+1),S),m=.5*c/(c+r(s,E+1,x)),m*h+(1-m)*d*u(0,t*v)},Qe.countDir=r=function(s,p,d){var l,m;if(p<1)return 0;for(l=0,m=-1;++md)))return 0;for(w=p.length,h=l-E,h0?.9*n(s,p,d,E-2,m-1):b/h}}).call(Qe)});var Gr=Me((to,oo)=>{(function(){var e,r,t,o,n,i,f,u;u=wr(),t=u.countDir,n=u.getExtension,oo.exports=e=(function(){function c(a,s){var p,d,l;if(l=s!=null?s:{},p=l.optCharRegEx,d=l.pathSeparator,!(a&&a.length))return null;this.query=a,this.query_lw=a.toLowerCase(),this.core=r(a,p),this.core_lw=this.core.toLowerCase(),this.core_up=f(this.core),this.depth=t(a,a.length,d),this.ext=n(this.query_lw),this.charCodes=o(this.query_lw)}return c})(),i=/[ _\-:\/\\]/g,r=function(c,a){return a==null&&(a=i),c.replace(a,"")},f=function(c){var a,s,p,d;for(s="",p=0,d=c.length;p{(function(){var e,r,t,o,n;o=De(),r=wr(),e=Gr(),t=function(i){return i.candidate},n=function(i,f){return f.score-i.score},io.exports=function(i,f,u){var c,a,s,p,d,l,m,h,b,w,E,k,v;for(h=[],s=u.key,d=u.maxResults,p=u.maxInners,E=u.usePathScoring,b=p!=null&&p>0?p:i.length+1,c=s!=null,m=E?r:o,k=0,v=i.length;k0&&(h.push({candidate:a,score:l}),!--b))));k++);return h.sort(n),i=h.map(t),d!=null&&(i=i.slice(0,d)),i}}).call(no)});var fo=Me(Sr=>{(function(){var e,r,t,o,n,i,f,u,c,a;a=De(),t=a.isMatch,o=a.isWordStart,c=a.scoreConsecutives,u=a.scoreCharacter,f=a.scoreAcronyms,Sr.match=n=function(s,p,d){var l,m,h,b,w,E;return l=d.allowErrors,w=d.preparedQuery,b=d.pathSeparator,l||t(s,w.core_lw,w.core_up)?(E=s.toLowerCase(),h=r(s,E,w),h.length===0||s.indexOf(b)>-1&&(m=e(s,E,w,b),h=i(h,m)),h):[]},Sr.wrap=function(s,p,d){var l,m,h,b,w,E,k,v,x;if(d.wrap!=null&&(x=d.wrap,E=x.tagClass,v=x.tagOpen,k=x.tagClose),E==null&&(E="highlight"),v==null&&(v=''),k==null&&(k=""),s===p)return v+s+k;if(h=n(s,p,d),h.length===0)return s;for(b="",l=-1,w=0;++lw&&(b+=s.substring(w,m),w=m);++lw&&(b+=v,b+=s.substring(w,m),b+=k,w=m)}return w<=s.length-1&&(b+=s.substring(w)),b},e=function(s,p,d,l){var m,h,b;for(b=s.length-1;s[b]===l;)b--;if(m=s.lastIndexOf(l,b),m===-1)return[];for(h=d.depth;h-- >0;)if(m=s.lastIndexOf(l,m-1),m===-1)return[];return m++,b++,r(s.slice(m,b),p.slice(m,b),d,m)},i=function(s,p){var d,l,m,h,b,w,E;if(b=s.length,w=p.length,w===0)return s.slice();if(b===0)return p.slice();for(m=-1,h=0,l=p[h],E=[];++m0?x:c(s,p,M,N,y,g,te),k=re+u(y,g,te,E,T)),fe=Q[g],x=S[g],V>fe?U=h:(V=fe,U=w),k>V?(V=k,U=m):T=0,Q[g]=V,S[g]=T,ye[++j]=V>0?U:b;for(y=_-1,g=L-1,j=y*L+g,v=!0,W=[];v&&y>=0&&g>=0;)switch(ye[j]){case w:y--,j-=L;break;case h:g--,j--;break;case m:W.push(y+l),g--,y--,j-=L+1;break;default:v=!1}return W.reverse(),W}}).call(Sr)});var Br=Me((co,so)=>{(function(){var e,r,t,o,n,i,f,u;t=ao(),o=fo(),u=De(),i=wr(),e=Gr(),f=null,r=(typeof process!="undefined"&&process!==null?process.platform:void 0)==="win32"?"\\":"/",so.exports={filter:function(c,a,s){return s==null&&(s={}),a!=null&&a.length&&(c!=null&&c.length)?(s=n(s,a),t(c,a,s)):[]},score:function(c,a,s){return s==null&&(s={}),c!=null&&c.length&&(a!=null&&a.length)?(s=n(s,a),s.usePathScoring?i.score(c,a,s):u.score(c,a,s)):0},match:function(c,a,s){var p,d,l;return s==null&&(s={}),c?a?c===a?(function(){l=[];for(var m=0,h=c.length;0<=h?mh;0<=h?m++:m--)l.push(m);return l}).apply(this):(s=n(s,a),o.match(c,a,s)):[]:[]},wrap:function(c,a,s){return s==null&&(s={}),c?a?(s=n(s,a),o.wrap(c,a,s)):[]:[]},prepareQuery:function(c,a){return a==null&&(a={}),a=n(a,c),a.preparedQuery}},n=function(c,a){return c.allowErrors==null&&(c.allowErrors=!1),c.usePathScoring==null&&(c.usePathScoring=!0),c.useExtensionBonus==null&&(c.useExtensionBonus=!1),c.pathSeparator==null&&(c.pathSeparator=r),c.optCharRegEx==null&&(c.optCharRegEx=null),c.wrap==null&&(c.wrap=null),c.preparedQuery==null&&(c.preparedQuery=f&&f.query===a?f:f=new e(a,c)),c}}).call(co)});var Mr=function(e,r){return Mr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(t[n]=o[n])},Mr(e,r)};function z(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");Mr(e,r);function t(){this.constructor=e}e.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}function nt(e,r,t,o){function n(i){return i instanceof t?i:new t(function(f){f(i)})}return new(t||(t=Promise))(function(i,f){function u(s){try{a(o.next(s))}catch(p){f(p)}}function c(s){try{a(o.throw(s))}catch(p){f(p)}}function a(s){s.done?i(s.value):n(s.value).then(u,c)}a((o=o.apply(e,r||[])).next())})}function Ye(e,r){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,n,i,f=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return f.next=u(0),f.throw=u(1),f.return=u(2),typeof Symbol=="function"&&(f[Symbol.iterator]=function(){return this}),f;function u(a){return function(s){return c([a,s])}}function c(a){if(o)throw new TypeError("Generator is already executing.");for(;f&&(f=0,a[0]&&(t=0)),t;)try{if(o=1,n&&(i=a[0]&2?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[a[0]&2,i.value]),a[0]){case 0:case 1:i=a;break;case 4:return t.label++,{value:a[1],done:!1};case 5:t.label++,n=a[1],a=[0];continue;case 7:a=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){t=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}function R(e,r){var t=typeof Symbol=="function"&&e[Symbol.iterator];if(!t)return e;var o=t.call(e),n,i=[],f;try{for(;(r===void 0||r-- >0)&&!(n=o.next()).done;)i.push(n.value)}catch(u){f={error:u}}finally{try{n&&!n.done&&(t=o.return)&&t.call(o)}finally{if(f)throw f.error}}return i}function H(e,r,t){if(t||arguments.length===2)for(var o=0,n=r.length,i;o1||c(l,h)})},m&&(n[l]=m(n[l])))}function c(l,m){try{a(o[l](m))}catch(h){d(i[0][3],h)}}function a(l){l.value instanceof ge?Promise.resolve(l.value.v).then(s,p):d(i[0][2],l)}function s(l){c("next",l)}function p(l){c("throw",l)}function d(l,m){l(m),i.shift(),i.length&&c(i[0][0],i[0][1])}}function at(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=e[Symbol.asyncIterator],t;return r?r.call(e):(e=typeof X=="function"?X(e):e[Symbol.iterator](),t={},o("next"),o("throw"),o("return"),t[Symbol.asyncIterator]=function(){return this},t);function o(i){t[i]=e[i]&&function(f){return new Promise(function(u,c){f=e[i](f),n(u,c,f.done,f.value)})}}function n(i,f,u,c){Promise.resolve(c).then(function(a){i({value:a,done:u})},f)}}function O(e){return typeof e=="function"}function Xe(e){var r=function(o){Error.call(o),o.stack=new Error().stack},t=e(r);return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var Ge=Xe(function(e){return function(t){e(this),this.message=t?t.length+` errors occurred during unsubscription: `+t.map(function(o,n){return n+1+") "+o.toString()}).join(` `):"",this.name="UnsubscriptionError",this.errors=t}});function se(e,r){if(e){var t=e.indexOf(r);0<=t&&e.splice(t,1)}}var oe=(function(){function e(r){this.initialTeardown=r,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var r,t,o,n,i;if(!this.closed){this.closed=!0;var f=this._parentage;if(f)if(this._parentage=null,Array.isArray(f))try{for(var u=X(f),c=u.next();!c.done;c=u.next()){var a=c.value;a.remove(this)}}catch(h){r={error:h}}finally{try{c&&!c.done&&(t=u.return)&&t.call(u)}finally{if(r)throw r.error}}else f.remove(this);var s=this.initialTeardown;if(O(s))try{s()}catch(h){i=h instanceof Ge?h.errors:[h]}var p=this._finalizers;if(p){this._finalizers=null;try{for(var d=X(p),l=d.next();!l.done;l=d.next()){var m=l.value;try{ft(m)}catch(h){i=i!=null?i:[],h instanceof Ge?i=H(H([],R(i)),R(h.errors)):i.push(h)}}}catch(h){o={error:h}}finally{try{l&&!l.done&&(n=d.return)&&n.call(d)}finally{if(o)throw o.error}}}if(i)throw new Ge(i)}},e.prototype.add=function(r){var t;if(r&&r!==this)if(this.closed)ft(r);else{if(r instanceof e){if(r.closed||r._hasParent(this))return;r._addParent(this)}(this._finalizers=(t=this._finalizers)!==null&&t!==void 0?t:[]).push(r)}},e.prototype._hasParent=function(r){var t=this._parentage;return t===r||Array.isArray(t)&&t.includes(r)},e.prototype._addParent=function(r){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(r),t):t?[t,r]:r},e.prototype._removeParent=function(r){var t=this._parentage;t===r?this._parentage=null:Array.isArray(t)&&se(t,r)},e.prototype.remove=function(r){var t=this._finalizers;t&&se(t,r),r instanceof e&&r._removeParent(this)},e.EMPTY=(function(){var r=new e;return r.closed=!0,r})(),e})();var Ir=oe.EMPTY;function Be(e){return e instanceof oe||e&&"closed"in e&&O(e.remove)&&O(e.add)&&O(e.unsubscribe)}function ft(e){O(e)?e():e.unsubscribe()}var ee={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var Ie={setTimeout:function(e,r){for(var t=[],o=2;o0},enumerable:!1,configurable:!0}),r.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},r.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},r.prototype._innerSubscribe=function(t){var o=this,n=this,i=n.hasError,f=n.isStopped,u=n.observers;return i||f?Ir:(this.currentObservers=null,u.push(t),new oe(function(){o.currentObservers=null,se(u,t)}))},r.prototype._checkFinalizedStatuses=function(t){var o=this,n=o.hasError,i=o.thrownError,f=o.isStopped;n?t.error(i):f&&t.complete()},r.prototype.asObservable=function(){var t=new I;return t.source=this,t},r.create=function(t,o){return new dt(t,o)},r})(I);var dt=(function(e){z(r,e);function r(t,o){var n=e.call(this)||this;return n.destination=t,n.source=o,n}return r.prototype.next=function(t){var o,n;(n=(o=this.destination)===null||o===void 0?void 0:o.next)===null||n===void 0||n.call(o,t)},r.prototype.error=function(t){var o,n;(n=(o=this.destination)===null||o===void 0?void 0:o.error)===null||n===void 0||n.call(o,t)},r.prototype.complete=function(){var t,o;(o=(t=this.destination)===null||t===void 0?void 0:t.complete)===null||o===void 0||o.call(t)},r.prototype._subscribe=function(t){var o,n;return(n=(o=this.source)===null||o===void 0?void 0:o.subscribe(t))!==null&&n!==void 0?n:Ir},r})(K);var kr=(function(e){z(r,e);function r(t){var o=e.call(this)||this;return o._value=t,o}return Object.defineProperty(r.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),r.prototype._subscribe=function(t){var o=e.prototype._subscribe.call(this,t);return!o.closed&&t.next(this._value),o},r.prototype.getValue=function(){var t=this,o=t.hasError,n=t.thrownError,i=t._value;if(o)throw n;return this._throwIfClosed(),i},r.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},r})(K);var ze={now:function(){return(ze.delegate||Date).now()},delegate:void 0};var vt=(function(e){z(r,e);function r(t,o,n){t===void 0&&(t=1/0),o===void 0&&(o=1/0),n===void 0&&(n=ze);var i=e.call(this)||this;return i._bufferSize=t,i._windowTime=o,i._timestampProvider=n,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=o===1/0,i._bufferSize=Math.max(1,t),i._windowTime=Math.max(1,o),i}return r.prototype.next=function(t){var o=this,n=o.isStopped,i=o._buffer,f=o._infiniteTimeWindow,u=o._timestampProvider,c=o._windowTime;n||(i.push(t),!f&&i.push(u.now()+c)),this._trimBuffer(),e.prototype.next.call(this,t)},r.prototype._subscribe=function(t){this._throwIfClosed(),this._trimBuffer();for(var o=this._innerSubscribe(t),n=this,i=n._infiniteTimeWindow,f=n._buffer,u=f.slice(),c=0;c0?e.prototype.requestAsyncId.call(this,t,o,n):(t.actions.push(this),t._scheduled||(t._scheduled=Pe.requestAnimationFrame(function(){return t.flush(void 0)})))},r.prototype.recycleAsyncId=function(t,o,n){var i;if(n===void 0&&(n=0),n!=null?n>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,t,o,n);var f=t.actions;o!=null&&o===t._scheduled&&((i=f[f.length-1])===null||i===void 0?void 0:i.id)!==o&&(Pe.cancelAnimationFrame(o),t._scheduled=void 0)},r})(rr);var gt=(function(e){z(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.flush=function(t){this._active=!0;var o;t?o=t.id:(o=this._scheduled,this._scheduled=void 0);var n=this.actions,i;t=t||n.shift();do if(i=t.execute(t.state,t.delay))break;while((t=n[0])&&t.id===o&&n.shift());if(this._active=!1,i){for(;(t=n[0])&&t.id===o&&n.shift();)t.unsubscribe();throw i}},r})(tr);var Fr=new gt(yt);var Re=new I(function(e){return e.complete()});function or(e){return e&&O(e.schedule)}function Wr(e){return e[e.length-1]}function ve(e){return O(Wr(e))?e.pop():void 0}function ne(e){return or(Wr(e))?e.pop():void 0}function wt(e,r){return typeof Wr(e)=="number"?e.pop():r}var ke=(function(e){return e&&typeof e.length=="number"&&typeof e!="function"});function nr(e){return O(e==null?void 0:e.then)}function ir(e){return O(e[Le])}function ar(e){return Symbol.asyncIterator&&O(e==null?void 0:e[Symbol.asyncIterator])}function fr(e){return new TypeError("You provided "+(e!==null&&typeof e=="object"?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function ko(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var cr=ko();function sr(e){return O(e==null?void 0:e[cr])}function ur(e){return it(this,arguments,function(){var t,o,n,i;return Ye(this,function(f){switch(f.label){case 0:t=e.getReader(),f.label=1;case 1:f.trys.push([1,,9,10]),f.label=2;case 2:return[4,ge(t.read())];case 3:return o=f.sent(),n=o.value,i=o.done,i?[4,ge(void 0)]:[3,5];case 4:return[2,f.sent()];case 5:return[4,ge(n)];case 6:return[4,f.sent()];case 7:return f.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function pr(e){return O(e==null?void 0:e.getReader)}function F(e){if(e instanceof I)return e;if(e!=null){if(ir(e))return Ho(e);if(ke(e))return Fo(e);if(nr(e))return Wo(e);if(ar(e))return St(e);if(sr(e))return jo(e);if(pr(e))return Uo(e)}throw fr(e)}function Ho(e){return new I(function(r){var t=e[Le]();if(O(t.subscribe))return t.subscribe(r);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Fo(e){return new I(function(r){for(var t=0;t0&&(s=new Se({next:function(S){return x.next(S)},error:function(S){h=!0,b(),p=Kr(w,n,S),x.error(S)},complete:function(){m=!0,b(),p=Kr(w,f),x.complete()}}),F(k).subscribe(s))})(a)}}function Kr(e,r){for(var t=[],o=2;oYr()||document.body),me(1));function Nt(e){return tn.pipe(C(r=>e.contains(r)),pe())}function qt(e,r){if(typeof r=="string"||typeof r=="number")e.innerHTML+=r.toString();else if(r instanceof Node)e.appendChild(r);else if(Array.isArray(r))for(let t of r)qt(e,t)}function Y(e,r,...t){let o=document.createElement(e);if(r)for(let n of Object.keys(r))typeof r[n]!="undefined"&&(typeof r[n]!="boolean"?o.setAttribute(n,r[n]):o.setAttribute(n,""));for(let n of t)qt(o,n);return o}function Dt(e){if(e>999){let r=+((e-950)%1e3>99);return`${((e+1e-6)/1e3).toFixed(r)}k`}else return e.toString()}function Qt(e){let r=Y("script",{src:e});return Te(()=>(document.head.appendChild(r),q($(r,"load"),$(r,"error").pipe(D(()=>jr(()=>new ReferenceError(`Invalid script: ${e}`))))).pipe(C(()=>{}),le(()=>document.head.removeChild(r)),We(1))))}var on=new K,jp=Te(()=>typeof ResizeObserver=="undefined"?Qt("https://unpkg.com/resize-observer-polyfill"):ie(void 0)).pipe(C(()=>new ResizeObserver(e=>e.forEach(r=>on.next(r)))),D(e=>q(Ne,ie(e)).pipe(le(()=>e.disconnect()))),me(1));function Kt(e){return{width:e.offsetWidth,height:e.offsetHeight}}function Jt(e){return{width:e.scrollWidth,height:e.scrollHeight}}function Yt(e){return{x:e.scrollLeft,y:e.scrollTop}}function Xt(e){return q($(e,"scroll"),$(window,"scroll"),$(window,"resize")).pipe(zr(0,Fr),C(()=>Yt(e)),be(Yt(e)))}var nn=new K,tl=Te(()=>ie(new IntersectionObserver(e=>{for(let r of e)nn.next(r)},{threshold:0}))).pipe(D(e=>q(Ne,ie(e)).pipe(le(()=>e.disconnect()))),me(1));function Gt(e,r=16){return Xt(e).pipe(C(({y:t})=>{let o=Kt(e),n=Jt(e);return t>=n.height-o.height-r}),pe())}var ll={drawer:ae("[data-md-toggle=drawer]"),search:ae("[data-md-toggle=search]")};var an=ae("#__config"),qe=JSON.parse(an.textContent);qe.base=`${new URL(qe.base,eo())}`;function Bt(){return qe}function Zt(e,r){return typeof r!="undefined"?qe.translations[e].replace("#",r.toString()):qe.translations[e]}function eo(){return new URL(location.href)}function fn(e,r){return new I(t=>{let o=new XMLHttpRequest;return o.open("GET",`${e}`),o.responseType="blob",o.addEventListener("load",()=>{o.status>=200&&o.status<300?(t.next(o.response),t.complete()):t.error(new Error(o.statusText))}),o.addEventListener("error",()=>{t.error(new Error("Network error"))}),o.addEventListener("abort",()=>{t.complete()}),typeof(r==null?void 0:r.progress$)!="undefined"&&(o.addEventListener("progress",n=>{var i;if(n.lengthComputable)r.progress$.next(n.loaded/n.total*100);else{let f=(i=o.getResponseHeader("Content-Length"))!=null?i:0;r.progress$.next(n.loaded/+f*100)}}),r.progress$.next(5)),o.send(),()=>o.abort()})}function gr(e,r){return fn(e,r).pipe(D(t=>t.text()),C(t=>JSON.parse(t)),me(1))}function Xr(e,r=document){return ae(`[data-mdx-component=${e}]`,r)}function xe(e,r=document){return $t(`[data-mdx-component=${e}]`,r)}function ro(e){let r=Nt(e),t=q($(e,"keyup"),$(e,"focus").pipe(Qr(1))).pipe(C(()=>e.value),be(e.value),pe());return r.pipe(_e(o=>!o),je(t)).subscribe(([,o])=>{let n=document.location.pathname;typeof ga=="function"&&o.length&&ga("send","pageview",`${n}?q=[icon]+${o}`)}),Fe([t,r]).pipe(C(([o,n])=>({ref:e,value:o,focus:n})))}var Zr=ot(Br());var po=ot(Br());function uo(e,r){return(0,po.wrap)(e.shortcode,r,{wrap:{tagOpen:"",tagClose:""}})}function lo(e,r,t){return Y("li",{class:"mdx-iconsearch-result__item"},Y("span",{class:"twemoji"},Y("img",{src:e.url})),Y("button",{class:"md-clipboard--inline",title:Zt("clipboard.copy"),"data-clipboard-text":t?e.shortcode:`:${e.shortcode}:`},Y("code",null,t?uo(e,r):`:${uo(e,r)}:`)))}function mo(e){let r=`@${e.name}`;return Y("a",{href:e.url,title:r,class:"mdx-sponsorship__item"},Y("img",{src:e.image}))}function ho(e){return Y("a",{href:"https://github.com/sponsors/squidfunk?metadata_origin=docs",class:"mdx-sponsorship__item mdx-sponsorship__item--private"},"+",e)}function cn(e,{index$:r,query$:t,mode$:o}){switch(e.getAttribute("data-mdx-mode")){case"file":return Fe([t.pipe(xr("value")),r.pipe(C(({icons:n})=>Object.values(n.data).map(i=>i.replace(/\.svg$/,""))))]).pipe(C(([{value:n},i])=>(0,Zr.filter)(i,n)),D(n=>r.pipe(C(({icons:i})=>({data:n.map(f=>({shortcode:f,url:[i.base,f,".svg"].join("")}))})))));default:return Fe([t.pipe(xr("value")),r.pipe(Nr(o),C(([{icons:n,emojis:i},f])=>[...["all","icons"].includes(f)?Object.keys(n.data):[],...["all","emojis"].includes(f)?Object.keys(i.data):[]]))]).pipe(C(([{value:n},i])=>(0,Zr.filter)(i,n)),D(n=>r.pipe(C(({icons:i,emojis:f})=>({data:n.map(u=>{let c=u in i.data?i:f;return{shortcode:u,url:[c.base,c.data[u]].join("")}})})))))}}function vo(e,{index$:r,query$:t,mode$:o}){let n=new K,i=Gt(e).pipe(_e(Boolean)),f=ae(".mdx-iconsearch-result__meta",e);n.pipe(je(t)).subscribe(([{data:a},{value:s}])=>{if(s)switch(a.length){case 0:f.textContent="No matches";break;case 1:f.textContent="1 match";break;default:f.textContent=`${Dt(a.length)} matches`}else f.textContent="Type to start searching"});let u=e.getAttribute("data-mdx-mode")==="file",c=ae(":scope > :last-child",e);return n.pipe(he(()=>c.innerHTML=""),D(({data:a})=>q(ie(...a.slice(0,10)),ie(...a.slice(10)).pipe(Vr(10),Jr(i),D(([s])=>s)))),je(t)).subscribe(([a,{value:s}])=>c.appendChild(lo(a,s,u))),cn(e,{query$:t,index$:r,mode$:o}).pipe(he(a=>n.next(a)),le(()=>n.complete()),C(a=>Je({ref:e},a)))}function bo(e){let r=Bt(),t=gr(new URL("assets/javascripts/iconsearch_index.json",r.base)),o=Xr("iconsearch-query",e),n=Xr("iconsearch-result",e),i=new kr("all"),f=xe("iconsearch-select",e);for(let a of f)$(a,"change").pipe(C(s=>s.target.value)).subscribe(i);let u=ro(o),c=vo(n,{index$:t,query$:u,mode$:i});return q(u,c)}function xo(e){let r=gr("https://3if8u9o552.execute-api.us-east-1.amazonaws.com/_/"),t=xe("sponsorship-count"),o=xe("sponsorship-total");r.pipe(D(i=>B(t).pipe(he(f=>f.innerText=`${i.sponsors.length}`)))).subscribe(()=>e.removeAttribute("hidden")),r.pipe(D(i=>B(o).pipe(he(f=>f.innerText=`$ ${i.total.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")} a month`)))).subscribe();let n=yr(":scope > .mdx-sponsorship__list",e);return n&&t.length&&r.subscribe(i=>{for(let f of i.sponsors)f.type==="public"&&n.appendChild(mo(f.user));n.appendChild(ho(i.sponsors.filter(({type:f})=>f==="private").length))}),r.pipe(C(i=>Je({ref:e},i)))}function yo(){let{origin:e}=new URL(location.href);$(document.body,"click").subscribe(r=>{if(r.target instanceof HTMLElement){let t=r.target.closest("a");t&&t.origin!==e&&ga("send","event","outbound","click",t.href)}})}yo();var sn=document$.pipe(D(()=>q(...xe("iconsearch").map(e=>bo(e)),...xe("sponsorship").map(e=>xo(e)))));sn.subscribe();})(); -//# sourceMappingURL=custom.95054b18.min.js.map +//# sourceMappingURL=custom.a0168cc8.min.js.map diff --git a/material/overrides/assets/javascripts/custom.95054b18.min.js.map b/material/overrides/assets/javascripts/custom.a0168cc8.min.js.map similarity index 91% rename from material/overrides/assets/javascripts/custom.95054b18.min.js.map rename to material/overrides/assets/javascripts/custom.a0168cc8.min.js.map index 0dc19ad1ade..22043613784 100644 --- a/material/overrides/assets/javascripts/custom.95054b18.min.js.map +++ b/material/overrides/assets/javascripts/custom.a0168cc8.min.js.map @@ -1,7 +1,7 @@ { "version": 3, "sources": ["node_modules/fuzzaldrin-plus/lib/scorer.js", "node_modules/fuzzaldrin-plus/lib/pathScorer.js", "node_modules/fuzzaldrin-plus/lib/query.js", "node_modules/fuzzaldrin-plus/lib/filter.js", "node_modules/fuzzaldrin-plus/lib/matcher.js", "node_modules/fuzzaldrin-plus/lib/fuzzaldrin.js", "node_modules/tslib/tslib.es6.mjs", "node_modules/rxjs/src/internal/util/isFunction.ts", "node_modules/rxjs/src/internal/util/createErrorClass.ts", "node_modules/rxjs/src/internal/util/UnsubscriptionError.ts", "node_modules/rxjs/src/internal/util/arrRemove.ts", "node_modules/rxjs/src/internal/Subscription.ts", "node_modules/rxjs/src/internal/config.ts", "node_modules/rxjs/src/internal/scheduler/timeoutProvider.ts", "node_modules/rxjs/src/internal/util/reportUnhandledError.ts", "node_modules/rxjs/src/internal/util/noop.ts", "node_modules/rxjs/src/internal/NotificationFactories.ts", "node_modules/rxjs/src/internal/util/errorContext.ts", "node_modules/rxjs/src/internal/Subscriber.ts", "node_modules/rxjs/src/internal/symbol/observable.ts", "node_modules/rxjs/src/internal/util/identity.ts", "node_modules/rxjs/src/internal/util/pipe.ts", "node_modules/rxjs/src/internal/Observable.ts", "node_modules/rxjs/src/internal/util/lift.ts", "node_modules/rxjs/src/internal/operators/OperatorSubscriber.ts", "node_modules/rxjs/src/internal/scheduler/animationFrameProvider.ts", "node_modules/rxjs/src/internal/util/ObjectUnsubscribedError.ts", "node_modules/rxjs/src/internal/Subject.ts", "node_modules/rxjs/src/internal/BehaviorSubject.ts", "node_modules/rxjs/src/internal/scheduler/dateTimestampProvider.ts", "node_modules/rxjs/src/internal/ReplaySubject.ts", "node_modules/rxjs/src/internal/scheduler/Action.ts", "node_modules/rxjs/src/internal/scheduler/intervalProvider.ts", "node_modules/rxjs/src/internal/scheduler/AsyncAction.ts", "node_modules/rxjs/src/internal/Scheduler.ts", "node_modules/rxjs/src/internal/scheduler/AsyncScheduler.ts", "node_modules/rxjs/src/internal/scheduler/async.ts", "node_modules/rxjs/src/internal/scheduler/AnimationFrameAction.ts", "node_modules/rxjs/src/internal/scheduler/AnimationFrameScheduler.ts", "node_modules/rxjs/src/internal/scheduler/animationFrame.ts", "node_modules/rxjs/src/internal/observable/empty.ts", "node_modules/rxjs/src/internal/util/isScheduler.ts", "node_modules/rxjs/src/internal/util/args.ts", "node_modules/rxjs/src/internal/util/isArrayLike.ts", "node_modules/rxjs/src/internal/util/isPromise.ts", "node_modules/rxjs/src/internal/util/isInteropObservable.ts", "node_modules/rxjs/src/internal/util/isAsyncIterable.ts", "node_modules/rxjs/src/internal/util/throwUnobservableError.ts", "node_modules/rxjs/src/internal/symbol/iterator.ts", "node_modules/rxjs/src/internal/util/isIterable.ts", "node_modules/rxjs/src/internal/util/isReadableStreamLike.ts", "node_modules/rxjs/src/internal/observable/innerFrom.ts", "node_modules/rxjs/src/internal/util/executeSchedule.ts", "node_modules/rxjs/src/internal/operators/observeOn.ts", "node_modules/rxjs/src/internal/operators/subscribeOn.ts", "node_modules/rxjs/src/internal/scheduled/scheduleObservable.ts", "node_modules/rxjs/src/internal/scheduled/schedulePromise.ts", "node_modules/rxjs/src/internal/scheduled/scheduleArray.ts", "node_modules/rxjs/src/internal/scheduled/scheduleIterable.ts", "node_modules/rxjs/src/internal/scheduled/scheduleAsyncIterable.ts", "node_modules/rxjs/src/internal/scheduled/scheduleReadableStreamLike.ts", "node_modules/rxjs/src/internal/scheduled/scheduled.ts", "node_modules/rxjs/src/internal/observable/from.ts", "node_modules/rxjs/src/internal/observable/of.ts", "node_modules/rxjs/src/internal/observable/throwError.ts", "node_modules/rxjs/src/internal/util/isDate.ts", "node_modules/rxjs/src/internal/operators/map.ts", "node_modules/rxjs/src/internal/util/mapOneOrManyArgs.ts", "node_modules/rxjs/src/internal/util/argsArgArrayOrObject.ts", "node_modules/rxjs/src/internal/util/createObject.ts", "node_modules/rxjs/src/internal/observable/combineLatest.ts", "node_modules/rxjs/src/internal/operators/mergeInternals.ts", "node_modules/rxjs/src/internal/operators/mergeMap.ts", "node_modules/rxjs/src/internal/operators/mergeAll.ts", "node_modules/rxjs/src/internal/operators/concatAll.ts", "node_modules/rxjs/src/internal/observable/concat.ts", "node_modules/rxjs/src/internal/observable/defer.ts", "node_modules/rxjs/src/internal/observable/fromEvent.ts", "node_modules/rxjs/src/internal/observable/timer.ts", "node_modules/rxjs/src/internal/observable/merge.ts", "node_modules/rxjs/src/internal/observable/never.ts", "node_modules/rxjs/src/internal/util/argsOrArgArray.ts", "node_modules/rxjs/src/internal/operators/filter.ts", "node_modules/rxjs/src/internal/observable/zip.ts", "node_modules/rxjs/src/internal/operators/audit.ts", "node_modules/rxjs/src/internal/operators/auditTime.ts", "node_modules/rxjs/src/internal/operators/bufferCount.ts", "node_modules/rxjs/src/internal/operators/combineLatest.ts", "node_modules/rxjs/src/internal/operators/combineLatestWith.ts", "node_modules/rxjs/src/internal/operators/debounceTime.ts", "node_modules/rxjs/src/internal/operators/take.ts", "node_modules/rxjs/src/internal/operators/ignoreElements.ts", "node_modules/rxjs/src/internal/operators/mapTo.ts", "node_modules/rxjs/src/internal/operators/delayWhen.ts", "node_modules/rxjs/src/internal/operators/delay.ts", "node_modules/rxjs/src/internal/operators/distinctUntilChanged.ts", "node_modules/rxjs/src/internal/operators/distinctUntilKeyChanged.ts", "node_modules/rxjs/src/internal/operators/finalize.ts", "node_modules/rxjs/src/internal/operators/share.ts", "node_modules/rxjs/src/internal/operators/shareReplay.ts", "node_modules/rxjs/src/internal/operators/startWith.ts", "node_modules/rxjs/src/internal/operators/switchMap.ts", "node_modules/rxjs/src/internal/operators/tap.ts", "node_modules/rxjs/src/internal/operators/withLatestFrom.ts", "node_modules/rxjs/src/internal/operators/zip.ts", "node_modules/rxjs/src/internal/operators/zipWith.ts", "src/templates/assets/javascripts/browser/element/_/index.ts", "src/templates/assets/javascripts/browser/element/focus/index.ts", "src/templates/assets/javascripts/utilities/h/index.ts", "src/templates/assets/javascripts/utilities/round/index.ts", "src/templates/assets/javascripts/browser/script/index.ts", "src/templates/assets/javascripts/browser/element/size/_/index.ts", "src/templates/assets/javascripts/browser/element/size/content/index.ts", "src/templates/assets/javascripts/browser/element/offset/content/index.ts", "src/templates/assets/javascripts/browser/element/visibility/index.ts", "src/templates/assets/javascripts/browser/toggle/index.ts", "src/templates/assets/javascripts/_/index.ts", "src/templates/assets/javascripts/browser/location/_/index.ts", "src/templates/assets/javascripts/browser/request/index.ts", "src/overrides/assets/javascripts/components/_/index.ts", "src/overrides/assets/javascripts/components/iconsearch/query/index.ts", "src/overrides/assets/javascripts/components/iconsearch/result/index.ts", "src/overrides/assets/javascripts/templates/iconsearch/index.tsx", "src/overrides/assets/javascripts/templates/sponsorship/index.tsx", "src/overrides/assets/javascripts/components/iconsearch/_/index.ts", "src/overrides/assets/javascripts/components/sponsorship/index.ts", "src/overrides/assets/javascripts/integrations/analytics/index.ts", "src/overrides/assets/javascripts/custom.ts"], - "sourcesContent": ["(function() {\n var AcronymResult, computeScore, emptyAcronymResult, isAcronymFullWord, isMatch, isSeparator, isWordEnd, isWordStart, miss_coeff, pos_bonus, scoreAcronyms, scoreCharacter, scoreConsecutives, scoreExact, scoreExactMatch, scorePattern, scorePosition, scoreSize, tau_size, wm;\n\n wm = 150;\n\n pos_bonus = 20;\n\n tau_size = 150;\n\n miss_coeff = 0.75;\n\n exports.score = function(string, query, options) {\n var allowErrors, preparedQuery, score, string_lw;\n preparedQuery = options.preparedQuery, allowErrors = options.allowErrors;\n if (!(allowErrors || isMatch(string, preparedQuery.core_lw, preparedQuery.core_up))) {\n return 0;\n }\n string_lw = string.toLowerCase();\n score = computeScore(string, string_lw, preparedQuery);\n return Math.ceil(score);\n };\n\n exports.isMatch = isMatch = function(subject, query_lw, query_up) {\n var i, j, m, n, qj_lw, qj_up, si;\n m = subject.length;\n n = query_lw.length;\n if (!m || n > m) {\n return false;\n }\n i = -1;\n j = -1;\n while (++j < n) {\n qj_lw = query_lw.charCodeAt(j);\n qj_up = query_up.charCodeAt(j);\n while (++i < m) {\n si = subject.charCodeAt(i);\n if (si === qj_lw || si === qj_up) {\n break;\n }\n }\n if (i === m) {\n return false;\n }\n }\n return true;\n };\n\n exports.computeScore = computeScore = function(subject, subject_lw, preparedQuery) {\n var acro, acro_score, align, csc_diag, csc_row, csc_score, csc_should_rebuild, i, j, m, miss_budget, miss_left, n, pos, query, query_lw, record_miss, score, score_diag, score_row, score_up, si_lw, start, sz;\n query = preparedQuery.query;\n query_lw = preparedQuery.query_lw;\n m = subject.length;\n n = query.length;\n acro = scoreAcronyms(subject, subject_lw, query, query_lw);\n acro_score = acro.score;\n if (acro.count === n) {\n return scoreExact(n, m, acro_score, acro.pos);\n }\n pos = subject_lw.indexOf(query_lw);\n if (pos > -1) {\n return scoreExactMatch(subject, subject_lw, query, query_lw, pos, n, m);\n }\n score_row = new Array(n);\n csc_row = new Array(n);\n sz = scoreSize(n, m);\n miss_budget = Math.ceil(miss_coeff * n) + 5;\n miss_left = miss_budget;\n csc_should_rebuild = true;\n j = -1;\n while (++j < n) {\n score_row[j] = 0;\n csc_row[j] = 0;\n }\n i = -1;\n while (++i < m) {\n si_lw = subject_lw[i];\n if (!si_lw.charCodeAt(0) in preparedQuery.charCodes) {\n if (csc_should_rebuild) {\n j = -1;\n while (++j < n) {\n csc_row[j] = 0;\n }\n csc_should_rebuild = false;\n }\n continue;\n }\n score = 0;\n score_diag = 0;\n csc_diag = 0;\n record_miss = true;\n csc_should_rebuild = true;\n j = -1;\n while (++j < n) {\n score_up = score_row[j];\n if (score_up > score) {\n score = score_up;\n }\n csc_score = 0;\n if (query_lw[j] === si_lw) {\n start = isWordStart(i, subject, subject_lw);\n csc_score = csc_diag > 0 ? csc_diag : scoreConsecutives(subject, subject_lw, query, query_lw, i, j, start);\n align = score_diag + scoreCharacter(i, j, start, acro_score, csc_score);\n if (align > score) {\n score = align;\n miss_left = miss_budget;\n } else {\n if (record_miss && --miss_left <= 0) {\n return Math.max(score, score_row[n - 1]) * sz;\n }\n record_miss = false;\n }\n }\n score_diag = score_up;\n csc_diag = csc_row[j];\n csc_row[j] = csc_score;\n score_row[j] = score;\n }\n }\n score = score_row[n - 1];\n return score * sz;\n };\n\n exports.isWordStart = isWordStart = function(pos, subject, subject_lw) {\n var curr_s, prev_s;\n if (pos === 0) {\n return true;\n }\n curr_s = subject[pos];\n prev_s = subject[pos - 1];\n return isSeparator(prev_s) || (curr_s !== subject_lw[pos] && prev_s === subject_lw[pos - 1]);\n };\n\n exports.isWordEnd = isWordEnd = function(pos, subject, subject_lw, len) {\n var curr_s, next_s;\n if (pos === len - 1) {\n return true;\n }\n curr_s = subject[pos];\n next_s = subject[pos + 1];\n return isSeparator(next_s) || (curr_s === subject_lw[pos] && next_s !== subject_lw[pos + 1]);\n };\n\n isSeparator = function(c) {\n return c === ' ' || c === '.' || c === '-' || c === '_' || c === '/' || c === '\\\\';\n };\n\n scorePosition = function(pos) {\n var sc;\n if (pos < pos_bonus) {\n sc = pos_bonus - pos;\n return 100 + sc * sc;\n } else {\n return Math.max(100 + pos_bonus - pos, 0);\n }\n };\n\n exports.scoreSize = scoreSize = function(n, m) {\n return tau_size / (tau_size + Math.abs(m - n));\n };\n\n scoreExact = function(n, m, quality, pos) {\n return 2 * n * (wm * quality + scorePosition(pos)) * scoreSize(n, m);\n };\n\n exports.scorePattern = scorePattern = function(count, len, sameCase, start, end) {\n var bonus, sz;\n sz = count;\n bonus = 6;\n if (sameCase === count) {\n bonus += 2;\n }\n if (start) {\n bonus += 3;\n }\n if (end) {\n bonus += 1;\n }\n if (count === len) {\n if (start) {\n if (sameCase === len) {\n sz += 2;\n } else {\n sz += 1;\n }\n }\n if (end) {\n bonus += 1;\n }\n }\n return sameCase + sz * (sz + bonus);\n };\n\n exports.scoreCharacter = scoreCharacter = function(i, j, start, acro_score, csc_score) {\n var posBonus;\n posBonus = scorePosition(i);\n if (start) {\n return posBonus + wm * ((acro_score > csc_score ? acro_score : csc_score) + 10);\n }\n return posBonus + wm * csc_score;\n };\n\n exports.scoreConsecutives = scoreConsecutives = function(subject, subject_lw, query, query_lw, i, j, startOfWord) {\n var k, m, mi, n, nj, sameCase, sz;\n m = subject.length;\n n = query.length;\n mi = m - i;\n nj = n - j;\n k = mi < nj ? mi : nj;\n sameCase = 0;\n sz = 0;\n if (query[j] === subject[i]) {\n sameCase++;\n }\n while (++sz < k && query_lw[++j] === subject_lw[++i]) {\n if (query[j] === subject[i]) {\n sameCase++;\n }\n }\n if (sz < k) {\n i--;\n }\n if (sz === 1) {\n return 1 + 2 * sameCase;\n }\n return scorePattern(sz, n, sameCase, startOfWord, isWordEnd(i, subject, subject_lw, m));\n };\n\n exports.scoreExactMatch = scoreExactMatch = function(subject, subject_lw, query, query_lw, pos, n, m) {\n var end, i, pos2, sameCase, start;\n start = isWordStart(pos, subject, subject_lw);\n if (!start) {\n pos2 = subject_lw.indexOf(query_lw, pos + 1);\n if (pos2 > -1) {\n start = isWordStart(pos2, subject, subject_lw);\n if (start) {\n pos = pos2;\n }\n }\n }\n i = -1;\n sameCase = 0;\n while (++i < n) {\n if (query[pos + i] === subject[i]) {\n sameCase++;\n }\n }\n end = isWordEnd(pos + n - 1, subject, subject_lw, m);\n return scoreExact(n, m, scorePattern(n, n, sameCase, start, end), pos);\n };\n\n AcronymResult = (function() {\n function AcronymResult(score, pos, count) {\n this.score = score;\n this.pos = pos;\n this.count = count;\n }\n\n return AcronymResult;\n\n })();\n\n emptyAcronymResult = new AcronymResult(0, 0.1, 0);\n\n exports.scoreAcronyms = scoreAcronyms = function(subject, subject_lw, query, query_lw) {\n var count, fullWord, i, j, m, n, qj_lw, sameCase, score, sepCount, sumPos;\n m = subject.length;\n n = query.length;\n if (!(m > 1 && n > 1)) {\n return emptyAcronymResult;\n }\n count = 0;\n sepCount = 0;\n sumPos = 0;\n sameCase = 0;\n i = -1;\n j = -1;\n while (++j < n) {\n qj_lw = query_lw[j];\n if (isSeparator(qj_lw)) {\n i = subject_lw.indexOf(qj_lw, i + 1);\n if (i > -1) {\n sepCount++;\n continue;\n } else {\n break;\n }\n }\n while (++i < m) {\n if (qj_lw === subject_lw[i] && isWordStart(i, subject, subject_lw)) {\n if (query[j] === subject[i]) {\n sameCase++;\n }\n sumPos += i;\n count++;\n break;\n }\n }\n if (i === m) {\n break;\n }\n }\n if (count < 2) {\n return emptyAcronymResult;\n }\n fullWord = count === n ? isAcronymFullWord(subject, subject_lw, query, count) : false;\n score = scorePattern(count, n, sameCase, true, fullWord);\n return new AcronymResult(score, sumPos / count, count + sepCount);\n };\n\n isAcronymFullWord = function(subject, subject_lw, query, nbAcronymInQuery) {\n var count, i, m, n;\n m = subject.length;\n n = query.length;\n count = 0;\n if (m > 12 * n) {\n return false;\n }\n i = -1;\n while (++i < m) {\n if (isWordStart(i, subject, subject_lw) && ++count > nbAcronymInQuery) {\n return false;\n }\n }\n return true;\n };\n\n}).call(this);\n", "(function() {\n var computeScore, countDir, file_coeff, getExtension, getExtensionScore, isMatch, scorePath, scoreSize, tau_depth, _ref;\n\n _ref = require('./scorer'), isMatch = _ref.isMatch, computeScore = _ref.computeScore, scoreSize = _ref.scoreSize;\n\n tau_depth = 20;\n\n file_coeff = 2.5;\n\n exports.score = function(string, query, options) {\n var allowErrors, preparedQuery, score, string_lw;\n preparedQuery = options.preparedQuery, allowErrors = options.allowErrors;\n if (!(allowErrors || isMatch(string, preparedQuery.core_lw, preparedQuery.core_up))) {\n return 0;\n }\n string_lw = string.toLowerCase();\n score = computeScore(string, string_lw, preparedQuery);\n score = scorePath(string, string_lw, score, options);\n return Math.ceil(score);\n };\n\n scorePath = function(subject, subject_lw, fullPathScore, options) {\n var alpha, basePathScore, basePos, depth, end, extAdjust, fileLength, pathSeparator, preparedQuery, useExtensionBonus;\n if (fullPathScore === 0) {\n return 0;\n }\n preparedQuery = options.preparedQuery, useExtensionBonus = options.useExtensionBonus, pathSeparator = options.pathSeparator;\n end = subject.length - 1;\n while (subject[end] === pathSeparator) {\n end--;\n }\n basePos = subject.lastIndexOf(pathSeparator, end);\n fileLength = end - basePos;\n extAdjust = 1.0;\n if (useExtensionBonus) {\n extAdjust += getExtensionScore(subject_lw, preparedQuery.ext, basePos, end, 2);\n fullPathScore *= extAdjust;\n }\n if (basePos === -1) {\n return fullPathScore;\n }\n depth = preparedQuery.depth;\n while (basePos > -1 && depth-- > 0) {\n basePos = subject.lastIndexOf(pathSeparator, basePos - 1);\n }\n basePathScore = basePos === -1 ? fullPathScore : extAdjust * computeScore(subject.slice(basePos + 1, end + 1), subject_lw.slice(basePos + 1, end + 1), preparedQuery);\n alpha = 0.5 * tau_depth / (tau_depth + countDir(subject, end + 1, pathSeparator));\n return alpha * basePathScore + (1 - alpha) * fullPathScore * scoreSize(0, file_coeff * fileLength);\n };\n\n exports.countDir = countDir = function(path, end, pathSeparator) {\n var count, i;\n if (end < 1) {\n return 0;\n }\n count = 0;\n i = -1;\n while (++i < end && path[i] === pathSeparator) {\n continue;\n }\n while (++i < end) {\n if (path[i] === pathSeparator) {\n count++;\n while (++i < end && path[i] === pathSeparator) {\n continue;\n }\n }\n }\n return count;\n };\n\n exports.getExtension = getExtension = function(str) {\n var pos;\n pos = str.lastIndexOf(\".\");\n if (pos < 0) {\n return \"\";\n } else {\n return str.substr(pos + 1);\n }\n };\n\n getExtensionScore = function(candidate, ext, startPos, endPos, maxDepth) {\n var m, matched, n, pos;\n if (!ext.length) {\n return 0;\n }\n pos = candidate.lastIndexOf(\".\", endPos);\n if (!(pos > startPos)) {\n return 0;\n }\n n = ext.length;\n m = endPos - pos;\n if (m < n) {\n n = m;\n m = ext.length;\n }\n pos++;\n matched = -1;\n while (++matched < n) {\n if (candidate[pos + matched] !== ext[matched]) {\n break;\n }\n }\n if (matched === 0 && maxDepth > 0) {\n return 0.9 * getExtensionScore(candidate, ext, startPos, pos - 2, maxDepth - 1);\n }\n return matched / m;\n };\n\n}).call(this);\n", "(function() {\n var Query, coreChars, countDir, getCharCodes, getExtension, opt_char_re, truncatedUpperCase, _ref;\n\n _ref = require(\"./pathScorer\"), countDir = _ref.countDir, getExtension = _ref.getExtension;\n\n module.exports = Query = (function() {\n function Query(query, _arg) {\n var optCharRegEx, pathSeparator, _ref1;\n _ref1 = _arg != null ? _arg : {}, optCharRegEx = _ref1.optCharRegEx, pathSeparator = _ref1.pathSeparator;\n if (!(query && query.length)) {\n return null;\n }\n this.query = query;\n this.query_lw = query.toLowerCase();\n this.core = coreChars(query, optCharRegEx);\n this.core_lw = this.core.toLowerCase();\n this.core_up = truncatedUpperCase(this.core);\n this.depth = countDir(query, query.length, pathSeparator);\n this.ext = getExtension(this.query_lw);\n this.charCodes = getCharCodes(this.query_lw);\n }\n\n return Query;\n\n })();\n\n opt_char_re = /[ _\\-:\\/\\\\]/g;\n\n coreChars = function(query, optCharRegEx) {\n if (optCharRegEx == null) {\n optCharRegEx = opt_char_re;\n }\n return query.replace(optCharRegEx, '');\n };\n\n truncatedUpperCase = function(str) {\n var char, upper, _i, _len;\n upper = \"\";\n for (_i = 0, _len = str.length; _i < _len; _i++) {\n char = str[_i];\n upper += char.toUpperCase()[0];\n }\n return upper;\n };\n\n getCharCodes = function(str) {\n var charCodes, i, len;\n len = str.length;\n i = -1;\n charCodes = [];\n while (++i < len) {\n charCodes[str.charCodeAt(i)] = true;\n }\n return charCodes;\n };\n\n}).call(this);\n", "(function() {\n var Query, pathScorer, pluckCandidates, scorer, sortCandidates;\n\n scorer = require('./scorer');\n\n pathScorer = require('./pathScorer');\n\n Query = require('./query');\n\n pluckCandidates = function(a) {\n return a.candidate;\n };\n\n sortCandidates = function(a, b) {\n return b.score - a.score;\n };\n\n module.exports = function(candidates, query, options) {\n var bKey, candidate, key, maxInners, maxResults, score, scoreProvider, scoredCandidates, spotLeft, string, usePathScoring, _i, _len;\n scoredCandidates = [];\n key = options.key, maxResults = options.maxResults, maxInners = options.maxInners, usePathScoring = options.usePathScoring;\n spotLeft = (maxInners != null) && maxInners > 0 ? maxInners : candidates.length + 1;\n bKey = key != null;\n scoreProvider = usePathScoring ? pathScorer : scorer;\n for (_i = 0, _len = candidates.length; _i < _len; _i++) {\n candidate = candidates[_i];\n string = bKey ? candidate[key] : candidate;\n if (!string) {\n continue;\n }\n score = scoreProvider.score(string, query, options);\n if (score > 0) {\n scoredCandidates.push({\n candidate: candidate,\n score: score\n });\n if (!--spotLeft) {\n break;\n }\n }\n }\n scoredCandidates.sort(sortCandidates);\n candidates = scoredCandidates.map(pluckCandidates);\n if (maxResults != null) {\n candidates = candidates.slice(0, maxResults);\n }\n return candidates;\n };\n\n}).call(this);\n", "(function() {\n var basenameMatch, computeMatch, isMatch, isWordStart, match, mergeMatches, scoreAcronyms, scoreCharacter, scoreConsecutives, _ref;\n\n _ref = require('./scorer'), isMatch = _ref.isMatch, isWordStart = _ref.isWordStart, scoreConsecutives = _ref.scoreConsecutives, scoreCharacter = _ref.scoreCharacter, scoreAcronyms = _ref.scoreAcronyms;\n\n exports.match = match = function(string, query, options) {\n var allowErrors, baseMatches, matches, pathSeparator, preparedQuery, string_lw;\n allowErrors = options.allowErrors, preparedQuery = options.preparedQuery, pathSeparator = options.pathSeparator;\n if (!(allowErrors || isMatch(string, preparedQuery.core_lw, preparedQuery.core_up))) {\n return [];\n }\n string_lw = string.toLowerCase();\n matches = computeMatch(string, string_lw, preparedQuery);\n if (matches.length === 0) {\n return matches;\n }\n if (string.indexOf(pathSeparator) > -1) {\n baseMatches = basenameMatch(string, string_lw, preparedQuery, pathSeparator);\n matches = mergeMatches(matches, baseMatches);\n }\n return matches;\n };\n\n exports.wrap = function(string, query, options) {\n var matchIndex, matchPos, matchPositions, output, strPos, tagClass, tagClose, tagOpen, _ref1;\n if ((options.wrap != null)) {\n _ref1 = options.wrap, tagClass = _ref1.tagClass, tagOpen = _ref1.tagOpen, tagClose = _ref1.tagClose;\n }\n if (tagClass == null) {\n tagClass = 'highlight';\n }\n if (tagOpen == null) {\n tagOpen = '';\n }\n if (tagClose == null) {\n tagClose = '';\n }\n if (string === query) {\n return tagOpen + string + tagClose;\n }\n matchPositions = match(string, query, options);\n if (matchPositions.length === 0) {\n return string;\n }\n output = '';\n matchIndex = -1;\n strPos = 0;\n while (++matchIndex < matchPositions.length) {\n matchPos = matchPositions[matchIndex];\n if (matchPos > strPos) {\n output += string.substring(strPos, matchPos);\n strPos = matchPos;\n }\n while (++matchIndex < matchPositions.length) {\n if (matchPositions[matchIndex] === matchPos + 1) {\n matchPos++;\n } else {\n matchIndex--;\n break;\n }\n }\n matchPos++;\n if (matchPos > strPos) {\n output += tagOpen;\n output += string.substring(strPos, matchPos);\n output += tagClose;\n strPos = matchPos;\n }\n }\n if (strPos <= string.length - 1) {\n output += string.substring(strPos);\n }\n return output;\n };\n\n basenameMatch = function(subject, subject_lw, preparedQuery, pathSeparator) {\n var basePos, depth, end;\n end = subject.length - 1;\n while (subject[end] === pathSeparator) {\n end--;\n }\n basePos = subject.lastIndexOf(pathSeparator, end);\n if (basePos === -1) {\n return [];\n }\n depth = preparedQuery.depth;\n while (depth-- > 0) {\n basePos = subject.lastIndexOf(pathSeparator, basePos - 1);\n if (basePos === -1) {\n return [];\n }\n }\n basePos++;\n end++;\n return computeMatch(subject.slice(basePos, end), subject_lw.slice(basePos, end), preparedQuery, basePos);\n };\n\n mergeMatches = function(a, b) {\n var ai, bj, i, j, m, n, out;\n m = a.length;\n n = b.length;\n if (n === 0) {\n return a.slice();\n }\n if (m === 0) {\n return b.slice();\n }\n i = -1;\n j = 0;\n bj = b[j];\n out = [];\n while (++i < m) {\n ai = a[i];\n while (bj <= ai && ++j < n) {\n if (bj < ai) {\n out.push(bj);\n }\n bj = b[j];\n }\n out.push(ai);\n }\n while (j < n) {\n out.push(b[j++]);\n }\n return out;\n };\n\n computeMatch = function(subject, subject_lw, preparedQuery, offset) {\n var DIAGONAL, LEFT, STOP, UP, acro_score, align, backtrack, csc_diag, csc_row, csc_score, i, j, m, matches, move, n, pos, query, query_lw, score, score_diag, score_row, score_up, si_lw, start, trace;\n if (offset == null) {\n offset = 0;\n }\n query = preparedQuery.query;\n query_lw = preparedQuery.query_lw;\n m = subject.length;\n n = query.length;\n acro_score = scoreAcronyms(subject, subject_lw, query, query_lw).score;\n score_row = new Array(n);\n csc_row = new Array(n);\n STOP = 0;\n UP = 1;\n LEFT = 2;\n DIAGONAL = 3;\n trace = new Array(m * n);\n pos = -1;\n j = -1;\n while (++j < n) {\n score_row[j] = 0;\n csc_row[j] = 0;\n }\n i = -1;\n while (++i < m) {\n score = 0;\n score_up = 0;\n csc_diag = 0;\n si_lw = subject_lw[i];\n j = -1;\n while (++j < n) {\n csc_score = 0;\n align = 0;\n score_diag = score_up;\n if (query_lw[j] === si_lw) {\n start = isWordStart(i, subject, subject_lw);\n csc_score = csc_diag > 0 ? csc_diag : scoreConsecutives(subject, subject_lw, query, query_lw, i, j, start);\n align = score_diag + scoreCharacter(i, j, start, acro_score, csc_score);\n }\n score_up = score_row[j];\n csc_diag = csc_row[j];\n if (score > score_up) {\n move = LEFT;\n } else {\n score = score_up;\n move = UP;\n }\n if (align > score) {\n score = align;\n move = DIAGONAL;\n } else {\n csc_score = 0;\n }\n score_row[j] = score;\n csc_row[j] = csc_score;\n trace[++pos] = score > 0 ? move : STOP;\n }\n }\n i = m - 1;\n j = n - 1;\n pos = i * n + j;\n backtrack = true;\n matches = [];\n while (backtrack && i >= 0 && j >= 0) {\n switch (trace[pos]) {\n case UP:\n i--;\n pos -= n;\n break;\n case LEFT:\n j--;\n pos--;\n break;\n case DIAGONAL:\n matches.push(i + offset);\n j--;\n i--;\n pos -= n + 1;\n break;\n default:\n backtrack = false;\n }\n }\n matches.reverse();\n return matches;\n };\n\n}).call(this);\n", "(function() {\n var Query, defaultPathSeparator, filter, matcher, parseOptions, pathScorer, preparedQueryCache, scorer;\n\n filter = require('./filter');\n\n matcher = require('./matcher');\n\n scorer = require('./scorer');\n\n pathScorer = require('./pathScorer');\n\n Query = require('./query');\n\n preparedQueryCache = null;\n\n defaultPathSeparator = (typeof process !== \"undefined\" && process !== null ? process.platform : void 0) === \"win32\" ? '\\\\' : '/';\n\n module.exports = {\n filter: function(candidates, query, options) {\n if (options == null) {\n options = {};\n }\n if (!((query != null ? query.length : void 0) && (candidates != null ? candidates.length : void 0))) {\n return [];\n }\n options = parseOptions(options, query);\n return filter(candidates, query, options);\n },\n score: function(string, query, options) {\n if (options == null) {\n options = {};\n }\n if (!((string != null ? string.length : void 0) && (query != null ? query.length : void 0))) {\n return 0;\n }\n options = parseOptions(options, query);\n if (options.usePathScoring) {\n return pathScorer.score(string, query, options);\n } else {\n return scorer.score(string, query, options);\n }\n },\n match: function(string, query, options) {\n var _i, _ref, _results;\n if (options == null) {\n options = {};\n }\n if (!string) {\n return [];\n }\n if (!query) {\n return [];\n }\n if (string === query) {\n return (function() {\n _results = [];\n for (var _i = 0, _ref = string.length; 0 <= _ref ? _i < _ref : _i > _ref; 0 <= _ref ? _i++ : _i--){ _results.push(_i); }\n return _results;\n }).apply(this);\n }\n options = parseOptions(options, query);\n return matcher.match(string, query, options);\n },\n wrap: function(string, query, options) {\n if (options == null) {\n options = {};\n }\n if (!string) {\n return [];\n }\n if (!query) {\n return [];\n }\n options = parseOptions(options, query);\n return matcher.wrap(string, query, options);\n },\n prepareQuery: function(query, options) {\n if (options == null) {\n options = {};\n }\n options = parseOptions(options, query);\n return options.preparedQuery;\n }\n };\n\n parseOptions = function(options, query) {\n if (options.allowErrors == null) {\n options.allowErrors = false;\n }\n if (options.usePathScoring == null) {\n options.usePathScoring = true;\n }\n if (options.useExtensionBonus == null) {\n options.useExtensionBonus = false;\n }\n if (options.pathSeparator == null) {\n options.pathSeparator = defaultPathSeparator;\n }\n if (options.optCharRegEx == null) {\n options.optCharRegEx = null;\n }\n if (options.wrap == null) {\n options.wrap = null;\n }\n if (options.preparedQuery == null) {\n options.preparedQuery = preparedQueryCache && preparedQueryCache.query === query ? preparedQueryCache : (preparedQueryCache = new Query(query, options));\n }\n return options;\n };\n\n}).call(this);\n", "/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n var r, s = 0;\n function next() {\n while (r = env.stack.pop()) {\n try {\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\n if (r.dispose) {\n var result = r.dispose.call(r.value);\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n else s |= 1;\n }\n catch (e) {\n fail(e);\n }\n }\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n};\n", "/**\n * Returns true if the object is a function.\n * @param value The value to check\n */\nexport function isFunction(value: any): value is (...args: any[]) => any {\n return typeof value === 'function';\n}\n", "/**\n * Used to create Error subclasses until the community moves away from ES5.\n *\n * This is because compiling from TypeScript down to ES5 has issues with subclassing Errors\n * as well as other built-in types: https://github.com/Microsoft/TypeScript/issues/12123\n *\n * @param createImpl A factory function to create the actual constructor implementation. The returned\n * function should be a named function that calls `_super` internally.\n */\nexport function createErrorClass(createImpl: (_super: any) => any): T {\n const _super = (instance: any) => {\n Error.call(instance);\n instance.stack = new Error().stack;\n };\n\n const ctorFunc = createImpl(_super);\n ctorFunc.prototype = Object.create(Error.prototype);\n ctorFunc.prototype.constructor = ctorFunc;\n return ctorFunc;\n}\n", "import { createErrorClass } from './createErrorClass';\n\nexport interface UnsubscriptionError extends Error {\n readonly errors: any[];\n}\n\nexport interface UnsubscriptionErrorCtor {\n /**\n * @deprecated Internal implementation detail. Do not construct error instances.\n * Cannot be tagged as internal: https://github.com/ReactiveX/rxjs/issues/6269\n */\n new (errors: any[]): UnsubscriptionError;\n}\n\n/**\n * An error thrown when one or more errors have occurred during the\n * `unsubscribe` of a {@link Subscription}.\n */\nexport const UnsubscriptionError: UnsubscriptionErrorCtor = createErrorClass(\n (_super) =>\n function UnsubscriptionErrorImpl(this: any, errors: (Error | string)[]) {\n _super(this);\n this.message = errors\n ? `${errors.length} errors occurred during unsubscription:\n${errors.map((err, i) => `${i + 1}) ${err.toString()}`).join('\\n ')}`\n : '';\n this.name = 'UnsubscriptionError';\n this.errors = errors;\n }\n);\n", "/**\n * Removes an item from an array, mutating it.\n * @param arr The array to remove the item from\n * @param item The item to remove\n */\nexport function arrRemove(arr: T[] | undefined | null, item: T) {\n if (arr) {\n const index = arr.indexOf(item);\n 0 <= index && arr.splice(index, 1);\n }\n}\n", "import { isFunction } from './util/isFunction';\nimport { UnsubscriptionError } from './util/UnsubscriptionError';\nimport { SubscriptionLike, TeardownLogic, Unsubscribable } from './types';\nimport { arrRemove } from './util/arrRemove';\n\n/**\n * Represents a disposable resource, such as the execution of an Observable. A\n * Subscription has one important method, `unsubscribe`, that takes no argument\n * and just disposes the resource held by the subscription.\n *\n * Additionally, subscriptions may be grouped together through the `add()`\n * method, which will attach a child Subscription to the current Subscription.\n * When a Subscription is unsubscribed, all its children (and its grandchildren)\n * will be unsubscribed as well.\n */\nexport class Subscription implements SubscriptionLike {\n public static EMPTY = (() => {\n const empty = new Subscription();\n empty.closed = true;\n return empty;\n })();\n\n /**\n * A flag to indicate whether this Subscription has already been unsubscribed.\n */\n public closed = false;\n\n private _parentage: Subscription[] | Subscription | null = null;\n\n /**\n * The list of registered finalizers to execute upon unsubscription. Adding and removing from this\n * list occurs in the {@link #add} and {@link #remove} methods.\n */\n private _finalizers: Exclude[] | null = null;\n\n /**\n * @param initialTeardown A function executed first as part of the finalization\n * process that is kicked off when {@link #unsubscribe} is called.\n */\n constructor(private initialTeardown?: () => void) {}\n\n /**\n * Disposes the resources held by the subscription. May, for instance, cancel\n * an ongoing Observable execution or cancel any other type of work that\n * started when the Subscription was created.\n */\n unsubscribe(): void {\n let errors: any[] | undefined;\n\n if (!this.closed) {\n this.closed = true;\n\n // Remove this from it's parents.\n const { _parentage } = this;\n if (_parentage) {\n this._parentage = null;\n if (Array.isArray(_parentage)) {\n for (const parent of _parentage) {\n parent.remove(this);\n }\n } else {\n _parentage.remove(this);\n }\n }\n\n const { initialTeardown: initialFinalizer } = this;\n if (isFunction(initialFinalizer)) {\n try {\n initialFinalizer();\n } catch (e) {\n errors = e instanceof UnsubscriptionError ? e.errors : [e];\n }\n }\n\n const { _finalizers } = this;\n if (_finalizers) {\n this._finalizers = null;\n for (const finalizer of _finalizers) {\n try {\n execFinalizer(finalizer);\n } catch (err) {\n errors = errors ?? [];\n if (err instanceof UnsubscriptionError) {\n errors = [...errors, ...err.errors];\n } else {\n errors.push(err);\n }\n }\n }\n }\n\n if (errors) {\n throw new UnsubscriptionError(errors);\n }\n }\n }\n\n /**\n * Adds a finalizer to this subscription, so that finalization will be unsubscribed/called\n * when this subscription is unsubscribed. If this subscription is already {@link #closed},\n * because it has already been unsubscribed, then whatever finalizer is passed to it\n * will automatically be executed (unless the finalizer itself is also a closed subscription).\n *\n * Closed Subscriptions cannot be added as finalizers to any subscription. Adding a closed\n * subscription to a any subscription will result in no operation. (A noop).\n *\n * Adding a subscription to itself, or adding `null` or `undefined` will not perform any\n * operation at all. (A noop).\n *\n * `Subscription` instances that are added to this instance will automatically remove themselves\n * if they are unsubscribed. Functions and {@link Unsubscribable} objects that you wish to remove\n * will need to be removed manually with {@link #remove}\n *\n * @param teardown The finalization logic to add to this subscription.\n */\n add(teardown: TeardownLogic): void {\n // Only add the finalizer if it's not undefined\n // and don't add a subscription to itself.\n if (teardown && teardown !== this) {\n if (this.closed) {\n // If this subscription is already closed,\n // execute whatever finalizer is handed to it automatically.\n execFinalizer(teardown);\n } else {\n if (teardown instanceof Subscription) {\n // We don't add closed subscriptions, and we don't add the same subscription\n // twice. Subscription unsubscribe is idempotent.\n if (teardown.closed || teardown._hasParent(this)) {\n return;\n }\n teardown._addParent(this);\n }\n (this._finalizers = this._finalizers ?? []).push(teardown);\n }\n }\n }\n\n /**\n * Checks to see if a this subscription already has a particular parent.\n * This will signal that this subscription has already been added to the parent in question.\n * @param parent the parent to check for\n */\n private _hasParent(parent: Subscription) {\n const { _parentage } = this;\n return _parentage === parent || (Array.isArray(_parentage) && _parentage.includes(parent));\n }\n\n /**\n * Adds a parent to this subscription so it can be removed from the parent if it\n * unsubscribes on it's own.\n *\n * NOTE: THIS ASSUMES THAT {@link _hasParent} HAS ALREADY BEEN CHECKED.\n * @param parent The parent subscription to add\n */\n private _addParent(parent: Subscription) {\n const { _parentage } = this;\n this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent;\n }\n\n /**\n * Called on a child when it is removed via {@link #remove}.\n * @param parent The parent to remove\n */\n private _removeParent(parent: Subscription) {\n const { _parentage } = this;\n if (_parentage === parent) {\n this._parentage = null;\n } else if (Array.isArray(_parentage)) {\n arrRemove(_parentage, parent);\n }\n }\n\n /**\n * Removes a finalizer from this subscription that was previously added with the {@link #add} method.\n *\n * Note that `Subscription` instances, when unsubscribed, will automatically remove themselves\n * from every other `Subscription` they have been added to. This means that using the `remove` method\n * is not a common thing and should be used thoughtfully.\n *\n * If you add the same finalizer instance of a function or an unsubscribable object to a `Subscription` instance\n * more than once, you will need to call `remove` the same number of times to remove all instances.\n *\n * All finalizer instances are removed to free up memory upon unsubscription.\n *\n * @param teardown The finalizer to remove from this subscription\n */\n remove(teardown: Exclude): void {\n const { _finalizers } = this;\n _finalizers && arrRemove(_finalizers, teardown);\n\n if (teardown instanceof Subscription) {\n teardown._removeParent(this);\n }\n }\n}\n\nexport const EMPTY_SUBSCRIPTION = Subscription.EMPTY;\n\nexport function isSubscription(value: any): value is Subscription {\n return (\n value instanceof Subscription ||\n (value && 'closed' in value && isFunction(value.remove) && isFunction(value.add) && isFunction(value.unsubscribe))\n );\n}\n\nfunction execFinalizer(finalizer: Unsubscribable | (() => void)) {\n if (isFunction(finalizer)) {\n finalizer();\n } else {\n finalizer.unsubscribe();\n }\n}\n", "import { Subscriber } from './Subscriber';\nimport { ObservableNotification } from './types';\n\n/**\n * The {@link GlobalConfig} object for RxJS. It is used to configure things\n * like how to react on unhandled errors.\n */\nexport const config: GlobalConfig = {\n onUnhandledError: null,\n onStoppedNotification: null,\n Promise: undefined,\n useDeprecatedSynchronousErrorHandling: false,\n useDeprecatedNextContext: false,\n};\n\n/**\n * The global configuration object for RxJS, used to configure things\n * like how to react on unhandled errors. Accessible via {@link config}\n * object.\n */\nexport interface GlobalConfig {\n /**\n * A registration point for unhandled errors from RxJS. These are errors that\n * cannot were not handled by consuming code in the usual subscription path. For\n * example, if you have this configured, and you subscribe to an observable without\n * providing an error handler, errors from that subscription will end up here. This\n * will _always_ be called asynchronously on another job in the runtime. This is because\n * we do not want errors thrown in this user-configured handler to interfere with the\n * behavior of the library.\n */\n onUnhandledError: ((err: any) => void) | null;\n\n /**\n * A registration point for notifications that cannot be sent to subscribers because they\n * have completed, errored or have been explicitly unsubscribed. By default, next, complete\n * and error notifications sent to stopped subscribers are noops. However, sometimes callers\n * might want a different behavior. For example, with sources that attempt to report errors\n * to stopped subscribers, a caller can configure RxJS to throw an unhandled error instead.\n * This will _always_ be called asynchronously on another job in the runtime. This is because\n * we do not want errors thrown in this user-configured handler to interfere with the\n * behavior of the library.\n */\n onStoppedNotification: ((notification: ObservableNotification, subscriber: Subscriber) => void) | null;\n\n /**\n * The promise constructor used by default for {@link Observable#toPromise toPromise} and {@link Observable#forEach forEach}\n * methods.\n *\n * @deprecated As of version 8, RxJS will no longer support this sort of injection of a\n * Promise constructor. If you need a Promise implementation other than native promises,\n * please polyfill/patch Promise as you see appropriate. Will be removed in v8.\n */\n Promise?: PromiseConstructorLike;\n\n /**\n * If true, turns on synchronous error rethrowing, which is a deprecated behavior\n * in v6 and higher. This behavior enables bad patterns like wrapping a subscribe\n * call in a try/catch block. It also enables producer interference, a nasty bug\n * where a multicast can be broken for all observers by a downstream consumer with\n * an unhandled error. DO NOT USE THIS FLAG UNLESS IT'S NEEDED TO BUY TIME\n * FOR MIGRATION REASONS.\n *\n * @deprecated As of version 8, RxJS will no longer support synchronous throwing\n * of unhandled errors. All errors will be thrown on a separate call stack to prevent bad\n * behaviors described above. Will be removed in v8.\n */\n useDeprecatedSynchronousErrorHandling: boolean;\n\n /**\n * If true, enables an as-of-yet undocumented feature from v5: The ability to access\n * `unsubscribe()` via `this` context in `next` functions created in observers passed\n * to `subscribe`.\n *\n * This is being removed because the performance was severely problematic, and it could also cause\n * issues when types other than POJOs are passed to subscribe as subscribers, as they will likely have\n * their `this` context overwritten.\n *\n * @deprecated As of version 8, RxJS will no longer support altering the\n * context of next functions provided as part of an observer to Subscribe. Instead,\n * you will have access to a subscription or a signal or token that will allow you to do things like\n * unsubscribe and test closed status. Will be removed in v8.\n */\n useDeprecatedNextContext: boolean;\n}\n", "import type { TimerHandle } from './timerHandle';\ntype SetTimeoutFunction = (handler: () => void, timeout?: number, ...args: any[]) => TimerHandle;\ntype ClearTimeoutFunction = (handle: TimerHandle) => void;\n\ninterface TimeoutProvider {\n setTimeout: SetTimeoutFunction;\n clearTimeout: ClearTimeoutFunction;\n delegate:\n | {\n setTimeout: SetTimeoutFunction;\n clearTimeout: ClearTimeoutFunction;\n }\n | undefined;\n}\n\nexport const timeoutProvider: TimeoutProvider = {\n // When accessing the delegate, use the variable rather than `this` so that\n // the functions can be called without being bound to the provider.\n setTimeout(handler: () => void, timeout?: number, ...args) {\n const { delegate } = timeoutProvider;\n if (delegate?.setTimeout) {\n return delegate.setTimeout(handler, timeout, ...args);\n }\n return setTimeout(handler, timeout, ...args);\n },\n clearTimeout(handle) {\n const { delegate } = timeoutProvider;\n return (delegate?.clearTimeout || clearTimeout)(handle as any);\n },\n delegate: undefined,\n};\n", "import { config } from '../config';\nimport { timeoutProvider } from '../scheduler/timeoutProvider';\n\n/**\n * Handles an error on another job either with the user-configured {@link onUnhandledError},\n * or by throwing it on that new job so it can be picked up by `window.onerror`, `process.on('error')`, etc.\n *\n * This should be called whenever there is an error that is out-of-band with the subscription\n * or when an error hits a terminal boundary of the subscription and no error handler was provided.\n *\n * @param err the error to report\n */\nexport function reportUnhandledError(err: any) {\n timeoutProvider.setTimeout(() => {\n const { onUnhandledError } = config;\n if (onUnhandledError) {\n // Execute the user-configured error handler.\n onUnhandledError(err);\n } else {\n // Throw so it is picked up by the runtime's uncaught error mechanism.\n throw err;\n }\n });\n}\n", "/* tslint:disable:no-empty */\nexport function noop() { }\n", "import { CompleteNotification, NextNotification, ErrorNotification } from './types';\n\n/**\n * A completion object optimized for memory use and created to be the\n * same \"shape\" as other notifications in v8.\n * @internal\n */\nexport const COMPLETE_NOTIFICATION = (() => createNotification('C', undefined, undefined) as CompleteNotification)();\n\n/**\n * Internal use only. Creates an optimized error notification that is the same \"shape\"\n * as other notifications.\n * @internal\n */\nexport function errorNotification(error: any): ErrorNotification {\n return createNotification('E', undefined, error) as any;\n}\n\n/**\n * Internal use only. Creates an optimized next notification that is the same \"shape\"\n * as other notifications.\n * @internal\n */\nexport function nextNotification(value: T) {\n return createNotification('N', value, undefined) as NextNotification;\n}\n\n/**\n * Ensures that all notifications created internally have the same \"shape\" in v8.\n *\n * TODO: This is only exported to support a crazy legacy test in `groupBy`.\n * @internal\n */\nexport function createNotification(kind: 'N' | 'E' | 'C', value: any, error: any) {\n return {\n kind,\n value,\n error,\n };\n}\n", "import { config } from '../config';\n\nlet context: { errorThrown: boolean; error: any } | null = null;\n\n/**\n * Handles dealing with errors for super-gross mode. Creates a context, in which\n * any synchronously thrown errors will be passed to {@link captureError}. Which\n * will record the error such that it will be rethrown after the call back is complete.\n * TODO: Remove in v8\n * @param cb An immediately executed function.\n */\nexport function errorContext(cb: () => void) {\n if (config.useDeprecatedSynchronousErrorHandling) {\n const isRoot = !context;\n if (isRoot) {\n context = { errorThrown: false, error: null };\n }\n cb();\n if (isRoot) {\n const { errorThrown, error } = context!;\n context = null;\n if (errorThrown) {\n throw error;\n }\n }\n } else {\n // This is the general non-deprecated path for everyone that\n // isn't crazy enough to use super-gross mode (useDeprecatedSynchronousErrorHandling)\n cb();\n }\n}\n\n/**\n * Captures errors only in super-gross mode.\n * @param err the error to capture\n */\nexport function captureError(err: any) {\n if (config.useDeprecatedSynchronousErrorHandling && context) {\n context.errorThrown = true;\n context.error = err;\n }\n}\n", "import { isFunction } from './util/isFunction';\nimport { Observer, ObservableNotification } from './types';\nimport { isSubscription, Subscription } from './Subscription';\nimport { config } from './config';\nimport { reportUnhandledError } from './util/reportUnhandledError';\nimport { noop } from './util/noop';\nimport { nextNotification, errorNotification, COMPLETE_NOTIFICATION } from './NotificationFactories';\nimport { timeoutProvider } from './scheduler/timeoutProvider';\nimport { captureError } from './util/errorContext';\n\n/**\n * Implements the {@link Observer} interface and extends the\n * {@link Subscription} class. While the {@link Observer} is the public API for\n * consuming the values of an {@link Observable}, all Observers get converted to\n * a Subscriber, in order to provide Subscription-like capabilities such as\n * `unsubscribe`. Subscriber is a common type in RxJS, and crucial for\n * implementing operators, but it is rarely used as a public API.\n */\nexport class Subscriber extends Subscription implements Observer {\n /**\n * A static factory for a Subscriber, given a (potentially partial) definition\n * of an Observer.\n * @param next The `next` callback of an Observer.\n * @param error The `error` callback of an\n * Observer.\n * @param complete The `complete` callback of an\n * Observer.\n * @return A Subscriber wrapping the (partially defined)\n * Observer represented by the given arguments.\n * @deprecated Do not use. Will be removed in v8. There is no replacement for this\n * method, and there is no reason to be creating instances of `Subscriber` directly.\n * If you have a specific use case, please file an issue.\n */\n static create(next?: (x?: T) => void, error?: (e?: any) => void, complete?: () => void): Subscriber {\n return new SafeSubscriber(next, error, complete);\n }\n\n /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */\n protected isStopped: boolean = false;\n /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */\n protected destination: Subscriber | Observer; // this `any` is the escape hatch to erase extra type param (e.g. R)\n\n /**\n * @deprecated Internal implementation detail, do not use directly. Will be made internal in v8.\n * There is no reason to directly create an instance of Subscriber. This type is exported for typings reasons.\n */\n constructor(destination?: Subscriber | Observer) {\n super();\n if (destination) {\n this.destination = destination;\n // Automatically chain subscriptions together here.\n // if destination is a Subscription, then it is a Subscriber.\n if (isSubscription(destination)) {\n destination.add(this);\n }\n } else {\n this.destination = EMPTY_OBSERVER;\n }\n }\n\n /**\n * The {@link Observer} callback to receive notifications of type `next` from\n * the Observable, with a value. The Observable may call this method 0 or more\n * times.\n * @param value The `next` value.\n */\n next(value: T): void {\n if (this.isStopped) {\n handleStoppedNotification(nextNotification(value), this);\n } else {\n this._next(value!);\n }\n }\n\n /**\n * The {@link Observer} callback to receive notifications of type `error` from\n * the Observable, with an attached `Error`. Notifies the Observer that\n * the Observable has experienced an error condition.\n * @param err The `error` exception.\n */\n error(err?: any): void {\n if (this.isStopped) {\n handleStoppedNotification(errorNotification(err), this);\n } else {\n this.isStopped = true;\n this._error(err);\n }\n }\n\n /**\n * The {@link Observer} callback to receive a valueless notification of type\n * `complete` from the Observable. Notifies the Observer that the Observable\n * has finished sending push-based notifications.\n */\n complete(): void {\n if (this.isStopped) {\n handleStoppedNotification(COMPLETE_NOTIFICATION, this);\n } else {\n this.isStopped = true;\n this._complete();\n }\n }\n\n unsubscribe(): void {\n if (!this.closed) {\n this.isStopped = true;\n super.unsubscribe();\n this.destination = null!;\n }\n }\n\n protected _next(value: T): void {\n this.destination.next(value);\n }\n\n protected _error(err: any): void {\n try {\n this.destination.error(err);\n } finally {\n this.unsubscribe();\n }\n }\n\n protected _complete(): void {\n try {\n this.destination.complete();\n } finally {\n this.unsubscribe();\n }\n }\n}\n\n/**\n * This bind is captured here because we want to be able to have\n * compatibility with monoid libraries that tend to use a method named\n * `bind`. In particular, a library called Monio requires this.\n */\nconst _bind = Function.prototype.bind;\n\nfunction bind any>(fn: Fn, thisArg: any): Fn {\n return _bind.call(fn, thisArg);\n}\n\n/**\n * Internal optimization only, DO NOT EXPOSE.\n * @internal\n */\nclass ConsumerObserver implements Observer {\n constructor(private partialObserver: Partial>) {}\n\n next(value: T): void {\n const { partialObserver } = this;\n if (partialObserver.next) {\n try {\n partialObserver.next(value);\n } catch (error) {\n handleUnhandledError(error);\n }\n }\n }\n\n error(err: any): void {\n const { partialObserver } = this;\n if (partialObserver.error) {\n try {\n partialObserver.error(err);\n } catch (error) {\n handleUnhandledError(error);\n }\n } else {\n handleUnhandledError(err);\n }\n }\n\n complete(): void {\n const { partialObserver } = this;\n if (partialObserver.complete) {\n try {\n partialObserver.complete();\n } catch (error) {\n handleUnhandledError(error);\n }\n }\n }\n}\n\nexport class SafeSubscriber extends Subscriber {\n constructor(\n observerOrNext?: Partial> | ((value: T) => void) | null,\n error?: ((e?: any) => void) | null,\n complete?: (() => void) | null\n ) {\n super();\n\n let partialObserver: Partial>;\n if (isFunction(observerOrNext) || !observerOrNext) {\n // The first argument is a function, not an observer. The next\n // two arguments *could* be observers, or they could be empty.\n partialObserver = {\n next: (observerOrNext ?? undefined) as ((value: T) => void) | undefined,\n error: error ?? undefined,\n complete: complete ?? undefined,\n };\n } else {\n // The first argument is a partial observer.\n let context: any;\n if (this && config.useDeprecatedNextContext) {\n // This is a deprecated path that made `this.unsubscribe()` available in\n // next handler functions passed to subscribe. This only exists behind a flag\n // now, as it is *very* slow.\n context = Object.create(observerOrNext);\n context.unsubscribe = () => this.unsubscribe();\n partialObserver = {\n next: observerOrNext.next && bind(observerOrNext.next, context),\n error: observerOrNext.error && bind(observerOrNext.error, context),\n complete: observerOrNext.complete && bind(observerOrNext.complete, context),\n };\n } else {\n // The \"normal\" path. Just use the partial observer directly.\n partialObserver = observerOrNext;\n }\n }\n\n // Wrap the partial observer to ensure it's a full observer, and\n // make sure proper error handling is accounted for.\n this.destination = new ConsumerObserver(partialObserver);\n }\n}\n\nfunction handleUnhandledError(error: any) {\n if (config.useDeprecatedSynchronousErrorHandling) {\n captureError(error);\n } else {\n // Ideal path, we report this as an unhandled error,\n // which is thrown on a new call stack.\n reportUnhandledError(error);\n }\n}\n\n/**\n * An error handler used when no error handler was supplied\n * to the SafeSubscriber -- meaning no error handler was supplied\n * do the `subscribe` call on our observable.\n * @param err The error to handle\n */\nfunction defaultErrorHandler(err: any) {\n throw err;\n}\n\n/**\n * A handler for notifications that cannot be sent to a stopped subscriber.\n * @param notification The notification being sent.\n * @param subscriber The stopped subscriber.\n */\nfunction handleStoppedNotification(notification: ObservableNotification, subscriber: Subscriber) {\n const { onStoppedNotification } = config;\n onStoppedNotification && timeoutProvider.setTimeout(() => onStoppedNotification(notification, subscriber));\n}\n\n/**\n * The observer used as a stub for subscriptions where the user did not\n * pass any arguments to `subscribe`. Comes with the default error handling\n * behavior.\n */\nexport const EMPTY_OBSERVER: Readonly> & { closed: true } = {\n closed: true,\n next: noop,\n error: defaultErrorHandler,\n complete: noop,\n};\n", "/**\n * Symbol.observable or a string \"@@observable\". Used for interop\n *\n * @deprecated We will no longer be exporting this symbol in upcoming versions of RxJS.\n * Instead polyfill and use Symbol.observable directly *or* use https://www.npmjs.com/package/symbol-observable\n */\nexport const observable: string | symbol = (() => (typeof Symbol === 'function' && Symbol.observable) || '@@observable')();\n", "/**\n * This function takes one parameter and just returns it. Simply put,\n * this is like `(x: T): T => x`.\n *\n * ## Examples\n *\n * This is useful in some cases when using things like `mergeMap`\n *\n * ```ts\n * import { interval, take, map, range, mergeMap, identity } from 'rxjs';\n *\n * const source$ = interval(1000).pipe(take(5));\n *\n * const result$ = source$.pipe(\n * map(i => range(i)),\n * mergeMap(identity) // same as mergeMap(x => x)\n * );\n *\n * result$.subscribe({\n * next: console.log\n * });\n * ```\n *\n * Or when you want to selectively apply an operator\n *\n * ```ts\n * import { interval, take, identity } from 'rxjs';\n *\n * const shouldLimit = () => Math.random() < 0.5;\n *\n * const source$ = interval(1000);\n *\n * const result$ = source$.pipe(shouldLimit() ? take(5) : identity);\n *\n * result$.subscribe({\n * next: console.log\n * });\n * ```\n *\n * @param x Any value that is returned by this function\n * @returns The value passed as the first parameter to this function\n */\nexport function identity(x: T): T {\n return x;\n}\n", "import { identity } from './identity';\nimport { UnaryFunction } from '../types';\n\nexport function pipe(): typeof identity;\nexport function pipe(fn1: UnaryFunction): UnaryFunction;\nexport function pipe(fn1: UnaryFunction, fn2: UnaryFunction): UnaryFunction;\nexport function pipe(fn1: UnaryFunction, fn2: UnaryFunction, fn3: UnaryFunction): UnaryFunction;\nexport function pipe(\n fn1: UnaryFunction,\n fn2: UnaryFunction,\n fn3: UnaryFunction,\n fn4: UnaryFunction\n): UnaryFunction;\nexport function pipe(\n fn1: UnaryFunction,\n fn2: UnaryFunction,\n fn3: UnaryFunction,\n fn4: UnaryFunction,\n fn5: UnaryFunction\n): UnaryFunction;\nexport function pipe(\n fn1: UnaryFunction,\n fn2: UnaryFunction,\n fn3: UnaryFunction,\n fn4: UnaryFunction,\n fn5: UnaryFunction,\n fn6: UnaryFunction\n): UnaryFunction;\nexport function pipe(\n fn1: UnaryFunction,\n fn2: UnaryFunction,\n fn3: UnaryFunction,\n fn4: UnaryFunction,\n fn5: UnaryFunction,\n fn6: UnaryFunction,\n fn7: UnaryFunction\n): UnaryFunction;\nexport function pipe(\n fn1: UnaryFunction,\n fn2: UnaryFunction,\n fn3: UnaryFunction,\n fn4: UnaryFunction,\n fn5: UnaryFunction,\n fn6: UnaryFunction,\n fn7: UnaryFunction,\n fn8: UnaryFunction\n): UnaryFunction;\nexport function pipe(\n fn1: UnaryFunction,\n fn2: UnaryFunction,\n fn3: UnaryFunction,\n fn4: UnaryFunction,\n fn5: UnaryFunction,\n fn6: UnaryFunction,\n fn7: UnaryFunction,\n fn8: UnaryFunction,\n fn9: UnaryFunction\n): UnaryFunction;\nexport function pipe(\n fn1: UnaryFunction,\n fn2: UnaryFunction,\n fn3: UnaryFunction,\n fn4: UnaryFunction,\n fn5: UnaryFunction,\n fn6: UnaryFunction,\n fn7: UnaryFunction,\n fn8: UnaryFunction,\n fn9: UnaryFunction,\n ...fns: UnaryFunction[]\n): UnaryFunction;\n\n/**\n * pipe() can be called on one or more functions, each of which can take one argument (\"UnaryFunction\")\n * and uses it to return a value.\n * It returns a function that takes one argument, passes it to the first UnaryFunction, and then\n * passes the result to the next one, passes that result to the next one, and so on. \n */\nexport function pipe(...fns: Array>): UnaryFunction {\n return pipeFromArray(fns);\n}\n\n/** @internal */\nexport function pipeFromArray(fns: Array>): UnaryFunction {\n if (fns.length === 0) {\n return identity as UnaryFunction;\n }\n\n if (fns.length === 1) {\n return fns[0];\n }\n\n return function piped(input: T): R {\n return fns.reduce((prev: any, fn: UnaryFunction) => fn(prev), input as any);\n };\n}\n", "import { Operator } from './Operator';\nimport { SafeSubscriber, Subscriber } from './Subscriber';\nimport { isSubscription, Subscription } from './Subscription';\nimport { TeardownLogic, OperatorFunction, Subscribable, Observer } from './types';\nimport { observable as Symbol_observable } from './symbol/observable';\nimport { pipeFromArray } from './util/pipe';\nimport { config } from './config';\nimport { isFunction } from './util/isFunction';\nimport { errorContext } from './util/errorContext';\n\n/**\n * A representation of any set of values over any amount of time. This is the most basic building block\n * of RxJS.\n */\nexport class Observable implements Subscribable {\n /**\n * @deprecated Internal implementation detail, do not use directly. Will be made internal in v8.\n */\n source: Observable | undefined;\n\n /**\n * @deprecated Internal implementation detail, do not use directly. Will be made internal in v8.\n */\n operator: Operator | undefined;\n\n /**\n * @param subscribe The function that is called when the Observable is\n * initially subscribed to. This function is given a Subscriber, to which new values\n * can be `next`ed, or an `error` method can be called to raise an error, or\n * `complete` can be called to notify of a successful completion.\n */\n constructor(subscribe?: (this: Observable, subscriber: Subscriber) => TeardownLogic) {\n if (subscribe) {\n this._subscribe = subscribe;\n }\n }\n\n // HACK: Since TypeScript inherits static properties too, we have to\n // fight against TypeScript here so Subject can have a different static create signature\n /**\n * Creates a new Observable by calling the Observable constructor\n * @param subscribe the subscriber function to be passed to the Observable constructor\n * @return A new observable.\n * @deprecated Use `new Observable()` instead. Will be removed in v8.\n */\n static create: (...args: any[]) => any = (subscribe?: (subscriber: Subscriber) => TeardownLogic) => {\n return new Observable(subscribe);\n };\n\n /**\n * Creates a new Observable, with this Observable instance as the source, and the passed\n * operator defined as the new observable's operator.\n * @param operator the operator defining the operation to take on the observable\n * @return A new observable with the Operator applied.\n * @deprecated Internal implementation detail, do not use directly. Will be made internal in v8.\n * If you have implemented an operator using `lift`, it is recommended that you create an\n * operator by simply returning `new Observable()` directly. See \"Creating new operators from\n * scratch\" section here: https://rxjs.dev/guide/operators\n */\n lift(operator?: Operator): Observable {\n const observable = new Observable();\n observable.source = this;\n observable.operator = operator;\n return observable;\n }\n\n subscribe(observerOrNext?: Partial> | ((value: T) => void)): Subscription;\n /** @deprecated Instead of passing separate callback arguments, use an observer argument. Signatures taking separate callback arguments will be removed in v8. Details: https://rxjs.dev/deprecations/subscribe-arguments */\n subscribe(next?: ((value: T) => void) | null, error?: ((error: any) => void) | null, complete?: (() => void) | null): Subscription;\n /**\n * Invokes an execution of an Observable and registers Observer handlers for notifications it will emit.\n *\n * Use it when you have all these Observables, but still nothing is happening.\n *\n * `subscribe` is not a regular operator, but a method that calls Observable's internal `subscribe` function. It\n * might be for example a function that you passed to Observable's constructor, but most of the time it is\n * a library implementation, which defines what will be emitted by an Observable, and when it be will emitted. This means\n * that calling `subscribe` is actually the moment when Observable starts its work, not when it is created, as it is often\n * the thought.\n *\n * Apart from starting the execution of an Observable, this method allows you to listen for values\n * that an Observable emits, as well as for when it completes or errors. You can achieve this in two\n * of the following ways.\n *\n * The first way is creating an object that implements {@link Observer} interface. It should have methods\n * defined by that interface, but note that it should be just a regular JavaScript object, which you can create\n * yourself in any way you want (ES6 class, classic function constructor, object literal etc.). In particular, do\n * not attempt to use any RxJS implementation details to create Observers - you don't need them. Remember also\n * that your object does not have to implement all methods. If you find yourself creating a method that doesn't\n * do anything, you can simply omit it. Note however, if the `error` method is not provided and an error happens,\n * it will be thrown asynchronously. Errors thrown asynchronously cannot be caught using `try`/`catch`. Instead,\n * use the {@link onUnhandledError} configuration option or use a runtime handler (like `window.onerror` or\n * `process.on('error)`) to be notified of unhandled errors. Because of this, it's recommended that you provide\n * an `error` method to avoid missing thrown errors.\n *\n * The second way is to give up on Observer object altogether and simply provide callback functions in place of its methods.\n * This means you can provide three functions as arguments to `subscribe`, where the first function is equivalent\n * of a `next` method, the second of an `error` method and the third of a `complete` method. Just as in case of an Observer,\n * if you do not need to listen for something, you can omit a function by passing `undefined` or `null`,\n * since `subscribe` recognizes these functions by where they were placed in function call. When it comes\n * to the `error` function, as with an Observer, if not provided, errors emitted by an Observable will be thrown asynchronously.\n *\n * You can, however, subscribe with no parameters at all. This may be the case where you're not interested in terminal events\n * and you also handled emissions internally by using operators (e.g. using `tap`).\n *\n * Whichever style of calling `subscribe` you use, in both cases it returns a Subscription object.\n * This object allows you to call `unsubscribe` on it, which in turn will stop the work that an Observable does and will clean\n * up all resources that an Observable used. Note that cancelling a subscription will not call `complete` callback\n * provided to `subscribe` function, which is reserved for a regular completion signal that comes from an Observable.\n *\n * Remember that callbacks provided to `subscribe` are not guaranteed to be called asynchronously.\n * It is an Observable itself that decides when these functions will be called. For example {@link of}\n * by default emits all its values synchronously. Always check documentation for how given Observable\n * will behave when subscribed and if its default behavior can be modified with a `scheduler`.\n *\n * #### Examples\n *\n * Subscribe with an {@link guide/observer Observer}\n *\n * ```ts\n * import { of } from 'rxjs';\n *\n * const sumObserver = {\n * sum: 0,\n * next(value) {\n * console.log('Adding: ' + value);\n * this.sum = this.sum + value;\n * },\n * error() {\n * // We actually could just remove this method,\n * // since we do not really care about errors right now.\n * },\n * complete() {\n * console.log('Sum equals: ' + this.sum);\n * }\n * };\n *\n * of(1, 2, 3) // Synchronously emits 1, 2, 3 and then completes.\n * .subscribe(sumObserver);\n *\n * // Logs:\n * // 'Adding: 1'\n * // 'Adding: 2'\n * // 'Adding: 3'\n * // 'Sum equals: 6'\n * ```\n *\n * Subscribe with functions ({@link deprecations/subscribe-arguments deprecated})\n *\n * ```ts\n * import { of } from 'rxjs'\n *\n * let sum = 0;\n *\n * of(1, 2, 3).subscribe(\n * value => {\n * console.log('Adding: ' + value);\n * sum = sum + value;\n * },\n * undefined,\n * () => console.log('Sum equals: ' + sum)\n * );\n *\n * // Logs:\n * // 'Adding: 1'\n * // 'Adding: 2'\n * // 'Adding: 3'\n * // 'Sum equals: 6'\n * ```\n *\n * Cancel a subscription\n *\n * ```ts\n * import { interval } from 'rxjs';\n *\n * const subscription = interval(1000).subscribe({\n * next(num) {\n * console.log(num)\n * },\n * complete() {\n * // Will not be called, even when cancelling subscription.\n * console.log('completed!');\n * }\n * });\n *\n * setTimeout(() => {\n * subscription.unsubscribe();\n * console.log('unsubscribed!');\n * }, 2500);\n *\n * // Logs:\n * // 0 after 1s\n * // 1 after 2s\n * // 'unsubscribed!' after 2.5s\n * ```\n *\n * @param observerOrNext Either an {@link Observer} with some or all callback methods,\n * or the `next` handler that is called for each value emitted from the subscribed Observable.\n * @param error A handler for a terminal event resulting from an error. If no error handler is provided,\n * the error will be thrown asynchronously as unhandled.\n * @param complete A handler for a terminal event resulting from successful completion.\n * @return A subscription reference to the registered handlers.\n */\n subscribe(\n observerOrNext?: Partial> | ((value: T) => void) | null,\n error?: ((error: any) => void) | null,\n complete?: (() => void) | null\n ): Subscription {\n const subscriber = isSubscriber(observerOrNext) ? observerOrNext : new SafeSubscriber(observerOrNext, error, complete);\n\n errorContext(() => {\n const { operator, source } = this;\n subscriber.add(\n operator\n ? // We're dealing with a subscription in the\n // operator chain to one of our lifted operators.\n operator.call(subscriber, source)\n : source\n ? // If `source` has a value, but `operator` does not, something that\n // had intimate knowledge of our API, like our `Subject`, must have\n // set it. We're going to just call `_subscribe` directly.\n this._subscribe(subscriber)\n : // In all other cases, we're likely wrapping a user-provided initializer\n // function, so we need to catch errors and handle them appropriately.\n this._trySubscribe(subscriber)\n );\n });\n\n return subscriber;\n }\n\n /** @internal */\n protected _trySubscribe(sink: Subscriber): TeardownLogic {\n try {\n return this._subscribe(sink);\n } catch (err) {\n // We don't need to return anything in this case,\n // because it's just going to try to `add()` to a subscription\n // above.\n sink.error(err);\n }\n }\n\n /**\n * Used as a NON-CANCELLABLE means of subscribing to an observable, for use with\n * APIs that expect promises, like `async/await`. You cannot unsubscribe from this.\n *\n * **WARNING**: Only use this with observables you *know* will complete. If the source\n * observable does not complete, you will end up with a promise that is hung up, and\n * potentially all of the state of an async function hanging out in memory. To avoid\n * this situation, look into adding something like {@link timeout}, {@link take},\n * {@link takeWhile}, or {@link takeUntil} amongst others.\n *\n * #### Example\n *\n * ```ts\n * import { interval, take } from 'rxjs';\n *\n * const source$ = interval(1000).pipe(take(4));\n *\n * async function getTotal() {\n * let total = 0;\n *\n * await source$.forEach(value => {\n * total += value;\n * console.log('observable -> ' + value);\n * });\n *\n * return total;\n * }\n *\n * getTotal().then(\n * total => console.log('Total: ' + total)\n * );\n *\n * // Expected:\n * // 'observable -> 0'\n * // 'observable -> 1'\n * // 'observable -> 2'\n * // 'observable -> 3'\n * // 'Total: 6'\n * ```\n *\n * @param next A handler for each value emitted by the observable.\n * @return A promise that either resolves on observable completion or\n * rejects with the handled error.\n */\n forEach(next: (value: T) => void): Promise;\n\n /**\n * @param next a handler for each value emitted by the observable\n * @param promiseCtor a constructor function used to instantiate the Promise\n * @return a promise that either resolves on observable completion or\n * rejects with the handled error\n * @deprecated Passing a Promise constructor will no longer be available\n * in upcoming versions of RxJS. This is because it adds weight to the library, for very\n * little benefit. If you need this functionality, it is recommended that you either\n * polyfill Promise, or you create an adapter to convert the returned native promise\n * to whatever promise implementation you wanted. Will be removed in v8.\n */\n forEach(next: (value: T) => void, promiseCtor: PromiseConstructorLike): Promise;\n\n forEach(next: (value: T) => void, promiseCtor?: PromiseConstructorLike): Promise {\n promiseCtor = getPromiseCtor(promiseCtor);\n\n return new promiseCtor((resolve, reject) => {\n const subscriber = new SafeSubscriber({\n next: (value) => {\n try {\n next(value);\n } catch (err) {\n reject(err);\n subscriber.unsubscribe();\n }\n },\n error: reject,\n complete: resolve,\n });\n this.subscribe(subscriber);\n }) as Promise;\n }\n\n /** @internal */\n protected _subscribe(subscriber: Subscriber): TeardownLogic {\n return this.source?.subscribe(subscriber);\n }\n\n /**\n * An interop point defined by the es7-observable spec https://github.com/zenparsing/es-observable\n * @return This instance of the observable.\n */\n [Symbol_observable]() {\n return this;\n }\n\n /* tslint:disable:max-line-length */\n pipe(): Observable;\n pipe(op1: OperatorFunction): Observable;\n pipe(op1: OperatorFunction, op2: OperatorFunction): Observable;\n pipe(op1: OperatorFunction, op2: OperatorFunction, op3: OperatorFunction): Observable;\n pipe(\n op1: OperatorFunction,\n op2: OperatorFunction,\n op3: OperatorFunction,\n op4: OperatorFunction\n ): Observable;\n pipe(\n op1: OperatorFunction,\n op2: OperatorFunction,\n op3: OperatorFunction,\n op4: OperatorFunction,\n op5: OperatorFunction\n ): Observable;\n pipe(\n op1: OperatorFunction,\n op2: OperatorFunction,\n op3: OperatorFunction,\n op4: OperatorFunction,\n op5: OperatorFunction,\n op6: OperatorFunction\n ): Observable;\n pipe(\n op1: OperatorFunction,\n op2: OperatorFunction,\n op3: OperatorFunction,\n op4: OperatorFunction,\n op5: OperatorFunction,\n op6: OperatorFunction,\n op7: OperatorFunction\n ): Observable;\n pipe(\n op1: OperatorFunction,\n op2: OperatorFunction,\n op3: OperatorFunction,\n op4: OperatorFunction,\n op5: OperatorFunction,\n op6: OperatorFunction,\n op7: OperatorFunction,\n op8: OperatorFunction\n ): Observable;\n pipe(\n op1: OperatorFunction,\n op2: OperatorFunction,\n op3: OperatorFunction,\n op4: OperatorFunction,\n op5: OperatorFunction,\n op6: OperatorFunction,\n op7: OperatorFunction,\n op8: OperatorFunction,\n op9: OperatorFunction\n ): Observable;\n pipe(\n op1: OperatorFunction,\n op2: OperatorFunction,\n op3: OperatorFunction,\n op4: OperatorFunction,\n op5: OperatorFunction,\n op6: OperatorFunction,\n op7: OperatorFunction,\n op8: OperatorFunction,\n op9: OperatorFunction,\n ...operations: OperatorFunction[]\n ): Observable;\n /* tslint:enable:max-line-length */\n\n /**\n * Used to stitch together functional operators into a chain.\n *\n * ## Example\n *\n * ```ts\n * import { interval, filter, map, scan } from 'rxjs';\n *\n * interval(1000)\n * .pipe(\n * filter(x => x % 2 === 0),\n * map(x => x + x),\n * scan((acc, x) => acc + x)\n * )\n * .subscribe(x => console.log(x));\n * ```\n *\n * @return The Observable result of all the operators having been called\n * in the order they were passed in.\n */\n pipe(...operations: OperatorFunction[]): Observable {\n return pipeFromArray(operations)(this);\n }\n\n /* tslint:disable:max-line-length */\n /** @deprecated Replaced with {@link firstValueFrom} and {@link lastValueFrom}. Will be removed in v8. Details: https://rxjs.dev/deprecations/to-promise */\n toPromise(): Promise;\n /** @deprecated Replaced with {@link firstValueFrom} and {@link lastValueFrom}. Will be removed in v8. Details: https://rxjs.dev/deprecations/to-promise */\n toPromise(PromiseCtor: typeof Promise): Promise;\n /** @deprecated Replaced with {@link firstValueFrom} and {@link lastValueFrom}. Will be removed in v8. Details: https://rxjs.dev/deprecations/to-promise */\n toPromise(PromiseCtor: PromiseConstructorLike): Promise;\n /* tslint:enable:max-line-length */\n\n /**\n * Subscribe to this Observable and get a Promise resolving on\n * `complete` with the last emission (if any).\n *\n * **WARNING**: Only use this with observables you *know* will complete. If the source\n * observable does not complete, you will end up with a promise that is hung up, and\n * potentially all of the state of an async function hanging out in memory. To avoid\n * this situation, look into adding something like {@link timeout}, {@link take},\n * {@link takeWhile}, or {@link takeUntil} amongst others.\n *\n * @param [promiseCtor] a constructor function used to instantiate\n * the Promise\n * @return A Promise that resolves with the last value emit, or\n * rejects on an error. If there were no emissions, Promise\n * resolves with undefined.\n * @deprecated Replaced with {@link firstValueFrom} and {@link lastValueFrom}. Will be removed in v8. Details: https://rxjs.dev/deprecations/to-promise\n */\n toPromise(promiseCtor?: PromiseConstructorLike): Promise {\n promiseCtor = getPromiseCtor(promiseCtor);\n\n return new promiseCtor((resolve, reject) => {\n let value: T | undefined;\n this.subscribe(\n (x: T) => (value = x),\n (err: any) => reject(err),\n () => resolve(value)\n );\n }) as Promise;\n }\n}\n\n/**\n * Decides between a passed promise constructor from consuming code,\n * A default configured promise constructor, and the native promise\n * constructor and returns it. If nothing can be found, it will throw\n * an error.\n * @param promiseCtor The optional promise constructor to passed by consuming code\n */\nfunction getPromiseCtor(promiseCtor: PromiseConstructorLike | undefined) {\n return promiseCtor ?? config.Promise ?? Promise;\n}\n\nfunction isObserver(value: any): value is Observer {\n return value && isFunction(value.next) && isFunction(value.error) && isFunction(value.complete);\n}\n\nfunction isSubscriber(value: any): value is Subscriber {\n return (value && value instanceof Subscriber) || (isObserver(value) && isSubscription(value));\n}\n", "import { Observable } from '../Observable';\nimport { Subscriber } from '../Subscriber';\nimport { OperatorFunction } from '../types';\nimport { isFunction } from './isFunction';\n\n/**\n * Used to determine if an object is an Observable with a lift function.\n */\nexport function hasLift(source: any): source is { lift: InstanceType['lift'] } {\n return isFunction(source?.lift);\n}\n\n/**\n * Creates an `OperatorFunction`. Used to define operators throughout the library in a concise way.\n * @param init The logic to connect the liftedSource to the subscriber at the moment of subscription.\n */\nexport function operate(\n init: (liftedSource: Observable, subscriber: Subscriber) => (() => void) | void\n): OperatorFunction {\n return (source: Observable) => {\n if (hasLift(source)) {\n return source.lift(function (this: Subscriber, liftedSource: Observable) {\n try {\n return init(liftedSource, this);\n } catch (err) {\n this.error(err);\n }\n });\n }\n throw new TypeError('Unable to lift unknown Observable type');\n };\n}\n", "import { Subscriber } from '../Subscriber';\n\n/**\n * Creates an instance of an `OperatorSubscriber`.\n * @param destination The downstream subscriber.\n * @param onNext Handles next values, only called if this subscriber is not stopped or closed. Any\n * error that occurs in this function is caught and sent to the `error` method of this subscriber.\n * @param onError Handles errors from the subscription, any errors that occur in this handler are caught\n * and send to the `destination` error handler.\n * @param onComplete Handles completion notification from the subscription. Any errors that occur in\n * this handler are sent to the `destination` error handler.\n * @param onFinalize Additional teardown logic here. This will only be called on teardown if the\n * subscriber itself is not already closed. This is called after all other teardown logic is executed.\n */\nexport function createOperatorSubscriber(\n destination: Subscriber,\n onNext?: (value: T) => void,\n onComplete?: () => void,\n onError?: (err: any) => void,\n onFinalize?: () => void\n): Subscriber {\n return new OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize);\n}\n\n/**\n * A generic helper for allowing operators to be created with a Subscriber and\n * use closures to capture necessary state from the operator function itself.\n */\nexport class OperatorSubscriber extends Subscriber {\n /**\n * Creates an instance of an `OperatorSubscriber`.\n * @param destination The downstream subscriber.\n * @param onNext Handles next values, only called if this subscriber is not stopped or closed. Any\n * error that occurs in this function is caught and sent to the `error` method of this subscriber.\n * @param onError Handles errors from the subscription, any errors that occur in this handler are caught\n * and send to the `destination` error handler.\n * @param onComplete Handles completion notification from the subscription. Any errors that occur in\n * this handler are sent to the `destination` error handler.\n * @param onFinalize Additional finalization logic here. This will only be called on finalization if the\n * subscriber itself is not already closed. This is called after all other finalization logic is executed.\n * @param shouldUnsubscribe An optional check to see if an unsubscribe call should truly unsubscribe.\n * NOTE: This currently **ONLY** exists to support the strange behavior of {@link groupBy}, where unsubscription\n * to the resulting observable does not actually disconnect from the source if there are active subscriptions\n * to any grouped observable. (DO NOT EXPOSE OR USE EXTERNALLY!!!)\n */\n constructor(\n destination: Subscriber,\n onNext?: (value: T) => void,\n onComplete?: () => void,\n onError?: (err: any) => void,\n private onFinalize?: () => void,\n private shouldUnsubscribe?: () => boolean\n ) {\n // It's important - for performance reasons - that all of this class's\n // members are initialized and that they are always initialized in the same\n // order. This will ensure that all OperatorSubscriber instances have the\n // same hidden class in V8. This, in turn, will help keep the number of\n // hidden classes involved in property accesses within the base class as\n // low as possible. If the number of hidden classes involved exceeds four,\n // the property accesses will become megamorphic and performance penalties\n // will be incurred - i.e. inline caches won't be used.\n //\n // The reasons for ensuring all instances have the same hidden class are\n // further discussed in this blog post from Benedikt Meurer:\n // https://benediktmeurer.de/2018/03/23/impact-of-polymorphism-on-component-based-frameworks-like-react/\n super(destination);\n this._next = onNext\n ? function (this: OperatorSubscriber, value: T) {\n try {\n onNext(value);\n } catch (err) {\n destination.error(err);\n }\n }\n : super._next;\n this._error = onError\n ? function (this: OperatorSubscriber, err: any) {\n try {\n onError(err);\n } catch (err) {\n // Send any errors that occur down stream.\n destination.error(err);\n } finally {\n // Ensure finalization.\n this.unsubscribe();\n }\n }\n : super._error;\n this._complete = onComplete\n ? function (this: OperatorSubscriber) {\n try {\n onComplete();\n } catch (err) {\n // Send any errors that occur down stream.\n destination.error(err);\n } finally {\n // Ensure finalization.\n this.unsubscribe();\n }\n }\n : super._complete;\n }\n\n unsubscribe() {\n if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) {\n const { closed } = this;\n super.unsubscribe();\n // Execute additional teardown if we have any and we didn't already do so.\n !closed && this.onFinalize?.();\n }\n }\n}\n", "import { Subscription } from '../Subscription';\n\ninterface AnimationFrameProvider {\n schedule(callback: FrameRequestCallback): Subscription;\n requestAnimationFrame: typeof requestAnimationFrame;\n cancelAnimationFrame: typeof cancelAnimationFrame;\n delegate:\n | {\n requestAnimationFrame: typeof requestAnimationFrame;\n cancelAnimationFrame: typeof cancelAnimationFrame;\n }\n | undefined;\n}\n\nexport const animationFrameProvider: AnimationFrameProvider = {\n // When accessing the delegate, use the variable rather than `this` so that\n // the functions can be called without being bound to the provider.\n schedule(callback) {\n let request = requestAnimationFrame;\n let cancel: typeof cancelAnimationFrame | undefined = cancelAnimationFrame;\n const { delegate } = animationFrameProvider;\n if (delegate) {\n request = delegate.requestAnimationFrame;\n cancel = delegate.cancelAnimationFrame;\n }\n const handle = request((timestamp) => {\n // Clear the cancel function. The request has been fulfilled, so\n // attempting to cancel the request upon unsubscription would be\n // pointless.\n cancel = undefined;\n callback(timestamp);\n });\n return new Subscription(() => cancel?.(handle));\n },\n requestAnimationFrame(...args) {\n const { delegate } = animationFrameProvider;\n return (delegate?.requestAnimationFrame || requestAnimationFrame)(...args);\n },\n cancelAnimationFrame(...args) {\n const { delegate } = animationFrameProvider;\n return (delegate?.cancelAnimationFrame || cancelAnimationFrame)(...args);\n },\n delegate: undefined,\n};\n", "import { createErrorClass } from './createErrorClass';\n\nexport interface ObjectUnsubscribedError extends Error {}\n\nexport interface ObjectUnsubscribedErrorCtor {\n /**\n * @deprecated Internal implementation detail. Do not construct error instances.\n * Cannot be tagged as internal: https://github.com/ReactiveX/rxjs/issues/6269\n */\n new (): ObjectUnsubscribedError;\n}\n\n/**\n * An error thrown when an action is invalid because the object has been\n * unsubscribed.\n *\n * @see {@link Subject}\n * @see {@link BehaviorSubject}\n *\n * @class ObjectUnsubscribedError\n */\nexport const ObjectUnsubscribedError: ObjectUnsubscribedErrorCtor = createErrorClass(\n (_super) =>\n function ObjectUnsubscribedErrorImpl(this: any) {\n _super(this);\n this.name = 'ObjectUnsubscribedError';\n this.message = 'object unsubscribed';\n }\n);\n", "import { Operator } from './Operator';\nimport { Observable } from './Observable';\nimport { Subscriber } from './Subscriber';\nimport { Subscription, EMPTY_SUBSCRIPTION } from './Subscription';\nimport { Observer, SubscriptionLike, TeardownLogic } from './types';\nimport { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError';\nimport { arrRemove } from './util/arrRemove';\nimport { errorContext } from './util/errorContext';\n\n/**\n * A Subject is a special type of Observable that allows values to be\n * multicasted to many Observers. Subjects are like EventEmitters.\n *\n * Every Subject is an Observable and an Observer. You can subscribe to a\n * Subject, and you can call next to feed values as well as error and complete.\n */\nexport class Subject extends Observable implements SubscriptionLike {\n closed = false;\n\n private currentObservers: Observer[] | null = null;\n\n /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */\n observers: Observer[] = [];\n /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */\n isStopped = false;\n /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */\n hasError = false;\n /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */\n thrownError: any = null;\n\n /**\n * Creates a \"subject\" by basically gluing an observer to an observable.\n *\n * @deprecated Recommended you do not use. Will be removed at some point in the future. Plans for replacement still under discussion.\n */\n static create: (...args: any[]) => any = (destination: Observer, source: Observable): AnonymousSubject => {\n return new AnonymousSubject(destination, source);\n };\n\n constructor() {\n // NOTE: This must be here to obscure Observable's constructor.\n super();\n }\n\n /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */\n lift(operator: Operator): Observable {\n const subject = new AnonymousSubject(this, this);\n subject.operator = operator as any;\n return subject as any;\n }\n\n /** @internal */\n protected _throwIfClosed() {\n if (this.closed) {\n throw new ObjectUnsubscribedError();\n }\n }\n\n next(value: T) {\n errorContext(() => {\n this._throwIfClosed();\n if (!this.isStopped) {\n if (!this.currentObservers) {\n this.currentObservers = Array.from(this.observers);\n }\n for (const observer of this.currentObservers) {\n observer.next(value);\n }\n }\n });\n }\n\n error(err: any) {\n errorContext(() => {\n this._throwIfClosed();\n if (!this.isStopped) {\n this.hasError = this.isStopped = true;\n this.thrownError = err;\n const { observers } = this;\n while (observers.length) {\n observers.shift()!.error(err);\n }\n }\n });\n }\n\n complete() {\n errorContext(() => {\n this._throwIfClosed();\n if (!this.isStopped) {\n this.isStopped = true;\n const { observers } = this;\n while (observers.length) {\n observers.shift()!.complete();\n }\n }\n });\n }\n\n unsubscribe() {\n this.isStopped = this.closed = true;\n this.observers = this.currentObservers = null!;\n }\n\n get observed() {\n return this.observers?.length > 0;\n }\n\n /** @internal */\n protected _trySubscribe(subscriber: Subscriber): TeardownLogic {\n this._throwIfClosed();\n return super._trySubscribe(subscriber);\n }\n\n /** @internal */\n protected _subscribe(subscriber: Subscriber): Subscription {\n this._throwIfClosed();\n this._checkFinalizedStatuses(subscriber);\n return this._innerSubscribe(subscriber);\n }\n\n /** @internal */\n protected _innerSubscribe(subscriber: Subscriber) {\n const { hasError, isStopped, observers } = this;\n if (hasError || isStopped) {\n return EMPTY_SUBSCRIPTION;\n }\n this.currentObservers = null;\n observers.push(subscriber);\n return new Subscription(() => {\n this.currentObservers = null;\n arrRemove(observers, subscriber);\n });\n }\n\n /** @internal */\n protected _checkFinalizedStatuses(subscriber: Subscriber) {\n const { hasError, thrownError, isStopped } = this;\n if (hasError) {\n subscriber.error(thrownError);\n } else if (isStopped) {\n subscriber.complete();\n }\n }\n\n /**\n * Creates a new Observable with this Subject as the source. You can do this\n * to create custom Observer-side logic of the Subject and conceal it from\n * code that uses the Observable.\n * @return Observable that this Subject casts to.\n */\n asObservable(): Observable {\n const observable: any = new Observable();\n observable.source = this;\n return observable;\n }\n}\n\nexport class AnonymousSubject extends Subject {\n constructor(\n /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */\n public destination?: Observer,\n source?: Observable\n ) {\n super();\n this.source = source;\n }\n\n next(value: T) {\n this.destination?.next?.(value);\n }\n\n error(err: any) {\n this.destination?.error?.(err);\n }\n\n complete() {\n this.destination?.complete?.();\n }\n\n /** @internal */\n protected _subscribe(subscriber: Subscriber): Subscription {\n return this.source?.subscribe(subscriber) ?? EMPTY_SUBSCRIPTION;\n }\n}\n", "import { Subject } from './Subject';\nimport { Subscriber } from './Subscriber';\nimport { Subscription } from './Subscription';\n\n/**\n * A variant of Subject that requires an initial value and emits its current\n * value whenever it is subscribed to.\n */\nexport class BehaviorSubject extends Subject {\n constructor(private _value: T) {\n super();\n }\n\n get value(): T {\n return this.getValue();\n }\n\n /** @internal */\n protected _subscribe(subscriber: Subscriber): Subscription {\n const subscription = super._subscribe(subscriber);\n !subscription.closed && subscriber.next(this._value);\n return subscription;\n }\n\n getValue(): T {\n const { hasError, thrownError, _value } = this;\n if (hasError) {\n throw thrownError;\n }\n this._throwIfClosed();\n return _value;\n }\n\n next(value: T): void {\n super.next((this._value = value));\n }\n}\n", "import { TimestampProvider } from '../types';\n\ninterface DateTimestampProvider extends TimestampProvider {\n delegate: TimestampProvider | undefined;\n}\n\nexport const dateTimestampProvider: DateTimestampProvider = {\n now() {\n // Use the variable rather than `this` so that the function can be called\n // without being bound to the provider.\n return (dateTimestampProvider.delegate || Date).now();\n },\n delegate: undefined,\n};\n", "import { Subject } from './Subject';\nimport { TimestampProvider } from './types';\nimport { Subscriber } from './Subscriber';\nimport { Subscription } from './Subscription';\nimport { dateTimestampProvider } from './scheduler/dateTimestampProvider';\n\n/**\n * A variant of {@link Subject} that \"replays\" old values to new subscribers by emitting them when they first subscribe.\n *\n * `ReplaySubject` has an internal buffer that will store a specified number of values that it has observed. Like `Subject`,\n * `ReplaySubject` \"observes\" values by having them passed to its `next` method. When it observes a value, it will store that\n * value for a time determined by the configuration of the `ReplaySubject`, as passed to its constructor.\n *\n * When a new subscriber subscribes to the `ReplaySubject` instance, it will synchronously emit all values in its buffer in\n * a First-In-First-Out (FIFO) manner. The `ReplaySubject` will also complete, if it has observed completion; and it will\n * error if it has observed an error.\n *\n * There are two main configuration items to be concerned with:\n *\n * 1. `bufferSize` - This will determine how many items are stored in the buffer, defaults to infinite.\n * 2. `windowTime` - The amount of time to hold a value in the buffer before removing it from the buffer.\n *\n * Both configurations may exist simultaneously. So if you would like to buffer a maximum of 3 values, as long as the values\n * are less than 2 seconds old, you could do so with a `new ReplaySubject(3, 2000)`.\n *\n * ### Differences with BehaviorSubject\n *\n * `BehaviorSubject` is similar to `new ReplaySubject(1)`, with a couple of exceptions:\n *\n * 1. `BehaviorSubject` comes \"primed\" with a single value upon construction.\n * 2. `ReplaySubject` will replay values, even after observing an error, where `BehaviorSubject` will not.\n *\n * @see {@link Subject}\n * @see {@link BehaviorSubject}\n * @see {@link shareReplay}\n */\nexport class ReplaySubject extends Subject {\n private _buffer: (T | number)[] = [];\n private _infiniteTimeWindow = true;\n\n /**\n * @param _bufferSize The size of the buffer to replay on subscription\n * @param _windowTime The amount of time the buffered items will stay buffered\n * @param _timestampProvider An object with a `now()` method that provides the current timestamp. This is used to\n * calculate the amount of time something has been buffered.\n */\n constructor(\n private _bufferSize = Infinity,\n private _windowTime = Infinity,\n private _timestampProvider: TimestampProvider = dateTimestampProvider\n ) {\n super();\n this._infiniteTimeWindow = _windowTime === Infinity;\n this._bufferSize = Math.max(1, _bufferSize);\n this._windowTime = Math.max(1, _windowTime);\n }\n\n next(value: T): void {\n const { isStopped, _buffer, _infiniteTimeWindow, _timestampProvider, _windowTime } = this;\n if (!isStopped) {\n _buffer.push(value);\n !_infiniteTimeWindow && _buffer.push(_timestampProvider.now() + _windowTime);\n }\n this._trimBuffer();\n super.next(value);\n }\n\n /** @internal */\n protected _subscribe(subscriber: Subscriber): Subscription {\n this._throwIfClosed();\n this._trimBuffer();\n\n const subscription = this._innerSubscribe(subscriber);\n\n const { _infiniteTimeWindow, _buffer } = this;\n // We use a copy here, so reentrant code does not mutate our array while we're\n // emitting it to a new subscriber.\n const copy = _buffer.slice();\n for (let i = 0; i < copy.length && !subscriber.closed; i += _infiniteTimeWindow ? 1 : 2) {\n subscriber.next(copy[i] as T);\n }\n\n this._checkFinalizedStatuses(subscriber);\n\n return subscription;\n }\n\n private _trimBuffer() {\n const { _bufferSize, _timestampProvider, _buffer, _infiniteTimeWindow } = this;\n // If we don't have an infinite buffer size, and we're over the length,\n // use splice to truncate the old buffer values off. Note that we have to\n // double the size for instances where we're not using an infinite time window\n // because we're storing the values and the timestamps in the same array.\n const adjustedBufferSize = (_infiniteTimeWindow ? 1 : 2) * _bufferSize;\n _bufferSize < Infinity && adjustedBufferSize < _buffer.length && _buffer.splice(0, _buffer.length - adjustedBufferSize);\n\n // Now, if we're not in an infinite time window, remove all values where the time is\n // older than what is allowed.\n if (!_infiniteTimeWindow) {\n const now = _timestampProvider.now();\n let last = 0;\n // Search the array for the first timestamp that isn't expired and\n // truncate the buffer up to that point.\n for (let i = 1; i < _buffer.length && (_buffer[i] as number) <= now; i += 2) {\n last = i;\n }\n last && _buffer.splice(0, last + 1);\n }\n }\n}\n", "import { Scheduler } from '../Scheduler';\nimport { Subscription } from '../Subscription';\nimport { SchedulerAction } from '../types';\n\n/**\n * A unit of work to be executed in a `scheduler`. An action is typically\n * created from within a {@link SchedulerLike} and an RxJS user does not need to concern\n * themselves about creating and manipulating an Action.\n *\n * ```ts\n * class Action extends Subscription {\n * new (scheduler: Scheduler, work: (state?: T) => void);\n * schedule(state?: T, delay: number = 0): Subscription;\n * }\n * ```\n */\nexport class Action extends Subscription {\n constructor(scheduler: Scheduler, work: (this: SchedulerAction, state?: T) => void) {\n super();\n }\n /**\n * Schedules this action on its parent {@link SchedulerLike} for execution. May be passed\n * some context object, `state`. May happen at some point in the future,\n * according to the `delay` parameter, if specified.\n * @param state Some contextual data that the `work` function uses when called by the\n * Scheduler.\n * @param delay Time to wait before executing the work, where the time unit is implicit\n * and defined by the Scheduler.\n * @return A subscription in order to be able to unsubscribe the scheduled work.\n */\n public schedule(state?: T, delay: number = 0): Subscription {\n return this;\n }\n}\n", "import type { TimerHandle } from './timerHandle';\ntype SetIntervalFunction = (handler: () => void, timeout?: number, ...args: any[]) => TimerHandle;\ntype ClearIntervalFunction = (handle: TimerHandle) => void;\n\ninterface IntervalProvider {\n setInterval: SetIntervalFunction;\n clearInterval: ClearIntervalFunction;\n delegate:\n | {\n setInterval: SetIntervalFunction;\n clearInterval: ClearIntervalFunction;\n }\n | undefined;\n}\n\nexport const intervalProvider: IntervalProvider = {\n // When accessing the delegate, use the variable rather than `this` so that\n // the functions can be called without being bound to the provider.\n setInterval(handler: () => void, timeout?: number, ...args) {\n const { delegate } = intervalProvider;\n if (delegate?.setInterval) {\n return delegate.setInterval(handler, timeout, ...args);\n }\n return setInterval(handler, timeout, ...args);\n },\n clearInterval(handle) {\n const { delegate } = intervalProvider;\n return (delegate?.clearInterval || clearInterval)(handle as any);\n },\n delegate: undefined,\n};\n", "import { Action } from './Action';\nimport { SchedulerAction } from '../types';\nimport { Subscription } from '../Subscription';\nimport { AsyncScheduler } from './AsyncScheduler';\nimport { intervalProvider } from './intervalProvider';\nimport { arrRemove } from '../util/arrRemove';\nimport { TimerHandle } from './timerHandle';\n\nexport class AsyncAction extends Action {\n public id: TimerHandle | undefined;\n public state?: T;\n // @ts-ignore: Property has no initializer and is not definitely assigned\n public delay: number;\n protected pending: boolean = false;\n\n constructor(protected scheduler: AsyncScheduler, protected work: (this: SchedulerAction, state?: T) => void) {\n super(scheduler, work);\n }\n\n public schedule(state?: T, delay: number = 0): Subscription {\n if (this.closed) {\n return this;\n }\n\n // Always replace the current state with the new state.\n this.state = state;\n\n const id = this.id;\n const scheduler = this.scheduler;\n\n //\n // Important implementation note:\n //\n // Actions only execute once by default, unless rescheduled from within the\n // scheduled callback. This allows us to implement single and repeat\n // actions via the same code path, without adding API surface area, as well\n // as mimic traditional recursion but across asynchronous boundaries.\n //\n // However, JS runtimes and timers distinguish between intervals achieved by\n // serial `setTimeout` calls vs. a single `setInterval` call. An interval of\n // serial `setTimeout` calls can be individually delayed, which delays\n // scheduling the next `setTimeout`, and so on. `setInterval` attempts to\n // guarantee the interval callback will be invoked more precisely to the\n // interval period, regardless of load.\n //\n // Therefore, we use `setInterval` to schedule single and repeat actions.\n // If the action reschedules itself with the same delay, the interval is not\n // canceled. If the action doesn't reschedule, or reschedules with a\n // different delay, the interval will be canceled after scheduled callback\n // execution.\n //\n if (id != null) {\n this.id = this.recycleAsyncId(scheduler, id, delay);\n }\n\n // Set the pending flag indicating that this action has been scheduled, or\n // has recursively rescheduled itself.\n this.pending = true;\n\n this.delay = delay;\n // If this action has already an async Id, don't request a new one.\n this.id = this.id ?? this.requestAsyncId(scheduler, this.id, delay);\n\n return this;\n }\n\n protected requestAsyncId(scheduler: AsyncScheduler, _id?: TimerHandle, delay: number = 0): TimerHandle {\n return intervalProvider.setInterval(scheduler.flush.bind(scheduler, this), delay);\n }\n\n protected recycleAsyncId(_scheduler: AsyncScheduler, id?: TimerHandle, delay: number | null = 0): TimerHandle | undefined {\n // If this action is rescheduled with the same delay time, don't clear the interval id.\n if (delay != null && this.delay === delay && this.pending === false) {\n return id;\n }\n // Otherwise, if the action's delay time is different from the current delay,\n // or the action has been rescheduled before it's executed, clear the interval id\n if (id != null) {\n intervalProvider.clearInterval(id);\n }\n\n return undefined;\n }\n\n /**\n * Immediately executes this action and the `work` it contains.\n */\n public execute(state: T, delay: number): any {\n if (this.closed) {\n return new Error('executing a cancelled action');\n }\n\n this.pending = false;\n const error = this._execute(state, delay);\n if (error) {\n return error;\n } else if (this.pending === false && this.id != null) {\n // Dequeue if the action didn't reschedule itself. Don't call\n // unsubscribe(), because the action could reschedule later.\n // For example:\n // ```\n // scheduler.schedule(function doWork(counter) {\n // /* ... I'm a busy worker bee ... */\n // var originalAction = this;\n // /* wait 100ms before rescheduling the action */\n // setTimeout(function () {\n // originalAction.schedule(counter + 1);\n // }, 100);\n // }, 1000);\n // ```\n this.id = this.recycleAsyncId(this.scheduler, this.id, null);\n }\n }\n\n protected _execute(state: T, _delay: number): any {\n let errored: boolean = false;\n let errorValue: any;\n try {\n this.work(state);\n } catch (e) {\n errored = true;\n // HACK: Since code elsewhere is relying on the \"truthiness\" of the\n // return here, we can't have it return \"\" or 0 or false.\n // TODO: Clean this up when we refactor schedulers mid-version-8 or so.\n errorValue = e ? e : new Error('Scheduled action threw falsy error');\n }\n if (errored) {\n this.unsubscribe();\n return errorValue;\n }\n }\n\n unsubscribe() {\n if (!this.closed) {\n const { id, scheduler } = this;\n const { actions } = scheduler;\n\n this.work = this.state = this.scheduler = null!;\n this.pending = false;\n\n arrRemove(actions, this);\n if (id != null) {\n this.id = this.recycleAsyncId(scheduler, id, null);\n }\n\n this.delay = null!;\n super.unsubscribe();\n }\n }\n}\n", "import { Action } from './scheduler/Action';\nimport { Subscription } from './Subscription';\nimport { SchedulerLike, SchedulerAction } from './types';\nimport { dateTimestampProvider } from './scheduler/dateTimestampProvider';\n\n/**\n * An execution context and a data structure to order tasks and schedule their\n * execution. Provides a notion of (potentially virtual) time, through the\n * `now()` getter method.\n *\n * Each unit of work in a Scheduler is called an `Action`.\n *\n * ```ts\n * class Scheduler {\n * now(): number;\n * schedule(work, delay?, state?): Subscription;\n * }\n * ```\n *\n * @deprecated Scheduler is an internal implementation detail of RxJS, and\n * should not be used directly. Rather, create your own class and implement\n * {@link SchedulerLike}. Will be made internal in v8.\n */\nexport class Scheduler implements SchedulerLike {\n public static now: () => number = dateTimestampProvider.now;\n\n constructor(private schedulerActionCtor: typeof Action, now: () => number = Scheduler.now) {\n this.now = now;\n }\n\n /**\n * A getter method that returns a number representing the current time\n * (at the time this function was called) according to the scheduler's own\n * internal clock.\n * @return A number that represents the current time. May or may not\n * have a relation to wall-clock time. May or may not refer to a time unit\n * (e.g. milliseconds).\n */\n public now: () => number;\n\n /**\n * Schedules a function, `work`, for execution. May happen at some point in\n * the future, according to the `delay` parameter, if specified. May be passed\n * some context object, `state`, which will be passed to the `work` function.\n *\n * The given arguments will be processed an stored as an Action object in a\n * queue of actions.\n *\n * @param work A function representing a task, or some unit of work to be\n * executed by the Scheduler.\n * @param delay Time to wait before executing the work, where the time unit is\n * implicit and defined by the Scheduler itself.\n * @param state Some contextual data that the `work` function uses when called\n * by the Scheduler.\n * @return A subscription in order to be able to unsubscribe the scheduled work.\n */\n public schedule(work: (this: SchedulerAction, state?: T) => void, delay: number = 0, state?: T): Subscription {\n return new this.schedulerActionCtor(this, work).schedule(state, delay);\n }\n}\n", "import { Scheduler } from '../Scheduler';\nimport { Action } from './Action';\nimport { AsyncAction } from './AsyncAction';\nimport { TimerHandle } from './timerHandle';\n\nexport class AsyncScheduler extends Scheduler {\n public actions: Array> = [];\n /**\n * A flag to indicate whether the Scheduler is currently executing a batch of\n * queued actions.\n * @internal\n */\n public _active: boolean = false;\n /**\n * An internal ID used to track the latest asynchronous task such as those\n * coming from `setTimeout`, `setInterval`, `requestAnimationFrame`, and\n * others.\n * @internal\n */\n public _scheduled: TimerHandle | undefined;\n\n constructor(SchedulerAction: typeof Action, now: () => number = Scheduler.now) {\n super(SchedulerAction, now);\n }\n\n public flush(action: AsyncAction): void {\n const { actions } = this;\n\n if (this._active) {\n actions.push(action);\n return;\n }\n\n let error: any;\n this._active = true;\n\n do {\n if ((error = action.execute(action.state, action.delay))) {\n break;\n }\n } while ((action = actions.shift()!)); // exhaust the scheduler queue\n\n this._active = false;\n\n if (error) {\n while ((action = actions.shift()!)) {\n action.unsubscribe();\n }\n throw error;\n }\n }\n}\n", "import { AsyncAction } from './AsyncAction';\nimport { AsyncScheduler } from './AsyncScheduler';\n\n/**\n *\n * Async Scheduler\n *\n * Schedule task as if you used setTimeout(task, duration)\n *\n * `async` scheduler schedules tasks asynchronously, by putting them on the JavaScript\n * event loop queue. It is best used to delay tasks in time or to schedule tasks repeating\n * in intervals.\n *\n * If you just want to \"defer\" task, that is to perform it right after currently\n * executing synchronous code ends (commonly achieved by `setTimeout(deferredTask, 0)`),\n * better choice will be the {@link asapScheduler} scheduler.\n *\n * ## Examples\n * Use async scheduler to delay task\n * ```ts\n * import { asyncScheduler } from 'rxjs';\n *\n * const task = () => console.log('it works!');\n *\n * asyncScheduler.schedule(task, 2000);\n *\n * // After 2 seconds logs:\n * // \"it works!\"\n * ```\n *\n * Use async scheduler to repeat task in intervals\n * ```ts\n * import { asyncScheduler } from 'rxjs';\n *\n * function task(state) {\n * console.log(state);\n * this.schedule(state + 1, 1000); // `this` references currently executing Action,\n * // which we reschedule with new state and delay\n * }\n *\n * asyncScheduler.schedule(task, 3000, 0);\n *\n * // Logs:\n * // 0 after 3s\n * // 1 after 4s\n * // 2 after 5s\n * // 3 after 6s\n * ```\n */\n\nexport const asyncScheduler = new AsyncScheduler(AsyncAction);\n\n/**\n * @deprecated Renamed to {@link asyncScheduler}. Will be removed in v8.\n */\nexport const async = asyncScheduler;\n", "import { AsyncAction } from './AsyncAction';\nimport { AnimationFrameScheduler } from './AnimationFrameScheduler';\nimport { SchedulerAction } from '../types';\nimport { animationFrameProvider } from './animationFrameProvider';\nimport { TimerHandle } from './timerHandle';\n\nexport class AnimationFrameAction extends AsyncAction {\n constructor(protected scheduler: AnimationFrameScheduler, protected work: (this: SchedulerAction, state?: T) => void) {\n super(scheduler, work);\n }\n\n protected requestAsyncId(scheduler: AnimationFrameScheduler, id?: TimerHandle, delay: number = 0): TimerHandle {\n // If delay is greater than 0, request as an async action.\n if (delay !== null && delay > 0) {\n return super.requestAsyncId(scheduler, id, delay);\n }\n // Push the action to the end of the scheduler queue.\n scheduler.actions.push(this);\n // If an animation frame has already been requested, don't request another\n // one. If an animation frame hasn't been requested yet, request one. Return\n // the current animation frame request id.\n return scheduler._scheduled || (scheduler._scheduled = animationFrameProvider.requestAnimationFrame(() => scheduler.flush(undefined)));\n }\n\n protected recycleAsyncId(scheduler: AnimationFrameScheduler, id?: TimerHandle, delay: number = 0): TimerHandle | undefined {\n // If delay exists and is greater than 0, or if the delay is null (the\n // action wasn't rescheduled) but was originally scheduled as an async\n // action, then recycle as an async action.\n if (delay != null ? delay > 0 : this.delay > 0) {\n return super.recycleAsyncId(scheduler, id, delay);\n }\n // If the scheduler queue has no remaining actions with the same async id,\n // cancel the requested animation frame and set the scheduled flag to\n // undefined so the next AnimationFrameAction will request its own.\n const { actions } = scheduler;\n if (id != null && id === scheduler._scheduled && actions[actions.length - 1]?.id !== id) {\n animationFrameProvider.cancelAnimationFrame(id as number);\n scheduler._scheduled = undefined;\n }\n // Return undefined so the action knows to request a new async id if it's rescheduled.\n return undefined;\n }\n}\n", "import { AsyncAction } from './AsyncAction';\nimport { AsyncScheduler } from './AsyncScheduler';\n\nexport class AnimationFrameScheduler extends AsyncScheduler {\n public flush(action?: AsyncAction): void {\n this._active = true;\n // The async id that effects a call to flush is stored in _scheduled.\n // Before executing an action, it's necessary to check the action's async\n // id to determine whether it's supposed to be executed in the current\n // flush.\n // Previous implementations of this method used a count to determine this,\n // but that was unsound, as actions that are unsubscribed - i.e. cancelled -\n // are removed from the actions array and that can shift actions that are\n // scheduled to be executed in a subsequent flush into positions at which\n // they are executed within the current flush.\n let flushId;\n if (action) {\n flushId = action.id;\n } else {\n flushId = this._scheduled;\n this._scheduled = undefined;\n }\n\n const { actions } = this;\n let error: any;\n action = action || actions.shift()!;\n\n do {\n if ((error = action.execute(action.state, action.delay))) {\n break;\n }\n } while ((action = actions[0]) && action.id === flushId && actions.shift());\n\n this._active = false;\n\n if (error) {\n while ((action = actions[0]) && action.id === flushId && actions.shift()) {\n action.unsubscribe();\n }\n throw error;\n }\n }\n}\n", "import { AnimationFrameAction } from './AnimationFrameAction';\nimport { AnimationFrameScheduler } from './AnimationFrameScheduler';\n\n/**\n *\n * Animation Frame Scheduler\n *\n * Perform task when `window.requestAnimationFrame` would fire\n *\n * When `animationFrame` scheduler is used with delay, it will fall back to {@link asyncScheduler} scheduler\n * behaviour.\n *\n * Without delay, `animationFrame` scheduler can be used to create smooth browser animations.\n * It makes sure scheduled task will happen just before next browser content repaint,\n * thus performing animations as efficiently as possible.\n *\n * ## Example\n * Schedule div height animation\n * ```ts\n * // html:
\n * import { animationFrameScheduler } from 'rxjs';\n *\n * const div = document.querySelector('div');\n *\n * animationFrameScheduler.schedule(function(height) {\n * div.style.height = height + \"px\";\n *\n * this.schedule(height + 1); // `this` references currently executing Action,\n * // which we reschedule with new state\n * }, 0, 0);\n *\n * // You will see a div element growing in height\n * ```\n */\n\nexport const animationFrameScheduler = new AnimationFrameScheduler(AnimationFrameAction);\n\n/**\n * @deprecated Renamed to {@link animationFrameScheduler}. Will be removed in v8.\n */\nexport const animationFrame = animationFrameScheduler;\n", "import { Observable } from '../Observable';\nimport { SchedulerLike } from '../types';\n\n/**\n * A simple Observable that emits no items to the Observer and immediately\n * emits a complete notification.\n *\n * Just emits 'complete', and nothing else.\n *\n * ![](empty.png)\n *\n * A simple Observable that only emits the complete notification. It can be used\n * for composing with other Observables, such as in a {@link mergeMap}.\n *\n * ## Examples\n *\n * Log complete notification\n *\n * ```ts\n * import { EMPTY } from 'rxjs';\n *\n * EMPTY.subscribe({\n * next: () => console.log('Next'),\n * complete: () => console.log('Complete!')\n * });\n *\n * // Outputs\n * // Complete!\n * ```\n *\n * Emit the number 7, then complete\n *\n * ```ts\n * import { EMPTY, startWith } from 'rxjs';\n *\n * const result = EMPTY.pipe(startWith(7));\n * result.subscribe(x => console.log(x));\n *\n * // Outputs\n * // 7\n * ```\n *\n * Map and flatten only odd numbers to the sequence `'a'`, `'b'`, `'c'`\n *\n * ```ts\n * import { interval, mergeMap, of, EMPTY } from 'rxjs';\n *\n * const interval$ = interval(1000);\n * const result = interval$.pipe(\n * mergeMap(x => x % 2 === 1 ? of('a', 'b', 'c') : EMPTY),\n * );\n * result.subscribe(x => console.log(x));\n *\n * // Results in the following to the console:\n * // x is equal to the count on the interval, e.g. (0, 1, 2, 3, ...)\n * // x will occur every 1000ms\n * // if x % 2 is equal to 1, print a, b, c (each on its own)\n * // if x % 2 is not equal to 1, nothing will be output\n * ```\n *\n * @see {@link Observable}\n * @see {@link NEVER}\n * @see {@link of}\n * @see {@link throwError}\n */\nexport const EMPTY = new Observable((subscriber) => subscriber.complete());\n\n/**\n * @param scheduler A {@link SchedulerLike} to use for scheduling\n * the emission of the complete notification.\n * @deprecated Replaced with the {@link EMPTY} constant or {@link scheduled} (e.g. `scheduled([], scheduler)`). Will be removed in v8.\n */\nexport function empty(scheduler?: SchedulerLike) {\n return scheduler ? emptyScheduled(scheduler) : EMPTY;\n}\n\nfunction emptyScheduled(scheduler: SchedulerLike) {\n return new Observable((subscriber) => scheduler.schedule(() => subscriber.complete()));\n}\n", "import { SchedulerLike } from '../types';\nimport { isFunction } from './isFunction';\n\nexport function isScheduler(value: any): value is SchedulerLike {\n return value && isFunction(value.schedule);\n}\n", "import { SchedulerLike } from '../types';\nimport { isFunction } from './isFunction';\nimport { isScheduler } from './isScheduler';\n\nfunction last(arr: T[]): T | undefined {\n return arr[arr.length - 1];\n}\n\nexport function popResultSelector(args: any[]): ((...args: unknown[]) => unknown) | undefined {\n return isFunction(last(args)) ? args.pop() : undefined;\n}\n\nexport function popScheduler(args: any[]): SchedulerLike | undefined {\n return isScheduler(last(args)) ? args.pop() : undefined;\n}\n\nexport function popNumber(args: any[], defaultValue: number): number {\n return typeof last(args) === 'number' ? args.pop()! : defaultValue;\n}\n", "export const isArrayLike = ((x: any): x is ArrayLike => x && typeof x.length === 'number' && typeof x !== 'function');", "import { isFunction } from \"./isFunction\";\n\n/**\n * Tests to see if the object is \"thennable\".\n * @param value the object to test\n */\nexport function isPromise(value: any): value is PromiseLike {\n return isFunction(value?.then);\n}\n", "import { InteropObservable } from '../types';\nimport { observable as Symbol_observable } from '../symbol/observable';\nimport { isFunction } from './isFunction';\n\n/** Identifies an input as being Observable (but not necessary an Rx Observable) */\nexport function isInteropObservable(input: any): input is InteropObservable {\n return isFunction(input[Symbol_observable]);\n}\n", "import { isFunction } from './isFunction';\n\nexport function isAsyncIterable(obj: any): obj is AsyncIterable {\n return Symbol.asyncIterator && isFunction(obj?.[Symbol.asyncIterator]);\n}\n", "/**\n * Creates the TypeError to throw if an invalid object is passed to `from` or `scheduled`.\n * @param input The object that was passed.\n */\nexport function createInvalidObservableTypeError(input: any) {\n // TODO: We should create error codes that can be looked up, so this can be less verbose.\n return new TypeError(\n `You provided ${\n input !== null && typeof input === 'object' ? 'an invalid object' : `'${input}'`\n } where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`\n );\n}\n", "export function getSymbolIterator(): symbol {\n if (typeof Symbol !== 'function' || !Symbol.iterator) {\n return '@@iterator' as any;\n }\n\n return Symbol.iterator;\n}\n\nexport const iterator = getSymbolIterator();\n", "import { iterator as Symbol_iterator } from '../symbol/iterator';\nimport { isFunction } from './isFunction';\n\n/** Identifies an input as being an Iterable */\nexport function isIterable(input: any): input is Iterable {\n return isFunction(input?.[Symbol_iterator]);\n}\n", "import { ReadableStreamLike } from '../types';\nimport { isFunction } from './isFunction';\n\nexport async function* readableStreamLikeToAsyncGenerator(readableStream: ReadableStreamLike): AsyncGenerator {\n const reader = readableStream.getReader();\n try {\n while (true) {\n const { value, done } = await reader.read();\n if (done) {\n return;\n }\n yield value!;\n }\n } finally {\n reader.releaseLock();\n }\n}\n\nexport function isReadableStreamLike(obj: any): obj is ReadableStreamLike {\n // We don't want to use instanceof checks because they would return\n // false for instances from another Realm, like an