diff --git a/.github/workflows/gh_pages.yml b/.github/workflows/gh_pages.yml index 36413e885..0dd84167f 100644 --- a/.github/workflows/gh_pages.yml +++ b/.github/workflows/gh_pages.yml @@ -6,24 +6,23 @@ on: branches: [main] jobs: - build-documentation: + # Build job + build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - name: Build docs - run: nix build .#hax.docs --out-link ./_site - - name: Upload Pages artifact - uses: actions/upload-pages-artifact@v2 - - # deploys the result of `build` - # this job is a copy paste from - deploy-documentation: - # Add a dependency to the build job - needs: build-documentation - - # Grant GITHUB_TOKEN the permissions required to make a Pages deployment + - uses: actions/checkout@v4 + - uses: DeterminateSystems/nix-installer-action@main + - uses: DeterminateSystems/magic-nix-cache-action@main + - name: Build documentation + run: nix build .#docs + - name: Upload static files as artifact + id: deployment + uses: actions/upload-pages-artifact@v3 + with: + path: result/ + # Deploy job + deploy: + needs: build permissions: pages: write # to deploy to Pages id-token: write # to verify the deployment originates from an appropriate source @@ -38,75 +37,4 @@ jobs: steps: - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v2 # or the latest "vX.X.X" version tag for this action - - # Builds and deploy "external" GH pages: pushes to the repos - # `hacspec/hacspec.github.io` and `hacspec/book` - build-and-deploy-external-gh-pages: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - path: hax - - uses: actions/checkout@v4 - with: - repository: "hacspec/hacspec.github.io" - path: hacspec.github.io - token: ${{secrets.PUSH_HACSPEC_GITHUB_TOKEN}} - - uses: actions/checkout@v4 - with: - repository: "hacspec/book" - path: book - token: ${{secrets.PUSH_HACSPEC_GITHUB_TOKEN}} - - - uses: DeterminateSystems/nix-installer-action@main - - - name: Configure git - run: | - git config --global user.name "github-actions[bot]" - git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" - - - name: Patch and push `README.md` in `hacspec.github.io` - run: | - ( - README_ORIGINAL="https://github.com/hacspec/hax/blob/main/README.md" - echo "" - echo "" - cat hax/README.md - ) > hacspec.github.io/README.md - cd hacspec.github.io - - # Replace the `🌐 Website` link to a GitHub link - sed -i 's#.*🌐 Website.*# 🔗 GitHub |#' README.md - - # Replace relative links to absolute links - sed -i 's|(\./|(https://github.com/hacspec/hax/tree/main/|g' README.md - - git add -A - if git commit -m "Readme update"; then - git push https://$USERNAME:$PUSH_HACSPEC_GITHUB_TOKEN@github.com/hacspec/hacspec.github.io - fi - - - name: Regenerate and push the book - run: | - nix build ./hax#hax-book -o result-hax-book - HAX_COMMIT=$(git -C ./hax rev-parse --short HEAD) - - mkdir hax-book - rsync -rq --no-perms --chown=$(id -un):$(id -gn) "$(realpath result-hax-book)/" hax-book - mv book/.git hax-book/.git - cd hax-book - - { - echo "# Warning: this repository only contains generated files" - echo "The sources of the book are in https://github.com/hacspec/hax/tree/main/book" - echo "Please file issues, and push PRs to https://github.com/hacspec/hax." - } > README.md - - git add -A - if git commit -m "Book update (generated from hacspec/hax@$HAX_COMMIT)"; then - git push https://$USERNAME:$PUSH_HACSPEC_GITHUB_TOKEN@github.com/hacspec/book - fi - env: - PUSH_HACSPEC_GITHUB_TOKEN: ${{secrets.PUSH_HACSPEC_GITHUB_TOKEN}} - USERNAME: github-actions[bot] + uses: actions/deploy-pages@v4 # or specific "vX.X.X" version tag for this action diff --git a/.github/workflows/mlkem.yml b/.github/workflows/mlkem.yml index 0d59ce119..00c8b1d23 100644 --- a/.github/workflows/mlkem.yml +++ b/.github/workflows/mlkem.yml @@ -33,7 +33,7 @@ jobs: nix profile install ./hax - name: ⤵ Install FStar - run: nix profile install github:FStarLang/FStar/v2024.01.13 + run: nix profile install github:FStarLang/FStar/v2024.12.03 - name: ⤵ Clone HACL-star repository uses: actions/checkout@v4 diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index c7347c48f..d41802014 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -1,7 +1,7 @@ name: 'Triage stale issues and PRs' on: schedule: - - cron: '00 1 * * *' + - cron: '00 00 * * 4' workflow_dispatch: jobs: diff --git a/.github/workflows/test_installs.yml b/.github/workflows/test_installs.yml index f7dc327e9..9f5bc725f 100644 --- a/.github/workflows/test_installs.yml +++ b/.github/workflows/test_installs.yml @@ -22,7 +22,7 @@ jobs: - ubuntu-latest - ubuntu-20.04 - macos-latest - - macos-12 + - macos-13 runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 000000000..415c47fdc --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,11 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +## 0.4.0 (2024-01-20) + - Initial release diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 76fab47c5..9acdb1126 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -50,6 +50,12 @@ window of 2 days, otherwise the PR will be reverted. - Try to avoid exceptions, if possible. - Never use `==`, which is the physical equality, and almost never what you want. +### Changelog +Our changelog format is based on https://keepachangelog.com/. +Please add an entry in a subsection (`Added`, `Changed`, `Deprecated`, `Removed`, `Fixed` -- see https://keepachangelog.com/en/1.0.0/#how) for each notable change. + +Please prefix with `engine:`, `frontend:` or similar. + ## Styleguides ### Git Commit Messages diff --git a/Cargo.lock b/Cargo.lock index 265b869ac..648df4d84 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -144,7 +144,7 @@ dependencies = [ [[package]] name = "cargo-hax" -version = "0.1.0-rc.1" +version = "0.1.0" dependencies = [ "annotate-snippets", "cargo_metadata", @@ -439,13 +439,13 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.15.0" +version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" +checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" [[package]] name = "hax-adt-into" -version = "0.1.0-rc.1" +version = "0.1.0" dependencies = [ "itertools", "proc-macro2", @@ -456,7 +456,7 @@ dependencies = [ [[package]] name = "hax-bounded-integers" -version = "0.1.0-rc.1" +version = "0.1.0" dependencies = [ "duplicate", "hax-lib", @@ -465,7 +465,7 @@ dependencies = [ [[package]] name = "hax-driver" -version = "0.1.0-rc.1" +version = "0.1.0" dependencies = [ "clap", "colored", @@ -483,7 +483,7 @@ dependencies = [ [[package]] name = "hax-engine-names" -version = "0.1.0-rc.1" +version = "0.1.0" dependencies = [ "hax-lib", "hax-lib-protocol", @@ -491,7 +491,7 @@ dependencies = [ [[package]] name = "hax-engine-names-extract" -version = "0.1.0-rc.1" +version = "0.1.0" dependencies = [ "hax-adt-into", "hax-engine-names", @@ -502,7 +502,7 @@ dependencies = [ [[package]] name = "hax-frontend-exporter" -version = "0.1.0-rc.1" +version = "0.1.0" dependencies = [ "extension-traits", "hax-adt-into", @@ -518,7 +518,7 @@ dependencies = [ [[package]] name = "hax-frontend-exporter-options" -version = "0.1.0-rc.1" +version = "0.1.0" dependencies = [ "hax-adt-into", "schemars", @@ -528,7 +528,7 @@ dependencies = [ [[package]] name = "hax-lib" -version = "0.1.0-rc.1" +version = "0.1.0" dependencies = [ "hax-lib-macros", "num-bigint", @@ -537,7 +537,7 @@ dependencies = [ [[package]] name = "hax-lib-macros" -version = "0.1.0-rc.1" +version = "0.1.0" dependencies = [ "hax-lib", "hax-lib-macros-types", @@ -550,7 +550,7 @@ dependencies = [ [[package]] name = "hax-lib-macros-types" -version = "0.1.0-rc.1" +version = "0.1.0" dependencies = [ "proc-macro2", "quote", @@ -562,14 +562,14 @@ dependencies = [ [[package]] name = "hax-lib-protocol" -version = "0.1.0-rc.1" +version = "0.1.0" dependencies = [ "libcrux", ] [[package]] name = "hax-lib-protocol-macros" -version = "0.1.0-rc.1" +version = "0.1.0" dependencies = [ "proc-macro-error", "proc-macro2", @@ -579,7 +579,7 @@ dependencies = [ [[package]] name = "hax-test-harness" -version = "0.1.0-rc.1" +version = "0.1.0" dependencies = [ "assert_cmd", "cargo_metadata", @@ -595,7 +595,7 @@ dependencies = [ [[package]] name = "hax-types" -version = "0.1.0-rc.1" +version = "0.1.0" dependencies = [ "annotate-snippets", "clap", diff --git a/Cargo.toml b/Cargo.toml index ea7eb8493..787666de0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,7 +32,7 @@ default-members = [ resolver = "2" [workspace.package] -version = "0.1.0-rc.1" +version = "0.1.0" authors = ["hax Authors"] license = "Apache-2.0" homepage = "https://github.com/hacspec/hax" @@ -71,14 +71,14 @@ colored = "2" annotate-snippets = "0.11" # Crates in this repository -hax-frontend-exporter = { path = "frontend/exporter", version = "=0.1.0-rc.1", default-features = false } -hax-adt-into = { path = "frontend/exporter/adt-into", version = "=0.1.0-rc.1" } -hax-frontend-exporter-options = { path = "frontend/exporter/options", version = "=0.1.0-rc.1" } -hax-lib-macros = { path = "hax-lib/macros", version = "=0.1.0-rc.1" } -hax-lib-macros-types = { path = "hax-lib/macros/types", version = "=0.1.0-rc.1" } -hax-lib = { path = "hax-lib", version = "=0.1.0-rc.1" } -hax-engine-names = { path = "engine/names", version = "=0.1.0-rc.1" } -hax-types = { path = "hax-types", version = "=0.1.0-rc.1" } +hax-frontend-exporter = { path = "frontend/exporter", version = "=0.1.0", default-features = false } +hax-adt-into = { path = "frontend/exporter/adt-into", version = "=0.1.0" } +hax-frontend-exporter-options = { path = "frontend/exporter/options", version = "=0.1.0" } +hax-lib-macros = { path = "hax-lib/macros", version = "=0.1.0" } +hax-lib-macros-types = { path = "hax-lib/macros/types", version = "=0.1.0" } +hax-lib = { path = "hax-lib", version = "=0.1.0" } +hax-engine-names = { path = "engine/names", version = "=0.1.0" } +hax-types = { path = "hax-types", version = "=0.1.0" } [workspace.metadata.release] -owners = ["github:hacspec:crates"] \ No newline at end of file +owners = ["github:hacspec:crates"] diff --git a/PUBLISHING.md b/PUBLISHING.md index 8929b334e..48934dc31 100644 --- a/PUBLISHING.md +++ b/PUBLISHING.md @@ -49,12 +49,19 @@ engine. Those should not be published on `crate.io`. 2. `cargo-hax-engine-names-extract` ## Procedure - 1. Bump the version number with `cargo release LEVEL --no-publish --no-tag --execute` (`cargo release --help` for more details on `LEVEL`). This will bump the version of every Rust crate, but also the version in `engine/dune-project`. This will also regenerate `engine/hax-engine.opam`. Note this will *not* publish the crate. - 2. PR the change - 3. when the PR is merged in main, checkout `main` and run `cargo release --execute` + 1. Move the contents of `CHANGELOG.md` under the `[Unreleased]` section to a new section named following the target version + 2. Bump the version number with `cargo release LEVEL --no-publish --no-tag --execute` (`cargo release --help` for more details on `LEVEL`). This will bump the version of every Rust crate, but also the version in `engine/dune-project`. This will also regenerate `engine/hax-engine.opam`. Note this will *not* publish the crate. + 3. PR the change + 4. when the PR is merged in main, checkout `main` and run `cargo release --execute` Note: for now, we are not publishing to Opam. Instead, let's just advertise the following for installation: ```bash opam pin hax-engine https://github.com/hacspec/hax.git#the-release-tag opam install hax-engine ``` + +## Notes +`cargo release` reads the `Cargo.toml` of each crates of the workspace. +Some creates are excluded from releasing: in their `Cargo.toml` manifest, they have `package.metadata.release.release` set to `false`. + +Also, `cli/subcommands/Cargo.toml` specifies pre-release replacements for the engine: the version of the engine is bumped automatically by `cargo release`. diff --git a/README.md b/README.md index aaaa38a6e..56fdeb0a1 100644 --- a/README.md +++ b/README.md @@ -3,27 +3,25 @@

- 🌐 Website | - 📖 Book | - 📝 Blog | + 🌐 Website | + 📝 Blog | 💬 Zulip | - 🛠️ Internal docs | 🛝 Playground

# Hax -hax is a tool for high assurance translations that translates a large subset of -Rust into formal languages such as [F\*](https://www.fstar-lang.org/) or [Coq](https://coq.inria.fr/). -This extends the scope of the hacspec project, which was previously a DSL embedded in Rust, -to a usable tool for verifying Rust programs. +hax is a tool for high assurance translations of a large subset of +Rust into formal languages such as [F\*](https://www.fstar-lang.org/) or [Rocq](https://rocq-prover.org/). -> So what is hacspec now? +
+ So what is hacspec now? hacspec is the functional subset of Rust that can be used, together with a hacspec standard library, to write succinct, executable, and verifiable specifications in Rust. These specifications can be translated into formal languages with hax. +

@@ -34,9 +32,9 @@ These specifications can be translated into formal languages with hax. ## Learn more Here are some resources for learning more about hax: - - [Book](https://hacspec.org/book) (work in progress) - + [Quick start](https://hacspec.org/book/quick_start/intro.html) - + [Tutorial](https://hacspec.org/book/tutorial/index.html) + - [Manual](https://hax.cryspen.com/manual/index.html) (work in progress) + + [Quick start](https://hax.cryspen.com/manual/quick_start/index.html) + + [Tutorial](https://hax.cryspen.com/manual/tutorial/index.html) - [Examples](./examples/): the [examples directory](./examples/) contains a set of examples that show what hax can do for you. - Other [specifications](https://github.com/hacspec/specs) of cryptographic protocols. @@ -113,9 +111,7 @@ that is where `setup.sh` will install hax. ## Supported Subset of the Rust Language -Hax intends to support full Rust, with the two following exceptions, promoting a functional style: - 1. no `unsafe` code (see https://github.com/hacspec/hax/issues/417); - 2. mutable references (aka `&mut T`) on return types or when aliasing (see https://github.com/hacspec/hax/issues/420). +Hax intends to support full Rust, with the one exception, promoting a functional style: mutable references (aka `&mut T`) on return types or when aliasing (see https://github.com/hacspec/hax/issues/420) are forbidden. Each unsupported Rust feature is documented as an issue labeled [`unsupported-rust`](https://github.com/hacspec/hax/issues?q=is%3Aissue+is%3Aopen+label%3Aunsupported-rust). When the issue is labeled [`wontfix-v1`](https://github.com/hacspec/hax/issues?q=is%3Aissue+is%3Aopen+label%3Aunsupported-rust+label%3Awontfix%2Cwontfix-v1), that means we don't plan on supporting that feature soon. @@ -125,7 +121,8 @@ Quicklinks: ## Hacking on Hax The documentation of the internal crate of hax and its engine can be -found [here](https://hacspec.org/hax/). +found [here for the engine](https://hax.cryspen.com/engine/index.html) +and [here for the frontent](https://hax.cryspen.com/frontend/index.html). ### Edit the sources (Nix) diff --git a/book/.gitignore b/book/.gitignore deleted file mode 100644 index 05ff2e452..000000000 --- a/book/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -book -target diff --git a/book/archive/book.toml b/book/archive/book.toml deleted file mode 100644 index 530d58507..000000000 --- a/book/archive/book.toml +++ /dev/null @@ -1,9 +0,0 @@ -[book] -authors = ["Franziskus Kiefer"] -language = "en" -multilingual = false -src = "src" -title = "hacspec" - -[output.html] -mathjax-support = true diff --git a/book/archive/src/SUMMARY.md b/book/archive/src/SUMMARY.md deleted file mode 100644 index 6ff0d4f43..000000000 --- a/book/archive/src/SUMMARY.md +++ /dev/null @@ -1,22 +0,0 @@ -# Summary - -- [Introduction](./readme.md) -- [The hacspec language](./language/readme.md) - - [Syntax](./language/syntax.md) - - [Core](./language/core.md) - - [Sequences and arrays](./language/seq.md) - - [Structs and enums](./language/enums.md) - - [Error handling](./language/errors.md) -- [The hacspec std library](./std/readme.md) - - [Arithmetic](./std/arithmetic.md) - - [Sequence and array operations](./std/seq.md) -- [Examples](./examples/readme.md) -- [Usage](./usage/readme.md) - - [Specifications](./usage/specifications.md) - - [Verification](./usage/verification.md) - - [Test Vectors](./usage/test_vectors.md) -- [For Developers](./developers/readme.md) - - [Working on the compiler](./developers/compiler.md) - ---- -[Contributors](misc/contributors.md) diff --git a/book/archive/src/developers/compiler.md b/book/archive/src/developers/compiler.md deleted file mode 100644 index 48a8dde17..000000000 --- a/book/archive/src/developers/compiler.md +++ /dev/null @@ -1,152 +0,0 @@ -# Working on the compiler - -## High-level architecture - -![Hacspec compiler architecture](hacspec_architecture.png) - -The Rustspec compiler intervenes after the regular Rust typechecking, -by translating the Rust AST into a stricter hacspec AST, -yielding error messages if you're not in the subset. - -The hacspec AST then undergoes a typechecking phase that replicates the -formal typechecking judgment of hacspec, before being compiled -to the proof backends like F* or Coq. - -## Code organization - -The source code for the compiler is located in the `language/` folder. -`main.rs` is the file containing the driver for the different compiler -passes. - -### Hacspec AST - -The main file of the compiler is `rustspec.rs` and it contains the AST -structure. - -Types are usually enclosed into `Spanned<...>` blocks that attach a location -information to an AST node, thereby providing a way to display beautiful error -message. - -Several nodes also contain a `Fillable<...>` node standing for information -that is filled by the typechecking phase but that can be left to `None` when -building the AST. - -### Translation from Rust AST - -This phase is contained in `ast_to_rustspec.rs`. The trickyness of this -translation is that it needs to be aware of certain special names contained -in the structure `SpecialNames`. Indeed, while the Rust AST treats the application -enum constructors like function applications, the hacspec AST considers them as -proper injection so we need to distinguish them in the Rust AST. For that, we -need to know all declared enums at this point of the program. - -Enums and other `SpecialNames` are also defined in the `ExternalData` that -contains the signatures and types imported in crates used by the hacspec -program being compiled. - -### Name resolution - -When the translation from Rust AST is finished, the identifiers for all -variables inside function bodies are of the following type: - -```rust, noplaypen -pub enum Ident { - Unresolved(String), - Local(LocalIdent), - TopLevel(TopLevelIdent), -} -``` - -More precisely, they are still in the `Ident::Unresolved` case. The compiler -pass in `name_resolution.rs` resolves the identifiers by linking them to local or global identifiers, -each one having a unique ID. hacspec does not feature De Bruijn variable -handling, instead relying on unique fresh IDs for differentiating local -and global variables from each other. - -### External data - -A hacspec file can never (in principal) be considered alone, as it usually imports -at least several other crates like the hacspec standard library. These external -crates must pre-populate the typechecking context with the types and function -signatures that they define. - -It's the job of `hir_to_rustspec.rs` to retrieve this data. The critical -piece of code in this file is [the following](https://github.com/hacspec/hacspec/blob/cc609254b0aa978646f494291b9c91a92fe107ee/language/src/hir_to_rustspec.rs#L733-L737): - -```rust, noplaypen -let num_def_ids = crate_store.num_def_ids_untracked(*krate_num); -let def_ids = (0..num_def_ids).into_iter().map(|id| DefId { - krate: *krate_num, - index: DefIndex::from_usize(id), -}); -``` - -First, we retrieve the number of exported symbols by an external crate using -`num_def_ids_untracked`, a function that is [specifically labeled](https://github.com/rust-lang/rust/pull/85889) -as critical to the hacspec compiler in the Rust compiler codebase. Then, -we manufacture definition IDs for all these exported symbols, relying on the -invariant that they are numbered from 0 to the number of exported symbols -in Rust's compiled crate metadata format. - -Then, we use those definition IDs (`DefId`) to query the Rust compiler -via the central [`TyCtxt`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/struct.TyCtxt.html) -data structure. If the `DefId` corresponds to a type definition, we examine the -type definition structurally and check whether it corresponds to a hacspec-compatible -type definition. Notably, the type definitions generated by macros like `array!` -or `nat_mod!` are only seen here in their expanded version, so we have to retro-engineer -which expanded version corresponds to which macro expansion. This is a vulnerability -of the compiler since it's possible to break the abstraction of the language -by smuggling in a type not defined via a hacspec macro this way. That's why hacspec -developers should be very careful about which dependencies they import in order -to have a 100% safety guarantee. - -For `DefId`s corresponding to functions, the signature of the function is analysed -and if it fits the subset of types expected by hacspec, the function is imported -along with its type in a pre-populated typechecking context. - -Note that it is not possible any more at this point to retrieve the `#[in_hacspec]`, -`#[unsafe_hacspec]`, etc. attributes that would tag the external definitions, -since these attributes get erased by the Rust compiler before reaching the -compiled crates metadata. - - -### Typechecking - -The typechecking is done in `typechecker.rs` and follows a very regular structure, -making heavy use of immutable data structures to not mess up the various -context manipulations. - -Note that we need to perform a full typechecking complete with method resolution -because the proof backends need very fine-grained typechecking information -to generate correct code. - -Be careful: types often need to be de-aliased with `dealias_type` before -being matched on structurally. Forgetting to dealias will lead to bugs with -type aliases. - -### Proof backends - -The different proof backends (`rustspec_to_fstar.rs`, etc) all enjoy a similar -structure that ought to be refactored to showcase their commonality. The backends -don't use an intermediate AST to generate the code in the proof assistant but -rather directly print code as string using the [`pretty`](https://crates.io/crates/pretty) -pretty-printing library. If you want to start a new proof backend, the easiest -solution is probably to copy an existing proof backend and tweak it until -you get the right result. - -The code generation has to be fine-tuned to interface with a replica of the -hacspec standard library in the host proof assistant, whose correspondence with -the original hacspec library in Rust is part of the trusted code base. More specially, -clever solutions to encode sequences and array, as well as all the different types -of public and secret machine integers, and the interaction between the two -(seeing a double as a string of bytes) have to be implemented through proof -assistant libraries. - -## Unit tests - -The compiler has various unit tests that are controlled trough the `language/tests` -files. Please enrich the unit tests bases in `language-tests`, -`negative-language-tests` and `test-crate` as you implement new features for -the compiler. The compiler can also be tested against all the hacspec cryptographic -specifications by running `examples/typecheck_examples.sh` from the root of -the repository. diff --git a/book/archive/src/developers/hacspec_architecture.png b/book/archive/src/developers/hacspec_architecture.png deleted file mode 100644 index 009b7cd5a..000000000 Binary files a/book/archive/src/developers/hacspec_architecture.png and /dev/null differ diff --git a/book/archive/src/developers/readme.md b/book/archive/src/developers/readme.md deleted file mode 100644 index 23e631007..000000000 --- a/book/archive/src/developers/readme.md +++ /dev/null @@ -1,4 +0,0 @@ -# For Developers - -This section contains a handy guide for hacspec developers working on the -standard library or the compiler. diff --git a/book/archive/src/examples/readme.md b/book/archive/src/examples/readme.md deleted file mode 100644 index 46897eadd..000000000 --- a/book/archive/src/examples/readme.md +++ /dev/null @@ -1,13 +0,0 @@ -# Examples - -The main [hacspec repository] contains a set of [example specifications]. -In this section we pull out some interesting bits to demonstrate the hacspec -language. - -There's also a provider that bundles the different cryptographic primitives -into a single library. -The provider implements the [RustCrypto traits] in order to facilitate interoperability. - -[RustCrypto traits]: https://github.com/RustCrypto/traits -[hacspec repository]: https://github.com/hacspec/hacspec/ -[example specifications]: https://github.com/hacspec/hacspec/tree/master/examples diff --git a/book/archive/src/language/core.md b/book/archive/src/language/core.md deleted file mode 100644 index 79ec4b596..000000000 --- a/book/archive/src/language/core.md +++ /dev/null @@ -1,157 +0,0 @@ -# The core of hacspec - -## Crates and modules - -hacspec only supports single-module crates, due to a technical limitation -of the Rust compiler. Inside this single file, a hacspec program shall always -start with: - -```rust, noplaypen -use hacspec_lib::*; - -// Optional: dependencies on other crates containing hacspec programs -use other_hacpsec_crate::*; -``` - -No other form of `use` is allowed in hacspec, because allowing Rust's -complex import patterns would increase the complexity of the hacspec compiler -and conflict with the module systems of most proof assistants. - -## Functions - -hacspec is a functional language, and only supports the declaration of -top-level functions: - -```rust, noplaypen -fn hacspec_function(x: bool) -> () { - ... -} -``` - -The functions can take any number of arguments, and may return a value (or not). -Note that recursive functions are forbidden in hacspec. - -The control flow inside hacspec functions is limited, as `return` statements -are forbidden. - -## Basic Types - -hacspec supports all the Rust primitive types: integers (signed and unsigned), -booleans, unit, tuples. hacspec possesses some support for generic -types, but only for primitive types defined by the language creators, and -not for user-defined types. - -Type aliases are allowed in hacspec: - -```rust, noplaypen -type OneTypeAlias = u32; -``` - -## Borrows - -hacspec forbids mutable borrows in all places. Immutable borrows are allowed -in hacspec, but only for function arguments. Indeed, you can declare a function -argument as immutably borrowed: - -```rust, noplaypen -fn hacspec_function(arg: &Seq) { - ... -} -``` - -You can also immutably borrow a value at the call site of a function: - -```rust, noplaypen -hacspec_function(&Seq::::new(64)) -``` - -In particular, return types cannot contain references, and the same is true -for types inside tuples or any data structure. - -## Constants - -hacspec allows the declaration of constants: - -```rust, noplaypen -const ONE_CONST : bool = false; -``` - -## Assignments - -Inside a function body, hacspec allows regular Rust let-bindings: - -```rust, noplaypen -let x = ...; -``` - -hacspec also allows mutable let bindings, and subsequent reassignments: - -```rust, noplaypen -let mut x = ...; -... -x = ...; -``` - -This allowing of mutable variable might come as a contradiction to hacspec's -philosophy of forbidding mutable state. But in fact, mutable local variables in -hacspec can be translated to a completely side-effect free form with a state-passing -like monadic structure. - -Left-hand sides of assignments support destructuring, which is currently the -only way to access the members of a tuple: - -```rust, noplaypen -let (x, y) = z; -``` - -## Loops - -Looping is severely restricted in hacspec compared to Rust, as the only accepted form is -`for` looping with a counter over an integer range: - -```rust, noplaypen -for i in low..hi { - ... // The block can use i and reassign mutable variables -} -``` - -The motivation for this restriction is to ease the proof of termination of -loops. `break` or `continue` statements are forbidden. - -## Conditionals - -hacspec allows statement-like conditionals as well as expression-like -conditionals: - -```rust, noplaypen -if cond1 { - ... // the block can modify mutable variables -} else { // else block is optional here - ... -} -let x = if cond2 { ... } else { ... }; -``` - -## Statements and expressions - -In regular Rust, statements and expressions can be mixed together freely. -This not the case in hacspec that imposes a strict precedence of statements -over expressions. For instance, the following code is not allowed in -hacspec: - -```rust, noplaypen -let x = if cond { - y = true; // ERROR: the reassignment is a statement, which cannot - // be contained in the expression to which x is assigned. - 3 -} else { - 4 -}; -``` - -## Visibility - -hacspec allows for both `pub` and non-`pub` versions of item declarations -(pub, non-pub, etc). You simply have to respect the Rust visibility rules. Note -that these visibility distinctions might not be translated in the proof -backends. diff --git a/book/archive/src/language/enums.md b/book/archive/src/language/enums.md deleted file mode 100644 index 7fc0975c8..000000000 --- a/book/archive/src/language/enums.md +++ /dev/null @@ -1,71 +0,0 @@ -# Structs and enums - -hacspec also supports user-defined structs and enums with some restrictions. - -## Structs - -The only form of struct declaration currently allowed in hacspec is: - -```rust, noplaypen -struct Foo(u32, Seq); -``` - -The struct thus declared can have one or more components. This form of struct -declaration effectively corresponds to a single-case enum, and is implemented -as such. Struct components can be accessed through let-binding destructuring: - -```rust, noplaypen -let Foo(x, y) = z; -``` - -Note that you can't store borrowed types inside hacspec structs, hence there is no -need for lifetime variables. - -## Enums - -hacspec supports very restricted `enum` declarations: - -```rust, noplaypen -enum Foo { - CaseA, - CaseB(u16), - CaseC(Seq, u64) -} -``` - -These declaration don't support the basic Rust features such as C-style -union declarations with assignments for each case. - -Enumeration values can be pattern-matched in an expression: - -```rust, noplaypen -match x { - Foo::CaseA => ..., - Foo::CaseB(y) => ..., - Foo::CaseC(y,z) => ... -} -``` - -Note that you can't store borrowed types inside hacspec enums, hence there is no -need for lifetime variables. - -## Option and Result - -User-defined structs and enums presented above don't support generic type -parameters yet. However, the built-in enums `Option` and `Result` -support type parameters. Those type parameters have to be explicitly declared -each time, as hacspec does not currently support type inference: - -```rust, noplaypen -match x { - Result::, bool>::Ok(y) => ..., - Result::, bool>::Err(err) => ... -} -``` - -Such type parameter declaration is cumbersome; as a workaround we advise -to declare a type alias as such: - -```rust, noplaypen -type MyResult = Result::, bool>; -``` diff --git a/book/archive/src/language/errors.md b/book/archive/src/language/errors.md deleted file mode 100644 index 30c3e6b0b..000000000 --- a/book/archive/src/language/errors.md +++ /dev/null @@ -1,16 +0,0 @@ -# Error handling - -Error handling in Rust is done via the `Result` type (see the structs and -enums section). But on top of explicit pattern-matching, hacspec also -supports the popular `?` operator to quickly perform an early return and -propagate the error case upwards. - -`?` is only allowed at the very end of an expression in a let-binding or -reassignment statement: - -```rust, noplaypen -let x = foo(true)?; // GOOD -let y = foo(bar(0)?); // ERROR: the ? is not at the end of the statement -``` - -Currently, `?` is the only way to return early in a hacspec function. diff --git a/book/archive/src/language/readme.md b/book/archive/src/language/readme.md deleted file mode 100644 index 7d8d768c6..000000000 --- a/book/archive/src/language/readme.md +++ /dev/null @@ -1,18 +0,0 @@ -# The hacspec language - -This section gives an informal description of the hacspec language, whose -goal is to provide hands-on documentation for users of the language. For -a formal specification of the semantics of the language, please refer -to the [technical report][1]. - -hacspec is a domain-specific language embedded inside Rust. This means that -all correct hacspec programs are correct Rust programs: you can use -the usual Rust tooling for working on your hacspec developments. However, -hacspec is a strict subset of Rust: this means that some features of Rust -are forbidden inside hacspec. The goal of restricting the expressiveness of -the language is twofold: first, help domain experts such as cryptographers -convey their specifications in a fashion that should help them avoid -mistakes; second, provide a way for Rust programmers to interact with theorem -provers such as F\* or Coq. - -[1]: https://hal.inria.fr/hal-03176482 diff --git a/book/archive/src/language/seq.md b/book/archive/src/language/seq.md deleted file mode 100644 index 1f32d5d79..000000000 --- a/book/archive/src/language/seq.md +++ /dev/null @@ -1,32 +0,0 @@ -# Sequences and arrays - -## Sequences - -The staple `Vec` type is forbidden in hacspec. Instead, you have to use the -type `Seq`, which is implemented as a wrapper around `Vec`. - -The most notable differences between `Seq` and `Vec` is that `Seq` is not -resizable, and does not support `push` and `pop` operations. Instead, the -final length of the seq has to be provided at creation time. See the -hacspec standard library documentation for more details. - -`Seq` is a built-in generic type that always has to be indexed by the content of the -cells: `Seq`, etc. - -## Arrays - -The native Rust array types `[, ]` is forbidden in -hacspec. Instead, you have to declare nominally at the top-level new array types -for a specific cell content and size with: - -```rust, noplaypen -array!(FooArray, u8, 64); -// This declares type FooArray as an array of u8 of size 64 -bytes!(BarArray, 64); -// bytes! is a specialized version of array! with secret bytes -array!(BazArray, u8, 64, type_for_indexes:BazIndex); -// The additional argument type_for_indexes defines an alias of usize -// intended to spot which usizes are used to index BazArray (useful for -// verification) -``` - diff --git a/book/archive/src/language/syntax.md b/book/archive/src/language/syntax.md deleted file mode 100644 index 317173b0f..000000000 --- a/book/archive/src/language/syntax.md +++ /dev/null @@ -1,58 +0,0 @@ -# Syntax - -``` -P ::= [i]\* Program items -i ::= array!(t, μ, n) Array type declaration where n is a natural number - | nat_mod!(t, n) Modular integer - | fn f([d]+) -> μ b Function declaration - | type t = enum { [c(μ)]+ } Enum declaration (with constructors) - | type t = struct([μ]+) Struct declaration (without named fields) - | const x: μ = e Constant declaration - | use crate::* External crate import - | use mod::* Internal module import -d ::= x: τ Function argument - | mut x: τ Mutable function argument -μ ::= unit|bool|u8|U8|i8|I8... Base types - | Seq<μ> Sequence - | String Strings - | ([μ]+) Tuple - | unit Unit type - | t Named type -τ ::= μ Plain type - | &μ Immutable reference -b ::= {[s;]+} Block -p ::= x Variable pattern - | ([p]+) Tuple pattern - | t (p) Struct constructor pattern - | _ Wildcard pattern -s ::= let p: τ = e Let binding - | let mut p: τ = e Mutable let binding - | x = e Variable reassignment - | x = e? Variable reassignment with result/option catching - | let p: τ = e? Let binding with result/option catching - | if e then b (else b) Conditional statements - | c(e) Enum injection - | match e { [c(p) => e]+ } Pattern matching - | for x in e..e b For loop (integers only) - | e Return expression - | b Statement block -e ::= ()|true|false Unit and boolean literals - | n Integer literal - | U8(e)|I8(e)|... Secret integer classification - | "..." String literal - | t([e]+) Array literal - | e as μ Integer casting - | x Variable - | () Unit - | f([a]+) Function call - | if e then e else e Conditional expression - | e ⊙ e Binary operations - | ⊘ e Unary operations - | ([e]+) Tuple constructor - | x[e] Array or sequence index -a ::= e Linear argument - | &e Call-site borrowing -⊙ ::= + | - | * | / | && - | || | == | != | > | < -⊘ ::= - | ~ -``` diff --git a/book/archive/src/misc/contributors.md b/book/archive/src/misc/contributors.md deleted file mode 100644 index adc2dc245..000000000 --- a/book/archive/src/misc/contributors.md +++ /dev/null @@ -1,15 +0,0 @@ -# Contributors - -A list of contributors to the hacspec project. - -- Franziskus Kiefer ([franziskuskiefer](https://github.com/franziskuskiefer/)) -- Denis Merigoux ([denismerigoux](https://github.com/denismerigoux)) -- Karthik Bhargavan -- Tomer Yavor ([TomerHawk](https://github.com/TomerHawk)) -- Tanmay Garg ([tanmay2004](https://github.com/tanmay2004)) -- Peter Schwabe ([cryptojedi](https://github.com/cryptojedi)) -- Kaspar Schleiser ([kaspar030](https://github.com/kaspar030)) -- [Kasserne](https://github.com/Kasserne) -- Tony Arcieri ([tarcieri](https://github.com/tarcieri)) - -If you feel you're missing from this list, feel free to add yourself in a PR. \ No newline at end of file diff --git a/book/archive/src/readme.md b/book/archive/src/readme.md deleted file mode 100644 index 7f9bfcdb1..000000000 --- a/book/archive/src/readme.md +++ /dev/null @@ -1,25 +0,0 @@ -# Introduction - -hacspec is a specification language for crypto primitives, protocols, and more. -It is a subset of the [Rust] programming language, focused on functional -programming and it avoids the use of mutable state as much as possible. - -This book gives an overview of: -* [The hacspec language](./language); -* The different parts of the project: - * [the standard library](./std), - * [examples of hacspec programs](./examples); -* How to use hacspec to write [specifications] for standards and [verification]; -* How to use hacspec to generate [test vectors]; -* [Work on the hacspec compiler and tooling itself](./developers). - -For a quick introduction you can also check out these [slides] from April 2021. -An in-depth [technical report] is also available, and serves as a reference -for the language formalization. - -[slides]: https://raw.githubusercontent.com/hacspec/hacspec/master/presentation_slides.pdf -[technical report]: https://hal.inria.fr/hal-03176482 -[Rust]: https://www.rust-lang.org/ -[specifications]: ./usage/specifications.md -[verification]: ./usage/verification.md -[test vectors]: ./usage/test_vectors.md diff --git a/book/archive/src/std/abstract_integers.md b/book/archive/src/std/abstract_integers.md deleted file mode 100644 index baf0324c5..000000000 --- a/book/archive/src/std/abstract_integers.md +++ /dev/null @@ -1 +0,0 @@ -# Astract integers diff --git a/book/archive/src/std/arithmetic.md b/book/archive/src/std/arithmetic.md deleted file mode 100644 index 43b116ae0..000000000 --- a/book/archive/src/std/arithmetic.md +++ /dev/null @@ -1,76 +0,0 @@ -# Arithmetic - -hacspec overloads the arithmetic operators for a wide variety of types -corresponding to mathematical values mentioned in cryptographic specifications. - -## The `Numeric` trait - -All of these types implement the `Numeric` trait defined by the hacspec standard -library. The arithmetic operators work for all kinds of integers, but also -arrays and sequences (point-wise operations). - -Note that the list of types implementing `Numeric` is hardcoded in the -hacspec compiler, and as of this day cannot be extended by the user. - -While the Rust compiler can infer the type of integer literals automatically, -this feature is not implemented by the hacspec compiler: - -``` -let w: u32 = 0; // ERROR: an integer without a suffix will have type usize -let x: u64 = 0x64265u64; // GOOD -let y: u64 = 4u64; // GOOD -``` - -## Public and secret integers - -One of hacspec's goal is to enable users to quickly check whether their -application does not obviously break the constant-time guarantee. -Certain processor instructions take more or less time to complete depending -on their inputs, which can cause secret leakage and break the security of -an application. Hence, hacspec offers for each type of integer (`u8`, `u32`, etc.) -a mirror secret integer type (`U8`, `U32`, etc.) for which operations -that break constant-timedness are forbidden. - -This public/private distinction can be found at a lot of places in the standard -library, and is made to forbid functions and data structures from leaking secrets. - -Conversions between public and secret integers are restricted to two functions: -`classify` and `declassify`. - -## Abstract integers - -Some cryptographic specifications talk about modular arithmetic in large -fields, whose size overflows even `u128`. To ease the expression of such -specifications, hacspec offers wrapper types around `BigInt` that can be -declared using the following API: - -```rust, noplaypen -abstract_nat_mod!( - NameOfModularInts, - NameOfUnderlyingByteRepresentation, - 256, // Number of bits for the representation of the big integer, - "ffffffffffffffff00000000000065442", // Hex representation of the modulo value as hex -) - -abstract_public_nat_mod!( - ... // Public version of above -) -``` - -## Integers as bytes - -It is often useful to view an integer as a sequence of bytes that can be -manipulated individually. The hacspec standard library provides a number -of function to translate back and forth from integer to sequence of bytes: - -```rust, noplaypen -pub fn u16_to_le_bytes(x: u16) -> u16Word; - -pub fn u16_from_le_bytes(s: u16Word) -> u16; - -pub fn U64_to_be_bytes(x: U64) -> U64Word; - -pub fn U64_from_be_bytes(s: U64Word) -> U64; - -... -``` diff --git a/book/archive/src/std/readme.md b/book/archive/src/std/readme.md deleted file mode 100644 index 039253473..000000000 --- a/book/archive/src/std/readme.md +++ /dev/null @@ -1,15 +0,0 @@ -# The hacspec std library - -The hacspec standard library contains a host of functions, type generators -and methods that define the base objects manipulated in classic cryptographic -primitives. - -Methods in the standard library can be divided into three categories: -1. The `not_hacspec` methods whose signature and body does not belong to the -hacspec fragment of Rust. They should not be used in hacspec code, but can -be used as helpers for e.g. testing. -2. The `unsafe_hacspec` methods whose signature belongs to hacspec but not -the body. These methods can be used in hacspec programs but their body -is part of the trusted codebase. -3. The `in_hacspec` methods whose signatures and bodies belong to the -hacspec fragment of Rust. These can be used safely in hacspec programs. diff --git a/book/archive/src/std/seq.md b/book/archive/src/std/seq.md deleted file mode 100644 index 319f3d5e2..000000000 --- a/book/archive/src/std/seq.md +++ /dev/null @@ -1,58 +0,0 @@ -# Sequence and array operations - -## Operations common to sequences and arrays - -### Base traits - -Some operations are common to both [sequences and arrays](/book/language/seq.md) -by design, and can be used as the interoperability base between the two types -of collections. These operations are the following: -* `len`: gives the length of an array or sequence; -* `iter`: iterates over the content of the array or sequence -(unsafe in hacspec but can be used for implementing primitives) -* `create`: creates a sequence or array and initializes the elements to the -default value (0 for arithmetic types); -* `update_slice`, `update` and `update_start`: produce a new sequence or array -with modified contents. - -Both sequences and arrays implement indexing with any type of unsigned public -integer. - -### Chunking - -Both arrays and sequences support chunking with methods like: -* `num_chunks` and `num_exact_chunks` (whole or partial blocks); -* `get_chunk`, `get_exact_chunk` and `get_remainder_chunk`; -* `set_chunk` and `set_exact_chunk`. - -The read operations borrow the sequence or array, but the write operations -create a new sequence or array. - -### Conversions - -Sequences and arrays can be created from other types via methods like: -* `from_public_slice` and `from_slice`; -* `from_vec` and `from_native_slice`; -* `from_public_seq` and `from_seq` (to convert a seq into an array of the correct size); -* `from_string` and `from_hex` for byte or hex strings (hex only for `u8` sequences and arrays). - -### Secrecy - -The methods prefixed by `public` performs an element-wise classification of the -data under the hood. - -### Ownage - -Some methods have two versions: an `owned` and a non-`owned` version, depending -on whether the `self` argument is consumed or not by the method. This distinction -is useful to avoid unnecessary copies and thus be more performant. - -## Array-specific operations - -Since array length is known statically, `new` does not take any argument, -same as `length`. `slice`s of arrays become `Seq`. - -## Sequence-specific operations - -Sequences can be extended (by creating a new sequence under the hood) with -`push` or `concat`. Sequences can also be sliced with `slice`. diff --git a/book/archive/src/usage/readme.md b/book/archive/src/usage/readme.md deleted file mode 100644 index 8f04b05ad..000000000 --- a/book/archive/src/usage/readme.md +++ /dev/null @@ -1 +0,0 @@ -# Usage diff --git a/book/archive/src/usage/specifications.md b/book/archive/src/usage/specifications.md deleted file mode 100644 index 247b1857d..000000000 --- a/book/archive/src/usage/specifications.md +++ /dev/null @@ -1 +0,0 @@ -# Specifications diff --git a/book/archive/src/usage/test_vectors.md b/book/archive/src/usage/test_vectors.md deleted file mode 100644 index 4e7735f6c..000000000 --- a/book/archive/src/usage/test_vectors.md +++ /dev/null @@ -1 +0,0 @@ -# Test Vectors diff --git a/book/archive/src/usage/verification.md b/book/archive/src/usage/verification.md deleted file mode 100644 index d7ae51f2d..000000000 --- a/book/archive/src/usage/verification.md +++ /dev/null @@ -1,65 +0,0 @@ -# Verification - -## Coq - -### QuickCheck / QuickChick - -You can test your hacspec code using [QuickCheck](https://github.com/BurntSushi/quickcheck) (a Rust library for randomized property-based testing), by simply implementing `quickcheck::Arbitrary` for the type you want to generate tests for. For example: -```rust,ignore -impl Arbitrary for Fp { - fn arbitrary(g: &mut Gen) -> Fp { - let mut a: [u64; 6] = [0; 6]; - for i in 0..6 { - a[i] = u64::arbitrary(g); - } - let mut b: [u8; 48] = [0; 48]; - for i in 0..6 { - let val: u64 = a[i]; - b[(i*8)..((i+1)*8)].copy_from_slice(&(val.to_le_bytes())); - } - Fp::from_byte_seq_le(Seq::::from_public_slice(&b)) - } -} -``` -then you can use the `quickcheck` attribute, to make QuickCheck do property based testing for this function: -```rust,ignore -#[cfg(test)] -#[quickcheck] //Using the fp arbitraty implementation from above to generate fp2 elements. -fn test_fp2_prop_add_neg(a: Fp2) -> bool { - let b = fp2neg(a); - fp2fromfp(Fp::ZERO()) == fp2add(a, b) -} -``` -which will run when you do `cargo test`. If you then add the tag `#[cfg(proof)]` and export to Coq, -``` -cargo hacspec -o coq/src/.v -``` -then you get corresponding [QuickChick](https://github.com/QuickChick/QuickChick) test, -``` -Definition test_fp2_prop_add_neg (a_320 : fp2) : bool := - let b_321 := - fp2neg (a_320) in - (fp2fromfp (nat_mod_zero )) =.? (fp2add (a_320) (b_321)). - -QuickChick (forAll g_fp2 (fun a_320 : fp2 =>test_fp2_prop_add_neg a_320)). -``` -and generators will be constructed for the types automatically as, -``` -Instance show_fp : Show (fp) := Build_Show (fp) (fun x => show (GZnZ.val _ x)). -Definition g_fp : G (fp) := @bindGen Z (fp) (arbitrary) (fun x => returnGen (@Z_in_nat_mod _ x)). -Instance gen_fp : Gen (fp) := Build_Gen fp g_fp. -``` -which you can then run through coq in the folder `coq/` -``` -coqc -R src/ Hacspec src/.v -``` -Make sure you run: -``` -coqc -R src/ Hacspec src/MachineIntegers.v -coqc -R src/ Hacspec src/Lib.v -``` -or `make` to generate the `.vo` files used by `.v`. - -For more information: -- on QuickCheck (in rust): [BurntSushi/quickcheck](https://github.com/BurntSushi/quickcheck) -- on QuickChick: [Software foundations book on QuickChick](https://softwarefoundations.cis.upenn.edu/qc-current/index.html) diff --git a/book/book.toml b/book/book.toml deleted file mode 100644 index 19d6bf585..000000000 --- a/book/book.toml +++ /dev/null @@ -1,15 +0,0 @@ -[book] -authors = ["Franziskus Kiefer"] -language = "en" -multilingual = false -src = "src" -title = "hax" - -[output.html] -mathjax-support = true -additional-css = ["static/custom.css"] -additional-js = ["theme/fstar.js", "theme/lz-string.js", "theme/ansi_up.js"] - -[output.html.playground] -runnable = true -editable = true diff --git a/book/default.nix b/book/default.nix deleted file mode 100644 index a7358b93f..000000000 --- a/book/default.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ - stdenv, - mdbook, -}: -stdenv.mkDerivation { - name = "hax-book"; - src = ./.; - buildInputs = [mdbook]; - buildPhase = '' - mdbook build - mdbook build archive -d ../book/archive - ''; - installPhase = "mv book $out"; -} diff --git a/book/src/SUMMARY.md b/book/src/SUMMARY.md deleted file mode 100644 index 192046d30..000000000 --- a/book/src/SUMMARY.md +++ /dev/null @@ -1,33 +0,0 @@ -# Summary - -- [Introduction](./readme.md) -- [Quick start](quick_start/intro.md) -- [Tutorial](tutorial/readme.md) - - [Panic freedom](tutorial/panic-freedom.md) - - [Properties on functions](tutorial/properties.md) - - [Data invariants](tutorial/data-invariants.md) -- [Examples](examples/intro.md) - - [Rust By Example](examples/rust-by-examples/intro.md) - - [Using the F* backend](examples/fstar/intro.md) - - [Using the Coq backend](examples/coq/intro.md) - - [Using the ProVerif backend](examples/coq/intro.md) - - - - -- [Troubleshooting/FAQ](faq/intro.md) - - [The include flag: which items should be extracted, and how?](faq/include-flags.md) -- [Contributing](contributing/intro.md) - - [Architecture](contributing/architecture.md) - - [Libraries & Macros](contributing/libraries_macros.md) - - - - - - - - ---- - -[Archive](misc/archive.md) diff --git a/book/src/contributing/backends.md b/book/src/contributing/backends.md deleted file mode 100644 index e69de29bb..000000000 diff --git a/book/src/contributing/engine.md b/book/src/contributing/engine.md deleted file mode 100644 index e69de29bb..000000000 diff --git a/book/src/contributing/exporter.md b/book/src/contributing/exporter.md deleted file mode 100644 index e69de29bb..000000000 diff --git a/book/src/contributing/hax-cargo-subcommand.md b/book/src/contributing/hax-cargo-subcommand.md deleted file mode 100644 index e69de29bb..000000000 diff --git a/book/src/contributing/libcore.md b/book/src/contributing/libcore.md deleted file mode 100644 index e69de29bb..000000000 diff --git a/book/src/contributing/readme.md b/book/src/contributing/readme.md deleted file mode 100644 index e69de29bb..000000000 diff --git a/book/src/contributing/rustc-driver.md b/book/src/contributing/rustc-driver.md deleted file mode 100644 index e69de29bb..000000000 diff --git a/book/src/contributing/utilities.md b/book/src/contributing/utilities.md deleted file mode 100644 index e69de29bb..000000000 diff --git a/book/src/examples/coq/intro.md b/book/src/examples/coq/intro.md deleted file mode 100644 index 84914c08f..000000000 --- a/book/src/examples/coq/intro.md +++ /dev/null @@ -1 +0,0 @@ -# Using the ProVerif backend diff --git a/book/src/examples/fstar/intro.md b/book/src/examples/fstar/intro.md deleted file mode 100644 index 9b80bca00..000000000 --- a/book/src/examples/fstar/intro.md +++ /dev/null @@ -1 +0,0 @@ -# Using the F* backend diff --git a/book/src/examples/intro.md b/book/src/examples/intro.md deleted file mode 100644 index 0ff72fdfa..000000000 --- a/book/src/examples/intro.md +++ /dev/null @@ -1,12 +0,0 @@ -# Examples - -This chapter contains various examples that demonstrates how hax can -be used to prove properties about programs. Each example is -self-contained. hax being a tool that can extract Rust to various -backends, this section provides examples for each backend. - -The first subsection takes some examples from [Rust by -Example](https://doc.rust-lang.org/rust-by-example/), and shows how to -prove properties on them. - -The other sections present backend-specific examples. diff --git a/book/src/examples/rust-by-examples/intro.md b/book/src/examples/rust-by-examples/intro.md deleted file mode 100644 index d8d487984..000000000 --- a/book/src/examples/rust-by-examples/intro.md +++ /dev/null @@ -1 +0,0 @@ -# Rust By Example diff --git a/book/src/misc/archive.md b/book/src/misc/archive.md deleted file mode 100644 index 923376fd0..000000000 --- a/book/src/misc/archive.md +++ /dev/null @@ -1,7 +0,0 @@ - -# Warning: this book is currently being rewritten! - -hax is the successor of hacspec. You can find the previous book -describing hacspec [here](../archive/index.html), but keep in mind most of the information -there is outdated. - diff --git a/book/src/misc/contributors.md b/book/src/misc/contributors.md deleted file mode 100644 index e69de29bb..000000000 diff --git a/book/src/proofs/coq.md b/book/src/proofs/coq.md deleted file mode 100644 index e69de29bb..000000000 diff --git a/book/src/proofs/fstar.md b/book/src/proofs/fstar.md deleted file mode 100644 index e69de29bb..000000000 diff --git a/book/src/proofs/libcore.md b/book/src/proofs/libcore.md deleted file mode 100644 index e69de29bb..000000000 diff --git a/book/src/proofs/readme.md b/book/src/proofs/readme.md deleted file mode 100644 index e69de29bb..000000000 diff --git a/book/src/readme.md b/book/src/readme.md deleted file mode 100644 index c4880e4ce..000000000 --- a/book/src/readme.md +++ /dev/null @@ -1,14 +0,0 @@ -# Introduction - -hax is a tool for high assurance translations that translates a large subset of -Rust into formal languages such as [F\*](https://www.fstar-lang.org/) or [Coq](https://coq.inria.fr/). -This extends the scope of the hacspec project, which was previously a DSL embedded in Rust, -to a usable tool for verifying Rust programs. - -> So what is **hacspec** now? - -hacspec is the functional subset of Rust that can be used, together with a hacspec -standard library, to write succinct, executable, and verifiable specifications in -Rust. -These specifications can be translated into formal languages with hax. - diff --git a/book/static/custom.css b/book/static/custom.css deleted file mode 100644 index cf40db607..000000000 --- a/book/static/custom.css +++ /dev/null @@ -1,16 +0,0 @@ -input.user-checkable { - transform: scale(1.5); - margin-right: 8px; - margin-left: 8px; -} - -ul:has(> li > .user-checkable) { - list-style-type: none; - padding: 0; - margin: 0; -} -li:has(> .user-checkable) { - list-style-type: none; - padding: 0; - margin: 0; -} diff --git a/book/static/see-fstar-extraction.css b/book/static/see-fstar-extraction.css deleted file mode 100644 index f9109499a..000000000 --- a/book/static/see-fstar-extraction.css +++ /dev/null @@ -1,25 +0,0 @@ -.rust-fstar-wrapper .buttons { - text-align: right; - margin-right: 8px; -} -.rust-fstar-wrapper button { - border: none; - background: none; - padding: 4px 14px; -} -.rust-fstar-wrapper .buttons .fstar-rust-snippet-active { - background: #f6f7f6; - opacity: 1; -} -.rust-fstar-wrapper .buttons button:hover { - opacity: 1; -} -.rust-fstar-wrapper .buttons .fstar-rust-snippet-hidden { - opacity: 0.4; -} -.rust-fstar-wrapper .snippets .snippet.fstar-rust-snippet-hidden { - display: none; -} -.rust-fstar-wrapper .snippets .snippet pre { - margin-top: 0; -} diff --git a/book/static/see-fstar-extraction.js b/book/static/see-fstar-extraction.js deleted file mode 100644 index 0dfb76292..000000000 --- a/book/static/see-fstar-extraction.js +++ /dev/null @@ -1,38 +0,0 @@ -function installButtons() { - let id = 0; - for(let fst of document.querySelectorAll('pre + pre')) { - let parent = fst.parentElement; - let rust = fst.previousElementSibling; - let w = s => `

${s}
`; - let both = w(rust.outerHTML) + w(fst.outerHTML); - parent.removeChild(rust); - let snippets = document.createElement('div'); - snippets.classList.add('snippets'); - snippets.innerHTML = both; - let buttons = document.createElement('div'); - id++; - buttons.classList.add('buttons'); - buttons.innerHTML = ``; - let mk_active = i => { - [snippets, buttons].map(el => - [...el.children].map((x, j) => { - x.classList[j==i ? 'remove' : 'add']('fstar-rust-snippet-hidden'); - x.classList[j==i ? 'add' : 'remove']('fstar-rust-snippet-active'); - }) - ); - }; - [...buttons.children].map((child, nth) => - (child.onclick = _ => mk_active(nth)) - ); - const RUST = 0; - mk_active(RUST); - - let wrapper = document.createElement('div'); - wrapper.classList.add('rust-fstar-wrapper'); - wrapper.appendChild(buttons); - wrapper.appendChild(snippets); - parent.replaceChild(wrapper, fst); - } -}; - -window.addEventListener("load", installButtons); diff --git a/book/theme/book.js b/book/theme/book.js deleted file mode 100644 index e2dee88cf..000000000 --- a/book/theme/book.js +++ /dev/null @@ -1,776 +0,0 @@ -"use strict"; - -// Fix back button cache problem -window.onunload = function () { }; - -// Global variable, shared between modules -function playground_text(playground, hidden = true) { - let code_block = playground.querySelector("code"); - - if (window.ace && code_block.classList.contains("editable")) { - let editor = window.ace.edit(code_block); - return editor.getValue(); - } else if (hidden) { - return code_block.textContent; - } else { - return code_block.innerText; - } -} - -(function codeSnippets() { - function fetch_with_timeout(url, options, timeout = 6000) { - return Promise.race([ - fetch(url, options), - new Promise((_, reject) => setTimeout(() => reject(new Error('timeout')), timeout)) - ]); - } - - var playgrounds = Array.from(document.querySelectorAll(".playground")); - - function handle_crate_list_update(playground_block, playground_crates) { - // update the play buttons after receiving the response - update_play_button(playground_block, playground_crates); - - // and install on change listener to dynamically update ACE editors - if (window.ace) { - let code_block = playground_block.querySelector("code"); - if (code_block.classList.contains("editable")) { - let editor = window.ace.edit(code_block); - editor.addEventListener("change", function (e) { - update_play_button(playground_block, playground_crates); - }); - // add Ctrl-Enter command to execute rust code - editor.commands.addCommand({ - name: "run", - bindKey: { - win: "Ctrl-Enter", - mac: "Ctrl-Enter" - }, - exec: _editor => run_rust_code(playground_block) - }); - } - } - } - - // updates the visibility of play button based on `no_run` class and - // used crates vs ones available on https://play.rust-lang.org - function update_play_button(pre_block, playground_crates) { - var play_button = pre_block.querySelector(".play-button"); - - // skip if code is `no_run` - if (pre_block.querySelector('code').classList.contains("no_run")) { - play_button.classList.add("hidden"); - return; - } - - // get list of `extern crate`'s from snippet - var txt = playground_text(pre_block); - var re = /extern\s+crate\s+([a-zA-Z_0-9]+)\s*;/g; - var snippet_crates = []; - var item; - while (item = re.exec(txt)) { - snippet_crates.push(item[1]); - } - - // check if all used crates are available on play.rust-lang.org - var all_available = snippet_crates.every(function (elem) { - return playground_crates.indexOf(elem) > -1; - }); - - if (all_available) { - play_button.classList.remove("hidden"); - } else { - play_button.classList.add("hidden"); - } - } - - function run_rust_code(code_block, query = 'fstar') { - var result_block = code_block.querySelector(".result"); - if (!result_block) { - result_block = document.createElement('code'); - result_block.className = 'result hljs language-fstar'; - - code_block.append(result_block); - } - - let text = playground_text(code_block); - let classes = code_block.querySelector('code').classList; - let edition = "2015"; - if(classes.contains("edition2018")) { - edition = "2018"; - } else if(classes.contains("edition2021")) { - edition = "2021"; - } - var params = { - version: "stable", - optimize: "0", - code: text, - edition: edition - }; - - if (text.indexOf("#![feature") !== -1) { - params.version = "nightly"; - } - - (async () => { - let raw_query = async (API_URL, hax_version, query, files, on_line_received) => { - let response = await fetch(`${API_URL}/query/${hax_version}/${query}`, { - method: "POST", - headers: { - 'Accept': 'application/json', - 'Content-Type': 'application/json' - }, - body: JSON.stringify(files), - }); - - let decoder = new TextDecoder(); - let leftover = ""; - let reader = response.body.getReader(); - while (true) { - const { done, value } = await reader.read(); - if (done) break; - leftover += decoder.decode(value); - let lines = leftover.split('\n'); - let entire_lines = lines.slice(0, -1); - leftover = lines.slice(-1)[0]; - for (const line of entire_lines) - on_line_received(line); - } - }; - - let hax_version = '5ca1c13023200dee0cca6237901a3b5a69ad345a'; - let playground_url = 'https://hax-playground.cryspen.com'; - let ansi_up = new AnsiUp(); - let first = true; - let logs = document.createElement('div'); - logs.style = 'font-size: 80%; background: #00000010; padding: 3px;'; - raw_query( - playground_url, - hax_version, - query, - [['src/lib.rs', text]], - x => { - if(first) { - result_block.innerText = ""; - result_block.appendChild(logs); - } - first = false; - let json = {}; - try { - json = JSON.parse(x); - } catch(_){} - if (json.Stderr || json.Stdout) { - logs.innerHTML += '
' + ansi_up.ansi_to_html(json.Stderr || json.Stdout) + "
"; - } - if (json.Done) { - let out = []; - for(let file in json.Done.files) { - if(file.endsWith('.rs')) - continue; - let contents = json.Done.files[file]; - contents = contents.split('open FStar.Mul')[1].trim(); - contents = contents.replace(/$/gm, ' ').trim(); - out.push([file, contents]); - } - if(json.Done.success) - result_block.innerText = ""; - else - result_block.innerHTML += "
"; - let result = document.createElement('div'); - if(out.length == 1) { - result.innerText = out[0][1]; - } else { - result.innerText = out.map(([file, s]) => '(* File: ' + file + ' *) \n' + s).join('\n\n').trim(); - } - result_block.appendChild(result); - if(json.Done.success && query.includes('+tc')) { - result_block.innerHTML += '
Status: ✓ F* successfully typechecked!
'; - } - hljs.highlightBlock(result); - result_block.innerHTML += `
Open in hax playground ↗`; - } - }, - ); - })(); - // result_block.innerText = "Running..."; - - // result_block.innerText = "HELLO, input was " + text; - // result_block.classList.add("result-no-output"); - - // fetch_with_timeout("https://play.rust-lang.org/evaluate.json", { - // headers: { - // 'Content-Type': "application/json", - // }, - // method: 'POST', - // mode: 'cors', - // body: JSON.stringify(params) - // }) - // .then(response => response.json()) - // .then(response => { - // if (response.result.trim() === '') { - // result_block.innerText = "No output"; - // result_block.classList.add("result-no-output"); - // } else { - // result_block.innerText = response.result; - // result_block.classList.remove("result-no-output"); - // } - // }) - // .catch(error => result_block.innerText = "Playground Communication: " + error.message); - } - - // Syntax highlighting Configuration - hljs.configure({ - tabReplace: ' ', // 4 spaces - languages: [], // Languages used for auto-detection - }); - - let code_nodes = Array - .from(document.querySelectorAll('code')) - // Don't highlight `inline code` blocks in headers. - .filter(function (node) {return !node.parentElement.classList.contains("header"); }); - - if (window.ace) { - // language-rust class needs to be removed for editable - // blocks or highlightjs will capture events - code_nodes - .filter(function (node) {return node.classList.contains("editable"); }) - .forEach(function (block) { block.classList.remove('language-rust'); }); - - code_nodes - .filter(function (node) {return !node.classList.contains("editable"); }) - .forEach(function (block) { hljs.highlightBlock(block); }); - } else { - code_nodes.forEach(function (block) { hljs.highlightBlock(block); }); - } - - // Adding the hljs class gives code blocks the color css - // even if highlighting doesn't apply - code_nodes.forEach(function (block) { block.classList.add('hljs'); }); - - Array.from(document.querySelectorAll("code.hljs")).forEach(function (block) { - - var lines = Array.from(block.querySelectorAll('.boring')); - // If no lines were hidden, return - if (!lines.length) { return; } - block.classList.add("hide-boring"); - - var buttons = document.createElement('div'); - buttons.className = 'buttons'; - buttons.innerHTML = ""; - - // add expand button - var pre_block = block.parentNode; - pre_block.insertBefore(buttons, pre_block.firstChild); - - pre_block.querySelector('.buttons').addEventListener('click', function (e) { - if (e.target.classList.contains('fa-eye')) { - e.target.classList.remove('fa-eye'); - e.target.classList.add('fa-eye-slash'); - e.target.title = 'Hide lines'; - e.target.setAttribute('aria-label', e.target.title); - - block.classList.remove('hide-boring'); - } else if (e.target.classList.contains('fa-eye-slash')) { - e.target.classList.remove('fa-eye-slash'); - e.target.classList.add('fa-eye'); - e.target.title = 'Show hidden lines'; - e.target.setAttribute('aria-label', e.target.title); - - block.classList.add('hide-boring'); - } - }); - }); - - if (window.playground_copyable) { - Array.from(document.querySelectorAll('pre code')).forEach(function (block) { - var pre_block = block.parentNode; - if (!pre_block.classList.contains('playground')) { - var buttons = pre_block.querySelector(".buttons"); - if (!buttons) { - buttons = document.createElement('div'); - buttons.className = 'buttons'; - pre_block.insertBefore(buttons, pre_block.firstChild); - } - - var clipButton = document.createElement('button'); - clipButton.className = 'fa fa-copy clip-button'; - clipButton.title = 'Copy to clipboard'; - clipButton.setAttribute('aria-label', clipButton.title); - clipButton.innerHTML = ''; - - buttons.insertBefore(clipButton, buttons.firstChild); - } - }); - } - - // Process playground code blocks - Array.from(document.querySelectorAll(".playground")).forEach(function (pre_block) { - // Add play button - var buttons = pre_block.querySelector(".buttons"); - if (!buttons) { - buttons = document.createElement('div'); - buttons.className = 'buttons'; - pre_block.insertBefore(buttons, pre_block.firstChild); - } - - var runCodeButton = document.createElement('button'); - runCodeButton.className = 'fa fa-play play-button'; - runCodeButton.hidden = true; - runCodeButton.title = 'Extract this code'; - runCodeButton.setAttribute('aria-label', runCodeButton.title); - - runCodeButton.addEventListener('click', function (e) { - run_rust_code(pre_block); - }); - - var runVerifyButton = document.createElement('button'); - runVerifyButton.className = 'fa fa-check check-button'; - runVerifyButton.hidden = true; - runVerifyButton.title = 'Extract and typecheck this code'; - runVerifyButton.setAttribute('aria-label', runCodeButton.title); - - buttons.insertBefore(runVerifyButton, buttons.firstChild); - buttons.insertBefore(runCodeButton, buttons.firstChild); - runVerifyButton.addEventListener('click', function (e) { - run_rust_code(pre_block, 'fstar+tc'); - }); - - if (window.playground_copyable) { - var copyCodeClipboardButton = document.createElement('button'); - copyCodeClipboardButton.className = 'fa fa-copy clip-button'; - copyCodeClipboardButton.innerHTML = ''; - copyCodeClipboardButton.title = 'Copy to clipboard'; - copyCodeClipboardButton.setAttribute('aria-label', copyCodeClipboardButton.title); - - buttons.insertBefore(copyCodeClipboardButton, buttons.firstChild); - } - - let code_block = pre_block.querySelector("code"); - if (window.ace && code_block.classList.contains("editable")) { - var undoChangesButton = document.createElement('button'); - undoChangesButton.className = 'fa fa-history reset-button'; - undoChangesButton.title = 'Undo changes'; - undoChangesButton.setAttribute('aria-label', undoChangesButton.title); - - buttons.insertBefore(undoChangesButton, buttons.firstChild); - - undoChangesButton.addEventListener('click', function () { - let editor = window.ace.edit(code_block); - editor.setValue(editor.originalCode); - editor.clearSelection(); - }); - } - }); -})(); - -(function themes() { - var html = document.querySelector('html'); - var themeToggleButton = document.getElementById('theme-toggle'); - var themePopup = document.getElementById('theme-list'); - var themeColorMetaTag = document.querySelector('meta[name="theme-color"]'); - var stylesheets = { - ayuHighlight: document.querySelector("[href$='ayu-highlight.css']"), - tomorrowNight: document.querySelector("[href$='tomorrow-night.css']"), - highlight: document.querySelector("[href$='highlight.css']"), - }; - - function showThemes() { - themePopup.style.display = 'block'; - themeToggleButton.setAttribute('aria-expanded', true); - themePopup.querySelector("button#" + get_theme()).focus(); - } - - function updateThemeSelected() { - themePopup.querySelectorAll('.theme-selected').forEach(function (el) { - el.classList.remove('theme-selected'); - }); - themePopup.querySelector("button#" + get_theme()).classList.add('theme-selected'); - } - - function hideThemes() { - themePopup.style.display = 'none'; - themeToggleButton.setAttribute('aria-expanded', false); - themeToggleButton.focus(); - } - - function get_theme() { - var theme; - try { theme = localStorage.getItem('mdbook-theme'); } catch (e) { } - if (theme === null || theme === undefined) { - return default_theme; - } else { - return theme; - } - } - - function set_theme(theme, store = true) { - let ace_theme; - - if (theme == 'coal' || theme == 'navy') { - stylesheets.ayuHighlight.disabled = true; - stylesheets.tomorrowNight.disabled = false; - stylesheets.highlight.disabled = true; - - ace_theme = "ace/theme/tomorrow_night"; - } else if (theme == 'ayu') { - stylesheets.ayuHighlight.disabled = false; - stylesheets.tomorrowNight.disabled = true; - stylesheets.highlight.disabled = true; - ace_theme = "ace/theme/tomorrow_night"; - } else { - stylesheets.ayuHighlight.disabled = true; - stylesheets.tomorrowNight.disabled = true; - stylesheets.highlight.disabled = false; - ace_theme = "ace/theme/dawn"; - } - - setTimeout(function () { - themeColorMetaTag.content = getComputedStyle(document.documentElement).backgroundColor; - }, 1); - - if (window.ace && window.editors) { - window.editors.forEach(function (editor) { - editor.setTheme(ace_theme); - }); - } - - var previousTheme = get_theme(); - - if (store) { - try { localStorage.setItem('mdbook-theme', theme); } catch (e) { } - } - - html.classList.remove(previousTheme); - html.classList.add(theme); - updateThemeSelected(); - } - - // Set theme - var theme = get_theme(); - - set_theme(theme, false); - - themeToggleButton.addEventListener('click', function () { - if (themePopup.style.display === 'block') { - hideThemes(); - } else { - showThemes(); - } - }); - - themePopup.addEventListener('click', function (e) { - var theme; - if (e.target.className === "theme") { - theme = e.target.id; - } else if (e.target.parentElement.className === "theme") { - theme = e.target.parentElement.id; - } else { - return; - } - set_theme(theme); - }); - - themePopup.addEventListener('focusout', function(e) { - // e.relatedTarget is null in Safari and Firefox on macOS (see workaround below) - if (!!e.relatedTarget && !themeToggleButton.contains(e.relatedTarget) && !themePopup.contains(e.relatedTarget)) { - hideThemes(); - } - }); - - // Should not be needed, but it works around an issue on macOS & iOS: https://github.com/rust-lang/mdBook/issues/628 - document.addEventListener('click', function(e) { - if (themePopup.style.display === 'block' && !themeToggleButton.contains(e.target) && !themePopup.contains(e.target)) { - hideThemes(); - } - }); - - document.addEventListener('keydown', function (e) { - if (e.altKey || e.ctrlKey || e.metaKey || e.shiftKey) { return; } - if (!themePopup.contains(e.target)) { return; } - - switch (e.key) { - case 'Escape': - e.preventDefault(); - hideThemes(); - break; - case 'ArrowUp': - e.preventDefault(); - var li = document.activeElement.parentElement; - if (li && li.previousElementSibling) { - li.previousElementSibling.querySelector('button').focus(); - } - break; - case 'ArrowDown': - e.preventDefault(); - var li = document.activeElement.parentElement; - if (li && li.nextElementSibling) { - li.nextElementSibling.querySelector('button').focus(); - } - break; - case 'Home': - e.preventDefault(); - themePopup.querySelector('li:first-child button').focus(); - break; - case 'End': - e.preventDefault(); - themePopup.querySelector('li:last-child button').focus(); - break; - } - }); -})(); - -(function sidebar() { - var body = document.querySelector("body"); - var sidebar = document.getElementById("sidebar"); - var sidebarLinks = document.querySelectorAll('#sidebar a'); - var sidebarToggleButton = document.getElementById("sidebar-toggle"); - var sidebarResizeHandle = document.getElementById("sidebar-resize-handle"); - var firstContact = null; - - function showSidebar() { - body.classList.remove('sidebar-hidden') - body.classList.add('sidebar-visible'); - Array.from(sidebarLinks).forEach(function (link) { - link.setAttribute('tabIndex', 0); - }); - sidebarToggleButton.setAttribute('aria-expanded', true); - sidebar.setAttribute('aria-hidden', false); - try { localStorage.setItem('mdbook-sidebar', 'visible'); } catch (e) { } - } - - - var sidebarAnchorToggles = document.querySelectorAll('#sidebar a.toggle'); - - function toggleSection(ev) { - ev.currentTarget.parentElement.classList.toggle('expanded'); - } - - Array.from(sidebarAnchorToggles).forEach(function (el) { - el.addEventListener('click', toggleSection); - }); - - function hideSidebar() { - body.classList.remove('sidebar-visible') - body.classList.add('sidebar-hidden'); - Array.from(sidebarLinks).forEach(function (link) { - link.setAttribute('tabIndex', -1); - }); - sidebarToggleButton.setAttribute('aria-expanded', false); - sidebar.setAttribute('aria-hidden', true); - try { localStorage.setItem('mdbook-sidebar', 'hidden'); } catch (e) { } - } - - // Toggle sidebar - sidebarToggleButton.addEventListener('click', function sidebarToggle() { - if (body.classList.contains("sidebar-hidden")) { - var current_width = parseInt( - document.documentElement.style.getPropertyValue('--sidebar-width'), 10); - if (current_width < 150) { - document.documentElement.style.setProperty('--sidebar-width', '150px'); - } - showSidebar(); - } else if (body.classList.contains("sidebar-visible")) { - hideSidebar(); - } else { - if (getComputedStyle(sidebar)['transform'] === 'none') { - hideSidebar(); - } else { - showSidebar(); - } - } - }); - - sidebarResizeHandle.addEventListener('mousedown', initResize, false); - - function initResize(e) { - window.addEventListener('mousemove', resize, false); - window.addEventListener('mouseup', stopResize, false); - body.classList.add('sidebar-resizing'); - } - function resize(e) { - var pos = (e.clientX - sidebar.offsetLeft); - if (pos < 20) { - hideSidebar(); - } else { - if (body.classList.contains("sidebar-hidden")) { - showSidebar(); - } - pos = Math.min(pos, window.innerWidth - 100); - document.documentElement.style.setProperty('--sidebar-width', pos + 'px'); - } - } - //on mouseup remove windows functions mousemove & mouseup - function stopResize(e) { - body.classList.remove('sidebar-resizing'); - window.removeEventListener('mousemove', resize, false); - window.removeEventListener('mouseup', stopResize, false); - } - - document.addEventListener('touchstart', function (e) { - firstContact = { - x: e.touches[0].clientX, - time: Date.now() - }; - }, { passive: true }); - - document.addEventListener('touchmove', function (e) { - if (!firstContact) - return; - - var curX = e.touches[0].clientX; - var xDiff = curX - firstContact.x, - tDiff = Date.now() - firstContact.time; - - if (tDiff < 250 && Math.abs(xDiff) >= 150) { - if (xDiff >= 0 && firstContact.x < Math.min(document.body.clientWidth * 0.25, 300)) - showSidebar(); - else if (xDiff < 0 && curX < 300) - hideSidebar(); - - firstContact = null; - } - }, { passive: true }); -})(); - -(function chapterNavigation() { - document.addEventListener('keydown', function (e) { - if (e.altKey || e.ctrlKey || e.metaKey || e.shiftKey) { return; } - if (window.search && window.search.hasFocus()) { return; } - var html = document.querySelector('html'); - - function next() { - var nextButton = document.querySelector('.nav-chapters.next'); - if (nextButton) { - window.location.href = nextButton.href; - } - } - function prev() { - var previousButton = document.querySelector('.nav-chapters.previous'); - if (previousButton) { - window.location.href = previousButton.href; - } - } - switch (e.key) { - case 'ArrowRight': - e.preventDefault(); - if (html.dir == 'rtl') { - prev(); - } else { - next(); - } - break; - case 'ArrowLeft': - e.preventDefault(); - if (html.dir == 'rtl') { - next(); - } else { - prev(); - } - break; - } - }); -})(); - -(function clipboard() { - var clipButtons = document.querySelectorAll('.clip-button'); - - function hideTooltip(elem) { - elem.firstChild.innerText = ""; - elem.className = 'fa fa-copy clip-button'; - } - - function showTooltip(elem, msg) { - elem.firstChild.innerText = msg; - elem.className = 'fa fa-copy tooltipped'; - } - - var clipboardSnippets = new ClipboardJS('.clip-button', { - text: function (trigger) { - hideTooltip(trigger); - let playground = trigger.closest("pre"); - return playground_text(playground, false); - } - }); - - Array.from(clipButtons).forEach(function (clipButton) { - clipButton.addEventListener('mouseout', function (e) { - hideTooltip(e.currentTarget); - }); - }); - - clipboardSnippets.on('success', function (e) { - e.clearSelection(); - showTooltip(e.trigger, "Copied!"); - }); - - clipboardSnippets.on('error', function (e) { - showTooltip(e.trigger, "Clipboard error!"); - }); -})(); - -(function scrollToTop () { - var menuTitle = document.querySelector('.menu-title'); - - menuTitle.addEventListener('click', function () { - document.scrollingElement.scrollTo({ top: 0, behavior: 'smooth' }); - }); -})(); - -(function controllMenu() { - var menu = document.getElementById('menu-bar'); - - (function controllPosition() { - var scrollTop = document.scrollingElement.scrollTop; - var prevScrollTop = scrollTop; - var minMenuY = -menu.clientHeight - 50; - // When the script loads, the page can be at any scroll (e.g. if you reforesh it). - menu.style.top = scrollTop + 'px'; - // Same as parseInt(menu.style.top.slice(0, -2), but faster - var topCache = menu.style.top.slice(0, -2); - menu.classList.remove('sticky'); - var stickyCache = false; // Same as menu.classList.contains('sticky'), but faster - document.addEventListener('scroll', function () { - scrollTop = Math.max(document.scrollingElement.scrollTop, 0); - // `null` means that it doesn't need to be updated - var nextSticky = null; - var nextTop = null; - var scrollDown = scrollTop > prevScrollTop; - var menuPosAbsoluteY = topCache - scrollTop; - if (scrollDown) { - nextSticky = false; - if (menuPosAbsoluteY > 0) { - nextTop = prevScrollTop; - } - } else { - if (menuPosAbsoluteY > 0) { - nextSticky = true; - } else if (menuPosAbsoluteY < minMenuY) { - nextTop = prevScrollTop + minMenuY; - } - } - if (nextSticky === true && stickyCache === false) { - menu.classList.add('sticky'); - stickyCache = true; - } else if (nextSticky === false && stickyCache === true) { - menu.classList.remove('sticky'); - stickyCache = false; - } - if (nextTop !== null) { - menu.style.top = nextTop + 'px'; - topCache = nextTop; - } - prevScrollTop = scrollTop; - }, { passive: true }); - })(); - (function controllBorder() { - function updateBorder() { - if (menu.offsetTop === 0) { - menu.classList.remove('bordered'); - } else { - menu.classList.add('bordered'); - } - } - updateBorder(); - document.addEventListener('scroll', updateBorder, { passive: true }); - })(); -})(); diff --git a/book/theme/css/chrome.css b/book/theme/css/chrome.css deleted file mode 100644 index 8b78255de..000000000 --- a/book/theme/css/chrome.css +++ /dev/null @@ -1,606 +0,0 @@ -/* CSS for UI elements (a.k.a. chrome) */ - -@import 'variables.css'; - -html { - scrollbar-color: var(--scrollbar) var(--bg); -} -#searchresults a, -.content a:link, -a:visited, -a > .hljs { - color: var(--links); -} - -/* - body-container is necessary because mobile browsers don't seem to like - overflow-x on the body tag when there is a tag. -*/ -#body-container { - /* - This is used when the sidebar pushes the body content off the side of - the screen on small screens. Without it, dragging on mobile Safari - will want to reposition the viewport in a weird way. - */ - overflow-x: clip; -} - -/* Menu Bar */ - -#menu-bar, -#menu-bar-hover-placeholder { - z-index: 101; - margin: auto calc(0px - var(--page-padding)); -} -#menu-bar { - position: relative; - display: flex; - flex-wrap: wrap; - background-color: var(--bg); - border-block-end-color: var(--bg); - border-block-end-width: 1px; - border-block-end-style: solid; -} -#menu-bar.sticky, -.js #menu-bar-hover-placeholder:hover + #menu-bar, -.js #menu-bar:hover, -.js.sidebar-visible #menu-bar { - position: -webkit-sticky; - position: sticky; - top: 0 !important; -} -#menu-bar-hover-placeholder { - position: sticky; - position: -webkit-sticky; - top: 0; - height: var(--menu-bar-height); -} -#menu-bar.bordered { - border-block-end-color: var(--table-border-color); -} -#menu-bar i, #menu-bar .icon-button { - position: relative; - padding: 0 8px; - z-index: 10; - line-height: var(--menu-bar-height); - cursor: pointer; - transition: color 0.5s; -} -@media only screen and (max-width: 420px) { - #menu-bar i, #menu-bar .icon-button { - padding: 0 5px; - } -} - -.icon-button { - border: none; - background: none; - padding: 0; - color: inherit; -} -.icon-button i { - margin: 0; -} - -.right-buttons { - margin: 0 15px; -} -.right-buttons a { - text-decoration: none; -} - -.left-buttons { - display: flex; - margin: 0 5px; -} -.no-js .left-buttons button { - display: none; -} - -.menu-title { - display: inline-block; - font-weight: 200; - font-size: 2.4rem; - line-height: var(--menu-bar-height); - text-align: center; - margin: 0; - flex: 1; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} -.js .menu-title { - cursor: pointer; -} - -.menu-bar, -.menu-bar:visited, -.nav-chapters, -.nav-chapters:visited, -.mobile-nav-chapters, -.mobile-nav-chapters:visited, -.menu-bar .icon-button, -.menu-bar a i { - color: var(--icons); -} - -.menu-bar i:hover, -.menu-bar .icon-button:hover, -.nav-chapters:hover, -.mobile-nav-chapters i:hover { - color: var(--icons-hover); -} - -/* Nav Icons */ - -.nav-chapters { - font-size: 2.5em; - text-align: center; - text-decoration: none; - - position: fixed; - top: 0; - bottom: 0; - margin: 0; - max-width: 150px; - min-width: 90px; - - display: flex; - justify-content: center; - align-content: center; - flex-direction: column; - - transition: color 0.5s, background-color 0.5s; -} - -.nav-chapters:hover { - text-decoration: none; - background-color: var(--theme-hover); - transition: background-color 0.15s, color 0.15s; -} - -.nav-wrapper { - margin-block-start: 50px; - display: none; -} - -.mobile-nav-chapters { - font-size: 2.5em; - text-align: center; - text-decoration: none; - width: 90px; - border-radius: 5px; - background-color: var(--sidebar-bg); -} - -/* Only Firefox supports flow-relative values */ -.previous { float: left; } -[dir=rtl] .previous { float: right; } - -/* Only Firefox supports flow-relative values */ -.next { - float: right; - right: var(--page-padding); -} -[dir=rtl] .next { - float: left; - right: unset; - left: var(--page-padding); -} - -/* Use the correct buttons for RTL layouts*/ -[dir=rtl] .previous i.fa-angle-left:before {content:"\f105";} -[dir=rtl] .next i.fa-angle-right:before { content:"\f104"; } - -@media only screen and (max-width: 1080px) { - .nav-wide-wrapper { display: none; } - .nav-wrapper { display: block; } -} - -/* sidebar-visible */ -@media only screen and (max-width: 1380px) { - #sidebar-toggle-anchor:checked ~ .page-wrapper .nav-wide-wrapper { display: none; } - #sidebar-toggle-anchor:checked ~ .page-wrapper .nav-wrapper { display: block; } -} - -/* Inline code */ - -:not(pre) > .hljs { - display: inline; - padding: 0.1em 0.3em; - border-radius: 3px; -} - -:not(pre):not(a) > .hljs { - color: var(--inline-code-color); - overflow-x: initial; -} - -a:hover > .hljs { - text-decoration: underline; -} - -pre { - position: relative; -} -pre > .buttons { - position: absolute; - z-index: 100; - right: 0px; - top: 2px; - margin: 0px; - padding: 2px 0px; - - color: var(--sidebar-fg); - cursor: pointer; - visibility: hidden; - opacity: 0; - transition: visibility 0.1s linear, opacity 0.1s linear; -} -pre:hover > .buttons { - visibility: visible; - opacity: 1 -} -pre > .buttons :hover { - color: var(--sidebar-active); - border-color: var(--icons-hover); - background-color: var(--theme-hover); -} -pre > .buttons i { - margin-inline-start: 8px; -} -pre > .buttons button { - cursor: inherit; - margin: 0px 5px; - padding: 3px 5px; - font-size: 14px; - - border-style: solid; - border-width: 1px; - border-radius: 4px; - border-color: var(--icons); - background-color: var(--theme-popup-bg); - transition: 100ms; - transition-property: color,border-color,background-color; - color: var(--icons); -} -@media (pointer: coarse) { - pre > .buttons button { - /* On mobile, make it easier to tap buttons. */ - padding: 0.3rem 1rem; - } - - .sidebar-resize-indicator { - /* Hide resize indicator on devices with limited accuracy */ - display: none; - } -} -pre > code { - display: block; - padding: 1rem; -} - -/* FIXME: ACE editors overlap their buttons because ACE does absolute - positioning within the code block which breaks padding. The only solution I - can think of is to move the padding to the outer pre tag (or insert a div - wrapper), but that would require fixing a whole bunch of CSS rules. -*/ -.hljs.ace_editor { - padding: 0rem 0rem; -} - -pre > .result { - margin-block-start: 10px; -} - -/* Search */ - -#searchresults a { - text-decoration: none; -} - -mark { - border-radius: 2px; - padding-block-start: 0; - padding-block-end: 1px; - padding-inline-start: 3px; - padding-inline-end: 3px; - margin-block-start: 0; - margin-block-end: -1px; - margin-inline-start: -3px; - margin-inline-end: -3px; - background-color: var(--search-mark-bg); - transition: background-color 300ms linear; - cursor: pointer; -} - -mark.fade-out { - background-color: rgba(0,0,0,0) !important; - cursor: auto; -} - -.searchbar-outer { - margin-inline-start: auto; - margin-inline-end: auto; - max-width: var(--content-max-width); -} - -#searchbar { - width: 100%; - margin-block-start: 5px; - margin-block-end: 0; - margin-inline-start: auto; - margin-inline-end: auto; - padding: 10px 16px; - transition: box-shadow 300ms ease-in-out; - border: 1px solid var(--searchbar-border-color); - border-radius: 3px; - background-color: var(--searchbar-bg); - color: var(--searchbar-fg); -} -#searchbar:focus, -#searchbar.active { - box-shadow: 0 0 3px var(--searchbar-shadow-color); -} - -.searchresults-header { - font-weight: bold; - font-size: 1em; - padding-block-start: 18px; - padding-block-end: 0; - padding-inline-start: 5px; - padding-inline-end: 0; - color: var(--searchresults-header-fg); -} - -.searchresults-outer { - margin-inline-start: auto; - margin-inline-end: auto; - max-width: var(--content-max-width); - border-block-end: 1px dashed var(--searchresults-border-color); -} - -ul#searchresults { - list-style: none; - padding-inline-start: 20px; -} -ul#searchresults li { - margin: 10px 0px; - padding: 2px; - border-radius: 2px; -} -ul#searchresults li.focus { - background-color: var(--searchresults-li-bg); -} -ul#searchresults span.teaser { - display: block; - clear: both; - margin-block-start: 5px; - margin-block-end: 0; - margin-inline-start: 20px; - margin-inline-end: 0; - font-size: 0.8em; -} -ul#searchresults span.teaser em { - font-weight: bold; - font-style: normal; -} - -/* Sidebar */ - -.sidebar { - position: fixed; - left: 0; - top: 0; - bottom: 0; - width: var(--sidebar-width); - font-size: 0.875em; - box-sizing: border-box; - -webkit-overflow-scrolling: touch; - overscroll-behavior-y: contain; - background-color: var(--sidebar-bg); - color: var(--sidebar-fg); -} -[dir=rtl] .sidebar { left: unset; right: 0; } -.sidebar-resizing { - -moz-user-select: none; - -webkit-user-select: none; - -ms-user-select: none; - user-select: none; -} -.no-js .sidebar, -.js:not(.sidebar-resizing) .sidebar { - transition: transform 0.3s; /* Animation: slide away */ -} -.sidebar code { - line-height: 2em; -} -.sidebar .sidebar-scrollbox { - overflow-y: auto; - position: absolute; - top: 0; - bottom: 0; - left: 0; - right: 0; - padding: 10px 10px; -} -.sidebar .sidebar-resize-handle { - position: absolute; - cursor: col-resize; - width: 0; - right: calc(var(--sidebar-resize-indicator-width) * -1); - top: 0; - bottom: 0; - display: flex; - align-items: center; -} - -.sidebar-resize-handle .sidebar-resize-indicator { - width: 100%; - height: 12px; - background-color: var(--icons); - margin-inline-start: var(--sidebar-resize-indicator-space); -} - -[dir=rtl] .sidebar .sidebar-resize-handle { - left: calc(var(--sidebar-resize-indicator-width) * -1); - right: unset; -} -.js .sidebar .sidebar-resize-handle { - cursor: col-resize; - width: calc(var(--sidebar-resize-indicator-width) - var(--sidebar-resize-indicator-space)); -} -/* sidebar-hidden */ -#sidebar-toggle-anchor:not(:checked) ~ .sidebar { - transform: translateX(calc(0px - var(--sidebar-width) - var(--sidebar-resize-indicator-width))); - z-index: -1; -} -[dir=rtl] #sidebar-toggle-anchor:not(:checked) ~ .sidebar { - transform: translateX(calc(var(--sidebar-width) + var(--sidebar-resize-indicator-width))); -} -.sidebar::-webkit-scrollbar { - background: var(--sidebar-bg); -} -.sidebar::-webkit-scrollbar-thumb { - background: var(--scrollbar); -} - -/* sidebar-visible */ -#sidebar-toggle-anchor:checked ~ .page-wrapper { - transform: translateX(calc(var(--sidebar-width) + var(--sidebar-resize-indicator-width))); -} -[dir=rtl] #sidebar-toggle-anchor:checked ~ .page-wrapper { - transform: translateX(calc(0px - var(--sidebar-width) - var(--sidebar-resize-indicator-width))); -} -@media only screen and (min-width: 620px) { - #sidebar-toggle-anchor:checked ~ .page-wrapper { - transform: none; - margin-inline-start: calc(var(--sidebar-width) + var(--sidebar-resize-indicator-width)); - } - [dir=rtl] #sidebar-toggle-anchor:checked ~ .page-wrapper { - transform: none; - } -} - -.chapter { - list-style: none outside none; - padding-inline-start: 0; - line-height: 2.2em; -} - -.chapter ol { - width: 100%; -} - -.chapter li { - display: flex; - color: var(--sidebar-non-existant); -} -.chapter li a { - display: block; - padding: 0; - text-decoration: none; - color: var(--sidebar-fg); -} - -.chapter li a:hover { - color: var(--sidebar-active); -} - -.chapter li a.active { - color: var(--sidebar-active); -} - -.chapter li > a.toggle { - cursor: pointer; - display: block; - margin-inline-start: auto; - padding: 0 10px; - user-select: none; - opacity: 0.68; -} - -.chapter li > a.toggle div { - transition: transform 0.5s; -} - -/* collapse the section */ -.chapter li:not(.expanded) + li > ol { - display: none; -} - -.chapter li.chapter-item { - line-height: 1.5em; - margin-block-start: 0.6em; -} - -.chapter li.expanded > a.toggle div { - transform: rotate(90deg); -} - -.spacer { - width: 100%; - height: 3px; - margin: 5px 0px; -} -.chapter .spacer { - background-color: var(--sidebar-spacer); -} - -@media (-moz-touch-enabled: 1), (pointer: coarse) { - .chapter li a { padding: 5px 0; } - .spacer { margin: 10px 0; } -} - -.section { - list-style: none outside none; - padding-inline-start: 20px; - line-height: 1.9em; -} - -/* Theme Menu Popup */ - -.theme-popup { - position: absolute; - left: 10px; - top: var(--menu-bar-height); - z-index: 1000; - border-radius: 4px; - font-size: 0.7em; - color: var(--fg); - background: var(--theme-popup-bg); - border: 1px solid var(--theme-popup-border); - margin: 0; - padding: 0; - list-style: none; - display: none; - /* Don't let the children's background extend past the rounded corners. */ - overflow: hidden; -} -[dir=rtl] .theme-popup { left: unset; right: 10px; } -.theme-popup .default { - color: var(--icons); -} -.theme-popup .theme { - width: 100%; - border: 0; - margin: 0; - padding: 2px 20px; - line-height: 25px; - white-space: nowrap; - text-align: start; - cursor: pointer; - color: inherit; - background: inherit; - font-size: inherit; -} -.theme-popup .theme:hover { - background-color: var(--theme-hover); -} - -.theme-selected::before { - display: inline-block; - content: "✓"; - margin-inline-start: -14px; - width: 14px; -} diff --git a/book/theme/css/general.css b/book/theme/css/general.css deleted file mode 100644 index e7d20da72..000000000 --- a/book/theme/css/general.css +++ /dev/null @@ -1,234 +0,0 @@ -/* Base styles and content styles */ - -@import 'variables.css'; - -:root { - /* Browser default font-size is 16px, this way 1 rem = 10px */ - font-size: 62.5%; - color-scheme: var(--color-scheme); -} - -html { - font-family: "Open Sans", sans-serif; - color: var(--fg); - background-color: var(--bg); - text-size-adjust: none; - -webkit-text-size-adjust: none; -} - -body { - margin: 0; - font-size: 1.6rem; - overflow-x: hidden; -} - -code { - font-family: var(--mono-font) !important; - font-size: var(--code-font-size); - direction: ltr !important; -} - -/* make long words/inline code not x overflow */ -main { - overflow-wrap: break-word; -} - -/* make wide tables scroll if they overflow */ -.table-wrapper { - overflow-x: auto; -} - -/* Don't change font size in headers. */ -h1 code, h2 code, h3 code, h4 code, h5 code, h6 code { - font-size: unset; -} - -.left { float: left; } -.right { float: right; } -.boring { opacity: 0.6; } -.hide-boring .boring { display: none; } -.hidden { display: none !important; } - -h2, h3 { margin-block-start: 2.5em; } -h4, h5 { margin-block-start: 2em; } - -.header + .header h3, -.header + .header h4, -.header + .header h5 { - margin-block-start: 1em; -} - -h1:target::before, -h2:target::before, -h3:target::before, -h4:target::before, -h5:target::before, -h6:target::before { - display: inline-block; - content: "»"; - margin-inline-start: -30px; - width: 30px; -} - -/* This is broken on Safari as of version 14, but is fixed - in Safari Technology Preview 117 which I think will be Safari 14.2. - https://bugs.webkit.org/show_bug.cgi?id=218076 -*/ -:target { - /* Safari does not support logical properties */ - scroll-margin-top: calc(var(--menu-bar-height) + 0.5em); -} - -.page { - outline: 0; - padding: 0 var(--page-padding); - margin-block-start: calc(0px - var(--menu-bar-height)); /* Compensate for the #menu-bar-hover-placeholder */ -} -.page-wrapper { - box-sizing: border-box; - background-color: var(--bg); -} -.no-js .page-wrapper, -.js:not(.sidebar-resizing) .page-wrapper { - transition: margin-left 0.3s ease, transform 0.3s ease; /* Animation: slide away */ -} -[dir=rtl] .js:not(.sidebar-resizing) .page-wrapper { - transition: margin-right 0.3s ease, transform 0.3s ease; /* Animation: slide away */ -} - -.content { - overflow-y: auto; - padding: 0 5px 50px 5px; -} -.content main { - margin-inline-start: auto; - margin-inline-end: auto; - max-width: var(--content-max-width); -} -.content p { line-height: 1.45em; } -.content ol { line-height: 1.45em; } -.content ul { line-height: 1.45em; } -.content a { text-decoration: none; } -.content a:hover { text-decoration: underline; } -.content img, .content video { max-width: 100%; } -.content .header:link, -.content .header:visited { - color: var(--fg); -} -.content .header:link, -.content .header:visited:hover { - text-decoration: none; -} - -table { - margin: 0 auto; - border-collapse: collapse; -} -table td { - padding: 3px 20px; - border: 1px var(--table-border-color) solid; -} -table thead { - background: var(--table-header-bg); -} -table thead td { - font-weight: 700; - border: none; -} -table thead th { - padding: 3px 20px; -} -table thead tr { - border: 1px var(--table-header-bg) solid; -} -/* Alternate background colors for rows */ -table tbody tr:nth-child(2n) { - background: var(--table-alternate-bg); -} - - -blockquote { - margin: 20px 0; - padding: 0 20px; - color: var(--fg); - background-color: var(--quote-bg); - border-block-start: .1em solid var(--quote-border); - border-block-end: .1em solid var(--quote-border); -} - -.warning { - margin: 20px; - padding: 0 20px; - border-inline-start: 2px solid var(--warning-border); -} - -.warning:before { - position: absolute; - width: 3rem; - height: 3rem; - margin-inline-start: calc(-1.5rem - 21px); - content: "ⓘ"; - text-align: center; - background-color: var(--bg); - color: var(--warning-border); - font-weight: bold; - font-size: 2rem; -} - -blockquote .warning:before { - background-color: var(--quote-bg); -} - -kbd { - background-color: var(--table-border-color); - border-radius: 4px; - border: solid 1px var(--theme-popup-border); - box-shadow: inset 0 -1px 0 var(--theme-hover); - display: inline-block; - font-size: var(--code-font-size); - font-family: var(--mono-font); - line-height: 10px; - padding: 4px 5px; - vertical-align: middle; -} - -:not(.footnote-definition) + .footnote-definition, -.footnote-definition + :not(.footnote-definition) { - margin-block-start: 2em; -} -.footnote-definition { - font-size: 0.9em; - margin: 0.5em 0; -} -.footnote-definition p { - display: inline; -} - -.tooltiptext { - position: absolute; - visibility: hidden; - color: #fff; - background-color: #333; - transform: translateX(-50%); /* Center by moving tooltip 50% of its width left */ - left: -8px; /* Half of the width of the icon */ - top: -35px; - font-size: 0.8em; - text-align: center; - border-radius: 6px; - padding: 5px 8px; - margin: 5px; - z-index: 1000; -} -.tooltipped .tooltiptext { - visibility: visible; -} - -.chapter li.part-title { - color: var(--sidebar-fg); - margin: 5px 0px; - font-weight: bold; -} - -.result-no-output { - font-style: italic; -} diff --git a/book/theme/css/print.css b/book/theme/css/print.css deleted file mode 100644 index 80ec3a544..000000000 --- a/book/theme/css/print.css +++ /dev/null @@ -1,50 +0,0 @@ - -#sidebar, -#menu-bar, -.nav-chapters, -.mobile-nav-chapters { - display: none; -} - -#page-wrapper.page-wrapper { - transform: none !important; - margin-inline-start: 0px; - overflow-y: initial; -} - -#content { - max-width: none; - margin: 0; - padding: 0; -} - -.page { - overflow-y: initial; -} - -code { - direction: ltr !important; -} - -pre > .buttons { - z-index: 2; -} - -a, a:visited, a:active, a:hover { - color: #4183c4; - text-decoration: none; -} - -h1, h2, h3, h4, h5, h6 { - page-break-inside: avoid; - page-break-after: avoid; -} - -pre, code { - page-break-inside: avoid; - white-space: pre-wrap; -} - -.fa { - display: none !important; -} diff --git a/book/theme/css/variables.css b/book/theme/css/variables.css deleted file mode 100644 index 0da55e8c9..000000000 --- a/book/theme/css/variables.css +++ /dev/null @@ -1,279 +0,0 @@ - -/* Globals */ - -:root { - --sidebar-width: 300px; - --sidebar-resize-indicator-width: 8px; - --sidebar-resize-indicator-space: 2px; - --page-padding: 15px; - --content-max-width: 750px; - --menu-bar-height: 50px; - --mono-font: "Source Code Pro", Consolas, "Ubuntu Mono", Menlo, "DejaVu Sans Mono", monospace, monospace; - --code-font-size: 0.875em /* please adjust the ace font size accordingly in editor.js */ -} - -/* Themes */ - -.ayu { - --bg: hsl(210, 25%, 8%); - --fg: #c5c5c5; - - --sidebar-bg: #14191f; - --sidebar-fg: #c8c9db; - --sidebar-non-existant: #5c6773; - --sidebar-active: #ffb454; - --sidebar-spacer: #2d334f; - - --scrollbar: var(--sidebar-fg); - - --icons: #737480; - --icons-hover: #b7b9cc; - - --links: #0096cf; - - --inline-code-color: #ffb454; - - --theme-popup-bg: #14191f; - --theme-popup-border: #5c6773; - --theme-hover: #191f26; - - --quote-bg: hsl(226, 15%, 17%); - --quote-border: hsl(226, 15%, 22%); - - --warning-border: #ff8e00; - - --table-border-color: hsl(210, 25%, 13%); - --table-header-bg: hsl(210, 25%, 28%); - --table-alternate-bg: hsl(210, 25%, 11%); - - --searchbar-border-color: #848484; - --searchbar-bg: #424242; - --searchbar-fg: #fff; - --searchbar-shadow-color: #d4c89f; - --searchresults-header-fg: #666; - --searchresults-border-color: #888; - --searchresults-li-bg: #252932; - --search-mark-bg: #e3b171; - - --color-scheme: dark; -} - -.coal { - --bg: hsl(200, 7%, 8%); - --fg: #98a3ad; - - --sidebar-bg: #292c2f; - --sidebar-fg: #a1adb8; - --sidebar-non-existant: #505254; - --sidebar-active: #3473ad; - --sidebar-spacer: #393939; - - --scrollbar: var(--sidebar-fg); - - --icons: #43484d; - --icons-hover: #b3c0cc; - - --links: #2b79a2; - - --inline-code-color: #c5c8c6; - - --theme-popup-bg: #141617; - --theme-popup-border: #43484d; - --theme-hover: #1f2124; - - --quote-bg: hsl(234, 21%, 18%); - --quote-border: hsl(234, 21%, 23%); - - --warning-border: #ff8e00; - - --table-border-color: hsl(200, 7%, 13%); - --table-header-bg: hsl(200, 7%, 28%); - --table-alternate-bg: hsl(200, 7%, 11%); - - --searchbar-border-color: #aaa; - --searchbar-bg: #b7b7b7; - --searchbar-fg: #000; - --searchbar-shadow-color: #aaa; - --searchresults-header-fg: #666; - --searchresults-border-color: #98a3ad; - --searchresults-li-bg: #2b2b2f; - --search-mark-bg: #355c7d; - - --color-scheme: dark; -} - -.light { - --bg: hsl(0, 0%, 100%); - --fg: hsl(0, 0%, 0%); - - --sidebar-bg: #fafafa; - --sidebar-fg: hsl(0, 0%, 0%); - --sidebar-non-existant: #aaaaaa; - --sidebar-active: #1f1fff; - --sidebar-spacer: #f4f4f4; - - --scrollbar: #8F8F8F; - - --icons: #747474; - --icons-hover: #000000; - - --links: #20609f; - - --inline-code-color: #301900; - - --theme-popup-bg: #fafafa; - --theme-popup-border: #cccccc; - --theme-hover: #e6e6e6; - - --quote-bg: hsl(197, 37%, 96%); - --quote-border: hsl(197, 37%, 91%); - - --warning-border: #ff8e00; - - --table-border-color: hsl(0, 0%, 95%); - --table-header-bg: hsl(0, 0%, 80%); - --table-alternate-bg: hsl(0, 0%, 97%); - - --searchbar-border-color: #aaa; - --searchbar-bg: #fafafa; - --searchbar-fg: #000; - --searchbar-shadow-color: #aaa; - --searchresults-header-fg: #666; - --searchresults-border-color: #888; - --searchresults-li-bg: #e4f2fe; - --search-mark-bg: #a2cff5; - - --color-scheme: light; -} - -.navy { - --bg: hsl(226, 23%, 11%); - --fg: #bcbdd0; - - --sidebar-bg: #282d3f; - --sidebar-fg: #c8c9db; - --sidebar-non-existant: #505274; - --sidebar-active: #2b79a2; - --sidebar-spacer: #2d334f; - - --scrollbar: var(--sidebar-fg); - - --icons: #737480; - --icons-hover: #b7b9cc; - - --links: #2b79a2; - - --inline-code-color: #c5c8c6; - - --theme-popup-bg: #161923; - --theme-popup-border: #737480; - --theme-hover: #282e40; - - --quote-bg: hsl(226, 15%, 17%); - --quote-border: hsl(226, 15%, 22%); - - --warning-border: #ff8e00; - - --table-border-color: hsl(226, 23%, 16%); - --table-header-bg: hsl(226, 23%, 31%); - --table-alternate-bg: hsl(226, 23%, 14%); - - --searchbar-border-color: #aaa; - --searchbar-bg: #aeaec6; - --searchbar-fg: #000; - --searchbar-shadow-color: #aaa; - --searchresults-header-fg: #5f5f71; - --searchresults-border-color: #5c5c68; - --searchresults-li-bg: #242430; - --search-mark-bg: #a2cff5; - - --color-scheme: dark; -} - -.rust { - --bg: hsl(60, 9%, 87%); - --fg: #262625; - - --sidebar-bg: #3b2e2a; - --sidebar-fg: #c8c9db; - --sidebar-non-existant: #505254; - --sidebar-active: #e69f67; - --sidebar-spacer: #45373a; - - --scrollbar: var(--sidebar-fg); - - --icons: #737480; - --icons-hover: #262625; - - --links: #2b79a2; - - --inline-code-color: #6e6b5e; - - --theme-popup-bg: #e1e1db; - --theme-popup-border: #b38f6b; - --theme-hover: #99908a; - - --quote-bg: hsl(60, 5%, 75%); - --quote-border: hsl(60, 5%, 70%); - - --warning-border: #ff8e00; - - --table-border-color: hsl(60, 9%, 82%); - --table-header-bg: #b3a497; - --table-alternate-bg: hsl(60, 9%, 84%); - - --searchbar-border-color: #aaa; - --searchbar-bg: #fafafa; - --searchbar-fg: #000; - --searchbar-shadow-color: #aaa; - --searchresults-header-fg: #666; - --searchresults-border-color: #888; - --searchresults-li-bg: #dec2a2; - --search-mark-bg: #e69f67; - - --color-scheme: light; -} - -@media (prefers-color-scheme: dark) { - .light.no-js { - --bg: hsl(200, 7%, 8%); - --fg: #98a3ad; - - --sidebar-bg: #292c2f; - --sidebar-fg: #a1adb8; - --sidebar-non-existant: #505254; - --sidebar-active: #3473ad; - --sidebar-spacer: #393939; - - --scrollbar: var(--sidebar-fg); - - --icons: #43484d; - --icons-hover: #b3c0cc; - - --links: #2b79a2; - - --inline-code-color: #c5c8c6; - - --theme-popup-bg: #141617; - --theme-popup-border: #43484d; - --theme-hover: #1f2124; - - --quote-bg: hsl(234, 21%, 18%); - --quote-border: hsl(234, 21%, 23%); - - --warning-border: #ff8e00; - - --table-border-color: hsl(200, 7%, 13%); - --table-header-bg: hsl(200, 7%, 28%); - --table-alternate-bg: hsl(200, 7%, 11%); - - --searchbar-border-color: #aaa; - --searchbar-bg: #b7b7b7; - --searchbar-fg: #000; - --searchbar-shadow-color: #aaa; - --searchresults-header-fg: #666; - --searchresults-border-color: #98a3ad; - --searchresults-li-bg: #2b2b2f; - --search-mark-bg: #355c7d; - } -} diff --git a/book/theme/favicon.png b/book/theme/favicon.png deleted file mode 100644 index a5b1aa16c..000000000 Binary files a/book/theme/favicon.png and /dev/null differ diff --git a/book/theme/favicon.svg b/book/theme/favicon.svg deleted file mode 100644 index 90e0ea58b..000000000 --- a/book/theme/favicon.svg +++ /dev/null @@ -1,22 +0,0 @@ - - - - - diff --git a/book/theme/fonts/OPEN-SANS-LICENSE.txt b/book/theme/fonts/OPEN-SANS-LICENSE.txt deleted file mode 100644 index d64569567..000000000 --- a/book/theme/fonts/OPEN-SANS-LICENSE.txt +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/book/theme/fonts/SOURCE-CODE-PRO-LICENSE.txt b/book/theme/fonts/SOURCE-CODE-PRO-LICENSE.txt deleted file mode 100644 index 366206f54..000000000 --- a/book/theme/fonts/SOURCE-CODE-PRO-LICENSE.txt +++ /dev/null @@ -1,93 +0,0 @@ -Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries. - -This Font Software is licensed under the SIL Open Font License, Version 1.1. -This license is copied below, and is also available with a FAQ at: -http://scripts.sil.org/OFL - - ------------------------------------------------------------ -SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ------------------------------------------------------------ - -PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide -development of collaborative font projects, to support the font creation -efforts of academic and linguistic communities, and to provide a free and -open framework in which fonts may be shared and improved in partnership -with others. - -The OFL allows the licensed fonts to be used, studied, modified and -redistributed freely as long as they are not sold by themselves. The -fonts, including any derivative works, can be bundled, embedded, -redistributed and/or sold with any software provided that any reserved -names are not used by derivative works. The fonts and derivatives, -however, cannot be released under any other type of license. The -requirement for fonts to remain under this license does not apply -to any document created using the fonts or their derivatives. - -DEFINITIONS -"Font Software" refers to the set of files released by the Copyright -Holder(s) under this license and clearly marked as such. This may -include source files, build scripts and documentation. - -"Reserved Font Name" refers to any names specified as such after the -copyright statement(s). - -"Original Version" refers to the collection of Font Software components as -distributed by the Copyright Holder(s). - -"Modified Version" refers to any derivative made by adding to, deleting, -or substituting -- in part or in whole -- any of the components of the -Original Version, by changing formats or by porting the Font Software to a -new environment. - -"Author" refers to any designer, engineer, programmer, technical -writer or other person who contributed to the Font Software. - -PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Font Software, to use, study, copy, merge, embed, modify, -redistribute, and sell modified and unmodified copies of the Font -Software, subject to the following conditions: - -1) Neither the Font Software nor any of its individual components, -in Original or Modified Versions, may be sold by itself. - -2) Original or Modified Versions of the Font Software may be bundled, -redistributed and/or sold with any software, provided that each copy -contains the above copyright notice and this license. These can be -included either as stand-alone text files, human-readable headers or -in the appropriate machine-readable metadata fields within text or -binary files as long as those fields can be easily viewed by the user. - -3) No Modified Version of the Font Software may use the Reserved Font -Name(s) unless explicit written permission is granted by the corresponding -Copyright Holder. This restriction only applies to the primary font name as -presented to the users. - -4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font -Software shall not be used to promote, endorse or advertise any -Modified Version, except to acknowledge the contribution(s) of the -Copyright Holder(s) and the Author(s) or with their explicit written -permission. - -5) The Font Software, modified or unmodified, in part or in whole, -must be distributed entirely under this license, and must not be -distributed under any other license. The requirement for fonts to -remain under this license does not apply to any document created -using the Font Software. - -TERMINATION -This license becomes null and void if any of the above conditions are -not met. - -DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM -OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/book/theme/fonts/fonts.css b/book/theme/fonts/fonts.css deleted file mode 100644 index 858efa598..000000000 --- a/book/theme/fonts/fonts.css +++ /dev/null @@ -1,100 +0,0 @@ -/* Open Sans is licensed under the Apache License, Version 2.0. See http://www.apache.org/licenses/LICENSE-2.0 */ -/* Source Code Pro is under the Open Font License. See https://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL */ - -/* open-sans-300 - latin_vietnamese_latin-ext_greek-ext_greek_cyrillic-ext_cyrillic */ -@font-face { - font-family: 'Open Sans'; - font-style: normal; - font-weight: 300; - src: local('Open Sans Light'), local('OpenSans-Light'), - url('open-sans-v17-all-charsets-300.woff2') format('woff2'); -} - -/* open-sans-300italic - latin_vietnamese_latin-ext_greek-ext_greek_cyrillic-ext_cyrillic */ -@font-face { - font-family: 'Open Sans'; - font-style: italic; - font-weight: 300; - src: local('Open Sans Light Italic'), local('OpenSans-LightItalic'), - url('open-sans-v17-all-charsets-300italic.woff2') format('woff2'); -} - -/* open-sans-regular - latin_vietnamese_latin-ext_greek-ext_greek_cyrillic-ext_cyrillic */ -@font-face { - font-family: 'Open Sans'; - font-style: normal; - font-weight: 400; - src: local('Open Sans Regular'), local('OpenSans-Regular'), - url('open-sans-v17-all-charsets-regular.woff2') format('woff2'); -} - -/* open-sans-italic - latin_vietnamese_latin-ext_greek-ext_greek_cyrillic-ext_cyrillic */ -@font-face { - font-family: 'Open Sans'; - font-style: italic; - font-weight: 400; - src: local('Open Sans Italic'), local('OpenSans-Italic'), - url('open-sans-v17-all-charsets-italic.woff2') format('woff2'); -} - -/* open-sans-600 - latin_vietnamese_latin-ext_greek-ext_greek_cyrillic-ext_cyrillic */ -@font-face { - font-family: 'Open Sans'; - font-style: normal; - font-weight: 600; - src: local('Open Sans SemiBold'), local('OpenSans-SemiBold'), - url('open-sans-v17-all-charsets-600.woff2') format('woff2'); -} - -/* open-sans-600italic - latin_vietnamese_latin-ext_greek-ext_greek_cyrillic-ext_cyrillic */ -@font-face { - font-family: 'Open Sans'; - font-style: italic; - font-weight: 600; - src: local('Open Sans SemiBold Italic'), local('OpenSans-SemiBoldItalic'), - url('open-sans-v17-all-charsets-600italic.woff2') format('woff2'); -} - -/* open-sans-700 - latin_vietnamese_latin-ext_greek-ext_greek_cyrillic-ext_cyrillic */ -@font-face { - font-family: 'Open Sans'; - font-style: normal; - font-weight: 700; - src: local('Open Sans Bold'), local('OpenSans-Bold'), - url('open-sans-v17-all-charsets-700.woff2') format('woff2'); -} - -/* open-sans-700italic - latin_vietnamese_latin-ext_greek-ext_greek_cyrillic-ext_cyrillic */ -@font-face { - font-family: 'Open Sans'; - font-style: italic; - font-weight: 700; - src: local('Open Sans Bold Italic'), local('OpenSans-BoldItalic'), - url('open-sans-v17-all-charsets-700italic.woff2') format('woff2'); -} - -/* open-sans-800 - latin_vietnamese_latin-ext_greek-ext_greek_cyrillic-ext_cyrillic */ -@font-face { - font-family: 'Open Sans'; - font-style: normal; - font-weight: 800; - src: local('Open Sans ExtraBold'), local('OpenSans-ExtraBold'), - url('open-sans-v17-all-charsets-800.woff2') format('woff2'); -} - -/* open-sans-800italic - latin_vietnamese_latin-ext_greek-ext_greek_cyrillic-ext_cyrillic */ -@font-face { - font-family: 'Open Sans'; - font-style: italic; - font-weight: 800; - src: local('Open Sans ExtraBold Italic'), local('OpenSans-ExtraBoldItalic'), - url('open-sans-v17-all-charsets-800italic.woff2') format('woff2'); -} - -/* source-code-pro-500 - latin_vietnamese_latin-ext_greek_cyrillic-ext_cyrillic */ -@font-face { - font-family: 'Source Code Pro'; - font-style: normal; - font-weight: 500; - src: url('source-code-pro-v11-all-charsets-500.woff2') format('woff2'); -} diff --git a/book/theme/fonts/open-sans-v17-all-charsets-300.woff2 b/book/theme/fonts/open-sans-v17-all-charsets-300.woff2 deleted file mode 100644 index 9f51be370..000000000 Binary files a/book/theme/fonts/open-sans-v17-all-charsets-300.woff2 and /dev/null differ diff --git a/book/theme/fonts/open-sans-v17-all-charsets-300italic.woff2 b/book/theme/fonts/open-sans-v17-all-charsets-300italic.woff2 deleted file mode 100644 index 2f5454484..000000000 Binary files a/book/theme/fonts/open-sans-v17-all-charsets-300italic.woff2 and /dev/null differ diff --git a/book/theme/fonts/open-sans-v17-all-charsets-600.woff2 b/book/theme/fonts/open-sans-v17-all-charsets-600.woff2 deleted file mode 100644 index f503d558d..000000000 Binary files a/book/theme/fonts/open-sans-v17-all-charsets-600.woff2 and /dev/null differ diff --git a/book/theme/fonts/open-sans-v17-all-charsets-600italic.woff2 b/book/theme/fonts/open-sans-v17-all-charsets-600italic.woff2 deleted file mode 100644 index c99aabe80..000000000 Binary files a/book/theme/fonts/open-sans-v17-all-charsets-600italic.woff2 and /dev/null differ diff --git a/book/theme/fonts/open-sans-v17-all-charsets-700.woff2 b/book/theme/fonts/open-sans-v17-all-charsets-700.woff2 deleted file mode 100644 index 421a1ab25..000000000 Binary files a/book/theme/fonts/open-sans-v17-all-charsets-700.woff2 and /dev/null differ diff --git a/book/theme/fonts/open-sans-v17-all-charsets-700italic.woff2 b/book/theme/fonts/open-sans-v17-all-charsets-700italic.woff2 deleted file mode 100644 index 12ce3d20d..000000000 Binary files a/book/theme/fonts/open-sans-v17-all-charsets-700italic.woff2 and /dev/null differ diff --git a/book/theme/fonts/open-sans-v17-all-charsets-800.woff2 b/book/theme/fonts/open-sans-v17-all-charsets-800.woff2 deleted file mode 100644 index c94a223b0..000000000 Binary files a/book/theme/fonts/open-sans-v17-all-charsets-800.woff2 and /dev/null differ diff --git a/book/theme/fonts/open-sans-v17-all-charsets-800italic.woff2 b/book/theme/fonts/open-sans-v17-all-charsets-800italic.woff2 deleted file mode 100644 index eed7d3c63..000000000 Binary files a/book/theme/fonts/open-sans-v17-all-charsets-800italic.woff2 and /dev/null differ diff --git a/book/theme/fonts/open-sans-v17-all-charsets-italic.woff2 b/book/theme/fonts/open-sans-v17-all-charsets-italic.woff2 deleted file mode 100644 index 398b68a08..000000000 Binary files a/book/theme/fonts/open-sans-v17-all-charsets-italic.woff2 and /dev/null differ diff --git a/book/theme/fonts/open-sans-v17-all-charsets-regular.woff2 b/book/theme/fonts/open-sans-v17-all-charsets-regular.woff2 deleted file mode 100644 index 8383e94c6..000000000 Binary files a/book/theme/fonts/open-sans-v17-all-charsets-regular.woff2 and /dev/null differ diff --git a/book/theme/fonts/source-code-pro-v11-all-charsets-500.woff2 b/book/theme/fonts/source-code-pro-v11-all-charsets-500.woff2 deleted file mode 100644 index 722245682..000000000 Binary files a/book/theme/fonts/source-code-pro-v11-all-charsets-500.woff2 and /dev/null differ diff --git a/book/theme/highlight.css b/book/theme/highlight.css deleted file mode 100644 index ba57b82b2..000000000 --- a/book/theme/highlight.css +++ /dev/null @@ -1,82 +0,0 @@ -/* - * An increased contrast highlighting scheme loosely based on the - * "Base16 Atelier Dune Light" theme by Bram de Haan - * (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune) - * Original Base16 color scheme by Chris Kempson - * (https://github.com/chriskempson/base16) - */ - -/* Comment */ -.hljs-comment, -.hljs-quote { - color: #575757; -} - -/* Red */ -.hljs-variable, -.hljs-template-variable, -.hljs-attribute, -.hljs-tag, -.hljs-name, -.hljs-regexp, -.hljs-link, -.hljs-name, -.hljs-selector-id, -.hljs-selector-class { - color: #d70025; -} - -/* Orange */ -.hljs-number, -.hljs-meta, -.hljs-built_in, -.hljs-builtin-name, -.hljs-literal, -.hljs-type, -.hljs-params { - color: #b21e00; -} - -/* Green */ -.hljs-string, -.hljs-symbol, -.hljs-bullet { - color: #008200; -} - -/* Blue */ -.hljs-title, -.hljs-section { - color: #0030f2; -} - -/* Purple */ -.hljs-keyword, -.hljs-selector-tag { - color: #9d00ec; -} - -.hljs { - display: block; - overflow-x: auto; - background: #f6f7f6; - color: #000; -} - -.hljs-emphasis { - font-style: italic; -} - -.hljs-strong { - font-weight: bold; -} - -.hljs-addition { - color: #22863a; - background-color: #f0fff4; -} - -.hljs-deletion { - color: #b31d28; - background-color: #ffeef0; -} diff --git a/book/theme/highlight.css.old b/book/theme/highlight.css.old deleted file mode 100644 index ba57b82b2..000000000 --- a/book/theme/highlight.css.old +++ /dev/null @@ -1,82 +0,0 @@ -/* - * An increased contrast highlighting scheme loosely based on the - * "Base16 Atelier Dune Light" theme by Bram de Haan - * (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune) - * Original Base16 color scheme by Chris Kempson - * (https://github.com/chriskempson/base16) - */ - -/* Comment */ -.hljs-comment, -.hljs-quote { - color: #575757; -} - -/* Red */ -.hljs-variable, -.hljs-template-variable, -.hljs-attribute, -.hljs-tag, -.hljs-name, -.hljs-regexp, -.hljs-link, -.hljs-name, -.hljs-selector-id, -.hljs-selector-class { - color: #d70025; -} - -/* Orange */ -.hljs-number, -.hljs-meta, -.hljs-built_in, -.hljs-builtin-name, -.hljs-literal, -.hljs-type, -.hljs-params { - color: #b21e00; -} - -/* Green */ -.hljs-string, -.hljs-symbol, -.hljs-bullet { - color: #008200; -} - -/* Blue */ -.hljs-title, -.hljs-section { - color: #0030f2; -} - -/* Purple */ -.hljs-keyword, -.hljs-selector-tag { - color: #9d00ec; -} - -.hljs { - display: block; - overflow-x: auto; - background: #f6f7f6; - color: #000; -} - -.hljs-emphasis { - font-style: italic; -} - -.hljs-strong { - font-weight: bold; -} - -.hljs-addition { - color: #22863a; - background-color: #f0fff4; -} - -.hljs-deletion { - color: #b31d28; - background-color: #ffeef0; -} diff --git a/book/theme/highlight.js b/book/theme/highlight.js deleted file mode 100644 index 3256c00ed..000000000 --- a/book/theme/highlight.js +++ /dev/null @@ -1,53 +0,0 @@ -/* - Highlight.js 10.1.1 (93fd0d73) - License: BSD-3-Clause - Copyright (c) 2006-2020, Ivan Sagalaev -*/ -var hljs=function(){"use strict";function e(n){Object.freeze(n);var t="function"==typeof n;return Object.getOwnPropertyNames(n).forEach((function(r){!Object.hasOwnProperty.call(n,r)||null===n[r]||"object"!=typeof n[r]&&"function"!=typeof n[r]||t&&("caller"===r||"callee"===r||"arguments"===r)||Object.isFrozen(n[r])||e(n[r])})),n}class n{constructor(e){void 0===e.data&&(e.data={}),this.data=e.data}ignoreMatch(){this.ignore=!0}}function t(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function r(e,...n){var t={};for(const n in e)t[n]=e[n];return n.forEach((function(e){for(const n in e)t[n]=e[n]})),t}function a(e){return e.nodeName.toLowerCase()}var i=Object.freeze({__proto__:null,escapeHTML:t,inherit:r,nodeStream:function(e){var n=[];return function e(t,r){for(var i=t.firstChild;i;i=i.nextSibling)3===i.nodeType?r+=i.nodeValue.length:1===i.nodeType&&(n.push({event:"start",offset:r,node:i}),r=e(i,r),a(i).match(/br|hr|img|input/)||n.push({event:"stop",offset:r,node:i}));return r}(e,0),n},mergeStreams:function(e,n,r){var i=0,s="",o=[];function l(){return e.length&&n.length?e[0].offset!==n[0].offset?e[0].offset"}function u(e){s+=""}function d(e){("start"===e.event?c:u)(e.node)}for(;e.length||n.length;){var g=l();if(s+=t(r.substring(i,g[0].offset)),i=g[0].offset,g===e){o.reverse().forEach(u);do{d(g.splice(0,1)[0]),g=l()}while(g===e&&g.length&&g[0].offset===i);o.reverse().forEach(c)}else"start"===g[0].event?o.push(g[0].node):o.pop(),d(g.splice(0,1)[0])}return s+t(r.substr(i))}});const s="",o=e=>!!e.kind;class l{constructor(e,n){this.buffer="",this.classPrefix=n.classPrefix,e.walk(this)}addText(e){this.buffer+=t(e)}openNode(e){if(!o(e))return;let n=e.kind;e.sublanguage||(n=`${this.classPrefix}${n}`),this.span(n)}closeNode(e){o(e)&&(this.buffer+=s)}value(){return this.buffer}span(e){this.buffer+=``}}class c{constructor(){this.rootNode={children:[]},this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){const n={kind:e,children:[]};this.add(n),this.stack.push(n)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,n){return"string"==typeof n?e.addText(n):n.children&&(e.openNode(n),n.children.forEach(n=>this._walk(e,n)),e.closeNode(n)),e}static _collapse(e){"string"!=typeof e&&e.children&&(e.children.every(e=>"string"==typeof e)?e.children=[e.children.join("")]:e.children.forEach(e=>{c._collapse(e)}))}}class u extends c{constructor(e){super(),this.options=e}addKeyword(e,n){""!==e&&(this.openNode(n),this.addText(e),this.closeNode())}addText(e){""!==e&&this.add(e)}addSublanguage(e,n){const t=e.root;t.kind=n,t.sublanguage=!0,this.add(t)}toHTML(){return new l(this,this.options).value()}finalize(){return!0}}function d(e){return e?"string"==typeof e?e:e.source:null}const g="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",h={begin:"\\\\[\\s\\S]",relevance:0},f={className:"string",begin:"'",end:"'",illegal:"\\n",contains:[h]},p={className:"string",begin:'"',end:'"',illegal:"\\n",contains:[h]},b={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},m=function(e,n,t={}){var a=r({className:"comment",begin:e,end:n,contains:[]},t);return a.contains.push(b),a.contains.push({className:"doctag",begin:"(?:TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):",relevance:0}),a},v=m("//","$"),x=m("/\\*","\\*/"),E=m("#","$");var _=Object.freeze({__proto__:null,IDENT_RE:"[a-zA-Z]\\w*",UNDERSCORE_IDENT_RE:"[a-zA-Z_]\\w*",NUMBER_RE:"\\b\\d+(\\.\\d+)?",C_NUMBER_RE:g,BINARY_NUMBER_RE:"\\b(0b[01]+)",RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",SHEBANG:(e={})=>{const n=/^#![ ]*\//;return e.binary&&(e.begin=function(...e){return e.map(e=>d(e)).join("")}(n,/.*\b/,e.binary,/\b.*/)),r({className:"meta",begin:n,end:/$/,relevance:0,"on:begin":(e,n)=>{0!==e.index&&n.ignoreMatch()}},e)},BACKSLASH_ESCAPE:h,APOS_STRING_MODE:f,QUOTE_STRING_MODE:p,PHRASAL_WORDS_MODE:b,COMMENT:m,C_LINE_COMMENT_MODE:v,C_BLOCK_COMMENT_MODE:x,HASH_COMMENT_MODE:E,NUMBER_MODE:{className:"number",begin:"\\b\\d+(\\.\\d+)?",relevance:0},C_NUMBER_MODE:{className:"number",begin:g,relevance:0},BINARY_NUMBER_MODE:{className:"number",begin:"\\b(0b[01]+)",relevance:0},CSS_NUMBER_MODE:{className:"number",begin:"\\b\\d+(\\.\\d+)?(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},REGEXP_MODE:{begin:/(?=\/[^/\n]*\/)/,contains:[{className:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[h,{begin:/\[/,end:/\]/,relevance:0,contains:[h]}]}]},TITLE_MODE:{className:"title",begin:"[a-zA-Z]\\w*",relevance:0},UNDERSCORE_TITLE_MODE:{className:"title",begin:"[a-zA-Z_]\\w*",relevance:0},METHOD_GUARD:{begin:"\\.\\s*[a-zA-Z_]\\w*",relevance:0},END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(e,n)=>{n.data._beginMatch=e[1]},"on:end":(e,n)=>{n.data._beginMatch!==e[1]&&n.ignoreMatch()}})}}),N="of and for in not or if then".split(" ");function w(e,n){return n?+n:function(e){return N.includes(e.toLowerCase())}(e)?0:1}const R=t,y=r,{nodeStream:k,mergeStreams:O}=i,M=Symbol("nomatch");return function(t){var a=[],i={},s={},o=[],l=!0,c=/(^(<[^>]+>|\t|)+|\n)/gm,g="Could not find the language '{}', did you forget to load/include a language module?";const h={disableAutodetect:!0,name:"Plain text",contains:[]};var f={noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:null,__emitter:u};function p(e){return f.noHighlightRe.test(e)}function b(e,n,t,r){var a={code:n,language:e};S("before:highlight",a);var i=a.result?a.result:m(a.language,a.code,t,r);return i.code=a.code,S("after:highlight",i),i}function m(e,t,a,s){var o=t;function c(e,n){var t=E.case_insensitive?n[0].toLowerCase():n[0];return Object.prototype.hasOwnProperty.call(e.keywords,t)&&e.keywords[t]}function u(){null!=y.subLanguage?function(){if(""!==A){var e=null;if("string"==typeof y.subLanguage){if(!i[y.subLanguage])return void O.addText(A);e=m(y.subLanguage,A,!0,k[y.subLanguage]),k[y.subLanguage]=e.top}else e=v(A,y.subLanguage.length?y.subLanguage:null);y.relevance>0&&(I+=e.relevance),O.addSublanguage(e.emitter,e.language)}}():function(){if(!y.keywords)return void O.addText(A);let e=0;y.keywordPatternRe.lastIndex=0;let n=y.keywordPatternRe.exec(A),t="";for(;n;){t+=A.substring(e,n.index);const r=c(y,n);if(r){const[e,a]=r;O.addText(t),t="",I+=a,O.addKeyword(n[0],e)}else t+=n[0];e=y.keywordPatternRe.lastIndex,n=y.keywordPatternRe.exec(A)}t+=A.substr(e),O.addText(t)}(),A=""}function h(e){return e.className&&O.openNode(e.className),y=Object.create(e,{parent:{value:y}})}function p(e){return 0===y.matcher.regexIndex?(A+=e[0],1):(L=!0,0)}var b={};function x(t,r){var i=r&&r[0];if(A+=t,null==i)return u(),0;if("begin"===b.type&&"end"===r.type&&b.index===r.index&&""===i){if(A+=o.slice(r.index,r.index+1),!l){const n=Error("0 width match regex");throw n.languageName=e,n.badRule=b.rule,n}return 1}if(b=r,"begin"===r.type)return function(e){var t=e[0],r=e.rule;const a=new n(r),i=[r.__beforeBegin,r["on:begin"]];for(const n of i)if(n&&(n(e,a),a.ignore))return p(t);return r&&r.endSameAsBegin&&(r.endRe=RegExp(t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),"m")),r.skip?A+=t:(r.excludeBegin&&(A+=t),u(),r.returnBegin||r.excludeBegin||(A=t)),h(r),r.returnBegin?0:t.length}(r);if("illegal"===r.type&&!a){const e=Error('Illegal lexeme "'+i+'" for mode "'+(y.className||"")+'"');throw e.mode=y,e}if("end"===r.type){var s=function(e){var t=e[0],r=o.substr(e.index),a=function e(t,r,a){let i=function(e,n){var t=e&&e.exec(n);return t&&0===t.index}(t.endRe,a);if(i){if(t["on:end"]){const e=new n(t);t["on:end"](r,e),e.ignore&&(i=!1)}if(i){for(;t.endsParent&&t.parent;)t=t.parent;return t}}if(t.endsWithParent)return e(t.parent,r,a)}(y,e,r);if(!a)return M;var i=y;i.skip?A+=t:(i.returnEnd||i.excludeEnd||(A+=t),u(),i.excludeEnd&&(A=t));do{y.className&&O.closeNode(),y.skip||y.subLanguage||(I+=y.relevance),y=y.parent}while(y!==a.parent);return a.starts&&(a.endSameAsBegin&&(a.starts.endRe=a.endRe),h(a.starts)),i.returnEnd?0:t.length}(r);if(s!==M)return s}if("illegal"===r.type&&""===i)return 1;if(B>1e5&&B>3*r.index)throw Error("potential infinite loop, way more iterations than matches");return A+=i,i.length}var E=T(e);if(!E)throw console.error(g.replace("{}",e)),Error('Unknown language: "'+e+'"');var _=function(e){function n(n,t){return RegExp(d(n),"m"+(e.case_insensitive?"i":"")+(t?"g":""))}class t{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(e,n){n.position=this.position++,this.matchIndexes[this.matchAt]=n,this.regexes.push([n,e]),this.matchAt+=function(e){return RegExp(e.toString()+"|").exec("").length-1}(e)+1}compile(){0===this.regexes.length&&(this.exec=()=>null);const e=this.regexes.map(e=>e[1]);this.matcherRe=n(function(e,n="|"){for(var t=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./,r=0,a="",i=0;i0&&(a+=n),a+="(";o.length>0;){var l=t.exec(o);if(null==l){a+=o;break}a+=o.substring(0,l.index),o=o.substring(l.index+l[0].length),"\\"===l[0][0]&&l[1]?a+="\\"+(+l[1]+s):(a+=l[0],"("===l[0]&&r++)}a+=")"}return a}(e),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex;const n=this.matcherRe.exec(e);if(!n)return null;const t=n.findIndex((e,n)=>n>0&&void 0!==e),r=this.matchIndexes[t];return n.splice(0,t),Object.assign(n,r)}}class a{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){if(this.multiRegexes[e])return this.multiRegexes[e];const n=new t;return this.rules.slice(e).forEach(([e,t])=>n.addRule(e,t)),n.compile(),this.multiRegexes[e]=n,n}considerAll(){this.regexIndex=0}addRule(e,n){this.rules.push([e,n]),"begin"===n.type&&this.count++}exec(e){const n=this.getMatcher(this.regexIndex);n.lastIndex=this.lastIndex;const t=n.exec(e);return t&&(this.regexIndex+=t.position+1,this.regexIndex===this.count&&(this.regexIndex=0)),t}}function i(e,n){const t=e.input[e.index-1],r=e.input[e.index+e[0].length];"."!==t&&"."!==r||n.ignoreMatch()}if(e.contains&&e.contains.includes("self"))throw Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return function t(s,o){const l=s;if(s.compiled)return l;s.compiled=!0,s.__beforeBegin=null,s.keywords=s.keywords||s.beginKeywords;let c=null;if("object"==typeof s.keywords&&(c=s.keywords.$pattern,delete s.keywords.$pattern),s.keywords&&(s.keywords=function(e,n){var t={};return"string"==typeof e?r("keyword",e):Object.keys(e).forEach((function(n){r(n,e[n])})),t;function r(e,r){n&&(r=r.toLowerCase()),r.split(" ").forEach((function(n){var r=n.split("|");t[r[0]]=[e,w(r[0],r[1])]}))}}(s.keywords,e.case_insensitive)),s.lexemes&&c)throw Error("ERR: Prefer `keywords.$pattern` to `mode.lexemes`, BOTH are not allowed. (see mode reference) ");return l.keywordPatternRe=n(s.lexemes||c||/\w+/,!0),o&&(s.beginKeywords&&(s.begin="\\b("+s.beginKeywords.split(" ").join("|")+")(?=\\b|\\s)",s.__beforeBegin=i),s.begin||(s.begin=/\B|\b/),l.beginRe=n(s.begin),s.endSameAsBegin&&(s.end=s.begin),s.end||s.endsWithParent||(s.end=/\B|\b/),s.end&&(l.endRe=n(s.end)),l.terminator_end=d(s.end)||"",s.endsWithParent&&o.terminator_end&&(l.terminator_end+=(s.end?"|":"")+o.terminator_end)),s.illegal&&(l.illegalRe=n(s.illegal)),void 0===s.relevance&&(s.relevance=1),s.contains||(s.contains=[]),s.contains=[].concat(...s.contains.map((function(e){return function(e){return e.variants&&!e.cached_variants&&(e.cached_variants=e.variants.map((function(n){return r(e,{variants:null},n)}))),e.cached_variants?e.cached_variants:function e(n){return!!n&&(n.endsWithParent||e(n.starts))}(e)?r(e,{starts:e.starts?r(e.starts):null}):Object.isFrozen(e)?r(e):e}("self"===e?s:e)}))),s.contains.forEach((function(e){t(e,l)})),s.starts&&t(s.starts,o),l.matcher=function(e){const n=new a;return e.contains.forEach(e=>n.addRule(e.begin,{rule:e,type:"begin"})),e.terminator_end&&n.addRule(e.terminator_end,{type:"end"}),e.illegal&&n.addRule(e.illegal,{type:"illegal"}),n}(l),l}(e)}(E),N="",y=s||_,k={},O=new f.__emitter(f);!function(){for(var e=[],n=y;n!==E;n=n.parent)n.className&&e.unshift(n.className);e.forEach(e=>O.openNode(e))}();var A="",I=0,S=0,B=0,L=!1;try{for(y.matcher.considerAll();;){B++,L?L=!1:(y.matcher.lastIndex=S,y.matcher.considerAll());const e=y.matcher.exec(o);if(!e)break;const n=x(o.substring(S,e.index),e);S=e.index+n}return x(o.substr(S)),O.closeAllNodes(),O.finalize(),N=O.toHTML(),{relevance:I,value:N,language:e,illegal:!1,emitter:O,top:y}}catch(n){if(n.message&&n.message.includes("Illegal"))return{illegal:!0,illegalBy:{msg:n.message,context:o.slice(S-100,S+100),mode:n.mode},sofar:N,relevance:0,value:R(o),emitter:O};if(l)return{illegal:!1,relevance:0,value:R(o),emitter:O,language:e,top:y,errorRaised:n};throw n}}function v(e,n){n=n||f.languages||Object.keys(i);var t=function(e){const n={relevance:0,emitter:new f.__emitter(f),value:R(e),illegal:!1,top:h};return n.emitter.addText(e),n}(e),r=t;return n.filter(T).filter(I).forEach((function(n){var a=m(n,e,!1);a.language=n,a.relevance>r.relevance&&(r=a),a.relevance>t.relevance&&(r=t,t=a)})),r.language&&(t.second_best=r),t}function x(e){return f.tabReplace||f.useBR?e.replace(c,e=>"\n"===e?f.useBR?"
":e:f.tabReplace?e.replace(/\t/g,f.tabReplace):e):e}function E(e){let n=null;const t=function(e){var n=e.className+" ";n+=e.parentNode?e.parentNode.className:"";const t=f.languageDetectRe.exec(n);if(t){var r=T(t[1]);return r||(console.warn(g.replace("{}",t[1])),console.warn("Falling back to no-highlight mode for this block.",e)),r?t[1]:"no-highlight"}return n.split(/\s+/).find(e=>p(e)||T(e))}(e);if(p(t))return;S("before:highlightBlock",{block:e,language:t}),f.useBR?(n=document.createElement("div")).innerHTML=e.innerHTML.replace(/\n/g,"").replace(//g,"\n"):n=e;const r=n.textContent,a=t?b(t,r,!0):v(r),i=k(n);if(i.length){const e=document.createElement("div");e.innerHTML=a.value,a.value=O(i,k(e),r)}a.value=x(a.value),S("after:highlightBlock",{block:e,result:a}),e.innerHTML=a.value,e.className=function(e,n,t){var r=n?s[n]:t,a=[e.trim()];return e.match(/\bhljs\b/)||a.push("hljs"),e.includes(r)||a.push(r),a.join(" ").trim()}(e.className,t,a.language),e.result={language:a.language,re:a.relevance,relavance:a.relevance},a.second_best&&(e.second_best={language:a.second_best.language,re:a.second_best.relevance,relavance:a.second_best.relevance})}const N=()=>{if(!N.called){N.called=!0;var e=document.querySelectorAll("pre code");a.forEach.call(e,E)}};function T(e){return e=(e||"").toLowerCase(),i[e]||i[s[e]]}function A(e,{languageName:n}){"string"==typeof e&&(e=[e]),e.forEach(e=>{s[e]=n})}function I(e){var n=T(e);return n&&!n.disableAutodetect}function S(e,n){var t=e;o.forEach((function(e){e[t]&&e[t](n)}))}Object.assign(t,{highlight:b,highlightAuto:v,fixMarkup:x,highlightBlock:E,configure:function(e){f=y(f,e)},initHighlighting:N,initHighlightingOnLoad:function(){window.addEventListener("DOMContentLoaded",N,!1)},registerLanguage:function(e,n){var r=null;try{r=n(t)}catch(n){if(console.error("Language definition for '{}' could not be registered.".replace("{}",e)),!l)throw n;console.error(n),r=h}r.name||(r.name=e),i[e]=r,r.rawDefinition=n.bind(null,t),r.aliases&&A(r.aliases,{languageName:e})},listLanguages:function(){return Object.keys(i)},getLanguage:T,registerAliases:A,requireLanguage:function(e){var n=T(e);if(n)return n;throw Error("The '{}' language is required, but not loaded.".replace("{}",e))},autoDetection:I,inherit:y,addPlugin:function(e){o.push(e)}}),t.debugMode=function(){l=!1},t.safeMode=function(){l=!0},t.versionString="10.1.1";for(const n in _)"object"==typeof _[n]&&e(_[n]);return Object.assign(t,_),t}({})}();"object"==typeof exports&&"undefined"!=typeof module&&(module.exports=hljs); -hljs.registerLanguage("apache",function(){"use strict";return function(e){var n={className:"number",begin:"\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?"};return{name:"Apache config",aliases:["apacheconf"],case_insensitive:!0,contains:[e.HASH_COMMENT_MODE,{className:"section",begin:"",contains:[n,{className:"number",begin:":\\d{1,5}"},e.inherit(e.QUOTE_STRING_MODE,{relevance:0})]},{className:"attribute",begin:/\w+/,relevance:0,keywords:{nomarkup:"order deny allow setenv rewriterule rewriteengine rewritecond documentroot sethandler errordocument loadmodule options header listen serverroot servername"},starts:{end:/$/,relevance:0,keywords:{literal:"on off all deny allow"},contains:[{className:"meta",begin:"\\s\\[",end:"\\]$"},{className:"variable",begin:"[\\$%]\\{",end:"\\}",contains:["self",{className:"number",begin:"[\\$%]\\d+"}]},n,{className:"number",begin:"\\d+"},e.QUOTE_STRING_MODE]}}],illegal:/\S/}}}()); -hljs.registerLanguage("bash",function(){"use strict";return function(e){const s={};Object.assign(s,{className:"variable",variants:[{begin:/\$[\w\d#@][\w\d_]*/},{begin:/\$\{/,end:/\}/,contains:[{begin:/:-/,contains:[s]}]}]});const t={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},n={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,s,t]};t.contains.push(n);const a={begin:/\$\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,s]},i=e.SHEBANG({binary:"(fish|bash|zsh|sh|csh|ksh|tcsh|dash|scsh)",relevance:10}),c={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0};return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b-?[a-z\._]+\b/,keyword:"if then else elif fi for while in do done case esac function",literal:"true false",built_in:"break cd continue eval exec exit export getopts hash pwd readonly return shift test times trap umask unset alias bind builtin caller command declare echo enable help let local logout mapfile printf read readarray source type typeset ulimit unalias set shopt autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate fc fg float functions getcap getln history integer jobs kill limit log noglob popd print pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof zpty zregexparse zsocket zstyle ztcp",_:"-ne -eq -lt -gt -f -d -e -s -l -a"},contains:[i,e.SHEBANG(),c,a,e.HASH_COMMENT_MODE,n,{className:"",begin:/\\"/},{className:"string",begin:/'/,end:/'/},s]}}}()); -hljs.registerLanguage("c-like",function(){"use strict";return function(e){function t(e){return"(?:"+e+")?"}var n="(decltype\\(auto\\)|"+t("[a-zA-Z_]\\w*::")+"[a-zA-Z_]\\w*"+t("<.*?>")+")",r={className:"keyword",begin:"\\b[a-z\\d_]*_t\\b"},a={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},i={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},s={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{"meta-keyword":"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(a,{className:"meta-string"}),{className:"meta-string",begin:/<.*?>/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},o={className:"title",begin:t("[a-zA-Z_]\\w*::")+e.IDENT_RE,relevance:0},c=t("[a-zA-Z_]\\w*::")+e.IDENT_RE+"\\s*\\(",l={keyword:"int float while private char char8_t char16_t char32_t catch import module export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using asm case typeid wchar_t short reinterpret_cast|10 default double register explicit signed typename try this switch continue inline delete alignas alignof constexpr consteval constinit decltype concept co_await co_return co_yield requires noexcept static_assert thread_local restrict final override atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong new throw return and and_eq bitand bitor compl not not_eq or or_eq xor xor_eq",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr _Bool complex _Complex imaginary _Imaginary",literal:"true false nullptr NULL"},d=[r,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,i,a],_={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:l,contains:d.concat([{begin:/\(/,end:/\)/,keywords:l,contains:d.concat(["self"]),relevance:0}]),relevance:0},u={className:"function",begin:"("+n+"[\\*&\\s]+)+"+c,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:l,illegal:/[^\w\s\*&:<>]/,contains:[{begin:"decltype\\(auto\\)",keywords:l,relevance:0},{begin:c,returnBegin:!0,contains:[o],relevance:0},{className:"params",begin:/\(/,end:/\)/,keywords:l,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,a,i,r,{begin:/\(/,end:/\)/,keywords:l,relevance:0,contains:["self",e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,a,i,r]}]},r,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,s]};return{aliases:["c","cc","h","c++","h++","hpp","hh","hxx","cxx"],keywords:l,disableAutodetect:!0,illegal:"",keywords:l,contains:["self",r]},{begin:e.IDENT_RE+"::",keywords:l},{className:"class",beginKeywords:"class struct",end:/[{;:]/,contains:[{begin://,contains:["self"]},e.TITLE_MODE]}]),exports:{preprocessor:s,strings:a,keywords:l}}}}()); -hljs.registerLanguage("c",function(){"use strict";return function(e){var n=e.getLanguage("c-like").rawDefinition();return n.name="C",n.aliases=["c","h"],n}}()); -hljs.registerLanguage("coffeescript",function(){"use strict";const e=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],n=["true","false","null","undefined","NaN","Infinity"],a=[].concat(["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],["arguments","this","super","console","window","document","localStorage","module","global"],["Intl","DataView","Number","Math","Date","String","RegExp","Object","Function","Boolean","Error","Symbol","Set","Map","WeakSet","WeakMap","Proxy","Reflect","JSON","Promise","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Float32Array","Array","Uint8Array","Uint8ClampedArray","ArrayBuffer"],["EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"]);return function(r){var t={keyword:e.concat(["then","unless","until","loop","by","when","and","or","is","isnt","not"]).filter((e=>n=>!e.includes(n))(["var","const","let","function","static"])).join(" "),literal:n.concat(["yes","no","on","off"]).join(" "),built_in:a.concat(["npm","print"]).join(" ")},i="[A-Za-z$_][0-9A-Za-z$_]*",s={className:"subst",begin:/#\{/,end:/}/,keywords:t},o=[r.BINARY_NUMBER_MODE,r.inherit(r.C_NUMBER_MODE,{starts:{end:"(\\s*/)?",relevance:0}}),{className:"string",variants:[{begin:/'''/,end:/'''/,contains:[r.BACKSLASH_ESCAPE]},{begin:/'/,end:/'/,contains:[r.BACKSLASH_ESCAPE]},{begin:/"""/,end:/"""/,contains:[r.BACKSLASH_ESCAPE,s]},{begin:/"/,end:/"/,contains:[r.BACKSLASH_ESCAPE,s]}]},{className:"regexp",variants:[{begin:"///",end:"///",contains:[s,r.HASH_COMMENT_MODE]},{begin:"//[gim]{0,3}(?=\\W)",relevance:0},{begin:/\/(?![ *]).*?(?![\\]).\/[gim]{0,3}(?=\W)/}]},{begin:"@"+i},{subLanguage:"javascript",excludeBegin:!0,excludeEnd:!0,variants:[{begin:"```",end:"```"},{begin:"`",end:"`"}]}];s.contains=o;var c=r.inherit(r.TITLE_MODE,{begin:i}),l={className:"params",begin:"\\([^\\(]",returnBegin:!0,contains:[{begin:/\(/,end:/\)/,keywords:t,contains:["self"].concat(o)}]};return{name:"CoffeeScript",aliases:["coffee","cson","iced"],keywords:t,illegal:/\/\*/,contains:o.concat([r.COMMENT("###","###"),r.HASH_COMMENT_MODE,{className:"function",begin:"^\\s*"+i+"\\s*=\\s*(\\(.*\\))?\\s*\\B[-=]>",end:"[-=]>",returnBegin:!0,contains:[c,l]},{begin:/[:\(,=]\s*/,relevance:0,contains:[{className:"function",begin:"(\\(.*\\))?\\s*\\B[-=]>",end:"[-=]>",returnBegin:!0,contains:[l]}]},{className:"class",beginKeywords:"class",end:"$",illegal:/[:="\[\]]/,contains:[{beginKeywords:"extends",endsWithParent:!0,illegal:/[:="\[\]]/,contains:[c]},c]},{begin:i+":",end:":",returnBegin:!0,returnEnd:!0,relevance:0}])}}}()); -hljs.registerLanguage("cpp",function(){"use strict";return function(e){var t=e.getLanguage("c-like").rawDefinition();return t.disableAutodetect=!1,t.name="C++",t.aliases=["cc","c++","h++","hpp","hh","hxx","cxx"],t}}()); -hljs.registerLanguage("csharp",function(){"use strict";return function(e){var n={keyword:"abstract as base bool break byte case catch char checked const continue decimal default delegate do double enum event explicit extern finally fixed float for foreach goto if implicit in int interface internal is lock long object operator out override params private protected public readonly ref sbyte sealed short sizeof stackalloc static string struct switch this try typeof uint ulong unchecked unsafe ushort using virtual void volatile while add alias ascending async await by descending dynamic equals from get global group into join let nameof on orderby partial remove select set value var when where yield",literal:"null false true"},i=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),a={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},s={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},t=e.inherit(s,{illegal:/\n/}),l={className:"subst",begin:"{",end:"}",keywords:n},r=e.inherit(l,{illegal:/\n/}),c={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:"{{"},{begin:"}}"},e.BACKSLASH_ESCAPE,r]},o={className:"string",begin:/\$@"/,end:'"',contains:[{begin:"{{"},{begin:"}}"},{begin:'""'},l]},g=e.inherit(o,{illegal:/\n/,contains:[{begin:"{{"},{begin:"}}"},{begin:'""'},r]});l.contains=[o,c,s,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,a,e.C_BLOCK_COMMENT_MODE],r.contains=[g,c,t,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,a,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];var d={variants:[o,c,s,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},E={begin:"<",end:">",contains:[{beginKeywords:"in out"},i]},_=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",b={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:n,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"\x3c!--|--\x3e"},{begin:""}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{"meta-keyword":"if else elif endif define undef warning error line region endregion pragma checksum"}},d,a,{beginKeywords:"class interface",end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},i,E,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",end:/[{;=]/,illegal:/[^\s:]/,contains:[i,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"meta-string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+_+"\\s+)+"+e.IDENT_RE+"\\s*(\\<.+\\>)?\\s*\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:n,contains:[{begin:e.IDENT_RE+"\\s*(\\<.+\\>)?\\s*\\(",returnBegin:!0,contains:[e.TITLE_MODE,E],relevance:0},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:n,relevance:0,contains:[d,a,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},b]}}}()); -hljs.registerLanguage("css",function(){"use strict";return function(e){var n={begin:/(?:[A-Z\_\.\-]+|--[a-zA-Z0-9_-]+)\s*:/,returnBegin:!0,end:";",endsWithParent:!0,contains:[{className:"attribute",begin:/\S/,end:":",excludeEnd:!0,starts:{endsWithParent:!0,excludeEnd:!0,contains:[{begin:/[\w-]+\(/,returnBegin:!0,contains:[{className:"built_in",begin:/[\w-]+/},{begin:/\(/,end:/\)/,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.CSS_NUMBER_MODE]}]},e.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,e.C_BLOCK_COMMENT_MODE,{className:"number",begin:"#[0-9A-Fa-f]+"},{className:"meta",begin:"!important"}]}}]};return{name:"CSS",case_insensitive:!0,illegal:/[=\/|'\$]/,contains:[e.C_BLOCK_COMMENT_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/},{className:"selector-class",begin:/\.[A-Za-z0-9_-]+/},{className:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},{className:"selector-pseudo",begin:/:(:)?[a-zA-Z0-9\_\-\+\(\)"'.]+/},{begin:"@(page|font-face)",lexemes:"@[a-z-]+",keywords:"@page @font-face"},{begin:"@",end:"[{;]",illegal:/:/,returnBegin:!0,contains:[{className:"keyword",begin:/@\-?\w[\w]*(\-\w+)*/},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:"and or not only",contains:[{begin:/[a-z-]+:/,className:"attribute"},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"[a-zA-Z-][a-zA-Z0-9_-]*",relevance:0},{begin:"{",end:"}",illegal:/\S/,contains:[e.C_BLOCK_COMMENT_MODE,n]}]}}}()); -hljs.registerLanguage("diff",function(){"use strict";return function(e){return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,variants:[{begin:/^@@ +\-\d+,\d+ +\+\d+,\d+ +@@$/},{begin:/^\*\*\* +\d+,\d+ +\*\*\*\*$/},{begin:/^\-\-\- +\d+,\d+ +\-\-\-\-$/}]},{className:"comment",variants:[{begin:/Index: /,end:/$/},{begin:/={3,}/,end:/$/},{begin:/^\-{3}/,end:/$/},{begin:/^\*{3} /,end:/$/},{begin:/^\+{3}/,end:/$/},{begin:/^\*{15}$/}]},{className:"addition",begin:"^\\+",end:"$"},{className:"deletion",begin:"^\\-",end:"$"},{className:"addition",begin:"^\\!",end:"$"}]}}}()); -hljs.registerLanguage("go",function(){"use strict";return function(e){var n={keyword:"break default func interface select case map struct chan else goto package switch const fallthrough if range type continue for import return var go defer bool byte complex64 complex128 float32 float64 int8 int16 int32 int64 string uint8 uint16 uint32 uint64 int uint uintptr rune",literal:"true false iota nil",built_in:"append cap close complex copy imag len make new panic print println real recover delete"};return{name:"Go",aliases:["golang"],keywords:n,illegal:"e(n)).join("")}return function(a){var s={className:"number",relevance:0,variants:[{begin:/([\+\-]+)?[\d]+_[\d_]+/},{begin:a.NUMBER_RE}]},i=a.COMMENT();i.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];var t={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)}/}]},r={className:"literal",begin:/\bon|off|true|false|yes|no\b/},l={className:"string",contains:[a.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},c={begin:/\[/,end:/\]/,contains:[i,r,t,l,s,"self"],relevance:0},g="("+[/[A-Za-z0-9_-]+/,/"(\\"|[^"])*"/,/'[^']*'/].map(n=>e(n)).join("|")+")";return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[i,{className:"section",begin:/\[+/,end:/\]+/},{begin:n(g,"(\\s*\\.\\s*",g,")*",n("(?=",/\s*=\s*[^#\s]/,")")),className:"attr",starts:{end:/$/,contains:[i,c,r,t,l,s]}}]}}}()); -hljs.registerLanguage("java",function(){"use strict";function e(e){return e?"string"==typeof e?e:e.source:null}function n(e){return a("(",e,")?")}function a(...n){return n.map(n=>e(n)).join("")}function s(...n){return"("+n.map(n=>e(n)).join("|")+")"}return function(e){var t="false synchronized int abstract float private char boolean var static null if const for true while long strictfp finally protected import native final void enum else break transient catch instanceof byte super volatile case assert short package default double public try this switch continue throws protected public private module requires exports do",i={className:"meta",begin:"@[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},r=e=>a("[",e,"]+([",e,"_]*[",e,"]+)?"),c={className:"number",variants:[{begin:`\\b(0[bB]${r("01")})[lL]?`},{begin:`\\b(0${r("0-7")})[dDfFlL]?`},{begin:a(/\b0[xX]/,s(a(r("a-fA-F0-9"),/\./,r("a-fA-F0-9")),a(r("a-fA-F0-9"),/\.?/),a(/\./,r("a-fA-F0-9"))),/([pP][+-]?(\d+))?/,/[fFdDlL]?/)},{begin:a(/\b/,s(a(/\d*\./,r("\\d")),r("\\d")),/[eE][+-]?[\d]+[dDfF]?/)},{begin:a(/\b/,r(/\d/),n(/\.?/),n(r(/\d/)),/[dDfFlL]?/)}],relevance:0};return{name:"Java",aliases:["jsp"],keywords:t,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"class",beginKeywords:"class interface",end:/[{;=]/,excludeEnd:!0,keywords:"class interface",illegal:/[:"\[\]]/,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"new throw return else",relevance:0},{className:"function",begin:"([À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*(<[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*(\\s*,\\s*[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*)*>)?\\s+)+"+e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:t,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"params",begin:/\(/,end:/\)/,keywords:t,relevance:0,contains:[i,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},c,i]}}}()); -hljs.registerLanguage("javascript",function(){"use strict";const e=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],n=["true","false","null","undefined","NaN","Infinity"],a=[].concat(["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],["arguments","this","super","console","window","document","localStorage","module","global"],["Intl","DataView","Number","Math","Date","String","RegExp","Object","Function","Boolean","Error","Symbol","Set","Map","WeakSet","WeakMap","Proxy","Reflect","JSON","Promise","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Float32Array","Array","Uint8Array","Uint8ClampedArray","ArrayBuffer"],["EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"]);function s(e){return r("(?=",e,")")}function r(...e){return e.map(e=>(function(e){return e?"string"==typeof e?e:e.source:null})(e)).join("")}return function(t){var i="[A-Za-z$_][0-9A-Za-z$_]*",c={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/},o={$pattern:"[A-Za-z$_][0-9A-Za-z$_]*",keyword:e.join(" "),literal:n.join(" "),built_in:a.join(" ")},l={className:"number",variants:[{begin:"\\b(0[bB][01]+)n?"},{begin:"\\b(0[oO][0-7]+)n?"},{begin:t.C_NUMBER_RE+"n?"}],relevance:0},E={className:"subst",begin:"\\$\\{",end:"\\}",keywords:o,contains:[]},d={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,E],subLanguage:"xml"}},g={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,E],subLanguage:"css"}},u={className:"string",begin:"`",end:"`",contains:[t.BACKSLASH_ESCAPE,E]};E.contains=[t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,d,g,u,l,t.REGEXP_MODE];var b=E.contains.concat([{begin:/\(/,end:/\)/,contains:["self"].concat(E.contains,[t.C_BLOCK_COMMENT_MODE,t.C_LINE_COMMENT_MODE])},t.C_BLOCK_COMMENT_MODE,t.C_LINE_COMMENT_MODE]),_={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,contains:b};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:o,contains:[t.SHEBANG({binary:"node",relevance:5}),{className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,d,g,u,t.C_LINE_COMMENT_MODE,t.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+",contains:[{className:"type",begin:"\\{",end:"\\}",relevance:0},{className:"variable",begin:i+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),t.C_BLOCK_COMMENT_MODE,l,{begin:r(/[{,\n]\s*/,s(r(/(((\/\/.*)|(\/\*(.|\n)*\*\/))\s*)*/,i+"\\s*:"))),relevance:0,contains:[{className:"attr",begin:i+s("\\s*:"),relevance:0}]},{begin:"("+t.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",contains:[t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,t.REGEXP_MODE,{className:"function",begin:"(\\([^(]*(\\([^(]*(\\([^(]*\\))?\\))?\\)|"+t.UNDERSCORE_IDENT_RE+")\\s*=>",returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:t.UNDERSCORE_IDENT_RE},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:b}]}]},{begin:/,/,relevance:0},{className:"",begin:/\s/,end:/\s*/,skip:!0},{variants:[{begin:"<>",end:""},{begin:c.begin,end:c.end}],subLanguage:"xml",contains:[{begin:c.begin,end:c.end,skip:!0,contains:["self"]}]}],relevance:0},{className:"function",beginKeywords:"function",end:/\{/,excludeEnd:!0,contains:[t.inherit(t.TITLE_MODE,{begin:i}),_],illegal:/\[|%/},{begin:/\$[(.]/},t.METHOD_GUARD,{className:"class",beginKeywords:"class",end:/[{;=]/,excludeEnd:!0,illegal:/[:"\[\]]/,contains:[{beginKeywords:"extends"},t.UNDERSCORE_TITLE_MODE]},{beginKeywords:"constructor",end:/\{/,excludeEnd:!0},{begin:"(get|set)\\s+(?="+i+"\\()",end:/{/,keywords:"get set",contains:[t.inherit(t.TITLE_MODE,{begin:i}),{begin:/\(\)/},_]}],illegal:/#(?!!)/}}}()); -hljs.registerLanguage("json",function(){"use strict";return function(n){var e={literal:"true false null"},i=[n.C_LINE_COMMENT_MODE,n.C_BLOCK_COMMENT_MODE],t=[n.QUOTE_STRING_MODE,n.C_NUMBER_MODE],a={end:",",endsWithParent:!0,excludeEnd:!0,contains:t,keywords:e},l={begin:"{",end:"}",contains:[{className:"attr",begin:/"/,end:/"/,contains:[n.BACKSLASH_ESCAPE],illegal:"\\n"},n.inherit(a,{begin:/:/})].concat(i),illegal:"\\S"},s={begin:"\\[",end:"\\]",contains:[n.inherit(a)],illegal:"\\S"};return t.push(l,s),i.forEach((function(n){t.push(n)})),{name:"JSON",contains:t,keywords:e,illegal:"\\S"}}}()); -hljs.registerLanguage("kotlin",function(){"use strict";return function(e){var n={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual trait volatile transient native default",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},a={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},i={className:"subst",begin:"\\${",end:"}",contains:[e.C_NUMBER_MODE]},s={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},t={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[s,i]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,s,i]}]};i.contains.push(t);var r={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},l={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(t,{className:"meta-string"})]}]},c=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),o={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},d=o;return d.variants[1].contains=[o],o.variants[1].contains=[d],{name:"Kotlin",aliases:["kt"],keywords:n,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,c,{className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},a,r,l,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:n,illegal:/fun\s+(<.*>)?[^\s\(]+(\s+[^\s\(]+)\s*=/,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin://,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:n,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[o,e.C_LINE_COMMENT_MODE,c],relevance:0},e.C_LINE_COMMENT_MODE,c,r,l,t,e.C_NUMBER_MODE]},c]},{className:"class",beginKeywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin://,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,]|$/,excludeBegin:!0,returnEnd:!0},r,l]},t,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:"\n"},{className:"number",begin:"\\b(0[bB]([01]+[01_]+[01]+|[01]+)|0[xX]([a-fA-F0-9]+[a-fA-F0-9_]+[a-fA-F0-9]+|[a-fA-F0-9]+)|(([\\d]+[\\d_]+[\\d]+|[\\d]+)(\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))?|\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))([eE][-+]?\\d+)?)[lLfF]?",relevance:0}]}}}()); -hljs.registerLanguage("less",function(){"use strict";return function(e){var n="([\\w-]+|@{[\\w-]+})",a=[],s=[],t=function(e){return{className:"string",begin:"~?"+e+".*?"+e}},r=function(e,n,a){return{className:e,begin:n,relevance:a}},i={begin:"\\(",end:"\\)",contains:s,relevance:0};s.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t("'"),t('"'),e.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},r("number","#[0-9A-Fa-f]+\\b"),i,r("variable","@@?[\\w-]+",10),r("variable","@{[\\w-]+}"),r("built_in","~?`[^`]*?`"),{className:"attribute",begin:"[\\w-]+\\s*:",end:":",returnBegin:!0,excludeEnd:!0},{className:"meta",begin:"!important"});var c=s.concat({begin:"{",end:"}",contains:a}),l={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(s)},o={begin:n+"\\s*:",returnBegin:!0,end:"[;}]",relevance:0,contains:[{className:"attribute",begin:n,end:":",excludeEnd:!0,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:s}}]},g={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",returnEnd:!0,contains:s,relevance:0}},d={className:"variable",variants:[{begin:"@[\\w-]+\\s*:",relevance:15},{begin:"@[\\w-]+"}],starts:{end:"[;}]",returnEnd:!0,contains:c}},b={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:n,end:"{"}],returnBegin:!0,returnEnd:!0,illegal:"[<='$\"]",relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,l,r("keyword","all\\b"),r("variable","@{[\\w-]+}"),r("selector-tag",n+"%?",0),r("selector-id","#"+n),r("selector-class","\\."+n,0),r("selector-tag","&",0),{className:"selector-attr",begin:"\\[",end:"\\]"},{className:"selector-pseudo",begin:/:(:)?[a-zA-Z0-9\_\-\+\(\)"'.]+/},{begin:"\\(",end:"\\)",contains:c},{begin:"!important"}]};return a.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,g,d,o,b),{name:"Less",case_insensitive:!0,illegal:"[=>'/<($\"]",contains:a}}}()); -hljs.registerLanguage("lua",function(){"use strict";return function(e){var t={begin:"\\[=*\\[",end:"\\]=*\\]",contains:["self"]},a=[e.COMMENT("--(?!\\[=*\\[)","$"),e.COMMENT("--\\[=*\\[","\\]=*\\]",{contains:[t],relevance:10})];return{name:"Lua",keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:a.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:a}].concat(a)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:"\\[=*\\[",end:"\\]=*\\]",contains:[t],relevance:5}])}}}()); -hljs.registerLanguage("makefile",function(){"use strict";return function(e){var i={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,contains:[{className:"meta",begin:"",relevance:10,contains:[a,i,t,s,{begin:"\\[",end:"\\]",contains:[{className:"meta",begin:"",contains:[a,s,i,t]}]}]},e.COMMENT("\x3c!--","--\x3e",{relevance:10}),{begin:"<\\!\\[CDATA\\[",end:"\\]\\]>",relevance:10},n,{className:"meta",begin:/<\?xml/,end:/\?>/,relevance:10},{className:"tag",begin:")",end:">",keywords:{name:"style"},contains:[c],starts:{end:"",returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:")",end:">",keywords:{name:"script"},contains:[c],starts:{end:"<\/script>",returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:"",contains:[{className:"name",begin:/[^\/><\s]+/,relevance:0},c]}]}}}()); -hljs.registerLanguage("markdown",function(){"use strict";return function(n){const e={begin:"<",end:">",subLanguage:"xml",relevance:0},a={begin:"\\[.+?\\][\\(\\[].*?[\\)\\]]",returnBegin:!0,contains:[{className:"string",begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0,relevance:0},{className:"link",begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}],relevance:10},i={className:"strong",contains:[],variants:[{begin:/_{2}/,end:/_{2}/},{begin:/\*{2}/,end:/\*{2}/}]},s={className:"emphasis",contains:[],variants:[{begin:/\*(?!\*)/,end:/\*/},{begin:/_(?!_)/,end:/_/,relevance:0}]};i.contains.push(s),s.contains.push(i);var c=[e,a];return i.contains=i.contains.concat(c),s.contains=s.contains.concat(c),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:c=c.concat(i,s)},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:c}]}]},e,{className:"bullet",begin:"^[ \t]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},i,s,{className:"quote",begin:"^>\\s+",contains:c,end:"$"},{className:"code",variants:[{begin:"(`{3,})(.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})(.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},{begin:"^[-\\*]{3,}",end:"$"},a,{begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]}]}}}()); -hljs.registerLanguage("nginx",function(){"use strict";return function(e){var n={className:"variable",variants:[{begin:/\$\d+/},{begin:/\$\{/,end:/}/},{begin:"[\\$\\@]"+e.UNDERSCORE_IDENT_RE}]},a={endsWithParent:!0,keywords:{$pattern:"[a-z/_]+",literal:"on off yes no true false none blocked debug info notice warn error crit select break last permanent redirect kqueue rtsig epoll poll /dev/poll"},relevance:0,illegal:"=>",contains:[e.HASH_COMMENT_MODE,{className:"string",contains:[e.BACKSLASH_ESCAPE,n],variants:[{begin:/"/,end:/"/},{begin:/'/,end:/'/}]},{begin:"([a-z]+):/",end:"\\s",endsWithParent:!0,excludeEnd:!0,contains:[n]},{className:"regexp",contains:[e.BACKSLASH_ESCAPE,n],variants:[{begin:"\\s\\^",end:"\\s|{|;",returnEnd:!0},{begin:"~\\*?\\s+",end:"\\s|{|;",returnEnd:!0},{begin:"\\*(\\.[a-z\\-]+)+"},{begin:"([a-z\\-]+\\.)+\\*"}]},{className:"number",begin:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{className:"number",begin:"\\b\\d+[kKmMgGdshdwy]*\\b",relevance:0},n]};return{name:"Nginx config",aliases:["nginxconf"],contains:[e.HASH_COMMENT_MODE,{begin:e.UNDERSCORE_IDENT_RE+"\\s+{",returnBegin:!0,end:"{",contains:[{className:"section",begin:e.UNDERSCORE_IDENT_RE}],relevance:0},{begin:e.UNDERSCORE_IDENT_RE+"\\s",end:";|{",returnBegin:!0,contains:[{className:"attribute",begin:e.UNDERSCORE_IDENT_RE,starts:a}],relevance:0}],illegal:"[^\\s\\}]"}}}()); -hljs.registerLanguage("objectivec",function(){"use strict";return function(e){var n=/[a-zA-Z@][a-zA-Z0-9_]*/,_={$pattern:n,keyword:"@interface @class @protocol @implementation"};return{name:"Objective-C",aliases:["mm","objc","obj-c"],keywords:{$pattern:n,keyword:"int float while char export sizeof typedef const struct for union unsigned long volatile static bool mutable if do return goto void enum else break extern asm case short default double register explicit signed typename this switch continue wchar_t inline readonly assign readwrite self @synchronized id typeof nonatomic super unichar IBOutlet IBAction strong weak copy in out inout bycopy byref oneway __strong __weak __block __autoreleasing @private @protected @public @try @property @end @throw @catch @finally @autoreleasepool @synthesize @dynamic @selector @optional @required @encode @package @import @defs @compatibility_alias __bridge __bridge_transfer __bridge_retained __bridge_retain __covariant __contravariant __kindof _Nonnull _Nullable _Null_unspecified __FUNCTION__ __PRETTY_FUNCTION__ __attribute__ getter setter retain unsafe_unretained nonnull nullable null_unspecified null_resettable class instancetype NS_DESIGNATED_INITIALIZER NS_UNAVAILABLE NS_REQUIRES_SUPER NS_RETURNS_INNER_POINTER NS_INLINE NS_AVAILABLE NS_DEPRECATED NS_ENUM NS_OPTIONS NS_SWIFT_UNAVAILABLE NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END NS_REFINED_FOR_SWIFT NS_SWIFT_NAME NS_SWIFT_NOTHROW NS_DURING NS_HANDLER NS_ENDHANDLER NS_VALUERETURN NS_VOIDRETURN",literal:"false true FALSE TRUE nil YES NO NULL",built_in:"BOOL dispatch_once_t dispatch_queue_t dispatch_sync dispatch_async dispatch_once"},illegal:"/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+_.keyword.split(" ").join("|")+")\\b",end:"({|$)",excludeEnd:!0,keywords:_,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}}()); -hljs.registerLanguage("perl",function(){"use strict";return function(e){var n={$pattern:/[\w.]+/,keyword:"getpwent getservent quotemeta msgrcv scalar kill dbmclose undef lc ma syswrite tr send umask sysopen shmwrite vec qx utime local oct semctl localtime readpipe do return format read sprintf dbmopen pop getpgrp not getpwnam rewinddir qq fileno qw endprotoent wait sethostent bless s|0 opendir continue each sleep endgrent shutdown dump chomp connect getsockname die socketpair close flock exists index shmget sub for endpwent redo lstat msgctl setpgrp abs exit select print ref gethostbyaddr unshift fcntl syscall goto getnetbyaddr join gmtime symlink semget splice x|0 getpeername recv log setsockopt cos last reverse gethostbyname getgrnam study formline endhostent times chop length gethostent getnetent pack getprotoent getservbyname rand mkdir pos chmod y|0 substr endnetent printf next open msgsnd readdir use unlink getsockopt getpriority rindex wantarray hex system getservbyport endservent int chr untie rmdir prototype tell listen fork shmread ucfirst setprotoent else sysseek link getgrgid shmctl waitpid unpack getnetbyname reset chdir grep split require caller lcfirst until warn while values shift telldir getpwuid my getprotobynumber delete and sort uc defined srand accept package seekdir getprotobyname semop our rename seek if q|0 chroot sysread setpwent no crypt getc chown sqrt write setnetent setpriority foreach tie sin msgget map stat getlogin unless elsif truncate exec keys glob tied closedir ioctl socket readlink eval xor readline binmode setservent eof ord bind alarm pipe atan2 getgrent exp time push setgrent gt lt or ne m|0 break given say state when"},t={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:n},s={begin:"->{",end:"}"},r={variants:[{begin:/\$\d/},{begin:/[\$%@](\^\w\b|#\w+(::\w+)*|{\w+}|\w+(::\w*)*)/},{begin:/[\$%@][^\s\w{]/,relevance:0}]},i=[e.BACKSLASH_ESCAPE,t,r],a=[r,e.HASH_COMMENT_MODE,e.COMMENT("^\\=\\w","\\=cut",{endsWithParent:!0}),s,{className:"string",contains:i,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*\\<",end:"\\>",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:"{\\w+}",contains:[],relevance:0},{begin:"-?\\w+\\s*\\=\\>",contains:[],relevance:0}]},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",begin:"(s|tr|y)/(\\\\.|[^/])*/(\\\\.|[^/])*/[a-z]*",relevance:10},{className:"regexp",begin:"(m|qr)?/",end:"/[a-z]*",contains:[e.BACKSLASH_ESCAPE],relevance:0}]},{className:"function",beginKeywords:"sub",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return t.contains=a,s.contains=a,{name:"Perl",aliases:["pl","pm"],keywords:n,contains:a}}}()); -hljs.registerLanguage("php",function(){"use strict";return function(e){var r={begin:"\\$+[a-zA-Z_-ÿ][a-zA-Z0-9_-ÿ]*"},t={className:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?[=]?/},{begin:/\?>/}]},a={className:"string",contains:[e.BACKSLASH_ESCAPE,t],variants:[{begin:'b"',end:'"'},{begin:"b'",end:"'"},e.inherit(e.APOS_STRING_MODE,{illegal:null}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null})]},n={variants:[e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE]},i={keyword:"__CLASS__ __DIR__ __FILE__ __FUNCTION__ __LINE__ __METHOD__ __NAMESPACE__ __TRAIT__ die echo exit include include_once print require require_once array abstract and as binary bool boolean break callable case catch class clone const continue declare default do double else elseif empty enddeclare endfor endforeach endif endswitch endwhile eval extends final finally float for foreach from global goto if implements instanceof insteadof int integer interface isset iterable list new object or private protected public real return string switch throw trait try unset use var void while xor yield",literal:"false null true",built_in:"Error|0 AppendIterator ArgumentCountError ArithmeticError ArrayIterator ArrayObject AssertionError BadFunctionCallException BadMethodCallException CachingIterator CallbackFilterIterator CompileError Countable DirectoryIterator DivisionByZeroError DomainException EmptyIterator ErrorException Exception FilesystemIterator FilterIterator GlobIterator InfiniteIterator InvalidArgumentException IteratorIterator LengthException LimitIterator LogicException MultipleIterator NoRewindIterator OutOfBoundsException OutOfRangeException OuterIterator OverflowException ParentIterator ParseError RangeException RecursiveArrayIterator RecursiveCachingIterator RecursiveCallbackFilterIterator RecursiveDirectoryIterator RecursiveFilterIterator RecursiveIterator RecursiveIteratorIterator RecursiveRegexIterator RecursiveTreeIterator RegexIterator RuntimeException SeekableIterator SplDoublyLinkedList SplFileInfo SplFileObject SplFixedArray SplHeap SplMaxHeap SplMinHeap SplObjectStorage SplObserver SplObserver SplPriorityQueue SplQueue SplStack SplSubject SplSubject SplTempFileObject TypeError UnderflowException UnexpectedValueException ArrayAccess Closure Generator Iterator IteratorAggregate Serializable Throwable Traversable WeakReference Directory __PHP_Incomplete_Class parent php_user_filter self static stdClass"};return{aliases:["php","php3","php4","php5","php6","php7"],case_insensitive:!0,keywords:i,contains:[e.HASH_COMMENT_MODE,e.COMMENT("//","$",{contains:[t]}),e.COMMENT("/\\*","\\*/",{contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.COMMENT("__halt_compiler.+?;",!1,{endsWithParent:!0,keywords:"__halt_compiler"}),{className:"string",begin:/<<<['"]?\w+['"]?$/,end:/^\w+;?$/,contains:[e.BACKSLASH_ESCAPE,{className:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]}]},t,{className:"keyword",begin:/\$this\b/},r,{begin:/(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/},{className:"function",beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[e.UNDERSCORE_TITLE_MODE,{className:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:i,contains:["self",r,e.C_BLOCK_COMMENT_MODE,a,n]}]},{className:"class",beginKeywords:"class interface",end:"{",excludeEnd:!0,illegal:/[:\(\$"]/,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",end:";",illegal:/[\.']/,contains:[e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"use",end:";",contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"=>"},a,n]}}}()); -hljs.registerLanguage("php-template",function(){"use strict";return function(n){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},n.inherit(n.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),n.inherit(n.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}}()); -hljs.registerLanguage("plaintext",function(){"use strict";return function(t){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}}()); -hljs.registerLanguage("properties",function(){"use strict";return function(e){var n="[ \\t\\f]*",t="("+n+"[:=]"+n+"|[ \\t\\f]+)",a="([^\\\\:= \\t\\f\\n]|\\\\.)+",s={end:t,relevance:0,starts:{className:"string",end:/$/,relevance:0,contains:[{begin:"\\\\\\n"}]}};return{name:".properties",case_insensitive:!0,illegal:/\S/,contains:[e.COMMENT("^\\s*[!#]","$"),{begin:"([^\\\\\\W:= \\t\\f\\n]|\\\\.)+"+t,returnBegin:!0,contains:[{className:"attr",begin:"([^\\\\\\W:= \\t\\f\\n]|\\\\.)+",endsParent:!0,relevance:0}],starts:s},{begin:a+t,returnBegin:!0,relevance:0,contains:[{className:"meta",begin:a,endsParent:!0,relevance:0}],starts:s},{className:"attr",relevance:0,begin:a+n+"$"}]}}}()); -hljs.registerLanguage("python",function(){"use strict";return function(e){var n={keyword:"and elif is global as in if from raise for except finally print import pass return exec else break not with class assert yield try while continue del or def lambda async await nonlocal|10",built_in:"Ellipsis NotImplemented",literal:"False None True"},a={className:"meta",begin:/^(>>>|\.\.\.) /},i={className:"subst",begin:/\{/,end:/\}/,keywords:n,illegal:/#/},s={begin:/\{\{/,relevance:0},r={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/(u|b)?r?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,a],relevance:10},{begin:/(u|b)?r?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,a],relevance:10},{begin:/(fr|rf|f)'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,a,s,i]},{begin:/(fr|rf|f)"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,a,s,i]},{begin:/(u|r|ur)'/,end:/'/,relevance:10},{begin:/(u|r|ur)"/,end:/"/,relevance:10},{begin:/(b|br)'/,end:/'/},{begin:/(b|br)"/,end:/"/},{begin:/(fr|rf|f)'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,s,i]},{begin:/(fr|rf|f)"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,s,i]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},l={className:"number",relevance:0,variants:[{begin:e.BINARY_NUMBER_RE+"[lLjJ]?"},{begin:"\\b(0o[0-7]+)[lLjJ]?"},{begin:e.C_NUMBER_RE+"[lLjJ]?"}]},t={className:"params",variants:[{begin:/\(\s*\)/,skip:!0,className:null},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,contains:["self",a,l,r,e.HASH_COMMENT_MODE]}]};return i.contains=[r,l,a],{name:"Python",aliases:["py","gyp","ipython"],keywords:n,illegal:/(<\/|->|\?)|=>/,contains:[a,l,{beginKeywords:"if",relevance:0},r,e.HASH_COMMENT_MODE,{variants:[{className:"function",beginKeywords:"def"},{className:"class",beginKeywords:"class"}],end:/:/,illegal:/[${=;\n,]/,contains:[e.UNDERSCORE_TITLE_MODE,t,{begin:/->/,endsWithParent:!0,keywords:"None"}]},{className:"meta",begin:/^[\t ]*@/,end:/$/},{begin:/\b(print|exec)\(/}]}}}()); -hljs.registerLanguage("python-repl",function(){"use strict";return function(n){return{aliases:["pycon"],contains:[{className:"meta",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}}()); -hljs.registerLanguage("ruby",function(){"use strict";return function(e){var n="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?",a={keyword:"and then defined module in return redo if BEGIN retry end for self when next until do begin unless END rescue else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor",literal:"true false nil"},s={className:"doctag",begin:"@[A-Za-z]+"},i={begin:"#<",end:">"},r=[e.COMMENT("#","$",{contains:[s]}),e.COMMENT("^\\=begin","^\\=end",{contains:[s],relevance:10}),e.COMMENT("^__END__","\\n$")],c={className:"subst",begin:"#\\{",end:"}",keywords:a},t={className:"string",contains:[e.BACKSLASH_ESCAPE,c],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:"%[qQwWx]?\\(",end:"\\)"},{begin:"%[qQwWx]?\\[",end:"\\]"},{begin:"%[qQwWx]?{",end:"}"},{begin:"%[qQwWx]?<",end:">"},{begin:"%[qQwWx]?/",end:"/"},{begin:"%[qQwWx]?%",end:"%"},{begin:"%[qQwWx]?-",end:"-"},{begin:"%[qQwWx]?\\|",end:"\\|"},{begin:/\B\?(\\\d{1,3}|\\x[A-Fa-f0-9]{1,2}|\\u[A-Fa-f0-9]{4}|\\?\S)\b/},{begin:/<<[-~]?'?(\w+)(?:.|\n)*?\n\s*\1\b/,returnBegin:!0,contains:[{begin:/<<[-~]?'?/},e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,c]})]}]},b={className:"params",begin:"\\(",end:"\\)",endsParent:!0,keywords:a},d=[t,i,{className:"class",beginKeywords:"class module",end:"$|;",illegal:/=/,contains:[e.inherit(e.TITLE_MODE,{begin:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"}),{begin:"<\\s*",contains:[{begin:"("+e.IDENT_RE+"::)?"+e.IDENT_RE}]}].concat(r)},{className:"function",beginKeywords:"def",end:"$|;",contains:[e.inherit(e.TITLE_MODE,{begin:n}),b].concat(r)},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(\\!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[t,{begin:n}],relevance:0},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},{begin:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},{className:"params",begin:/\|/,end:/\|/,keywords:a},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[i,{className:"regexp",contains:[e.BACKSLASH_ESCAPE,c],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:"%r{",end:"}[a-z]*"},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(r),relevance:0}].concat(r);c.contains=d,b.contains=d;var g=[{begin:/^\s*=>/,starts:{end:"$",contains:d}},{className:"meta",begin:"^([>?]>|[\\w#]+\\(\\w+\\):\\d+:\\d+>|(\\w+-)?\\d+\\.\\d+\\.\\d(p\\d+)?[^>]+>)",starts:{end:"$",contains:d}}];return{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:a,illegal:/\/\*/,contains:r.concat(g).concat(d)}}}()); -hljs.registerLanguage("rust",function(){"use strict";return function(e){var n="([ui](8|16|32|64|128|size)|f(32|64))?",t="drop i8 i16 i32 i64 i128 isize u8 u16 u32 u64 u128 usize f32 f64 str char bool Box Option Result String Vec Copy Send Sized Sync Drop Fn FnMut FnOnce ToOwned Clone Debug PartialEq PartialOrd Eq Ord AsRef AsMut Into From Default Iterator Extend IntoIterator DoubleEndedIterator ExactSizeIterator SliceConcatExt ToString assert! assert_eq! bitflags! bytes! cfg! col! concat! concat_idents! debug_assert! debug_assert_eq! env! panic! file! format! format_args! include_bin! include_str! line! local_data_key! module_path! option_env! print! println! select! stringify! try! unimplemented! unreachable! vec! write! writeln! macro_rules! assert_ne! debug_assert_ne!";return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",keyword:"abstract as async await become box break const continue crate do dyn else enum extern false final fn for if impl in let loop macro match mod move mut override priv pub ref return self Self static struct super trait true try type typeof unsafe unsized use virtual where while yield",literal:"true false Some None Ok Err",built_in:t},illegal:""}]}}}()); -hljs.registerLanguage("scss",function(){"use strict";return function(e){var t={className:"variable",begin:"(\\$[a-zA-Z-][a-zA-Z0-9_-]*)\\b"},i={className:"number",begin:"#[0-9A-Fa-f]+"};return e.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,e.C_BLOCK_COMMENT_MODE,{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"selector-id",begin:"\\#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},{className:"selector-attr",begin:"\\[",end:"\\]",illegal:"$"},{className:"selector-tag",begin:"\\b(a|abbr|acronym|address|area|article|aside|audio|b|base|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|command|datalist|dd|del|details|dfn|div|dl|dt|em|embed|fieldset|figcaption|figure|footer|form|frame|frameset|(h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|keygen|label|legend|li|link|map|mark|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|rp|rt|ruby|samp|script|section|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video)\\b",relevance:0},{className:"selector-pseudo",begin:":(visited|valid|root|right|required|read-write|read-only|out-range|optional|only-of-type|only-child|nth-of-type|nth-last-of-type|nth-last-child|nth-child|not|link|left|last-of-type|last-child|lang|invalid|indeterminate|in-range|hover|focus|first-of-type|first-line|first-letter|first-child|first|enabled|empty|disabled|default|checked|before|after|active)"},{className:"selector-pseudo",begin:"::(after|before|choices|first-letter|first-line|repeat-index|repeat-item|selection|value)"},t,{className:"attribute",begin:"\\b(src|z-index|word-wrap|word-spacing|word-break|width|widows|white-space|visibility|vertical-align|unicode-bidi|transition-timing-function|transition-property|transition-duration|transition-delay|transition|transform-style|transform-origin|transform|top|text-underline-position|text-transform|text-shadow|text-rendering|text-overflow|text-indent|text-decoration-style|text-decoration-line|text-decoration-color|text-decoration|text-align-last|text-align|tab-size|table-layout|right|resize|quotes|position|pointer-events|perspective-origin|perspective|page-break-inside|page-break-before|page-break-after|padding-top|padding-right|padding-left|padding-bottom|padding|overflow-y|overflow-x|overflow-wrap|overflow|outline-width|outline-style|outline-offset|outline-color|outline|orphans|order|opacity|object-position|object-fit|normal|none|nav-up|nav-right|nav-left|nav-index|nav-down|min-width|min-height|max-width|max-height|mask|marks|margin-top|margin-right|margin-left|margin-bottom|margin|list-style-type|list-style-position|list-style-image|list-style|line-height|letter-spacing|left|justify-content|initial|inherit|ime-mode|image-orientation|image-resolution|image-rendering|icon|hyphens|height|font-weight|font-variant-ligatures|font-variant|font-style|font-stretch|font-size-adjust|font-size|font-language-override|font-kerning|font-feature-settings|font-family|font|float|flex-wrap|flex-shrink|flex-grow|flex-flow|flex-direction|flex-basis|flex|filter|empty-cells|display|direction|cursor|counter-reset|counter-increment|content|column-width|column-span|column-rule-width|column-rule-style|column-rule-color|column-rule|column-gap|column-fill|column-count|columns|color|clip-path|clip|clear|caption-side|break-inside|break-before|break-after|box-sizing|box-shadow|box-decoration-break|bottom|border-width|border-top-width|border-top-style|border-top-right-radius|border-top-left-radius|border-top-color|border-top|border-style|border-spacing|border-right-width|border-right-style|border-right-color|border-right|border-radius|border-left-width|border-left-style|border-left-color|border-left|border-image-width|border-image-source|border-image-slice|border-image-repeat|border-image-outset|border-image|border-color|border-collapse|border-bottom-width|border-bottom-style|border-bottom-right-radius|border-bottom-left-radius|border-bottom-color|border-bottom|border|background-size|background-repeat|background-position|background-origin|background-image|background-color|background-clip|background-attachment|background-blend-mode|background|backface-visibility|auto|animation-timing-function|animation-play-state|animation-name|animation-iteration-count|animation-fill-mode|animation-duration|animation-direction|animation-delay|animation|align-self|align-items|align-content)\\b",illegal:"[^\\s]"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:":",end:";",contains:[t,i,e.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"meta",begin:"!important"}]},{begin:"@(page|font-face)",lexemes:"@[a-z-]+",keywords:"@page @font-face"},{begin:"@",end:"[{;]",returnBegin:!0,keywords:"and or not only",contains:[{begin:"@[a-z-]+",className:"keyword"},t,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,i,e.CSS_NUMBER_MODE]}]}}}()); -hljs.registerLanguage("shell",function(){"use strict";return function(s){return{name:"Shell Session",aliases:["console"],contains:[{className:"meta",begin:"^\\s{0,3}[/\\w\\d\\[\\]()@-]*[>%$#]",starts:{end:"$",subLanguage:"bash"}}]}}}()); -hljs.registerLanguage("sql",function(){"use strict";return function(e){var t=e.COMMENT("--","$");return{name:"SQL",case_insensitive:!0,illegal:/[<>{}*]/,contains:[{beginKeywords:"begin end start commit rollback savepoint lock alter create drop rename call delete do handler insert load replace select truncate update set show pragma grant merge describe use explain help declare prepare execute deallocate release unlock purge reset change stop analyze cache flush optimize repair kill install uninstall checksum restore check backup revoke comment values with",end:/;/,endsWithParent:!0,keywords:{$pattern:/[\w\.]+/,keyword:"as abort abs absolute acc acce accep accept access accessed accessible account acos action activate add addtime admin administer advanced advise aes_decrypt aes_encrypt after agent aggregate ali alia alias all allocate allow alter always analyze ancillary and anti any anydata anydataset anyschema anytype apply archive archived archivelog are as asc ascii asin assembly assertion associate asynchronous at atan atn2 attr attri attrib attribu attribut attribute attributes audit authenticated authentication authid authors auto autoallocate autodblink autoextend automatic availability avg backup badfile basicfile before begin beginning benchmark between bfile bfile_base big bigfile bin binary_double binary_float binlog bit_and bit_count bit_length bit_or bit_xor bitmap blob_base block blocksize body both bound bucket buffer_cache buffer_pool build bulk by byte byteordermark bytes cache caching call calling cancel capacity cascade cascaded case cast catalog category ceil ceiling chain change changed char_base char_length character_length characters characterset charindex charset charsetform charsetid check checksum checksum_agg child choose chr chunk class cleanup clear client clob clob_base clone close cluster_id cluster_probability cluster_set clustering coalesce coercibility col collate collation collect colu colum column column_value columns columns_updated comment commit compact compatibility compiled complete composite_limit compound compress compute concat concat_ws concurrent confirm conn connec connect connect_by_iscycle connect_by_isleaf connect_by_root connect_time connection consider consistent constant constraint constraints constructor container content contents context contributors controlfile conv convert convert_tz corr corr_k corr_s corresponding corruption cos cost count count_big counted covar_pop covar_samp cpu_per_call cpu_per_session crc32 create creation critical cross cube cume_dist curdate current current_date current_time current_timestamp current_user cursor curtime customdatum cycle data database databases datafile datafiles datalength date_add date_cache date_format date_sub dateadd datediff datefromparts datename datepart datetime2fromparts day day_to_second dayname dayofmonth dayofweek dayofyear days db_role_change dbtimezone ddl deallocate declare decode decompose decrement decrypt deduplicate def defa defau defaul default defaults deferred defi defin define degrees delayed delegate delete delete_all delimited demand dense_rank depth dequeue des_decrypt des_encrypt des_key_file desc descr descri describ describe descriptor deterministic diagnostics difference dimension direct_load directory disable disable_all disallow disassociate discardfile disconnect diskgroup distinct distinctrow distribute distributed div do document domain dotnet double downgrade drop dumpfile duplicate duration each edition editionable editions element ellipsis else elsif elt empty enable enable_all enclosed encode encoding encrypt end end-exec endian enforced engine engines enqueue enterprise entityescaping eomonth error errors escaped evalname evaluate event eventdata events except exception exceptions exchange exclude excluding execu execut execute exempt exists exit exp expire explain explode export export_set extended extent external external_1 external_2 externally extract failed failed_login_attempts failover failure far fast feature_set feature_value fetch field fields file file_name_convert filesystem_like_logging final finish first first_value fixed flash_cache flashback floor flush following follows for forall force foreign form forma format found found_rows freelist freelists freepools fresh from from_base64 from_days ftp full function general generated get get_format get_lock getdate getutcdate global global_name globally go goto grant grants greatest group group_concat group_id grouping grouping_id groups gtid_subtract guarantee guard handler hash hashkeys having hea head headi headin heading heap help hex hierarchy high high_priority hosts hour hours http id ident_current ident_incr ident_seed identified identity idle_time if ifnull ignore iif ilike ilm immediate import in include including increment index indexes indexing indextype indicator indices inet6_aton inet6_ntoa inet_aton inet_ntoa infile initial initialized initially initrans inmemory inner innodb input insert install instance instantiable instr interface interleaved intersect into invalidate invisible is is_free_lock is_ipv4 is_ipv4_compat is_not is_not_null is_used_lock isdate isnull isolation iterate java join json json_exists keep keep_duplicates key keys kill language large last last_day last_insert_id last_value lateral lax lcase lead leading least leaves left len lenght length less level levels library like like2 like4 likec limit lines link list listagg little ln load load_file lob lobs local localtime localtimestamp locate locator lock locked log log10 log2 logfile logfiles logging logical logical_reads_per_call logoff logon logs long loop low low_priority lower lpad lrtrim ltrim main make_set makedate maketime managed management manual map mapping mask master master_pos_wait match matched materialized max maxextents maximize maxinstances maxlen maxlogfiles maxloghistory maxlogmembers maxsize maxtrans md5 measures median medium member memcompress memory merge microsecond mid migration min minextents minimum mining minus minute minutes minvalue missing mod mode model modification modify module monitoring month months mount move movement multiset mutex name name_const names nan national native natural nav nchar nclob nested never new newline next nextval no no_write_to_binlog noarchivelog noaudit nobadfile nocheck nocompress nocopy nocycle nodelay nodiscardfile noentityescaping noguarantee nokeep nologfile nomapping nomaxvalue nominimize nominvalue nomonitoring none noneditionable nonschema noorder nopr nopro noprom nopromp noprompt norely noresetlogs noreverse normal norowdependencies noschemacheck noswitch not nothing notice notnull notrim novalidate now nowait nth_value nullif nulls num numb numbe nvarchar nvarchar2 object ocicoll ocidate ocidatetime ociduration ociinterval ociloblocator ocinumber ociref ocirefcursor ocirowid ocistring ocitype oct octet_length of off offline offset oid oidindex old on online only opaque open operations operator optimal optimize option optionally or oracle oracle_date oradata ord ordaudio orddicom orddoc order ordimage ordinality ordvideo organization orlany orlvary out outer outfile outline output over overflow overriding package pad parallel parallel_enable parameters parent parse partial partition partitions pascal passing password password_grace_time password_lock_time password_reuse_max password_reuse_time password_verify_function patch path patindex pctincrease pctthreshold pctused pctversion percent percent_rank percentile_cont percentile_disc performance period period_add period_diff permanent physical pi pipe pipelined pivot pluggable plugin policy position post_transaction pow power pragma prebuilt precedes preceding precision prediction prediction_cost prediction_details prediction_probability prediction_set prepare present preserve prior priority private private_sga privileges procedural procedure procedure_analyze processlist profiles project prompt protection public publishingservername purge quarter query quick quiesce quota quotename radians raise rand range rank raw read reads readsize rebuild record records recover recovery recursive recycle redo reduced ref reference referenced references referencing refresh regexp_like register regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy reject rekey relational relative relaylog release release_lock relies_on relocate rely rem remainder rename repair repeat replace replicate replication required reset resetlogs resize resource respect restore restricted result result_cache resumable resume retention return returning returns reuse reverse revoke right rlike role roles rollback rolling rollup round row row_count rowdependencies rowid rownum rows rtrim rules safe salt sample save savepoint sb1 sb2 sb4 scan schema schemacheck scn scope scroll sdo_georaster sdo_topo_geometry search sec_to_time second seconds section securefile security seed segment select self semi sequence sequential serializable server servererror session session_user sessions_per_user set sets settings sha sha1 sha2 share shared shared_pool short show shrink shutdown si_averagecolor si_colorhistogram si_featurelist si_positionalcolor si_stillimage si_texture siblings sid sign sin size size_t sizes skip slave sleep smalldatetimefromparts smallfile snapshot some soname sort soundex source space sparse spfile split sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_small_result sql_variant_property sqlcode sqldata sqlerror sqlname sqlstate sqrt square standalone standby start starting startup statement static statistics stats_binomial_test stats_crosstab stats_ks_test stats_mode stats_mw_test stats_one_way_anova stats_t_test_ stats_t_test_indep stats_t_test_one stats_t_test_paired stats_wsr_test status std stddev stddev_pop stddev_samp stdev stop storage store stored str str_to_date straight_join strcmp strict string struct stuff style subdate subpartition subpartitions substitutable substr substring subtime subtring_index subtype success sum suspend switch switchoffset switchover sync synchronous synonym sys sys_xmlagg sysasm sysaux sysdate sysdatetimeoffset sysdba sysoper system system_user sysutcdatetime table tables tablespace tablesample tan tdo template temporary terminated tertiary_weights test than then thread through tier ties time time_format time_zone timediff timefromparts timeout timestamp timestampadd timestampdiff timezone_abbr timezone_minute timezone_region to to_base64 to_date to_days to_seconds todatetimeoffset trace tracking transaction transactional translate translation treat trigger trigger_nestlevel triggers trim truncate try_cast try_convert try_parse type ub1 ub2 ub4 ucase unarchived unbounded uncompress under undo unhex unicode uniform uninstall union unique unix_timestamp unknown unlimited unlock unnest unpivot unrecoverable unsafe unsigned until untrusted unusable unused update updated upgrade upped upper upsert url urowid usable usage use use_stored_outlines user user_data user_resources users using utc_date utc_timestamp uuid uuid_short validate validate_password_strength validation valist value values var var_samp varcharc vari varia variab variabl variable variables variance varp varraw varrawc varray verify version versions view virtual visible void wait wallet warning warnings week weekday weekofyear wellformed when whene whenev wheneve whenever where while whitespace window with within without work wrapped xdb xml xmlagg xmlattributes xmlcast xmlcolattval xmlelement xmlexists xmlforest xmlindex xmlnamespaces xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltype xor year year_to_month years yearweek",literal:"true false null unknown",built_in:"array bigint binary bit blob bool boolean char character date dec decimal float int int8 integer interval number numeric real record serial serial8 smallint text time timestamp tinyint varchar varchar2 varying void"},contains:[{className:"string",begin:"'",end:"'",contains:[{begin:"''"}]},{className:"string",begin:'"',end:'"',contains:[{begin:'""'}]},{className:"string",begin:"`",end:"`"},e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,t,e.HASH_COMMENT_MODE]},e.C_BLOCK_COMMENT_MODE,t,e.HASH_COMMENT_MODE]}}}()); -hljs.registerLanguage("swift",function(){"use strict";return function(e){var i={keyword:"#available #colorLiteral #column #else #elseif #endif #file #fileLiteral #function #if #imageLiteral #line #selector #sourceLocation _ __COLUMN__ __FILE__ __FUNCTION__ __LINE__ Any as as! as? associatedtype associativity break case catch class continue convenience default defer deinit didSet do dynamic dynamicType else enum extension fallthrough false fileprivate final for func get guard if import in indirect infix init inout internal is lazy left let mutating nil none nonmutating open operator optional override postfix precedence prefix private protocol Protocol public repeat required rethrows return right self Self set static struct subscript super switch throw throws true try try! try? Type typealias unowned var weak where while willSet",literal:"true false nil",built_in:"abs advance alignof alignofValue anyGenerator assert assertionFailure bridgeFromObjectiveC bridgeFromObjectiveCUnconditional bridgeToObjectiveC bridgeToObjectiveCUnconditional c compactMap contains count countElements countLeadingZeros debugPrint debugPrintln distance dropFirst dropLast dump encodeBitsAsWords enumerate equal fatalError filter find getBridgedObjectiveCType getVaList indices insertionSort isBridgedToObjectiveC isBridgedVerbatimToObjectiveC isUniquelyReferenced isUniquelyReferencedNonObjC join lazy lexicographicalCompare map max maxElement min minElement numericCast overlaps partition posix precondition preconditionFailure print println quickSort readLine reduce reflect reinterpretCast reverse roundUpToAlignment sizeof sizeofValue sort split startsWith stride strideof strideofValue swap toString transcode underestimateCount unsafeAddressOf unsafeBitCast unsafeDowncast unsafeUnwrap unsafeReflect withExtendedLifetime withObjectAtPlusZero withUnsafePointer withUnsafePointerToObject withUnsafeMutablePointer withUnsafeMutablePointers withUnsafePointer withUnsafePointers withVaList zip"},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),t={className:"subst",begin:/\\\(/,end:"\\)",keywords:i,contains:[]},a={className:"string",contains:[e.BACKSLASH_ESCAPE,t],variants:[{begin:/"""/,end:/"""/},{begin:/"/,end:/"/}]},r={className:"number",begin:"\\b([\\d_]+(\\.[\\deE_]+)?|0x[a-fA-F0-9_]+(\\.[a-fA-F0-9p_]+)?|0b[01_]+|0o[0-7_]+)\\b",relevance:0};return t.contains=[r],{name:"Swift",keywords:i,contains:[a,e.C_LINE_COMMENT_MODE,n,{className:"type",begin:"\\b[A-Z][\\wÀ-ʸ']*[!?]"},{className:"type",begin:"\\b[A-Z][\\wÀ-ʸ']*",relevance:0},r,{className:"function",beginKeywords:"func",end:"{",excludeEnd:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/[A-Za-z$_][0-9A-Za-z$_]*/}),{begin://},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:i,contains:["self",r,a,e.C_BLOCK_COMMENT_MODE,{begin:":"}],illegal:/["']/}],illegal:/\[|%/},{className:"class",beginKeywords:"struct protocol class extension enum",keywords:i,end:"\\{",excludeEnd:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/[A-Za-z$_][\u00C0-\u02B80-9A-Za-z$_]*/})]},{className:"meta",begin:"(@discardableResult|@warn_unused_result|@exported|@lazy|@noescape|@NSCopying|@NSManaged|@objc|@objcMembers|@convention|@required|@noreturn|@IBAction|@IBDesignable|@IBInspectable|@IBOutlet|@infix|@prefix|@postfix|@autoclosure|@testable|@available|@nonobjc|@NSApplicationMain|@UIApplicationMain|@dynamicMemberLookup|@propertyWrapper)\\b"},{beginKeywords:"import",end:/$/,contains:[e.C_LINE_COMMENT_MODE,n]}]}}}()); -hljs.registerLanguage("typescript",function(){"use strict";const e=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],n=["true","false","null","undefined","NaN","Infinity"],a=[].concat(["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],["arguments","this","super","console","window","document","localStorage","module","global"],["Intl","DataView","Number","Math","Date","String","RegExp","Object","Function","Boolean","Error","Symbol","Set","Map","WeakSet","WeakMap","Proxy","Reflect","JSON","Promise","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Float32Array","Array","Uint8Array","Uint8ClampedArray","ArrayBuffer"],["EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"]);return function(r){var t={$pattern:"[A-Za-z$_][0-9A-Za-z$_]*",keyword:e.concat(["type","namespace","typedef","interface","public","private","protected","implements","declare","abstract","readonly"]).join(" "),literal:n.join(" "),built_in:a.concat(["any","void","number","boolean","string","object","never","enum"]).join(" ")},s={className:"meta",begin:"@[A-Za-z$_][0-9A-Za-z$_]*"},i={className:"number",variants:[{begin:"\\b(0[bB][01]+)n?"},{begin:"\\b(0[oO][0-7]+)n?"},{begin:r.C_NUMBER_RE+"n?"}],relevance:0},o={className:"subst",begin:"\\$\\{",end:"\\}",keywords:t,contains:[]},c={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[r.BACKSLASH_ESCAPE,o],subLanguage:"xml"}},l={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[r.BACKSLASH_ESCAPE,o],subLanguage:"css"}},E={className:"string",begin:"`",end:"`",contains:[r.BACKSLASH_ESCAPE,o]};o.contains=[r.APOS_STRING_MODE,r.QUOTE_STRING_MODE,c,l,E,i,r.REGEXP_MODE];var d={begin:"\\(",end:/\)/,keywords:t,contains:["self",r.QUOTE_STRING_MODE,r.APOS_STRING_MODE,r.NUMBER_MODE]},u={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:t,contains:[r.C_LINE_COMMENT_MODE,r.C_BLOCK_COMMENT_MODE,s,d]};return{name:"TypeScript",aliases:["ts"],keywords:t,contains:[r.SHEBANG(),{className:"meta",begin:/^\s*['"]use strict['"]/},r.APOS_STRING_MODE,r.QUOTE_STRING_MODE,c,l,E,r.C_LINE_COMMENT_MODE,r.C_BLOCK_COMMENT_MODE,i,{begin:"("+r.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",contains:[r.C_LINE_COMMENT_MODE,r.C_BLOCK_COMMENT_MODE,r.REGEXP_MODE,{className:"function",begin:"(\\([^(]*(\\([^(]*(\\([^(]*\\))?\\))?\\)|"+r.UNDERSCORE_IDENT_RE+")\\s*=>",returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:r.UNDERSCORE_IDENT_RE},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:t,contains:d.contains}]}]}],relevance:0},{className:"function",beginKeywords:"function",end:/[\{;]/,excludeEnd:!0,keywords:t,contains:["self",r.inherit(r.TITLE_MODE,{begin:"[A-Za-z$_][0-9A-Za-z$_]*"}),u],illegal:/%/,relevance:0},{beginKeywords:"constructor",end:/[\{;]/,excludeEnd:!0,contains:["self",u]},{begin:/module\./,keywords:{built_in:"module"},relevance:0},{beginKeywords:"module",end:/\{/,excludeEnd:!0},{beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:"interface extends"},{begin:/\$[(.]/},{begin:"\\."+r.IDENT_RE,relevance:0},s,d]}}}()); -hljs.registerLanguage("yaml",function(){"use strict";return function(e){var n="true false yes no null",a="[\\w#;/?:@&=+$,.~*\\'()[\\]]+",s={className:"string",relevance:0,variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,{className:"template-variable",variants:[{begin:"{{",end:"}}"},{begin:"%{",end:"}"}]}]},i=e.inherit(s,{variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),l={end:",",endsWithParent:!0,excludeEnd:!0,contains:[],keywords:n,relevance:0},t={begin:"{",end:"}",contains:[l],illegal:"\\n",relevance:0},g={begin:"\\[",end:"\\]",contains:[l],illegal:"\\n",relevance:0},b=[{className:"attr",variants:[{begin:"\\w[\\w :\\/.-]*:(?=[ \t]|$)"},{begin:'"\\w[\\w :\\/.-]*":(?=[ \t]|$)'},{begin:"'\\w[\\w :\\/.-]*':(?=[ \t]|$)"}]},{className:"meta",begin:"^---s*$",relevance:10},{className:"string",begin:"[\\|>]([0-9]?[+-])?[ ]*\\n( *)[\\S ]+\\n(\\2[\\S ]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+a},{className:"type",begin:"!<"+a+">"},{className:"type",begin:"!"+a},{className:"type",begin:"!!"+a},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"\\-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:n,keywords:{literal:n}},{className:"number",begin:"\\b[0-9]{4}(-[0-9][0-9]){0,2}([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?(\\.[0-9]*)?([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?\\b"},{className:"number",begin:e.C_NUMBER_RE+"\\b"},t,g,s],c=[...b];return c.pop(),c.push(i),l.contains=c,{name:"YAML",case_insensitive:!0,aliases:["yml","YAML"],contains:b}}}()); -hljs.registerLanguage("armasm",function(){"use strict";return function(s){const e={variants:[s.COMMENT("^[ \\t]*(?=#)","$",{relevance:0,excludeBegin:!0}),s.COMMENT("[;@]","$",{relevance:0}),s.C_LINE_COMMENT_MODE,s.C_BLOCK_COMMENT_MODE]};return{name:"ARM Assembly",case_insensitive:!0,aliases:["arm"],keywords:{$pattern:"\\.?"+s.IDENT_RE,meta:".2byte .4byte .align .ascii .asciz .balign .byte .code .data .else .end .endif .endm .endr .equ .err .exitm .extern .global .hword .if .ifdef .ifndef .include .irp .long .macro .rept .req .section .set .skip .space .text .word .arm .thumb .code16 .code32 .force_thumb .thumb_func .ltorg ALIAS ALIGN ARM AREA ASSERT ATTR CN CODE CODE16 CODE32 COMMON CP DATA DCB DCD DCDU DCDO DCFD DCFDU DCI DCQ DCQU DCW DCWU DN ELIF ELSE END ENDFUNC ENDIF ENDP ENTRY EQU EXPORT EXPORTAS EXTERN FIELD FILL FUNCTION GBLA GBLL GBLS GET GLOBAL IF IMPORT INCBIN INCLUDE INFO KEEP LCLA LCLL LCLS LTORG MACRO MAP MEND MEXIT NOFP OPT PRESERVE8 PROC QN READONLY RELOC REQUIRE REQUIRE8 RLIST FN ROUT SETA SETL SETS SN SPACE SUBT THUMB THUMBX TTL WHILE WEND ",built_in:"r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 pc lr sp ip sl sb fp a1 a2 a3 a4 v1 v2 v3 v4 v5 v6 v7 v8 f0 f1 f2 f3 f4 f5 f6 f7 p0 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 c0 c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 c13 c14 c15 q0 q1 q2 q3 q4 q5 q6 q7 q8 q9 q10 q11 q12 q13 q14 q15 cpsr_c cpsr_x cpsr_s cpsr_f cpsr_cx cpsr_cxs cpsr_xs cpsr_xsf cpsr_sf cpsr_cxsf spsr_c spsr_x spsr_s spsr_f spsr_cx spsr_cxs spsr_xs spsr_xsf spsr_sf spsr_cxsf s0 s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14 s15 s16 s17 s18 s19 s20 s21 s22 s23 s24 s25 s26 s27 s28 s29 s30 s31 d0 d1 d2 d3 d4 d5 d6 d7 d8 d9 d10 d11 d12 d13 d14 d15 d16 d17 d18 d19 d20 d21 d22 d23 d24 d25 d26 d27 d28 d29 d30 d31 {PC} {VAR} {TRUE} {FALSE} {OPT} {CONFIG} {ENDIAN} {CODESIZE} {CPU} {FPU} {ARCHITECTURE} {PCSTOREOFFSET} {ARMASM_VERSION} {INTER} {ROPI} {RWPI} {SWST} {NOSWST} . @"},contains:[{className:"keyword",begin:"\\b(adc|(qd?|sh?|u[qh]?)?add(8|16)?|usada?8|(q|sh?|u[qh]?)?(as|sa)x|and|adrl?|sbc|rs[bc]|asr|b[lx]?|blx|bxj|cbn?z|tb[bh]|bic|bfc|bfi|[su]bfx|bkpt|cdp2?|clz|clrex|cmp|cmn|cpsi[ed]|cps|setend|dbg|dmb|dsb|eor|isb|it[te]{0,3}|lsl|lsr|ror|rrx|ldm(([id][ab])|f[ds])?|ldr((s|ex)?[bhd])?|movt?|mvn|mra|mar|mul|[us]mull|smul[bwt][bt]|smu[as]d|smmul|smmla|mla|umlaal|smlal?([wbt][bt]|d)|mls|smlsl?[ds]|smc|svc|sev|mia([bt]{2}|ph)?|mrr?c2?|mcrr2?|mrs|msr|orr|orn|pkh(tb|bt)|rbit|rev(16|sh)?|sel|[su]sat(16)?|nop|pop|push|rfe([id][ab])?|stm([id][ab])?|str(ex)?[bhd]?|(qd?)?sub|(sh?|q|u[qh]?)?sub(8|16)|[su]xt(a?h|a?b(16)?)|srs([id][ab])?|swpb?|swi|smi|tst|teq|wfe|wfi|yield)(eq|ne|cs|cc|mi|pl|vs|vc|hi|ls|ge|lt|gt|le|al|hs|lo)?[sptrx]?(?=\\s)"},e,s.QUOTE_STRING_MODE,{className:"string",begin:"'",end:"[^\\\\]'",relevance:0},{className:"title",begin:"\\|",end:"\\|",illegal:"\\n",relevance:0},{className:"number",variants:[{begin:"[#$=]?0x[0-9a-f]+"},{begin:"[#$=]?0b[01]+"},{begin:"[#$=]\\d+"},{begin:"\\b\\d+"}],relevance:0},{className:"symbol",variants:[{begin:"^[ \\t]*[a-z_\\.\\$][a-z0-9_\\.\\$]+:"},{begin:"^[a-z_\\.\\$][a-z0-9_\\.\\$]+"},{begin:"[=#]\\w+"}],relevance:0}]}}}()); -hljs.registerLanguage("d",function(){"use strict";return function(e){var a={$pattern:e.UNDERSCORE_IDENT_RE,keyword:"abstract alias align asm assert auto body break byte case cast catch class const continue debug default delete deprecated do else enum export extern final finally for foreach foreach_reverse|10 goto if immutable import in inout int interface invariant is lazy macro mixin module new nothrow out override package pragma private protected public pure ref return scope shared static struct super switch synchronized template this throw try typedef typeid typeof union unittest version void volatile while with __FILE__ __LINE__ __gshared|10 __thread __traits __DATE__ __EOF__ __TIME__ __TIMESTAMP__ __VENDOR__ __VERSION__",built_in:"bool cdouble cent cfloat char creal dchar delegate double dstring float function idouble ifloat ireal long real short string ubyte ucent uint ulong ushort wchar wstring",literal:"false null true"},d="((0|[1-9][\\d_]*)|0[bB][01_]+|0[xX]([\\da-fA-F][\\da-fA-F_]*|_[\\da-fA-F][\\da-fA-F_]*))",n="\\\\(['\"\\?\\\\abfnrtv]|u[\\dA-Fa-f]{4}|[0-7]{1,3}|x[\\dA-Fa-f]{2}|U[\\dA-Fa-f]{8})|&[a-zA-Z\\d]{2,};",t={className:"number",begin:"\\b"+d+"(L|u|U|Lu|LU|uL|UL)?",relevance:0},_={className:"number",begin:"\\b(((0[xX](([\\da-fA-F][\\da-fA-F_]*|_[\\da-fA-F][\\da-fA-F_]*)\\.([\\da-fA-F][\\da-fA-F_]*|_[\\da-fA-F][\\da-fA-F_]*)|\\.?([\\da-fA-F][\\da-fA-F_]*|_[\\da-fA-F][\\da-fA-F_]*))[pP][+-]?(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d))|((0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d)(\\.\\d*|([eE][+-]?(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d)))|\\d+\\.(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d)(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d)|\\.(0|[1-9][\\d_]*)([eE][+-]?(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d))?))([fF]|L|i|[fF]i|Li)?|"+d+"(i|[fF]i|Li))",relevance:0},r={className:"string",begin:"'("+n+"|.)",end:"'",illegal:"."},i={className:"string",begin:'"',contains:[{begin:n,relevance:0}],end:'"[cwd]?'},s=e.COMMENT("\\/\\+","\\+\\/",{contains:["self"],relevance:10});return{name:"D",keywords:a,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,s,{className:"string",begin:'x"[\\da-fA-F\\s\\n\\r]*"[cwd]?',relevance:10},i,{className:"string",begin:'[rq]"',end:'"[cwd]?',relevance:5},{className:"string",begin:"`",end:"`[cwd]?"},{className:"string",begin:'q"\\{',end:'\\}"'},_,t,r,{className:"meta",begin:"^#!",end:"$",relevance:5},{className:"meta",begin:"#(line)",end:"$",relevance:5},{className:"keyword",begin:"@[a-zA-Z_][a-zA-Z_\\d]*"}]}}}()); -hljs.registerLanguage("handlebars",function(){"use strict";function e(...e){return e.map(e=>(function(e){return e?"string"==typeof e?e:e.source:null})(e)).join("")}return function(n){const a={"builtin-name":"action bindattr collection component concat debugger each each-in get hash if in input link-to loc log lookup mut outlet partial query-params render template textarea unbound unless view with yield"},t=/\[.*?\]/,s=/[^\s!"#%&'()*+,.\/;<=>@\[\\\]^`{|}~]+/,i=e("(",/'.*?'/,"|",/".*?"/,"|",t,"|",s,"|",/\.|\//,")+"),r=e("(",t,"|",s,")(?==)"),l={begin:i,lexemes:/[\w.\/]+/},c=n.inherit(l,{keywords:{literal:"true false undefined null"}}),o={begin:/\(/,end:/\)/},m={className:"attr",begin:r,relevance:0,starts:{begin:/=/,end:/=/,starts:{contains:[n.NUMBER_MODE,n.QUOTE_STRING_MODE,n.APOS_STRING_MODE,c,o]}}},d={contains:[n.NUMBER_MODE,n.QUOTE_STRING_MODE,n.APOS_STRING_MODE,{begin:/as\s+\|/,keywords:{keyword:"as"},end:/\|/,contains:[{begin:/\w+/}]},m,c,o],returnEnd:!0},g=n.inherit(l,{className:"name",keywords:a,starts:n.inherit(d,{end:/\)/})});o.contains=[g];const u=n.inherit(l,{keywords:a,className:"name",starts:n.inherit(d,{end:/}}/})}),b=n.inherit(l,{keywords:a,className:"name"}),h=n.inherit(l,{className:"name",keywords:a,starts:n.inherit(d,{end:/}}/})});return{name:"Handlebars",aliases:["hbs","html.hbs","html.handlebars","htmlbars"],case_insensitive:!0,subLanguage:"xml",contains:[{begin:/\\\{\{/,skip:!0},{begin:/\\\\(?=\{\{)/,skip:!0},n.COMMENT(/\{\{!--/,/--\}\}/),n.COMMENT(/\{\{!/,/\}\}/),{className:"template-tag",begin:/\{\{\{\{(?!\/)/,end:/\}\}\}\}/,contains:[u],starts:{end:/\{\{\{\{\//,returnEnd:!0,subLanguage:"xml"}},{className:"template-tag",begin:/\{\{\{\{\//,end:/\}\}\}\}/,contains:[b]},{className:"template-tag",begin:/\{\{#/,end:/\}\}/,contains:[u]},{className:"template-tag",begin:/\{\{(?=else\}\})/,end:/\}\}/,keywords:"else"},{className:"template-tag",begin:/\{\{\//,end:/\}\}/,contains:[b]},{className:"template-variable",begin:/\{\{\{/,end:/\}\}\}/,contains:[h]},{className:"template-variable",begin:/\{\{/,end:/\}\}/,contains:[h]}]}}}()); -hljs.registerLanguage("haskell",function(){"use strict";return function(e){var n={variants:[e.COMMENT("--","$"),e.COMMENT("{-","-}",{contains:["self"]})]},i={className:"meta",begin:"{-#",end:"#-}"},a={className:"meta",begin:"^#",end:"$"},s={className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},l={begin:"\\(",end:"\\)",illegal:'"',contains:[i,a,{className:"type",begin:"\\b[A-Z][\\w]*(\\((\\.\\.|,|\\w+)\\))?"},e.inherit(e.TITLE_MODE,{begin:"[_a-z][\\w']*"}),n]};return{name:"Haskell",aliases:["hs"],keywords:"let in if then else case of where do module import hiding qualified type data newtype deriving class instance as default infix infixl infixr foreign export ccall stdcall cplusplus jvm dotnet safe unsafe family forall mdo proc rec",contains:[{beginKeywords:"module",end:"where",keywords:"module where",contains:[l,n],illegal:"\\W\\.|;"},{begin:"\\bimport\\b",end:"$",keywords:"import qualified as hiding",contains:[l,n],illegal:"\\W\\.|;"},{className:"class",begin:"^(\\s*)?(class|instance)\\b",end:"where",keywords:"class family instance where",contains:[s,l,n]},{className:"class",begin:"\\b(data|(new)?type)\\b",end:"$",keywords:"data family type newtype deriving",contains:[i,s,l,{begin:"{",end:"}",contains:l.contains},n]},{beginKeywords:"default",end:"$",contains:[s,l,n]},{beginKeywords:"infix infixl infixr",end:"$",contains:[e.C_NUMBER_MODE,n]},{begin:"\\bforeign\\b",end:"$",keywords:"foreign import export ccall stdcall cplusplus jvm dotnet safe unsafe",contains:[s,e.QUOTE_STRING_MODE,n]},{className:"meta",begin:"#!\\/usr\\/bin\\/env runhaskell",end:"$"},i,a,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,s,e.inherit(e.TITLE_MODE,{begin:"^[_a-z][\\w']*"}),n,{begin:"->|<-"}]}}}()); -hljs.registerLanguage("julia",function(){"use strict";return function(e){var r="[A-Za-z_\\u00A1-\\uFFFF][A-Za-z_0-9\\u00A1-\\uFFFF]*",t={$pattern:r,keyword:"in isa where baremodule begin break catch ccall const continue do else elseif end export false finally for function global if import importall let local macro module quote return true try using while type immutable abstract bitstype typealias ",literal:"true false ARGS C_NULL DevNull ENDIAN_BOM ENV I Inf Inf16 Inf32 Inf64 InsertionSort JULIA_HOME LOAD_PATH MergeSort NaN NaN16 NaN32 NaN64 PROGRAM_FILE QuickSort RoundDown RoundFromZero RoundNearest RoundNearestTiesAway RoundNearestTiesUp RoundToZero RoundUp STDERR STDIN STDOUT VERSION catalan e|0 eu|0 eulergamma golden im nothing pi γ π φ ",built_in:"ANY AbstractArray AbstractChannel AbstractFloat AbstractMatrix AbstractRNG AbstractSerializer AbstractSet AbstractSparseArray AbstractSparseMatrix AbstractSparseVector AbstractString AbstractUnitRange AbstractVecOrMat AbstractVector Any ArgumentError Array AssertionError Associative Base64DecodePipe Base64EncodePipe Bidiagonal BigFloat BigInt BitArray BitMatrix BitVector Bool BoundsError BufferStream CachingPool CapturedException CartesianIndex CartesianRange Cchar Cdouble Cfloat Channel Char Cint Cintmax_t Clong Clonglong ClusterManager Cmd CodeInfo Colon Complex Complex128 Complex32 Complex64 CompositeException Condition ConjArray ConjMatrix ConjVector Cptrdiff_t Cshort Csize_t Cssize_t Cstring Cuchar Cuint Cuintmax_t Culong Culonglong Cushort Cwchar_t Cwstring DataType Date DateFormat DateTime DenseArray DenseMatrix DenseVecOrMat DenseVector Diagonal Dict DimensionMismatch Dims DirectIndexString Display DivideError DomainError EOFError EachLine Enum Enumerate ErrorException Exception ExponentialBackOff Expr Factorization FileMonitor Float16 Float32 Float64 Function Future GlobalRef GotoNode HTML Hermitian IO IOBuffer IOContext IOStream IPAddr IPv4 IPv6 IndexCartesian IndexLinear IndexStyle InexactError InitError Int Int128 Int16 Int32 Int64 Int8 IntSet Integer InterruptException InvalidStateException Irrational KeyError LabelNode LinSpace LineNumberNode LoadError LowerTriangular MIME Matrix MersenneTwister Method MethodError MethodTable Module NTuple NewvarNode NullException Nullable Number ObjectIdDict OrdinalRange OutOfMemoryError OverflowError Pair ParseError PartialQuickSort PermutedDimsArray Pipe PollingFileWatcher ProcessExitedException Ptr QuoteNode RandomDevice Range RangeIndex Rational RawFD ReadOnlyMemoryError Real ReentrantLock Ref Regex RegexMatch RemoteChannel RemoteException RevString RoundingMode RowVector SSAValue SegmentationFault SerializationState Set SharedArray SharedMatrix SharedVector Signed SimpleVector Slot SlotNumber SparseMatrixCSC SparseVector StackFrame StackOverflowError StackTrace StepRange StepRangeLen StridedArray StridedMatrix StridedVecOrMat StridedVector String SubArray SubString SymTridiagonal Symbol Symmetric SystemError TCPSocket Task Text TextDisplay Timer Tridiagonal Tuple Type TypeError TypeMapEntry TypeMapLevel TypeName TypeVar TypedSlot UDPSocket UInt UInt128 UInt16 UInt32 UInt64 UInt8 UndefRefError UndefVarError UnicodeError UniformScaling Union UnionAll UnitRange Unsigned UpperTriangular Val Vararg VecElement VecOrMat Vector VersionNumber Void WeakKeyDict WeakRef WorkerConfig WorkerPool "},a={keywords:t,illegal:/<\//},n={className:"subst",begin:/\$\(/,end:/\)/,keywords:t},o={className:"variable",begin:"\\$"+r},i={className:"string",contains:[e.BACKSLASH_ESCAPE,n,o],variants:[{begin:/\w*"""/,end:/"""\w*/,relevance:10},{begin:/\w*"/,end:/"\w*/}]},l={className:"string",contains:[e.BACKSLASH_ESCAPE,n,o],begin:"`",end:"`"},s={className:"meta",begin:"@"+r};return a.name="Julia",a.contains=[{className:"number",begin:/(\b0x[\d_]*(\.[\d_]*)?|0x\.\d[\d_]*)p[-+]?\d+|\b0[box][a-fA-F0-9][a-fA-F0-9_]*|(\b\d[\d_]*(\.[\d_]*)?|\.\d[\d_]*)([eEfF][-+]?\d+)?/,relevance:0},{className:"string",begin:/'(.|\\[xXuU][a-zA-Z0-9]+)'/},i,l,s,{className:"comment",variants:[{begin:"#=",end:"=#",relevance:10},{begin:"#",end:"$"}]},e.HASH_COMMENT_MODE,{className:"keyword",begin:"\\b(((abstract|primitive)\\s+)type|(mutable\\s+)?struct)\\b"},{begin:/<:/}],n.contains=a.contains,a}}()); -hljs.registerLanguage("nim",function(){"use strict";return function(e){return{name:"Nim",aliases:["nim"],keywords:{keyword:"addr and as asm bind block break case cast const continue converter discard distinct div do elif else end enum except export finally for from func generic if import in include interface is isnot iterator let macro method mixin mod nil not notin object of or out proc ptr raise ref return shl shr static template try tuple type using var when while with without xor yield",literal:"shared guarded stdin stdout stderr result true false",built_in:"int int8 int16 int32 int64 uint uint8 uint16 uint32 uint64 float float32 float64 bool char string cstring pointer expr stmt void auto any range array openarray varargs seq set clong culong cchar cschar cshort cint csize clonglong cfloat cdouble clongdouble cuchar cushort cuint culonglong cstringarray semistatic"},contains:[{className:"meta",begin:/{\./,end:/\.}/,relevance:10},{className:"string",begin:/[a-zA-Z]\w*"/,end:/"/,contains:[{begin:/""/}]},{className:"string",begin:/([a-zA-Z]\w*)?"""/,end:/"""/},e.QUOTE_STRING_MODE,{className:"type",begin:/\b[A-Z]\w+\b/,relevance:0},{className:"number",relevance:0,variants:[{begin:/\b(0[xX][0-9a-fA-F][_0-9a-fA-F]*)('?[iIuU](8|16|32|64))?/},{begin:/\b(0o[0-7][_0-7]*)('?[iIuUfF](8|16|32|64))?/},{begin:/\b(0(b|B)[01][_01]*)('?[iIuUfF](8|16|32|64))?/},{begin:/\b(\d[_\d]*)('?[iIuUfF](8|16|32|64))?/}]},e.HASH_COMMENT_MODE]}}}()); -hljs.registerLanguage("r",function(){"use strict";return function(e){var n="([a-zA-Z]|\\.[a-zA-Z.])[a-zA-Z0-9._]*";return{name:"R",contains:[e.HASH_COMMENT_MODE,{begin:n,keywords:{$pattern:n,keyword:"function if in break next repeat else for return switch while try tryCatch stop warning require library attach detach source setMethod setGeneric setGroupGeneric setClass ...",literal:"NULL NA TRUE FALSE T F Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10"},relevance:0},{className:"number",begin:"0[xX][0-9a-fA-F]+[Li]?\\b",relevance:0},{className:"number",begin:"\\d+(?:[eE][+\\-]?\\d*)?L\\b",relevance:0},{className:"number",begin:"\\d+\\.(?!\\d)(?:i\\b)?",relevance:0},{className:"number",begin:"\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d*)?i?\\b",relevance:0},{className:"number",begin:"\\.\\d+(?:[eE][+\\-]?\\d*)?i?\\b",relevance:0},{begin:"`",end:"`",relevance:0},{className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:'"',end:'"'},{begin:"'",end:"'"}]}]}}}()); -hljs.registerLanguage("scala",function(){"use strict";return function(e){var n={className:"subst",variants:[{begin:"\\$[A-Za-z0-9_]+"},{begin:"\\${",end:"}"}]},a={className:"string",variants:[{begin:'"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:'"""',end:'"""',relevance:10},{begin:'[a-z]+"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE,n]},{className:"string",begin:'[a-z]+"""',end:'"""',contains:[n],relevance:10}]},s={className:"type",begin:"\\b[A-Z][A-Za-z0-9_]*",relevance:0},t={className:"title",begin:/[^0-9\n\t "'(),.`{}\[\]:;][^\n\t "'(),.`{}\[\]:;]+|[^0-9\n\t "'(),.`{}\[\]:;=]/,relevance:0},i={className:"class",beginKeywords:"class object trait type",end:/[:={\[\n;]/,excludeEnd:!0,contains:[{beginKeywords:"extends with",relevance:10},{begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0,relevance:0,contains:[s]},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,relevance:0,contains:[s]},t]},l={className:"function",beginKeywords:"def",end:/[:={\[(\n;]/,excludeEnd:!0,contains:[t]};return{name:"Scala",keywords:{literal:"true false null",keyword:"type yield lazy override def with val var sealed abstract private trait object if forSome for while throw finally protected extends import final return else break new catch super class case package default try this match continue throws implicit"},contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,a,{className:"symbol",begin:"'\\w[\\w\\d_]*(?!')"},s,l,i,e.C_NUMBER_MODE,{className:"meta",begin:"@[A-Za-z]+"}]}}}()); -hljs.registerLanguage("x86asm",function(){"use strict";return function(s){return{name:"Intel x86 Assembly",case_insensitive:!0,keywords:{$pattern:"[.%]?"+s.IDENT_RE,keyword:"lock rep repe repz repne repnz xaquire xrelease bnd nobnd aaa aad aam aas adc add and arpl bb0_reset bb1_reset bound bsf bsr bswap bt btc btr bts call cbw cdq cdqe clc cld cli clts cmc cmp cmpsb cmpsd cmpsq cmpsw cmpxchg cmpxchg486 cmpxchg8b cmpxchg16b cpuid cpu_read cpu_write cqo cwd cwde daa das dec div dmint emms enter equ f2xm1 fabs fadd faddp fbld fbstp fchs fclex fcmovb fcmovbe fcmove fcmovnb fcmovnbe fcmovne fcmovnu fcmovu fcom fcomi fcomip fcomp fcompp fcos fdecstp fdisi fdiv fdivp fdivr fdivrp femms feni ffree ffreep fiadd ficom ficomp fidiv fidivr fild fimul fincstp finit fist fistp fisttp fisub fisubr fld fld1 fldcw fldenv fldl2e fldl2t fldlg2 fldln2 fldpi fldz fmul fmulp fnclex fndisi fneni fninit fnop fnsave fnstcw fnstenv fnstsw fpatan fprem fprem1 fptan frndint frstor fsave fscale fsetpm fsin fsincos fsqrt fst fstcw fstenv fstp fstsw fsub fsubp fsubr fsubrp ftst fucom fucomi fucomip fucomp fucompp fxam fxch fxtract fyl2x fyl2xp1 hlt ibts icebp idiv imul in inc incbin insb insd insw int int01 int1 int03 int3 into invd invpcid invlpg invlpga iret iretd iretq iretw jcxz jecxz jrcxz jmp jmpe lahf lar lds lea leave les lfence lfs lgdt lgs lidt lldt lmsw loadall loadall286 lodsb lodsd lodsq lodsw loop loope loopne loopnz loopz lsl lss ltr mfence monitor mov movd movq movsb movsd movsq movsw movsx movsxd movzx mul mwait neg nop not or out outsb outsd outsw packssdw packsswb packuswb paddb paddd paddsb paddsiw paddsw paddusb paddusw paddw pand pandn pause paveb pavgusb pcmpeqb pcmpeqd pcmpeqw pcmpgtb pcmpgtd pcmpgtw pdistib pf2id pfacc pfadd pfcmpeq pfcmpge pfcmpgt pfmax pfmin pfmul pfrcp pfrcpit1 pfrcpit2 pfrsqit1 pfrsqrt pfsub pfsubr pi2fd pmachriw pmaddwd pmagw pmulhriw pmulhrwa pmulhrwc pmulhw pmullw pmvgezb pmvlzb pmvnzb pmvzb pop popa popad popaw popf popfd popfq popfw por prefetch prefetchw pslld psllq psllw psrad psraw psrld psrlq psrlw psubb psubd psubsb psubsiw psubsw psubusb psubusw psubw punpckhbw punpckhdq punpckhwd punpcklbw punpckldq punpcklwd push pusha pushad pushaw pushf pushfd pushfq pushfw pxor rcl rcr rdshr rdmsr rdpmc rdtsc rdtscp ret retf retn rol ror rdm rsdc rsldt rsm rsts sahf sal salc sar sbb scasb scasd scasq scasw sfence sgdt shl shld shr shrd sidt sldt skinit smi smint smintold smsw stc std sti stosb stosd stosq stosw str sub svdc svldt svts swapgs syscall sysenter sysexit sysret test ud0 ud1 ud2b ud2 ud2a umov verr verw fwait wbinvd wrshr wrmsr xadd xbts xchg xlatb xlat xor cmove cmovz cmovne cmovnz cmova cmovnbe cmovae cmovnb cmovb cmovnae cmovbe cmovna cmovg cmovnle cmovge cmovnl cmovl cmovnge cmovle cmovng cmovc cmovnc cmovo cmovno cmovs cmovns cmovp cmovpe cmovnp cmovpo je jz jne jnz ja jnbe jae jnb jb jnae jbe jna jg jnle jge jnl jl jnge jle jng jc jnc jo jno js jns jpo jnp jpe jp sete setz setne setnz seta setnbe setae setnb setnc setb setnae setcset setbe setna setg setnle setge setnl setl setnge setle setng sets setns seto setno setpe setp setpo setnp addps addss andnps andps cmpeqps cmpeqss cmpleps cmpless cmpltps cmpltss cmpneqps cmpneqss cmpnleps cmpnless cmpnltps cmpnltss cmpordps cmpordss cmpunordps cmpunordss cmpps cmpss comiss cvtpi2ps cvtps2pi cvtsi2ss cvtss2si cvttps2pi cvttss2si divps divss ldmxcsr maxps maxss minps minss movaps movhps movlhps movlps movhlps movmskps movntps movss movups mulps mulss orps rcpps rcpss rsqrtps rsqrtss shufps sqrtps sqrtss stmxcsr subps subss ucomiss unpckhps unpcklps xorps fxrstor fxrstor64 fxsave fxsave64 xgetbv xsetbv xsave xsave64 xsaveopt xsaveopt64 xrstor xrstor64 prefetchnta prefetcht0 prefetcht1 prefetcht2 maskmovq movntq pavgb pavgw pextrw pinsrw pmaxsw pmaxub pminsw pminub pmovmskb pmulhuw psadbw pshufw pf2iw pfnacc pfpnacc pi2fw pswapd maskmovdqu clflush movntdq movnti movntpd movdqa movdqu movdq2q movq2dq paddq pmuludq pshufd pshufhw pshuflw pslldq psrldq psubq punpckhqdq punpcklqdq addpd addsd andnpd andpd cmpeqpd cmpeqsd cmplepd cmplesd cmpltpd cmpltsd cmpneqpd cmpneqsd cmpnlepd cmpnlesd cmpnltpd cmpnltsd cmpordpd cmpordsd cmpunordpd cmpunordsd cmppd comisd cvtdq2pd cvtdq2ps cvtpd2dq cvtpd2pi cvtpd2ps cvtpi2pd cvtps2dq cvtps2pd cvtsd2si cvtsd2ss cvtsi2sd cvtss2sd cvttpd2pi cvttpd2dq cvttps2dq cvttsd2si divpd divsd maxpd maxsd minpd minsd movapd movhpd movlpd movmskpd movupd mulpd mulsd orpd shufpd sqrtpd sqrtsd subpd subsd ucomisd unpckhpd unpcklpd xorpd addsubpd addsubps haddpd haddps hsubpd hsubps lddqu movddup movshdup movsldup clgi stgi vmcall vmclear vmfunc vmlaunch vmload vmmcall vmptrld vmptrst vmread vmresume vmrun vmsave vmwrite vmxoff vmxon invept invvpid pabsb pabsw pabsd palignr phaddw phaddd phaddsw phsubw phsubd phsubsw pmaddubsw pmulhrsw pshufb psignb psignw psignd extrq insertq movntsd movntss lzcnt blendpd blendps blendvpd blendvps dppd dpps extractps insertps movntdqa mpsadbw packusdw pblendvb pblendw pcmpeqq pextrb pextrd pextrq phminposuw pinsrb pinsrd pinsrq pmaxsb pmaxsd pmaxud pmaxuw pminsb pminsd pminud pminuw pmovsxbw pmovsxbd pmovsxbq pmovsxwd pmovsxwq pmovsxdq pmovzxbw pmovzxbd pmovzxbq pmovzxwd pmovzxwq pmovzxdq pmuldq pmulld ptest roundpd roundps roundsd roundss crc32 pcmpestri pcmpestrm pcmpistri pcmpistrm pcmpgtq popcnt getsec pfrcpv pfrsqrtv movbe aesenc aesenclast aesdec aesdeclast aesimc aeskeygenassist vaesenc vaesenclast vaesdec vaesdeclast vaesimc vaeskeygenassist vaddpd vaddps vaddsd vaddss vaddsubpd vaddsubps vandpd vandps vandnpd vandnps vblendpd vblendps vblendvpd vblendvps vbroadcastss vbroadcastsd vbroadcastf128 vcmpeq_ospd vcmpeqpd vcmplt_ospd vcmpltpd vcmple_ospd vcmplepd vcmpunord_qpd vcmpunordpd vcmpneq_uqpd vcmpneqpd vcmpnlt_uspd vcmpnltpd vcmpnle_uspd vcmpnlepd vcmpord_qpd vcmpordpd vcmpeq_uqpd vcmpnge_uspd vcmpngepd vcmpngt_uspd vcmpngtpd vcmpfalse_oqpd vcmpfalsepd vcmpneq_oqpd vcmpge_ospd vcmpgepd vcmpgt_ospd vcmpgtpd vcmptrue_uqpd vcmptruepd vcmplt_oqpd vcmple_oqpd vcmpunord_spd vcmpneq_uspd vcmpnlt_uqpd vcmpnle_uqpd vcmpord_spd vcmpeq_uspd vcmpnge_uqpd vcmpngt_uqpd vcmpfalse_ospd vcmpneq_ospd vcmpge_oqpd vcmpgt_oqpd vcmptrue_uspd vcmppd vcmpeq_osps vcmpeqps vcmplt_osps vcmpltps vcmple_osps vcmpleps vcmpunord_qps vcmpunordps vcmpneq_uqps vcmpneqps vcmpnlt_usps vcmpnltps vcmpnle_usps vcmpnleps vcmpord_qps vcmpordps vcmpeq_uqps vcmpnge_usps vcmpngeps vcmpngt_usps vcmpngtps vcmpfalse_oqps vcmpfalseps vcmpneq_oqps vcmpge_osps vcmpgeps vcmpgt_osps vcmpgtps vcmptrue_uqps vcmptrueps vcmplt_oqps vcmple_oqps vcmpunord_sps vcmpneq_usps vcmpnlt_uqps vcmpnle_uqps vcmpord_sps vcmpeq_usps vcmpnge_uqps vcmpngt_uqps vcmpfalse_osps vcmpneq_osps vcmpge_oqps vcmpgt_oqps vcmptrue_usps vcmpps vcmpeq_ossd vcmpeqsd vcmplt_ossd vcmpltsd vcmple_ossd vcmplesd vcmpunord_qsd vcmpunordsd vcmpneq_uqsd vcmpneqsd vcmpnlt_ussd vcmpnltsd vcmpnle_ussd vcmpnlesd vcmpord_qsd vcmpordsd vcmpeq_uqsd vcmpnge_ussd vcmpngesd vcmpngt_ussd vcmpngtsd vcmpfalse_oqsd vcmpfalsesd vcmpneq_oqsd vcmpge_ossd vcmpgesd vcmpgt_ossd vcmpgtsd vcmptrue_uqsd vcmptruesd vcmplt_oqsd vcmple_oqsd vcmpunord_ssd vcmpneq_ussd vcmpnlt_uqsd vcmpnle_uqsd vcmpord_ssd vcmpeq_ussd vcmpnge_uqsd vcmpngt_uqsd vcmpfalse_ossd vcmpneq_ossd vcmpge_oqsd vcmpgt_oqsd vcmptrue_ussd vcmpsd vcmpeq_osss vcmpeqss vcmplt_osss vcmpltss vcmple_osss vcmpless vcmpunord_qss vcmpunordss vcmpneq_uqss vcmpneqss vcmpnlt_usss vcmpnltss vcmpnle_usss vcmpnless vcmpord_qss vcmpordss vcmpeq_uqss vcmpnge_usss vcmpngess vcmpngt_usss vcmpngtss vcmpfalse_oqss vcmpfalsess vcmpneq_oqss vcmpge_osss vcmpgess vcmpgt_osss vcmpgtss vcmptrue_uqss vcmptruess vcmplt_oqss vcmple_oqss vcmpunord_sss vcmpneq_usss vcmpnlt_uqss vcmpnle_uqss vcmpord_sss vcmpeq_usss vcmpnge_uqss vcmpngt_uqss vcmpfalse_osss vcmpneq_osss vcmpge_oqss vcmpgt_oqss vcmptrue_usss vcmpss vcomisd vcomiss vcvtdq2pd vcvtdq2ps vcvtpd2dq vcvtpd2ps vcvtps2dq vcvtps2pd vcvtsd2si vcvtsd2ss vcvtsi2sd vcvtsi2ss vcvtss2sd vcvtss2si vcvttpd2dq vcvttps2dq vcvttsd2si vcvttss2si vdivpd vdivps vdivsd vdivss vdppd vdpps vextractf128 vextractps vhaddpd vhaddps vhsubpd vhsubps vinsertf128 vinsertps vlddqu vldqqu vldmxcsr vmaskmovdqu vmaskmovps vmaskmovpd vmaxpd vmaxps vmaxsd vmaxss vminpd vminps vminsd vminss vmovapd vmovaps vmovd vmovq vmovddup vmovdqa vmovqqa vmovdqu vmovqqu vmovhlps vmovhpd vmovhps vmovlhps vmovlpd vmovlps vmovmskpd vmovmskps vmovntdq vmovntqq vmovntdqa vmovntpd vmovntps vmovsd vmovshdup vmovsldup vmovss vmovupd vmovups vmpsadbw vmulpd vmulps vmulsd vmulss vorpd vorps vpabsb vpabsw vpabsd vpacksswb vpackssdw vpackuswb vpackusdw vpaddb vpaddw vpaddd vpaddq vpaddsb vpaddsw vpaddusb vpaddusw vpalignr vpand vpandn vpavgb vpavgw vpblendvb vpblendw vpcmpestri vpcmpestrm vpcmpistri vpcmpistrm vpcmpeqb vpcmpeqw vpcmpeqd vpcmpeqq vpcmpgtb vpcmpgtw vpcmpgtd vpcmpgtq vpermilpd vpermilps vperm2f128 vpextrb vpextrw vpextrd vpextrq vphaddw vphaddd vphaddsw vphminposuw vphsubw vphsubd vphsubsw vpinsrb vpinsrw vpinsrd vpinsrq vpmaddwd vpmaddubsw vpmaxsb vpmaxsw vpmaxsd vpmaxub vpmaxuw vpmaxud vpminsb vpminsw vpminsd vpminub vpminuw vpminud vpmovmskb vpmovsxbw vpmovsxbd vpmovsxbq vpmovsxwd vpmovsxwq vpmovsxdq vpmovzxbw vpmovzxbd vpmovzxbq vpmovzxwd vpmovzxwq vpmovzxdq vpmulhuw vpmulhrsw vpmulhw vpmullw vpmulld vpmuludq vpmuldq vpor vpsadbw vpshufb vpshufd vpshufhw vpshuflw vpsignb vpsignw vpsignd vpslldq vpsrldq vpsllw vpslld vpsllq vpsraw vpsrad vpsrlw vpsrld vpsrlq vptest vpsubb vpsubw vpsubd vpsubq vpsubsb vpsubsw vpsubusb vpsubusw vpunpckhbw vpunpckhwd vpunpckhdq vpunpckhqdq vpunpcklbw vpunpcklwd vpunpckldq vpunpcklqdq vpxor vrcpps vrcpss vrsqrtps vrsqrtss vroundpd vroundps vroundsd vroundss vshufpd vshufps vsqrtpd vsqrtps vsqrtsd vsqrtss vstmxcsr vsubpd vsubps vsubsd vsubss vtestps vtestpd vucomisd vucomiss vunpckhpd vunpckhps vunpcklpd vunpcklps vxorpd vxorps vzeroall vzeroupper pclmullqlqdq pclmulhqlqdq pclmullqhqdq pclmulhqhqdq pclmulqdq vpclmullqlqdq vpclmulhqlqdq vpclmullqhqdq vpclmulhqhqdq vpclmulqdq vfmadd132ps vfmadd132pd vfmadd312ps vfmadd312pd vfmadd213ps vfmadd213pd vfmadd123ps vfmadd123pd vfmadd231ps vfmadd231pd vfmadd321ps vfmadd321pd vfmaddsub132ps vfmaddsub132pd vfmaddsub312ps vfmaddsub312pd vfmaddsub213ps vfmaddsub213pd vfmaddsub123ps vfmaddsub123pd vfmaddsub231ps vfmaddsub231pd vfmaddsub321ps vfmaddsub321pd vfmsub132ps vfmsub132pd vfmsub312ps vfmsub312pd vfmsub213ps vfmsub213pd vfmsub123ps vfmsub123pd vfmsub231ps vfmsub231pd vfmsub321ps vfmsub321pd vfmsubadd132ps vfmsubadd132pd vfmsubadd312ps vfmsubadd312pd vfmsubadd213ps vfmsubadd213pd vfmsubadd123ps vfmsubadd123pd vfmsubadd231ps vfmsubadd231pd vfmsubadd321ps vfmsubadd321pd vfnmadd132ps vfnmadd132pd vfnmadd312ps vfnmadd312pd vfnmadd213ps vfnmadd213pd vfnmadd123ps vfnmadd123pd vfnmadd231ps vfnmadd231pd vfnmadd321ps vfnmadd321pd vfnmsub132ps vfnmsub132pd vfnmsub312ps vfnmsub312pd vfnmsub213ps vfnmsub213pd vfnmsub123ps vfnmsub123pd vfnmsub231ps vfnmsub231pd vfnmsub321ps vfnmsub321pd vfmadd132ss vfmadd132sd vfmadd312ss vfmadd312sd vfmadd213ss vfmadd213sd vfmadd123ss vfmadd123sd vfmadd231ss vfmadd231sd vfmadd321ss vfmadd321sd vfmsub132ss vfmsub132sd vfmsub312ss vfmsub312sd vfmsub213ss vfmsub213sd vfmsub123ss vfmsub123sd vfmsub231ss vfmsub231sd vfmsub321ss vfmsub321sd vfnmadd132ss vfnmadd132sd vfnmadd312ss vfnmadd312sd vfnmadd213ss vfnmadd213sd vfnmadd123ss vfnmadd123sd vfnmadd231ss vfnmadd231sd vfnmadd321ss vfnmadd321sd vfnmsub132ss vfnmsub132sd vfnmsub312ss vfnmsub312sd vfnmsub213ss vfnmsub213sd vfnmsub123ss vfnmsub123sd vfnmsub231ss vfnmsub231sd vfnmsub321ss vfnmsub321sd rdfsbase rdgsbase rdrand wrfsbase wrgsbase vcvtph2ps vcvtps2ph adcx adox rdseed clac stac xstore xcryptecb xcryptcbc xcryptctr xcryptcfb xcryptofb montmul xsha1 xsha256 llwpcb slwpcb lwpval lwpins vfmaddpd vfmaddps vfmaddsd vfmaddss vfmaddsubpd vfmaddsubps vfmsubaddpd vfmsubaddps vfmsubpd vfmsubps vfmsubsd vfmsubss vfnmaddpd vfnmaddps vfnmaddsd vfnmaddss vfnmsubpd vfnmsubps vfnmsubsd vfnmsubss vfrczpd vfrczps vfrczsd vfrczss vpcmov vpcomb vpcomd vpcomq vpcomub vpcomud vpcomuq vpcomuw vpcomw vphaddbd vphaddbq vphaddbw vphadddq vphaddubd vphaddubq vphaddubw vphaddudq vphadduwd vphadduwq vphaddwd vphaddwq vphsubbw vphsubdq vphsubwd vpmacsdd vpmacsdqh vpmacsdql vpmacssdd vpmacssdqh vpmacssdql vpmacsswd vpmacssww vpmacswd vpmacsww vpmadcsswd vpmadcswd vpperm vprotb vprotd vprotq vprotw vpshab vpshad vpshaq vpshaw vpshlb vpshld vpshlq vpshlw vbroadcasti128 vpblendd vpbroadcastb vpbroadcastw vpbroadcastd vpbroadcastq vpermd vpermpd vpermps vpermq vperm2i128 vextracti128 vinserti128 vpmaskmovd vpmaskmovq vpsllvd vpsllvq vpsravd vpsrlvd vpsrlvq vgatherdpd vgatherqpd vgatherdps vgatherqps vpgatherdd vpgatherqd vpgatherdq vpgatherqq xabort xbegin xend xtest andn bextr blci blcic blsi blsic blcfill blsfill blcmsk blsmsk blsr blcs bzhi mulx pdep pext rorx sarx shlx shrx tzcnt tzmsk t1mskc valignd valignq vblendmpd vblendmps vbroadcastf32x4 vbroadcastf64x4 vbroadcasti32x4 vbroadcasti64x4 vcompresspd vcompressps vcvtpd2udq vcvtps2udq vcvtsd2usi vcvtss2usi vcvttpd2udq vcvttps2udq vcvttsd2usi vcvttss2usi vcvtudq2pd vcvtudq2ps vcvtusi2sd vcvtusi2ss vexpandpd vexpandps vextractf32x4 vextractf64x4 vextracti32x4 vextracti64x4 vfixupimmpd vfixupimmps vfixupimmsd vfixupimmss vgetexppd vgetexpps vgetexpsd vgetexpss vgetmantpd vgetmantps vgetmantsd vgetmantss vinsertf32x4 vinsertf64x4 vinserti32x4 vinserti64x4 vmovdqa32 vmovdqa64 vmovdqu32 vmovdqu64 vpabsq vpandd vpandnd vpandnq vpandq vpblendmd vpblendmq vpcmpltd vpcmpled vpcmpneqd vpcmpnltd vpcmpnled vpcmpd vpcmpltq vpcmpleq vpcmpneqq vpcmpnltq vpcmpnleq vpcmpq vpcmpequd vpcmpltud vpcmpleud vpcmpnequd vpcmpnltud vpcmpnleud vpcmpud vpcmpequq vpcmpltuq vpcmpleuq vpcmpnequq vpcmpnltuq vpcmpnleuq vpcmpuq vpcompressd vpcompressq vpermi2d vpermi2pd vpermi2ps vpermi2q vpermt2d vpermt2pd vpermt2ps vpermt2q vpexpandd vpexpandq vpmaxsq vpmaxuq vpminsq vpminuq vpmovdb vpmovdw vpmovqb vpmovqd vpmovqw vpmovsdb vpmovsdw vpmovsqb vpmovsqd vpmovsqw vpmovusdb vpmovusdw vpmovusqb vpmovusqd vpmovusqw vpord vporq vprold vprolq vprolvd vprolvq vprord vprorq vprorvd vprorvq vpscatterdd vpscatterdq vpscatterqd vpscatterqq vpsraq vpsravq vpternlogd vpternlogq vptestmd vptestmq vptestnmd vptestnmq vpxord vpxorq vrcp14pd vrcp14ps vrcp14sd vrcp14ss vrndscalepd vrndscaleps vrndscalesd vrndscaless vrsqrt14pd vrsqrt14ps vrsqrt14sd vrsqrt14ss vscalefpd vscalefps vscalefsd vscalefss vscatterdpd vscatterdps vscatterqpd vscatterqps vshuff32x4 vshuff64x2 vshufi32x4 vshufi64x2 kandnw kandw kmovw knotw kortestw korw kshiftlw kshiftrw kunpckbw kxnorw kxorw vpbroadcastmb2q vpbroadcastmw2d vpconflictd vpconflictq vplzcntd vplzcntq vexp2pd vexp2ps vrcp28pd vrcp28ps vrcp28sd vrcp28ss vrsqrt28pd vrsqrt28ps vrsqrt28sd vrsqrt28ss vgatherpf0dpd vgatherpf0dps vgatherpf0qpd vgatherpf0qps vgatherpf1dpd vgatherpf1dps vgatherpf1qpd vgatherpf1qps vscatterpf0dpd vscatterpf0dps vscatterpf0qpd vscatterpf0qps vscatterpf1dpd vscatterpf1dps vscatterpf1qpd vscatterpf1qps prefetchwt1 bndmk bndcl bndcu bndcn bndmov bndldx bndstx sha1rnds4 sha1nexte sha1msg1 sha1msg2 sha256rnds2 sha256msg1 sha256msg2 hint_nop0 hint_nop1 hint_nop2 hint_nop3 hint_nop4 hint_nop5 hint_nop6 hint_nop7 hint_nop8 hint_nop9 hint_nop10 hint_nop11 hint_nop12 hint_nop13 hint_nop14 hint_nop15 hint_nop16 hint_nop17 hint_nop18 hint_nop19 hint_nop20 hint_nop21 hint_nop22 hint_nop23 hint_nop24 hint_nop25 hint_nop26 hint_nop27 hint_nop28 hint_nop29 hint_nop30 hint_nop31 hint_nop32 hint_nop33 hint_nop34 hint_nop35 hint_nop36 hint_nop37 hint_nop38 hint_nop39 hint_nop40 hint_nop41 hint_nop42 hint_nop43 hint_nop44 hint_nop45 hint_nop46 hint_nop47 hint_nop48 hint_nop49 hint_nop50 hint_nop51 hint_nop52 hint_nop53 hint_nop54 hint_nop55 hint_nop56 hint_nop57 hint_nop58 hint_nop59 hint_nop60 hint_nop61 hint_nop62 hint_nop63",built_in:"ip eip rip al ah bl bh cl ch dl dh sil dil bpl spl r8b r9b r10b r11b r12b r13b r14b r15b ax bx cx dx si di bp sp r8w r9w r10w r11w r12w r13w r14w r15w eax ebx ecx edx esi edi ebp esp eip r8d r9d r10d r11d r12d r13d r14d r15d rax rbx rcx rdx rsi rdi rbp rsp r8 r9 r10 r11 r12 r13 r14 r15 cs ds es fs gs ss st st0 st1 st2 st3 st4 st5 st6 st7 mm0 mm1 mm2 mm3 mm4 mm5 mm6 mm7 xmm0 xmm1 xmm2 xmm3 xmm4 xmm5 xmm6 xmm7 xmm8 xmm9 xmm10 xmm11 xmm12 xmm13 xmm14 xmm15 xmm16 xmm17 xmm18 xmm19 xmm20 xmm21 xmm22 xmm23 xmm24 xmm25 xmm26 xmm27 xmm28 xmm29 xmm30 xmm31 ymm0 ymm1 ymm2 ymm3 ymm4 ymm5 ymm6 ymm7 ymm8 ymm9 ymm10 ymm11 ymm12 ymm13 ymm14 ymm15 ymm16 ymm17 ymm18 ymm19 ymm20 ymm21 ymm22 ymm23 ymm24 ymm25 ymm26 ymm27 ymm28 ymm29 ymm30 ymm31 zmm0 zmm1 zmm2 zmm3 zmm4 zmm5 zmm6 zmm7 zmm8 zmm9 zmm10 zmm11 zmm12 zmm13 zmm14 zmm15 zmm16 zmm17 zmm18 zmm19 zmm20 zmm21 zmm22 zmm23 zmm24 zmm25 zmm26 zmm27 zmm28 zmm29 zmm30 zmm31 k0 k1 k2 k3 k4 k5 k6 k7 bnd0 bnd1 bnd2 bnd3 cr0 cr1 cr2 cr3 cr4 cr8 dr0 dr1 dr2 dr3 dr8 tr3 tr4 tr5 tr6 tr7 r0 r1 r2 r3 r4 r5 r6 r7 r0b r1b r2b r3b r4b r5b r6b r7b r0w r1w r2w r3w r4w r5w r6w r7w r0d r1d r2d r3d r4d r5d r6d r7d r0h r1h r2h r3h r0l r1l r2l r3l r4l r5l r6l r7l r8l r9l r10l r11l r12l r13l r14l r15l db dw dd dq dt ddq do dy dz resb resw resd resq rest resdq reso resy resz incbin equ times byte word dword qword nosplit rel abs seg wrt strict near far a32 ptr",meta:"%define %xdefine %+ %undef %defstr %deftok %assign %strcat %strlen %substr %rotate %elif %else %endif %if %ifmacro %ifctx %ifidn %ifidni %ifid %ifnum %ifstr %iftoken %ifempty %ifenv %error %warning %fatal %rep %endrep %include %push %pop %repl %pathsearch %depend %use %arg %stacksize %local %line %comment %endcomment .nolist __FILE__ __LINE__ __SECT__ __BITS__ __OUTPUT_FORMAT__ __DATE__ __TIME__ __DATE_NUM__ __TIME_NUM__ __UTC_DATE__ __UTC_TIME__ __UTC_DATE_NUM__ __UTC_TIME_NUM__ __PASS__ struc endstruc istruc at iend align alignb sectalign daz nodaz up down zero default option assume public bits use16 use32 use64 default section segment absolute extern global common cpu float __utf16__ __utf16le__ __utf16be__ __utf32__ __utf32le__ __utf32be__ __float8__ __float16__ __float32__ __float64__ __float80m__ __float80e__ __float128l__ __float128h__ __Infinity__ __QNaN__ __SNaN__ Inf NaN QNaN SNaN float8 float16 float32 float64 float80m float80e float128l float128h __FLOAT_DAZ__ __FLOAT_ROUND__ __FLOAT__"},contains:[s.COMMENT(";","$",{relevance:0}),{className:"number",variants:[{begin:"\\b(?:([0-9][0-9_]*)?\\.[0-9_]*(?:[eE][+-]?[0-9_]+)?|(0[Xx])?[0-9][0-9_]*\\.?[0-9_]*(?:[pP](?:[+-]?[0-9_]+)?)?)\\b",relevance:0},{begin:"\\$[0-9][0-9A-Fa-f]*",relevance:0},{begin:"\\b(?:[0-9A-Fa-f][0-9A-Fa-f_]*[Hh]|[0-9][0-9_]*[DdTt]?|[0-7][0-7_]*[QqOo]|[0-1][0-1_]*[BbYy])\\b"},{begin:"\\b(?:0[Xx][0-9A-Fa-f_]+|0[DdTt][0-9_]+|0[QqOo][0-7_]+|0[BbYy][0-1_]+)\\b"}]},s.QUOTE_STRING_MODE,{className:"string",variants:[{begin:"'",end:"[^\\\\]'"},{begin:"`",end:"[^\\\\]`"}],relevance:0},{className:"symbol",variants:[{begin:"^\\s*[A-Za-z._?][A-Za-z0-9_$#@~.?]*(:|\\s+label)"},{begin:"^\\s*%%[A-Za-z0-9_$#@~.?]*:"}],relevance:0},{className:"subst",begin:"%[0-9]+",relevance:0},{className:"subst",begin:"%!S+",relevance:0},{className:"meta",begin:/^\s*\.[\w_-]+/}]}}}()); \ No newline at end of file diff --git a/book/theme/index.hbs b/book/theme/index.hbs deleted file mode 100644 index 080b78516..000000000 --- a/book/theme/index.hbs +++ /dev/null @@ -1,346 +0,0 @@ - - - - - - {{ title }} - {{#if is_print }} - - {{/if}} - {{#if base_url}} - - {{/if}} - - - - {{> head}} - - - - - - {{#if favicon_svg}} - - {{/if}} - {{#if favicon_png}} - - {{/if}} - - - - {{#if print_enable}} - - {{/if}} - - - - {{#if copy_fonts}} - - {{/if}} - - - - - - - - {{#each additional_css}} - - {{/each}} - - {{#if mathjax_support}} - - - {{/if}} - - -
- - - - - - - - - - - - - - - - - - - -
- -
- {{> header}} - - - - {{#if search_enabled}} - - {{/if}} - - - - -
-
- {{{ content }}} -
- - -
-
- - - -
- - {{#if live_reload_endpoint}} - - - {{/if}} - - {{#if google_analytics}} - - - {{/if}} - - {{#if playground_line_numbers}} - - {{/if}} - - {{#if playground_copyable}} - - {{/if}} - - {{#if playground_js}} - - - - - - {{/if}} - - {{#if search_js}} - - - - {{/if}} - - - - - - - {{#each additional_js}} - - {{/each}} - - {{#if is_print}} - {{#if mathjax_support}} - - {{else}} - - {{/if}} - {{/if}} - -
- - diff --git a/cli/default.nix b/cli/default.nix index 369f2182a..6c56d5ca2 100644 --- a/cli/default.nix +++ b/cli/default.nix @@ -1,45 +1,31 @@ -{ - craneLib, - stdenv, - makeWrapper, - lib, - rustc, - gcc, - hax-engine, - doCheck ? true, -}: let +{ craneLib, stdenv, makeWrapper, lib, rustc, rustc-docs, gcc, hax-engine +, doCheck ? true, libz, libiconv }: +let pname = "hax"; - is-webapp-static-asset = path: builtins.match ".*(script[.]js|index[.]html)" path != null; - commonArgs = - { - version = "0.0.1"; - src = lib.cleanSourceWith { - src = craneLib.path ./..; - filter = path: type: - builtins.isNull (builtins.match ".*/tests/.*" path) - && (craneLib.filterCargoSources path type || is-webapp-static-asset path); - }; - inherit doCheck; - } - // ( - if doCheck - then { - # [cargo test] builds independent workspaces. Each time another - # workspace is added, it's corresponding lockfile should be added - # in the [cargoLockList] list below. - cargoVendorDir = craneLib.vendorMultipleCargoDeps { - cargoLockList = [ - ../Cargo.lock - ../tests/Cargo.lock - ]; - }; - } - else {} - ); - cargoArtifacts = craneLib.buildDepsOnly (commonArgs - // { - pname = pname; - }); + is-webapp-static-asset = path: + builtins.match ".*(script[.]js|index[.]html)" path != null; + buildInputs = lib.optionals stdenv.isDarwin [ libiconv libz.dev ]; + binaries = [ hax hax-engine.bin rustc gcc ] ++ buildInputs; + commonArgs = { + version = "0.0.1"; + src = lib.cleanSourceWith { + src = craneLib.path ./..; + filter = path: type: + builtins.isNull (builtins.match ".*/tests/.*" path) + && (craneLib.filterCargoSources path type + || is-webapp-static-asset path); + }; + inherit buildInputs doCheck; + } // (if doCheck then { + # [cargo test] builds independent workspaces. Each time another + # workspace is added, it's corresponding lockfile should be added + # in the [cargoLockList] list below. + cargoVendorDir = craneLib.vendorMultipleCargoDeps { + cargoLockList = [ ../Cargo.lock ../tests/Cargo.lock ]; + }; + } else + { }); + cargoArtifacts = craneLib.buildDepsOnly (commonArgs // { pname = pname; }); hax = stdenv.mkDerivation { name = hax_with_artifacts.name; unpackPhase = "true"; @@ -49,95 +35,60 @@ cp -r ${hax_with_artifacts}/bin $out/bin ''; }; - hax_with_artifacts = craneLib.buildPackage ( - commonArgs - // { - inherit cargoArtifacts pname; - doInstallCargoArtifacts = true; - } - ); - frontend-docs = craneLib.cargoDoc (commonArgs // { - preBuildPhases = ["addRustcDocs"]; + hax_with_artifacts = craneLib.buildPackage (commonArgs // { + inherit cargoArtifacts pname; + doInstallCargoArtifacts = true; + }); + docs = craneLib.cargoDoc (commonArgs // { + # preBuildPhases = [ "addRustcDocs" ]; cargoDocExtraArgs = "--document-private-items"; - addRustcDocs = '' - mkdir -p target/doc - cp --no-preserve=mode -rf ${rustc.passthru.availableComponents.rustc-docs}/share/doc/rust/html/rustc/* target/doc/ - ''; + # addRustcDocs = '' + # mkdir -p target/doc + # cp --no-preserve=mode -rf ${rustc-docs}/share/doc/rust/html/rustc/* target/doc/ + # ''; inherit cargoArtifacts pname; }); - docs = stdenv.mkDerivation { - name = "hax-docs"; - unpackPhase = "true"; - buildPhase = "true"; - installPhase = '' - mkdir $out - cp -r ${frontend-docs}/share/doc $out/frontend - cp -r ${hax-engine.docs} $out/engine - cd $out - INDEX=$(mktemp) - ( - echo "" - echo "

Hax docs

" - echo "

Hax is written both in Rust and OCaml. Documentation for each is available below:

" - echo "" - ) > $INDEX - mv $INDEX index.html - ''; - }; - binaries = [hax hax-engine.bin rustc gcc]; - tests = craneLib.buildPackage (commonArgs - // { - inherit cargoArtifacts; - pname = "hax-tests"; - doCheck = true; - CI = "true"; - cargoBuildCommand = "true"; - checkPhaseCargoCommand = '' - SNAPS_DIR=test-harness/src/snapshots && rmdir "$SNAPS_DIR" - TESTS_DIR=tests && rmdir "$TESTS_DIR" + tests = craneLib.buildPackage (commonArgs // { + inherit cargoArtifacts; + pname = "hax-tests"; + doCheck = true; + CI = "true"; + cargoBuildCommand = "true"; + checkPhaseCargoCommand = '' + SNAPS_DIR=test-harness/src/snapshots && rmdir "$SNAPS_DIR" + TESTS_DIR=tests && rmdir "$TESTS_DIR" - ln -s ${../test-harness/src/snapshots} "$SNAPS_DIR" - cp -r --no-preserve=mode ${../tests} "$TESTS_DIR" + ln -s ${../test-harness/src/snapshots} "$SNAPS_DIR" + cp -r --no-preserve=mode ${../tests} "$TESTS_DIR" - cargo test --test toolchain --profile release + cargo test --test toolchain --profile release + ''; + buildInputs = binaries; + CARGO_TESTS_ASSUME_BUILT = "yes"; + }); +in stdenv.mkDerivation { + name = hax.name; + buildInputs = [ makeWrapper ]; + phases = [ "installPhase" ]; + installPhase = '' + mkdir -p $out/bin + makeWrapper ${hax}/bin/cargo-hax $out/bin/cargo-hax \ + --prefix PATH : ${lib.makeBinPath binaries} + ''; + meta.mainProgram = "cargo-hax"; + passthru = { + unwrapped = hax; + hax-engine-names-extract = craneLib.buildPackage (commonArgs // { + pname = "hax_engine_names_extract"; + cargoLock = ../Cargo.lock; + cargoToml = ../engine/names/extract/Cargo.toml; + cargoArtifacts = hax_with_artifacts; + nativeBuildInputs = [ hax_with_artifacts ]; + postUnpack = '' + cd $sourceRoot/engine/names/extract + sourceRoot="." ''; - buildInputs = binaries; - CARGO_TESTS_ASSUME_BUILT = "yes"; }); -in - stdenv.mkDerivation { - name = hax.name; - buildInputs = [makeWrapper]; - phases = ["installPhase"]; - installPhase = '' - mkdir -p $out/bin - makeWrapper ${hax}/bin/cargo-hax $out/bin/cargo-hax \ - --prefix PATH : ${lib.makeBinPath binaries} - ''; - meta.mainProgram = "cargo-hax"; - passthru = { - unwrapped = hax; - hax-engine-names-extract = craneLib.buildPackage ( - commonArgs - // { - pname = "hax_engine_names_extract"; - cargoLock = ../Cargo.lock; - cargoToml = ../engine/names/extract/Cargo.toml; - cargoArtifacts = hax_with_artifacts; - nativeBuildInputs = [hax_with_artifacts]; - postUnpack = '' - cd $sourceRoot/engine/names/extract - sourceRoot="." - ''; - } - ); - engine-docs = hax-engine.docs; - inherit tests docs frontend-docs; - }; - } + inherit docs tests; + }; +} diff --git a/cli/driver/src/exporter.rs b/cli/driver/src/exporter.rs index 96adfabb2..ff3239cf3 100644 --- a/cli/driver/src/exporter.rs +++ b/cli/driver/src/exporter.rs @@ -286,6 +286,7 @@ impl Callbacks for ExtractionCallbacks { .flatten() .collect(), def_ids, + hax_version: hax_types::HAX_VERSION.into(), }; haxmeta.write(&mut file, cache_map); } diff --git a/cli/subcommands/build.rs b/cli/subcommands/build.rs index b1a0402c2..68c88cd2e 100644 --- a/cli/subcommands/build.rs +++ b/cli/subcommands/build.rs @@ -14,7 +14,7 @@ fn rustc_version_env_var() { } fn json_schema_static_asset() { - let schema = schemars::schema_for!(( + let mut schema = schemars::schema_for!(( hax_frontend_exporter::Item, hax_types::cli_options::Options, hax_types::diagnostics::Diagnostics, @@ -25,6 +25,7 @@ fn json_schema_static_asset() { hax_types::engine_api::protocol::ToEngine, hax_lib_macros_types::AttrPayload, )); + schema.schema.metadata.get_or_insert_default().id = Some(hax_types::HAX_VERSION.into()); serde_json::to_writer( std::fs::File::create(format!("{}/schema.json", std::env::var("OUT_DIR").unwrap())) .unwrap(), diff --git a/cli/subcommands/src/cargo_hax.rs b/cli/subcommands/src/cargo_hax.rs index 2d2f91749..9a23c5dbd 100644 --- a/cli/subcommands/src/cargo_hax.rs +++ b/cli/subcommands/src/cargo_hax.rs @@ -240,6 +240,7 @@ fn run_engine( message_format: MessageFormat, ) -> bool { let engine_options = EngineOptions { + hax_version: haxmeta.hax_version, backend: backend.clone(), input: haxmeta.items, impl_infos: haxmeta.impl_infos, @@ -532,6 +533,7 @@ fn compute_haxmeta_files(options: &Options) -> (Vec, i32) { } else { 0 }; + (haxmeta_files, exit_code) } diff --git a/docs/RFCs/0000-template.md b/docs/RFCs/0000-template.md new file mode 100644 index 000000000..d35b45951 --- /dev/null +++ b/docs/RFCs/0000-template.md @@ -0,0 +1,46 @@ +--- + title: 0000 template + tags: + - Accepted +--- + +``` +--- +tags: Draft | Proposed | Rejected | Accepted | Superseded | Deprecated +--- +``` + +| Authors | :material-account: Franziskus Kiefer | +| :------------ | :---------------------------------------------------------- | +| Last update | :material-calendar: Jan 1 2025 | +| Extends | :material-directions-fork: [xxxx-other](./0000-template.md) | +| Superseded by | :material-cancel: [xxxx-other](./0000-template.md) | +| Based on | :material-forward: [xxxx-other](./0000-template.md) | + +## Context + +What is the issue that we're seeing that is motivating this decision or change? + +## Assumptions + +Anything that could cause problems if untrue now or later + +## Decision + +What is the change that we're proposing and/or doing? + +### Considered Options + +What other options are there and why didn’t you pick them? + +## Risks + +Anything that could cause malfunction, delay, or other negative impacts + +## Consequences + +What becomes easier or more difficult to do because of this change? + +## Additional Information + +Provide additional evidence/confidence for the decision outcome Links to other decisions and resources might here appear as well. diff --git a/docs/RFCs/index.md b/docs/RFCs/index.md new file mode 100644 index 000000000..fe6701c40 --- /dev/null +++ b/docs/RFCs/index.md @@ -0,0 +1,3 @@ +# RFCs + + diff --git a/docs/blog/.authors.yml b/docs/blog/.authors.yml new file mode 100644 index 000000000..042212ee2 --- /dev/null +++ b/docs/blog/.authors.yml @@ -0,0 +1,9 @@ +authors: + franziskus: + name: Franziskus Kiefer + description: Creator + avatar: https://cryspen.com/images/franziskus_hu8239521875621889102.jpg + lucas: + name: Lucas Franceschino + description: Creator + avatar: https://cryspen.com/images/lucas_hu1387702743353212719.jpg diff --git a/docs/blog/index.md b/docs/blog/index.md new file mode 100644 index 000000000..c9eb30205 --- /dev/null +++ b/docs/blog/index.md @@ -0,0 +1,8 @@ +--- +weight: 4 +--- + +# Blog + +The hax blog. +Here you find announcement, development news, and more. diff --git a/docs/blog/posts/announce-v0.1.md b/docs/blog/posts/announce-v0.1.md new file mode 100644 index 000000000..f20eba1de --- /dev/null +++ b/docs/blog/posts/announce-v0.1.md @@ -0,0 +1,118 @@ +--- +authors: + - franziskus + - lucas +title: "A new chapter" +date: 2025-01-21 +--- + +# Hax Takes Flight: Announcing Our First Release and New Home at Cryspen! + +We're thrilled to announce that hax is entering a new era of stability and +growth with the launch of our new website, a fresh start at Cryspen, +and our first official release, +[v0.1.0](https://github.com/cryspen/hax/releases/tag/cargo-hax-v0.1.0)! + +After an intense period of research and development, hax is transitioning to a +more stable phase. +To support this evolution, we've moved the repository to its new home within the +Cryspen GitHub organization. +This change streamlines our processes and clarifies project ownership while +maintaining hax's open-source nature. +Cryspen is responsible for driving hax forward, but we enthusiastically +welcome contributions from the community, and continue working closely with +the team of existing contributors! + +This move also marks our shift to a release-driven development model, +culminating in our first official release, v0.1.0. +While we anticipate some breaking changes in the lead-up to v1.0, detailed +release notes will clearly outline any backward compatibility issues. + +### The state of hax + +Hax currently boasts three actively used backends: ([F\*](https://fstar-lang.org/), +[Rocq](https://rocq-prover.org/) and [SSProve](https://github.com/SSProve/ssprove)). +While Cryspen primarily focuses on the F\* backend, [Bas Spitters](https://www.au.dk/en/spitters@cs.au.dk) +and his team at the University of Aarhus are actively developing and utilizing +the Rocq and SSProve backends. Cryspen also supports an experimental backend for +[ProVerif](https://bblanche.gitlabpages.inria.fr/proverif/). + +With this initial release, hax can process a significant subset of Rust code. +Both the frontend, which extracts a JSON AST from the Rust compiler, and the +engine, which lowers the code to the backends, have undergone major +improvements and stabilization throughout 2024. + +Our new website provides a central hub for all things hax. +Users can explore the [manual](../../manual/index.md), experiment with the +interactive [hax playground](https://hax-playground.cryspen.com/), +and delve into a diverse collection of [examples](https://github.com/cryspen/hax/tree/main/examples) +showcasing hax's capabilities. + +We will work on improving the manual and developer documentation over the next +few months. + +#### Hax in Action + +Over the past year, hax has proven its versatility in various projects: + +- [Verifying Bertie](https://cryspen.com/post/hax-pv/): A TLS 1.3 implementation, verified with the ProVerif backend +- [Verifying ML-KEM](https://cryspen.com/post/ml-kem-verification): A post quantum cryptographic algorithm verified with the F\* backend +- [Verifying Smart Contracts](https://github.com/hacspec/hacspec.github.io/blob/master/coqpl24-paper9-13.pdf): Leveraging the Rocq backend for enhanced security verification. + +#### The Road Ahead + +While hax can handle a substantial portion of Rust code, certain limitations +remain. +Features like Generic Associated Types (GATs), some Rust nightly features, specific +loop and pattern structures, and a range of mutations are not yet supported. + +??? hint "Detailed list of unsupported features" + Here's some content. + + **GATs** + + Support for Generic Associated Types (GATs) in the frontend is under consideration + ([Issue #915](https://github.com/hacspec/hax/issues/915)) + + **Rust nightly features** + + A full list of unsupported Rust nightly features can be found with the [unsupported-rust label](https://github.com/hacspec/hax/issues?q=is%3Aissue%20state%3Aopen%20nightly%20label%3Aunsupported-rust). + + **Pattern** + + Some expressive Rust patterns are not supported yet in the hax engine. + For example, [range patterns](https://github.com/hacspec/hax/issues/925) such as + `0..12`, [`as` patterns](https://github.com/hacspec/hax/issues/833) such as `x @ Option(_)` or [array or slice patterns](https://github.com/hacspec/hax/issues/804) such as `[head, ..tail]` are not supported. + + **Mutation** + + - Mutations inside closures are not supported ([Issue #1060](https://github.com/hacspec/hax/issues/1060)) + - Re-borrowing mutable refferences is not allowed ([Issue #420](https://github.com/hacspec/hax/issues/420)) + - Implicit reborrowing of mutable references is not supported ([Issue #419](https://github.com/hacspec/hax/issues/419)) + - User-defined functions cannot return `&mut`s ([Issue #418](https://github.com/hacspec/hax/issues/418)) + - Calling `&mut`-returning functions is not allowed in general ([Issue #418](https://github.com/hacspec/hax/issues/418), [Issue #494](https://github.com/hacspec/hax/issues/494) and [Issue #491](https://github.com/hacspec/hax/issues/491)) + - Enum variants cannot be mutated ([Issue #493](https://github.com/hacspec/hax/issues/493)) + + **Loops** + + - Unconditional loops `loop {...}` ([Issue #124](https://github.com/hacspec/hax/issues/124)) + - While let `while let .. = .. {}` ([Issue #113](https://github.com/hacspec/hax/issues/113)) + - Loops without side effect ([Issue #405](https://github.com/hacspec/hax/issues/405)) + + **`const` inline blocks** + + Inline `const` blocks are not supported yet. + [Issue #923](https://github.com/hacspec/hax/issues/923) + +### Parting Thoughts + +This is an exciting time for hax! +With our new home at Cryspen, a dedicated release model, and a growing community, +we're confident that hax will continue to mature and empower developers to build +secure and reliable software. + +We encourage you to explore the new hax website, dive into the documentation, +and experiment with the playground. +Join us on this journey! +Contribute to the project, share your feedback, and help us shape the future of +Rust verification. diff --git a/docs/default.nix b/docs/default.nix new file mode 100644 index 000000000..dfb80986a --- /dev/null +++ b/docs/default.nix @@ -0,0 +1,46 @@ +{ stdenv, buildPythonPackage, fetchPypi, setuptools, wheel, mkdocs +, mkdocs-material, fetchFromGitHub, natsort, wcmatch, hax-frontend-docs +, hax-engine-docs }: +let + mkdocs-glightbox = buildPythonPackage rec { + pname = "mkdocs-glightbox"; + version = "0.4.0"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-OSs0IHv5WZEHGhbV+JFtHS8s1dW7Wa4pl0hczXeMcNk="; + }; + + doCheck = false; + + pyproject = true; + build-system = [ setuptools wheel ]; + }; + mkdocs-nav-weight = buildPythonPackage rec { + pname = "mkdocs-nav-weight"; + version = "0.0.7"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-gAQGD3U3/NmWW/3uUSrCjo/T+rqdIlMkKn83TjDgbp0="; + }; + + doCheck = false; + + pyproject = true; + build-system = [ setuptools wheel mkdocs ]; + }; + +in stdenv.mkDerivation { + name = "hax-docs"; + src = ./..; + buildInputs = [ mkdocs mkdocs-material mkdocs-glightbox mkdocs-nav-weight ]; + buildPhase = '' + mkdocs build + ''; + installPhase = '' + mv site $out + cp -rf ${hax-frontend-docs}/share/doc/ $out/frontend/docs + cp -rf ${hax-engine-docs} $out/engine/docs + ''; +} diff --git a/book/src/contributing/architecture.md b/docs/dev/architecture.md similarity index 100% rename from book/src/contributing/architecture.md rename to docs/dev/architecture.md diff --git a/docs/dev/ast_ebnf.md b/docs/dev/ast_ebnf.md new file mode 100644 index 000000000..3ddf71ddb --- /dev/null +++ b/docs/dev/ast_ebnf.md @@ -0,0 +1,245 @@ +We currently take inputs from the following AST (visualization can be done +using ). Literals are strings, numbers and +booleans. + +``` ebnf +char ::= [a-zA-Z] +string ::= char* +digit ::= [0-9] +uint ::= digit+ +int ::= ("-")? uint +float ::= int (".")? uint +bool ::= "true" | "false" + +local_var ::= ident +global_var ::= rust-path-identifier + +literal ::= +| '"' string '"' +| "'" char "'" +| int +| float (* [a] *) +| bool +``` + +We support a number of simple types characters, strings, booleans and +numbers. Number types for integers (8,16,32,64,128 bit or machine sized) +and floats (16,32, or 64 bit). Composite types are tuples, fixed length +lists (arrays), variable length lists (vectors/slices), ptr types, and +function types. Lastly we have named types defined by items, e.g. enums +and structs. + +``` ebnf +ty ::= +| "bool" +| "char" +| "u8" | "u16" | "u32" | "u64" +| "u128" | "usize" +| "i8" | "i16" | "i32" | "i64" +| "i128" | "isize" +| "f16" | "f32" | "f64" (* [a] *) +| "str" +| (ty ",")* +| "[" ty ";" int "]" +| "[" ty "]" +| "*const" ty | "*mut" ty (* [b] *) +| "*" expr | "*mut" expr (* [b] *) +| ident +| (ty "->")* ty +| "dyn" (goal)+ (* [c] *) +``` + +The patterns allowed reflect these types. Wildcard patterns, literal +types, typed patterns, list patterns, record or tuple patterns. + +``` ebnf +pat ::= +| "_" +| ident "{" (ident ":" pat ";")* "}" +| ident "(" (pat ",")* ")" +| (pat "|")* pat +| "[" (pat ",")* "]" (* [d] *) +| "&" pat +| literal +| ("&")? ("mut")? ident ("@" pat)? (* [e] *) +``` + +The simple expressions are literals, local or global variables, type +casts, assignments and lists. Control flow expressions, if statements, +match statements, loops, return, break and continue. The rest is blocks, +macro calls, lambda functions and borrowing. + +``` ebnf +expr ::= +| "if" expr "{" expr "}" ("else" "{" expr "}")? +| "if" "let" pat (":" ty)? "=" expr "{" expr "}" ("else" "{" expr "}")? +| expr "(" (expr ",")* ")" +| literal +| "[" (expr ",")* "]" | "[" expr ";" int "]" +| ident "{" (ident ":"expr ";")* "}" +| ident "{" (ident ":"expr ";")* ".." expr "}" +| "match" expr guard "{" +(("|" pat)* "=>" (expr "," | "{" expr "}"))* +"}" +| "let" pat (":" ty)? "=" expr ";" expr +| "let" pat (":" ty)? "=" expr "else" "{" expr "}" ";" expr +| modifiers "{" expr "}" +| local_var +| global_var +| expr "as" ty +| "loop" "{" expr "}" +| "while" "(" expr ")" "{" expr "}" +| "for" "(" pat "in" expr ")" "{" expr "}" +| "for" "(" "let" ident "in" expr ".." expr ")" "{" expr "}" +| "break" expr +| "continue" +| pat "=" expr +| "return" expr +| expr "?" +| "&" ("mut")? expr (* [e] *) +| "&" expr "as" "&const _" (* [b] *) +| "&mut" expr "as" "&mut _" +| "|" pat "|" expr +``` + +The items supported are functions, type aliasing, enums, structs, trait +definitions and implementations, and imports. + +``` ebnf +item ::= +| "const" ident "=" expr +| "static" ident "=" expr (* [b] *) +| modifiers "fn" ident ("<" (generics ",")* ">")? "(" (pat ":" ty ",")* ")" (":" ty)? "{" expr "}" +| "type" ident "=" ty +| "enum" ident ("<" (generics ",")* ">")? "{" (ident ("(" (ty)* ")")? ",")* "}" +| "struct" ident ("<" (generics ",")* ">")? "{" (ident ":" ty ",")* "}" +| "trait" ident ("<" (generics ",")* ">")? "{" (trait_item)* "}" +| "impl" ("<" (generics ",")* ">")? ident "for" ty "{" (impl_item)* "}" +| "mod" ident "{" (item)* "}" +| "use" path ";" +``` + +## Full eBNF + +``` ebnf +char ::= [a-zA-Z] +string ::= char* +digit ::= [0-9] +uint ::= digit+ +int ::= ("-")? uint +float ::= int (".")? uint +bool ::= "true" | "false" + +local_var ::= ident +global_var ::= rust-path-identifier + +literal ::= +| '"' string '"' +| "'" char "'" +| int +| float [a] +| bool + +generic_value ::= +| "'" ident +| ty +| expr + +goal ::= +| ident "<" (generic_value ",")* ">" + +ty ::= +| "bool" +| "char" +| "u8" | "u16" | "u32" | "u64" +| "u128" | "usize" +| "i8" | "i16" | "i32" | "i64" +| "i128" | "isize" +| "f16" | "f32" | "f64" (* [a] *) +| "str" +| (ty ",")* +| "[" ty ";" int "]" +| "[" ty "]" +| "*const" ty | "*mut" ty (* [b] *) +| "*" expr | "*mut" expr (* [b] *) +| ident +| (ty "->")* ty +| "dyn" (goal)+ (* [c] *) + +pat ::= +| "_" +| ident "{" (ident ":" pat ";")* "}" +| ident "(" (pat ",")* ")" +| (pat "|")* pat +| "[" (pat ",")* "]" (* [d] *) +| "&" pat +| literal +| ("&")? ("mut")? ident ("@" pat)? (* [e] *) + +modifiers ::= +| "" +| "unsafe" modifiers +| "const" modifiers +| "async" modifiers (* [b] *) + +guard ::= +| "if" "let" pat (":" ty)? "=" expr + +expr ::= +| "if" expr "{" expr "}" ("else" "{" expr "}")? +| "if" "let" pat (":" ty)? "=" expr "{" expr "}" ("else" "{" expr "}")? +| expr "(" (expr ",")* ")" +| literal +| "[" (expr ",")* "]" | "[" expr ";" int "]" +| ident "{" (ident ":"expr ";")* "}" +| ident "{" (ident ":"expr ";")* ".." expr "}" +| "match" expr guard "{" +(("|" pat)* "=>" (expr "," | "{" expr "}"))* +"}" +| "let" pat (":" ty)? "=" expr ";" expr +| "let" pat (":" ty)? "=" expr "else" "{" expr "}" ";" expr +| modifiers "{" expr "}" +| local_var +| global_var +| expr "as" ty +| "loop" "{" expr "}" +| "while" "(" expr ")" "{" expr "}" +| "for" "(" pat "in" expr ")" "{" expr "}" +| "for" "(" "let" ident "in" expr ".." expr ")" "{" expr "}" +| "break" expr +| "continue" +| pat "=" expr +| "return" expr +| expr "?" +| "&" ("mut")? expr (* [e] *) +| "&" expr "as" "&const _" (* [b] *) +| "&mut" expr "as" "&mut _" +| "|" pat "|" expr + +impl_item ::= +| "type" ident "=" ty ";" +| modifiers "fn" ident ("<" (generics ",")* ">")? "(" (pat ":" ty ",")* ")" (":" ty)? "{" expr "}" + +trait_item ::= +| "type" ident ";" +| modifiers "fn" ident ("<" (generics ",")* ">")? "(" (pat ":" ty ",")* ")" (":" ty)? ("{" expr "}" | ";") + +item ::= +| "const" ident "=" expr +| "static" ident "=" expr (* [b] *) +| modifiers "fn" ident ("<" (generics ",")* ">")? "(" (pat ":" ty ",")* ")" (":" ty)? "{" expr "}" +| "type" ident "=" ty +| "enum" ident ("<" (generics ",")* ">")? "{" (ident ("(" (ty)* ")")? ",")* "}" +| "struct" ident ("<" (generics ",")* ">")? "{" (ident ":" ty ",")* "}" +| "trait" ident ("<" (generics ",")* ">")? "{" (trait_item)* "}" +| "impl" ("<" (generics ",")* ">")? ident "for" ty "{" (impl_item)* "}" +| "mod" ident "{" (item)* "}" +| "use" path ";" +``` +## Footnotes + +* **[a]** no support yet for raw pointers, async/await, static, extern, or union types +* **[b]** partial support for nested matching and range patterns +* **[c]** partial support for mutable borrows +* **[d]** most backends lack support for dynamic dispatch, floating point operations +* **[e]** some backends only handle specific forms of iterators diff --git a/docs/dev/docs.md b/docs/dev/docs.md new file mode 100644 index 000000000..3711dd55f --- /dev/null +++ b/docs/dev/docs.md @@ -0,0 +1,35 @@ +# Docs + +## mkdocs material (this page) + +Install dependencies + +```bash +pip install mkdocs-glightbox mkdocs-nav-weight mkdocs-material +``` + +[Official docs](https://squidfunk.github.io/mkdocs-material). + +### Commands + +* `mkdocs new [dir-name]` - Create a new project. +* `mkdocs serve` - Start the live-reloading docs server. +* `mkdocs build` - Build the documentation site. +* `mkdocs -h` - Print help message and exit. + +### Project layout + + mkdocs.yml # The configuration file. + docs/ + index.md # The documentation homepage. + ... # Other markdown pages, images and other files. + blog/ # The blog + posts/ # Blog posts + +### Including external files + +``` +;--8<-- "engine/DEV.md:3:7" +``` + +--8<-- "engine/DEV.md:3:7" diff --git a/book/src/contributing/intro.md b/docs/dev/index.md similarity index 85% rename from book/src/contributing/intro.md rename to docs/dev/index.md index 383716a6f..34edf8fef 100644 --- a/book/src/contributing/intro.md +++ b/docs/dev/index.md @@ -1,4 +1,8 @@ -# Contributing +--- +weight: 5 +--- + +# Dev on hax This chapter contains information about internals of hax. Please read the [`CONTRIBUTING.md`](https://github.com/hacspec/hax/blob/main/CONTRIBUTING.md) before opening a pull request. diff --git a/book/src/contributing/libraries_macros.md b/docs/dev/libraries_macros.md similarity index 100% rename from book/src/contributing/libraries_macros.md rename to docs/dev/libraries_macros.md diff --git a/docs/engine/index.md b/docs/engine/index.md new file mode 100644 index 000000000..14a2b5769 --- /dev/null +++ b/docs/engine/index.md @@ -0,0 +1,3 @@ +# Engine + +The hax engine. Its [odoc](https://ocaml.github.io/odoc/) documentation can be found [here](./docs/hax-engine/index.html). \ No newline at end of file diff --git a/docs/frontend/index.md b/docs/frontend/index.md new file mode 100644 index 000000000..9c374f2b5 --- /dev/null +++ b/docs/frontend/index.md @@ -0,0 +1,3 @@ +# Frontend + +The hax frontend. Its [rustdoc](https://doc.rust-lang.org/rustdoc/what-is-rustdoc.html) documentation can be found [here](./docs/hax_frontend_exporter/index.html). \ No newline at end of file diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 000000000..2bf6412cd --- /dev/null +++ b/docs/index.md @@ -0,0 +1,6 @@ +# Welcome to hax + +hax is a tool for high assurance translations of a large subset of +Rust into formal languages such as [F\*](https://www.fstar-lang.org/) or [Rocq](https://rocq-prover.org/). + +Head over to the [Manual](./manual/index.md) to get started! diff --git a/book/theme/ansi_up.js b/docs/javascripts/ansi_up.js similarity index 100% rename from book/theme/ansi_up.js rename to docs/javascripts/ansi_up.js diff --git a/book/theme/fstar.js b/docs/javascripts/fstar.js similarity index 100% rename from book/theme/fstar.js rename to docs/javascripts/fstar.js diff --git a/docs/javascripts/hax_playground.js b/docs/javascripts/hax_playground.js new file mode 100644 index 000000000..6a8b56727 --- /dev/null +++ b/docs/javascripts/hax_playground.js @@ -0,0 +1,147 @@ +// Call into the API of the hax playground +function call_playground(result_block, query, text) { + let raw_query = async (API_URL, hax_version, query, files, on_line_received) => { + let response = await fetch(`${API_URL}/query/${hax_version}/${query}`, { + method: "POST", + headers: { + 'Accept': 'application/json', + 'Content-Type': 'application/json' + }, + body: JSON.stringify(files), + }); + + let decoder = new TextDecoder(); + let leftover = ""; + let reader = response.body.getReader(); + while (true) { + const { done, value } = await reader.read(); + if (done) break; + leftover += decoder.decode(value); + let lines = leftover.split('\n'); + let entire_lines = lines.slice(0, -1); + leftover = lines.slice(-1)[0]; + for (const line of entire_lines) + on_line_received(line); + } + }; + let hax_version = '5ca1c13023200dee0cca6237901a3b5a69ad345a'; + let playground_url = 'https://hax-playground.cryspen.com'; + let ansi_up = new AnsiUp(); + let first = true; + let logs = document.createElement('div'); + logs.style = 'font-size: 80%; background: #00000010; padding: 3px;'; + raw_query( + playground_url, + hax_version, + query, + [['src/lib.rs', text]], + x => { + if (first) { + result_block.style.padding = '0.7em 1.2em'; + result_block.innerText = ""; + result_block.appendChild(logs); + } + first = false; + let json = {}; + try { + json = JSON.parse(x); + } catch (_) { } + if (json.Stderr || json.Stdout) { + logs.innerHTML += '
' + ansi_up.ansi_to_html(json.Stderr || json.Stdout) + "
"; + } + if (json.Done) { + let out = []; + for (let file in json.Done.files) { + if (file.endsWith('.rs')) + continue; + let contents = json.Done.files[file]; + contents = contents.split('open FStar.Mul')[1].trim(); + contents = contents.replace(/$/gm, ' ').trim(); + out.push([file, contents]); + } + if (json.Done.success) + result_block.innerText = ""; + else + result_block.innerHTML += "
"; + let result = document.createElement('div'); + if (out.length == 1) { + result.innerText = out[0][1]; + } else { + result.innerText = out.map(([file, s]) => '(* File: ' + file + ' *) \n' + s).join('\n\n').trim(); + } + result_block.appendChild(result); + if (json.Done.success && query.includes('+tc')) { + result_block.innerHTML += '
Status: ✓ F* successfully typechecked!
'; + } + hljs.highlightBlock(result); + result_block.innerHTML += `
Open in hax playground ↗`; + } + }, + ); +} + +function setup() { + for (let e of document.querySelectorAll('pre')) { + let code = e.querySelector("code"); + let lines = [ + ...code.children + ].map(line => line.innerText.replace(/^\n+/, '').replace(/\n+$/, '')) + .join("\n").trim().split('\n'); + let contents = lines.filter(line => !line.startsWith('# ')).join('\n'); + let w = e.parentElement; + if (!w.classList.contains("playable")) + continue; + + code.innerHTML = "
";
+        let inner = code.children[0];
+        inner.style.backgroundColor = "transparent";
+
+        let editor = ace.edit(inner);
+        editor.setValue(contents, -1);
+        editor.setValue(contents, 1);
+        editor.getSession().setMode("ace/mode/rust");
+        editor.setOptions({
+            maxLines: Infinity,
+            showGutter: false,
+            fontSize: "1em",
+            highlightActiveLine: false,
+        });
+
+        let result_block = document.createElement("pre");
+        result_block.style.fontFamily = '"Monaco", "Menlo", "Ubuntu Mono", "Consolas", "Source Code Pro", "source-code-pro", monospace';
+        result_block.style.fontSize = '0.85em';
+        result_block.style.background = '#f3f3f3';
+        w.append(result_block);
+
+        let header = lines.filter(line => line.startsWith('# ')).map(line => line.slice(2)).join('\n');
+        let getCode = () => header + '\n' + editor.getValue();
+
+        let button_translate = document.createElement("button");
+        button_translate.innerHTML = ``;
+        button_translate.classList.add('md-icon');
+        button_translate.classList.add('md-clipboard');
+        button_translate.classList.add('md-hax-playground');
+        button_translate.style.right = "2.4em";
+        button_translate.onclick = () => {
+            call_playground(result_block, 'fstar', getCode());
+        };
+        e.prepend(button_translate);
+
+
+        let button_tc = document.createElement("button");
+        button_tc.innerHTML = ``;
+        button_tc.classList.add('md-icon');
+        button_tc.classList.add('md-clipboard');
+        button_tc.classList.add('md-hax-playground');
+        button_tc.style.right = "4.5em";
+        button_tc.onclick = () => {
+            button_tc.onclick = () => {
+                call_playground(result_block, 'fstar+tc', getCode());
+            };
+            e.prepend(button_tc);
+
+            code.style.padding = "0 0.9em";
+        }
+    }
+
+    setup();
diff --git a/book/theme/lz-string.js b/docs/javascripts/lz-string.js
similarity index 100%
rename from book/theme/lz-string.js
rename to docs/javascripts/lz-string.js
diff --git a/book/src/faq/include-flags.md b/docs/manual/faq/include-flags.md
similarity index 100%
rename from book/src/faq/include-flags.md
rename to docs/manual/faq/include-flags.md
diff --git a/book/src/faq/intro.md b/docs/manual/faq/index.md
similarity index 91%
rename from book/src/faq/intro.md
rename to docs/manual/faq/index.md
index cefa77ebd..f561e2533 100644
--- a/book/src/faq/intro.md
+++ b/docs/manual/faq/index.md
@@ -1,3 +1,7 @@
+---
+weight: 4
+---
+
 # Troubleshooting/FAQ
 
 This chapter captures a list of common questions or issues and how to resolve them. If you happen to run into an issue that is not documented here, please consider submitting a pull request!
diff --git a/book/src/faq/into.md b/docs/manual/faq/into.md
similarity index 100%
rename from book/src/faq/into.md
rename to docs/manual/faq/into.md
diff --git a/docs/manual/index.md b/docs/manual/index.md
new file mode 100644
index 000000000..eacda1c2f
--- /dev/null
+++ b/docs/manual/index.md
@@ -0,0 +1,71 @@
+---
+weight: -5
+---
+
+# Introduction
+
+hax is a tool for high assurance translations of a large subset of
+Rust into formal languages such as [F\*](https://www.fstar-lang.org/) or [Rocq](https://rocq-prover.org/).
+
+## Usage
+
+Hax is a cargo subcommand. 
+The command `cargo hax` accepts the following subcommands:
+
+* **`into`** (`cargo hax into BACKEND`): translate a Rust crate to the backend `BACKEND` (e.g. `fstar`, `coq`).
+* **`json`** (`cargo hax json`): extract the typed AST of your crate as a JSON file.
+ 
+Note:
+
+* `BACKEND` can be `fstar`, `coq`, `easycrypt` or `pro-verif`. `cargo hax into --help`
+   gives the full list of supported backends.
+* The subcommands `cargo hax`, `cargo hax into` and `cargo hax into
+   ` takes options. For instance, you can `cargo hax into
+   fstar --z3rlimit 100`. Use `--help` on those subcommands to list
+   all options.
+
+## Installation
+
+### Manual installation
+
+1. Make sure to have the following installed on your system:
+
+      - [`opam`](https://opam.ocaml.org/) (`opam switch create 5.1.1`)
+      - [`rustup`](https://rustup.rs/)
+      - [`nodejs`](https://nodejs.org/)
+      - [`jq`](https://jqlang.github.io/jq/)
+
+2. Clone this repo: `git clone git@github.com:hacspec/hax.git && cd hax`
+3. Run the [setup.sh](./setup.sh) script: `./setup.sh`.
+4. Run `cargo-hax --help`
+
+### Nix
+
+This should work on [Linux](https://nixos.org/download.html#nix-install-linux), [MacOS](https://nixos.org/download.html#nix-install-macos) and [Windows](https://nixos.org/download.html#nix-install-windows).
+
+Prerequisites: Nix package
+manager (with flakes enabled)
+
+  - Either using the [Determinate Nix Installer](https://github.com/DeterminateSystems/nix-installer), with the following bash one-liner:
+    ```bash
+    curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
+    ```
+  - or following [those steps](https://github.com/mschwaig/howto-install-nix-with-flake-support).
+
++ **Run hax on a crate directly** to get F\*/Coq/... (assuming you are in the crate's folder):
+   - `nix run github:hacspec/hax -- into fstar` extracts F*.
+
++ **Install hax**:  `nix profile install github:hacspec/hax`, then run `cargo hax --help` anywhere
++ **Note**: in any of the Nix commands above, replace `github:hacspec/hax` by `./dir` to compile a local checkout of hax that lives in `./some-dir`
++ **Setup binary cache**: [using Cachix](https://app.cachix.org/cache/hax), just `cachix use hax`
+
+### Docker
+
+1. Clone this repo: `git clone git@github.com:hacspec/hax.git && cd hax`
+2. Build the docker image: `docker build -f .docker/Dockerfile . -t hax`
+3. Get a shell: `docker run -it --rm -v /some/dir/with/a/crate:/work hax bash`
+4. You can now run `cargo-hax --help` (notice here we use `cargo-hax` instead of `cargo hax`)
+
+Note: Please make sure that `$HOME/.cargo/bin` is in your `$PATH`, as
+that is where `setup.sh` will install hax.
+
diff --git a/book/src/quick_start/intro.md b/docs/manual/quick_start/index.md
similarity index 98%
rename from book/src/quick_start/intro.md
rename to docs/manual/quick_start/index.md
index a5dd82a12..d2ceac30b 100644
--- a/book/src/quick_start/intro.md
+++ b/docs/manual/quick_start/index.md
@@ -1,3 +1,7 @@
+---
+weight: 0
+---
+
 # Quick start with hax and F*
 
 Do you want to try hax out on a Rust crate of yours? This chapter is
@@ -60,7 +64,7 @@ constructs](https://github.com/hacspec/hax?tab=readme-ov-file#supported-subset-o
 for extracting only a part of your crate. When running hax, if an item
 of your crate, say a function `my_crate::f`, is not handled by hax,
 you can append `-my_crate::f` to the `-i` flag. You can learn more
-about the `-i` flag [in the FAQ](../faq/include-flags.html).
+about the `-i` flag [in the FAQ](../faq/include-flags.md).
 
 
 
diff --git a/book/src/tutorial/data-invariants.md b/docs/manual/tutorial/data-invariants.md
similarity index 97%
rename from book/src/tutorial/data-invariants.md
rename to docs/manual/tutorial/data-invariants.md
index aa84fc349..e8283ba85 100644
--- a/book/src/tutorial/data-invariants.md
+++ b/docs/manual/tutorial/data-invariants.md
@@ -1,3 +1,7 @@
+---
+weight: 2
+---
+
 # Data invariants
 
 In the two previous chapters we saw how to write specifications on
@@ -25,7 +29,7 @@ Rust alone already can solve our representation issues with
 define the `enum` type `F3` which has only three constructor: `F3`
 represent exactly the elements of `F₃`, not more, not less.
 
-```rust,editable
+```{.rust .playable}
 enum F3 {
     E1,
     E2,
@@ -54,7 +58,7 @@ one `u16` field `v`. Notice the refinment annotation on `v`: the
 extraction of this type `F` via hax will result in a type enforcing
 `v` small enough.
 
-```rust,editable
+``` {.rust .playable}
 pub const Q: u16 = 2347;
 
 #[hax_lib::attributes]
@@ -69,7 +73,7 @@ assuming they are in bounds with respect to `F₂₃₄₇`: every such
 assumption will be checked and enforced by the proof assistant. As an
 example, below is the implementation of the addition for type `F`.
 
-```rust,editable
+``` {.rust .playable}
 # pub const Q: u16 = 2347;
 # 
 # #[hax_lib::attributes]
diff --git a/book/src/tutorial/readme.md b/docs/manual/tutorial/index.md
similarity index 97%
rename from book/src/tutorial/readme.md
rename to docs/manual/tutorial/index.md
index dbe20068d..27539fc6c 100644
--- a/book/src/tutorial/readme.md
+++ b/docs/manual/tutorial/index.md
@@ -1,3 +1,7 @@
+---
+weight: 1
+---
+
 # Tutorial
 
 This tutorial is a guide for formally verifying properties about Rust
diff --git a/book/src/tutorial/panic-freedom.md b/docs/manual/tutorial/panic-freedom.md
similarity index 95%
rename from book/src/tutorial/panic-freedom.md
rename to docs/manual/tutorial/panic-freedom.md
index 33c7d0d25..85a970702 100644
--- a/book/src/tutorial/panic-freedom.md
+++ b/docs/manual/tutorial/panic-freedom.md
@@ -1,3 +1,7 @@
+---
+weight: 0
+---
+
 # Panic freedom
 
 Let's start with a simple example: a function that squares a `u8`
@@ -6,9 +10,9 @@ run the command `cargo hax into fstar` in the directory of the crate
 in which the function `square` is defined.
 
 *Note: throughout this tutorial, you can edit the snippets of code and
-extract to F\* by clicking the play button (  ), or even typecheck it with the button (  ).*
+extract to F\* by clicking the play button (:material-play:), or even typecheck it with the button (:material-check:).*
 
-```rust,editable
+```{.rust .playable }
 fn square(x: u8) -> u8 {
     x * x
 }
@@ -56,7 +60,7 @@ its input is within `0` and `15`.
 
 ### Solution A: reflect the partialness of the function in Rust
 A first solution is to make `square` return an `Option` instead of a `u8`:
-```rust,editable
+``` {.rust .playable}
 fn square_option(x: u8) -> Option {
     if x >= 16 {
         None
@@ -91,7 +95,7 @@ provdes the `requires`
 [proc-macro](https://doc.rust-lang.org/reference/procedural-macros.html)
 which lets user writting pre-conditions directly in Rust.
 
-```rust,editable
+```{.rust .playable}
 #[hax_lib::requires(x < 16)]
 fn square_requires(x: u8) -> u8 {
     x * x
diff --git a/book/src/tutorial/proofs/fstar/extraction/Makefile b/docs/manual/tutorial/proofs/fstar/extraction/Makefile
similarity index 100%
rename from book/src/tutorial/proofs/fstar/extraction/Makefile
rename to docs/manual/tutorial/proofs/fstar/extraction/Makefile
diff --git a/book/src/tutorial/proofs/fstar/extraction/Tutorial_src.Math.Lemmas.fst b/docs/manual/tutorial/proofs/fstar/extraction/Tutorial_src.Math.Lemmas.fst
similarity index 100%
rename from book/src/tutorial/proofs/fstar/extraction/Tutorial_src.Math.Lemmas.fst
rename to docs/manual/tutorial/proofs/fstar/extraction/Tutorial_src.Math.Lemmas.fst
diff --git a/book/src/tutorial/proofs/fstar/extraction/Tutorial_src.fst b/docs/manual/tutorial/proofs/fstar/extraction/Tutorial_src.fst
similarity index 100%
rename from book/src/tutorial/proofs/fstar/extraction/Tutorial_src.fst
rename to docs/manual/tutorial/proofs/fstar/extraction/Tutorial_src.fst
diff --git a/book/src/tutorial/properties.md b/docs/manual/tutorial/properties.md
similarity index 97%
rename from book/src/tutorial/properties.md
rename to docs/manual/tutorial/properties.md
index 6471a35b4..a35ea0b92 100644
--- a/book/src/tutorial/properties.md
+++ b/docs/manual/tutorial/properties.md
@@ -1,3 +1,7 @@
+---
+weight: 1
+---
+
 # Proving properties
 
 In the last chapter, we proved one property on the `square` function:
@@ -9,7 +13,7 @@ _return a value_: it will not panic or diverge. We could enrich the
 contract of `square` with a post-condition about the fact it is a
 increasing function:
 
-```rust,editable
+``` {.rust .playable}
 #[hax_lib::requires(x < 16)]
 #[hax_lib::ensures(|result| result >= x)]
 fn square_ensures(x: u8) -> u8 {
@@ -37,7 +41,7 @@ Given `value` a field element (a `i32` whose absolute value is at most
 It is easy to write this contract directly as `hax::requires` and
 `hax::ensures` annotations, as shown in the snippet below.
 
-```rust,editable
+```{.rust .playable}
 type FieldElement = i32;
 const FIELD_MODULUS: i32 = 3329;
 const BARRETT_SHIFT: i64 = 26;
@@ -94,7 +98,7 @@ property: encrypting a ciphertext and decrypting the result with a
 same key produces the ciphertext again. `|c| decrypt(c, key)` is the
 inverse of `|p| encrypt(p, key)`.
 
-```rust,editable
+```{.rust .playable}
 fn encrypt(plaintext: u32, key: u32) -> u32 {
     plaintext ^ key
 }
@@ -117,7 +121,7 @@ proof itself are not relevant, at this stage, we only care about the
 statement. The proof will be completed manually in the proof
 assistant.
 
-```rust,editable
+```{.rust .playable}
 # fn encrypt(plaintext: u32, key: u32) -> u32 {
 #     plaintext ^ key
 # }
@@ -128,6 +132,7 @@ assistant.
 # 
 #[hax_lib::lemma]
 #[hax_lib::requires(true)]
+
 fn encrypt_decrypt_identity(
     key: u32,
     plaintext: u32,
diff --git a/docs/overrides/main.html b/docs/overrides/main.html
new file mode 100644
index 000000000..d6bda57d1
--- /dev/null
+++ b/docs/overrides/main.html
@@ -0,0 +1,13 @@
+{% extends "base.html" %}
+
+{% block site_meta %}
+
+
+
+
+{{ super() }}
+{% endblock %}
\ No newline at end of file
diff --git a/docs/publications.md b/docs/publications.md
new file mode 100644
index 000000000..bfcd23a56
--- /dev/null
+++ b/docs/publications.md
@@ -0,0 +1,16 @@
+---
+weight: 5
+---
+
+# Publications
+
+* [📕 hacspec Tech report](https://hal.inria.fr/hal-03176482)
+* [📕 HACSpec: A gateway to high-assurance cryptography](https://github.com/hacspec/hacspec/blob/master/rwc2023-abstract.pdf)
+* [📕 Original hacspec paper](https://www.franziskuskiefer.de/publications/hacspec-ssr18-paper.pdf)
+
+### Secondary literature, using hacspec & hax:
+* [📕 Last yard](https://eprint.iacr.org/2023/185)
+* [📕 A Verified Pipeline from a Specification Language to Optimized, Safe Rust](https://github.com/hacspec/hacspec.github.io/blob/master/coqpl22-final61.pdf) at [CoqPL'22](https://popl22.sigplan.org/details/CoqPL-2022-papers/5/A-Verified-Pipeline-from-a-Specification-Language-to-Optimized-Safe-Rust)
+* [📕 Hax - Enabling High Assurance Cryptographic Software](https://github.com/hacspec/hacspec.github.io/blob/master/RustVerify24.pdf) at [RustVerify24](https://sites.google.com/view/rustverify2024)
+* [📕 A formal security analysis of Blockchain voting](https://github.com/hacspec/hacspec.github.io/blob/master/coqpl24-paper8-2.pdf) at [CoqPL'24](https://popl24.sigplan.org/details/CoqPL-2024-papers/8/A-formal-security-analysis-of-Blockchain-voting)
+* [📕 Specifying Smart Contract with Hax and ConCert](https://github.com/hacspec/hacspec.github.io/blob/master/coqpl24-paper9-13.pdf) at [CoqPL'24](https://popl24.sigplan.org/details/CoqPL-2024-papers/9/Specifying-Smart-Contract-with-Hax-and-ConCert)
diff --git a/docs/static/img/favicon.png b/docs/static/img/favicon.png
new file mode 100644
index 000000000..ba705cf1d
Binary files /dev/null and b/docs/static/img/favicon.png differ
diff --git a/docs/static/img/logo.png b/docs/static/img/logo.png
new file mode 100644
index 000000000..cecc24cb5
Binary files /dev/null and b/docs/static/img/logo.png differ
diff --git a/docs/stylesheets/hax_playground.css b/docs/stylesheets/hax_playground.css
new file mode 100644
index 000000000..dbf4eeace
--- /dev/null
+++ b/docs/stylesheets/hax_playground.css
@@ -0,0 +1,3 @@
+.md-hax-playground::after {
+    display: none;
+}
\ No newline at end of file
diff --git a/docs/stylesheets/logo.css b/docs/stylesheets/logo.css
new file mode 100644
index 000000000..7dddaf85f
--- /dev/null
+++ b/docs/stylesheets/logo.css
@@ -0,0 +1,24 @@
+.md-header__button[data-md-component="logo"] {
+    display: block !important;
+}
+
+label.md-header__button.md-icon[for="__drawer"] {
+    order: -1;
+}
+
+label.md-nav__title[for="__drawer"] img {
+    margin: auto;
+}
+
+label.md-nav__title[for="__drawer"] {
+    font-size: 0.0001px !important;
+    color: red !important;
+    text-align: center;
+    height: 4rem;
+    overflow: none;
+    /* color: transparent !important; */
+}
+
+.md-header__topic {
+    display: none;
+}
\ No newline at end of file
diff --git a/docs/stylesheets/tags-colors.css b/docs/stylesheets/tags-colors.css
new file mode 100644
index 000000000..7d8f7b592
--- /dev/null
+++ b/docs/stylesheets/tags-colors.css
@@ -0,0 +1,37 @@
+/* This sets the color of the ADR status tags see https://github.com/squidfunk/mkdocs-material/discussions/5101 */
+
+.md-typeset .md-tag--draft,
+.md-typeset .md-tag--draft[href] {
+    background-color: #5694ca;
+    color: white;
+}
+
+.md-typeset .md-tag--accepted,
+.md-typeset .md-tag--accepted[href] {
+    background-color: #00703c;
+    color: white;
+}
+
+.md-typeset .md-tag--deprecated,
+.md-typeset .md-tag--deprecated[href] {
+    background-color: #b1b4b6;
+    color: white;
+}
+
+.md-typeset .md-tag--proposed,
+.md-typeset .md-tag--proposed[href] {
+    background-color: #003078;
+    color: white;
+}
+
+.md-typeset .md-tag--rejected,
+.md-typeset .md-tag--rejected[href] {
+    background-color: #f47738;
+    color: white;
+}
+
+.md-typeset .md-tag--superseded,
+.md-typeset .md-tag--superseded[href] {
+    background-color: #505a5f;
+    color: white;
+}
diff --git a/engine/backends/fstar/fstar_backend.ml b/engine/backends/fstar/fstar_backend.ml
index 714760ff5..7ca56bcb6 100644
--- a/engine/backends/fstar/fstar_backend.ml
+++ b/engine/backends/fstar/fstar_backend.ml
@@ -111,6 +111,24 @@ module Make
 struct
   open Ctx
 
+  module StringToFStar = struct
+    let catch_parsing_error (type a b) kind span (f : a -> b) x =
+      try f x
+      with e ->
+        let kind =
+          Types.FStarParseError
+            {
+              fstar_snippet = "";
+              details =
+                "While parsing a " ^ kind ^ ", error: "
+                ^ Base.Error.to_string_hum (Base.Error.of_exn e);
+            }
+        in
+        Error.raise { span; kind }
+
+    let term span = catch_parsing_error "term" span F.term_of_string
+  end
+
   let doc_to_string : PPrint.document -> string =
     FStar_Pprint.pretty_string 1.0 (Z.of_int ctx.line_width)
 
@@ -667,17 +685,17 @@ struct
              kind = UnsupportedMacro { id = [%show: global_ident] macro };
              span = e.span;
            }
-    | Quote quote -> pquote e.span quote |> F.term_of_string
+    | Quote quote -> pquote e.span quote |> StringToFStar.term e.span
     | _ -> .
 
   (** Prints a `quote` to a string *)
   and pquote span { contents; _ } =
     List.map
       ~f:(function
-        | `Verbatim code -> code
-        | `Expr e -> pexpr e |> term_to_string
-        | `Pat p -> ppat p |> pat_to_string
-        | `Typ p -> pty span p |> term_to_string)
+        | Verbatim code -> code
+        | Expr e -> pexpr e |> term_to_string
+        | Pattern p -> ppat p |> pat_to_string
+        | Typ p -> pty span p |> term_to_string)
       contents
     |> String.concat
 
@@ -1590,7 +1608,6 @@ let strings_of_item (bo : BackendOptions.t) m items (item : item) :
     [%matches? (Types.Included None' : Types.inclusion_kind)] interface_mode'
   in
   Print.pitem item
-  |> List.filter ~f:(function `Impl _ when no_impl -> false | _ -> true)
   |> List.concat_map ~f:(function
        | `Impl i -> [ (mk_impl (Print.decl_to_string i), `Newline) ]
        | `Intf i -> [ (mk_intf (Print.decl_to_string i), `Newline) ]
@@ -1600,6 +1617,7 @@ let strings_of_item (bo : BackendOptions.t) m items (item : item) :
            let s = "(* " ^ s ^ " *)" in
            if interface_mode then [ (`Impl s, `Newline); (`Intf s, `Newline) ]
            else [ (`Impl s, `Newline) ])
+  |> List.filter ~f:(function `Impl _, _ when no_impl -> false | _ -> true)
 
 type rec_prefix = NonRec | FirstMutRec | MutRec
 
diff --git a/engine/bin/lib.ml b/engine/bin/lib.ml
index 5695dd087..71f302bf8 100644
--- a/engine/bin/lib.ml
+++ b/engine/bin/lib.ml
@@ -186,10 +186,25 @@ let parse_options () =
   let table, json =
     Hax_io.read_json () |> Option.value_exn |> parse_id_table_node
   in
+  let version =
+    try Yojson.Safe.Util.(member "hax_version" json |> to_string)
+    with _ -> "unknown"
+  in
+  if String.equal version Types.hax_version |> not then (
+    prerr_endline
+      [%string
+        {|
+The versions of `hax-engine` and of `cargo-hax` are different:
+  - `hax-engine` version: %{Types.hax_version}
+  - `cargo-hax`  version: %{version}
+
+Please reinstall hax.
+|}];
+    Stdlib.exit 1);
   table
   |> List.iter ~f:(fun (id, json) ->
          Hashtbl.add_exn Types.cache_map ~key:id ~data:(`JSON json));
-  let options = Types.parse_engine_options json in
+  let options = [%of_yojson: Types.engine_options] json in
   Profiling.enabled := options.backend.profile;
   options
 
diff --git a/engine/default.nix b/engine/default.nix
index 1a676c743..adc4eb5f2 100644
--- a/engine/default.nix
+++ b/engine/default.nix
@@ -1,24 +1,16 @@
-{
-  ocamlPackages,
-  fetchzip,
-  hax-rust-frontend,
-  hax-engine-names-extract,
-  rustc,
-  nodejs,
-  jq,
-  closurecompiler,
-  gnused,
-  lib,
-  removeReferencesTo,
-}: let
+{ ocamlPackages, fetchzip, hax-rust-frontend, hax-engine-names-extract, rustc
+, nodejs, jq, closurecompiler, gnused, lib, removeReferencesTo, fetchFromGitHub
+}:
+let
   non_empty_list = ocamlPackages.buildDunePackage rec {
     pname = "non_empty_list";
     version = "0.1";
     src = fetchzip {
-      url = "https://github.com/johnyob/ocaml-non-empty-list/archive/refs/tags/${version}.zip";
+      url =
+        "https://github.com/johnyob/ocaml-non-empty-list/archive/refs/tags/${version}.zip";
       sha256 = "sha256-BJlEi0yG2DRT5vuU9ulucMD5MPFt9duWgcNO1YsigiA=";
     };
-    buildInputs = with ocamlPackages; [base ppxlib ppx_deriving];
+    buildInputs = with ocamlPackages; [ base ppxlib ppx_deriving ];
     duneVersion = "3";
     minimalOCamlVersion = "4.08";
     doCheck = false;
@@ -28,13 +20,12 @@
     version = "0.1";
 
     src = fetchzip {
-      url = "https://github.com/wrbs/ppx_matches/archive/refs/tags/${version}.zip";
+      url =
+        "https://github.com/wrbs/ppx_matches/archive/refs/tags/${version}.zip";
       sha256 = "sha256-nAmWF8MgW0odKkRiFcHGsvJyIxNHaZpnOlNPsef89Fo=";
     };
 
-    buildInputs = [
-      ocamlPackages.ppxlib
-    ];
+    buildInputs = [ ocamlPackages.ppxlib ];
     duneVersion = "3";
     minimalOCamlVersion = "4.04";
     doCheck = false;
@@ -43,7 +34,17 @@
     pname = "hax-engine";
     version = "0.0.1";
     duneVersion = "3";
-    src = lib.sourceFilesBySuffices ./. [".ml" ".mli" ".js" "dune" "dune-js" "dune-project" "sh" "rs" "mld"];
+    src = lib.sourceFilesBySuffices ./. [
+      ".ml"
+      ".mli"
+      ".js"
+      "dune"
+      "dune-js"
+      "dune-project"
+      "sh"
+      "rs"
+      "mld"
+    ];
     buildInputs = with ocamlPackages;
       [
         base
@@ -65,18 +66,17 @@
         stdio
         re
         js_of_ocaml
-        ocamlgraph
-      ]
-      ++
+        (ocamlgraph.overrideAttrs (_: {
+          src = fetchFromGitHub {
+            owner = "maximebuyse";
+            repo = "ocamlgraph";
+            rev = "fix-stable-topological-sort";
+            sha256 = "sha256-l7v7Kxjaz3xP6T91peAzloyusxpsIOYHXLIiiRHa490=";
+          };
+        }))
+      ] ++
       # F* dependencies
-      [
-        batteries
-        menhirLib
-        ppx_deriving
-        ppxlib
-        sedlex
-        stdint
-      ];
+      [ batteries menhirLib ppx_deriving ppxlib sedlex stdint ];
     nativeBuildInputs = [
       rustc
       hax-rust-frontend
@@ -92,23 +92,19 @@
       find "$bin" -type f -exec remove-references-to -t ${ocamlPackages.ocaml} '{}' +
     '';
 
-    outputs = ["out" "bin" "lib"];
+    outputs = [ "out" "bin" "lib" ];
     passthru = {
       docs = hax-engine.overrideAttrs (old: {
         name = "hax-engine-docs";
-        nativeBuildInputs =
-          old.nativeBuildInputs
-          ++ [
-            ocamlPackages.odoc
-          ];
-        buildPhase = ''dune build @doc'';
+        nativeBuildInputs = old.nativeBuildInputs ++ [ ocamlPackages.odoc ];
+        buildPhase = "dune build @doc";
         installPhase = "cp -rf _build/default/_doc/_html $out";
-        outputs = ["out"];
+        outputs = [ "out" ];
       });
       js = hax-engine.overrideAttrs (old: {
         name = "hax-engine.js";
-        nativeBuildInputs = old.nativeBuildInputs ++ [closurecompiler gnused];
-        outputs = ["out"];
+        nativeBuildInputs = old.nativeBuildInputs ++ [ closurecompiler gnused ];
+        outputs = [ "out" ];
         buildPhase = ''
           # Enable JS build
           sed -i "s/; (include dune-js)/(include dune-js)/g" bin/dune
@@ -125,5 +121,4 @@
       });
     };
   };
-in
-  hax-engine.overrideAttrs (_: {name = "hax-engine";})
+in hax-engine.overrideAttrs (_: { name = "hax-engine"; })
diff --git a/engine/dune-project b/engine/dune-project
index 5769b572c..a216f477f 100644
--- a/engine/dune-project
+++ b/engine/dune-project
@@ -2,7 +2,7 @@
 
 (name hax-engine)
 
-(version 0.1.0-rc.1)
+(version 0.1.0)
 
 (generate_opam_files true)
 
diff --git a/engine/hax-engine.opam b/engine/hax-engine.opam
index e317a03f5..af7aeae3e 100644
--- a/engine/hax-engine.opam
+++ b/engine/hax-engine.opam
@@ -1,6 +1,6 @@
 # This file is generated by dune, edit dune-project instead
 opam-version: "2.0"
-version: "0.1.0-rc.1"
+version: "0.1.0"
 synopsis: "The engine of hax, a Rust verification tool"
 description:
   "Hax is divided in two: a frontend (written in Rust) and an engine (written in OCaml). This is the engine."
@@ -59,4 +59,7 @@ build: [
 dev-repo: "git+https://github.com/hacspec/hax.git"
 depexts: [
   ["nodejs"] {}
+]
+pin-depends: [
+  ["ocamlgraph" "git+https://github.com/maximebuyse/ocamlgraph.git#fix-stable-topological-sort"]
 ]
\ No newline at end of file
diff --git a/engine/hax-engine.opam.template b/engine/hax-engine.opam.template
index 43794c9a8..593f86aaa 100644
--- a/engine/hax-engine.opam.template
+++ b/engine/hax-engine.opam.template
@@ -1,3 +1,6 @@
 depexts: [
   ["nodejs"] {}
+]
+pin-depends: [
+  ["ocamlgraph" "git+https://github.com/maximebuyse/ocamlgraph.git#fix-stable-topological-sort"]
 ]
\ No newline at end of file
diff --git a/engine/lib/ast.ml b/engine/lib/ast.ml
index 7b9564869..fbc798cb2 100644
--- a/engine/lib/ast.ml
+++ b/engine/lib/ast.ml
@@ -328,12 +328,13 @@ functor
               interleaved with Rust code *)
 
     and expr = { e : expr'; span : span; typ : ty }
+    and quote = { contents : quote_content list; witness : F.quote }
 
-    and quote = {
-      contents :
-        [ `Verbatim of string | `Expr of expr | `Pat of pat | `Typ of ty ] list;
-      witness : F.quote;
-    }
+    and quote_content =
+      | Verbatim of string
+      | Expr of expr
+      | Pattern of pat
+      | Typ of ty
 
     and supported_monads =
       | MException of ty
diff --git a/engine/lib/ast_builder.ml b/engine/lib/ast_builder.ml
index a092f9225..926fe262b 100644
--- a/engine/lib/ast_builder.ml
+++ b/engine/lib/ast_builder.ml
@@ -210,7 +210,8 @@ module Make (F : Features.T) = struct
   end
 
   module type S = module type of Make0 (struct
-    let span = failwith "dummy"
+    (* This [failwith] is OK: this module is never actually used for computation. It is useful only for typing. *)
+    let span = failwith "type only module: this will never be computed"
   end)
 
   module Make (Span : sig
diff --git a/engine/lib/ast_utils.ml b/engine/lib/ast_utils.ml
index 34c37f867..899221e21 100644
--- a/engine/lib/ast_utils.ml
+++ b/engine/lib/ast_utils.ml
@@ -230,6 +230,7 @@ module Make (F : Features.T) = struct
                 Hashtbl.find_or_add s name ~default:(fun () ->
                     "i" ^ Int.to_string (Hashtbl.length s))
               in
+              let goal = super#visit_trait_goal (enabled, s) goal in
               GCType { goal; name = new_name }
           | _ -> super#visit_generic_constraint (enabled, s) gc
 
@@ -367,6 +368,10 @@ module Make (F : Features.T) = struct
                           bounds_impls;
                         };
                   }
+            (* Match scrutinees need to be ascribed as well
+               (see https://github.com/hacspec/hax/issues/1207).*)
+            | Match { scrutinee; arms } ->
+                { e with e = Match { scrutinee = ascribe scrutinee; arms } }
             | _ ->
                 (* Ascribe the return type of a function application & constructors *)
                 if (ascribe_app && is_app e.e) || [%matches? Construct _] e.e
@@ -655,6 +660,13 @@ module Make (F : Features.T) = struct
               self#zero
           | _ -> super#visit_expr' () e
       end
+
+    let collect_attrs =
+      object (_self)
+        inherit [_] Visitors.reduce
+        inherit [_] expr_list_monoid
+        method! visit_attrs () attrs = attrs
+      end
   end
 
   (** Produces a local identifier which is locally fresh **with respect
@@ -952,8 +964,11 @@ module Make (F : Features.T) = struct
   module Debug : sig
     val expr : ?label:string -> AST.expr -> unit
     (** Prints an expression pretty-printed as Rust, with its full
-        AST encoded as JSON, available as a file, so that one can
-        `jless` or `jq` into it. *)
+    AST encoded as JSON, available as a file, so that one can
+    `jless` or `jq` into it. *)
+
+    val item' : ?label:string -> AST.item -> string
+    val item : ?label:string -> AST.item -> unit
   end = struct
     let expr ?(label = "") (e : AST.expr) : unit =
       let path = tempfile_path ~suffix:".json" in
@@ -964,6 +979,18 @@ module Make (F : Features.T) = struct
       ^ "\n```\x1b[34m JSON-encoded AST available at \x1b[1m" ^ path
       ^ "\x1b[0m (hint: use `jless " ^ path ^ "`)"
       |> Stdio.prerr_endline
+
+    let item' ?(label = "") (e : AST.item) : string =
+      let path = tempfile_path ~suffix:".json" in
+      Core.Out_channel.write_all path
+        ~data:([%yojson_of: AST.item] e |> Yojson.Safe.pretty_to_string);
+      let e = LiftToFullAst.item e in
+      "```rust " ^ label ^ "\n" ^ Print_rust.pitem_str e
+      ^ "\n```\x1b[34m JSON-encoded AST available at \x1b[1m" ^ path
+      ^ "\x1b[0m (hint: use `jless " ^ path ^ "`)"
+
+    let item ?(label = "") (e : AST.item) =
+      item' ~label e |> Stdio.prerr_endline
   end
 
   let unbox_expr' (next : expr -> expr) (e : expr) : expr =
diff --git a/engine/lib/attr_payloads.ml b/engine/lib/attr_payloads.ml
index 5b8312274..c3c330c64 100644
--- a/engine/lib/attr_payloads.ml
+++ b/engine/lib/attr_payloads.ml
@@ -6,7 +6,18 @@ let payloads : attrs -> (Types.ha_payload * span) list =
   let parse =
     (* we have to parse ["JSON"]: first a string, then a ha_payload *)
     function
-    | `String s -> Yojson.Safe.from_string s |> Types.parse_ha_payload
+    | `String s -> (
+        match Yojson.Safe.from_string s |> Types.safe_ha_payload_of_yojson with
+        | Error _ ->
+            Stdlib.prerr_endline
+              [%string
+                {|
+The hax engine could not parse a hax attribute.
+This means that the crate being extracted and the version of hax engine are incompatible.
+Please make sure the `hax-lib` dependency of the extracted crate matches hax-engine's version (%{Types.hax_version}).
+|}];
+            Stdlib.exit 1
+        | Ok value -> value)
     | x ->
         Stdlib.failwith
         @@ "Attr_payloads: payloads: expected a string while parsing JSON, got "
@@ -23,7 +34,7 @@ let payloads : attrs -> (Types.ha_payload * span) list =
 (** Create a attribute out of a [payload] *)
 let to_attr (payload : Types.ha_payload) (span : span) : attr =
   let json =
-    `String (Yojson.Safe.to_string (Types.to_json_ha_payload payload))
+    `String (Yojson.Safe.to_string ([%yojson_of: Types.ha_payload] payload))
   in
   let kind : attr_kind =
     Tool { path = "_hax::json"; tokens = Yojson.Safe.to_string json }
diff --git a/engine/lib/concrete_ident/concrete_ident.ml b/engine/lib/concrete_ident/concrete_ident.ml
index b0d0cc160..75505210d 100644
--- a/engine/lib/concrete_ident/concrete_ident.ml
+++ b/engine/lib/concrete_ident/concrete_ident.ml
@@ -596,17 +596,16 @@ module Create = struct
     let len x = List.length x.def_id.path in
     let compare x y = len x - len y in
     let id = List.min_elt ~compare from |> Option.value_exn in
-    let parent = parent id in
     {
       kind = Kind.Value;
       def_id =
         {
-          parent.def_id with
+          id.def_id with
           path =
-            parent.def_id.path
+            id.def_id.path
             @ [
                 {
-                  data = TypeNs "rec_bundle";
+                  data = TypeNs "cyclic_bundle";
                   disambiguator = [%hash: t list] from;
                 };
               ];
@@ -635,6 +634,17 @@ module Create = struct
   let constructor name =
     let path = name.def_id.path @ [ { data = Ctor; disambiguator = 0 } ] in
     { name with def_id = { name.def_id with path } }
+
+  let add_disambiguator name disambiguator =
+    let path = name.def_id.path in
+    if List.is_empty path then name
+    else
+      (* The following two `exn` function calls cannot fail as the path is not empty. *)
+      let last = List.last_exn path in
+      let path =
+        List.drop_last_exn path @ [ { data = last.data; disambiguator } ]
+      in
+      { name with def_id = { name.def_id with path } }
 end
 
 let lookup_raw_impl_info (impl : t) : Types.impl_infos option =
diff --git a/engine/lib/concrete_ident/concrete_ident.mli b/engine/lib/concrete_ident/concrete_ident.mli
index e87f71b22..545a23da3 100644
--- a/engine/lib/concrete_ident/concrete_ident.mli
+++ b/engine/lib/concrete_ident/concrete_ident.mli
@@ -27,6 +27,7 @@ val eq_name : name -> t -> bool
 val to_debug_string : t -> string
 
 module Create : sig
+  val parent : t -> t
   val fresh_module : from:t list -> t
   val move_under : new_parent:t -> t -> t
 
@@ -37,6 +38,10 @@ module Create : sig
   val map_last : f:(string -> string) -> t -> t
   (** [map_last f ident] applies [f] on the last chunk of [ident]'s
       path if it holds a string *)
+
+  val add_disambiguator : t -> int -> t
+  (** [add_disambiguator ident d] changes the disambiguator on
+      the last chunk of [ident]'s path to [d] *)
 end
 
 type view = { crate : string; path : string list; definition : string }
diff --git a/engine/lib/dependencies.ml b/engine/lib/dependencies.ml
index e46fcb555..19e5ff1ad 100644
--- a/engine/lib/dependencies.ml
+++ b/engine/lib/dependencies.ml
@@ -88,8 +88,9 @@ module Make (F : Features.T) = struct
         =
       List.concat_map
         ~f:(fun i ->
+          let attrs = U.Reducers.collect_attrs#visit_item () i in
           let assoc =
-            uid_associated_items i.attrs |> List.map ~f:(fun i -> i.ident)
+            uid_associated_items attrs |> List.map ~f:(fun i -> i.ident)
           in
           vertices_of_item i @ assoc |> List.map ~f:(Fn.const i.ident &&& Fn.id))
         items
@@ -413,8 +414,12 @@ module Make (F : Features.T) = struct
     in
 
     let transform (bundle : item list) =
+      let module_names =
+        List.map ~f:(ident_of >> Concrete_ident.Create.parent) bundle
+        |> List.dedup_and_sort ~compare:Concrete_ident.compare
+      in
       let ns : Concrete_ident.t =
-        Concrete_ident.Create.fresh_module ~from:(List.map ~f:ident_of bundle)
+        Concrete_ident.Create.fresh_module ~from:module_names
       in
       let new_name_under_ns : Concrete_ident.t -> Concrete_ident.t =
         Concrete_ident.Create.move_under ~new_parent:ns
@@ -431,10 +436,7 @@ module Make (F : Features.T) = struct
             (List.mem duplicates (new_name_under_ns id)
                ~equal:Concrete_ident.equal)
         then id
-        else
-          Concrete_ident.Create.map_last
-            ~f:(fun name -> name ^ (Concrete_ident.hash id |> Int.to_string))
-            id
+        else Concrete_ident.Create.add_disambiguator id (Concrete_ident.hash id)
       in
       let renamings =
         List.map
@@ -465,9 +467,19 @@ module Make (F : Features.T) = struct
                ])
       in
       let renamings =
-        Map.of_alist_exn
-          (module Concrete_ident)
-          (renamings @ variant_and_constructors_renamings)
+        match
+          Map.of_alist
+            (module Concrete_ident)
+            (renamings @ variant_and_constructors_renamings)
+        with
+        | `Duplicate_key dup ->
+            failwith
+              [%string
+                "Fatal error: in dependency analysis, we construct a renaming \
+                 key-value list with a guarantee of unicity in keys. However, \
+                 we found the following key twice:\n\
+                 %{[%show: concrete_ident] dup}"]
+        | `Ok value -> value
       in
       let rename =
         let renamer _lvl i = Map.find renamings i |> Option.value ~default:i in
@@ -493,7 +505,15 @@ module Make (F : Features.T) = struct
       include Comparable.Make (T)
     end in
     let bundle_of_item =
-      Hashtbl.of_alist_exn (module ComparableItem) bundle_transforms
+      match Hashtbl.of_alist (module ComparableItem) bundle_transforms with
+      | `Duplicate_key dup ->
+          failwith
+            [%string
+              "Fatal error: in dependency analysis, [bundles_transforms] is \
+               expected to be a key-value list with a guarantee of unicity in \
+               keys. However, we found the following key (an item) twice:\n\
+               %{U.Debug.item' dup}"]
+      | `Ok value -> value
     in
     let maybe_transform_item item =
       match Hashtbl.find bundle_of_item item with
diff --git a/engine/lib/deprecated_generic_printer/deprecated_generic_printer.ml b/engine/lib/deprecated_generic_printer/deprecated_generic_printer.ml
index 3b1c190aa..37fe9bc4c 100644
--- a/engine/lib/deprecated_generic_printer/deprecated_generic_printer.ml
+++ b/engine/lib/deprecated_generic_printer/deprecated_generic_printer.ml
@@ -234,10 +234,10 @@ module Make (F : Features.T) (View : Concrete_ident.VIEW_API) = struct
         method quote { contents; _ } =
           List.map
             ~f:(function
-              | `Verbatim code -> string code
-              | `Expr e -> print#expr_at Expr_Quote e
-              | `Pat p -> print#pat_at Expr_Quote p
-              | `Typ p -> print#ty_at Expr_Quote p)
+              | Verbatim code -> string code
+              | Expr e -> print#expr_at Expr_Quote e
+              | Pattern p -> print#pat_at Expr_Quote p
+              | Typ p -> print#ty_at Expr_Quote p)
             contents
           |> concat
 
diff --git a/engine/lib/generic_printer/generic_printer.ml b/engine/lib/generic_printer/generic_printer.ml
index 811051c0e..81a5c793f 100644
--- a/engine/lib/generic_printer/generic_printer.ml
+++ b/engine/lib/generic_printer/generic_printer.ml
@@ -231,15 +231,13 @@ module Make (F : Features.T) = struct
       [local] is true, otherwise it prints the full path, separated by
       `module_path_separator`. *)
 
-      method quote (quote : quote) : document =
-        List.map
-          ~f:(function
-            | `Verbatim code -> string code
-            | `Expr e -> self#print_expr AstPosition_Quote e
-            | `Pat p -> self#print_pat AstPosition_Quote p
-            | `Typ p -> self#print_ty AstPosition_Quote p)
-          quote.contents
-        |> concat
+      method quote ~contents ~witness:_ : document =
+        List.map ~f:(fun doc -> doc#p) contents |> concat
+
+      method quote_content_Verbatim v = string v
+      method quote_content_Expr e = e#p
+      method quote_content_Pattern p = p#p
+      method quote_content_Typ t = t#p
 
       (** {2:specialize-expr Specialized printers for [expr]} *)
 
@@ -629,10 +627,6 @@ module Make (F : Features.T) = struct
                   ^ "]"))
           ast_position id
 
-      method _do_not_override_lazy_of_quote ast_position (value : quote)
-          : quote lazy_doc =
-        lazy_doc (fun (value : quote) -> self#quote value) ast_position value
-
       method! _do_not_override_lazy_of_item ast_position (value : item)
           : item lazy_doc =
         let module View = (val concrete_ident_view) in
diff --git a/engine/lib/generic_printer/generic_printer_template.ml b/engine/lib/generic_printer/generic_printer_template.ml
index 1bcd61085..60c76d2a4 100644
--- a/engine/lib/generic_printer/generic_printer_template.ml
+++ b/engine/lib/generic_printer/generic_printer_template.ml
@@ -35,6 +35,11 @@ struct
       method borrow_kind_Mut _x1 = default_document_for "borrow_kind_Mut"
       method borrow_kind_Shared = default_document_for "borrow_kind_Shared"
       method borrow_kind_Unique = default_document_for "borrow_kind_Unique"
+      method cf_kind_BreakOnly = default_document_for "cf_kind_BreakOnly"
+
+      method cf_kind_BreakOrReturn =
+        default_document_for "cf_kind_BreakOrReturn"
+
       method common_array _x1 = default_document_for "common_array"
 
       method dyn_trait_goal ~trait:_ ~non_self_args:_ =
@@ -124,10 +129,6 @@ struct
       method expr'_Return ~super:_ ~e:_ ~witness:_ =
         default_document_for "expr'_Return"
 
-      method cf_kind_BreakOrReturn =
-        default_document_for "cf_kind_BreakOrReturn"
-
-      method cf_kind_BreakOnly = default_document_for "cf_kind_BreakOnly"
       method field_pat ~field:_ ~pat:_ = default_document_for "field_pat"
 
       method generic_constraint_GCLifetime _x1 _x2 =
diff --git a/engine/lib/hax_io.ml b/engine/lib/hax_io.ml
index 0038375be..d0e836e32 100644
--- a/engine/lib/hax_io.ml
+++ b/engine/lib/hax_io.ml
@@ -36,10 +36,10 @@ include (
     end)
 
 let read () : Types.to_engine =
-  read_json () |> Option.value_exn |> Types.parse_to_engine
+  read_json () |> Option.value_exn |> [%of_yojson: Types.to_engine]
 
 let write (msg : Types.from_engine) : unit =
-  Types.to_json_from_engine msg |> write_json
+  [%yojson_of: Types.from_engine] msg |> write_json
 
 let close () : unit =
   write Exit;
diff --git a/engine/lib/import_thir.ml b/engine/lib/import_thir.ml
index 3df61d156..2a47901ac 100644
--- a/engine/lib/import_thir.ml
+++ b/engine/lib/import_thir.ml
@@ -24,7 +24,7 @@ let unimplemented ~issue_id (span : Thir.span list) (details : string) =
   let kind =
     T.Unimplemented
       {
-        issue_id = Some (MyInt64.of_int_exn issue_id);
+        issue_id = Some (MyInt64.of_int issue_id);
         details = String.(if details = "" then None else Some details);
       }
   in
@@ -676,7 +676,12 @@ end) : EXPR = struct
           LocalVar
             {
               name = id.name;
-              id = Local_ident.mk_id Cnst (MyInt64.to_int_exn id.index);
+              id =
+                Local_ident.mk_id Cnst
+                  (MyInt64.to_int id.index
+                  |> Option.value_or_thunk ~default:(fun _ ->
+                         assertion_failure [ e.span ]
+                           "Expected const id to fit in an OCaml native int"));
             }
       | Repeat { value; count } ->
           let value = c_expr value in
@@ -725,14 +730,18 @@ end) : EXPR = struct
                        typ = TInt { size = S8; signedness = Unsigned };
                      })
                    l))
-      | NamedConst { def_id = id; impl; _ } -> (
+      | NamedConst { def_id = id; impl; args; _ } -> (
           let kind : Concrete_ident.Kind.t =
             match impl with Some _ -> AssociatedItem Value | _ -> Value
           in
           let f = GlobalVar (def_id kind id) in
           match impl with
           | Some impl ->
-              let trait = Some (c_impl_expr e.span impl, []) in
+              let trait =
+                Some
+                  ( c_impl_expr e.span impl,
+                    List.map ~f:(c_generic_value e.span) args )
+              in
               let f = { e = f; span; typ = TArrow ([], typ) } in
               App { f; trait; args = []; generic_args = []; bounds_impls = [] }
           | _ -> f)
@@ -999,8 +1008,8 @@ end) : EXPR = struct
     | Float k ->
         TFloat
           (match k with F16 -> F16 | F32 -> F32 | F64 -> F64 | F128 -> F128)
-    | Arrow value ->
-        let ({ inputs; output; _ } : Thir.ty_fn_sig) = value.value in
+    | Arrow signature | Closure (_, { untupled_sig = signature; _ }) ->
+        let ({ inputs; output; _ } : Thir.ty_fn_sig) = signature.value in
         let inputs =
           if List.is_empty inputs then [ U.unit_typ ]
           else List.map ~f:(c_ty span) inputs
@@ -1038,7 +1047,16 @@ end) : EXPR = struct
         assertion_failure [ span ] "Ty::Alias with AliasTyKind::Weak"
     | Param { index; name } ->
         (* TODO: [id] might not unique *)
-        TParam { name; id = Local_ident.mk_id Typ (MyInt64.to_int_exn index) }
+        TParam
+          {
+            name;
+            id =
+              Local_ident.mk_id Typ
+                (MyInt64.to_int index
+                |> Option.value_or_thunk ~default:(fun _ ->
+                       assertion_failure [ span ]
+                         "Expected param id to fit in an OCaml native int"));
+          }
     | Error ->
         assertion_failure [ span ]
           "got type `Error`: Rust compilation probably failed."
@@ -1081,11 +1099,12 @@ end) : EXPR = struct
   and c_impl_expr (span : Thir.span) (ie : Thir.impl_expr) : impl_expr =
     let goal = c_trait_ref span ie.trait.value in
     let impl = { kind = c_impl_expr_atom span ie.impl; goal } in
-    match ie.args with
-    | [] -> impl
-    | args ->
-        let args = List.map ~f:(c_impl_expr span) args in
+    match ie.impl with
+    | Concrete { impl_exprs = []; _ } -> impl
+    | Concrete { impl_exprs; _ } ->
+        let args = List.map ~f:(c_impl_expr span) impl_exprs in
         { kind = ImplApp { impl; args }; goal }
+    | _ -> impl
 
   and c_trait_ref span (tr : Thir.trait_ref) : trait_goal =
     let trait = Concrete_ident.of_def_id Trait tr.def_id in
@@ -1119,7 +1138,7 @@ end) : EXPR = struct
           Parent { impl = { kind = item_kind; goal = trait_ref }; ident }
     in
     match ie with
-    | Concrete { id; generics } ->
+    | Concrete { id; generics; _ } ->
         let trait = Concrete_ident.of_def_id Impl id in
         let args = List.map ~f:(c_generic_value span) generics in
         Concrete { trait; args }
@@ -1128,7 +1147,7 @@ end) : EXPR = struct
         List.fold ~init ~f:browse_path path
     | Dyn -> Dyn
     | SelfImpl { path; _ } -> List.fold ~init:Self ~f:browse_path path
-    | Builtin { trait } -> Builtin (c_trait_ref span trait.value)
+    | Builtin { trait; _ } -> Builtin (c_trait_ref span trait.value)
     | Error str -> failwith @@ "impl_expr_atom: Error " ^ str
 
   and c_generic_value (span : Thir.span) (ty : Thir.generic_arg) : generic_value
@@ -1172,7 +1191,11 @@ end) : EXPR = struct
     {
       typ_span = Option.map ~f:Span.of_thir param.ty_span;
       typ = c_ty (Option.value ~default:span param.ty_span) param.ty;
-      pat = c_pat (Option.value_exn param.pat);
+      pat =
+        c_pat
+          (Option.value_or_thunk param.pat ~default:(fun _ ->
+               assertion_failure [ span ]
+                 "c_param: expected param.pat to be non-empty"));
       attrs = c_attrs param.attributes;
     }
 
@@ -1492,14 +1515,17 @@ and c_item_unwrapped ~ident ~type_only (item : Thir.item) : item list =
        |> not
   in
   let c_body = if drop_body then c_expr_drop_body else c_expr in
+  let assert_item_def_id () =
+    Option.value_or_thunk item.def_id ~default:(fun _ ->
+        assertion_failure [ item.span ] "Expected this item to have a `def_id`")
+  in
   (* TODO: things might be unnamed (e.g. constants) *)
   match (item.kind : Thir.item_kind) with
   | Const (_, generics, body) ->
       mk
       @@ Fn
            {
-             name =
-               Concrete_ident.of_def_id Value (Option.value_exn item.def_id);
+             name = Concrete_ident.of_def_id Value (assert_item_def_id ());
              generics = c_generics generics;
              body = c_body body;
              params = [];
@@ -1509,7 +1535,7 @@ and c_item_unwrapped ~ident ~type_only (item : Thir.item) : item list =
       mk
       @@ TyAlias
            {
-             name = Concrete_ident.of_def_id Type (Option.value_exn item.def_id);
+             name = Concrete_ident.of_def_id Type (assert_item_def_id ());
              generics = c_generics generics;
              ty = c_ty item.span ty;
            }
@@ -1517,8 +1543,7 @@ and c_item_unwrapped ~ident ~type_only (item : Thir.item) : item list =
       mk
       @@ Fn
            {
-             name =
-               Concrete_ident.of_def_id Value (Option.value_exn item.def_id);
+             name = Concrete_ident.of_def_id Value (assert_item_def_id ());
              generics = c_generics generics;
              body = c_body body;
              params = c_fn_params item.span params;
@@ -1527,11 +1552,11 @@ and c_item_unwrapped ~ident ~type_only (item : Thir.item) : item list =
   | (Enum (_, generics, _) | Struct (_, generics)) when erased ->
       let generics = c_generics generics in
       let is_struct = match item.kind with Struct _ -> true | _ -> false in
-      let def_id = Option.value_exn item.def_id in
+      let def_id = assert_item_def_id () in
       let name = Concrete_ident.of_def_id Type def_id in
       mk @@ Type { name; generics; variants = []; is_struct }
   | Enum (variants, generics, repr) ->
-      let def_id = Option.value_exn item.def_id in
+      let def_id = assert_item_def_id () in
       let generics = c_generics generics in
       let is_struct = false in
       let kind = Concrete_ident.Kind.Constructor { is_struct } in
@@ -1591,7 +1616,7 @@ and c_item_unwrapped ~ident ~type_only (item : Thir.item) : item list =
       if is_primitive then cast_fun :: result else result
   | Struct (v, generics) ->
       let generics = c_generics generics in
-      let def_id = Option.value_exn item.def_id in
+      let def_id = assert_item_def_id () in
       let is_struct = true in
       (* repeating the attributes of the item in the variant: TODO is that ok? *)
       let v =
@@ -1632,9 +1657,7 @@ and c_item_unwrapped ~ident ~type_only (item : Thir.item) : item list =
           ~f:(fun { attributes; _ } -> not (should_skip attributes))
           items
       in
-      let name =
-        Concrete_ident.of_def_id Trait (Option.value_exn item.def_id)
-      in
+      let name = Concrete_ident.of_def_id Trait (assert_item_def_id ()) in
       let { params; constraints } = c_generics generics in
       let self =
         let id = Local_ident.mk_id Typ 0 (* todo *) in
diff --git a/engine/lib/phases/phase_and_mut_defsite.ml b/engine/lib/phases/phase_and_mut_defsite.ml
index d640ef92e..e7163dac2 100644
--- a/engine/lib/phases/phase_and_mut_defsite.ml
+++ b/engine/lib/phases/phase_and_mut_defsite.ml
@@ -95,12 +95,14 @@ struct
       (* visit an expression and replace all `Return e` nodes by `Return (f e)` *)
       let map_returns ~(f : expr -> expr) : expr -> expr =
         let visitor =
-          object
+          object (self)
             inherit [_] Visitors.map as super
 
             method! visit_expr' () e =
               match e with
-              | Return { e; witness } -> Return { e = f e; witness }
+              | Return { e; witness } ->
+                  let e = self#visit_expr () e in
+                  Return { e = f e; witness }
               | _ -> super#visit_expr' () e
           end
         in
@@ -116,9 +118,16 @@ struct
           match e.e with
           | GlobalVar (`TupleCons 0) -> e
           | _ ->
-              let lhs = UB.make_var_pat var e.typ e.span in
               let rhs = e in
-              let body = { e with e = LocalVar var } in
+              let lhs, body =
+                if [%eq: ty] e.typ UB.unit_typ then
+                  (* This case has been added to fix https://github.com/hacspec/hax/issues/720.
+                     It might need a better solution. *)
+                  ( UB.M.pat_PWild ~span:e.span ~typ:e.typ,
+                    UB.M.expr_unit ~span:e.span )
+                else
+                  (UB.make_var_pat var e.typ e.span, { e with e = LocalVar var })
+              in
               { body with e = Let { monadic = None; lhs; rhs; body } }
         in
         UB.map_body_of_nested_lets f e
diff --git a/engine/lib/phases/phase_cf_into_monads.ml b/engine/lib/phases/phase_cf_into_monads.ml
index 373bc06ef..d5565c4fb 100644
--- a/engine/lib/phases/phase_cf_into_monads.ml
+++ b/engine/lib/phases/phase_cf_into_monads.ml
@@ -171,18 +171,19 @@ struct
               arms
           in
           let arms =
-            if List.is_empty arms then []
-            else
-              let m =
-                List.map ~f:(fun ({ monad; _ }, _) -> monad) arms
-                |> List.reduce_exn ~f:(KnownMonads.lub span)
-              in
-              List.map
-                ~f:(fun (mself, (arm_pat, span, body, guard)) ->
-                  let body = KnownMonads.lift "Match" body mself.monad m in
-                  let arm_pat = { arm_pat with typ = body.typ } in
-                  ({ arm = { arm_pat; body; guard }; span } : B.arm))
-                arms
+            let m =
+              List.map ~f:(fun ({ monad; _ }, _) -> monad) arms
+              |> List.reduce ~f:(KnownMonads.lub span)
+            in
+            match m with
+            | None -> [] (* [arms] is empty *)
+            | Some m ->
+                List.map
+                  ~f:(fun (mself, (arm_pat, span, body, guard)) ->
+                    let body = KnownMonads.lift "Match" body mself.monad m in
+                    let arm_pat = { arm_pat with typ = body.typ } in
+                    ({ arm = { arm_pat; body; guard }; span } : B.arm))
+                  arms
           in
           let typ =
             match arms with [] -> UB.never_typ | hd :: _ -> hd.arm.body.typ
diff --git a/engine/lib/phases/phase_hoist_disjunctive_patterns.ml b/engine/lib/phases/phase_hoist_disjunctive_patterns.ml
index 70e92d163..cc637e2c8 100644
--- a/engine/lib/phases/phase_hoist_disjunctive_patterns.ml
+++ b/engine/lib/phases/phase_hoist_disjunctive_patterns.ml
@@ -72,6 +72,7 @@ module Make (F : Features.T) =
                   List.map (treat_args [ [] ] fields_as_pat)
                     ~f:(fun fields_as_pat ->
                       let fields =
+                        (* exn justification: `rev_map fields` and `fields` have the same length *)
                         List.map2_exn fields_as_pat fields
                           ~f:(fun pat { field; _ } -> { field; pat })
                       in
diff --git a/engine/lib/phases/phase_local_mutation.ml b/engine/lib/phases/phase_local_mutation.ml
index 53b83fd71..25d067e85 100644
--- a/engine/lib/phases/phase_local_mutation.ml
+++ b/engine/lib/phases/phase_local_mutation.ml
@@ -267,6 +267,7 @@ struct
           }
       | Loop { body; kind; state; label; witness; _ } ->
           let variables_to_output = s.expr_level in
+          let drop_expr = s.drop_expr in
           (* [adapt]: should we reorder shadowings? *)
           let observable_mutations, adapt =
             let set =
@@ -338,27 +339,32 @@ struct
               span;
             }
           in
-          if adapt && not (List.is_empty variables_to_output) then
-            (* here, we need to introduce the shadowings as bindings *)
-            let out =
-              UB.make_tuple_expr ~span
-              @@ List.map
-                   ~f:(fun (ident, typ) -> B.{ e = LocalVar ident; typ; span })
-                   variables_to_output
-            in
-            let lhs =
-              UB.make_tuple_pat
-              @@ List.map
-                   ~f:(fun (ident, typ) -> UB.make_var_pat ident typ span)
-                   observable_mutations
-            in
-            B.
-              {
-                e = Let { monadic = None; lhs; rhs = loop; body = out };
-                span;
-                typ = out.typ;
-              }
-          else loop
+          let vars =
+            if adapt && not (List.is_empty variables_to_output) then
+              (* here, we need to introduce the shadowings as bindings *)
+              let out =
+                UB.make_tuple_expr ~span
+                @@ List.map
+                     ~f:(fun (ident, typ) ->
+                       B.{ e = LocalVar ident; typ; span })
+                     variables_to_output
+              in
+              let lhs =
+                UB.make_tuple_pat
+                @@ List.map
+                     ~f:(fun (ident, typ) -> UB.make_var_pat ident typ span)
+                     observable_mutations
+              in
+              B.
+                {
+                  e = Let { monadic = None; lhs; rhs = loop; body = out };
+                  span;
+                  typ = out.typ;
+                }
+            else loop
+          in
+          if drop_expr then vars
+          else UB.make_tuple_expr ~span [ vars; UB.unit_expr span ]
       | [%inline_arms
           "dexpr'.*" - Let - Assign - Closure - Loop - If - Match - Break
           - Return] ->
diff --git a/engine/lib/phases/phase_transform_hax_lib_inline.ml b/engine/lib/phases/phase_transform_hax_lib_inline.ml
index 6d739ebaa..0a5c44fc7 100644
--- a/engine/lib/phases/phase_transform_hax_lib_inline.ml
+++ b/engine/lib/phases/phase_transform_hax_lib_inline.ml
@@ -2,7 +2,6 @@ open! Prelude
 open! Ast
 
 module%inlined_contents Make (F : Features.T) = struct
-  open Ast
   module FA = F
 
   module FB = struct
@@ -96,7 +95,7 @@ module%inlined_contents Make (F : Features.T) = struct
                 Error.assertion_failure span
                   "Malformed call to 'inline': cannot find string payload."
           in
-          let code =
+          let code : B.quote_content list =
             List.map bindings ~f:(fun (pat, e) ->
                 match
                   UB.Expect.pbinding_simple pat
@@ -106,12 +105,22 @@ module%inlined_contents Make (F : Features.T) = struct
                     let id =
                       extract_pattern e
                       |> Option.bind ~f:first_global_ident
-                      |> Option.value_exn
+                      |> Option.value_or_thunk ~default:(fun _ ->
+                             Error.assertion_failure span
+                               "Could not extract pattern (case constructor): \
+                                this may be a bug in the quote macros in \
+                                hax-lib.")
                     in
-                    `Expr { e with e = GlobalVar id }
+                    B.Expr { e with e = GlobalVar id }
                 | Some "_pat" ->
-                    let pat = extract_pattern e |> Option.value_exn in
-                    `Pat pat
+                    let pat =
+                      extract_pattern e
+                      |> Option.value_or_thunk ~default:(fun _ ->
+                             Error.assertion_failure span
+                               "Could not extract pattern (case pat): this may \
+                                be a bug in the quote macros in hax-lib.")
+                    in
+                    Pattern pat
                 | Some "_ty" ->
                     let typ =
                       match pat.typ with
@@ -124,33 +133,22 @@ module%inlined_contents Make (F : Features.T) = struct
                             "Malformed call to 'inline': expected type \
                              `Option<_>`."
                     in
-                    `Typ typ
-                | _ -> `Expr e)
+                    Typ typ
+                | _ -> Expr e)
           in
           let verbatim = split_str ~on:"SPLIT_QUOTE" str in
           let contents =
-            let rec f verbatim
-                (code :
-                  [ `Verbatim of string
-                  | `Expr of B.expr
-                  | `Pat of B.pat
-                  | `Typ of B.ty ]
-                  list) =
+            let rec f verbatim (code : B.quote_content list) =
               match (verbatim, code) with
-              | s :: s', code :: code' -> `Verbatim s :: code :: f s' code'
-              | [ s ], [] -> [ `Verbatim s ]
+              | s :: s', code :: code' -> B.Verbatim s :: code :: f s' code'
+              | [ s ], [] -> [ Verbatim s ]
               | [], [] -> []
               | _ ->
                   Error.assertion_failure span
                   @@ "Malformed call to 'inline'." ^ "\nverbatim="
                   ^ [%show: string list] verbatim
                   ^ "\ncode="
-                  ^ [%show:
-                      [ `Verbatim of string
-                      | `Expr of B.expr
-                      | `Pat of B.pat
-                      | `Typ of B.ty ]
-                      list] code
+                  ^ [%show: B.quote_content list] code
             in
             f verbatim code
           in
diff --git a/engine/lib/print_rust.ml b/engine/lib/print_rust.ml
index c0b52d5fc..a0ad06b81 100644
--- a/engine/lib/print_rust.ml
+++ b/engine/lib/print_rust.ml
@@ -235,10 +235,10 @@ module Raw = struct
     !"quote!("
     & List.map
         ~f:(function
-          | `Verbatim code -> !code
-          | `Expr e -> pexpr e
-          | `Pat p -> ppat p
-          | `Typ t -> pty span t)
+          | Verbatim code -> !code
+          | Expr e -> pexpr e
+          | Pattern p -> ppat p
+          | Typ t -> pty span t)
         quote.contents
       |> concat ~sep:!""
     & !")"
diff --git a/engine/lib/side_effect_utils.ml b/engine/lib/side_effect_utils.ml
index 801a3b268..8d3a6b2a6 100644
--- a/engine/lib/side_effect_utils.ml
+++ b/engine/lib/side_effect_utils.ml
@@ -42,9 +42,9 @@ struct
                {
                  details =
                    "Expected two exact same types, got x="
-                   ^ [%show: ty] x
+                   ^ (x |> U.LiftToFullAst.ty |> Print_rust.pty_str)
                    ^ " and y="
-                   ^ [%show: ty] y;
+                   ^ (y |> U.LiftToFullAst.ty |> Print_rust.pty_str);
                })
         else x
       in
diff --git a/engine/lib/subtype.ml b/engine/lib/subtype.ml
index 1f9528d49..2fbcde067 100644
--- a/engine/lib/subtype.ml
+++ b/engine/lib/subtype.ml
@@ -305,10 +305,10 @@ struct
 
   and dquote (span : span) ({ contents; witness } : A.quote) : B.quote =
     let f = function
-      | `Verbatim code -> `Verbatim code
-      | `Expr e -> `Expr (dexpr e)
-      | `Pat p -> `Pat (dpat p)
-      | `Typ p -> `Typ (dty span p)
+      | A.Verbatim code -> B.Verbatim code
+      | Expr e -> Expr (dexpr e)
+      | Pattern p -> Pattern (dpat p)
+      | Typ p -> Typ (dty span p)
     in
     { contents = List.map ~f contents; witness = S.quote span witness }
 
diff --git a/engine/names/extract/build.rs b/engine/names/extract/build.rs
index d5e8f563f..1ffdc56b6 100644
--- a/engine/names/extract/build.rs
+++ b/engine/names/extract/build.rs
@@ -140,7 +140,7 @@ fn reader_to_str(s: String) -> String {
     result += "\n";
     result += "module Values = struct\n";
     for (json, name) in &def_ids {
-        result += &format!("{TAB}let parsed_{name} = Types.parse_def_id (Yojson.Safe.from_string {}{ESCAPE_KEY}|{}|{ESCAPE_KEY}{})\n", "{", json, "}");
+        result += &format!("{TAB}let parsed_{name} = Types.def_id_of_yojson (Yojson.Safe.from_string {}{ESCAPE_KEY}|{}|{ESCAPE_KEY}{})\n", "{", json, "}");
     }
     result += "end\n\n";
 
@@ -155,7 +155,7 @@ fn reader_to_str(s: String) -> String {
 
     result += &format!("let impl_infos_json_list = match Yojson.Safe.from_string {}{ESCAPE_KEY}|{}|{ESCAPE_KEY}{} with | `List l -> l | _ -> failwith \"Expected a list of `def_id * impl_infos`\"\n\n", "{", serde_json::to_string(&impl_infos).unwrap(), "}");
     result +=
-        &format!("let impl_infos = Base.List.map ~f:(function | `List [did; ii] -> (Types.parse_def_id did, Types.parse_impl_infos ii) | _ -> failwith \"Expected tuple\") impl_infos_json_list");
+        &format!("let impl_infos = Base.List.map ~f:(function | `List [did; ii] -> (Types.def_id_of_yojson did, Types.impl_infos_of_yojson ii) | _ -> failwith \"Expected tuple\") impl_infos_json_list");
 
     result
 }
diff --git a/engine/utils/generate_from_ast/codegen_printer.ml b/engine/utils/generate_from_ast/codegen_printer.ml
index cc34663f1..93bbceda1 100644
--- a/engine/utils/generate_from_ast/codegen_printer.ml
+++ b/engine/utils/generate_from_ast/codegen_printer.ml
@@ -327,9 +327,7 @@ let mk datatypes =
   in
   let state =
     let names_with_doc = List.map ~f:(fun dt -> dt.name) datatypes in
-    let names_with_doc =
-      "quote" :: "concrete_ident" :: "local_ident" :: names_with_doc
-    in
+    let names_with_doc = "concrete_ident" :: "local_ident" :: names_with_doc in
     { names_with_doc }
   in
   let positions = ref [ "AstPos_Entrypoint"; "AstPos_NotApplicable" ] in
diff --git a/engine/utils/generate_from_ast/codegen_visitor.ml b/engine/utils/generate_from_ast/codegen_visitor.ml
index e9e65ad24..45034152e 100644
--- a/engine/utils/generate_from_ast/codegen_visitor.ml
+++ b/engine/utils/generate_from_ast/codegen_visitor.ml
@@ -230,7 +230,6 @@ let is_allowed_opaque name =
       "span";
       "string";
       "todo";
-      "quote";
       "float_kind";
       "int_kind";
       "item_quote_origin";
diff --git a/engine/utils/ocaml_of_json_schema/ocaml_of_json_schema.js b/engine/utils/ocaml_of_json_schema/ocaml_of_json_schema.js
index 2b6bf3b5c..3a9b866b4 100644
--- a/engine/utils/ocaml_of_json_schema/ocaml_of_json_schema.js
+++ b/engine/utils/ocaml_of_json_schema/ocaml_of_json_schema.js
@@ -1,4 +1,4 @@
-const keys = p => 
+const keys = p =>
     new Set(
         Object.keys(p)
             .filter(k => ![
@@ -7,13 +7,13 @@ const keys = p =>
             .filter(k => p?.additionalProperties !== false || k != 'additionalProperties')
     );
 const eq = (xs, ys) =>
-      xs.size === ys.size &&
-      [...xs].every((x) => ys.has(x));
+    xs.size === ys.size &&
+    [...xs].every((x) => ys.has(x));
 
 let todo = (todo = "todo") => null;
 
 let assert = (fact, msg = "assert") => {
-    if(!fact)
+    if (!fact)
         throw msg;
 };
 
@@ -29,7 +29,7 @@ const clean = o => {
     if (o instanceof Object
         && exact_keys(o, 'allOf')
         && o.allOf.length == 1
-       ) {
+    ) {
         let first = o.allOf[0];
         delete o['allOf'];
         for (let k in first)
@@ -40,13 +40,13 @@ const clean = o => {
         && o.type instanceof Array
         && o.type.length === 2
         && o.type.includes('null')
-       ) {
+    ) {
         let type = o.type.filter(x => x != 'null')[0];
         let other = JSON.parse(JSON.stringify(o));
         other.type = type;
         for (let k in o)
             delete o[k];
-        o.anyOf = [other, {type: 'null'}];
+        o.anyOf = [other, { type: 'null' }];
     }
     if (o instanceof Array) {
         return o
@@ -74,17 +74,17 @@ let variantNameOf = s => {
         return v + "'";
     return v;
 };
-let typeNameOf = s => s.replace(/[A-Z]/g, (l, i) => `${i?'_':''}${l.toLowerCase()}`);
+let typeNameOf = s => s.replace(/[A-Z]/g, (l, i) => `${i ? '_' : ''}${l.toLowerCase()}`);
 let fieldNameOf = s => {
-    let ocaml_keywords = [ "and", "as", "assert", "asr", "begin", "class", "constraint",
-                           "do", "done", "downto", "else", "end", "exception", "external",
-                           "false", "for", "fun", "function", "functor", "if", "in",
-                           "include", "inherit", "initializer", "land", "lazy", "let",
-                           "lor", "lsl", "lsr", "lxor", "match", "method", "mod", "module",
-                           "mutable", "new", "nonrec", "object", "of", "open", "or",
-                           "private", "rec", "sig", "struct", "then", "to", "true", "try",
-                           "type", "val", "virtual", "when", "while", "with"
-                         ];
+    let ocaml_keywords = ["and", "as", "assert", "asr", "begin", "class", "constraint",
+        "do", "done", "downto", "else", "end", "exception", "external",
+        "false", "for", "fun", "function", "functor", "if", "in",
+        "include", "inherit", "initializer", "land", "lazy", "let",
+        "lor", "lsl", "lsr", "lxor", "match", "method", "mod", "module",
+        "mutable", "new", "nonrec", "object", "of", "open", "or",
+        "private", "rec", "sig", "struct", "then", "to", "true", "try",
+        "type", "val", "virtual", "when", "while", "with"
+    ];
     if (ocaml_keywords.includes(s))
         return s + "'";
     return s;
@@ -93,7 +93,7 @@ let fieldNameOf = s => {
 let ensureUnique = (() => {
     let cache = {};
     return (kind, v, disambiguer) => {
-        let key = JSON.stringify({kind, v});
+        let key = JSON.stringify({ kind, v });
         // TODO: enble check below, find a good solution
         // if(cache[key])
         //     throw `dup ${kind}, ${v}`;
@@ -103,18 +103,18 @@ let ensureUnique = (() => {
 })();
 
 const util = require('util');
-let log_full = o => console.error(util.inspect(o, {showHidden: false, depth: null, colors: true}));
+let log_full = o => console.error(util.inspect(o, { showHidden: false, depth: null, colors: true }));
 
 let trace1 = (name, f) => (input) => {
     let output = f(input);
-    log_full({name, input, output});
+    log_full({ name, input, output });
     return output;
 };
 
 let ocaml_of_type_expr = (o, path) => {
     if (!path)
         throw "Path missing!";
-    let {kind, payload} = o;
+    let { kind, payload } = o;
     return (({
         option: type => `(${ocaml_of_type_expr(type, [...path, 'option'])} option)`,
         unit: _ => `unit`,
@@ -131,13 +131,13 @@ let ocaml_of_type_expr = (o, path) => {
         name: payload => typeNameOf(payload),
     })[kind] || (_ => {
         log_full(o);
-        throw "ocaml_of_type_expr: bad kind "+kind;
+        throw "ocaml_of_type_expr: bad kind " + kind;
     }))(payload);
 };
 
 
 let mk_match = (scrut, arms, path) => {
-    if(!path){
+    if (!path) {
         console.trace();
         throw "Path missing!";
     }
@@ -154,13 +154,13 @@ let wrap_paren = s => `(${s})`;
 let ocaml_yojson_of_type_expr = (o, subject, path) => {
     if (!path)
         throw "Path missing!";
-    let {kind, payload} = o;
+    let { kind, payload } = o;
     return `(${(({
         option: type => `match ${subject} with | Option.Some x -> ${ocaml_yojson_of_type_expr(type, 'x', [...path, 'Some'])} | _ -> \`Null`,
         unit: _ => `\`Null`,
         tuple: types =>
             `let (${types.map((t, i) => 'x' + i)}) = ${subject} in \`List [${types.map((t, i) => ocaml_yojson_of_type_expr(t, 'x' + i, [...path, 'tuple', i])).join(';')}]`,
-        array: type => 
+        array: type =>
             `\`List (List.map (fun x -> ${ocaml_yojson_of_type_expr(type, 'x', [...path, 'array'])}) ${subject})`,
         boolean: _ => `\`Bool ${subject}`,
         string: _ => `\`String ${subject}`,
@@ -170,10 +170,10 @@ let ocaml_yojson_of_type_expr = (o, subject, path) => {
             int: `\`Int ${subject}`
         })[o.repr],
         char: _ => `\`String (Base.Char.to_string ${subject})`,
-        name: payload => `to_json_${typeNameOf(payload)} ${subject}`,
+        name: payload => `yojson_of_${typeNameOf(payload)} ${subject}`,
     })[kind] || (_ => {
         log_full(o);
-        throw "ocaml_arms_of_type_expr: bad kind "+kind;
+        throw "ocaml_arms_of_type_expr: bad kind " + kind;
     }))(payload)})`;
 };
 
@@ -181,7 +181,7 @@ let ocaml_yojson_of_type_expr = (o, subject, path) => {
 let ocaml_arms_of_type_expr = (o, path) => {
     if (!path)
         throw "Path missing!";
-    let {kind, payload} = o;
+    let { kind, payload } = o;
     return (({
         option: type => [
             [`\`Null`, `Option.None`],
@@ -189,17 +189,17 @@ let ocaml_arms_of_type_expr = (o, path) => {
         ],
         unit: _ => [[`\`Null`, '()']],
         tuple: types => {
-            let sub_matches = types.map((type, i) => 
+            let sub_matches = types.map((type, i) =>
                 mk_match(`v${i}`, ocaml_arms_of_type_expr(type, [...path, 'tuple', i]), [...path, 'tuple']));
             return [
                 [`\`List [${types.map((_, i) => `v${i}`).join(';')}]`,
-                 `(${sub_matches.join(',')})`
+                `(${sub_matches.join(',')})`
                 ],
             ];
         },
         array: type => [
             [`\`List l`,
-             `List.map (fun x -> ${mk_match('x', ocaml_arms_of_type_expr(type, [...path, 'array']), [...path, 'array'])}) l`
+                `List.map (fun x -> ${mk_match('x', ocaml_arms_of_type_expr(type, [...path, 'array']), [...path, 'array'])}) l`
             ]
         ],
         boolean: _ => [[`\`Bool b`, 'b']],
@@ -219,10 +219,10 @@ let ocaml_arms_of_type_expr = (o, path) => {
                 [`\`Intlit s`, 'Base.Int.of_string s']
             ]
         })[o.repr],
-        name: payload => [['remains', `parse_${typeNameOf(payload)} remains`]],
+        name: payload => [['remains', `${typeNameOf(payload)}_of_yojson remains`]],
     })[kind] || (_ => {
         log_full(o);
-        throw "ocaml_arms_of_type_expr: bad kind "+kind;
+        throw "ocaml_arms_of_type_expr: bad kind " + kind;
     }))(payload);
 };
 
@@ -232,10 +232,10 @@ let parse_type_name = s => {
     return s.split('/').slice(-1)[0];
 };
 
-let int_repr_of_format = format => 
-  (format.endsWith('int128') || format == 'uint64' || format == 'uint' /*`uint`s are `usize`s actually, so that's safer to assume it's a uint64, see https://github.com/GREsau/schemars/blob/386e3d7f5ac601795fb4e247291bbef31512ded3/schemars/src/json_schema_impls/primitives.rs#L85C16-L85C21*/)
-    ? 'string'
-    : (format == 'int64' || format == 'uint32' ? 'int64' : 'int');
+let int_repr_of_format = format =>
+    (format.endsWith('int128') || format == 'uint64' || format == 'uint' /*`uint`s are `usize`s actually, so that's safer to assume it's a uint64, see https://github.com/GREsau/schemars/blob/386e3d7f5ac601795fb4e247291bbef31512ded3/schemars/src/json_schema_impls/primitives.rs#L85C16-L85C21*/)
+        ? 'string'
+        : (format == 'int64' || format == 'uint32' ? 'int64' : 'int');
 
 let is_type = {
     option: def => {
@@ -244,14 +244,14 @@ let is_type = {
             && is_type.expr(def.anyOf[0])
             && exact_keys(def.anyOf[1], 'type')
             && def.anyOf[1].type === 'null'
-           )
+        )
             return {
                 kind: 'option',
                 payload: is_type.expr(def.anyOf[0])
             };
         return false;
     },
-    
+
     unit: def => {
         if (exact_keys(def, 'type')
             && def.type === 'null')
@@ -272,7 +272,7 @@ let is_type = {
             };
         return false;
     },
-    
+
     array: def => {
         if (exact_keys(def, 'type', 'items')
             && def.type === 'array'
@@ -283,37 +283,37 @@ let is_type = {
             };
         return false;
     },
-    
-    expr: def => 
-    (exact_keys(def, '$ref') ? {
-        kind: 'name', payload: parse_type_name(def['$ref'])
-    } : false)
+
+    expr: def =>
+        (exact_keys(def, '$ref') ? {
+            kind: 'name', payload: parse_type_name(def['$ref'])
+        } : false)
         || is_type.option(def)
         || is_type.array(def)
         || is_type.unit(def)
         || is_type.tuple(def)
         || (def.type === 'integer'
-            ? {kind: 'integer', repr: int_repr_of_format(def.format)}
+            ? { kind: 'integer', repr: int_repr_of_format(def.format) }
             : false)
         || (def.type === 'string' && def.maxLength === def.minLength && def.minLength === 1
-            ? {kind: 'char'}
+            ? { kind: 'char' }
             : false)
-        || ( ( exact_keys(def, 'type')
-               && ['boolean', 'string'].includes(def.type)
-             ) ? {kind: def.type} : false
-           ) || false,
+        || ((exact_keys(def, 'type')
+            && ['boolean', 'string'].includes(def.type)
+        ) ? { kind: def.type } : false
+        ) || false,
 
     record: def => {
         if ((eq(keys(def), new Set(["type", "required", "properties"]))
-             || eq(keys(def), new Set(["type", "properties"]))
-            )
+            || eq(keys(def), new Set(["type", "properties"]))
+        )
             && def.type === "object"
             && (def.required || []).every(k => typeof k == 'string')
             && Object.values(def.properties).every(is_type.expr))
             return Object.fromEntries(Object.entries(def.properties).map(([n, v]) => [n, is_type.expr(v)]));
         return false;
     },
-    
+
     variant: def => {
         let doc = def.description;
         if (exporters.enum.guard(def))
@@ -327,7 +327,7 @@ let is_type = {
         if (exact_keys(def, 'type', 'required', 'properties')
             && def.type === 'object'
             && Object.values(def.properties).length == 1
-           ){
+        ) {
             let [name, value] = Object.entries(def.properties)[0];
             if (is_type.expr(value))
                 return [{
@@ -362,7 +362,7 @@ let is_type = {
 
 let export_record = (fields, path) => {
     let record_expression = fields.map(([field, type], i) => {
-        let p = [...path, 'field_'+field];
+        let p = [...path, 'field_' + field];
         let sub = mk_match('x', ocaml_arms_of_type_expr(type, p), p);
         let match = `match List.assoc_opt "${field}" l with Option.Some x -> begin ${sub} end | Option.None -> raise (MissingField {field = "${field}"; fields = l})`;
         return `${fieldNameOf(field)} = begin ${match} end`;
@@ -376,62 +376,61 @@ let exporters = {
     oneOf: {
         guard: def => eq(keys(def), new Set(["oneOf"])) &&
             def.oneOf.every(is_type.variant),
-        f: (name, {oneOf}) => {
+        f: (name, { oneOf }) => {
             let variants = oneOf.map(is_type.variant).flat();
-            let type = variants.map(({kind, name: variant_name, payloadKind, payload, doc}) => {
+            let type = variants.map(({ kind, name: variant_name, payloadKind, payload, doc }) => {
                 doc = mkdoc(doc);
                 let variant = ensureUnique('variant', variantNameOf(variant_name));
                 return ({
                     record: () => {
                         let fields = Object.entries(payload).map(([field, value]) =>
-                            fieldNameOf(field) + ' : ' + ocaml_of_type_expr(value, ['rec-variant:'+variant+':'+field]));
+                            fieldNameOf(field) + ' : ' + ocaml_of_type_expr(value, ['rec-variant:' + variant + ':' + field]));
                         return `${variant} of {${fields.join(';\n')}}${doc}`;
                     },
-                    expr: () => `${variant} of (${ocaml_of_type_expr(payload, ['expr-variant:'+variant+':'+name])})${doc}`,
+                    expr: () => `${variant} of (${ocaml_of_type_expr(payload, ['expr-variant:' + variant + ':' + name])})${doc}`,
                     empty: () => `${variant}${doc}`,
                 }[payloadKind] || (() => {
                     throw "bad payloadKind: " + payloadKind;
                 }))();
             }).join('\n     | ');
-            let parse_arms = variants.map(({kind, name: variant_name, payloadKind, payload}) => {
+            let parse_arms = variants.map(({ kind, name: variant_name, payloadKind, payload }) => {
                 let variant = variantNameOf(variant_name);
-                let wrap = (arms, prefix='') => [
+                let wrap = (arms, prefix = '') => [
                     [`\`Assoc ["${variant_name}", rec_value]`,
-                     prefix + mk_match('rec_value', arms, ['rec-variant_'+variant+'_'+variant_name])
+                    prefix + mk_match('rec_value', arms, ['rec-variant_' + variant + '_' + variant_name])
                     ]
                 ];
                 return ({
                     record: () => {
-                        let [pat, expr] = export_record(Object.entries(payload), ['rec-variant_'+variant+'_'+variant_name]);
-                        return wrap([[pat, variant+' '+expr]]);
+                        let [pat, expr] = export_record(Object.entries(payload), ['rec-variant_' + variant + '_' + variant_name]);
+                        return wrap([[pat, variant + ' ' + expr]]);
                     },
-                    expr: () => wrap(ocaml_arms_of_type_expr(payload, ['expr-variant(PA):'+name+':'+variant+':'+variant_name]), variant + ' '),
+                    expr: () => wrap(ocaml_arms_of_type_expr(payload, ['expr-variant(PA):' + name + ':' + variant + ':' + variant_name]), variant + ' '),
                     empty: () => [[`\`String "${variant_name}"`, variant]],
                 }[payloadKind] || (() => {
                     throw "bad payloadKind: " + payloadKind;
                 }))();
             }).flat();
-            let parse = mk_match('o', parse_arms, ['parse_'+name]);
-            let to_json = `match o with ${variants.map(({kind, name: variant_name, payloadKind, payload}) => {
+            let parse = mk_match('o', parse_arms, [name + '_of_yojson']);
+            let to_json = `match o with ${variants.map(({ kind, name: variant_name, payloadKind, payload }) => {
                 let variant = variantNameOf(variant_name);
                 let wrap = (x, e) => `${variant} ${x} -> \`Assoc ["${variant_name}", ${e}]`;
                 return ({
                     record: () => {
                         let fields = Object.entries(payload);
                         return wrap(
-                          `{${fields.map(([field, type], i) => `${fieldNameOf(field)}`).join('; ')}}`,
-                          `\`Assoc [${
-                              fields.map(([field, type], i) => `("${field}", ${ocaml_yojson_of_type_expr(type, fieldNameOf(field), [name+':'+variant, 'variant', field])})`).join('; ')
-                          }]`
+                            `{${fields.map(([field, type], i) => `${fieldNameOf(field)}`).join('; ')}}`,
+                            `\`Assoc [${fields.map(([field, type], i) => `("${field}", ${ocaml_yojson_of_type_expr(type, fieldNameOf(field), [name + ':' + variant, 'variant', field])})`).join('; ')
+                            }]`
                         );
                     },
-                    expr: () => wrap('x', ocaml_yojson_of_type_expr(payload, 'x', [name+':'+variant, 'payload'])),
+                    expr: () => wrap('x', ocaml_yojson_of_type_expr(payload, 'x', [name + ':' + variant, 'payload'])),
                     empty: () => `${variant} -> \`String "${variant_name}"`,
                 }[payloadKind] || (() => {
                     throw "bad payloadKind: " + payloadKind;
                 }))();
             }).join(' | ')}`;
-            return {type, parse, to_json};
+            return { type, parse, to_json };
         },
     },
     empty_struct: {
@@ -447,23 +446,23 @@ let exporters = {
     // object is a *flat* record
     object: {
         guard: def => (eq(keys(def), new Set(["type", "required", "properties"]))
-                       || eq(keys(def), new Set(["type", "properties"]))
-                      ) 
+            || eq(keys(def), new Set(["type", "properties"]))
+        )
             && def.type === "object"
             && (def.required || []).every(k => typeof k == 'string')
             && Object.values(def.properties).every(is_type.expr),
-        f: (name, {required, properties}) => {
+        f: (name, { required, properties }) => {
             let fields = Object.entries(properties).map(
                 ([name, prop]) => [name, is_type.expr(prop), prop.description]
             );
 
-            let [pat, expr] = export_record(fields, ['struct_'+name]);
-            
+            let [pat, expr] = export_record(fields, ['struct_' + name]);
+
             return {
-                type: `{ ${fields.map(([fname, type, doc]) => `${fieldNameOf(fname)} : ${ocaml_of_type_expr(type, ['struct_'+fname+'_'+name])}${mkdoc(doc)}`).join(';\n')} }`,
-                parse: mk_match('o', [[pat, expr]], ['struct_'+name]),
+                type: `{ ${fields.map(([fname, type, doc]) => `${fieldNameOf(fname)} : ${ocaml_of_type_expr(type, ['struct_' + fname + '_' + name])}${mkdoc(doc)}`).join(';\n')} }`,
+                parse: mk_match('o', [[pat, expr]], ['struct_' + name]),
                 to_json: //`let {${fields.map(([fname, type, doc]) => fieldNameOf(fname)).join(';')}} = o in`
-                   `\`Assoc [${fields.map(([fname, type, doc]) => `("${fname}", ${ocaml_yojson_of_type_expr(type, 'o.'+fieldNameOf(fname), ['todo'])})`).join('; ')}]`
+                    `\`Assoc [${fields.map(([fname, type, doc]) => `("${fname}", ${ocaml_yojson_of_type_expr(type, 'o.' + fieldNameOf(fname), ['todo'])})`).join('; ')}]`
             };
         },
     },
@@ -473,7 +472,7 @@ let exporters = {
         f: (name, o) => {
             assert(o.enum.every(x => typeof x == "string"), 'not every enum is a string');
 
-            if(o.enum.length == 0) {
+            if (o.enum.length == 0) {
                 return {
                     type: '|',
                     parse: 'failwith "cannot parse an empty type"',
@@ -489,16 +488,16 @@ let exporters = {
 
             let parse_string
                 = `match s with ` + variants.map(
-                    ({Δ, variant}) => `"${Δ}" -> ${variant}`
+                    ({ Δ, variant }) => `"${Δ}" -> ${variant}`
                 ).join(' | ') + ` | s -> failwith ("unexpected variant [" ^ s ^ "] while parsing enum [${name}]")`;
-            
+
             return {
-                type: variants.map(({variant}) => variant).join(' | '),
+                type: variants.map(({ variant }) => variant).join(' | '),
                 parse: `  match o with
                         | \`String s -> (${parse_string})
                         | _ -> failwith "expected a string while parsing a ${name}"
                        `,
-                to_json: `match o with ${variants.map(({variant, variantOriginName}) => `${variant} -> \`String "${variantOriginName}"`).join(' | ')}`,
+                to_json: `match o with ${variants.map(({ variant, variantOriginName }) => `${variant} -> \`String "${variantOriginName}"`).join(' | ')}`,
             };
         },
     },
@@ -506,36 +505,39 @@ let exporters = {
 
 let export_definition = (name, def) => {
     let suitable_exporters = Object.entries(exporters).filter(
-        ([_, {guard}]) => guard(def)
+        ([_, { guard }]) => guard(def)
     );
 
-    if (suitable_exporters.length != 1){
+    if (suitable_exporters.length != 1) {
         console.error(`ERROR: each definition should have exactly one suited exporter, but type "${name}" has the following exporter(s): ${JSON.stringify(suitable_exporters.map(([n, _]) => n))}.`);
         console.error('name', name);
         log_full(def);
         console.error('xname', name);
-        
+
         throw "kind error";
     }
-    let [_, {f}] = suitable_exporters[0];
+    let [_, { f }] = suitable_exporters[0];
     name = ensureUnique('type', typeNameOf(name));
     let r = f(name, def);
-    if(r === null)
+    if (r === null)
         return `(* type ${name} *)`;
-    let {type, parse, to_json} = r;
-    return {name, type, parse, to_json};
+    let { type, parse, to_json } = r;
+    return { name, type, parse, to_json };
     // return [{type, parse}]
     // return `type ${name} = ${type}\nlet parse_${name} (o: Yojson.Safe.t): ${name} = ${parse}\n`;
 };
 
-function run(str){
+function run(str) {
     let contents = JSON.parse(str);
     const definitions = clean(contents.definitions);
 
     let sig = ``;
-    
+
     let impl = `include struct
-[@@@warning "-A"]`;
+[@@@warning "-A"]
+`;
+
+    impl += `let hax_version = {escape|${contents['$id'].replace(/\|escape\}/g, '|_escape}')}|escape}`;
 
     let items = Object.entries(definitions)
         .map(([name, def]) => ['Node_for_TyKind' == name ? 'node_for_ty_kind_generated' : name, def])
@@ -545,7 +547,7 @@ function run(str){
         ).filter(x => x instanceof Object);
 
     let derive_items = ['show', 'eq'];
-    
+
     impl += `
 module ParseError = struct
   exception MissingField of {
@@ -560,16 +562,17 @@ module ParseError = struct
 end
 
 open ParseError
+
 `;
 
     let derive_clause = derive_items.length ? `[@@deriving ${derive_items.join(', ')}]` : '';
 
     impl += (
         'type '
-            + items.map(({name, type}) =>
-                `${name} = ${type}\n`
-            ).join('\nand ')
-            + derive_clause
+        + items.map(({ name, type }) =>
+            `${name} = ${type}\n`
+        ).join('\nand ')
+        + derive_clause
     );
     impl += `
 and node_for__ty_kind = node_for_ty_kind_generated
@@ -578,8 +581,9 @@ and node_for__def_id_contents = node_for_def_id_contents_generated
 type map_types = ${"[`TyKind of ty_kind | `DefIdContents of def_id_contents]"}
 let cache_map: (int64, ${"[ `Value of map_types | `JSON of Yojson.Safe.t ]"}) Base.Hashtbl.t = Base.Hashtbl.create (module Base.Int64)
 
-let parse_table_id_node (type t) (name: string) (encode: t -> map_types) (decode: map_types -> t option) (parse: Yojson.Safe.t -> t) (o: Yojson.Safe.t): (t * int64) =
-    let label = "parse_table_id_node:" ^ name ^ ": " in
+module Exn = struct
+let table_id_node_of_yojson (type t) (name: string) (encode: t -> map_types) (decode: map_types -> t option) (parse: Yojson.Safe.t -> t) (o: Yojson.Safe.t): (t * int64) =
+    let label = "table_id_node_of_yojson:" ^ name ^ ": " in
     match o with
     | \`Assoc alist -> begin
           let id = match List.assoc_opt "id" alist with
@@ -606,45 +610,80 @@ let parse_table_id_node (type t) (name: string) (encode: t -> map_types) (decode
 
 `;
     impl += ('');
-    impl += ('let rec ' + items.map(({name, type, parse}) =>
-        `parse_${name} (o: Yojson.Safe.t): ${name} = ${parse}`
+    impl += ('let rec ' + items.map(({ name, type, parse }) =>
+        `${name}_of_yojson (o: Yojson.Safe.t): ${name} = ${parse}`
     ).join('\nand '));
     impl += `
-and parse_node_for__ty_kind (o: Yojson.Safe.t): node_for__ty_kind =
+and node_for__ty_kind_of_yojson (o: Yojson.Safe.t): node_for__ty_kind =
    let (value, id) =
-       parse_table_id_node "TyKind"
+       table_id_node_of_yojson "TyKind"
            (fun value -> \`TyKind value)
            (function | \`TyKind value -> Some value | _ -> None)
-           parse_ty_kind
+           ty_kind_of_yojson
            o
    in
    {value; id}
-and parse_node_for__def_id_contents (o: Yojson.Safe.t): node_for__def_id_contents =
+and node_for__def_id_contents_of_yojson (o: Yojson.Safe.t): node_for__def_id_contents =
    let (value, id) =
-       parse_table_id_node "DefIdContents"
+       table_id_node_of_yojson "DefIdContents"
            (fun value -> \`DefIdContents value)
            (function | \`DefIdContents value -> Some value | _ -> None)
-           parse_def_id_contents
+           def_id_contents_of_yojson
            o
    in
    {value; id}
 `;
     impl += ('');
-    impl += ('let rec ' + items.map(({name, type, parse, to_json}) =>
-        `to_json_${name} (o: ${name}): Yojson.Safe.t = ${to_json}`
+    impl += ('let rec ' + items.map(({ name, type, parse, to_json }) =>
+        `yojson_of_${name} (o: ${name}): Yojson.Safe.t = ${to_json}`
     ).join('\nand '));
     impl += `
-and to_json_node_for__ty_kind {value; id} = to_json_node_for_ty_kind_generated {value; id}
-and to_json_node_for__def_id_contents {value; id} = to_json_node_for_def_id_contents_generated {value; id}
+and yojson_of_node_for__ty_kind {value; id} = yojson_of_node_for_ty_kind_generated {value; id}
+and yojson_of_node_for__def_id_contents {value; id} = yojson_of_node_for_def_id_contents_generated {value; id}
+end
+
+open struct
+  let catch_parsing_errors (type a b) (label: string) (f: a -> b) (x: a): (b, Base.Error.t) Base.Result.t = 
+      try Base.Result.Ok (f x) with
+      | e -> Base.Result.Error (Base.Error.of_exn ~backtrace:\`Get e)
+  let unwrap = function 
+    | Base.Result.Ok value -> value
+    | Base.Result.Error err -> 
+        let err =
+            let path = Utils.tempfile_path ~suffix:".log" in
+            Core.Out_channel.write_all path
+                ~data:(Base.Error.to_string_hum err);
+            path
+        in
+        prerr_endline [%string {|
+Error: could not serialize or deserialize a hax value.
+This error arises from an incompatibility betwen hax components: hax-engine, cargo-hax and hax-lib.
+Potential fixes:
+  - Make sure the version of \`hax-lib\` for the crate your are trying to extract matches the version of hax currently installed (%{hax_version}).
+  - Run \`cargo clean\`
+  - Reinstall hax
+
+The full stack trace was dumped to %{err}.
+|}];
+        exit 1
+end
 `;
 
 
+    impl += (items.map(({ name, type, parse, to_json }) =>
+        `
+let safe_yojson_of_${name} = catch_parsing_errors "yojson_of_${name}" Exn.yojson_of_${name}
+let safe_${name}_of_yojson = catch_parsing_errors "${name}_of_yojson" Exn.${name}_of_yojson
+let yojson_of_${name} x = unwrap (safe_yojson_of_${name} x)
+let ${name}_of_yojson x = unwrap (safe_${name}_of_yojson x)`
+    ).join('\n'));
+
     return impl + ' \n end';
 }
 
-function parse_args(){
+function parse_args() {
     let [script_name, input_path, output_path, ...rest] = process.argv.slice(1);
-    if(!input_path || !output_path || rest.length) {
+    if (!input_path || !output_path || rest.length) {
         console.log(`
 Usage: node ${script_name} INPUT_PATH OUTPUT_PATH
 
@@ -657,17 +696,17 @@ Usage: node ${script_name} INPUT_PATH OUTPUT_PATH
 
 async function read(stream) {
     const chunks = [];
-    for await (const chunk of stream) chunks.push(chunk); 
+    for await (const chunk of stream) chunks.push(chunk);
     return Buffer.concat(chunks).toString('utf8');
 }
 
-async function main(){
+async function main() {
     const fs = require('fs');
-    let {input_path, output_path} = parse_args();
+    let { input_path, output_path } = parse_args();
     let out = run(input_path == '-'
-                  ? await read(process.stdin)
-                  : fs.readFileSync(input_path, 'utf-8')
-                 );
+        ? await read(process.stdin)
+        : fs.readFileSync(input_path, 'utf-8')
+    );
     output_path == '-'
         ? process.stdout.write(out)
         : fs.writeFileSync(output_path, out);
diff --git a/flake.lock b/flake.lock
index 13161cb34..e86058805 100644
--- a/flake.lock
+++ b/flake.lock
@@ -127,11 +127,11 @@
         ]
       },
       "locked": {
-        "lastModified": 1729736953,
-        "narHash": "sha256-Rb6JUop7NRklg0uzcre+A+Ebrn/ZiQPkm4QdKg6/3pw=",
+        "lastModified": 1736735482,
+        "narHash": "sha256-QOA4jCDyyUM9Y2Vba+HSZ/5LdtCMGaTE/7NkkUzBr50=",
         "owner": "oxalica",
         "repo": "rust-overlay",
-        "rev": "29b1275740d9283467b8117499ec8cbb35250584",
+        "rev": "cf960a1938ee91200fe0d2f7b2582fde2429d562",
         "type": "github"
       },
       "original": {
diff --git a/flake.nix b/flake.nix
index 168556d28..2bd83b20f 100644
--- a/flake.nix
+++ b/flake.nix
@@ -4,9 +4,7 @@
     flake-utils.url = "github:numtide/flake-utils";
     crane = {
       url = "github:ipetkov/crane";
-      inputs = {
-        nixpkgs.follows = "nixpkgs";
-      };
+      inputs = { nixpkgs.follows = "nixpkgs"; };
     };
     rust-overlay = {
       url = "github:oxalica/rust-overlay";
@@ -29,21 +27,28 @@
     };
   };
 
-  outputs = {
-    flake-utils,
-    nixpkgs,
-    rust-overlay,
-    crane,
-    hacl-star,
-    ...
-  } @ inputs:
-    flake-utils.lib.eachDefaultSystem (
-      system: let
+  outputs =
+    { flake-utils, nixpkgs, rust-overlay, crane, hacl-star, ... }@inputs:
+    flake-utils.lib.eachDefaultSystem (system:
+      let
         pkgs = import nixpkgs {
           inherit system;
-          overlays = [rust-overlay.overlays.default];
+          overlays = [ rust-overlay.overlays.default ];
         };
-        rustc = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
+        toolchain =
+          (fromTOML (pkgs.lib.readFile ./rust-toolchain.toml)).toolchain;
+        rustc = pkgs.rust-bin.fromRustupToolchain toolchain;
+        rustc-docs = (let
+          # Only x86 linux has the component rustc-docs, see https://github.com/nix-community/fenix/issues/51
+          # system = "x86_64-linux";
+          n = toolchain // {
+            components = toolchain.components ++ [ "rustc-docs" ];
+          };
+          rustc = builtins.trace n.components
+            ((pkgs.rust-bin.fromRustupToolchain n).override {
+              targets = [ "x86_64-unknown-linux-gnu" ];
+            });
+        in rustc);
         craneLib = (crane.mkLib pkgs).overrideToolchain rustc;
         ocamlformat = pkgs.ocamlformat_0_26_2;
         rustfmt = pkgs.rustfmt;
@@ -63,8 +68,11 @@
         ocamlPackages = pkgs.ocamlPackages;
       in rec {
         packages = {
-          inherit rustc ocamlformat rustfmt fstar hax-env;
-          hax-book = pkgs.callPackage ./book {};
+          inherit rustc ocamlformat rustfmt fstar hax-env rustc-docs;
+          docs = pkgs.python312Packages.callPackage ./docs {
+            hax-frontend-docs = packages.hax-rust-frontend.docs;
+            hax-engine-docs = packages.hax-engine.docs;
+          };
           hax-engine = pkgs.callPackage ./engine {
             hax-rust-frontend = packages.hax-rust-frontend.unwrapped;
             # `hax-engine-names-extract` extracts Rust names but also
@@ -74,14 +82,15 @@
             # Rust sources happens to be in the Nix store. That
             # creates useless dependencies, this wrapper below takes
             # care of removing those extra depenedencies.
-            hax-engine-names-extract = pkgs.writeScriptBin "hax-engine-names-extract" ''
-              #!${pkgs.stdenv.shell}
-              ${packages.hax-rust-frontend.hax-engine-names-extract}/bin/hax-engine-names-extract | sed 's|/nix/store/\(.\{6\}\)|/nix_store/\1-|g'
-            '';
+            hax-engine-names-extract =
+              pkgs.writeScriptBin "hax-engine-names-extract" ''
+                #!${pkgs.stdenv.shell}
+                ${packages.hax-rust-frontend.hax-engine-names-extract}/bin/hax-engine-names-extract | sed 's|/nix/store/\(.\{6\}\)|/nix_store/\1-|g'
+              '';
             inherit rustc ocamlPackages;
           };
           hax-rust-frontend = pkgs.callPackage ./cli {
-            inherit rustc craneLib;
+            inherit rustc craneLib rustc-docs;
             inherit (packages) hax-engine;
           };
           hax = packages.hax-rust-frontend;
@@ -93,8 +102,8 @@
 
           rust-by-example-hax-extraction = pkgs.stdenv.mkDerivation {
             name = "rust-by-example-hax-extraction";
-            phases = ["installPhase"];
-            buildInputs = [packages.hax pkgs.cargo];
+            phases = [ "installPhase" ];
+            buildInputs = [ packages.hax pkgs.cargo ];
             installPhase = ''
               cp --no-preserve=mode -rf ${inputs.rust-by-examples} workdir
               cd workdir
@@ -118,10 +127,9 @@
             inherit (packages) hax;
             inherit craneLib fstar hacl-star hax-env;
           };
-          readme-coherency = let
-            src = pkgs.lib.sourceFilesBySuffices ./. [".md"];
-          in
-            pkgs.stdenv.mkDerivation {
+          readme-coherency =
+            let src = pkgs.lib.sourceFilesBySuffices ./. [ ".md" ];
+            in pkgs.stdenv.mkDerivation {
               name = "readme-coherency";
               inherit src;
               buildPhase = ''
@@ -135,7 +143,9 @@
           replace-fstar-versions-md = {
             type = "app";
             program = "${pkgs.writeScript "replace-fstar-versions-md" ''
-              FSTAR_VERSION=$(cat ${./flake.lock} | ${pkgs.jq}/bin/jq '.nodes.fstar.original.ref' -r)
+              FSTAR_VERSION=$(cat ${
+                ./flake.lock
+              } | ${pkgs.jq}/bin/jq '.nodes.fstar.original.ref' -r)
               ${pkgs.fd}/bin/fd \
                  -X ${pkgs.sd}/bin/sd '`.*?`()' '`'"$FSTAR_VERSION"'`$1' **/*.md \
                  ";" --glob '*.md'
@@ -144,14 +154,7 @@
           serve-rustc-docs = {
             type = "app";
             program = "${pkgs.writeScript "serve-rustc-docs" ''
-              cd ${packages.rustc.passthru.availableComponents.rustc-docs}/share/doc/rust/html/rustc
-              ${pkgs.python3}/bin/python -m http.server "$@"
-            ''}";
-          };
-          serve-book = {
-            type = "app";
-            program = "${pkgs.writeScript "serve-book" ''
-              cd ${packages.hax-book}
+              cd ${rustc-docs}/share/doc/rust/html/rustc
               ${pkgs.python3}/bin/python -m http.server "$@"
             ''}";
           };
@@ -167,15 +170,16 @@
               hax-rust-frontend = pkgs.hello;
               hax-engine-names-extract = pkgs.hello;
             })
+            packages.docs
           ];
         in let
           utils = pkgs.stdenv.mkDerivation {
             name = "hax-dev-scripts";
-            phases = ["installPhase"];
+            phases = [ "installPhase" ];
             installPhase = ''
-                mkdir -p $out/bin
-                cp ${./.utils/rebuild.sh} $out/bin/rebuild
-              '';
+              mkdir -p $out/bin
+              cp ${./.utils/rebuild.sh} $out/bin/rebuild
+            '';
           };
           packages = [
             ocamlformat
@@ -190,13 +194,12 @@
             pkgs.cargo-release
             pkgs.cargo-insta
             pkgs.openssl.dev
+            pkgs.libz.dev
             pkgs.pkg-config
             pkgs.rust-analyzer
             pkgs.toml2json
-            pkgs.mdbook
             rustfmt
             rustc
-
             utils
           ];
           LIBCLANG_PATH = "${pkgs.llvmPackages.libclang.lib}/lib";
@@ -209,13 +212,13 @@
               export HAX_PROOF_LIBS_HOME="$HAX_ROOT/proof-libs/fstar"
               export HAX_LIBS_HOME="$HAX_ROOT/hax-lib"
             '';
-            packages = packages ++ [fstar pkgs.proverif];
+            packages = packages ++ [ fstar pkgs.proverif ];
           };
           default = pkgs.mkShell {
             inherit packages inputsFrom LIBCLANG_PATH;
-            shellHook = ''echo "Commands available: $(ls ${utils}/bin | tr '\n' ' ')" 1>&2'';
+            shellHook = ''
+              echo "Commands available: $(ls ${utils}/bin | tr '\n' ' ')" 1>&2'';
           };
         };
-      }
-    );
+      });
 }
diff --git a/frontend/exporter/json-visualizer/.gitignore b/frontend/exporter/json-visualizer/.gitignore
deleted file mode 100644
index 58b21fe5e..000000000
--- a/frontend/exporter/json-visualizer/.gitignore
+++ /dev/null
@@ -1,23 +0,0 @@
-# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
-
-# dependencies
-/node_modules
-/.pnp
-.pnp.js
-
-# testing
-/coverage
-
-# production
-# /build
-
-# misc
-.DS_Store
-.env.local
-.env.development.local
-.env.test.local
-.env.production.local
-
-npm-debug.log*
-yarn-debug.log*
-yarn-error.log*
diff --git a/frontend/exporter/json-visualizer/build/asset-manifest.json b/frontend/exporter/json-visualizer/build/asset-manifest.json
deleted file mode 100644
index 1efbf63ed..000000000
--- a/frontend/exporter/json-visualizer/build/asset-manifest.json
+++ /dev/null
@@ -1,317 +0,0 @@
-{
-  "files": {
-    "main.css": "/static/css/main.bee034d7.css",
-    "main.js": "/static/js/main.ef51a22b.js",
-    "react-syntax-highlighter/refractor-core-import.js": "/static/js/react-syntax-highlighter/refractor-core-import.fbe2b446.chunk.js",
-    "react-syntax-highlighter_languages_refractor_abap.js": "/static/js/react-syntax-highlighter_languages_refractor_abap.13c53f41.chunk.js",
-    "react-syntax-highlighter_languages_refractor_actionscript.js": "/static/js/react-syntax-highlighter_languages_refractor_actionscript.4a230d0d.chunk.js",
-    "react-syntax-highlighter_languages_refractor_ada.js": "/static/js/react-syntax-highlighter_languages_refractor_ada.f6b082db.chunk.js",
-    "react-syntax-highlighter_languages_refractor_apacheconf.js": "/static/js/react-syntax-highlighter_languages_refractor_apacheconf.87cc9496.chunk.js",
-    "react-syntax-highlighter_languages_refractor_apl.js": "/static/js/react-syntax-highlighter_languages_refractor_apl.c32bd528.chunk.js",
-    "react-syntax-highlighter_languages_refractor_applescript.js": "/static/js/react-syntax-highlighter_languages_refractor_applescript.6530c5d9.chunk.js",
-    "react-syntax-highlighter_languages_refractor_arduino.js": "/static/js/react-syntax-highlighter_languages_refractor_arduino.8d96cdfd.chunk.js",
-    "react-syntax-highlighter_languages_refractor_arff.js": "/static/js/react-syntax-highlighter_languages_refractor_arff.ff2f8cc1.chunk.js",
-    "react-syntax-highlighter_languages_refractor_asciidoc.js": "/static/js/react-syntax-highlighter_languages_refractor_asciidoc.5031b27d.chunk.js",
-    "react-syntax-highlighter_languages_refractor_asm6502.js": "/static/js/react-syntax-highlighter_languages_refractor_asm6502.28923a14.chunk.js",
-    "react-syntax-highlighter_languages_refractor_aspnet.js": "/static/js/react-syntax-highlighter_languages_refractor_aspnet.b560b14a.chunk.js",
-    "react-syntax-highlighter_languages_refractor_autohotkey.js": "/static/js/react-syntax-highlighter_languages_refractor_autohotkey.73328029.chunk.js",
-    "react-syntax-highlighter_languages_refractor_autoit.js": "/static/js/react-syntax-highlighter_languages_refractor_autoit.f9c061a8.chunk.js",
-    "react-syntax-highlighter_languages_refractor_bash.js": "/static/js/react-syntax-highlighter_languages_refractor_bash.3323884e.chunk.js",
-    "react-syntax-highlighter_languages_refractor_basic.js": "/static/js/react-syntax-highlighter_languages_refractor_basic.b0af9365.chunk.js",
-    "react-syntax-highlighter_languages_refractor_batch.js": "/static/js/react-syntax-highlighter_languages_refractor_batch.a992c1d2.chunk.js",
-    "react-syntax-highlighter_languages_refractor_bison.js": "/static/js/react-syntax-highlighter_languages_refractor_bison.5c7408aa.chunk.js",
-    "react-syntax-highlighter_languages_refractor_brainfuck.js": "/static/js/react-syntax-highlighter_languages_refractor_brainfuck.b951d366.chunk.js",
-    "react-syntax-highlighter_languages_refractor_bro.js": "/static/js/react-syntax-highlighter_languages_refractor_bro.052728df.chunk.js",
-    "react-syntax-highlighter_languages_refractor_c.js": "/static/js/react-syntax-highlighter_languages_refractor_c.736a00ec.chunk.js",
-    "react-syntax-highlighter_languages_refractor_clike.js": "/static/js/react-syntax-highlighter_languages_refractor_clike.4a239c52.chunk.js",
-    "react-syntax-highlighter_languages_refractor_clojure.js": "/static/js/react-syntax-highlighter_languages_refractor_clojure.f918c2a5.chunk.js",
-    "react-syntax-highlighter_languages_refractor_coffeescript.js": "/static/js/react-syntax-highlighter_languages_refractor_coffeescript.9432e2d2.chunk.js",
-    "react-syntax-highlighter_languages_refractor_cpp.js": "/static/js/react-syntax-highlighter_languages_refractor_cpp.8db4f9e6.chunk.js",
-    "react-syntax-highlighter_languages_refractor_crystal.js": "/static/js/react-syntax-highlighter_languages_refractor_crystal.e3e52b5a.chunk.js",
-    "react-syntax-highlighter_languages_refractor_csharp.js": "/static/js/react-syntax-highlighter_languages_refractor_csharp.6293ec4f.chunk.js",
-    "react-syntax-highlighter_languages_refractor_csp.js": "/static/js/react-syntax-highlighter_languages_refractor_csp.a2cca020.chunk.js",
-    "react-syntax-highlighter_languages_refractor_cssExtras.js": "/static/js/react-syntax-highlighter_languages_refractor_cssExtras.c7fdbcc3.chunk.js",
-    "react-syntax-highlighter_languages_refractor_css.js": "/static/js/react-syntax-highlighter_languages_refractor_css.90d460f4.chunk.js",
-    "react-syntax-highlighter_languages_refractor_d.js": "/static/js/react-syntax-highlighter_languages_refractor_d.d49d6cb6.chunk.js",
-    "react-syntax-highlighter_languages_refractor_dart.js": "/static/js/react-syntax-highlighter_languages_refractor_dart.dafd672c.chunk.js",
-    "react-syntax-highlighter_languages_refractor_diff.js": "/static/js/react-syntax-highlighter_languages_refractor_diff.ced67d7c.chunk.js",
-    "react-syntax-highlighter_languages_refractor_django.js": "/static/js/react-syntax-highlighter_languages_refractor_django.be253f7b.chunk.js",
-    "react-syntax-highlighter_languages_refractor_docker.js": "/static/js/react-syntax-highlighter_languages_refractor_docker.08cb92b3.chunk.js",
-    "react-syntax-highlighter_languages_refractor_eiffel.js": "/static/js/react-syntax-highlighter_languages_refractor_eiffel.42d7b123.chunk.js",
-    "react-syntax-highlighter_languages_refractor_elixir.js": "/static/js/react-syntax-highlighter_languages_refractor_elixir.78531210.chunk.js",
-    "react-syntax-highlighter_languages_refractor_elm.js": "/static/js/react-syntax-highlighter_languages_refractor_elm.363884d0.chunk.js",
-    "react-syntax-highlighter_languages_refractor_erb.js": "/static/js/react-syntax-highlighter_languages_refractor_erb.a9a5ff1b.chunk.js",
-    "react-syntax-highlighter_languages_refractor_erlang.js": "/static/js/react-syntax-highlighter_languages_refractor_erlang.dca692c0.chunk.js",
-    "react-syntax-highlighter_languages_refractor_flow.js": "/static/js/react-syntax-highlighter_languages_refractor_flow.f35a2233.chunk.js",
-    "react-syntax-highlighter_languages_refractor_fortran.js": "/static/js/react-syntax-highlighter_languages_refractor_fortran.3ce57c79.chunk.js",
-    "react-syntax-highlighter_languages_refractor_fsharp.js": "/static/js/react-syntax-highlighter_languages_refractor_fsharp.d4ee2e12.chunk.js",
-    "react-syntax-highlighter_languages_refractor_gedcom.js": "/static/js/react-syntax-highlighter_languages_refractor_gedcom.ae6fd14d.chunk.js",
-    "react-syntax-highlighter_languages_refractor_gherkin.js": "/static/js/react-syntax-highlighter_languages_refractor_gherkin.2cd5c568.chunk.js",
-    "react-syntax-highlighter_languages_refractor_git.js": "/static/js/react-syntax-highlighter_languages_refractor_git.c07d30b3.chunk.js",
-    "react-syntax-highlighter_languages_refractor_glsl.js": "/static/js/react-syntax-highlighter_languages_refractor_glsl.0562056d.chunk.js",
-    "react-syntax-highlighter_languages_refractor_go.js": "/static/js/react-syntax-highlighter_languages_refractor_go.0c52feb8.chunk.js",
-    "react-syntax-highlighter_languages_refractor_graphql.js": "/static/js/react-syntax-highlighter_languages_refractor_graphql.05c067cc.chunk.js",
-    "react-syntax-highlighter_languages_refractor_groovy.js": "/static/js/react-syntax-highlighter_languages_refractor_groovy.89603ec6.chunk.js",
-    "react-syntax-highlighter_languages_refractor_haml.js": "/static/js/react-syntax-highlighter_languages_refractor_haml.aa041704.chunk.js",
-    "react-syntax-highlighter_languages_refractor_handlebars.js": "/static/js/react-syntax-highlighter_languages_refractor_handlebars.70ecf101.chunk.js",
-    "react-syntax-highlighter_languages_refractor_haskell.js": "/static/js/react-syntax-highlighter_languages_refractor_haskell.b988205b.chunk.js",
-    "react-syntax-highlighter_languages_refractor_haxe.js": "/static/js/react-syntax-highlighter_languages_refractor_haxe.72b6162f.chunk.js",
-    "react-syntax-highlighter_languages_refractor_hpkp.js": "/static/js/react-syntax-highlighter_languages_refractor_hpkp.827724e2.chunk.js",
-    "react-syntax-highlighter_languages_refractor_hsts.js": "/static/js/react-syntax-highlighter_languages_refractor_hsts.ad5af869.chunk.js",
-    "react-syntax-highlighter_languages_refractor_http.js": "/static/js/react-syntax-highlighter_languages_refractor_http.97208503.chunk.js",
-    "react-syntax-highlighter_languages_refractor_ichigojam.js": "/static/js/react-syntax-highlighter_languages_refractor_ichigojam.06f59a25.chunk.js",
-    "react-syntax-highlighter_languages_refractor_icon.js": "/static/js/react-syntax-highlighter_languages_refractor_icon.b62cbf67.chunk.js",
-    "react-syntax-highlighter_languages_refractor_inform7.js": "/static/js/react-syntax-highlighter_languages_refractor_inform7.310dec86.chunk.js",
-    "react-syntax-highlighter_languages_refractor_ini.js": "/static/js/react-syntax-highlighter_languages_refractor_ini.ecff4839.chunk.js",
-    "react-syntax-highlighter_languages_refractor_io.js": "/static/js/react-syntax-highlighter_languages_refractor_io.08b9ad12.chunk.js",
-    "react-syntax-highlighter_languages_refractor_j.js": "/static/js/react-syntax-highlighter_languages_refractor_j.66c5b318.chunk.js",
-    "react-syntax-highlighter_languages_refractor_java.js": "/static/js/react-syntax-highlighter_languages_refractor_java.1d512f25.chunk.js",
-    "react-syntax-highlighter_languages_refractor_javascript.js": "/static/js/react-syntax-highlighter_languages_refractor_javascript.b076003a.chunk.js",
-    "react-syntax-highlighter_languages_refractor_jolie.js": "/static/js/react-syntax-highlighter_languages_refractor_jolie.1eb41744.chunk.js",
-    "react-syntax-highlighter_languages_refractor_json.js": "/static/js/react-syntax-highlighter_languages_refractor_json.d0e0d149.chunk.js",
-    "react-syntax-highlighter_languages_refractor_jsx.js": "/static/js/react-syntax-highlighter_languages_refractor_jsx.64e691a4.chunk.js",
-    "react-syntax-highlighter_languages_refractor_julia.js": "/static/js/react-syntax-highlighter_languages_refractor_julia.107695e4.chunk.js",
-    "react-syntax-highlighter_languages_refractor_keyman.js": "/static/js/react-syntax-highlighter_languages_refractor_keyman.a7529543.chunk.js",
-    "react-syntax-highlighter_languages_refractor_kotlin.js": "/static/js/react-syntax-highlighter_languages_refractor_kotlin.d621fb36.chunk.js",
-    "react-syntax-highlighter_languages_refractor_latex.js": "/static/js/react-syntax-highlighter_languages_refractor_latex.7398b08a.chunk.js",
-    "react-syntax-highlighter_languages_refractor_less.js": "/static/js/react-syntax-highlighter_languages_refractor_less.7c26b85a.chunk.js",
-    "react-syntax-highlighter_languages_refractor_liquid.js": "/static/js/react-syntax-highlighter_languages_refractor_liquid.c1a66e62.chunk.js",
-    "react-syntax-highlighter_languages_refractor_lisp.js": "/static/js/react-syntax-highlighter_languages_refractor_lisp.22650fad.chunk.js",
-    "react-syntax-highlighter_languages_refractor_livescript.js": "/static/js/react-syntax-highlighter_languages_refractor_livescript.bccc3045.chunk.js",
-    "react-syntax-highlighter_languages_refractor_lolcode.js": "/static/js/react-syntax-highlighter_languages_refractor_lolcode.44dff15c.chunk.js",
-    "react-syntax-highlighter_languages_refractor_lua.js": "/static/js/react-syntax-highlighter_languages_refractor_lua.49e61a10.chunk.js",
-    "react-syntax-highlighter_languages_refractor_makefile.js": "/static/js/react-syntax-highlighter_languages_refractor_makefile.733b320a.chunk.js",
-    "react-syntax-highlighter_languages_refractor_markdown.js": "/static/js/react-syntax-highlighter_languages_refractor_markdown.e4b0e3b5.chunk.js",
-    "react-syntax-highlighter_languages_refractor_markupTemplating.js": "/static/js/react-syntax-highlighter_languages_refractor_markupTemplating.0b9edf85.chunk.js",
-    "react-syntax-highlighter_languages_refractor_markup.js": "/static/js/react-syntax-highlighter_languages_refractor_markup.016c9759.chunk.js",
-    "react-syntax-highlighter_languages_refractor_matlab.js": "/static/js/react-syntax-highlighter_languages_refractor_matlab.03231ebd.chunk.js",
-    "react-syntax-highlighter_languages_refractor_mel.js": "/static/js/react-syntax-highlighter_languages_refractor_mel.67b95ed6.chunk.js",
-    "react-syntax-highlighter_languages_refractor_mizar.js": "/static/js/react-syntax-highlighter_languages_refractor_mizar.fef17116.chunk.js",
-    "react-syntax-highlighter_languages_refractor_monkey.js": "/static/js/react-syntax-highlighter_languages_refractor_monkey.cc1f6764.chunk.js",
-    "react-syntax-highlighter_languages_refractor_n4js.js": "/static/js/react-syntax-highlighter_languages_refractor_n4js.fd1334d3.chunk.js",
-    "react-syntax-highlighter_languages_refractor_nasm.js": "/static/js/react-syntax-highlighter_languages_refractor_nasm.978d1bad.chunk.js",
-    "react-syntax-highlighter_languages_refractor_nginx.js": "/static/js/react-syntax-highlighter_languages_refractor_nginx.a3e3bd3d.chunk.js",
-    "react-syntax-highlighter_languages_refractor_nim.js": "/static/js/react-syntax-highlighter_languages_refractor_nim.3b76c224.chunk.js",
-    "react-syntax-highlighter_languages_refractor_nix.js": "/static/js/react-syntax-highlighter_languages_refractor_nix.17d23a7e.chunk.js",
-    "react-syntax-highlighter_languages_refractor_nsis.js": "/static/js/react-syntax-highlighter_languages_refractor_nsis.5dc7cd10.chunk.js",
-    "react-syntax-highlighter_languages_refractor_objectivec.js": "/static/js/react-syntax-highlighter_languages_refractor_objectivec.2968546a.chunk.js",
-    "react-syntax-highlighter_languages_refractor_ocaml.js": "/static/js/react-syntax-highlighter_languages_refractor_ocaml.85ceb055.chunk.js",
-    "react-syntax-highlighter_languages_refractor_opencl.js": "/static/js/react-syntax-highlighter_languages_refractor_opencl.9670007d.chunk.js",
-    "react-syntax-highlighter_languages_refractor_oz.js": "/static/js/react-syntax-highlighter_languages_refractor_oz.1981f58f.chunk.js",
-    "react-syntax-highlighter_languages_refractor_parigp.js": "/static/js/react-syntax-highlighter_languages_refractor_parigp.ea2a4c89.chunk.js",
-    "react-syntax-highlighter_languages_refractor_parser.js": "/static/js/react-syntax-highlighter_languages_refractor_parser.a1b9a518.chunk.js",
-    "react-syntax-highlighter_languages_refractor_pascal.js": "/static/js/react-syntax-highlighter_languages_refractor_pascal.923a8e26.chunk.js",
-    "react-syntax-highlighter_languages_refractor_perl.js": "/static/js/react-syntax-highlighter_languages_refractor_perl.d32bd6af.chunk.js",
-    "react-syntax-highlighter_languages_refractor_phpExtras.js": "/static/js/react-syntax-highlighter_languages_refractor_phpExtras.58a3dcd4.chunk.js",
-    "react-syntax-highlighter_languages_refractor_php.js": "/static/js/react-syntax-highlighter_languages_refractor_php.99d73a94.chunk.js",
-    "react-syntax-highlighter_languages_refractor_plsql.js": "/static/js/react-syntax-highlighter_languages_refractor_plsql.76bd98d9.chunk.js",
-    "react-syntax-highlighter_languages_refractor_powershell.js": "/static/js/react-syntax-highlighter_languages_refractor_powershell.53d049f6.chunk.js",
-    "react-syntax-highlighter_languages_refractor_processing.js": "/static/js/react-syntax-highlighter_languages_refractor_processing.39bf5952.chunk.js",
-    "react-syntax-highlighter_languages_refractor_prolog.js": "/static/js/react-syntax-highlighter_languages_refractor_prolog.97dd9798.chunk.js",
-    "react-syntax-highlighter_languages_refractor_properties.js": "/static/js/react-syntax-highlighter_languages_refractor_properties.08274940.chunk.js",
-    "react-syntax-highlighter_languages_refractor_protobuf.js": "/static/js/react-syntax-highlighter_languages_refractor_protobuf.97386f11.chunk.js",
-    "react-syntax-highlighter_languages_refractor_pug.js": "/static/js/react-syntax-highlighter_languages_refractor_pug.14fcf04d.chunk.js",
-    "react-syntax-highlighter_languages_refractor_puppet.js": "/static/js/react-syntax-highlighter_languages_refractor_puppet.6d16babe.chunk.js",
-    "react-syntax-highlighter_languages_refractor_pure.js": "/static/js/react-syntax-highlighter_languages_refractor_pure.edc60c7b.chunk.js",
-    "react-syntax-highlighter_languages_refractor_python.js": "/static/js/react-syntax-highlighter_languages_refractor_python.f564982e.chunk.js",
-    "react-syntax-highlighter_languages_refractor_q.js": "/static/js/react-syntax-highlighter_languages_refractor_q.bc978093.chunk.js",
-    "react-syntax-highlighter_languages_refractor_qore.js": "/static/js/react-syntax-highlighter_languages_refractor_qore.e14166e4.chunk.js",
-    "react-syntax-highlighter_languages_refractor_r.js": "/static/js/react-syntax-highlighter_languages_refractor_r.7299ad64.chunk.js",
-    "react-syntax-highlighter_languages_refractor_reason.js": "/static/js/react-syntax-highlighter_languages_refractor_reason.adeb6afb.chunk.js",
-    "react-syntax-highlighter_languages_refractor_renpy.js": "/static/js/react-syntax-highlighter_languages_refractor_renpy.08c99dd6.chunk.js",
-    "react-syntax-highlighter_languages_refractor_rest.js": "/static/js/react-syntax-highlighter_languages_refractor_rest.192bf9b2.chunk.js",
-    "react-syntax-highlighter_languages_refractor_rip.js": "/static/js/react-syntax-highlighter_languages_refractor_rip.8741b549.chunk.js",
-    "react-syntax-highlighter_languages_refractor_roboconf.js": "/static/js/react-syntax-highlighter_languages_refractor_roboconf.5aac10b7.chunk.js",
-    "react-syntax-highlighter_languages_refractor_ruby.js": "/static/js/react-syntax-highlighter_languages_refractor_ruby.f8213093.chunk.js",
-    "react-syntax-highlighter_languages_refractor_rust.js": "/static/js/react-syntax-highlighter_languages_refractor_rust.3e5b051a.chunk.js",
-    "react-syntax-highlighter_languages_refractor_sas.js": "/static/js/react-syntax-highlighter_languages_refractor_sas.2a083a5a.chunk.js",
-    "react-syntax-highlighter_languages_refractor_sass.js": "/static/js/react-syntax-highlighter_languages_refractor_sass.99a228d7.chunk.js",
-    "react-syntax-highlighter_languages_refractor_scala.js": "/static/js/react-syntax-highlighter_languages_refractor_scala.dc091533.chunk.js",
-    "react-syntax-highlighter_languages_refractor_scheme.js": "/static/js/react-syntax-highlighter_languages_refractor_scheme.b6ba1630.chunk.js",
-    "react-syntax-highlighter_languages_refractor_scss.js": "/static/js/react-syntax-highlighter_languages_refractor_scss.e31bbaaf.chunk.js",
-    "react-syntax-highlighter_languages_refractor_smalltalk.js": "/static/js/react-syntax-highlighter_languages_refractor_smalltalk.e6863ddb.chunk.js",
-    "react-syntax-highlighter_languages_refractor_smarty.js": "/static/js/react-syntax-highlighter_languages_refractor_smarty.710429f9.chunk.js",
-    "react-syntax-highlighter_languages_refractor_soy.js": "/static/js/react-syntax-highlighter_languages_refractor_soy.5af2dacf.chunk.js",
-    "react-syntax-highlighter_languages_refractor_sql.js": "/static/js/react-syntax-highlighter_languages_refractor_sql.89c053ff.chunk.js",
-    "react-syntax-highlighter_languages_refractor_stylus.js": "/static/js/react-syntax-highlighter_languages_refractor_stylus.a79c9ddc.chunk.js",
-    "react-syntax-highlighter_languages_refractor_swift.js": "/static/js/react-syntax-highlighter_languages_refractor_swift.faead4c9.chunk.js",
-    "react-syntax-highlighter_languages_refractor_tap.js": "/static/js/react-syntax-highlighter_languages_refractor_tap.bc5a8c5a.chunk.js",
-    "react-syntax-highlighter_languages_refractor_tcl.js": "/static/js/react-syntax-highlighter_languages_refractor_tcl.7e059615.chunk.js",
-    "react-syntax-highlighter_languages_refractor_textile.js": "/static/js/react-syntax-highlighter_languages_refractor_textile.6f64cc8d.chunk.js",
-    "react-syntax-highlighter_languages_refractor_tsx.js": "/static/js/react-syntax-highlighter_languages_refractor_tsx.f19bbd7d.chunk.js",
-    "react-syntax-highlighter_languages_refractor_tt2.js": "/static/js/react-syntax-highlighter_languages_refractor_tt2.727e6998.chunk.js",
-    "react-syntax-highlighter_languages_refractor_twig.js": "/static/js/react-syntax-highlighter_languages_refractor_twig.52555923.chunk.js",
-    "react-syntax-highlighter_languages_refractor_typescript.js": "/static/js/react-syntax-highlighter_languages_refractor_typescript.1e43ccca.chunk.js",
-    "react-syntax-highlighter_languages_refractor_vbnet.js": "/static/js/react-syntax-highlighter_languages_refractor_vbnet.e194f46b.chunk.js",
-    "react-syntax-highlighter_languages_refractor_velocity.js": "/static/js/react-syntax-highlighter_languages_refractor_velocity.c9c0d831.chunk.js",
-    "react-syntax-highlighter_languages_refractor_verilog.js": "/static/js/react-syntax-highlighter_languages_refractor_verilog.1f143e31.chunk.js",
-    "react-syntax-highlighter_languages_refractor_vhdl.js": "/static/js/react-syntax-highlighter_languages_refractor_vhdl.7fce499e.chunk.js",
-    "react-syntax-highlighter_languages_refractor_vim.js": "/static/js/react-syntax-highlighter_languages_refractor_vim.3cc3c1f3.chunk.js",
-    "react-syntax-highlighter_languages_refractor_visualBasic.js": "/static/js/react-syntax-highlighter_languages_refractor_visualBasic.95eb1e6f.chunk.js",
-    "react-syntax-highlighter_languages_refractor_wasm.js": "/static/js/react-syntax-highlighter_languages_refractor_wasm.aca82620.chunk.js",
-    "react-syntax-highlighter_languages_refractor_wiki.js": "/static/js/react-syntax-highlighter_languages_refractor_wiki.690b53c9.chunk.js",
-    "react-syntax-highlighter_languages_refractor_xeora.js": "/static/js/react-syntax-highlighter_languages_refractor_xeora.015e851f.chunk.js",
-    "react-syntax-highlighter_languages_refractor_xojo.js": "/static/js/react-syntax-highlighter_languages_refractor_xojo.3f80e9dd.chunk.js",
-    "react-syntax-highlighter_languages_refractor_xquery.js": "/static/js/react-syntax-highlighter_languages_refractor_xquery.ddefaa46.chunk.js",
-    "react-syntax-highlighter_languages_refractor_yaml.js": "/static/js/react-syntax-highlighter_languages_refractor_yaml.53b33767.chunk.js",
-    "index.html": "/index.html",
-    "main.bee034d7.css.map": "/static/css/main.bee034d7.css.map",
-    "main.ef51a22b.js.map": "/static/js/main.ef51a22b.js.map",
-    "refractor-core-import.fbe2b446.chunk.js.map": "/static/js/react-syntax-highlighter/refractor-core-import.fbe2b446.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_abap.13c53f41.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_abap.13c53f41.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_actionscript.4a230d0d.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_actionscript.4a230d0d.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_ada.f6b082db.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_ada.f6b082db.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_apacheconf.87cc9496.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_apacheconf.87cc9496.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_apl.c32bd528.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_apl.c32bd528.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_applescript.6530c5d9.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_applescript.6530c5d9.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_arduino.8d96cdfd.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_arduino.8d96cdfd.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_arff.ff2f8cc1.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_arff.ff2f8cc1.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_asciidoc.5031b27d.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_asciidoc.5031b27d.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_asm6502.28923a14.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_asm6502.28923a14.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_aspnet.b560b14a.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_aspnet.b560b14a.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_autohotkey.73328029.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_autohotkey.73328029.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_autoit.f9c061a8.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_autoit.f9c061a8.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_bash.3323884e.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_bash.3323884e.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_basic.b0af9365.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_basic.b0af9365.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_batch.a992c1d2.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_batch.a992c1d2.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_bison.5c7408aa.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_bison.5c7408aa.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_brainfuck.b951d366.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_brainfuck.b951d366.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_bro.052728df.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_bro.052728df.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_c.736a00ec.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_c.736a00ec.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_clike.4a239c52.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_clike.4a239c52.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_clojure.f918c2a5.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_clojure.f918c2a5.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_coffeescript.9432e2d2.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_coffeescript.9432e2d2.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_cpp.8db4f9e6.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_cpp.8db4f9e6.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_crystal.e3e52b5a.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_crystal.e3e52b5a.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_csharp.6293ec4f.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_csharp.6293ec4f.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_csp.a2cca020.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_csp.a2cca020.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_cssExtras.c7fdbcc3.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_cssExtras.c7fdbcc3.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_css.90d460f4.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_css.90d460f4.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_d.d49d6cb6.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_d.d49d6cb6.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_dart.dafd672c.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_dart.dafd672c.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_diff.ced67d7c.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_diff.ced67d7c.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_django.be253f7b.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_django.be253f7b.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_docker.08cb92b3.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_docker.08cb92b3.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_eiffel.42d7b123.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_eiffel.42d7b123.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_elixir.78531210.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_elixir.78531210.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_elm.363884d0.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_elm.363884d0.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_erb.a9a5ff1b.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_erb.a9a5ff1b.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_erlang.dca692c0.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_erlang.dca692c0.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_flow.f35a2233.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_flow.f35a2233.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_fortran.3ce57c79.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_fortran.3ce57c79.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_fsharp.d4ee2e12.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_fsharp.d4ee2e12.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_gedcom.ae6fd14d.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_gedcom.ae6fd14d.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_gherkin.2cd5c568.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_gherkin.2cd5c568.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_git.c07d30b3.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_git.c07d30b3.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_glsl.0562056d.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_glsl.0562056d.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_go.0c52feb8.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_go.0c52feb8.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_graphql.05c067cc.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_graphql.05c067cc.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_groovy.89603ec6.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_groovy.89603ec6.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_haml.aa041704.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_haml.aa041704.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_handlebars.70ecf101.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_handlebars.70ecf101.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_haskell.b988205b.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_haskell.b988205b.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_haxe.72b6162f.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_haxe.72b6162f.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_hpkp.827724e2.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_hpkp.827724e2.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_hsts.ad5af869.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_hsts.ad5af869.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_http.97208503.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_http.97208503.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_ichigojam.06f59a25.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_ichigojam.06f59a25.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_icon.b62cbf67.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_icon.b62cbf67.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_inform7.310dec86.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_inform7.310dec86.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_ini.ecff4839.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_ini.ecff4839.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_io.08b9ad12.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_io.08b9ad12.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_j.66c5b318.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_j.66c5b318.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_java.1d512f25.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_java.1d512f25.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_javascript.b076003a.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_javascript.b076003a.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_jolie.1eb41744.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_jolie.1eb41744.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_json.d0e0d149.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_json.d0e0d149.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_jsx.64e691a4.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_jsx.64e691a4.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_julia.107695e4.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_julia.107695e4.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_keyman.a7529543.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_keyman.a7529543.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_kotlin.d621fb36.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_kotlin.d621fb36.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_latex.7398b08a.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_latex.7398b08a.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_less.7c26b85a.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_less.7c26b85a.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_liquid.c1a66e62.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_liquid.c1a66e62.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_lisp.22650fad.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_lisp.22650fad.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_livescript.bccc3045.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_livescript.bccc3045.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_lolcode.44dff15c.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_lolcode.44dff15c.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_lua.49e61a10.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_lua.49e61a10.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_makefile.733b320a.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_makefile.733b320a.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_markdown.e4b0e3b5.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_markdown.e4b0e3b5.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_markupTemplating.0b9edf85.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_markupTemplating.0b9edf85.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_markup.016c9759.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_markup.016c9759.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_matlab.03231ebd.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_matlab.03231ebd.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_mel.67b95ed6.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_mel.67b95ed6.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_mizar.fef17116.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_mizar.fef17116.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_monkey.cc1f6764.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_monkey.cc1f6764.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_n4js.fd1334d3.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_n4js.fd1334d3.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_nasm.978d1bad.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_nasm.978d1bad.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_nginx.a3e3bd3d.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_nginx.a3e3bd3d.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_nim.3b76c224.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_nim.3b76c224.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_nix.17d23a7e.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_nix.17d23a7e.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_nsis.5dc7cd10.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_nsis.5dc7cd10.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_objectivec.2968546a.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_objectivec.2968546a.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_ocaml.85ceb055.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_ocaml.85ceb055.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_opencl.9670007d.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_opencl.9670007d.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_oz.1981f58f.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_oz.1981f58f.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_parigp.ea2a4c89.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_parigp.ea2a4c89.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_parser.a1b9a518.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_parser.a1b9a518.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_pascal.923a8e26.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_pascal.923a8e26.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_perl.d32bd6af.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_perl.d32bd6af.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_phpExtras.58a3dcd4.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_phpExtras.58a3dcd4.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_php.99d73a94.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_php.99d73a94.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_plsql.76bd98d9.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_plsql.76bd98d9.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_powershell.53d049f6.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_powershell.53d049f6.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_processing.39bf5952.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_processing.39bf5952.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_prolog.97dd9798.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_prolog.97dd9798.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_properties.08274940.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_properties.08274940.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_protobuf.97386f11.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_protobuf.97386f11.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_pug.14fcf04d.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_pug.14fcf04d.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_puppet.6d16babe.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_puppet.6d16babe.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_pure.edc60c7b.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_pure.edc60c7b.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_python.f564982e.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_python.f564982e.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_q.bc978093.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_q.bc978093.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_qore.e14166e4.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_qore.e14166e4.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_r.7299ad64.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_r.7299ad64.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_reason.adeb6afb.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_reason.adeb6afb.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_renpy.08c99dd6.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_renpy.08c99dd6.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_rest.192bf9b2.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_rest.192bf9b2.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_rip.8741b549.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_rip.8741b549.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_roboconf.5aac10b7.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_roboconf.5aac10b7.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_ruby.f8213093.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_ruby.f8213093.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_rust.3e5b051a.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_rust.3e5b051a.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_sas.2a083a5a.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_sas.2a083a5a.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_sass.99a228d7.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_sass.99a228d7.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_scala.dc091533.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_scala.dc091533.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_scheme.b6ba1630.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_scheme.b6ba1630.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_scss.e31bbaaf.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_scss.e31bbaaf.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_smalltalk.e6863ddb.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_smalltalk.e6863ddb.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_smarty.710429f9.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_smarty.710429f9.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_soy.5af2dacf.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_soy.5af2dacf.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_sql.89c053ff.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_sql.89c053ff.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_stylus.a79c9ddc.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_stylus.a79c9ddc.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_swift.faead4c9.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_swift.faead4c9.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_tap.bc5a8c5a.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_tap.bc5a8c5a.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_tcl.7e059615.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_tcl.7e059615.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_textile.6f64cc8d.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_textile.6f64cc8d.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_tsx.f19bbd7d.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_tsx.f19bbd7d.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_tt2.727e6998.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_tt2.727e6998.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_twig.52555923.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_twig.52555923.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_typescript.1e43ccca.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_typescript.1e43ccca.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_vbnet.e194f46b.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_vbnet.e194f46b.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_velocity.c9c0d831.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_velocity.c9c0d831.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_verilog.1f143e31.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_verilog.1f143e31.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_vhdl.7fce499e.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_vhdl.7fce499e.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_vim.3cc3c1f3.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_vim.3cc3c1f3.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_visualBasic.95eb1e6f.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_visualBasic.95eb1e6f.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_wasm.aca82620.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_wasm.aca82620.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_wiki.690b53c9.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_wiki.690b53c9.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_xeora.015e851f.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_xeora.015e851f.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_xojo.3f80e9dd.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_xojo.3f80e9dd.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_xquery.ddefaa46.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_xquery.ddefaa46.chunk.js.map",
-    "react-syntax-highlighter_languages_refractor_yaml.53b33767.chunk.js.map": "/static/js/react-syntax-highlighter_languages_refractor_yaml.53b33767.chunk.js.map"
-  },
-  "entrypoints": [
-    "static/css/main.bee034d7.css",
-    "static/js/main.ef51a22b.js"
-  ]
-}
\ No newline at end of file
diff --git a/frontend/exporter/json-visualizer/build/index.html b/frontend/exporter/json-visualizer/build/index.html
deleted file mode 100644
index 40b33ff3d..000000000
--- a/frontend/exporter/json-visualizer/build/index.html
+++ /dev/null
@@ -1 +0,0 @@
-React App
\ No newline at end of file diff --git a/frontend/exporter/json-visualizer/build/static/css/main.bee034d7.css b/frontend/exporter/json-visualizer/build/static/css/main.bee034d7.css deleted file mode 100644 index 15f11fafb..000000000 --- a/frontend/exporter/json-visualizer/build/static/css/main.bee034d7.css +++ /dev/null @@ -1,2 +0,0 @@ -.user-selection *{-webkit-user-select:text;user-select:text} -/*# sourceMappingURL=main.bee034d7.css.map*/ \ No newline at end of file diff --git a/frontend/exporter/json-visualizer/build/static/css/main.bee034d7.css.map b/frontend/exporter/json-visualizer/build/static/css/main.bee034d7.css.map deleted file mode 100644 index fb23b0dc4..000000000 --- a/frontend/exporter/json-visualizer/build/static/css/main.bee034d7.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"static/css/main.bee034d7.css","mappings":"AAAA,kBACI,wBAAiB,CAAjB,gBACJ","sources":["index.css"],"sourcesContent":[".user-selection * {\n user-select: text;\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/frontend/exporter/json-visualizer/build/static/js/.tmpc7UsJI b/frontend/exporter/json-visualizer/build/static/js/.tmpc7UsJI deleted file mode 100644 index 8b0810cf0..000000000 Binary files a/frontend/exporter/json-visualizer/build/static/js/.tmpc7UsJI and /dev/null differ diff --git a/frontend/exporter/json-visualizer/build/static/js/main.ef51a22b.js b/frontend/exporter/json-visualizer/build/static/js/main.ef51a22b.js deleted file mode 100644 index d116ecd1f..000000000 --- a/frontend/exporter/json-visualizer/build/static/js/main.ef51a22b.js +++ /dev/null @@ -1,3 +0,0 @@ -/*! For license information please see main.ef51a22b.js.LICENSE.txt */ -!function(){var e={6998:function(e,t,n){"use strict";var r=n(2458),a={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,t){var n,o,i,l,u,c,s=!1;t||(t={}),n=t.debug||!1;try{if(i=r(),l=document.createRange(),u=document.getSelection(),(c=document.createElement("span")).textContent=e,c.ariaHidden="true",c.style.all="unset",c.style.position="fixed",c.style.top=0,c.style.clip="rect(0, 0, 0, 0)",c.style.whiteSpace="pre",c.style.webkitUserSelect="text",c.style.MozUserSelect="text",c.style.msUserSelect="text",c.style.userSelect="text",c.addEventListener("copy",(function(r){if(r.stopPropagation(),t.format)if(r.preventDefault(),"undefined"===typeof r.clipboardData){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var o=a[t.format]||a.default;window.clipboardData.setData(o,e)}else r.clipboardData.clearData(),r.clipboardData.setData(t.format,e);t.onCopy&&(r.preventDefault(),t.onCopy(r.clipboardData))})),document.body.appendChild(c),l.selectNodeContents(c),u.addRange(l),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");s=!0}catch(f){n&&console.error("unable to copy using execCommand: ",f),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),s=!0}catch(f){n&&console.error("unable to copy using clipboardData: ",f),n&&console.error("falling back to prompt"),o=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(o,e)}}finally{u&&("function"==typeof u.removeRange?u.removeRange(l):u.removeAllRanges()),c&&document.body.removeChild(c),i()}return s}},5415:function(e,t,n){"use strict";var r=n(5618);function a(){this._key="chai/deep-eql__"+Math.random()+Date.now()}a.prototype={get:function(e){return e[this._key]},set:function(e,t){Object.isExtensible(e)&&Object.defineProperty(e,this._key,{value:t,configurable:!0})}};var o="function"===typeof WeakMap?WeakMap:a;function i(e,t,n){if(!n||y(e)||y(t))return null;var r=n.get(e);if(r){var a=r.get(t);if("boolean"===typeof a)return a}return null}function l(e,t,n,r){if(n&&!y(e)&&!y(t)){var a=n.get(e);a?a.set(t,r):((a=new o).set(t,r),n.set(e,a))}}function u(e,t,n){if(n&&n.comparator)return s(e,t,n);var r=c(e,t);return null!==r?r:s(e,t,n)}function c(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t||!y(e)&&!y(t)&&null}function s(e,t,n){(n=n||{}).memoize=!1!==n.memoize&&(n.memoize||new o);var a=n&&n.comparator,s=i(e,t,n.memoize);if(null!==s)return s;var y=i(t,e,n.memoize);if(null!==y)return y;if(a){var w=a(e,t);if(!1===w||!0===w)return l(e,t,n.memoize,w),w;var x=c(e,t);if(null!==x)return x}var S=r(e);if(S!==r(t))return l(e,t,n.memoize,!1),!1;l(e,t,n.memoize,!0);var k=function(e,t,n,r){switch(n){case"String":case"Number":case"Boolean":case"Date":return u(e.valueOf(),t.valueOf());case"Promise":case"Symbol":case"function":case"WeakMap":case"WeakSet":return e===t;case"Error":return v(e,t,["name","message","code"],r);case"Arguments":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"Array":return d(e,t,r);case"RegExp":return function(e,t){return e.toString()===t.toString()}(e,t);case"Generator":return function(e,t,n){return d(h(e),h(t),n)}(e,t,r);case"DataView":return d(new Uint8Array(e.buffer),new Uint8Array(t.buffer),r);case"ArrayBuffer":return d(new Uint8Array(e),new Uint8Array(t),r);case"Set":case"Map":return f(e,t,r);case"Temporal.PlainDate":case"Temporal.PlainTime":case"Temporal.PlainDateTime":case"Temporal.Instant":case"Temporal.ZonedDateTime":case"Temporal.PlainYearMonth":case"Temporal.PlainMonthDay":return e.equals(t);case"Temporal.Duration":return e.total("nanoseconds")===t.total("nanoseconds");case"Temporal.TimeZone":case"Temporal.Calendar":return e.toString()===t.toString();default:return function(e,t,n){var r=g(e),a=g(t),o=m(e),i=m(t);if(r=r.concat(o),a=a.concat(i),r.length&&r.length===a.length)return!1!==d(b(r).sort(),b(a).sort())&&v(e,t,r,n);var l=p(e),u=p(t);if(l.length&&l.length===u.length)return l.sort(),u.sort(),d(l,u,n);if(0===r.length&&0===l.length&&0===a.length&&0===u.length)return!0;return!1}(e,t,r)}}(e,t,S,n);return l(e,t,n.memoize,k),k}function f(e,t,n){if(e.size!==t.size)return!1;if(0===e.size)return!0;var r=[],a=[];return e.forEach((function(e,t){r.push([e,t])})),t.forEach((function(e,t){a.push([e,t])})),d(r.sort(),a.sort(),n)}function d(e,t,n){var r=e.length;if(r!==t.length)return!1;if(0===r)return!0;for(var a=-1;++a=0)return e[r];var a=n();return e.push(a),a}},2110:function(e,t,n){"use strict";var r=n(8309),a={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},l={};function u(e){return r.isMemo(e)?i:l[e.$$typeof]||a}l[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},l[r.Memo]=i;var c=Object.defineProperty,s=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(h){var a=p(n);a&&a!==h&&e(t,a,r)}var i=s(n);f&&(i=i.concat(f(n)));for(var l=u(t),g=u(n),m=0;m