diff --git a/.circleci/config.yml b/.circleci/config.yml
index 06e643bdd..3a8fd2ca4 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -4,7 +4,7 @@ parameters:
defaults: &defaults
resource_class: large
docker:
- - image: bepsays/ci-hugoreleaser:1.22400.20000
+ - image: bepsays/ci-hugoreleaser:1.22200.20201
environment: &buildenv
GOMODCACHE: /root/project/gomodcache
version: 2
@@ -14,7 +14,9 @@ jobs:
environment: &buildenv
GOMODCACHE: /root/project/gomodcache
steps:
- - setup_remote_docker
+ - &remote-docker
+ setup_remote_docker:
+ version: 20.10.14
- checkout:
path: hugo
- &git-config
@@ -58,7 +60,7 @@ jobs:
environment:
<<: [*buildenv]
docker:
- - image: bepsays/ci-hugoreleaser-linux-arm64:1.22400.20000
+ - image: bepsays/ci-hugoreleaser-linux-arm64:1.22200.20201
steps:
- *restore-cache
- &attach-workspace
diff --git a/.github/workflows/image.yml b/.github/workflows/image.yml
deleted file mode 100644
index c4f3c34c3..000000000
--- a/.github/workflows/image.yml
+++ /dev/null
@@ -1,49 +0,0 @@
-name: Build Docker image
-
-on:
- release:
- types: [published]
- pull_request:
-permissions:
- packages: write
-
-env:
- REGISTRY_IMAGE: ghcr.io/gohugoio/hugo
-
-jobs:
- build:
- runs-on: ubuntu-latest
-
- steps:
- - name: Checkout
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
-
- - name: Docker meta
- id: meta
- uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1
- with:
- images: ${{ env.REGISTRY_IMAGE }}
-
- - name: Set up Docker Buildx
- uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v3.6.1
-
- - name: Login to GHCR
- # Login is only needed when the image is pushed
- uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
- with:
- registry: ghcr.io
- username: ${{ github.repository_owner }}
- password: ${{ secrets.GITHUB_TOKEN }}
-
- - name: Build and push
- id: build
- uses: docker/build-push-action@16ebe778df0e7752d2cfcbd924afdbbd89c1a755 # v6.6.1
- with:
- context: .
- provenance: mode=max
- sbom: true
- push: ${{ github.event_name != 'pull_request' }}
- platforms: linux/amd64,linux/arm64
- tags: ${{ steps.meta.outputs.tags }}
- labels: ${{ steps.meta.outputs.labels }}
- build-args: HUGO_BUILD_TAGS=extended,withdeploy
\ No newline at end of file
diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml
index 249c1ab54..53b8adac4 100644
--- a/.github/workflows/stale.yml
+++ b/.github/workflows/stale.yml
@@ -12,7 +12,7 @@ jobs:
pull-requests: write
runs-on: ubuntu-latest
steps:
- - uses: dessant/lock-threads@7de207be1d3ce97a9abe6ff1306222982d1ca9f9 # v5.0.1
+ - uses: dessant/lock-threads@08e671be8ac8944d0e132aa71d0ae8ccfb347675
with:
issue-inactive-days: 21
add-issue-labels: 'Outdated'
@@ -24,7 +24,7 @@ jobs:
This pull request has been automatically locked since there
has not been any recent activity after it was closed.
Please open a new issue for related bugs.
- - uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9.0.0
+ - uses: actions/stale@04a1828bc18ada028d85a0252a47cd2963a91abe
with:
operations-per-run: 999
days-before-issue-stale: 365
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index c49c12371..734411b35 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -6,23 +6,23 @@ name: Test
env:
GOPROXY: https://proxy.golang.org
GO111MODULE: on
- SASS_VERSION: 1.80.3
- DART_SASS_SHA_LINUX: 7c933edbad0a7d389192c5b79393485c088bd2c4398e32f5754c32af006a9ffd
- DART_SASS_SHA_MACOS: 79e060b0e131c3bb3c16926bafc371dc33feab122bfa8c01aa337a072097967b
- DART_SASS_SHA_WINDOWS: 0bc4708b37cd1bac4740e83ac5e3176e66b774f77fd5dd364da5b5cfc9bfb469
+ SASS_VERSION: 1.63.2
+ DART_SASS_SHA_LINUX: 3ea33c95ad5c35fda6e9a0956199eef38a398f496cfb8750e02479d7d1dd42af
+ DART_SASS_SHA_MACOS: 11c70f259836b250b44a9cb57fed70e030f21f45069b467d371685855f1eb4f0
+ DART_SASS_SHA_WINDOWS: cd8cd36a619dd8e27f93d3186c52d70eb7d69472aa6c85f5094b29693e773f64
permissions:
contents: read
jobs:
test:
strategy:
matrix:
- go-version: [1.23.x, 1.24.x]
- os: [ubuntu-latest, windows-latest] # macos disabled for now because of disk space issues.
+ go-version: [1.21.x, 1.22.x]
+ os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- if: matrix.os == 'ubuntu-latest'
name: Free Disk Space (Ubuntu)
- uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
+ uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be
with:
# this might remove tools that are actually needed,
# if set to "true" but frees about 6 GB
@@ -34,9 +34,9 @@ jobs:
docker-images: true
swap-storage: true
- name: Checkout code
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
+ uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: Install Go
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
+ uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491
with:
go-version: ${{ matrix.go-version }}
check-latest: true
@@ -45,18 +45,18 @@ jobs:
**/go.sum
**/go.mod
- name: Install Ruby
- uses: ruby/setup-ruby@a6e6f86333f0a2523ece813039b8b4be04560854 # v1.190.0
+ uses: ruby/setup-ruby@5f19ec79cedfadb78ab837f95b87734d0003c899
with:
ruby-version: "2.7"
bundler-cache: true #
- name: Install Python
- uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1
+ uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d
with:
python-version: "3.x"
- name: Install Mage
run: go install github.com/magefile/mage@v1.15.0
- name: Install asciidoctor
- uses: reitzig/actions-asciidoctor@c642db5eedd1d729bb8c92034770d0b2f769eda6 # v2.0.2
+ uses: reitzig/actions-asciidoctor@03fcc74cd74880b697950c4930c9ec8a67c69ecc
- name: Install docutils
run: |
pip install docutils
@@ -112,17 +112,17 @@ jobs:
sass --version;
mage -v check;
env:
- HUGO_BUILD_TAGS: extended,withdeploy
+ HUGO_BUILD_TAGS: extended
- if: matrix.os == 'windows-latest'
# See issue #11052. We limit the build to regular test (no -race flag) on Windows for now.
name: Test
run: |
mage -v test;
env:
- HUGO_BUILD_TAGS: extended,withdeploy
+ HUGO_BUILD_TAGS: extended
- name: Build tags
run: |
- go install -tags extended
+ go install -tags extended,nodeploy
- if: matrix.os == 'ubuntu-latest'
name: Build for dragonfly
run: |
diff --git a/.gitignore b/.gitignore
index ddad69611..b170fe204 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,3 @@
*.test
-imports.*
-dist/
-public/
-.DS_Store
\ No newline at end of file
+imports.*
\ No newline at end of file
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index ddd3efcf2..1b5666963 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,4 +1,4 @@
->**Note:** We would appreciate if you hold on with any big refactoring (like renaming deprecated Go packages), mainly because of potential for extra merge work for future coming in in the near future.
+>**Note:** We would apprecitate if you hold on with any big refactorings (like renaming deprecated Go packages), mainly because of potential for extra merge work for future coming in in the near future.
# Contributing to Hugo
@@ -93,7 +93,6 @@ Most title/subjects should have a lower-cased prefix with a colon and one whites
* If this commit touches many packages without a common functional topic, prefix with `all:` (e.g. `all: Reformat Go code`)
* If this is a documentation update, prefix with `docs:`.
* If nothing of the above applies, just leave the prefix out.
-* Note that the above excludes nouns seen in other repositories, e.g. "chore:".
Also, if your commit references one or more GitHub issues, always end your commit message body with *See #1234* or *Fixes #1234*.
Replace *1234* with the GitHub issue ID. The last example will close the issue when the commit is merged into *master*.
diff --git a/Dockerfile b/Dockerfile
index a0e34353f..cc41d0ca1 100755
--- a/Dockerfile
+++ b/Dockerfile
@@ -2,98 +2,44 @@
# Twitter: https://twitter.com/gohugoio
# Website: https://gohugo.io/
-ARG GO_VERSION="1.24"
-ARG ALPINE_VERSION="3.22"
-ARG DART_SASS_VERSION="1.79.3"
+FROM golang:1.21-alpine AS build
-FROM --platform=$BUILDPLATFORM tonistiigi/xx:1.5.0 AS xx
-FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS gobuild
-FROM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS gorun
+# Optionally set HUGO_BUILD_TAGS to "extended" or "nodeploy" when building like so:
+# docker build --build-arg HUGO_BUILD_TAGS=extended .
+ARG HUGO_BUILD_TAGS
-
-FROM gobuild AS build
-
-RUN apk add clang lld
-
-# Set up cross-compilation helpers
-COPY --from=xx / /
-
-ARG TARGETPLATFORM
-RUN xx-apk add musl-dev gcc g++
-
-# Optionally set HUGO_BUILD_TAGS to "none" or "withdeploy" when building like so:
-# docker build --build-arg HUGO_BUILD_TAGS=withdeploy .
-#
-# We build the extended version by default.
-ARG HUGO_BUILD_TAGS="extended"
-ENV CGO_ENABLED=1
-ENV GOPROXY=https://proxy.golang.org
-ENV GOCACHE=/root/.cache/go-build
-ENV GOMODCACHE=/go/pkg/mod
-ARG TARGETPLATFORM
+ARG CGO=1
+ENV CGO_ENABLED=${CGO}
+ENV GOOS=linux
+ENV GO111MODULE=on
WORKDIR /go/src/github.com/gohugoio/hugo
-# For --mount=type=cache the value of target is the default cache id, so
-# for the go mod cache it would be good if we could share it with other Go images using the same setup,
-# but the go build cache needs to be per platform.
-# See this comment: https://github.com/moby/buildkit/issues/1706#issuecomment-702238282
-RUN --mount=target=. \
- --mount=type=cache,target=/go/pkg/mod \
- --mount=type=cache,target=/root/.cache/go-build,id=go-build-$TARGETPLATFORM <
## Installation @@ -100,11 +76,15 @@ Install Hugo from a [prebuilt binary], package manager, or package repository. P ## Build from source +Hugo is available in two editions: standard and extended. With the extended edition you can: + +- Encode to the WebP format when processing images. You can decode WebP images with either edition. +- Transpile Sass to CSS using the embedded LibSass transpiler. The extended edition is not required to use the Dart Sass transpiler. + Prerequisites to build Hugo from source: -- Standard edition: Go 1.23.0 or later -- Extended edition: Go 1.23.0 or later, and GCC -- Extended/deploy edition: Go 1.23.0 or later, and GCC +- Standard edition: Go 1.20 or later +- Extended edition: Go 1.20 or later, and GCC Build the standard edition: @@ -118,16 +98,6 @@ Build the extended edition: CGO_ENABLED=1 go install -tags extended github.com/gohugoio/hugo@latest ``` -Build the extended/deploy edition: - -```text -CGO_ENABLED=1 go install -tags extended,withdeploy github.com/gohugoio/hugo@latest -``` - -## Star History - -[](https://star-history.com/#gohugoio/hugo&Timeline) - ## Documentation Hugo's [documentation] includes installation instructions, a quick start guide, conceptual explanations, reference information, and examples. @@ -170,113 +140,152 @@ Hugo stands on the shoulders of great open source libraries. Run `hugo env --log
Jquery is working
'); +// diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/assets/js/menutoggle.js b/docs/_vendor/github.com/gohugoio/gohugoioTheme/assets/js/menutoggle.js new file mode 100644 index 000000000..40bda0ce9 --- /dev/null +++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/assets/js/menutoggle.js @@ -0,0 +1,31 @@ +// Grab any element that has the 'js-toggle' class and add an event listener for the toggleClass function +var toggleBtns = document.getElementsByClassName('js-toggle') + for (var i = 0; i < toggleBtns.length; i++) { + toggleBtns[i].addEventListener('click', toggleClass, false) + } + +function toggleClass() { + // Define the data target via the dataset "target" (e.g. data-target=".docsmenu") + var content = this.dataset.target.split(' ') + // Find any menu items that are open + var mobileCurrentlyOpen = document.querySelector('.mobilemenu:not(.dn)') + var desktopCurrentlyOpen = document.querySelector('.desktopmenu:not(.dn)') + var desktopActive = document.querySelector('.desktopmenu:not(.dn)') + + // Loop through the targets' divs + for (var i = 0; i < content.length; i++) { + var matches = document.querySelectorAll(content[i]); + //for each, if the div has the 'dn' class (which is "display:none;"), remove it, otherwise, add that class + [].forEach.call(matches, function(dom) { + dom.classList.contains('dn') ? + dom.classList.remove('dn') : + dom.classList.add('dn'); + return false; + }); + // close the currently open menu items + if (mobileCurrentlyOpen) mobileCurrentlyOpen.classList.add('dn') + if (desktopCurrentlyOpen) desktopCurrentlyOpen.classList.add('dn') + if (desktopActive) desktopActive.classList.remove('db') + + } + } diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/assets/js/nojs.js b/docs/_vendor/github.com/gohugoio/gohugoioTheme/assets/js/nojs.js new file mode 100644 index 000000000..50b5126a9 --- /dev/null +++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/assets/js/nojs.js @@ -0,0 +1 @@ +document.documentElement.className = document.documentElement.className.replace(/\bno-js\b/, 'js'); diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/assets/js/scrolldir.js b/docs/_vendor/github.com/gohugoio/gohugoioTheme/assets/js/scrolldir.js new file mode 100644 index 000000000..0b69978cd --- /dev/null +++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/assets/js/scrolldir.js @@ -0,0 +1 @@ +var scrollDir = require('scrolldir/dist/scrolldir.auto.min.js'); diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/assets/js/smoothscroll.js b/docs/_vendor/github.com/gohugoio/gohugoioTheme/assets/js/smoothscroll.js new file mode 100644 index 000000000..4bb2d99b8 --- /dev/null +++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/assets/js/smoothscroll.js @@ -0,0 +1,80 @@ +// query selector targets Hugo TOC +(function() { + + 'use strict'; + + // Feature Test + if ('querySelector' in document && 'addEventListener' in window && Array.prototype.forEach) { + + // Function to animate the scroll + var smoothScroll = function(anchor, duration) { + + // Calculate how far and how fast to scroll + var startLocation = window.pageYOffset; + var endLocation = anchor.offsetTop; + var distance = endLocation - startLocation; + var increments = distance / (duration / 16); + var stopAnimation; + + // Scroll the page by an increment, and check if it's time to stop + var animateScroll = function() { + window.scrollBy(0, increments); + stopAnimation(); + }; + + // If scrolling down + if (increments >= 0) { + // Stop animation when you reach the anchor OR the bottom of the page + stopAnimation = function() { + var travelled = window.pageYOffset; + if ((travelled >= (endLocation - increments)) || ((window.innerHeight + travelled) >= document.body.offsetHeight)) { + clearInterval(runAnimation); + } + }; + } + // If scrolling up + else { + // Stop animation when you reach the anchor OR the top of the page + stopAnimation = function() { + var travelled = window.pageYOffset; + if (travelled <= (endLocation || 0)) { + clearInterval(runAnimation); + } + }; + } + + // Loop the animation function + var runAnimation = setInterval(animateScroll, 16); + + }; + + // Define smooth scroll links + var scrollToggle = document.querySelectorAll('#TableOfContents ul li a'); + + // For each smooth scroll link + [].forEach.call(scrollToggle, function(toggle) { + + // When the smooth scroll link is clicked + toggle.addEventListener('click', function(e) { + + // Prevent the default link behavior + e.preventDefault(); + + // Get anchor link and calculate distance from the top + var dataID = toggle.getAttribute('href'); + var dataTarget = document.querySelector(dataID); + var dataSpeed = toggle.getAttribute('data-speed'); + + // If the anchor exists + if (dataTarget) { + // Scroll to the anchor + smoothScroll(dataTarget, dataSpeed || 500); + } + + }, false); + + }); + + } + +})(); diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/assets/js/tabs.js b/docs/_vendor/github.com/gohugoio/gohugoioTheme/assets/js/tabs.js new file mode 100644 index 000000000..a689d474e --- /dev/null +++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/assets/js/tabs.js @@ -0,0 +1,43 @@ +/** + * Scripts which manages Code Toggle tabs. + */ +var i; +// store tabs variable +var allTabs = document.querySelectorAll("[data-toggle-tab]"); +var allPanes = document.querySelectorAll("[data-pane]"); + +function toggleTabs(event) { + + if(event.target){ + event.preventDefault(); + var clickedTab = event.currentTarget; + var targetKey = clickedTab.getAttribute("data-toggle-tab") + }else { + var targetKey = event + } + // We store the config language selected in users' localStorage + if(window.localStorage){ + window.localStorage.setItem("configLangPref", targetKey) + } + var selectedTabs = document.querySelectorAll("[data-toggle-tab='" + targetKey + "']"); + var selectedPanes = document.querySelectorAll("[data-pane='" + targetKey + "']"); + + for (var i = 0; i < allTabs.length; i++) { + allTabs[i].classList.remove("active"); + allPanes[i].classList.remove("active"); + } + + for (var i = 0; i < selectedTabs.length; i++) { + selectedTabs[i].classList.add("active"); + selectedPanes[i].classList.add("active"); + } + +} + +for (i = 0; i < allTabs.length; i++) { + allTabs[i].addEventListener("click", toggleTabs) +} +// Upon page load, if user has a preferred language in its localStorage, tabs are set to it. +if(window.localStorage.getItem('configLangPref')) { + toggleTabs(window.localStorage.getItem('configLangPref')) +} diff --git a/docs/assets/opengraph/gohugoio-card-base-1.png b/docs/_vendor/github.com/gohugoio/gohugoioTheme/assets/opengraph/gohugoio-card-base-1.png similarity index 100% rename from docs/assets/opengraph/gohugoio-card-base-1.png rename to docs/_vendor/github.com/gohugoio/gohugoioTheme/assets/opengraph/gohugoio-card-base-1.png diff --git a/docs/assets/opengraph/mulish-black.ttf b/docs/_vendor/github.com/gohugoio/gohugoioTheme/assets/opengraph/mulish-black.ttf similarity index 100% rename from docs/assets/opengraph/mulish-black.ttf rename to docs/_vendor/github.com/gohugoio/gohugoioTheme/assets/opengraph/mulish-black.ttf diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/assets/output/css/app.css b/docs/_vendor/github.com/gohugoio/gohugoioTheme/assets/output/css/app.css new file mode 100644 index 000000000..5e0b0c708 --- /dev/null +++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/assets/output/css/app.css @@ -0,0 +1,5350 @@ +/* muli-200normal - latin */ +@font-face { + font-family: 'Muli'; + font-style: normal; + font-display: swap; + font-weight: 200; + src: + local('Muli Extra Light '), + local('Muli-Extra Light'), + url(/fonts/muli-latin-200.woff2) format('woff2'), + url(/fonts/muli-latin-200.woff) format('woff'); /* Modern Browsers */ +} +/* muli-200italic - latin */ +@font-face { + font-family: 'Muli'; + font-style: italic; + font-display: swap; + font-weight: 200; + src: + local('Muli Extra Light italic'), + local('Muli-Extra Lightitalic'), + url(/fonts/muli-latin-200italic.woff2) format('woff2'), + url(/fonts/muli-latin-200italic.woff) format('woff'); /* Modern Browsers */ +} +/* muli-300normal - latin */ +@font-face { + font-family: 'Muli'; + font-style: normal; + font-display: swap; + font-weight: 300; + src: + local('Muli Light '), + local('Muli-Light'), + url(/fonts/muli-latin-300.woff2) format('woff2'), + url(/fonts/muli-latin-300.woff) format('woff'); /* Modern Browsers */ +} +/* muli-300italic - latin */ +@font-face { + font-family: 'Muli'; + font-style: italic; + font-display: swap; + font-weight: 300; + src: + local('Muli Light italic'), + local('Muli-Lightitalic'), + url(/fonts/muli-latin-300italic.woff2) format('woff2'), + url(/fonts/muli-latin-300italic.woff) format('woff'); /* Modern Browsers */ +} +/* muli-400normal - latin */ +@font-face { + font-family: 'Muli'; + font-style: normal; + font-display: swap; + font-weight: 400; + src: + local('Muli Regular '), + local('Muli-Regular'), + url(/fonts/muli-latin-400.woff2) format('woff2'), + url(/fonts/muli-latin-400.woff) format('woff'); /* Modern Browsers */ +} +/* muli-400italic - latin */ +@font-face { + font-family: 'Muli'; + font-style: italic; + font-display: swap; + font-weight: 400; + src: + local('Muli Regular italic'), + local('Muli-Regularitalic'), + url(/fonts/muli-latin-400italic.woff2) format('woff2'), + url(/fonts/muli-latin-400italic.woff) format('woff'); /* Modern Browsers */ +} +/* muli-600normal - latin */ +@font-face { + font-family: 'Muli'; + font-style: normal; + font-display: swap; + font-weight: 600; + src: + local('Muli SemiBold '), + local('Muli-SemiBold'), + url(/fonts/muli-latin-600.woff2) format('woff2'), + url(/fonts/muli-latin-600.woff) format('woff'); /* Modern Browsers */ +} +/* muli-600italic - latin */ +@font-face { + font-family: 'Muli'; + font-style: italic; + font-display: swap; + font-weight: 600; + src: + local('Muli SemiBold italic'), + local('Muli-SemiBolditalic'), + url(/fonts/muli-latin-600italic.woff2) format('woff2'), + url(/fonts/muli-latin-600italic.woff) format('woff'); /* Modern Browsers */ +} +/* muli-700normal - latin */ +@font-face { + font-family: 'Muli'; + font-style: normal; + font-display: swap; + font-weight: 700; + src: + local('Muli Bold '), + local('Muli-Bold'), + url(/fonts/muli-latin-700.woff2) format('woff2'), + url(/fonts/muli-latin-700.woff) format('woff'); /* Modern Browsers */ +} +/* muli-700italic - latin */ +@font-face { + font-family: 'Muli'; + font-style: italic; + font-display: swap; + font-weight: 700; + src: + local('Muli Bold italic'), + local('Muli-Bolditalic'), + url(/fonts/muli-latin-700italic.woff2) format('woff2'), + url(/fonts/muli-latin-700italic.woff) format('woff'); /* Modern Browsers */ +} +/* muli-800normal - latin */ +@font-face { + font-family: 'Muli'; + font-style: normal; + font-display: swap; + font-weight: 800; + src: + local('Muli ExtraBold '), + local('Muli-ExtraBold'), + url(/fonts/muli-latin-800.woff2) format('woff2'), + url(/fonts/muli-latin-800.woff) format('woff'); /* Modern Browsers */ +} +/* muli-800italic - latin */ +@font-face { + font-family: 'Muli'; + font-style: italic; + font-display: swap; + font-weight: 800; + src: + local('Muli ExtraBold italic'), + local('Muli-ExtraBolditalic'), + url(/fonts/muli-latin-800italic.woff2) format('woff2'), + url(/fonts/muli-latin-800italic.woff) format('woff'); /* Modern Browsers */ +} +/* muli-900normal - latin */ +@font-face { + font-family: 'Muli'; + font-style: normal; + font-display: swap; + font-weight: 900; + src: + local('Muli Black '), + local('Muli-Black'), + url(/fonts/muli-latin-900.woff2) format('woff2'), + url(/fonts/muli-latin-900.woff) format('woff'); /* Modern Browsers */ +} +/* muli-900italic - latin */ +@font-face { + font-family: 'Muli'; + font-style: italic; + font-display: swap; + font-weight: 900; + src: + local('Muli Black italic'), + local('Muli-Blackitalic'), + url(/fonts/muli-latin-900italic.woff2) format('woff2'), + url(/fonts/muli-latin-900italic.woff) format('woff'); /* Modern Browsers */ +} + + +/*Base Styles*/ +/*! TACHYONS v4.7.0 | http://tachyons.io */ +/* + * NOTE: The Tachyons folder is for backup/reference only. This file references the module + * ________ ______ + * ___ __/_____ _________ /______ ______________________ + * __ / _ __ `/ ___/_ __ \_ / / / __ \_ __ \_ ___/ + * _ / / /_/ // /__ _ / / / /_/ // /_/ / / / /(__ ) + * /_/ \__,_/ \___/ /_/ /_/_\__, / \____//_/ /_//____/ + * /____/ + * + * TABLE OF CONTENTS + * + * 1. External Library Includes + * - Normalize.css | http://normalize.css.github.io + * 2. Tachyons Modules + * 3. Variables + * - Media Queries + * - Colors + * 4. Debugging + * - Debug all + * - Debug children + * + */ +/* External Library Includes */ +/*! normalize.css v8.0.0 | MIT License | github.com/necolas/normalize.css */ +/* Document + ========================================================================== */ +/** + * 1. Correct the line height in all browsers. + * 2. Prevent adjustments of font size after orientation changes in iOS. + */ +html { + line-height: 1.15; /* 1 */ + -webkit-text-size-adjust: 100%; /* 2 */ +} +/* Sections + ========================================================================== */ +/** + * Remove the margin in all browsers. + */ +body { + margin: 0; +} +/** + * Correct the font size and margin on `h1` elements within `section` and + * `article` contexts in Chrome, Firefox, and Safari. + */ +h1 { + font-size: 2em; + margin: 0.67em 0; +} +/* Grouping content + ========================================================================== */ +/** + * 1. Add the correct box sizing in Firefox. + * 2. Show the overflow in Edge and IE. + */ +hr { + -webkit-box-sizing: content-box; + box-sizing: content-box; /* 1 */ + height: 0; /* 1 */ + overflow: visible; /* 2 */ +} +/** + * 1. Correct the inheritance and scaling of font size in all browsers. + * 2. Correct the odd `em` font sizing in all browsers. + */ +pre { + font-family: monospace, monospace; /* 1 */ + font-size: 1em; /* 2 */ +} +/* Text-level semantics + ========================================================================== */ +/** + * Remove the gray background on active links in IE 10. + */ +a { + background-color: transparent; +} +/** + * 1. Remove the bottom border in Chrome 57- + * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. + */ +abbr[title] { + border-bottom: none; /* 1 */ + text-decoration: underline; /* 2 */ + -webkit-text-decoration: underline dotted; + text-decoration: underline dotted; /* 2 */ +} +/** + * Add the correct font weight in Chrome, Edge, and Safari. + */ +b, +strong { + font-weight: bolder; +} +/** + * 1. Correct the inheritance and scaling of font size in all browsers. + * 2. Correct the odd `em` font sizing in all browsers. + */ +code, +kbd, +samp { + font-family: monospace, monospace; /* 1 */ + font-size: 1em; /* 2 */ +} +/** + * Add the correct font size in all browsers. + */ +small { + font-size: 80%; +} +/** + * Prevent `sub` and `sup` elements from affecting the line height in + * all browsers. + */ +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} +sub { + bottom: -0.25em; +} +sup { + top: -0.5em; +} +/* Embedded content + ========================================================================== */ +/** + * Remove the border on images inside links in IE 10. + */ +img { + border-style: none; +} +/* Forms + ========================================================================== */ +/** + * 1. Change the font styles in all browsers. + * 2. Remove the margin in Firefox and Safari. + */ +button, +input, +optgroup, +select, +textarea { + font-family: inherit; /* 1 */ + font-size: 100%; /* 1 */ + line-height: 1.15; /* 1 */ + margin: 0; /* 2 */ +} +/** + * Show the overflow in IE. + * 1. Show the overflow in Edge. + */ +button, +input { /* 1 */ + overflow: visible; +} +/** + * Remove the inheritance of text transform in Edge, Firefox, and IE. + * 1. Remove the inheritance of text transform in Firefox. + */ +button, +select { /* 1 */ + text-transform: none; +} +/** + * Correct the inability to style clickable types in iOS and Safari. + */ +button, +[type="button"], +[type="reset"], +[type="submit"] { + -webkit-appearance: button; +} +/** + * Remove the inner border and padding in Firefox. + */ +button::-moz-focus-inner, +[type="button"]::-moz-focus-inner, +[type="reset"]::-moz-focus-inner, +[type="submit"]::-moz-focus-inner { + border-style: none; + padding: 0; +} +/** + * Restore the focus styles unset by the previous rule. + */ +button:-moz-focusring, +[type="button"]:-moz-focusring, +[type="reset"]:-moz-focusring, +[type="submit"]:-moz-focusring { + outline: 1px dotted ButtonText; +} +/** + * Correct the padding in Firefox. + */ +fieldset { + padding: 0.35em 0.75em 0.625em; +} +/** + * 1. Correct the text wrapping in Edge and IE. + * 2. Correct the color inheritance from `fieldset` elements in IE. + * 3. Remove the padding so developers are not caught out when they zero out + * `fieldset` elements in all browsers. + */ +legend { + -webkit-box-sizing: border-box; + box-sizing: border-box; /* 1 */ + color: inherit; /* 2 */ + display: table; /* 1 */ + max-width: 100%; /* 1 */ + padding: 0; /* 3 */ + white-space: normal; /* 1 */ +} +/** + * Add the correct vertical alignment in Chrome, Firefox, and Opera. + */ +progress { + vertical-align: baseline; +} +/** + * Remove the default vertical scrollbar in IE 10+. + */ +textarea { + overflow: auto; +} +/** + * 1. Add the correct box sizing in IE 10. + * 2. Remove the padding in IE 10. + */ +[type="checkbox"], +[type="radio"] { + -webkit-box-sizing: border-box; + box-sizing: border-box; /* 1 */ + padding: 0; /* 2 */ +} +/** + * Correct the cursor style of increment and decrement buttons in Chrome. + */ +[type="number"]::-webkit-inner-spin-button, +[type="number"]::-webkit-outer-spin-button { + height: auto; +} +/** + * 1. Correct the odd appearance in Chrome and Safari. + * 2. Correct the outline style in Safari. + */ +[type="search"] { + -webkit-appearance: textfield; /* 1 */ + outline-offset: -2px; /* 2 */ +} +/** + * Remove the inner padding in Chrome and Safari on macOS. + */ +[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} +/** + * 1. Correct the inability to style clickable types in iOS and Safari. + * 2. Change font properties to `inherit` in Safari. + */ +::-webkit-file-upload-button { + -webkit-appearance: button; /* 1 */ + font: inherit; /* 2 */ +} +/* Interactive + ========================================================================== */ +/* + * Add the correct display in Edge, IE 10+, and Firefox. + */ +details { + display: block; +} +/* + * Add the correct display in all browsers. + */ +summary { + display: list-item; +} +/* Misc + ========================================================================== */ +/** + * Add the correct display in IE 10+. + */ +template { + display: none; +} +/** + * Add the correct display in IE 10. + */ +[hidden] { + display: none; +} +/* Modules */ +/* + + BOX SIZING + +*/ +html, +body, +div, +article, +aside, +section, +main, +nav, +footer, +header, +form, +fieldset, +legend, +pre, +code, +a, +h1,h2,h3,h4,h5,h6, +p, +ul, +ol, +li, +dl, +dt, +dd, +blockquote, +figcaption, +figure, +textarea, +table, +td, +th, +tr, +input[type="email"], +input[type="number"], +input[type="password"], +input[type="tel"], +input[type="text"], +input[type="url"], +.border-box { + -webkit-box-sizing: border-box; + box-sizing: border-box; +} +/*@import 'tachyons/src/_aspect-ratios';*/ +/* + + IMAGES + Docs: http://tachyons.io/docs/elements/images/ + +*/ +/* Responsive images! */ +img { max-width: 100%; } +/* + + BACKGROUND SIZE + Docs: http://tachyons.io/docs/themes/background-size/ + + Media Query Extensions: + -ns = not-small + -m = medium + -l = large + +*/ +/* + Often used in combination with background image set as an inline style + on an html element. +*/ +.cover { background-size: cover!important; } +.contain { background-size: contain!important; } +@media screen and (min-width: 30em) { + .cover-ns { background-size: cover!important; } + .contain-ns { background-size: contain!important; } +} +@media screen and (min-width: 30em) and (max-width: 60em) { + .cover-m { background-size: cover!important; } + .contain-m { background-size: contain!important; } +} +@media screen and (min-width: 60em) { + .cover-l { background-size: cover!important; } + .contain-l { background-size: contain!important; } +} +/* + + BACKGROUND POSITION + + Base: + bg = background + + Modifiers: + -center = center center + -top = top center + -right = center right + -bottom = bottom center + -left = center left + + Media Query Extensions: + -ns = not-small + -m = medium + -l = large + + */ +.bg-center { + background-repeat: no-repeat; + background-position: center center; +} +.bg-top { + background-repeat: no-repeat; + background-position: top center; +} +.bg-right { + background-repeat: no-repeat; + background-position: center right; +} +.bg-bottom { + background-repeat: no-repeat; + background-position: bottom center; +} +.bg-left { + background-repeat: no-repeat; + background-position: center left; +} +@media screen and (min-width: 30em) { + .bg-center-ns { + background-repeat: no-repeat; + background-position: center center; + } + + .bg-top-ns { + background-repeat: no-repeat; + background-position: top center; + } + + .bg-right-ns { + background-repeat: no-repeat; + background-position: center right; + } + + .bg-bottom-ns { + background-repeat: no-repeat; + background-position: bottom center; + } + + .bg-left-ns { + background-repeat: no-repeat; + background-position: center left; + } +} +@media screen and (min-width: 30em) and (max-width: 60em) { + .bg-center-m { + background-repeat: no-repeat; + background-position: center center; + } + + .bg-top-m { + background-repeat: no-repeat; + background-position: top center; + } + + .bg-right-m { + background-repeat: no-repeat; + background-position: center right; + } + + .bg-bottom-m { + background-repeat: no-repeat; + background-position: bottom center; + } + + .bg-left-m { + background-repeat: no-repeat; + background-position: center left; + } +} +@media screen and (min-width: 60em) { + .bg-center-l { + background-repeat: no-repeat; + background-position: center center; + } + + .bg-top-l { + background-repeat: no-repeat; + background-position: top center; + } + + .bg-right-l { + background-repeat: no-repeat; + background-position: center right; + } + + .bg-bottom-l { + background-repeat: no-repeat; + background-position: bottom center; + } + + .bg-left-l { + background-repeat: no-repeat; + background-position: center left; + } +} +/*@import 'tachyons/src/_outlines';*/ +/* + + BORDERS + Docs: http://tachyons.io/docs/themes/borders/ + + Base: + b = border + + Modifiers: + a = all + t = top + r = right + b = bottom + l = left + n = none + + Media Query Extensions: + -ns = not-small + -m = medium + -l = large + +*/ +.ba { border-style: solid; border-width: 1px; } +.bt { border-top-style: solid; border-top-width: 1px; } +.br { border-right-style: solid; border-right-width: 1px; } +.bb { border-bottom-style: solid; border-bottom-width: 1px; } +.bl { border-left-style: solid; border-left-width: 1px; } +.bn { border-style: none; border-width: 0; } +@media screen and (min-width: 30em) { + .ba-ns { border-style: solid; border-width: 1px; } + .bt-ns { border-top-style: solid; border-top-width: 1px; } + .br-ns { border-right-style: solid; border-right-width: 1px; } + .bb-ns { border-bottom-style: solid; border-bottom-width: 1px; } + .bl-ns { border-left-style: solid; border-left-width: 1px; } + .bn-ns { border-style: none; border-width: 0; } +} +@media screen and (min-width: 30em) and (max-width: 60em) { + .ba-m { border-style: solid; border-width: 1px; } + .bt-m { border-top-style: solid; border-top-width: 1px; } + .br-m { border-right-style: solid; border-right-width: 1px; } + .bb-m { border-bottom-style: solid; border-bottom-width: 1px; } + .bl-m { border-left-style: solid; border-left-width: 1px; } + .bn-m { border-style: none; border-width: 0; } +} +@media screen and (min-width: 60em) { + .ba-l { border-style: solid; border-width: 1px; } + .bt-l { border-top-style: solid; border-top-width: 1px; } + .br-l { border-right-style: solid; border-right-width: 1px; } + .bb-l { border-bottom-style: solid; border-bottom-width: 1px; } + .bl-l { border-left-style: solid; border-left-width: 1px; } + .bn-l { border-style: none; border-width: 0; } +} +/* + + BORDER COLORS + Docs: http://tachyons.io/docs/themes/borders/ + + Border colors can be used to extend the base + border classes ba,bt,bb,br,bl found in the _borders.css file. + + The base border class by default will set the color of the border + to that of the current text color. These classes are for the cases + where you desire for the text and border colors to be different. + + Base: + b = border + + Modifiers: + --color-name = each color variable name is also a border color name + +*/ +.b--black { border-color: #000; } +.b--near-black { border-color: #111; } +.b--dark-gray { border-color: #333; } +.b--mid-gray { border-color: #555; } +.b--gray { border-color: #777; } +.b--silver { border-color: #999; } +.b--light-silver { border-color: #aaa; } +.b--moon-gray { border-color: #ccc; } +.b--light-gray { border-color: #eee; } +.b--near-white { border-color: #f4f4f4; } +.b--white { border-color: #fff; } +.b--white-90 { border-color: rgba(255, 255, 255, .9); } +.b--white-80 { border-color: rgba(255, 255, 255, .8); } +.b--white-70 { border-color: rgba(255, 255, 255, .7); } +.b--white-60 { border-color: rgba(255, 255, 255, .6); } +.b--white-50 { border-color: rgba(255, 255, 255, .5); } +.b--white-40 { border-color: rgba(255, 255, 255, .4); } +.b--white-30 { border-color: rgba(255, 255, 255, .3); } +.b--white-20 { border-color: rgba(255, 255, 255, .2); } +.b--white-10 { border-color: rgba(255, 255, 255, .1); } +.b--white-05 { border-color: rgba(255, 255, 255, .05); } +.b--white-025 { border-color: rgba(255, 255, 255, .025); } +.b--white-0125 { border-color: rgba(255, 255, 255, .0125); } +.b--black-90 { border-color: rgba(0, 0, 0, .9); } +.b--black-80 { border-color: rgba(0, 0, 0, .8); } +.b--black-70 { border-color: rgba(0, 0, 0, .7); } +.b--black-60 { border-color: rgba(0, 0, 0, .6); } +.b--black-50 { border-color: rgba(0, 0, 0, .5); } +.b--black-40 { border-color: rgba(0, 0, 0, .4); } +.b--black-30 { border-color: rgba(0, 0, 0, .3); } +.b--black-20 { border-color: rgba(0, 0, 0, .2); } +.b--black-10 { border-color: rgba(0, 0, 0, .1); } +.b--black-05 { border-color: rgba(0, 0, 0, .05); } +.b--black-025 { border-color: rgba(0, 0, 0, .025); } +.b--black-0125 { border-color: rgba(0, 0, 0, .0125); } +.b--dark-red { border-color: #e7040f; } +.b--red { border-color: #ff4136; } +.b--light-red { border-color: #ff725c; } +.b--orange { border-color: #ff6300; } +.b--gold { border-color: #ffb700; } +.b--yellow { border-color: #ffd700; } +.b--light-yellow { border-color: #fbf1a9; } +.b--purple { border-color: #5e2ca5; } +.b--light-purple { border-color: #a463f2; } +.b--dark-pink { border-color: #d5008f; } +.b--hot-pink { border-color: #ff41b4; } +.b--pink { border-color: #ff80cc; } +.b--light-pink { border-color: #ffa3d7; } +.b--dark-green { border-color: #137752; } +.b--green { border-color: #19a974; } +.b--light-green { border-color: #9eebcf; } +.b--navy { border-color: #001b44; } +.b--dark-blue { border-color: #00449e; } +.b--blue { border-color: #0594CB; } +.b--light-blue { border-color: #96ccff; } +.b--lightest-blue { border-color: #cdecff; } +.b--washed-blue { border-color: #f6fffe; } +.b--washed-green { border-color: #e8fdf5; } +.b--washed-yellow { border-color: #fffceb; } +.b--washed-red { border-color: #ffdfdf; } +.b--transparent { border-color: transparent; } +.b--inherit { border-color: inherit; } +/* + + BORDER RADIUS + Docs: http://tachyons.io/docs/themes/border-radius/ + + Base: + br = border-radius + + Modifiers: + 0 = 0/none + 1 = 1st step in scale + 2 = 2nd step in scale + 3 = 3rd step in scale + 4 = 4th step in scale + + Literal values: + -100 = 100% + -pill = 9999px + + Media Query Extensions: + -ns = not-small + -m = medium + -l = large + +*/ +.br0 { border-radius: 0; } +.br1 { border-radius: .125rem; } +.br2 { border-radius: .25rem; } +.br3 { border-radius: .5rem; } +.br4 { border-radius: 1rem; } +.br-100 { border-radius: 100%; } +.br-pill { border-radius: 9999px; } +.br--bottom { + border-top-left-radius: 0; + border-top-right-radius: 0; + } +.br--top { + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; + } +.br--right { + border-top-left-radius: 0; + border-bottom-left-radius: 0; + } +.br--left { + border-top-right-radius: 0; + border-bottom-right-radius: 0; + } +@media screen and (min-width: 30em) { + .br0-ns { border-radius: 0; } + .br1-ns { border-radius: .125rem; } + .br2-ns { border-radius: .25rem; } + .br3-ns { border-radius: .5rem; } + .br4-ns { border-radius: 1rem; } + .br-100-ns { border-radius: 100%; } + .br-pill-ns { border-radius: 9999px; } + .br--bottom-ns { + border-top-left-radius: 0; + border-top-right-radius: 0; + } + .br--top-ns { + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; + } + .br--right-ns { + border-top-left-radius: 0; + border-bottom-left-radius: 0; + } + .br--left-ns { + border-top-right-radius: 0; + border-bottom-right-radius: 0; + } +} +@media screen and (min-width: 30em) and (max-width: 60em) { + .br0-m { border-radius: 0; } + .br1-m { border-radius: .125rem; } + .br2-m { border-radius: .25rem; } + .br3-m { border-radius: .5rem; } + .br4-m { border-radius: 1rem; } + .br-100-m { border-radius: 100%; } + .br-pill-m { border-radius: 9999px; } + .br--bottom-m { + border-top-left-radius: 0; + border-top-right-radius: 0; + } + .br--top-m { + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; + } + .br--right-m { + border-top-left-radius: 0; + border-bottom-left-radius: 0; + } + .br--left-m { + border-top-right-radius: 0; + border-bottom-right-radius: 0; + } +} +@media screen and (min-width: 60em) { + .br0-l { border-radius: 0; } + .br1-l { border-radius: .125rem; } + .br2-l { border-radius: .25rem; } + .br3-l { border-radius: .5rem; } + .br4-l { border-radius: 1rem; } + .br-100-l { border-radius: 100%; } + .br-pill-l { border-radius: 9999px; } + .br--bottom-l { + border-top-left-radius: 0; + border-top-right-radius: 0; + } + .br--top-l { + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; + } + .br--right-l { + border-top-left-radius: 0; + border-bottom-left-radius: 0; + } + .br--left-l { + border-top-right-radius: 0; + border-bottom-right-radius: 0; + } +} +/* + + BORDER STYLES + Docs: http://tachyons.io/docs/themes/borders/ + + Depends on base border module in _borders.css + + Base: + b = border-style + + Modifiers: + --none = none + --dotted = dotted + --dashed = dashed + --solid = solid + + Media Query Extensions: + -ns = not-small + -m = medium + -l = large + + */ +.b--dotted { border-style: dotted; } +.b--dashed { border-style: dashed; } +.b--solid { border-style: solid; } +.b--none { border-style: none; } +@media screen and (min-width: 30em) { + .b--dotted-ns { border-style: dotted; } + .b--dashed-ns { border-style: dashed; } + .b--solid-ns { border-style: solid; } + .b--none-ns { border-style: none; } +} +@media screen and (min-width: 30em) and (max-width: 60em) { + .b--dotted-m { border-style: dotted; } + .b--dashed-m { border-style: dashed; } + .b--solid-m { border-style: solid; } + .b--none-m { border-style: none; } +} +@media screen and (min-width: 60em) { + .b--dotted-l { border-style: dotted; } + .b--dashed-l { border-style: dashed; } + .b--solid-l { border-style: solid; } + .b--none-l { border-style: none; } +} +/* + + BORDER WIDTHS + Docs: http://tachyons.io/docs/themes/borders/ + + Base: + bw = border-width + + Modifiers: + 0 = 0 width border + 1 = 1st step in border-width scale + 2 = 2nd step in border-width scale + 3 = 3rd step in border-width scale + 4 = 4th step in border-width scale + 5 = 5th step in border-width scale + + Media Query Extensions: + -ns = not-small + -m = medium + -l = large + +*/ +.bw0 { border-width: 0; } +.bw1 { border-width: .125rem; } +.bw2 { border-width: .25rem; } +.bw3 { border-width: .5rem; } +.bw4 { border-width: 1rem; } +.bw5 { border-width: 2rem; } +/* Resets */ +.bt-0 { border-top-width: 0; } +.br-0 { border-right-width: 0; } +.bb-0 { border-bottom-width: 0; } +.bl-0 { border-left-width: 0; } +@media screen and (min-width: 30em) { + .bw0-ns { border-width: 0; } + .bw1-ns { border-width: .125rem; } + .bw2-ns { border-width: .25rem; } + .bw3-ns { border-width: .5rem; } + .bw4-ns { border-width: 1rem; } + .bw5-ns { border-width: 2rem; } + .bt-0-ns { border-top-width: 0; } + .br-0-ns { border-right-width: 0; } + .bb-0-ns { border-bottom-width: 0; } + .bl-0-ns { border-left-width: 0; } +} +@media screen and (min-width: 30em) and (max-width: 60em) { + .bw0-m { border-width: 0; } + .bw1-m { border-width: .125rem; } + .bw2-m { border-width: .25rem; } + .bw3-m { border-width: .5rem; } + .bw4-m { border-width: 1rem; } + .bw5-m { border-width: 2rem; } + .bt-0-m { border-top-width: 0; } + .br-0-m { border-right-width: 0; } + .bb-0-m { border-bottom-width: 0; } + .bl-0-m { border-left-width: 0; } +} +@media screen and (min-width: 60em) { + .bw0-l { border-width: 0; } + .bw1-l { border-width: .125rem; } + .bw2-l { border-width: .25rem; } + .bw3-l { border-width: .5rem; } + .bw4-l { border-width: 1rem; } + .bw5-l { border-width: 2rem; } + .bt-0-l { border-top-width: 0; } + .br-0-l { border-right-width: 0; } + .bb-0-l { border-bottom-width: 0; } + .bl-0-l { border-left-width: 0; } +} +/* + + BOX-SHADOW + Docs: http://tachyons.io/docs/themes/box-shadow/ + + Media Query Extensions: + -ns = not-small + -m = medium + -l = large + + */ +.shadow-1 { -webkit-box-shadow: 0px 0px 4px 2px rgba(0, 0, 0, .2); box-shadow: 0px 0px 4px 2px rgba(0, 0, 0, .2); } +.shadow-2 { -webkit-box-shadow: 0px 0px 8px 2px rgba(0, 0, 0, .2); box-shadow: 0px 0px 8px 2px rgba(0, 0, 0, .2); } +.shadow-3 { -webkit-box-shadow: 2px 2px 4px 2px rgba(0, 0, 0, .2); box-shadow: 2px 2px 4px 2px rgba(0, 0, 0, .2); } +.shadow-4 { -webkit-box-shadow: 2px 2px 8px 0px rgba(0, 0, 0, .2); box-shadow: 2px 2px 8px 0px rgba(0, 0, 0, .2); } +.shadow-5 { -webkit-box-shadow: 4px 4px 8px 0px rgba(0, 0, 0, .2); box-shadow: 4px 4px 8px 0px rgba(0, 0, 0, .2); } +@media screen and (min-width: 30em) { + .shadow-1-ns { -webkit-box-shadow: 0px 0px 4px 2px rgba(0, 0, 0, .2); box-shadow: 0px 0px 4px 2px rgba(0, 0, 0, .2); } + .shadow-2-ns { -webkit-box-shadow: 0px 0px 8px 2px rgba(0, 0, 0, .2); box-shadow: 0px 0px 8px 2px rgba(0, 0, 0, .2); } + .shadow-3-ns { -webkit-box-shadow: 2px 2px 4px 2px rgba(0, 0, 0, .2); box-shadow: 2px 2px 4px 2px rgba(0, 0, 0, .2); } + .shadow-4-ns { -webkit-box-shadow: 2px 2px 8px 0px rgba(0, 0, 0, .2); box-shadow: 2px 2px 8px 0px rgba(0, 0, 0, .2); } + .shadow-5-ns { -webkit-box-shadow: 4px 4px 8px 0px rgba(0, 0, 0, .2); box-shadow: 4px 4px 8px 0px rgba(0, 0, 0, .2); } +} +@media screen and (min-width: 30em) and (max-width: 60em) { + .shadow-1-m { -webkit-box-shadow: 0px 0px 4px 2px rgba(0, 0, 0, .2); box-shadow: 0px 0px 4px 2px rgba(0, 0, 0, .2); } + .shadow-2-m { -webkit-box-shadow: 0px 0px 8px 2px rgba(0, 0, 0, .2); box-shadow: 0px 0px 8px 2px rgba(0, 0, 0, .2); } + .shadow-3-m { -webkit-box-shadow: 2px 2px 4px 2px rgba(0, 0, 0, .2); box-shadow: 2px 2px 4px 2px rgba(0, 0, 0, .2); } + .shadow-4-m { -webkit-box-shadow: 2px 2px 8px 0px rgba(0, 0, 0, .2); box-shadow: 2px 2px 8px 0px rgba(0, 0, 0, .2); } + .shadow-5-m { -webkit-box-shadow: 4px 4px 8px 0px rgba(0, 0, 0, .2); box-shadow: 4px 4px 8px 0px rgba(0, 0, 0, .2); } +} +@media screen and (min-width: 60em) { + .shadow-1-l { -webkit-box-shadow: 0px 0px 4px 2px rgba(0, 0, 0, .2); box-shadow: 0px 0px 4px 2px rgba(0, 0, 0, .2); } + .shadow-2-l { -webkit-box-shadow: 0px 0px 8px 2px rgba(0, 0, 0, .2); box-shadow: 0px 0px 8px 2px rgba(0, 0, 0, .2); } + .shadow-3-l { -webkit-box-shadow: 2px 2px 4px 2px rgba(0, 0, 0, .2); box-shadow: 2px 2px 4px 2px rgba(0, 0, 0, .2); } + .shadow-4-l { -webkit-box-shadow: 2px 2px 8px 0px rgba(0, 0, 0, .2); box-shadow: 2px 2px 8px 0px rgba(0, 0, 0, .2); } + .shadow-5-l { -webkit-box-shadow: 4px 4px 8px 0px rgba(0, 0, 0, .2); box-shadow: 4px 4px 8px 0px rgba(0, 0, 0, .2); } +} +/*@import 'tachyons/src/_code';*/ +/* + + COORDINATES + Docs: http://tachyons.io/docs/layout/position/ + + Use in combination with the position module. + + Base: + top + bottom + right + left + + Modifiers: + -0 = literal value 0 + -1 = literal value 1 + -2 = literal value 2 + --1 = literal value -1 + --2 = literal value -2 + + Media Query Extensions: + -ns = not-small + -m = medium + -l = large + +*/ +.top-0 { top: 0; } +.right-0 { right: 0; } +.bottom-0 { bottom: 0; } +.left-0 { left: 0; } +.top-1 { top: 1rem; } +.right-1 { right: 1rem; } +.bottom-1 { bottom: 1rem; } +.left-1 { left: 1rem; } +.top-2 { top: 2rem; } +.right-2 { right: 2rem; } +.bottom-2 { bottom: 2rem; } +.left-2 { left: 2rem; } +.top--1 { top: -1rem; } +.right--1 { right: -1rem; } +.bottom--1 { bottom: -1rem; } +.left--1 { left: -1rem; } +.top--2 { top: -2rem; } +.right--2 { right: -2rem; } +.bottom--2 { bottom: -2rem; } +.left--2 { left: -2rem; } +.absolute--fill { + top: 0; + right: 0; + bottom: 0; + left: 0; +} +@media screen and (min-width: 30em) { + .top-0-ns { top: 0; } + .left-0-ns { left: 0; } + .right-0-ns { right: 0; } + .bottom-0-ns { bottom: 0; } + .top-1-ns { top: 1rem; } + .left-1-ns { left: 1rem; } + .right-1-ns { right: 1rem; } + .bottom-1-ns { bottom: 1rem; } + .top-2-ns { top: 2rem; } + .left-2-ns { left: 2rem; } + .right-2-ns { right: 2rem; } + .bottom-2-ns { bottom: 2rem; } + .top--1-ns { top: -1rem; } + .right--1-ns { right: -1rem; } + .bottom--1-ns { bottom: -1rem; } + .left--1-ns { left: -1rem; } + .top--2-ns { top: -2rem; } + .right--2-ns { right: -2rem; } + .bottom--2-ns { bottom: -2rem; } + .left--2-ns { left: -2rem; } + .absolute--fill-ns { + top: 0; + right: 0; + bottom: 0; + left: 0; + } +} +@media screen and (min-width: 30em) and (max-width: 60em) { + .top-0-m { top: 0; } + .left-0-m { left: 0; } + .right-0-m { right: 0; } + .bottom-0-m { bottom: 0; } + .top-1-m { top: 1rem; } + .left-1-m { left: 1rem; } + .right-1-m { right: 1rem; } + .bottom-1-m { bottom: 1rem; } + .top-2-m { top: 2rem; } + .left-2-m { left: 2rem; } + .right-2-m { right: 2rem; } + .bottom-2-m { bottom: 2rem; } + .top--1-m { top: -1rem; } + .right--1-m { right: -1rem; } + .bottom--1-m { bottom: -1rem; } + .left--1-m { left: -1rem; } + .top--2-m { top: -2rem; } + .right--2-m { right: -2rem; } + .bottom--2-m { bottom: -2rem; } + .left--2-m { left: -2rem; } + .absolute--fill-m { + top: 0; + right: 0; + bottom: 0; + left: 0; + } +} +@media screen and (min-width: 60em) { + .top-0-l { top: 0; } + .left-0-l { left: 0; } + .right-0-l { right: 0; } + .bottom-0-l { bottom: 0; } + .top-1-l { top: 1rem; } + .left-1-l { left: 1rem; } + .right-1-l { right: 1rem; } + .bottom-1-l { bottom: 1rem; } + .top-2-l { top: 2rem; } + .left-2-l { left: 2rem; } + .right-2-l { right: 2rem; } + .bottom-2-l { bottom: 2rem; } + .top--1-l { top: -1rem; } + .right--1-l { right: -1rem; } + .bottom--1-l { bottom: -1rem; } + .left--1-l { left: -1rem; } + .top--2-l { top: -2rem; } + .right--2-l { right: -2rem; } + .bottom--2-l { bottom: -2rem; } + .left--2-l { left: -2rem; } + .absolute--fill-l { + top: 0; + right: 0; + bottom: 0; + left: 0; + } +} +/* + + CLEARFIX + http://tachyons.io/docs/layout/clearfix/ + +*/ +/* Nicolas Gallaghers Clearfix solution + Ref: http://nicolasgallagher.com/micro-clearfix-hack/ */ +.cf:before, +.cf:after { content: " "; display: table; } +.cf:after { clear: both; } +.cf { *zoom: 1; } +.cl { clear: left; } +.cr { clear: right; } +.cb { clear: both; } +.cn { clear: none; } +@media screen and (min-width: 30em) { + .cl-ns { clear: left; } + .cr-ns { clear: right; } + .cb-ns { clear: both; } + .cn-ns { clear: none; } +} +@media screen and (min-width: 30em) and (max-width: 60em) { + .cl-m { clear: left; } + .cr-m { clear: right; } + .cb-m { clear: both; } + .cn-m { clear: none; } +} +@media screen and (min-width: 60em) { + .cl-l { clear: left; } + .cr-l { clear: right; } + .cb-l { clear: both; } + .cn-l { clear: none; } +} +/* + + DISPLAY + Docs: http://tachyons.io/docs/layout/display + + Base: + d = display + + Modifiers: + n = none + b = block + ib = inline-block + it = inline-table + t = table + tc = table-cell + t-row = table-row + t-columm = table-column + t-column-group = table-column-group + + Media Query Extensions: + -ns = not-small + -m = medium + -l = large + +*/ +.dn { display: none; } +.di { display: inline; } +.db { display: block; } +.dib { display: inline-block; } +.dit { display: inline-table; } +.dt { display: table; } +.dtc { display: table-cell; } +.dt-row { display: table-row; } +.dt-row-group { display: table-row-group; } +.dt-column { display: table-column; } +.dt-column-group { display: table-column-group; } +/* + This will set table to full width and then + all cells will be equal width +*/ +.dt--fixed { + table-layout: fixed; + width: 100%; +} +@media screen and (min-width: 30em) { + .dn-ns { display: none; } + .di-ns { display: inline; } + .db-ns { display: block; } + .dib-ns { display: inline-block; } + .dit-ns { display: inline-table; } + .dt-ns { display: table; } + .dtc-ns { display: table-cell; } + .dt-row-ns { display: table-row; } + .dt-row-group-ns { display: table-row-group; } + .dt-column-ns { display: table-column; } + .dt-column-group-ns { display: table-column-group; } + + .dt--fixed-ns { + table-layout: fixed; + width: 100%; + } +} +@media screen and (min-width: 30em) and (max-width: 60em) { + .dn-m { display: none; } + .di-m { display: inline; } + .db-m { display: block; } + .dib-m { display: inline-block; } + .dit-m { display: inline-table; } + .dt-m { display: table; } + .dtc-m { display: table-cell; } + .dt-row-m { display: table-row; } + .dt-row-group-m { display: table-row-group; } + .dt-column-m { display: table-column; } + .dt-column-group-m { display: table-column-group; } + + .dt--fixed-m { + table-layout: fixed; + width: 100%; + } +} +@media screen and (min-width: 60em) { + .dn-l { display: none; } + .di-l { display: inline; } + .db-l { display: block; } + .dib-l { display: inline-block; } + .dit-l { display: inline-table; } + .dt-l { display: table; } + .dtc-l { display: table-cell; } + .dt-row-l { display: table-row; } + .dt-row-group-l { display: table-row-group; } + .dt-column-l { display: table-column; } + .dt-column-group-l { display: table-column-group; } + + .dt--fixed-l { + table-layout: fixed; + width: 100%; + } +} +/* + + FLEXBOX + + Media Query Extensions: + -ns = not-small + -m = medium + -l = large + +*/ +.flex { display: -webkit-box; display: -ms-flexbox; display: flex; } +.inline-flex { display: -webkit-inline-box; display: -ms-inline-flexbox; display: inline-flex; } +/* 1. Fix for Chrome 44 bug. + * https://code.google.com/p/chromium/issues/detail?id=506893 */ +.flex-auto { + -webkit-box-flex: 1; + -ms-flex: 1 1 auto; + flex: 1 1 auto; + min-width: 0; /* 1 */ + min-height: 0; /* 1 */ +} +.flex-none { -webkit-box-flex: 0; -ms-flex: none; flex: none; } +.flex-column { -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column; } +.flex-row { -webkit-box-orient: horizontal; -webkit-box-direction: normal; -ms-flex-direction: row; flex-direction: row; } +.flex-wrap { -ms-flex-wrap: wrap; flex-wrap: wrap; } +.flex-nowrap { -ms-flex-wrap: nowrap; flex-wrap: nowrap; } +.flex-wrap-reverse { -ms-flex-wrap: wrap-reverse; flex-wrap: wrap-reverse; } +.flex-column-reverse { -webkit-box-orient: vertical; -webkit-box-direction: reverse; -ms-flex-direction: column-reverse; flex-direction: column-reverse; } +.flex-row-reverse { -webkit-box-orient: horizontal; -webkit-box-direction: reverse; -ms-flex-direction: row-reverse; flex-direction: row-reverse; } +.items-start { -webkit-box-align: start; -ms-flex-align: start; align-items: flex-start; } +.items-end { -webkit-box-align: end; -ms-flex-align: end; align-items: flex-end; } +.items-center { -webkit-box-align: center; -ms-flex-align: center; align-items: center; } +.items-baseline { -webkit-box-align: baseline; -ms-flex-align: baseline; align-items: baseline; } +.items-stretch { -webkit-box-align: stretch; -ms-flex-align: stretch; align-items: stretch; } +.self-start { -ms-flex-item-align: start; align-self: flex-start; } +.self-end { -ms-flex-item-align: end; align-self: flex-end; } +.self-center { -ms-flex-item-align: center; align-self: center; } +.self-baseline { -ms-flex-item-align: baseline; align-self: baseline; } +.self-stretch { -ms-flex-item-align: stretch; align-self: stretch; } +.justify-start { -webkit-box-pack: start; -ms-flex-pack: start; justify-content: flex-start; } +.justify-end { -webkit-box-pack: end; -ms-flex-pack: end; justify-content: flex-end; } +.justify-center { -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; } +.justify-between { -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between; } +.justify-around { -ms-flex-pack: distribute; justify-content: space-around; } +.content-start { -ms-flex-line-pack: start; align-content: flex-start; } +.content-end { -ms-flex-line-pack: end; align-content: flex-end; } +.content-center { -ms-flex-line-pack: center; align-content: center; } +.content-between { -ms-flex-line-pack: justify; align-content: space-between; } +.content-around { -ms-flex-line-pack: distribute; align-content: space-around; } +.content-stretch { -ms-flex-line-pack: stretch; align-content: stretch; } +.order-0 { -webkit-box-ordinal-group: 1; -ms-flex-order: 0; order: 0; } +.order-1 { -webkit-box-ordinal-group: 2; -ms-flex-order: 1; order: 1; } +.order-2 { -webkit-box-ordinal-group: 3; -ms-flex-order: 2; order: 2; } +.order-3 { -webkit-box-ordinal-group: 4; -ms-flex-order: 3; order: 3; } +.order-4 { -webkit-box-ordinal-group: 5; -ms-flex-order: 4; order: 4; } +.order-5 { -webkit-box-ordinal-group: 6; -ms-flex-order: 5; order: 5; } +.order-6 { -webkit-box-ordinal-group: 7; -ms-flex-order: 6; order: 6; } +.order-7 { -webkit-box-ordinal-group: 8; -ms-flex-order: 7; order: 7; } +.order-8 { -webkit-box-ordinal-group: 9; -ms-flex-order: 8; order: 8; } +.order-last { -webkit-box-ordinal-group: 100000; -ms-flex-order: 99999; order: 99999; } +.flex-grow-0 { -webkit-box-flex: 0; -ms-flex-positive: 0; flex-grow: 0; } +.flex-grow-1 { -webkit-box-flex: 1; -ms-flex-positive: 1; flex-grow: 1; } +.flex-shrink-0 { -ms-flex-negative: 0; flex-shrink: 0; } +.flex-shrink-1 { -ms-flex-negative: 1; flex-shrink: 1; } +@media screen and (min-width: 30em) { + .flex-ns { display: -webkit-box; display: -ms-flexbox; display: flex; } + .inline-flex-ns { display: -webkit-inline-box; display: -ms-inline-flexbox; display: inline-flex; } + .flex-auto-ns { + -webkit-box-flex: 1; + -ms-flex: 1 1 auto; + flex: 1 1 auto; + min-width: 0; /* 1 */ + min-height: 0; /* 1 */ + } + .flex-none-ns { -webkit-box-flex: 0; -ms-flex: none; flex: none; } + .flex-column-ns { -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column; } + .flex-row-ns { -webkit-box-orient: horizontal; -webkit-box-direction: normal; -ms-flex-direction: row; flex-direction: row; } + .flex-wrap-ns { -ms-flex-wrap: wrap; flex-wrap: wrap; } + .flex-nowrap-ns { -ms-flex-wrap: nowrap; flex-wrap: nowrap; } + .flex-wrap-reverse-ns { -ms-flex-wrap: wrap-reverse; flex-wrap: wrap-reverse; } + .flex-column-reverse-ns { -webkit-box-orient: vertical; -webkit-box-direction: reverse; -ms-flex-direction: column-reverse; flex-direction: column-reverse; } + .flex-row-reverse-ns { -webkit-box-orient: horizontal; -webkit-box-direction: reverse; -ms-flex-direction: row-reverse; flex-direction: row-reverse; } + .items-start-ns { -webkit-box-align: start; -ms-flex-align: start; align-items: flex-start; } + .items-end-ns { -webkit-box-align: end; -ms-flex-align: end; align-items: flex-end; } + .items-center-ns { -webkit-box-align: center; -ms-flex-align: center; align-items: center; } + .items-baseline-ns { -webkit-box-align: baseline; -ms-flex-align: baseline; align-items: baseline; } + .items-stretch-ns { -webkit-box-align: stretch; -ms-flex-align: stretch; align-items: stretch; } + + .self-start-ns { -ms-flex-item-align: start; align-self: flex-start; } + .self-end-ns { -ms-flex-item-align: end; align-self: flex-end; } + .self-center-ns { -ms-flex-item-align: center; align-self: center; } + .self-baseline-ns { -ms-flex-item-align: baseline; align-self: baseline; } + .self-stretch-ns { -ms-flex-item-align: stretch; align-self: stretch; } + + .justify-start-ns { -webkit-box-pack: start; -ms-flex-pack: start; justify-content: flex-start; } + .justify-end-ns { -webkit-box-pack: end; -ms-flex-pack: end; justify-content: flex-end; } + .justify-center-ns { -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; } + .justify-between-ns { -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between; } + .justify-around-ns { -ms-flex-pack: distribute; justify-content: space-around; } + + .content-start-ns { -ms-flex-line-pack: start; align-content: flex-start; } + .content-end-ns { -ms-flex-line-pack: end; align-content: flex-end; } + .content-center-ns { -ms-flex-line-pack: center; align-content: center; } + .content-between-ns { -ms-flex-line-pack: justify; align-content: space-between; } + .content-around-ns { -ms-flex-line-pack: distribute; align-content: space-around; } + .content-stretch-ns { -ms-flex-line-pack: stretch; align-content: stretch; } + + .order-0-ns { -webkit-box-ordinal-group: 1; -ms-flex-order: 0; order: 0; } + .order-1-ns { -webkit-box-ordinal-group: 2; -ms-flex-order: 1; order: 1; } + .order-2-ns { -webkit-box-ordinal-group: 3; -ms-flex-order: 2; order: 2; } + .order-3-ns { -webkit-box-ordinal-group: 4; -ms-flex-order: 3; order: 3; } + .order-4-ns { -webkit-box-ordinal-group: 5; -ms-flex-order: 4; order: 4; } + .order-5-ns { -webkit-box-ordinal-group: 6; -ms-flex-order: 5; order: 5; } + .order-6-ns { -webkit-box-ordinal-group: 7; -ms-flex-order: 6; order: 6; } + .order-7-ns { -webkit-box-ordinal-group: 8; -ms-flex-order: 7; order: 7; } + .order-8-ns { -webkit-box-ordinal-group: 9; -ms-flex-order: 8; order: 8; } + .order-last-ns { -webkit-box-ordinal-group: 100000; -ms-flex-order: 99999; order: 99999; } + + .flex-grow-0-ns { -webkit-box-flex: 0; -ms-flex-positive: 0; flex-grow: 0; } + .flex-grow-1-ns { -webkit-box-flex: 1; -ms-flex-positive: 1; flex-grow: 1; } + + .flex-shrink-0-ns { -ms-flex-negative: 0; flex-shrink: 0; } + .flex-shrink-1-ns { -ms-flex-negative: 1; flex-shrink: 1; } +} +@media screen and (min-width: 30em) and (max-width: 60em) { + .flex-m { display: -webkit-box; display: -ms-flexbox; display: flex; } + .inline-flex-m { display: -webkit-inline-box; display: -ms-inline-flexbox; display: inline-flex; } + .flex-auto-m { + -webkit-box-flex: 1; + -ms-flex: 1 1 auto; + flex: 1 1 auto; + min-width: 0; /* 1 */ + min-height: 0; /* 1 */ + } + .flex-none-m { -webkit-box-flex: 0; -ms-flex: none; flex: none; } + .flex-column-m { -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column; } + .flex-row-m { -webkit-box-orient: horizontal; -webkit-box-direction: normal; -ms-flex-direction: row; flex-direction: row; } + .flex-wrap-m { -ms-flex-wrap: wrap; flex-wrap: wrap; } + .flex-nowrap-m { -ms-flex-wrap: nowrap; flex-wrap: nowrap; } + .flex-wrap-reverse-m { -ms-flex-wrap: wrap-reverse; flex-wrap: wrap-reverse; } + .flex-column-reverse-m { -webkit-box-orient: vertical; -webkit-box-direction: reverse; -ms-flex-direction: column-reverse; flex-direction: column-reverse; } + .flex-row-reverse-m { -webkit-box-orient: horizontal; -webkit-box-direction: reverse; -ms-flex-direction: row-reverse; flex-direction: row-reverse; } + .items-start-m { -webkit-box-align: start; -ms-flex-align: start; align-items: flex-start; } + .items-end-m { -webkit-box-align: end; -ms-flex-align: end; align-items: flex-end; } + .items-center-m { -webkit-box-align: center; -ms-flex-align: center; align-items: center; } + .items-baseline-m { -webkit-box-align: baseline; -ms-flex-align: baseline; align-items: baseline; } + .items-stretch-m { -webkit-box-align: stretch; -ms-flex-align: stretch; align-items: stretch; } + + .self-start-m { -ms-flex-item-align: start; align-self: flex-start; } + .self-end-m { -ms-flex-item-align: end; align-self: flex-end; } + .self-center-m { -ms-flex-item-align: center; align-self: center; } + .self-baseline-m { -ms-flex-item-align: baseline; align-self: baseline; } + .self-stretch-m { -ms-flex-item-align: stretch; align-self: stretch; } + + .justify-start-m { -webkit-box-pack: start; -ms-flex-pack: start; justify-content: flex-start; } + .justify-end-m { -webkit-box-pack: end; -ms-flex-pack: end; justify-content: flex-end; } + .justify-center-m { -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; } + .justify-between-m { -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between; } + .justify-around-m { -ms-flex-pack: distribute; justify-content: space-around; } + + .content-start-m { -ms-flex-line-pack: start; align-content: flex-start; } + .content-end-m { -ms-flex-line-pack: end; align-content: flex-end; } + .content-center-m { -ms-flex-line-pack: center; align-content: center; } + .content-between-m { -ms-flex-line-pack: justify; align-content: space-between; } + .content-around-m { -ms-flex-line-pack: distribute; align-content: space-around; } + .content-stretch-m { -ms-flex-line-pack: stretch; align-content: stretch; } + + .order-0-m { -webkit-box-ordinal-group: 1; -ms-flex-order: 0; order: 0; } + .order-1-m { -webkit-box-ordinal-group: 2; -ms-flex-order: 1; order: 1; } + .order-2-m { -webkit-box-ordinal-group: 3; -ms-flex-order: 2; order: 2; } + .order-3-m { -webkit-box-ordinal-group: 4; -ms-flex-order: 3; order: 3; } + .order-4-m { -webkit-box-ordinal-group: 5; -ms-flex-order: 4; order: 4; } + .order-5-m { -webkit-box-ordinal-group: 6; -ms-flex-order: 5; order: 5; } + .order-6-m { -webkit-box-ordinal-group: 7; -ms-flex-order: 6; order: 6; } + .order-7-m { -webkit-box-ordinal-group: 8; -ms-flex-order: 7; order: 7; } + .order-8-m { -webkit-box-ordinal-group: 9; -ms-flex-order: 8; order: 8; } + .order-last-m { -webkit-box-ordinal-group: 100000; -ms-flex-order: 99999; order: 99999; } + + .flex-grow-0-m { -webkit-box-flex: 0; -ms-flex-positive: 0; flex-grow: 0; } + .flex-grow-1-m { -webkit-box-flex: 1; -ms-flex-positive: 1; flex-grow: 1; } + + .flex-shrink-0-m { -ms-flex-negative: 0; flex-shrink: 0; } + .flex-shrink-1-m { -ms-flex-negative: 1; flex-shrink: 1; } +} +@media screen and (min-width: 60em) { + .flex-l { display: -webkit-box; display: -ms-flexbox; display: flex; } + .inline-flex-l { display: -webkit-inline-box; display: -ms-inline-flexbox; display: inline-flex; } + .flex-auto-l { + -webkit-box-flex: 1; + -ms-flex: 1 1 auto; + flex: 1 1 auto; + min-width: 0; /* 1 */ + min-height: 0; /* 1 */ + } + .flex-none-l { -webkit-box-flex: 0; -ms-flex: none; flex: none; } + .flex-column-l { -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column; } + .flex-row-l { -webkit-box-orient: horizontal; -webkit-box-direction: normal; -ms-flex-direction: row; flex-direction: row; } + .flex-wrap-l { -ms-flex-wrap: wrap; flex-wrap: wrap; } + .flex-nowrap-l { -ms-flex-wrap: nowrap; flex-wrap: nowrap; } + .flex-wrap-reverse-l { -ms-flex-wrap: wrap-reverse; flex-wrap: wrap-reverse; } + .flex-column-reverse-l { -webkit-box-orient: vertical; -webkit-box-direction: reverse; -ms-flex-direction: column-reverse; flex-direction: column-reverse; } + .flex-row-reverse-l { -webkit-box-orient: horizontal; -webkit-box-direction: reverse; -ms-flex-direction: row-reverse; flex-direction: row-reverse; } + + .items-start-l { -webkit-box-align: start; -ms-flex-align: start; align-items: flex-start; } + .items-end-l { -webkit-box-align: end; -ms-flex-align: end; align-items: flex-end; } + .items-center-l { -webkit-box-align: center; -ms-flex-align: center; align-items: center; } + .items-baseline-l { -webkit-box-align: baseline; -ms-flex-align: baseline; align-items: baseline; } + .items-stretch-l { -webkit-box-align: stretch; -ms-flex-align: stretch; align-items: stretch; } + + .self-start-l { -ms-flex-item-align: start; align-self: flex-start; } + .self-end-l { -ms-flex-item-align: end; align-self: flex-end; } + .self-center-l { -ms-flex-item-align: center; align-self: center; } + .self-baseline-l { -ms-flex-item-align: baseline; align-self: baseline; } + .self-stretch-l { -ms-flex-item-align: stretch; align-self: stretch; } + + .justify-start-l { -webkit-box-pack: start; -ms-flex-pack: start; justify-content: flex-start; } + .justify-end-l { -webkit-box-pack: end; -ms-flex-pack: end; justify-content: flex-end; } + .justify-center-l { -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; } + .justify-between-l { -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between; } + .justify-around-l { -ms-flex-pack: distribute; justify-content: space-around; } + + .content-start-l { -ms-flex-line-pack: start; align-content: flex-start; } + .content-end-l { -ms-flex-line-pack: end; align-content: flex-end; } + .content-center-l { -ms-flex-line-pack: center; align-content: center; } + .content-between-l { -ms-flex-line-pack: justify; align-content: space-between; } + .content-around-l { -ms-flex-line-pack: distribute; align-content: space-around; } + .content-stretch-l { -ms-flex-line-pack: stretch; align-content: stretch; } + + .order-0-l { -webkit-box-ordinal-group: 1; -ms-flex-order: 0; order: 0; } + .order-1-l { -webkit-box-ordinal-group: 2; -ms-flex-order: 1; order: 1; } + .order-2-l { -webkit-box-ordinal-group: 3; -ms-flex-order: 2; order: 2; } + .order-3-l { -webkit-box-ordinal-group: 4; -ms-flex-order: 3; order: 3; } + .order-4-l { -webkit-box-ordinal-group: 5; -ms-flex-order: 4; order: 4; } + .order-5-l { -webkit-box-ordinal-group: 6; -ms-flex-order: 5; order: 5; } + .order-6-l { -webkit-box-ordinal-group: 7; -ms-flex-order: 6; order: 6; } + .order-7-l { -webkit-box-ordinal-group: 8; -ms-flex-order: 7; order: 7; } + .order-8-l { -webkit-box-ordinal-group: 9; -ms-flex-order: 8; order: 8; } + .order-last-l { -webkit-box-ordinal-group: 100000; -ms-flex-order: 99999; order: 99999; } + + .flex-grow-0-l { -webkit-box-flex: 0; -ms-flex-positive: 0; flex-grow: 0; } + .flex-grow-1-l { -webkit-box-flex: 1; -ms-flex-positive: 1; flex-grow: 1; } + + .flex-shrink-0-l { -ms-flex-negative: 0; flex-shrink: 0; } + .flex-shrink-1-l { -ms-flex-negative: 1; flex-shrink: 1; } +} +/* + + FLOATS + http://tachyons.io/docs/layout/floats/ + + 1. Floated elements are automatically rendered as block level elements. + Setting floats to display inline will fix the double margin bug in + ie6. You know... just in case. + + 2. Don't forget to clearfix your floats with .cf + + Base: + f = float + + Modifiers: + l = left + r = right + n = none + + Media Query Extensions: + -ns = not-small + -m = medium + -l = large + +*/ +.fl { float: left; _display: inline; } +.fr { float: right; _display: inline; } +.fn { float: none; } +@media screen and (min-width: 30em) { + .fl-ns { float: left; _display: inline; } + .fr-ns { float: right; _display: inline; } + .fn-ns { float: none; } +} +@media screen and (min-width: 30em) and (max-width: 60em) { + .fl-m { float: left; _display: inline; } + .fr-m { float: right; _display: inline; } + .fn-m { float: none; } +} +@media screen and (min-width: 60em) { + .fl-l { float: left; _display: inline; } + .fr-l { float: right; _display: inline; } + .fn-l { float: none; } +} +/*@import 'tachyons/src/_font-family';*/ +/* + + FONT STYLE + Docs: http://tachyons.io/docs/typography/font-style/ + + Media Query Extensions: + -ns = not-small + -m = medium + -l = large + +*/ +.i { font-style: italic; } +.fs-normal { font-style: normal; } +@media screen and (min-width: 30em) { + .i-ns { font-style: italic; } + .fs-normal-ns { font-style: normal; } +} +@media screen and (min-width: 30em) and (max-width: 60em) { + .i-m { font-style: italic; } + .fs-normal-m { font-style: normal; } +} +@media screen and (min-width: 60em) { + .i-l { font-style: italic; } + .fs-normal-l { font-style: normal; } +} +/* + + FONT WEIGHT + Docs: http://tachyons.io/docs/typography/font-weight/ + + Base + fw = font-weight + + Modifiers: + 1 = literal value 100 + 2 = literal value 200 + 3 = literal value 300 + 4 = literal value 400 + 5 = literal value 500 + 6 = literal value 600 + 7 = literal value 700 + 8 = literal value 800 + 9 = literal value 900 + + Media Query Extensions: + -ns = not-small + -m = medium + -l = large + +*/ +.normal { font-weight: normal; } +.b { font-weight: bold; } +.fw1 { font-weight: 100; } +.fw2 { font-weight: 200; } +.fw3 { font-weight: 300; } +.fw4 { font-weight: 400; } +.fw5 { font-weight: 500; } +.fw6 { font-weight: 600; } +.fw7 { font-weight: 700; } +.fw8 { font-weight: 800; } +.fw9 { font-weight: 900; } +@media screen and (min-width: 30em) { + .normal-ns { font-weight: normal; } + .b-ns { font-weight: bold; } + .fw1-ns { font-weight: 100; } + .fw2-ns { font-weight: 200; } + .fw3-ns { font-weight: 300; } + .fw4-ns { font-weight: 400; } + .fw5-ns { font-weight: 500; } + .fw6-ns { font-weight: 600; } + .fw7-ns { font-weight: 700; } + .fw8-ns { font-weight: 800; } + .fw9-ns { font-weight: 900; } +} +@media screen and (min-width: 30em) and (max-width: 60em) { + .normal-m { font-weight: normal; } + .b-m { font-weight: bold; } + .fw1-m { font-weight: 100; } + .fw2-m { font-weight: 200; } + .fw3-m { font-weight: 300; } + .fw4-m { font-weight: 400; } + .fw5-m { font-weight: 500; } + .fw6-m { font-weight: 600; } + .fw7-m { font-weight: 700; } + .fw8-m { font-weight: 800; } + .fw9-m { font-weight: 900; } +} +@media screen and (min-width: 60em) { + .normal-l { font-weight: normal; } + .b-l { font-weight: bold; } + .fw1-l { font-weight: 100; } + .fw2-l { font-weight: 200; } + .fw3-l { font-weight: 300; } + .fw4-l { font-weight: 400; } + .fw5-l { font-weight: 500; } + .fw6-l { font-weight: 600; } + .fw7-l { font-weight: 700; } + .fw8-l { font-weight: 800; } + .fw9-l { font-weight: 900; } +} +/* + + FORMS + +*/ +.input-reset { + -webkit-appearance: none; + -moz-appearance: none; +} +.button-reset::-moz-focus-inner, +.input-reset::-moz-focus-inner { + border: 0; + padding: 0; +} +/* + + HEIGHTS + Docs: http://tachyons.io/docs/layout/heights/ + + Base: + h = height + min-h = min-height + min-vh = min-height vertical screen height + vh = vertical screen height + + Modifiers + 1 = 1st step in height scale + 2 = 2nd step in height scale + 3 = 3rd step in height scale + 4 = 4th step in height scale + 5 = 5th step in height scale + + -25 = literal value 25% + -50 = literal value 50% + -75 = literal value 75% + -100 = literal value 100% + + -auto = string value of auto + -inherit = string value of inherit + + Media Query Extensions: + -ns = not-small + -m = medium + -l = large + +*/ +/* Height Scale */ +.h1 { height: 1rem; } +.h2 { height: 2rem; } +.h3 { height: 4rem; } +.h4 { height: 8rem; } +.h5 { height: 16rem; } +/* Height Percentages - Based off of height of parent */ +.h-25 { height: 25%; } +.h-50 { height: 50%; } +.h-75 { height: 75%; } +.h-100 { height: 100%; } +.min-h-100 { min-height: 100%; } +/* Screen Height Percentage */ +.vh-25 { height: 25vh; } +.vh-50 { height: 50vh; } +.vh-75 { height: 75vh; } +.vh-100 { height: 100vh; } +.min-vh-100 { min-height: 100vh; } +/* String Properties */ +.h-auto { height: auto; } +.h-inherit { height: inherit; } +@media screen and (min-width: 30em) { + .h1-ns { height: 1rem; } + .h2-ns { height: 2rem; } + .h3-ns { height: 4rem; } + .h4-ns { height: 8rem; } + .h5-ns { height: 16rem; } + .h-25-ns { height: 25%; } + .h-50-ns { height: 50%; } + .h-75-ns { height: 75%; } + .h-100-ns { height: 100%; } + .min-h-100-ns { min-height: 100%; } + .vh-25-ns { height: 25vh; } + .vh-50-ns { height: 50vh; } + .vh-75-ns { height: 75vh; } + .vh-100-ns { height: 100vh; } + .min-vh-100-ns { min-height: 100vh; } + .h-auto-ns { height: auto; } + .h-inherit-ns { height: inherit; } +} +@media screen and (min-width: 30em) and (max-width: 60em) { + .h1-m { height: 1rem; } + .h2-m { height: 2rem; } + .h3-m { height: 4rem; } + .h4-m { height: 8rem; } + .h5-m { height: 16rem; } + .h-25-m { height: 25%; } + .h-50-m { height: 50%; } + .h-75-m { height: 75%; } + .h-100-m { height: 100%; } + .min-h-100-m { min-height: 100%; } + .vh-25-m { height: 25vh; } + .vh-50-m { height: 50vh; } + .vh-75-m { height: 75vh; } + .vh-100-m { height: 100vh; } + .min-vh-100-m { min-height: 100vh; } + .h-auto-m { height: auto; } + .h-inherit-m { height: inherit; } +} +@media screen and (min-width: 60em) { + .h1-l { height: 1rem; } + .h2-l { height: 2rem; } + .h3-l { height: 4rem; } + .h4-l { height: 8rem; } + .h5-l { height: 16rem; } + .h-25-l { height: 25%; } + .h-50-l { height: 50%; } + .h-75-l { height: 75%; } + .h-100-l { height: 100%; } + .min-h-100-l { min-height: 100%; } + .vh-25-l { height: 25vh; } + .vh-50-l { height: 50vh; } + .vh-75-l { height: 75vh; } + .vh-100-l { height: 100vh; } + .min-vh-100-l { min-height: 100vh; } + .h-auto-l { height: auto; } + .h-inherit-l { height: inherit; } +} +/* + + LETTER SPACING + Docs: http://tachyons.io/docs/typography/tracking/ + + Media Query Extensions: + -ns = not-small + -m = medium + -l = large + +*/ +.tracked { letter-spacing: .1em; } +.tracked-tight { letter-spacing: -.05em; } +.tracked-mega { letter-spacing: .25em; } +@media screen and (min-width: 30em) { + .tracked-ns { letter-spacing: .1em; } + .tracked-tight-ns { letter-spacing: -.05em; } + .tracked-mega-ns { letter-spacing: .25em; } +} +@media screen and (min-width: 30em) and (max-width: 60em) { + .tracked-m { letter-spacing: .1em; } + .tracked-tight-m { letter-spacing: -.05em; } + .tracked-mega-m { letter-spacing: .25em; } +} +@media screen and (min-width: 60em) { + .tracked-l { letter-spacing: .1em; } + .tracked-tight-l { letter-spacing: -.05em; } + .tracked-mega-l { letter-spacing: .25em; } +} +/* + + LINE HEIGHT / LEADING + Docs: http://tachyons.io/docs/typography/line-height + + Media Query Extensions: + -ns = not-small + -m = medium + -l = large + +*/ +.lh-solid { line-height: 1; } +.lh-title { line-height: 1.25; } +.lh-copy { line-height: 1.5; } +@media screen and (min-width: 30em) { + .lh-solid-ns { line-height: 1; } + .lh-title-ns { line-height: 1.25; } + .lh-copy-ns { line-height: 1.5; } +} +@media screen and (min-width: 30em) and (max-width: 60em) { + .lh-solid-m { line-height: 1; } + .lh-title-m { line-height: 1.25; } + .lh-copy-m { line-height: 1.5; } +} +@media screen and (min-width: 60em) { + .lh-solid-l { line-height: 1; } + .lh-title-l { line-height: 1.25; } + .lh-copy-l { line-height: 1.5; } +} +/* + + LINKS + Docs: http://tachyons.io/docs/elements/links/ + +*/ +.link { + text-decoration: none; + -webkit-transition: color .15s ease-in; + transition: color .15s ease-in; +} +.link:link, +.link:visited { + -webkit-transition: color .15s ease-in; + transition: color .15s ease-in; +} +.link:hover { + -webkit-transition: color .15s ease-in; + transition: color .15s ease-in; +} +.link:active { + -webkit-transition: color .15s ease-in; + transition: color .15s ease-in; +} +.link:focus { + -webkit-transition: color .15s ease-in; + transition: color .15s ease-in; + outline: 1px dotted currentColor; +} +/* + + LISTS + http://tachyons.io/docs/elements/lists/ + +*/ +.list { list-style-type: none; } +/* + + MAX WIDTHS + Docs: http://tachyons.io/docs/layout/max-widths/ + + Base: + mw = max-width + + Modifiers + 1 = 1st step in width scale + 2 = 2nd step in width scale + 3 = 3rd step in width scale + 4 = 4th step in width scale + 5 = 5th step in width scale + 6 = 6st step in width scale + 7 = 7nd step in width scale + 8 = 8rd step in width scale + 9 = 9th step in width scale + + -100 = literal value 100% + + -none = string value none + + + Media Query Extensions: + -ns = not-small + -m = medium + -l = large + +*/ +/* Max Width Percentages */ +.mw-100 { max-width: 100%; } +/* Max Width Scale */ +.mw1 { max-width: 1rem; } +.mw2 { max-width: 2rem; } +.mw3 { max-width: 4rem; } +.mw4 { max-width: 8rem; } +.mw5 { max-width: 16rem; } +.mw6 { max-width: 32rem; } +.mw7 { max-width: 48rem; } +.mw8 { max-width: 64rem; } +.mw9 { max-width: 96rem; } +/* Max Width String Properties */ +.mw-none { max-width: none; } +@media screen and (min-width: 30em) { + .mw-100-ns { max-width: 100%; } + + .mw1-ns { max-width: 1rem; } + .mw2-ns { max-width: 2rem; } + .mw3-ns { max-width: 4rem; } + .mw4-ns { max-width: 8rem; } + .mw5-ns { max-width: 16rem; } + .mw6-ns { max-width: 32rem; } + .mw7-ns { max-width: 48rem; } + .mw8-ns { max-width: 64rem; } + .mw9-ns { max-width: 96rem; } + + .mw-none-ns { max-width: none; } +} +@media screen and (min-width: 30em) and (max-width: 60em) { + .mw-100-m { max-width: 100%; } + + .mw1-m { max-width: 1rem; } + .mw2-m { max-width: 2rem; } + .mw3-m { max-width: 4rem; } + .mw4-m { max-width: 8rem; } + .mw5-m { max-width: 16rem; } + .mw6-m { max-width: 32rem; } + .mw7-m { max-width: 48rem; } + .mw8-m { max-width: 64rem; } + .mw9-m { max-width: 96rem; } + + .mw-none-m { max-width: none; } +} +@media screen and (min-width: 60em) { + .mw-100-l { max-width: 100%; } + + .mw1-l { max-width: 1rem; } + .mw2-l { max-width: 2rem; } + .mw3-l { max-width: 4rem; } + .mw4-l { max-width: 8rem; } + .mw5-l { max-width: 16rem; } + .mw6-l { max-width: 32rem; } + .mw7-l { max-width: 48rem; } + .mw8-l { max-width: 64rem; } + .mw9-l { max-width: 96rem; } + + .mw-none-l { max-width: none; } +} +/* + + WIDTHS + Docs: http://tachyons.io/docs/layout/widths/ + + Base: + w = width + + Modifiers + 1 = 1st step in width scale + 2 = 2nd step in width scale + 3 = 3rd step in width scale + 4 = 4th step in width scale + 5 = 5th step in width scale + + -10 = literal value 10% + -20 = literal value 20% + -25 = literal value 25% + -30 = literal value 30% + -33 = literal value 33% + -34 = literal value 34% + -40 = literal value 40% + -50 = literal value 50% + -60 = literal value 60% + -70 = literal value 70% + -75 = literal value 75% + -80 = literal value 80% + -90 = literal value 90% + -100 = literal value 100% + + -third = 100% / 3 (Not supported in opera mini or IE8) + -two-thirds = 100% / 1.5 (Not supported in opera mini or IE8) + -auto = string value auto + + + Media Query Extensions: + -ns = not-small + -m = medium + -l = large + +*/ +/* Width Scale */ +.w1 { width: 1rem; } +.w2 { width: 2rem; } +.w3 { width: 4rem; } +.w4 { width: 8rem; } +.w5 { width: 16rem; } +.w-10 { width: 10%; } +.w-20 { width: 20%; } +.w-25 { width: 25%; } +.w-30 { width: 30%; } +.w-33 { width: 33%; } +.w-34 { width: 34%; } +.w-40 { width: 40%; } +.w-50 { width: 50%; } +.w-60 { width: 60%; } +.w-70 { width: 70%; } +.w-75 { width: 75%; } +.w-80 { width: 80%; } +.w-90 { width: 90%; } +.w-100 { width: 100%; } +.w-third { width: 33.33333%; } +.w-two-thirds { width: 66.66667%; } +.w-auto { width: auto; } +@media screen and (min-width: 30em) { + .w1-ns { width: 1rem; } + .w2-ns { width: 2rem; } + .w3-ns { width: 4rem; } + .w4-ns { width: 8rem; } + .w5-ns { width: 16rem; } + .w-10-ns { width: 10%; } + .w-20-ns { width: 20%; } + .w-25-ns { width: 25%; } + .w-30-ns { width: 30%; } + .w-33-ns { width: 33%; } + .w-34-ns { width: 34%; } + .w-40-ns { width: 40%; } + .w-50-ns { width: 50%; } + .w-60-ns { width: 60%; } + .w-70-ns { width: 70%; } + .w-75-ns { width: 75%; } + .w-80-ns { width: 80%; } + .w-90-ns { width: 90%; } + .w-100-ns { width: 100%; } + .w-third-ns { width: 33.33333%; } + .w-two-thirds-ns { width: 66.66667%; } + .w-auto-ns { width: auto; } +} +@media screen and (min-width: 30em) and (max-width: 60em) { + .w1-m { width: 1rem; } + .w2-m { width: 2rem; } + .w3-m { width: 4rem; } + .w4-m { width: 8rem; } + .w5-m { width: 16rem; } + .w-10-m { width: 10%; } + .w-20-m { width: 20%; } + .w-25-m { width: 25%; } + .w-30-m { width: 30%; } + .w-33-m { width: 33%; } + .w-34-m { width: 34%; } + .w-40-m { width: 40%; } + .w-50-m { width: 50%; } + .w-60-m { width: 60%; } + .w-70-m { width: 70%; } + .w-75-m { width: 75%; } + .w-80-m { width: 80%; } + .w-90-m { width: 90%; } + .w-100-m { width: 100%; } + .w-third-m { width: 33.33333%; } + .w-two-thirds-m { width: 66.66667%; } + .w-auto-m { width: auto; } +} +@media screen and (min-width: 60em) { + .w1-l { width: 1rem; } + .w2-l { width: 2rem; } + .w3-l { width: 4rem; } + .w4-l { width: 8rem; } + .w5-l { width: 16rem; } + .w-10-l { width: 10%; } + .w-20-l { width: 20%; } + .w-25-l { width: 25%; } + .w-30-l { width: 30%; } + .w-33-l { width: 33%; } + .w-34-l { width: 34%; } + .w-40-l { width: 40%; } + .w-50-l { width: 50%; } + .w-60-l { width: 60%; } + .w-70-l { width: 70%; } + .w-75-l { width: 75%; } + .w-80-l { width: 80%; } + .w-90-l { width: 90%; } + .w-100-l { width: 100%; } + .w-third-l { width: 33.33333%; } + .w-two-thirds-l { width: 66.66667%; } + .w-auto-l { width: auto; } +} +/* + + OVERFLOW + + Media Query Extensions: + -ns = not-small + -m = medium + -l = large + + */ +.overflow-visible { overflow: visible; } +.overflow-hidden { overflow: hidden; } +.overflow-scroll { overflow: scroll; } +.overflow-auto { overflow: auto; } +.overflow-x-visible { overflow-x: visible; } +.overflow-x-hidden { overflow-x: hidden; } +.overflow-x-scroll { overflow-x: scroll; } +.overflow-x-auto { overflow-x: auto; } +.overflow-y-visible { overflow-y: visible; } +.overflow-y-hidden { overflow-y: hidden; } +.overflow-y-scroll { overflow-y: scroll; } +.overflow-y-auto { overflow-y: auto; } +@media screen and (min-width: 30em) { + .overflow-visible-ns { overflow: visible; } + .overflow-hidden-ns { overflow: hidden; } + .overflow-scroll-ns { overflow: scroll; } + .overflow-auto-ns { overflow: auto; } + .overflow-x-visible-ns { overflow-x: visible; } + .overflow-x-hidden-ns { overflow-x: hidden; } + .overflow-x-scroll-ns { overflow-x: scroll; } + .overflow-x-auto-ns { overflow-x: auto; } + + .overflow-y-visible-ns { overflow-y: visible; } + .overflow-y-hidden-ns { overflow-y: hidden; } + .overflow-y-scroll-ns { overflow-y: scroll; } + .overflow-y-auto-ns { overflow-y: auto; } +} +@media screen and (min-width: 30em) and (max-width: 60em) { + .overflow-visible-m { overflow: visible; } + .overflow-hidden-m { overflow: hidden; } + .overflow-scroll-m { overflow: scroll; } + .overflow-auto-m { overflow: auto; } + + .overflow-x-visible-m { overflow-x: visible; } + .overflow-x-hidden-m { overflow-x: hidden; } + .overflow-x-scroll-m { overflow-x: scroll; } + .overflow-x-auto-m { overflow-x: auto; } + + .overflow-y-visible-m { overflow-y: visible; } + .overflow-y-hidden-m { overflow-y: hidden; } + .overflow-y-scroll-m { overflow-y: scroll; } + .overflow-y-auto-m { overflow-y: auto; } +} +@media screen and (min-width: 60em) { + .overflow-visible-l { overflow: visible; } + .overflow-hidden-l { overflow: hidden; } + .overflow-scroll-l { overflow: scroll; } + .overflow-auto-l { overflow: auto; } + + .overflow-x-visible-l { overflow-x: visible; } + .overflow-x-hidden-l { overflow-x: hidden; } + .overflow-x-scroll-l { overflow-x: scroll; } + .overflow-x-auto-l { overflow-x: auto; } + + .overflow-y-visible-l { overflow-y: visible; } + .overflow-y-hidden-l { overflow-y: hidden; } + .overflow-y-scroll-l { overflow-y: scroll; } + .overflow-y-auto-l { overflow-y: auto; } +} +/* + + POSITIONING + Docs: http://tachyons.io/docs/layout/position/ + + Media Query Extensions: + -ns = not-small + -m = medium + -l = large + +*/ +.static { position: static; } +.relative { position: relative; } +.absolute { position: absolute; } +.fixed { position: fixed; } +@media screen and (min-width: 30em) { + .static-ns { position: static; } + .relative-ns { position: relative; } + .absolute-ns { position: absolute; } + .fixed-ns { position: fixed; } +} +@media screen and (min-width: 30em) and (max-width: 60em) { + .static-m { position: static; } + .relative-m { position: relative; } + .absolute-m { position: absolute; } + .fixed-m { position: fixed; } +} +@media screen and (min-width: 60em) { + .static-l { position: static; } + .relative-l { position: relative; } + .absolute-l { position: absolute; } + .fixed-l { position: fixed; } +} +/* + + OPACITY + Docs: http://tachyons.io/docs/themes/opacity/ + +*/ +.o-100 { opacity: 1; } +.o-90 { opacity: .9; } +.o-80 { opacity: .8; } +.o-70 { opacity: .7; } +.o-60 { opacity: .6; } +.o-50 { opacity: .5; } +.o-40 { opacity: .4; } +.o-30 { opacity: .3; } +.o-20 { opacity: .2; } +.o-10 { opacity: .1; } +.o-05 { opacity: .05; } +.o-025 { opacity: .025; } +.o-0 { opacity: 0; } +/*@import 'tachyons/src/_rotations';*/ +/* + + SKINS + Docs: http://tachyons.io/docs/themes/skins/ + + Classes for setting foreground and background colors on elements. + If you haven't declared a border color, but set border on an element, it will + be set to the current text color. + +*/ +/* Text colors */ +.black-90 { color: rgba(0, 0, 0, .9); } +.black-80 { color: rgba(0, 0, 0, .8); } +.black-70 { color: rgba(0, 0, 0, .7); } +.black-60 { color: rgba(0, 0, 0, .6); } +.black-50 { color: rgba(0, 0, 0, .5); } +.black-40 { color: rgba(0, 0, 0, .4); } +.black-30 { color: rgba(0, 0, 0, .3); } +.black-20 { color: rgba(0, 0, 0, .2); } +.black-10 { color: rgba(0, 0, 0, .1); } +.black-05 { color: rgba(0, 0, 0, .05); } +.white-90 { color: rgba(255, 255, 255, .9); } +.white-80 { color: rgba(255, 255, 255, .8); } +.white-70 { color: rgba(255, 255, 255, .7); } +.white-60 { color: rgba(255, 255, 255, .6); } +.white-50 { color: rgba(255, 255, 255, .5); } +.white-40 { color: rgba(255, 255, 255, .4); } +.white-30 { color: rgba(255, 255, 255, .3); } +.white-20 { color: rgba(255, 255, 255, .2); } +.white-10 { color: rgba(255, 255, 255, .1); } +.black { color: #000; } +.near-black { color: #111; } +.dark-gray { color: #333; } +.mid-gray { color: #555; } +.gray { color: #777; } +.silver { color: #999; } +.light-silver { color: #aaa; } +.moon-gray { color: #ccc; } +.light-gray { color: #eee; } +.near-white { color: #f4f4f4; } +.white { color: #fff; } +.dark-red { color: #e7040f; } +.red { color: #ff4136; } +.light-red { color: #ff725c; } +.orange { color: #ff6300; } +.gold { color: #ffb700; } +.yellow { color: #ffd700; } +.light-yellow { color: #fbf1a9; } +.purple { color: #5e2ca5; } +.light-purple { color: #a463f2; } +.dark-pink { color: #d5008f; } +.hot-pink { color: #ff41b4; } +.pink { color: #ff80cc; } +.light-pink { color: #ffa3d7; } +.dark-green { color: #137752; } +.green { color: #19a974; } +.light-green { color: #9eebcf; } +.navy { color: #001b44; } +.dark-blue { color: #00449e; } +.blue { color: #0594CB; } +.light-blue { color: #96ccff; } +.lightest-blue { color: #cdecff; } +.washed-blue { color: #f6fffe; } +.washed-green { color: #e8fdf5; } +.washed-yellow { color: #fffceb; } +.washed-red { color: #ffdfdf; } +.color-inherit { color: inherit; } +.bg-black-90 { background-color: rgba(0, 0, 0, .9); } +.bg-black-80 { background-color: rgba(0, 0, 0, .8); } +.bg-black-70 { background-color: rgba(0, 0, 0, .7); } +.bg-black-60 { background-color: rgba(0, 0, 0, .6); } +.bg-black-50 { background-color: rgba(0, 0, 0, .5); } +.bg-black-40 { background-color: rgba(0, 0, 0, .4); } +.bg-black-30 { background-color: rgba(0, 0, 0, .3); } +.bg-black-20 { background-color: rgba(0, 0, 0, .2); } +.bg-black-10 { background-color: rgba(0, 0, 0, .1); } +.bg-black-05 { background-color: rgba(0, 0, 0, .05); } +.bg-white-90 { background-color: rgba(255, 255, 255, .9); } +.bg-white-80 { background-color: rgba(255, 255, 255, .8); } +.bg-white-70 { background-color: rgba(255, 255, 255, .7); } +.bg-white-60 { background-color: rgba(255, 255, 255, .6); } +.bg-white-50 { background-color: rgba(255, 255, 255, .5); } +.bg-white-40 { background-color: rgba(255, 255, 255, .4); } +.bg-white-30 { background-color: rgba(255, 255, 255, .3); } +.bg-white-20 { background-color: rgba(255, 255, 255, .2); } +.bg-white-10 { background-color: rgba(255, 255, 255, .1); } +/* Background colors */ +.bg-black { background-color: #000; } +.bg-near-black { background-color: #111; } +.bg-dark-gray { background-color: #333; } +.bg-mid-gray { background-color: #555; } +.bg-gray { background-color: #777; } +.bg-silver { background-color: #999; } +.bg-light-silver { background-color: #aaa; } +.bg-moon-gray { background-color: #ccc; } +.bg-light-gray { background-color: #eee; } +.bg-near-white { background-color: #f4f4f4; } +.bg-white { background-color: #fff; } +.bg-transparent { background-color: transparent; } +.bg-dark-red { background-color: #e7040f; } +.bg-red { background-color: #ff4136; } +.bg-light-red { background-color: #ff725c; } +.bg-orange { background-color: #ff6300; } +.bg-gold { background-color: #ffb700; } +.bg-yellow { background-color: #ffd700; } +.bg-light-yellow { background-color: #fbf1a9; } +.bg-purple { background-color: #5e2ca5; } +.bg-light-purple { background-color: #a463f2; } +.bg-dark-pink { background-color: #d5008f; } +.bg-hot-pink { background-color: #ff41b4; } +.bg-pink { background-color: #ff80cc; } +.bg-light-pink { background-color: #ffa3d7; } +.bg-dark-green { background-color: #137752; } +.bg-green { background-color: #19a974; } +.bg-light-green { background-color: #9eebcf; } +.bg-navy { background-color: #001b44; } +.bg-dark-blue { background-color: #00449e; } +.bg-blue { background-color: #0594CB; } +.bg-light-blue { background-color: #96ccff; } +.bg-lightest-blue { background-color: #cdecff; } +.bg-washed-blue { background-color: #f6fffe; } +.bg-washed-green { background-color: #e8fdf5; } +.bg-washed-yellow { background-color: #fffceb; } +.bg-washed-red { background-color: #ffdfdf; } +.bg-inherit { background-color: inherit; } +/* + + SKINS:PSEUDO + + Customize the color of an element when + it is focused or hovered over. + + */ +.hover-black:hover, +.hover-black:focus { color: #000; } +.hover-near-black:hover, +.hover-near-black:focus { color: #111; } +.hover-dark-gray:hover, +.hover-dark-gray:focus { color: #333; } +.hover-mid-gray:hover, +.hover-mid-gray:focus { color: #555; } +.hover-gray:hover, +.hover-gray:focus { color: #777; } +.hover-silver:hover, +.hover-silver:focus { color: #999; } +.hover-light-silver:hover, +.hover-light-silver:focus { color: #aaa; } +.hover-moon-gray:hover, +.hover-moon-gray:focus { color: #ccc; } +.hover-light-gray:hover, +.hover-light-gray:focus { color: #eee; } +.hover-near-white:hover, +.hover-near-white:focus { color: #f4f4f4; } +.hover-white:hover, +.hover-white:focus { color: #fff; } +.hover-black-90:hover, +.hover-black-90:focus { color: rgba(0, 0, 0, .9); } +.hover-black-80:hover, +.hover-black-80:focus { color: rgba(0, 0, 0, .8); } +.hover-black-70:hover, +.hover-black-70:focus { color: rgba(0, 0, 0, .7); } +.hover-black-60:hover, +.hover-black-60:focus { color: rgba(0, 0, 0, .6); } +.hover-black-50:hover, +.hover-black-50:focus { color: rgba(0, 0, 0, .5); } +.hover-black-40:hover, +.hover-black-40:focus { color: rgba(0, 0, 0, .4); } +.hover-black-30:hover, +.hover-black-30:focus { color: rgba(0, 0, 0, .3); } +.hover-black-20:hover, +.hover-black-20:focus { color: rgba(0, 0, 0, .2); } +.hover-black-10:hover, +.hover-black-10:focus { color: rgba(0, 0, 0, .1); } +.hover-white-90:hover, +.hover-white-90:focus { color: rgba(255, 255, 255, .9); } +.hover-white-80:hover, +.hover-white-80:focus { color: rgba(255, 255, 255, .8); } +.hover-white-70:hover, +.hover-white-70:focus { color: rgba(255, 255, 255, .7); } +.hover-white-60:hover, +.hover-white-60:focus { color: rgba(255, 255, 255, .6); } +.hover-white-50:hover, +.hover-white-50:focus { color: rgba(255, 255, 255, .5); } +.hover-white-40:hover, +.hover-white-40:focus { color: rgba(255, 255, 255, .4); } +.hover-white-30:hover, +.hover-white-30:focus { color: rgba(255, 255, 255, .3); } +.hover-white-20:hover, +.hover-white-20:focus { color: rgba(255, 255, 255, .2); } +.hover-white-10:hover, +.hover-white-10:focus { color: rgba(255, 255, 255, .1); } +.hover-inherit:hover, +.hover-inherit:focus { color: inherit; } +.hover-bg-black:hover, +.hover-bg-black:focus { background-color: #000; } +.hover-bg-near-black:hover, +.hover-bg-near-black:focus { background-color: #111; } +.hover-bg-dark-gray:hover, +.hover-bg-dark-gray:focus { background-color: #333; } +.hover-bg-mid-gray:hover, +.hover-bg-mid-gray:focus { background-color: #555; } +.hover-bg-gray:hover, +.hover-bg-gray:focus { background-color: #777; } +.hover-bg-silver:hover, +.hover-bg-silver:focus { background-color: #999; } +.hover-bg-light-silver:hover, +.hover-bg-light-silver:focus { background-color: #aaa; } +.hover-bg-moon-gray:hover, +.hover-bg-moon-gray:focus { background-color: #ccc; } +.hover-bg-light-gray:hover, +.hover-bg-light-gray:focus { background-color: #eee; } +.hover-bg-near-white:hover, +.hover-bg-near-white:focus { background-color: #f4f4f4; } +.hover-bg-white:hover, +.hover-bg-white:focus { background-color: #fff; } +.hover-bg-transparent:hover, +.hover-bg-transparent:focus { background-color: transparent; } +.hover-bg-black-90:hover, +.hover-bg-black-90:focus { background-color: rgba(0, 0, 0, .9); } +.hover-bg-black-80:hover, +.hover-bg-black-80:focus { background-color: rgba(0, 0, 0, .8); } +.hover-bg-black-70:hover, +.hover-bg-black-70:focus { background-color: rgba(0, 0, 0, .7); } +.hover-bg-black-60:hover, +.hover-bg-black-60:focus { background-color: rgba(0, 0, 0, .6); } +.hover-bg-black-50:hover, +.hover-bg-black-50:focus { background-color: rgba(0, 0, 0, .5); } +.hover-bg-black-40:hover, +.hover-bg-black-40:focus { background-color: rgba(0, 0, 0, .4); } +.hover-bg-black-30:hover, +.hover-bg-black-30:focus { background-color: rgba(0, 0, 0, .3); } +.hover-bg-black-20:hover, +.hover-bg-black-20:focus { background-color: rgba(0, 0, 0, .2); } +.hover-bg-black-10:hover, +.hover-bg-black-10:focus { background-color: rgba(0, 0, 0, .1); } +.hover-bg-white-90:hover, +.hover-bg-white-90:focus { background-color: rgba(255, 255, 255, .9); } +.hover-bg-white-80:hover, +.hover-bg-white-80:focus { background-color: rgba(255, 255, 255, .8); } +.hover-bg-white-70:hover, +.hover-bg-white-70:focus { background-color: rgba(255, 255, 255, .7); } +.hover-bg-white-60:hover, +.hover-bg-white-60:focus { background-color: rgba(255, 255, 255, .6); } +.hover-bg-white-50:hover, +.hover-bg-white-50:focus { background-color: rgba(255, 255, 255, .5); } +.hover-bg-white-40:hover, +.hover-bg-white-40:focus { background-color: rgba(255, 255, 255, .4); } +.hover-bg-white-30:hover, +.hover-bg-white-30:focus { background-color: rgba(255, 255, 255, .3); } +.hover-bg-white-20:hover, +.hover-bg-white-20:focus { background-color: rgba(255, 255, 255, .2); } +.hover-bg-white-10:hover, +.hover-bg-white-10:focus { background-color: rgba(255, 255, 255, .1); } +.hover-dark-red:hover, +.hover-dark-red:focus { color: #e7040f; } +.hover-red:hover, +.hover-red:focus { color: #ff4136; } +.hover-light-red:hover, +.hover-light-red:focus { color: #ff725c; } +.hover-orange:hover, +.hover-orange:focus { color: #ff6300; } +.hover-gold:hover, +.hover-gold:focus { color: #ffb700; } +.hover-yellow:hover, +.hover-yellow:focus { color: #ffd700; } +.hover-light-yellow:hover, +.hover-light-yellow:focus { color: #fbf1a9; } +.hover-purple:hover, +.hover-purple:focus { color: #5e2ca5; } +.hover-light-purple:hover, +.hover-light-purple:focus { color: #a463f2; } +.hover-dark-pink:hover, +.hover-dark-pink:focus { color: #d5008f; } +.hover-hot-pink:hover, +.hover-hot-pink:focus { color: #ff41b4; } +.hover-pink:hover, +.hover-pink:focus { color: #ff80cc; } +.hover-light-pink:hover, +.hover-light-pink:focus { color: #ffa3d7; } +.hover-dark-green:hover, +.hover-dark-green:focus { color: #137752; } +.hover-green:hover, +.hover-green:focus { color: #19a974; } +.hover-light-green:hover, +.hover-light-green:focus { color: #9eebcf; } +.hover-navy:hover, +.hover-navy:focus { color: #001b44; } +.hover-dark-blue:hover, +.hover-dark-blue:focus { color: #00449e; } +.hover-blue:hover, +.hover-blue:focus { color: #0594CB; } +.hover-light-blue:hover, +.hover-light-blue:focus { color: #96ccff; } +.hover-lightest-blue:hover, +.hover-lightest-blue:focus { color: #cdecff; } +.hover-washed-blue:hover, +.hover-washed-blue:focus { color: #f6fffe; } +.hover-washed-green:hover, +.hover-washed-green:focus { color: #e8fdf5; } +.hover-washed-yellow:hover, +.hover-washed-yellow:focus { color: #fffceb; } +.hover-washed-red:hover, +.hover-washed-red:focus { color: #ffdfdf; } +.hover-bg-dark-red:hover, +.hover-bg-dark-red:focus { background-color: #e7040f; } +.hover-bg-red:hover, +.hover-bg-red:focus { background-color: #ff4136; } +.hover-bg-light-red:hover, +.hover-bg-light-red:focus { background-color: #ff725c; } +.hover-bg-orange:hover, +.hover-bg-orange:focus { background-color: #ff6300; } +.hover-bg-gold:hover, +.hover-bg-gold:focus { background-color: #ffb700; } +.hover-bg-yellow:hover, +.hover-bg-yellow:focus { background-color: #ffd700; } +.hover-bg-light-yellow:hover, +.hover-bg-light-yellow:focus { background-color: #fbf1a9; } +.hover-bg-purple:hover, +.hover-bg-purple:focus { background-color: #5e2ca5; } +.hover-bg-light-purple:hover, +.hover-bg-light-purple:focus { background-color: #a463f2; } +.hover-bg-dark-pink:hover, +.hover-bg-dark-pink:focus { background-color: #d5008f; } +.hover-bg-hot-pink:hover, +.hover-bg-hot-pink:focus { background-color: #ff41b4; } +.hover-bg-pink:hover, +.hover-bg-pink:focus { background-color: #ff80cc; } +.hover-bg-light-pink:hover, +.hover-bg-light-pink:focus { background-color: #ffa3d7; } +.hover-bg-dark-green:hover, +.hover-bg-dark-green:focus { background-color: #137752; } +.hover-bg-green:hover, +.hover-bg-green:focus { background-color: #19a974; } +.hover-bg-light-green:hover, +.hover-bg-light-green:focus { background-color: #9eebcf; } +.hover-bg-navy:hover, +.hover-bg-navy:focus { background-color: #001b44; } +.hover-bg-dark-blue:hover, +.hover-bg-dark-blue:focus { background-color: #00449e; } +.hover-bg-blue:hover, +.hover-bg-blue:focus { background-color: #0594CB; } +.hover-bg-light-blue:hover, +.hover-bg-light-blue:focus { background-color: #96ccff; } +.hover-bg-lightest-blue:hover, +.hover-bg-lightest-blue:focus { background-color: #cdecff; } +.hover-bg-washed-blue:hover, +.hover-bg-washed-blue:focus { background-color: #f6fffe; } +.hover-bg-washed-green:hover, +.hover-bg-washed-green:focus { background-color: #e8fdf5; } +.hover-bg-washed-yellow:hover, +.hover-bg-washed-yellow:focus { background-color: #fffceb; } +.hover-bg-washed-red:hover, +.hover-bg-washed-red:focus { background-color: #ffdfdf; } +.hover-bg-inherit:hover, +.hover-bg-inherit:focus { background-color: inherit; } +/* Variables */ +/* + SPACING + Docs: http://tachyons.io/docs/layout/spacing/ + + An eight step powers of two scale ranging from 0 to 16rem. + + Base: + p = padding + m = margin + + Modifiers: + a = all + h = horizontal + v = vertical + t = top + r = right + b = bottom + l = left + + 0 = none + 1 = 1st step in spacing scale + 2 = 2nd step in spacing scale + 3 = 3rd step in spacing scale + 4 = 4th step in spacing scale + 5 = 5th step in spacing scale + 6 = 6th step in spacing scale + 7 = 7th step in spacing scale + + Media Query Extensions: + -ns = not-small + -m = medium + -l = large + +*/ +.pa0 { padding: 0; } +.pa1 { padding: .25rem; } +.pa2 { padding: .5rem; } +.pa3 { padding: 1rem; } +.pa4 { padding: 2rem; } +.pa5 { padding: 4rem; } +.pa6 { padding: 8rem; } +.pa7 { padding: 16rem; } +.pl0 { padding-left: 0; } +.pl1 { padding-left: .25rem; } +.pl2 { padding-left: .5rem; } +.pl3 { padding-left: 1rem; } +.pl4 { padding-left: 2rem; } +.pl5 { padding-left: 4rem; } +.pl6 { padding-left: 8rem; } +.pl7 { padding-left: 16rem; } +.pr0 { padding-right: 0; } +.pr1 { padding-right: .25rem; } +.pr2 { padding-right: .5rem; } +.pr3 { padding-right: 1rem; } +.pr4 { padding-right: 2rem; } +.pr5 { padding-right: 4rem; } +.pr6 { padding-right: 8rem; } +.pr7 { padding-right: 16rem; } +.pb0 { padding-bottom: 0; } +.pb1 { padding-bottom: .25rem; } +.pb2 { padding-bottom: .5rem; } +.pb3 { padding-bottom: 1rem; } +.pb4 { padding-bottom: 2rem; } +.pb5 { padding-bottom: 4rem; } +.pb6 { padding-bottom: 8rem; } +.pb7 { padding-bottom: 16rem; } +.pt0 { padding-top: 0; } +.pt1 { padding-top: .25rem; } +.pt2 { padding-top: .5rem; } +.pt3 { padding-top: 1rem; } +.pt4 { padding-top: 2rem; } +.pt5 { padding-top: 4rem; } +.pt6 { padding-top: 8rem; } +.pt7 { padding-top: 16rem; } +.pv0 { + padding-top: 0; + padding-bottom: 0; +} +.pv1 { + padding-top: .25rem; + padding-bottom: .25rem; +} +.pv2 { + padding-top: .5rem; + padding-bottom: .5rem; +} +.pv3 { + padding-top: 1rem; + padding-bottom: 1rem; +} +.pv4 { + padding-top: 2rem; + padding-bottom: 2rem; +} +.pv5 { + padding-top: 4rem; + padding-bottom: 4rem; +} +.pv6 { + padding-top: 8rem; + padding-bottom: 8rem; +} +.pv7 { + padding-top: 16rem; + padding-bottom: 16rem; +} +.ph0 { + padding-left: 0; + padding-right: 0; +} +.ph1 { + padding-left: .25rem; + padding-right: .25rem; +} +.ph2 { + padding-left: .5rem; + padding-right: .5rem; +} +.ph3 { + padding-left: 1rem; + padding-right: 1rem; +} +.ph4 { + padding-left: 2rem; + padding-right: 2rem; +} +.ph5 { + padding-left: 4rem; + padding-right: 4rem; +} +.ph6 { + padding-left: 8rem; + padding-right: 8rem; +} +.ph7 { + padding-left: 16rem; + padding-right: 16rem; +} +.ma0 { margin: 0; } +.ma1 { margin: .25rem; } +.ma2 { margin: .5rem; } +.ma3 { margin: 1rem; } +.ma4 { margin: 2rem; } +.ma5 { margin: 4rem; } +.ma6 { margin: 8rem; } +.ma7 { margin: 16rem; } +.ml0 { margin-left: 0; } +.ml1 { margin-left: .25rem; } +.ml2 { margin-left: .5rem; } +.ml3 { margin-left: 1rem; } +.ml4 { margin-left: 2rem; } +.ml5 { margin-left: 4rem; } +.ml6 { margin-left: 8rem; } +.ml7 { margin-left: 16rem; } +.mr0 { margin-right: 0; } +.mr1 { margin-right: .25rem; } +.mr2 { margin-right: .5rem; } +.mr3 { margin-right: 1rem; } +.mr4 { margin-right: 2rem; } +.mr5 { margin-right: 4rem; } +.mr6 { margin-right: 8rem; } +.mr7 { margin-right: 16rem; } +.mb0 { margin-bottom: 0; } +.mb1 { margin-bottom: .25rem; } +.mb2 { margin-bottom: .5rem; } +.mb3 { margin-bottom: 1rem; } +.mb4 { margin-bottom: 2rem; } +.mb5 { margin-bottom: 4rem; } +.mb6 { margin-bottom: 8rem; } +.mb7 { margin-bottom: 16rem; } +.mt0 { margin-top: 0; } +.mt1 { margin-top: .25rem; } +.mt2 { margin-top: .5rem; } +.mt3 { margin-top: 1rem; } +.mt4 { margin-top: 2rem; } +.mt5 { margin-top: 4rem; } +.mt6 { margin-top: 8rem; } +.mt7 { margin-top: 16rem; } +.mv0 { + margin-top: 0; + margin-bottom: 0; +} +.mv1 { + margin-top: .25rem; + margin-bottom: .25rem; +} +.mv2 { + margin-top: .5rem; + margin-bottom: .5rem; +} +.mv3 { + margin-top: 1rem; + margin-bottom: 1rem; +} +.mv4 { + margin-top: 2rem; + margin-bottom: 2rem; +} +.mv5 { + margin-top: 4rem; + margin-bottom: 4rem; +} +.mv6 { + margin-top: 8rem; + margin-bottom: 8rem; +} +.mv7 { + margin-top: 16rem; + margin-bottom: 16rem; +} +.mh0 { + margin-left: 0; + margin-right: 0; +} +.mh1 { + margin-left: .25rem; + margin-right: .25rem; +} +.mh2 { + margin-left: .5rem; + margin-right: .5rem; +} +.mh3 { + margin-left: 1rem; + margin-right: 1rem; +} +.mh4 { + margin-left: 2rem; + margin-right: 2rem; +} +.mh5 { + margin-left: 4rem; + margin-right: 4rem; +} +.mh6 { + margin-left: 8rem; + margin-right: 8rem; +} +.mh7 { + margin-left: 16rem; + margin-right: 16rem; +} +@media screen and (min-width: 30em) { + .pa0-ns { padding: 0; } + .pa1-ns { padding: .25rem; } + .pa2-ns { padding: .5rem; } + .pa3-ns { padding: 1rem; } + .pa4-ns { padding: 2rem; } + .pa5-ns { padding: 4rem; } + .pa6-ns { padding: 8rem; } + .pa7-ns { padding: 16rem; } + + .pl0-ns { padding-left: 0; } + .pl1-ns { padding-left: .25rem; } + .pl2-ns { padding-left: .5rem; } + .pl3-ns { padding-left: 1rem; } + .pl4-ns { padding-left: 2rem; } + .pl5-ns { padding-left: 4rem; } + .pl6-ns { padding-left: 8rem; } + .pl7-ns { padding-left: 16rem; } + + .pr0-ns { padding-right: 0; } + .pr1-ns { padding-right: .25rem; } + .pr2-ns { padding-right: .5rem; } + .pr3-ns { padding-right: 1rem; } + .pr4-ns { padding-right: 2rem; } + .pr5-ns { padding-right: 4rem; } + .pr6-ns { padding-right: 8rem; } + .pr7-ns { padding-right: 16rem; } + + .pb0-ns { padding-bottom: 0; } + .pb1-ns { padding-bottom: .25rem; } + .pb2-ns { padding-bottom: .5rem; } + .pb3-ns { padding-bottom: 1rem; } + .pb4-ns { padding-bottom: 2rem; } + .pb5-ns { padding-bottom: 4rem; } + .pb6-ns { padding-bottom: 8rem; } + .pb7-ns { padding-bottom: 16rem; } + + .pt0-ns { padding-top: 0; } + .pt1-ns { padding-top: .25rem; } + .pt2-ns { padding-top: .5rem; } + .pt3-ns { padding-top: 1rem; } + .pt4-ns { padding-top: 2rem; } + .pt5-ns { padding-top: 4rem; } + .pt6-ns { padding-top: 8rem; } + .pt7-ns { padding-top: 16rem; } + + .pv0-ns { + padding-top: 0; + padding-bottom: 0; + } + .pv1-ns { + padding-top: .25rem; + padding-bottom: .25rem; + } + .pv2-ns { + padding-top: .5rem; + padding-bottom: .5rem; + } + .pv3-ns { + padding-top: 1rem; + padding-bottom: 1rem; + } + .pv4-ns { + padding-top: 2rem; + padding-bottom: 2rem; + } + .pv5-ns { + padding-top: 4rem; + padding-bottom: 4rem; + } + .pv6-ns { + padding-top: 8rem; + padding-bottom: 8rem; + } + .pv7-ns { + padding-top: 16rem; + padding-bottom: 16rem; + } + .ph0-ns { + padding-left: 0; + padding-right: 0; + } + .ph1-ns { + padding-left: .25rem; + padding-right: .25rem; + } + .ph2-ns { + padding-left: .5rem; + padding-right: .5rem; + } + .ph3-ns { + padding-left: 1rem; + padding-right: 1rem; + } + .ph4-ns { + padding-left: 2rem; + padding-right: 2rem; + } + .ph5-ns { + padding-left: 4rem; + padding-right: 4rem; + } + .ph6-ns { + padding-left: 8rem; + padding-right: 8rem; + } + .ph7-ns { + padding-left: 16rem; + padding-right: 16rem; + } + + .ma0-ns { margin: 0; } + .ma1-ns { margin: .25rem; } + .ma2-ns { margin: .5rem; } + .ma3-ns { margin: 1rem; } + .ma4-ns { margin: 2rem; } + .ma5-ns { margin: 4rem; } + .ma6-ns { margin: 8rem; } + .ma7-ns { margin: 16rem; } + + .ml0-ns { margin-left: 0; } + .ml1-ns { margin-left: .25rem; } + .ml2-ns { margin-left: .5rem; } + .ml3-ns { margin-left: 1rem; } + .ml4-ns { margin-left: 2rem; } + .ml5-ns { margin-left: 4rem; } + .ml6-ns { margin-left: 8rem; } + .ml7-ns { margin-left: 16rem; } + + .mr0-ns { margin-right: 0; } + .mr1-ns { margin-right: .25rem; } + .mr2-ns { margin-right: .5rem; } + .mr3-ns { margin-right: 1rem; } + .mr4-ns { margin-right: 2rem; } + .mr5-ns { margin-right: 4rem; } + .mr6-ns { margin-right: 8rem; } + .mr7-ns { margin-right: 16rem; } + + .mb0-ns { margin-bottom: 0; } + .mb1-ns { margin-bottom: .25rem; } + .mb2-ns { margin-bottom: .5rem; } + .mb3-ns { margin-bottom: 1rem; } + .mb4-ns { margin-bottom: 2rem; } + .mb5-ns { margin-bottom: 4rem; } + .mb6-ns { margin-bottom: 8rem; } + .mb7-ns { margin-bottom: 16rem; } + + .mt0-ns { margin-top: 0; } + .mt1-ns { margin-top: .25rem; } + .mt2-ns { margin-top: .5rem; } + .mt3-ns { margin-top: 1rem; } + .mt4-ns { margin-top: 2rem; } + .mt5-ns { margin-top: 4rem; } + .mt6-ns { margin-top: 8rem; } + .mt7-ns { margin-top: 16rem; } + + .mv0-ns { + margin-top: 0; + margin-bottom: 0; + } + .mv1-ns { + margin-top: .25rem; + margin-bottom: .25rem; + } + .mv2-ns { + margin-top: .5rem; + margin-bottom: .5rem; + } + .mv3-ns { + margin-top: 1rem; + margin-bottom: 1rem; + } + .mv4-ns { + margin-top: 2rem; + margin-bottom: 2rem; + } + .mv5-ns { + margin-top: 4rem; + margin-bottom: 4rem; + } + .mv6-ns { + margin-top: 8rem; + margin-bottom: 8rem; + } + .mv7-ns { + margin-top: 16rem; + margin-bottom: 16rem; + } + + .mh0-ns { + margin-left: 0; + margin-right: 0; + } + .mh1-ns { + margin-left: .25rem; + margin-right: .25rem; + } + .mh2-ns { + margin-left: .5rem; + margin-right: .5rem; + } + .mh3-ns { + margin-left: 1rem; + margin-right: 1rem; + } + .mh4-ns { + margin-left: 2rem; + margin-right: 2rem; + } + .mh5-ns { + margin-left: 4rem; + margin-right: 4rem; + } + .mh6-ns { + margin-left: 8rem; + margin-right: 8rem; + } + .mh7-ns { + margin-left: 16rem; + margin-right: 16rem; + } + +} +@media screen and (min-width: 30em) and (max-width: 60em) { + .pa0-m { padding: 0; } + .pa1-m { padding: .25rem; } + .pa2-m { padding: .5rem; } + .pa3-m { padding: 1rem; } + .pa4-m { padding: 2rem; } + .pa5-m { padding: 4rem; } + .pa6-m { padding: 8rem; } + .pa7-m { padding: 16rem; } + + .pl0-m { padding-left: 0; } + .pl1-m { padding-left: .25rem; } + .pl2-m { padding-left: .5rem; } + .pl3-m { padding-left: 1rem; } + .pl4-m { padding-left: 2rem; } + .pl5-m { padding-left: 4rem; } + .pl6-m { padding-left: 8rem; } + .pl7-m { padding-left: 16rem; } + + .pr0-m { padding-right: 0; } + .pr1-m { padding-right: .25rem; } + .pr2-m { padding-right: .5rem; } + .pr3-m { padding-right: 1rem; } + .pr4-m { padding-right: 2rem; } + .pr5-m { padding-right: 4rem; } + .pr6-m { padding-right: 8rem; } + .pr7-m { padding-right: 16rem; } + + .pb0-m { padding-bottom: 0; } + .pb1-m { padding-bottom: .25rem; } + .pb2-m { padding-bottom: .5rem; } + .pb3-m { padding-bottom: 1rem; } + .pb4-m { padding-bottom: 2rem; } + .pb5-m { padding-bottom: 4rem; } + .pb6-m { padding-bottom: 8rem; } + .pb7-m { padding-bottom: 16rem; } + + .pt0-m { padding-top: 0; } + .pt1-m { padding-top: .25rem; } + .pt2-m { padding-top: .5rem; } + .pt3-m { padding-top: 1rem; } + .pt4-m { padding-top: 2rem; } + .pt5-m { padding-top: 4rem; } + .pt6-m { padding-top: 8rem; } + .pt7-m { padding-top: 16rem; } + + .pv0-m { + padding-top: 0; + padding-bottom: 0; + } + .pv1-m { + padding-top: .25rem; + padding-bottom: .25rem; + } + .pv2-m { + padding-top: .5rem; + padding-bottom: .5rem; + } + .pv3-m { + padding-top: 1rem; + padding-bottom: 1rem; + } + .pv4-m { + padding-top: 2rem; + padding-bottom: 2rem; + } + .pv5-m { + padding-top: 4rem; + padding-bottom: 4rem; + } + .pv6-m { + padding-top: 8rem; + padding-bottom: 8rem; + } + .pv7-m { + padding-top: 16rem; + padding-bottom: 16rem; + } + + .ph0-m { + padding-left: 0; + padding-right: 0; + } + .ph1-m { + padding-left: .25rem; + padding-right: .25rem; + } + .ph2-m { + padding-left: .5rem; + padding-right: .5rem; + } + .ph3-m { + padding-left: 1rem; + padding-right: 1rem; + } + .ph4-m { + padding-left: 2rem; + padding-right: 2rem; + } + .ph5-m { + padding-left: 4rem; + padding-right: 4rem; + } + .ph6-m { + padding-left: 8rem; + padding-right: 8rem; + } + .ph7-m { + padding-left: 16rem; + padding-right: 16rem; + } + + .ma0-m { margin: 0; } + .ma1-m { margin: .25rem; } + .ma2-m { margin: .5rem; } + .ma3-m { margin: 1rem; } + .ma4-m { margin: 2rem; } + .ma5-m { margin: 4rem; } + .ma6-m { margin: 8rem; } + .ma7-m { margin: 16rem; } + + .ml0-m { margin-left: 0; } + .ml1-m { margin-left: .25rem; } + .ml2-m { margin-left: .5rem; } + .ml3-m { margin-left: 1rem; } + .ml4-m { margin-left: 2rem; } + .ml5-m { margin-left: 4rem; } + .ml6-m { margin-left: 8rem; } + .ml7-m { margin-left: 16rem; } + + .mr0-m { margin-right: 0; } + .mr1-m { margin-right: .25rem; } + .mr2-m { margin-right: .5rem; } + .mr3-m { margin-right: 1rem; } + .mr4-m { margin-right: 2rem; } + .mr5-m { margin-right: 4rem; } + .mr6-m { margin-right: 8rem; } + .mr7-m { margin-right: 16rem; } + + .mb0-m { margin-bottom: 0; } + .mb1-m { margin-bottom: .25rem; } + .mb2-m { margin-bottom: .5rem; } + .mb3-m { margin-bottom: 1rem; } + .mb4-m { margin-bottom: 2rem; } + .mb5-m { margin-bottom: 4rem; } + .mb6-m { margin-bottom: 8rem; } + .mb7-m { margin-bottom: 16rem; } + + .mt0-m { margin-top: 0; } + .mt1-m { margin-top: .25rem; } + .mt2-m { margin-top: .5rem; } + .mt3-m { margin-top: 1rem; } + .mt4-m { margin-top: 2rem; } + .mt5-m { margin-top: 4rem; } + .mt6-m { margin-top: 8rem; } + .mt7-m { margin-top: 16rem; } + + .mv0-m { + margin-top: 0; + margin-bottom: 0; + } + .mv1-m { + margin-top: .25rem; + margin-bottom: .25rem; + } + .mv2-m { + margin-top: .5rem; + margin-bottom: .5rem; + } + .mv3-m { + margin-top: 1rem; + margin-bottom: 1rem; + } + .mv4-m { + margin-top: 2rem; + margin-bottom: 2rem; + } + .mv5-m { + margin-top: 4rem; + margin-bottom: 4rem; + } + .mv6-m { + margin-top: 8rem; + margin-bottom: 8rem; + } + .mv7-m { + margin-top: 16rem; + margin-bottom: 16rem; + } + + .mh0-m { + margin-left: 0; + margin-right: 0; + } + .mh1-m { + margin-left: .25rem; + margin-right: .25rem; + } + .mh2-m { + margin-left: .5rem; + margin-right: .5rem; + } + .mh3-m { + margin-left: 1rem; + margin-right: 1rem; + } + .mh4-m { + margin-left: 2rem; + margin-right: 2rem; + } + .mh5-m { + margin-left: 4rem; + margin-right: 4rem; + } + .mh6-m { + margin-left: 8rem; + margin-right: 8rem; + } + .mh7-m { + margin-left: 16rem; + margin-right: 16rem; + } + +} +@media screen and (min-width: 60em) { + .pa0-l { padding: 0; } + .pa1-l { padding: .25rem; } + .pa2-l { padding: .5rem; } + .pa3-l { padding: 1rem; } + .pa4-l { padding: 2rem; } + .pa5-l { padding: 4rem; } + .pa6-l { padding: 8rem; } + .pa7-l { padding: 16rem; } + + .pl0-l { padding-left: 0; } + .pl1-l { padding-left: .25rem; } + .pl2-l { padding-left: .5rem; } + .pl3-l { padding-left: 1rem; } + .pl4-l { padding-left: 2rem; } + .pl5-l { padding-left: 4rem; } + .pl6-l { padding-left: 8rem; } + .pl7-l { padding-left: 16rem; } + + .pr0-l { padding-right: 0; } + .pr1-l { padding-right: .25rem; } + .pr2-l { padding-right: .5rem; } + .pr3-l { padding-right: 1rem; } + .pr4-l { padding-right: 2rem; } + .pr5-l { padding-right: 4rem; } + .pr6-l { padding-right: 8rem; } + .pr7-l { padding-right: 16rem; } + + .pb0-l { padding-bottom: 0; } + .pb1-l { padding-bottom: .25rem; } + .pb2-l { padding-bottom: .5rem; } + .pb3-l { padding-bottom: 1rem; } + .pb4-l { padding-bottom: 2rem; } + .pb5-l { padding-bottom: 4rem; } + .pb6-l { padding-bottom: 8rem; } + .pb7-l { padding-bottom: 16rem; } + + .pt0-l { padding-top: 0; } + .pt1-l { padding-top: .25rem; } + .pt2-l { padding-top: .5rem; } + .pt3-l { padding-top: 1rem; } + .pt4-l { padding-top: 2rem; } + .pt5-l { padding-top: 4rem; } + .pt6-l { padding-top: 8rem; } + .pt7-l { padding-top: 16rem; } + + .pv0-l { + padding-top: 0; + padding-bottom: 0; + } + .pv1-l { + padding-top: .25rem; + padding-bottom: .25rem; + } + .pv2-l { + padding-top: .5rem; + padding-bottom: .5rem; + } + .pv3-l { + padding-top: 1rem; + padding-bottom: 1rem; + } + .pv4-l { + padding-top: 2rem; + padding-bottom: 2rem; + } + .pv5-l { + padding-top: 4rem; + padding-bottom: 4rem; + } + .pv6-l { + padding-top: 8rem; + padding-bottom: 8rem; + } + .pv7-l { + padding-top: 16rem; + padding-bottom: 16rem; + } + + .ph0-l { + padding-left: 0; + padding-right: 0; + } + .ph1-l { + padding-left: .25rem; + padding-right: .25rem; + } + .ph2-l { + padding-left: .5rem; + padding-right: .5rem; + } + .ph3-l { + padding-left: 1rem; + padding-right: 1rem; + } + .ph4-l { + padding-left: 2rem; + padding-right: 2rem; + } + .ph5-l { + padding-left: 4rem; + padding-right: 4rem; + } + .ph6-l { + padding-left: 8rem; + padding-right: 8rem; + } + .ph7-l { + padding-left: 16rem; + padding-right: 16rem; + } + + .ma0-l { margin: 0; } + .ma1-l { margin: .25rem; } + .ma2-l { margin: .5rem; } + .ma3-l { margin: 1rem; } + .ma4-l { margin: 2rem; } + .ma5-l { margin: 4rem; } + .ma6-l { margin: 8rem; } + .ma7-l { margin: 16rem; } + + .ml0-l { margin-left: 0; } + .ml1-l { margin-left: .25rem; } + .ml2-l { margin-left: .5rem; } + .ml3-l { margin-left: 1rem; } + .ml4-l { margin-left: 2rem; } + .ml5-l { margin-left: 4rem; } + .ml6-l { margin-left: 8rem; } + .ml7-l { margin-left: 16rem; } + + .mr0-l { margin-right: 0; } + .mr1-l { margin-right: .25rem; } + .mr2-l { margin-right: .5rem; } + .mr3-l { margin-right: 1rem; } + .mr4-l { margin-right: 2rem; } + .mr5-l { margin-right: 4rem; } + .mr6-l { margin-right: 8rem; } + .mr7-l { margin-right: 16rem; } + + .mb0-l { margin-bottom: 0; } + .mb1-l { margin-bottom: .25rem; } + .mb2-l { margin-bottom: .5rem; } + .mb3-l { margin-bottom: 1rem; } + .mb4-l { margin-bottom: 2rem; } + .mb5-l { margin-bottom: 4rem; } + .mb6-l { margin-bottom: 8rem; } + .mb7-l { margin-bottom: 16rem; } + + .mt0-l { margin-top: 0; } + .mt1-l { margin-top: .25rem; } + .mt2-l { margin-top: .5rem; } + .mt3-l { margin-top: 1rem; } + .mt4-l { margin-top: 2rem; } + .mt5-l { margin-top: 4rem; } + .mt6-l { margin-top: 8rem; } + .mt7-l { margin-top: 16rem; } + + .mv0-l { + margin-top: 0; + margin-bottom: 0; + } + .mv1-l { + margin-top: .25rem; + margin-bottom: .25rem; + } + .mv2-l { + margin-top: .5rem; + margin-bottom: .5rem; + } + .mv3-l { + margin-top: 1rem; + margin-bottom: 1rem; + } + .mv4-l { + margin-top: 2rem; + margin-bottom: 2rem; + } + .mv5-l { + margin-top: 4rem; + margin-bottom: 4rem; + } + .mv6-l { + margin-top: 8rem; + margin-bottom: 8rem; + } + .mv7-l { + margin-top: 16rem; + margin-bottom: 16rem; + } + + .mh0-l { + margin-left: 0; + margin-right: 0; + } + .mh1-l { + margin-left: .25rem; + margin-right: .25rem; + } + .mh2-l { + margin-left: .5rem; + margin-right: .5rem; + } + .mh3-l { + margin-left: 1rem; + margin-right: 1rem; + } + .mh4-l { + margin-left: 2rem; + margin-right: 2rem; + } + .mh5-l { + margin-left: 4rem; + margin-right: 4rem; + } + .mh6-l { + margin-left: 8rem; + margin-right: 8rem; + } + .mh7-l { + margin-left: 16rem; + margin-right: 16rem; + } +} +/* + NEGATIVE MARGINS + + Base: + n = negative + + Modifiers: + a = all + t = top + r = right + b = bottom + l = left + + 1 = 1st step in spacing scale + 2 = 2nd step in spacing scale + 3 = 3rd step in spacing scale + 4 = 4th step in spacing scale + 5 = 5th step in spacing scale + 6 = 6th step in spacing scale + 7 = 7th step in spacing scale + + Media Query Extensions: + -ns = not-small + -m = medium + -l = large + +*/ +.na1 { margin: -0.25rem; } +.na2 { margin: -0.5rem; } +.na3 { margin: -1rem; } +.na4 { margin: -2rem; } +.na5 { margin: -4rem; } +.na6 { margin: -8rem; } +.na7 { margin: -16rem; } +.nl1 { margin-left: -0.25rem; } +.nl2 { margin-left: -0.5rem; } +.nl3 { margin-left: -1rem; } +.nl4 { margin-left: -2rem; } +.nl5 { margin-left: -4rem; } +.nl6 { margin-left: -8rem; } +.nl7 { margin-left: -16rem; } +.nr1 { margin-right: -0.25rem; } +.nr2 { margin-right: -0.5rem; } +.nr3 { margin-right: -1rem; } +.nr4 { margin-right: -2rem; } +.nr5 { margin-right: -4rem; } +.nr6 { margin-right: -8rem; } +.nr7 { margin-right: -16rem; } +.nb1 { margin-bottom: -0.25rem; } +.nb2 { margin-bottom: -0.5rem; } +.nb3 { margin-bottom: -1rem; } +.nb4 { margin-bottom: -2rem; } +.nb5 { margin-bottom: -4rem; } +.nb6 { margin-bottom: -8rem; } +.nb7 { margin-bottom: -16rem; } +.nt1 { margin-top: -0.25rem; } +.nt2 { margin-top: -0.5rem; } +.nt3 { margin-top: -1rem; } +.nt4 { margin-top: -2rem; } +.nt5 { margin-top: -4rem; } +.nt6 { margin-top: -8rem; } +.nt7 { margin-top: -16rem; } +@media screen and (min-width: 30em) { + + .na1-ns { margin: -0.25rem; } + .na2-ns { margin: -0.5rem; } + .na3-ns { margin: -1rem; } + .na4-ns { margin: -2rem; } + .na5-ns { margin: -4rem; } + .na6-ns { margin: -8rem; } + .na7-ns { margin: -16rem; } + + .nl1-ns { margin-left: -0.25rem; } + .nl2-ns { margin-left: -0.5rem; } + .nl3-ns { margin-left: -1rem; } + .nl4-ns { margin-left: -2rem; } + .nl5-ns { margin-left: -4rem; } + .nl6-ns { margin-left: -8rem; } + .nl7-ns { margin-left: -16rem; } + + .nr1-ns { margin-right: -0.25rem; } + .nr2-ns { margin-right: -0.5rem; } + .nr3-ns { margin-right: -1rem; } + .nr4-ns { margin-right: -2rem; } + .nr5-ns { margin-right: -4rem; } + .nr6-ns { margin-right: -8rem; } + .nr7-ns { margin-right: -16rem; } + + .nb1-ns { margin-bottom: -0.25rem; } + .nb2-ns { margin-bottom: -0.5rem; } + .nb3-ns { margin-bottom: -1rem; } + .nb4-ns { margin-bottom: -2rem; } + .nb5-ns { margin-bottom: -4rem; } + .nb6-ns { margin-bottom: -8rem; } + .nb7-ns { margin-bottom: -16rem; } + + .nt1-ns { margin-top: -0.25rem; } + .nt2-ns { margin-top: -0.5rem; } + .nt3-ns { margin-top: -1rem; } + .nt4-ns { margin-top: -2rem; } + .nt5-ns { margin-top: -4rem; } + .nt6-ns { margin-top: -8rem; } + .nt7-ns { margin-top: -16rem; } + +} +@media screen and (min-width: 30em) and (max-width: 60em) { + .na1-m { margin: -0.25rem; } + .na2-m { margin: -0.5rem; } + .na3-m { margin: -1rem; } + .na4-m { margin: -2rem; } + .na5-m { margin: -4rem; } + .na6-m { margin: -8rem; } + .na7-m { margin: -16rem; } + + .nl1-m { margin-left: -0.25rem; } + .nl2-m { margin-left: -0.5rem; } + .nl3-m { margin-left: -1rem; } + .nl4-m { margin-left: -2rem; } + .nl5-m { margin-left: -4rem; } + .nl6-m { margin-left: -8rem; } + .nl7-m { margin-left: -16rem; } + + .nr1-m { margin-right: -0.25rem; } + .nr2-m { margin-right: -0.5rem; } + .nr3-m { margin-right: -1rem; } + .nr4-m { margin-right: -2rem; } + .nr5-m { margin-right: -4rem; } + .nr6-m { margin-right: -8rem; } + .nr7-m { margin-right: -16rem; } + + .nb1-m { margin-bottom: -0.25rem; } + .nb2-m { margin-bottom: -0.5rem; } + .nb3-m { margin-bottom: -1rem; } + .nb4-m { margin-bottom: -2rem; } + .nb5-m { margin-bottom: -4rem; } + .nb6-m { margin-bottom: -8rem; } + .nb7-m { margin-bottom: -16rem; } + + .nt1-m { margin-top: -0.25rem; } + .nt2-m { margin-top: -0.5rem; } + .nt3-m { margin-top: -1rem; } + .nt4-m { margin-top: -2rem; } + .nt5-m { margin-top: -4rem; } + .nt6-m { margin-top: -8rem; } + .nt7-m { margin-top: -16rem; } + +} +@media screen and (min-width: 60em) { + .na1-l { margin: -0.25rem; } + .na2-l { margin: -0.5rem; } + .na3-l { margin: -1rem; } + .na4-l { margin: -2rem; } + .na5-l { margin: -4rem; } + .na6-l { margin: -8rem; } + .na7-l { margin: -16rem; } + + .nl1-l { margin-left: -0.25rem; } + .nl2-l { margin-left: -0.5rem; } + .nl3-l { margin-left: -1rem; } + .nl4-l { margin-left: -2rem; } + .nl5-l { margin-left: -4rem; } + .nl6-l { margin-left: -8rem; } + .nl7-l { margin-left: -16rem; } + + .nr1-l { margin-right: -0.25rem; } + .nr2-l { margin-right: -0.5rem; } + .nr3-l { margin-right: -1rem; } + .nr4-l { margin-right: -2rem; } + .nr5-l { margin-right: -4rem; } + .nr6-l { margin-right: -8rem; } + .nr7-l { margin-right: -16rem; } + + .nb1-l { margin-bottom: -0.25rem; } + .nb2-l { margin-bottom: -0.5rem; } + .nb3-l { margin-bottom: -1rem; } + .nb4-l { margin-bottom: -2rem; } + .nb5-l { margin-bottom: -4rem; } + .nb6-l { margin-bottom: -8rem; } + .nb7-l { margin-bottom: -16rem; } + + .nt1-l { margin-top: -0.25rem; } + .nt2-l { margin-top: -0.5rem; } + .nt3-l { margin-top: -1rem; } + .nt4-l { margin-top: -2rem; } + .nt5-l { margin-top: -4rem; } + .nt6-l { margin-top: -8rem; } + .nt7-l { margin-top: -16rem; } +} +/* + + TABLES + Docs: http://tachyons.io/docs/elements/tables/ + +*/ +.collapse { + border-collapse: collapse; + border-spacing: 0; +} +.striped--light-silver:nth-child(odd) { + background-color: #aaa; +} +.striped--moon-gray:nth-child(odd) { + background-color: #ccc; +} +.striped--light-gray:nth-child(odd) { + background-color: #eee; +} +.striped--near-white:nth-child(odd) { + background-color: #f4f4f4; +} +.stripe-light:nth-child(odd) { + background-color: rgba(255, 255, 255, .1); +} +.stripe-dark:nth-child(odd) { + background-color: rgba(0, 0, 0, .1); +} +/* + + TEXT DECORATION + Docs: http://tachyons.io/docs/typography/text-decoration/ + + + Media Query Extensions: + -ns = not-small + -m = medium + -l = large + +*/ +.strike { text-decoration: line-through; } +.underline { text-decoration: underline; } +.no-underline { text-decoration: none; } +@media screen and (min-width: 30em) { + .strike-ns { text-decoration: line-through; } + .underline-ns { text-decoration: underline; } + .no-underline-ns { text-decoration: none; } +} +@media screen and (min-width: 30em) and (max-width: 60em) { + .strike-m { text-decoration: line-through; } + .underline-m { text-decoration: underline; } + .no-underline-m { text-decoration: none; } +} +@media screen and (min-width: 60em) { + .strike-l { text-decoration: line-through; } + .underline-l { text-decoration: underline; } + .no-underline-l { text-decoration: none; } +} +/* + + TEXT ALIGN + Docs: http://tachyons.io/docs/typography/text-align/ + + Base + t = text-align + + Modifiers + l = left + r = right + c = center + j = justify + + Media Query Extensions: + -ns = not-small + -m = medium + -l = large + +*/ +.tl { text-align: left; } +.tr { text-align: right; } +.tc { text-align: center; } +.tj { text-align: justify; } +@media screen and (min-width: 30em) { + .tl-ns { text-align: left; } + .tr-ns { text-align: right; } + .tc-ns { text-align: center; } + .tj-ns { text-align: justify; } +} +@media screen and (min-width: 30em) and (max-width: 60em) { + .tl-m { text-align: left; } + .tr-m { text-align: right; } + .tc-m { text-align: center; } + .tj-m { text-align: justify; } +} +@media screen and (min-width: 60em) { + .tl-l { text-align: left; } + .tr-l { text-align: right; } + .tc-l { text-align: center; } + .tj-l { text-align: justify; } +} +/* + + TEXT TRANSFORM + Docs: http://tachyons.io/docs/typography/text-transform/ + + Base: + tt = text-transform + + Modifiers + c = capitalize + l = lowercase + u = uppercase + n = none + + Media Query Extensions: + -ns = not-small + -m = medium + -l = large + +*/ +.ttc { text-transform: capitalize; } +.ttl { text-transform: lowercase; } +.ttu { text-transform: uppercase; } +.ttn { text-transform: none; } +@media screen and (min-width: 30em) { + .ttc-ns { text-transform: capitalize; } + .ttl-ns { text-transform: lowercase; } + .ttu-ns { text-transform: uppercase; } + .ttn-ns { text-transform: none; } +} +@media screen and (min-width: 30em) and (max-width: 60em) { + .ttc-m { text-transform: capitalize; } + .ttl-m { text-transform: lowercase; } + .ttu-m { text-transform: uppercase; } + .ttn-m { text-transform: none; } +} +@media screen and (min-width: 60em) { + .ttc-l { text-transform: capitalize; } + .ttl-l { text-transform: lowercase; } + .ttu-l { text-transform: uppercase; } + .ttn-l { text-transform: none; } +} +/* + + TYPE SCALE + Docs: http://tachyons.io/docs/typography/scale/ + + Base: + f = font-size + + Modifiers + 1 = 1st step in size scale + 2 = 2nd step in size scale + 3 = 3rd step in size scale + 4 = 4th step in size scale + 5 = 5th step in size scale + 6 = 6th step in size scale + 7 = 7th step in size scale + + Media Query Extensions: + -ns = not-small + -m = medium + -l = large +*/ +/* + * For Hero/Marketing Titles + * + * These generally are too large for mobile + * so be careful using them on smaller screens. + * */ +.f-6, +.f-headline { + font-size: 6rem; +} +.f-5, +.f-subheadline { + font-size: 5rem; +} +/* Type Scale */ +.f1 { font-size: 3rem; } +.f2 { font-size: 2.25rem; } +.f3 { font-size: 1.5rem; } +.f4 { font-size: 1.25rem; } +.f5 { font-size: 1rem; } +.f6 { font-size: .875rem; } +.f7 { font-size: .75rem; } +/* Small and hard to read for many people so use with extreme caution */ +@media screen and (min-width: 30em){ + .f-6-ns, + .f-headline-ns { font-size: 6rem; } + .f-5-ns, + .f-subheadline-ns { font-size: 5rem; } + .f1-ns { font-size: 3rem; } + .f2-ns { font-size: 2.25rem; } + .f3-ns { font-size: 1.5rem; } + .f4-ns { font-size: 1.25rem; } + .f5-ns { font-size: 1rem; } + .f6-ns { font-size: .875rem; } + .f7-ns { font-size: .75rem; } +} +@media screen and (min-width: 30em) and (max-width: 60em) { + .f-6-m, + .f-headline-m { font-size: 6rem; } + .f-5-m, + .f-subheadline-m { font-size: 5rem; } + .f1-m { font-size: 3rem; } + .f2-m { font-size: 2.25rem; } + .f3-m { font-size: 1.5rem; } + .f4-m { font-size: 1.25rem; } + .f5-m { font-size: 1rem; } + .f6-m { font-size: .875rem; } + .f7-m { font-size: .75rem; } +} +@media screen and (min-width: 60em) { + .f-6-l, + .f-headline-l { + font-size: 6rem; + } + .f-5-l, + .f-subheadline-l { + font-size: 5rem; + } + .f1-l { font-size: 3rem; } + .f2-l { font-size: 2.25rem; } + .f3-l { font-size: 1.5rem; } + .f4-l { font-size: 1.25rem; } + .f5-l { font-size: 1rem; } + .f6-l { font-size: .875rem; } + .f7-l { font-size: .75rem; } +} +/* + + TYPOGRAPHY + http://tachyons.io/docs/typography/measure/ + + Media Query Extensions: + -ns = not-small + -m = medium + -l = large + +*/ +/* Measure is limited to ~66 characters */ +.measure { + max-width: 30em; +} +/* Measure is limited to ~80 characters */ +.measure-wide { + max-width: 34em; +} +/* Measure is limited to ~45 characters */ +.measure-narrow { + max-width: 20em; +} +/* Book paragraph style - paragraphs are indented with no vertical spacing. */ +.indent { + text-indent: 1em; + margin-top: 0; + margin-bottom: 0; +} +.small-caps { + -webkit-font-feature-settings: "c2sc"; + font-feature-settings: "c2sc"; + font-variant: small-caps; +} +/* Combine this class with a width to truncate text (or just leave as is to truncate at width of containing element. */ +.truncate { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} +@media screen and (min-width: 30em) { + .measure-ns { + max-width: 30em; + } + .measure-wide-ns { + max-width: 34em; + } + .measure-narrow-ns { + max-width: 20em; + } + .indent-ns { + text-indent: 1em; + margin-top: 0; + margin-bottom: 0; + } + .small-caps-ns { + -webkit-font-feature-settings: "c2sc"; + font-feature-settings: "c2sc"; + font-variant: small-caps; + } + .truncate-ns { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } +} +@media screen and (min-width: 30em) and (max-width: 60em) { + .measure-m { + max-width: 30em; + } + .measure-wide-m { + max-width: 34em; + } + .measure-narrow-m { + max-width: 20em; + } + .indent-m { + text-indent: 1em; + margin-top: 0; + margin-bottom: 0; + } + .small-caps-m { + -webkit-font-feature-settings: "c2sc"; + font-feature-settings: "c2sc"; + font-variant: small-caps; + } + .truncate-m { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } +} +@media screen and (min-width: 60em) { + .measure-l { + max-width: 30em; + } + .measure-wide-l { + max-width: 34em; + } + .measure-narrow-l { + max-width: 20em; + } + .indent-l { + text-indent: 1em; + margin-top: 0; + margin-bottom: 0; + } + .small-caps-l { + -webkit-font-feature-settings: "c2sc"; + font-feature-settings: "c2sc"; + font-variant: small-caps; + } + .truncate-l { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } +} +/* + + UTILITIES + + Media Query Extensions: + -ns = not-small + -m = medium + -l = large + +*/ +/* Equivalent to .overflow-y-scroll */ +.overflow-container { + overflow-y: scroll; +} +.center { + margin-right: auto; + margin-left: auto; +} +.mr-auto { margin-right: auto; } +.ml-auto { margin-left: auto; } +@media screen and (min-width: 30em){ + .center-ns { + margin-right: auto; + margin-left: auto; + } + .mr-auto-ns { margin-right: auto; } + .ml-auto-ns { margin-left: auto; } +} +@media screen and (min-width: 30em) and (max-width: 60em){ + .center-m { + margin-right: auto; + margin-left: auto; + } + .mr-auto-m { margin-right: auto; } + .ml-auto-m { margin-left: auto; } +} +@media screen and (min-width: 60em){ + .center-l { + margin-right: auto; + margin-left: auto; + } + .mr-auto-l { margin-right: auto; } + .ml-auto-l { margin-left: auto; } +} +/* + + VISIBILITY + + Media Query Extensions: + -ns = not-small + -m = medium + -l = large + +*/ +/* + Text that is hidden but accessible + Ref: http://snook.ca/archives/html_and_css/hiding-content-for-accessibility +*/ +.clip { + position: fixed !important; + _position: absolute !important; + clip: rect(1px 1px 1px 1px); /* IE6, IE7 */ + clip: rect(1px, 1px, 1px, 1px); +} +@media screen and (min-width: 30em) { + .clip-ns { + position: fixed !important; + _position: absolute !important; + clip: rect(1px 1px 1px 1px); /* IE6, IE7 */ + clip: rect(1px, 1px, 1px, 1px); + } +} +@media screen and (min-width: 30em) and (max-width: 60em) { + .clip-m { + position: fixed !important; + _position: absolute !important; + clip: rect(1px 1px 1px 1px); /* IE6, IE7 */ + clip: rect(1px, 1px, 1px, 1px); + } +} +@media screen and (min-width: 60em) { + .clip-l { + position: fixed !important; + _position: absolute !important; + clip: rect(1px 1px 1px 1px); /* IE6, IE7 */ + clip: rect(1px, 1px, 1px, 1px); + } +} +/* + + WHITE SPACE + + Media Query Extensions: + -ns = not-small + -m = medium + -l = large + +*/ +.ws-normal { white-space: normal; } +.nowrap { white-space: nowrap; } +.pre { white-space: pre; } +@media screen and (min-width: 30em) { + .ws-normal-ns { white-space: normal; } + .nowrap-ns { white-space: nowrap; } + .pre-ns { white-space: pre; } +} +@media screen and (min-width: 30em) and (max-width: 60em) { + .ws-normal-m { white-space: normal; } + .nowrap-m { white-space: nowrap; } + .pre-m { white-space: pre; } +} +@media screen and (min-width: 60em) { + .ws-normal-l { white-space: normal; } + .nowrap-l { white-space: nowrap; } + .pre-l { white-space: pre; } +} +/* + + VERTICAL ALIGN + + Media Query Extensions: + -ns = not-small + -m = medium + -l = large + +*/ +.v-base { vertical-align: baseline; } +.v-mid { vertical-align: middle; } +.v-top { vertical-align: top; } +.v-btm { vertical-align: bottom; } +@media screen and (min-width: 30em) { + .v-base-ns { vertical-align: baseline; } + .v-mid-ns { vertical-align: middle; } + .v-top-ns { vertical-align: top; } + .v-btm-ns { vertical-align: bottom; } +} +@media screen and (min-width: 30em) and (max-width: 60em) { + .v-base-m { vertical-align: baseline; } + .v-mid-m { vertical-align: middle; } + .v-top-m { vertical-align: top; } + .v-btm-m { vertical-align: bottom; } +} +@media screen and (min-width: 60em) { + .v-base-l { vertical-align: baseline; } + .v-mid-l { vertical-align: middle; } + .v-top-l { vertical-align: top; } + .v-btm-l { vertical-align: bottom; } +} +/* + + HOVER EFFECTS + Docs: http://tachyons.io/docs/themes/hovers/ + + - Dim + - Glow + - Hide Child + - Underline text + - Grow + - Pointer + - Shadow + +*/ +/* + + Dim element on hover by adding the dim class. + +*/ +.dim { + opacity: 1; + -webkit-transition: opacity .15s ease-in; + transition: opacity .15s ease-in; +} +.dim:hover, +.dim:focus { + opacity: .5; + -webkit-transition: opacity .15s ease-in; + transition: opacity .15s ease-in; +} +.dim:active { + opacity: .8; -webkit-transition: opacity .15s ease-out; transition: opacity .15s ease-out; +} +/* + + Animate opacity to 100% on hover by adding the glow class. + +*/ +.glow { + -webkit-transition: opacity .15s ease-in; + transition: opacity .15s ease-in; +} +.glow:hover, +.glow:focus { + opacity: 1; + -webkit-transition: opacity .15s ease-in; + transition: opacity .15s ease-in; +} +/* + + Hide child & reveal on hover: + + Put the hide-child class on a parent element and any nested element with the + child class will be hidden and displayed on hover or focus. + + +*/ +.hide-child .child { + opacity: 0; + -webkit-transition: opacity .15s ease-in; + transition: opacity .15s ease-in; +} +.hide-child:hover .child, +.hide-child:focus .child, +.hide-child:active .child { + opacity: 1; + -webkit-transition: opacity .15s ease-in; + transition: opacity .15s ease-in; +} +.underline-hover:hover, +.underline-hover:focus { + text-decoration: underline; +} +/* Can combine this with overflow-hidden to make background images grow on hover + * even if you are using background-size: cover */ +.grow { + -moz-osx-font-smoothing: grayscale; + -webkit-backface-visibility: hidden; + backface-visibility: hidden; + -webkit-transform: translateZ(0); + transform: translateZ(0); + -webkit-transition: -webkit-transform 0.25s ease-out; + transition: -webkit-transform 0.25s ease-out; + transition: transform 0.25s ease-out; + transition: transform 0.25s ease-out, -webkit-transform 0.25s ease-out; +} +.grow:hover, +.grow:focus { + -webkit-transform: scale(1.05); + transform: scale(1.05); +} +.grow:active { + -webkit-transform: scale(.90); + transform: scale(.90); +} +.grow-large { + -moz-osx-font-smoothing: grayscale; + -webkit-backface-visibility: hidden; + backface-visibility: hidden; + -webkit-transform: translateZ(0); + transform: translateZ(0); + -webkit-transition: -webkit-transform .25s ease-in-out; + transition: -webkit-transform .25s ease-in-out; + transition: transform .25s ease-in-out; + transition: transform .25s ease-in-out, -webkit-transform .25s ease-in-out; +} +.grow-large:hover, +.grow-large:focus { + -webkit-transform: scale(1.2); + transform: scale(1.2); +} +.grow-large:active { + -webkit-transform: scale(.95); + transform: scale(.95); +} +/* Add pointer on hover */ +.pointer:hover { + cursor: pointer; +} +/* + Add shadow on hover. + + Performant box-shadow animation pattern from + http://tobiasahlin.com/blog/how-to-animate-box-shadow/ +*/ +.shadow-hover { + cursor: pointer; + position: relative; + -webkit-transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1); + transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1); +} +.shadow-hover::after { + content: ''; + -webkit-box-shadow: 0px 0px 16px 2px rgba(0, 0, 0, .2); + box-shadow: 0px 0px 16px 2px rgba(0, 0, 0, .2); + border-radius: inherit; + opacity: 0; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: -1; + -webkit-transition: opacity 0.5s cubic-bezier(0.165, 0.84, 0.44, 1); + transition: opacity 0.5s cubic-bezier(0.165, 0.84, 0.44, 1); +} +.shadow-hover:hover::after, +.shadow-hover:focus::after { + opacity: 1; +} +/* Combine with classes in skins and skins-pseudo for + * many different transition possibilities. */ +.bg-animate, +.bg-animate:hover, +.bg-animate:focus { + -webkit-transition: background-color .15s ease-in-out; + transition: background-color .15s ease-in-out; +} +/* + + Z-INDEX + + Base + z = z-index + + Modifiers + -0 = literal value 0 + -1 = literal value 1 + -2 = literal value 2 + -3 = literal value 3 + -4 = literal value 4 + -5 = literal value 5 + -999 = literal value 999 + -9999 = literal value 9999 + + -max = largest accepted z-index value as integer + + -inherit = string value inherit + -initial = string value initial + -unset = string value unset + + MDN: https://developer.mozilla.org/en/docs/Web/CSS/z-index + Spec: http://www.w3.org/TR/CSS2/zindex.html + Articles: + https://philipwalton.com/articles/what-no-one-told-you-about-z-index/ + + Tips on extending: + There might be a time worth using negative z-index values. + Or if you are using tachyons with another project, you might need to + adjust these values to suit your needs. + +*/ +.z-0 { z-index: 0; } +.z-1 { z-index: 1; } +.z-2 { z-index: 2; } +.z-3 { z-index: 3; } +.z-4 { z-index: 4; } +.z-5 { z-index: 5; } +.z-999 { z-index: 999; } +.z-9999 { z-index: 9999; } +.z-max { + z-index: 2147483647; +} +.z-inherit { z-index: inherit; } +.z-initial { z-index: auto; z-index: initial; } +.z-unset { z-index: unset; } +/* + + NESTED + Tachyons module for styling nested elements + that are generated by a cms. + +*/ +.nested-copy-line-height p, +.nested-copy-line-height ul, +.nested-copy-line-height ol { + line-height: 1.5; +} +.nested-headline-line-height h1, +.nested-headline-line-height h2, +.nested-headline-line-height h3, +.nested-headline-line-height h4, +.nested-headline-line-height h5, +.nested-headline-line-height h6 { + line-height: 1.25; +} +.nested-list-reset ul, +.nested-list-reset ol { + padding-left: 0; + margin-left: 0; + list-style-type: none; +} +.nested-copy-indent p+p { + text-indent: 1em; + margin-top: 0; + margin-bottom: 0; +} +.nested-copy-separator p+p { + margin-top: 1.5em; +} +.nested-img img { + width: 100%; + max-width: 100%; + display: block; +} +.nested-links a { + color: #0594CB; + -webkit-transition: color .15s ease-in; + transition: color .15s ease-in; +} +.nested-links a:hover, +.nested-links a:focus { + color: #96ccff; + -webkit-transition: color .15s ease-in; + transition: color .15s ease-in; +} +/*@import 'tachyons/src/_styles';*/ +/* Variables */ +/* Importing here will allow you to override any variables in the modules */ +/* + + Tachyons + COLOR VARIABLES + + Grayscale + - Solids + - Transparencies + Colors + +*/ +/* + + CUSTOM MEDIA QUERIES + + Media query values can be changed to fit your own content. + There are no magic bullets when it comes to media query width values. + They should be declared in em units - and they should be set to meet + the needs of your content. You can also add additional media queries, + or remove some of the existing ones. + + These media queries can be referenced like so: + + @media (--breakpoint-not-small) { + .medium-and-larger-specific-style { + background-color: red; + } + } + + @media (--breakpoint-medium) { + .medium-screen-specific-style { + background-color: red; + } + } + + @media (--breakpoint-large) { + .large-and-larger-screen-specific-style { + background-color: red; + } + } + +*/ +/* Media Queries */ +/* Debugging */ +/*@import 'tachyons/src/_debug-children'; +@import 'tachyons/src/_debug-grid';*/ +/* Uncomment out the line below to help debug layout issues */ +/* @import 'tachyons/src/_debug'; */ +/* purgecss start ignore */ +.header-link:after { + position: relative; + left: 0.5em; + opacity: 0; + font-size: 0.8em; + -moz-transition: opacity 0.2s ease-in-out 0.1s; + -ms-transition: opacity 0.2s ease-in-out 0.1s; +} +h2:hover .header-link, +h3:hover .header-link, +h4:hover .header-link, +h5:hover .header-link, +h6:hover .header-link { + opacity: 1; +} +.animated { + -webkit-animation-duration: .5s; + animation-duration: .5s; + -webkit-animation-fill-mode: forwards; + animation-fill-mode: forwards; + -webkit-animation-timing-function: ease-in-out; + animation-timing-function: ease-in-out; +} +@-webkit-keyframes fadeIn { + from { + opacity: 0; + } + + to { + opacity: 1; + } +} +@keyframes fadeIn { + from { + opacity: 0; + } + + to { + opacity: 1; + } +} +.fadeIn { + -webkit-animation-name: fadeIn; + animation-name: fadeIn; +} +.animated-delay-1 { + -webkit-animation-delay: 0.5s; + animation-delay: 0.5s; +} +.note, +.warning { + + border-left-width: 4px; + border-left-style: solid; + position: relative; + border-color: #0594CB; + + display: block; +} +.note #exclamation-icon, +.warning #exclamation-icon { + + fill: #0594CB; + position: absolute; + top: 35%; + left: -12px; + /*background-color: white;*/ +} +.admonition-content { + display: block; + margin: 0px; + padding: .125em 1em; + /*margin-left: 1em;*/ + margin-top: 2em; + margin-bottom: 2em; + overflow-x: auto; + /*font-size: .9375em;*/ + background-color: rgba(0, 0, 0, .05); + } +.hide-child-menu .child-menu { + display: none; + } +.hide-child-menu:hover .child-menu, + .hide-child-menu:focus .child-menu, + .hide-child-menu:active .child-menu { + display: block; + } +/*documentation-copy headings exaggerate spacing and size to chunk content */ +.documentation-copy h2 { + margin-top: 3em + } +.documentation-copy h2.minor { + font-size: inherit; + margin-top: inherit; + border-bottom: none; +} +.searchbox{display:inline-block;position:relative;width:200px;height:32px!important;white-space:nowrap;-webkit-box-sizing:border-box;box-sizing:border-box;visibility:visible!important} +.searchbox .algolia-autocomplete{display:block;width:100%;height:100%} +.searchbox__wrapper{width:100%;height:100%;z-index:999;position:relative} +.searchbox__input{display:inline-block;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-transition:background .4s ease,-webkit-box-shadow .4s ease;transition:background .4s ease,-webkit-box-shadow .4s ease;transition:box-shadow .4s ease,background .4s ease;transition:box-shadow .4s ease,background .4s ease,-webkit-box-shadow .4s ease;border:0;border-radius:16px;-webkit-box-shadow:inset 0 0 0 1px #ccc;box-shadow:inset 0 0 0 1px #ccc;background:#fff!important;padding:0 26px 0 32px;width:100%;height:100%;vertical-align:middle;white-space:normal;font-size:12px;-webkit-appearance:none;-moz-appearance:none;appearance:none} +.searchbox__input::-webkit-search-cancel-button,.searchbox__input::-webkit-search-decoration,.searchbox__input::-webkit-search-results-button,.searchbox__input::-webkit-search-results-decoration{display:none} +.searchbox__input:hover{-webkit-box-shadow:inset 0 0 0 1px #b3b3b3;box-shadow:inset 0 0 0 1px #b3b3b3} +.searchbox__input:active,.searchbox__input:focus{outline:0;-webkit-box-shadow:inset 0 0 0 1px #aaa;box-shadow:inset 0 0 0 1px #aaa;background:#fff} +.searchbox__input::-webkit-input-placeholder{color:#aaa} +.searchbox__input:-ms-input-placeholder{color:#aaa} +.searchbox__input::-ms-input-placeholder{color:#aaa} +.searchbox__input::placeholder{color:#aaa} +.searchbox__submit{position:absolute;top:0;margin:0;border:0;border-radius:16px 0 0 16px;background-color:rgba(69, 142, 225, 0);padding:0;width:32px;height:100%;vertical-align:middle;text-align:center;font-size:inherit;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;right:inherit;left:0} +.searchbox__submit:before{display:inline-block;margin-right:-4px;height:100%;vertical-align:middle;content:""} +.searchbox__submit:active,.searchbox__submit:hover{cursor:pointer} +.searchbox__submit:focus{outline:0} +.searchbox__submit svg{width:14px;height:14px;vertical-align:middle;fill:#6d7e96} +.searchbox__reset{display:block;position:absolute;top:8px;right:8px;margin:0;border:0;background:none;cursor:pointer;padding:0;font-size:inherit;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;fill:rgba(0, 0, 0, .5)} +.searchbox__reset.hide{display:none} +.searchbox__reset:focus{outline:0} +.searchbox__reset svg{display:block;margin:4px;width:8px;height:8px} +.searchbox__input:valid~.searchbox__reset{display:block;-webkit-animation-name:sbx-reset-in;animation-name:sbx-reset-in;-webkit-animation-duration:.15s;animation-duration:.15s} +@-webkit-keyframes sbx-reset-in{0%{-webkit-transform:translate3d(-20%,0,0);transform:translate3d(-20%,0,0);opacity:0}to{-webkit-transform:none;transform:none;opacity:1}} +@keyframes sbx-reset-in{0%{-webkit-transform:translate3d(-20%,0,0);transform:translate3d(-20%,0,0);opacity:0}to{-webkit-transform:none;transform:none;opacity:1}} +.algolia-autocomplete.algolia-autocomplete-right .ds-dropdown-menu{right:0!important;left:inherit!important} +.algolia-autocomplete.algolia-autocomplete-right .ds-dropdown-menu:before{right:48px} +.algolia-autocomplete.algolia-autocomplete-left .ds-dropdown-menu{left:0!important;right:inherit!important} +.algolia-autocomplete.algolia-autocomplete-left .ds-dropdown-menu:before{left:48px} +.algolia-autocomplete .ds-dropdown-menu{top:-6px;border-radius:4px;margin:6px 0 0;padding:0;text-align:left;height:auto;position:relative;background:transparent;border:none;z-index:999;max-width:600px;min-width:500px;-webkit-box-shadow:0 1px 0 0 rgba(0, 0, 0, .2),0 2px 3px 0 rgba(0, 0, 0, .1);box-shadow:0 1px 0 0 rgba(0, 0, 0, .2),0 2px 3px 0 rgba(0, 0, 0, .1)} +.algolia-autocomplete .ds-dropdown-menu:before{display:block;position:absolute;content:"";width:14px;height:14px;background:#fff;z-index:1000;top:-7px;border-top:1px solid #d9d9d9;border-right:1px solid #d9d9d9;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);border-radius:2px} +.algolia-autocomplete .ds-dropdown-menu .ds-suggestions{position:relative;z-index:1000;margin-top:8px} +.algolia-autocomplete .ds-dropdown-menu .ds-suggestions a:hover{text-decoration:none} +.algolia-autocomplete .ds-dropdown-menu .ds-suggestion{cursor:pointer} +.algolia-autocomplete .ds-dropdown-menu .ds-suggestion.ds-cursor .algolia-docsearch-suggestion.suggestion-layout-simple,.algolia-autocomplete .ds-dropdown-menu .ds-suggestion.ds-cursor .algolia-docsearch-suggestion:not(.suggestion-layout-simple) .algolia-docsearch-suggestion--content{background-color:rgba(69, 142, 225, .05)} +.algolia-autocomplete .ds-dropdown-menu [class^=ds-dataset-]{position:relative;border:1px solid #d9d9d9;background:#fff;border-radius:4px;overflow:auto;padding:0 8px 8px} +.algolia-autocomplete .ds-dropdown-menu *{-webkit-box-sizing:border-box;box-sizing:border-box} +.algolia-autocomplete .algolia-docsearch-suggestion{display:block;position:relative;padding:0 8px;background:#fff;color:#02060c;overflow:hidden} +.algolia-autocomplete .algolia-docsearch-suggestion--highlight{color:#174d8c;background:rgba(143, 187, 237, .1);padding:.1em .05em} +.algolia-autocomplete .algolia-docsearch-suggestion--category-header .algolia-docsearch-suggestion--category-header-lvl0 .algolia-docsearch-suggestion--highlight,.algolia-autocomplete .algolia-docsearch-suggestion--category-header .algolia-docsearch-suggestion--category-header-lvl1 .algolia-docsearch-suggestion--highlight,.algolia-autocomplete .algolia-docsearch-suggestion--text .algolia-docsearch-suggestion--highlight{padding:0 0 1px;background:inherit;-webkit-box-shadow:inset 0 -2px 0 0 rgba(69, 142, 225, .8);box-shadow:inset 0 -2px 0 0 rgba(69, 142, 225, .8);color:inherit} +.algolia-autocomplete .algolia-docsearch-suggestion--content{display:block;float:right;width:70%;position:relative;padding:5.33333px 0 5.33333px 10.66667px;cursor:pointer} +.algolia-autocomplete .algolia-docsearch-suggestion--content:before{content:"";position:absolute;display:block;top:0;height:100%;width:1px;background:#ddd;left:-1px} +.algolia-autocomplete .algolia-docsearch-suggestion--category-header{position:relative;border-bottom:1px solid #ddd;display:none;margin-top:8px;padding:4px 0;font-size:1em;color:#33363d} +.algolia-autocomplete .algolia-docsearch-suggestion--wrapper{width:100%;float:left;padding:8px 0 0} +.algolia-autocomplete .algolia-docsearch-suggestion--subcategory-column{float:left;width:30%;text-align:right;position:relative;padding:5.33333px 10.66667px;color:#a4a7ae;font-size:.9em;word-wrap:break-word} +.algolia-autocomplete .algolia-docsearch-suggestion--subcategory-column:before{content:"";position:absolute;display:block;top:0;height:100%;width:1px;background:#ddd;right:0} +.algolia-autocomplete .algolia-docsearch-suggestion--subcategory-inline{display:none} +.algolia-autocomplete .algolia-docsearch-suggestion--title{margin-bottom:4px;color:#02060c;font-size:.9em;font-weight:700} +.algolia-autocomplete .algolia-docsearch-suggestion--text{display:block;line-height:1.2em;font-size:.85em;color:#63676d} +.algolia-autocomplete .algolia-docsearch-suggestion--no-results{width:100%;padding:8px 0;text-align:center;font-size:1.2em} +.algolia-autocomplete .algolia-docsearch-suggestion--no-results:before{display:none} +.algolia-autocomplete .algolia-docsearch-suggestion code{padding:1px 5px;font-size:90%;border:none;color:#222;background-color:#ebebeb;border-radius:3px;font-family:Menlo,Monaco,Consolas,Courier New,monospace} +.algolia-autocomplete .algolia-docsearch-suggestion code .algolia-docsearch-suggestion--highlight{background:none} +.algolia-autocomplete .algolia-docsearch-suggestion.algolia-docsearch-suggestion__main .algolia-docsearch-suggestion--category-header,.algolia-autocomplete .algolia-docsearch-suggestion.algolia-docsearch-suggestion__secondary{display:block} +@media (min-width:768px){.algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--subcategory-column{display:block}} +@media (max-width:768px){.algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--subcategory-column{display:inline-block;width:auto;float:left;padding:0;color:#02060c;font-size:.9em;font-weight:700;text-align:left;opacity:.5}.algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--subcategory-column:before{display:none}.algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--subcategory-column:after{content:"|"}.algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--content{display:inline-block;width:auto;text-align:left;float:left;padding:0}.algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--content:before{display:none}} +.algolia-autocomplete .suggestion-layout-simple.algolia-docsearch-suggestion{border-bottom:1px solid #eee;padding:8px;margin:0} +.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--content{width:100%;padding:0} +.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--content:before{display:none} +.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--category-header{margin:0;padding:0;display:block;width:100%;border:none} +.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--category-header-lvl0,.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--category-header-lvl1{opacity:.6;font-size:.85em} +.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--category-header-lvl1:before{background-image:url('data:image/svg+xml;utf8,');content:"";width:10px;height:10px;display:inline-block} +.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--wrapper{width:100%;float:left;margin:0;padding:0} +.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--duplicate-content,.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--subcategory-inline{display:none!important} +.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--title{margin:0;color:#458ee1;font-size:.9em;font-weight:400} +.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--title:before{content:"#";font-weight:700;color:#458ee1;display:inline-block} +.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--text{margin:4px 0 0;display:block;line-height:1.4em;padding:5.33333px 8px;background:#f8f8f8;font-size:.85em;opacity:.8} +.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--text .algolia-docsearch-suggestion--highlight{color:#3f4145;font-weight:700;-webkit-box-shadow:none;box-shadow:none} +.algolia-autocomplete .algolia-docsearch-footer{width:134px;height:20px;z-index:2000;margin-top:10.66667px;float:right;font-size:0;line-height:0} +.algolia-autocomplete .algolia-docsearch-footer--logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='168' height='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cpath d='M78.988.938h16.594a2.968 2.968 0 0 1 2.966 2.966V20.5a2.967 2.967 0 0 1-2.966 2.964H78.988a2.967 2.967 0 0 1-2.966-2.964V3.897A2.961 2.961 0 0 1 78.988.938zm41.937 17.866c-4.386.02-4.386-3.54-4.386-4.106l-.007-13.336 2.675-.424v13.254c0 .322 0 2.358 1.718 2.364v2.248zm-10.846-2.18c.821 0 1.43-.047 1.855-.129v-2.719a6.334 6.334 0 0 0-1.574-.199 5.7 5.7 0 0 0-.897.069 2.699 2.699 0 0 0-.814.24c-.24.116-.439.28-.582.491-.15.212-.219.335-.219.656 0 .628.219.991.616 1.23s.938.362 1.615.362zm-.233-9.7c.883 0 1.629.109 2.231.328.602.218 1.088.525 1.444.915.363.396.609.922.76 1.483.157.56.232 1.175.232 1.85v6.874a32.5 32.5 0 0 1-1.868.314c-.834.123-1.772.185-2.813.185-.69 0-1.327-.069-1.895-.198a4.001 4.001 0 0 1-1.471-.636 3.085 3.085 0 0 1-.951-1.134c-.226-.465-.343-1.12-.343-1.803 0-.656.13-1.073.384-1.525a3.24 3.24 0 0 1 1.047-1.106c.445-.287.95-.492 1.532-.615a8.8 8.8 0 0 1 1.82-.185 8.404 8.404 0 0 1 1.972.24v-.438c0-.307-.035-.6-.11-.874a1.88 1.88 0 0 0-.384-.73 1.784 1.784 0 0 0-.724-.493 3.164 3.164 0 0 0-1.143-.205c-.616 0-1.177.075-1.69.164a7.735 7.735 0 0 0-1.26.307l-.321-2.192c.335-.117.834-.233 1.478-.349a10.98 10.98 0 0 1 2.073-.178zm52.842 9.626c.822 0 1.43-.048 1.854-.13V13.7a6.347 6.347 0 0 0-1.574-.199c-.294 0-.595.021-.896.069a2.7 2.7 0 0 0-.814.24 1.46 1.46 0 0 0-.582.491c-.15.212-.218.335-.218.656 0 .628.218.991.615 1.23.404.245.938.362 1.615.362zm-.226-9.694c.883 0 1.629.108 2.231.327.602.219 1.088.526 1.444.915.355.39.609.923.759 1.483a6.8 6.8 0 0 1 .233 1.852v6.873c-.41.088-1.034.19-1.868.314-.834.123-1.772.184-2.813.184-.69 0-1.327-.068-1.895-.198a4.001 4.001 0 0 1-1.471-.635 3.085 3.085 0 0 1-.951-1.134c-.226-.465-.343-1.12-.343-1.804 0-.656.13-1.073.384-1.524.26-.45.608-.82 1.047-1.107.445-.286.95-.491 1.532-.614a8.803 8.803 0 0 1 2.751-.13c.329.034.671.096 1.04.185v-.437a3.3 3.3 0 0 0-.109-.875 1.873 1.873 0 0 0-.384-.731 1.784 1.784 0 0 0-.724-.492 3.165 3.165 0 0 0-1.143-.205c-.616 0-1.177.075-1.69.164a7.75 7.75 0 0 0-1.26.307l-.321-2.193c.335-.116.834-.232 1.478-.348a11.633 11.633 0 0 1 2.073-.177zm-8.034-1.271a1.626 1.626 0 0 1-1.628-1.62c0-.895.725-1.62 1.628-1.62.904 0 1.63.725 1.63 1.62 0 .895-.733 1.62-1.63 1.62zm1.348 13.22h-2.689V7.27l2.69-.423v11.956zm-4.714 0c-4.386.02-4.386-3.54-4.386-4.107l-.008-13.336 2.676-.424v13.254c0 .322 0 2.358 1.718 2.364v2.248zm-8.698-5.903c0-1.156-.253-2.119-.746-2.788-.493-.677-1.183-1.01-2.067-1.01-.882 0-1.574.333-2.065 1.01-.493.676-.733 1.632-.733 2.788 0 1.168.246 1.953.74 2.63.492.683 1.183 1.018 2.066 1.018.882 0 1.574-.342 2.067-1.019.492-.683.738-1.46.738-2.63zm2.737-.007c0 .902-.13 1.584-.397 2.33a5.52 5.52 0 0 1-1.128 1.906 4.986 4.986 0 0 1-1.752 1.223c-.685.286-1.739.45-2.265.45-.528-.006-1.574-.157-2.252-.45a5.096 5.096 0 0 1-1.744-1.223c-.487-.527-.863-1.162-1.137-1.906a6.345 6.345 0 0 1-.41-2.33c0-.902.123-1.77.397-2.508a5.554 5.554 0 0 1 1.15-1.892 5.133 5.133 0 0 1 1.75-1.216c.679-.287 1.425-.423 2.232-.423.808 0 1.553.142 2.237.423a4.88 4.88 0 0 1 1.753 1.216 5.644 5.644 0 0 1 1.135 1.892c.287.738.431 1.606.431 2.508zm-20.138 0c0 1.12.246 2.363.738 2.882.493.52 1.13.78 1.91.78.424 0 .828-.062 1.204-.178.377-.116.677-.253.917-.417V9.33a10.476 10.476 0 0 0-1.766-.226c-.971-.028-1.71.37-2.23 1.004-.513.636-.773 1.75-.773 2.788zm7.438 5.274c0 1.824-.466 3.156-1.404 4.004-.936.846-2.367 1.27-4.296 1.27-.705 0-2.17-.137-3.34-.396l.431-2.118c.98.205 2.272.26 2.95.26 1.074 0 1.84-.219 2.299-.656.459-.437.684-1.086.684-1.948v-.437a8.07 8.07 0 0 1-1.047.397c-.43.13-.93.198-1.492.198-.739 0-1.41-.116-2.018-.349a4.206 4.206 0 0 1-1.567-1.025c-.431-.45-.774-1.017-1.013-1.694-.24-.677-.363-1.885-.363-2.773 0-.834.13-1.88.384-2.577.26-.696.629-1.298 1.129-1.796.493-.498 1.095-.881 1.8-1.162a6.605 6.605 0 0 1 2.428-.457c.87 0 1.67.109 2.45.24.78.129 1.444.265 1.985.415V18.17z' fill='%235468FF'/%3E%3Cpath d='M6.972 6.677v1.627c-.712-.446-1.52-.67-2.425-.67-.585 0-1.045.13-1.38.391a1.24 1.24 0 0 0-.502 1.03c0 .425.164.765.494 1.02.33.256.835.532 1.516.83.447.192.795.356 1.045.495.25.138.537.332.862.582.324.25.563.548.718.894.154.345.23.741.23 1.188 0 .947-.334 1.691-1.004 2.234-.67.542-1.537.814-2.601.814-1.18 0-2.16-.229-2.936-.686v-1.708c.84.628 1.814.942 2.92.942.585 0 1.048-.136 1.388-.407.34-.271.51-.646.51-1.125 0-.287-.1-.55-.302-.79-.203-.24-.42-.42-.655-.542-.234-.123-.585-.29-1.053-.503a61.27 61.27 0 0 1-.582-.271 13.67 13.67 0 0 1-.55-.287 4.275 4.275 0 0 1-.567-.351 6.92 6.92 0 0 1-.455-.4c-.18-.17-.31-.34-.39-.51-.08-.17-.155-.37-.224-.598a2.553 2.553 0 0 1-.104-.742c0-.915.333-1.638.998-2.17.664-.532 1.523-.798 2.576-.798.968 0 1.793.17 2.473.51zm7.468 5.696v-.287c-.022-.607-.187-1.088-.495-1.444-.309-.357-.75-.535-1.324-.535-.532 0-.99.194-1.373.583-.382.388-.622.949-.717 1.683h3.909zm1.005 2.792v1.404c-.596.34-1.383.51-2.362.51-1.255 0-2.255-.377-3-1.132-.744-.755-1.116-1.744-1.116-2.968 0-1.297.34-2.316 1.021-3.055.68-.74 1.548-1.11 2.6-1.11 1.033 0 1.852.323 2.458.966.606.644.91 1.572.91 2.784 0 .33-.033.676-.096 1.038h-5.314c.107.702.405 1.239.894 1.611.49.372 1.106.558 1.85.558.862 0 1.58-.202 2.155-.606zm6.605-1.77h-1.212c-.596 0-1.045.116-1.349.35-.303.234-.454.532-.454.894 0 .372.117.664.35.877.235.213.575.32 1.022.32.51 0 .912-.142 1.204-.424.293-.281.44-.651.44-1.108v-.91zm-4.068-2.554V9.325c.627-.361 1.457-.542 2.489-.542 2.116 0 3.175 1.026 3.175 3.08V17h-1.548v-.957c-.415.68-1.143 1.02-2.186 1.02-.766 0-1.38-.22-1.843-.661-.462-.442-.694-1.003-.694-1.684 0-.776.293-1.38.878-1.81.585-.431 1.404-.647 2.457-.647h1.34V11.8c0-.554-.133-.971-.399-1.253-.266-.282-.707-.423-1.324-.423a4.07 4.07 0 0 0-2.345.718zm9.333-1.93v1.42c.394-1 1.101-1.5 2.123-1.5.148 0 .313.016.494.048v1.531a1.885 1.885 0 0 0-.75-.143c-.542 0-.989.24-1.34.718-.351.479-.527 1.048-.527 1.707V17h-1.563V8.91h1.563zm5.01 4.084c.022.82.272 1.492.75 2.019.479.526 1.15.79 2.01.79.639 0 1.235-.176 1.788-.527v1.404c-.521.319-1.186.479-1.995.479-1.265 0-2.276-.4-3.031-1.197-.755-.798-1.133-1.792-1.133-2.984 0-1.16.38-2.151 1.14-2.975.761-.825 1.79-1.237 3.088-1.237.702 0 1.346.149 1.93.447v1.436a3.242 3.242 0 0 0-1.77-.495c-.84 0-1.513.266-2.019.798-.505.532-.758 1.213-.758 2.042zM40.24 5.72v4.579c.458-1 1.293-1.5 2.505-1.5.787 0 1.42.245 1.899.734.479.49.718 1.17.718 2.042V17h-1.564v-5.106c0-.553-.14-.98-.422-1.284-.282-.303-.652-.455-1.11-.455-.531 0-1.002.202-1.411.606-.41.405-.615 1.022-.615 1.851V17h-1.563V5.72h1.563zm14.966 10.02c.596 0 1.096-.253 1.5-.758.404-.506.606-1.157.606-1.955 0-.915-.202-1.62-.606-2.114-.404-.495-.92-.742-1.548-.742-.553 0-1.05.224-1.491.67-.442.447-.662 1.133-.662 2.058 0 .958.212 1.67.638 2.138.425.469.946.703 1.563.703zM53.004 5.72v4.42c.574-.894 1.388-1.341 2.44-1.341 1.022 0 1.857.383 2.506 1.149.649.766.973 1.781.973 3.047 0 1.138-.309 2.109-.925 2.912-.617.803-1.463 1.205-2.537 1.205-1.075 0-1.894-.447-2.457-1.34V17h-1.58V5.72h1.58zm9.908 11.104l-3.223-7.913h1.739l1.005 2.632 1.26 3.415c.096-.32.48-1.458 1.15-3.415l.909-2.632h1.66l-2.92 7.866c-.777 2.074-1.963 3.11-3.559 3.11a2.92 2.92 0 0 1-.734-.079v-1.34c.17.042.351.064.543.064 1.032 0 1.755-.57 2.17-1.708z' fill='%235D6494'/%3E%3Cpath d='M89.632 5.967v-.772a.978.978 0 0 0-.978-.977h-2.28a.978.978 0 0 0-.978.977v.793c0 .088.082.15.171.13a7.127 7.127 0 0 1 1.984-.28c.65 0 1.295.088 1.917.259.082.02.164-.04.164-.13m-6.248 1.01l-.39-.389a.977.977 0 0 0-1.382 0l-.465.465a.973.973 0 0 0 0 1.38l.383.383c.062.061.15.047.205-.014.226-.307.472-.601.746-.874.281-.28.568-.526.883-.751.068-.042.075-.137.02-.2m4.16 2.453v3.341c0 .096.104.165.192.117l2.97-1.537c.068-.034.089-.117.055-.184a3.695 3.695 0 0 0-3.08-1.866c-.068 0-.136.054-.136.13m0 8.048a4.489 4.489 0 0 1-4.49-4.482 4.488 4.488 0 0 1 4.49-4.482 4.488 4.488 0 0 1 4.489 4.482 4.484 4.484 0 0 1-4.49 4.482m0-10.85a6.363 6.363 0 1 0 0 12.729 6.37 6.37 0 0 0 6.372-6.368 6.358 6.358 0 0 0-6.371-6.36' fill='%23FFF'/%3E%3C/g%3E%3C/svg%3E");background-repeat:no-repeat;background-position:50%;background-size:100%;overflow:hidden;text-indent:-9000px;padding:0!important;width:100%;height:100%;display:block} +/* These styles enhance the home page carousel, located here: themes/gohugoioTheme/layouts/partials/home-page-sections/showcase.html */ +.overflow-x-scroll{ + -webkit-overflow-scrolling: touch; +} +.row { + -webkit-transition: 450ms -webkit-transform; + transition: 450ms -webkit-transform; + transition: 450ms transform; + transition: 450ms transform, 450ms -webkit-transform; + font-size: 0; +} +.tile { + -webkit-transition: 450ms all; + transition: 450ms all; +} +.details { + background: -webkit-gradient(linear, left bottom, left top, from(rgba(0, 0, 0, .9)), to(rgba(0, 0, 0, 0))); + background: linear-gradient(to top, rgba(0, 0, 0, .9) 0%, rgba(0, 0, 0, 0) 100%); + -webkit-transition: 450ms opacity; + transition: 450ms opacity; +} +.tile:hover .details { + opacity: 1; +} +.row:hover .tile { + opacity: 0.3; +} +.row:hover .tile:hover { + opacity: 1; +} +.chroma .lntable pre { + padding: 0; + margin: 0; + border: 0; +} +.chroma .lntable pre code { + padding: 0; + margin: 0; +} +code { + padding: 0.2em; + margin: 0; + font-size: 85%; + background-color: rgba(27, 31, 35, .05); + border-radius: 3px; +} +pre code { + display: block; + padding: 1.5em 1.5em; + font-size: .875rem; + line-height: 2; + overflow-x: auto; +} +pre { + background-color: #fff; + color: #333; + white-space: pre; + -webkit-hyphens: none; + -ms-hyphens: none; + hyphens: none; + position: relative; + border-width: 1px; + border-color: #ccc; + border-style: solid; +} +/* The Pygments highlighter comes with its own styles. */ +.highlight pre { + background-color: inherit; + color: inherit; + padding: 0.5em; + font-size: .875rem; +} +/*We are adding the copy button content here so we can change it with javascript. See the "Clipboard scripts"*/ +.copy:after { + content: "Copy" +} +.copied:after { + content: "Copied" +} +@media screen and (min-width: 60em) { + .full-width + { + /*width: 100vw; + position: relative; + left: 50%; + right: 50%; + margin-left: -50vw; + margin-right: -50vw;*/ + /*width: 60vw;*/ + /*position: relative; + left: 50%; + right: 50%;*/ + /*margin-left: -30vw;*/ + margin-right: -30vw; + max-width: 100vw; + } +} +.code-block .line-numbers-rows { + background: #2f3a46; + border: none; + bottom: -50px; + color: #98a4b3; + left: -178px; + padding: 50px 0; + top: -50px; + width: 138px +} +.code-block .line-numbers-rows>span:before { + color: inherit; + padding-right: 30px +} +.tab-button{ + margin-bottom:1px; + position: relative; + z-index: 1; + color:#333; + border-color:#ccc; + outline: none; + background-color:white; +} +.tab-pane code{ + background:#f1f2f2; + border-radius:0; +} +.tab-pane .chroma{ + background:none; + padding:0; +} +.tab-button.active{ + border-bottom-color:#f1f2f2; + background-color: #f1f2f2; +} +.tab-content .tab-pane{ + display: none; +} +.tab-content .tab-pane.active{ + display: block; +} +/* Treatment of copy buttons inside a tab module */ +.tab-content .copy, .tab-content .copied{ + display: none; +} +.tab-content .tab-pane.active + .copy, .tab-content .tab-pane.active + .copied{ + display: block; +} +.primary-color {color: #0594CB} +.bg-primary-color {background-color: #0594CB} +.hover-bg-primary-color:hover {background-color: #0594CB} +.primary-color-dark {color: #0A1922} +.bg-primary-color-dark {background-color: #0A1922} +.hover-bg-primary-color-dark:hover {background-color: #0A1922} +.primary-color-light {color: #f9f9f9} +.bg-primary-color-light {background-color: #f9f9f9} +.hover-bg-primary-color-light:hover {background-color: #f9f9f9} +.accent-color {color: #EBB951} +.bg-accent-color {background-color: #EBB951} +.hover-bg-accent-color:hover {background-color: #EBB951} +.accent-color-light {color: #FF4088} +.hover-accent-color-light:hover {color: #FF4088} +.bg-accent-color-light {background-color: #FF4088} +.hover-bg-accent-color-light:hover {background-color: #FF4088} +.accent-color-dark {color: #33ba91} +.bg-accent-color-dark {background-color: #33ba91} +.hover-bg-accent-color-dark:hover {background-color: #33ba91} +.text-color-primary {color: #373737} +.text-on-primary-color {color: #fff} +.text-color-secondary {color: #ccc} +.text-color-disabled {color: #F7f7f7} +.divider-color {color: #f6f6f6} +.warn-color {color: red} +.nested-links a { + color: #0594CB; + text-decoration: none; + +} +.column-count-2 {-webkit-column-count: 1;column-count: 1} +.column-gap-1 {-webkit-column-gap: 0;column-gap: 0} +.break-inside-avoid {-webkit-column-break-inside: auto;break-inside: auto} +@media screen and (min-width: 60em) { + .column-count-3-l {-webkit-column-count: 3;column-count: 3} + .column-count-2-l {-webkit-column-count: 2;column-count: 2} + .column-gap-1-l {-webkit-column-gap: 1;column-gap: 1} + .break-inside-avoid-l {-webkit-column-break-inside: avoid;break-inside: avoid} +} +.prose ul, .prose ol { + margin-bottom: 2em; +} +.prose ul li, .prose ol li { + margin-bottom: .5em; +} +.prose li:hover { + background-color: #eee +} +.prose ::selection { + background: #0594CB; /* WebKit/Blink Browsers */ + color: white; +} +.prose-glossary h3 { + margin-top: 0; + font-size: 1.125rem; +} +.prose-glossary h3:first-of-type { + margin-top: 3em; +} +.prose-glossary h3 ~ p { + margin: 0.5em 0 2em 0; +} +body { + +line-height: 1.45; + +} +p {margin-bottom: 1.3em;} +h1, h2, h3, h4 { +margin: 1.414em 0 0.5em; + +line-height: 1.2; +} +h1 { +margin-top: 0; +font-size: 2.441em; +} +h2 {font-size: 1.953em;} +h3 {font-size: 1.563em;} +h4 {font-size: 1.25em;} +small, .font_small {font-size: 0.8em;} +.prose table { + width: 100%; + margin-bottom: 3em; + border-collapse: collapse; + border-spacing: 0; + font-size: 1em; + border: 1px solid #eee + +} +.prose table th { + background-color: #0594CB; + border-bottom: 1px solid #0594CB; + color: white; + font-weight: 400; + text-align: left; + padding: .375em .5em; +} +.prose table td, .prose table tc { + padding: .75em .5em; + text-align: left; + border-right: 1px solid #eee; +} +.prose table tr:nth-child(even) { + background-color: #eee; +} +dl dt { + font-weight: bold; + font-size: 1.125rem; +} +dd { + margin: .5em 0 2em 0; + padding: 0; +} +.f2-fluid { + font-size: 2.25rem; +} +@media screen and (min-width: 60em) { + .f2-fluid { + font-size: 1.25rem; + font-size: calc(0.70833rem + 0.83333vw); + } +} +/* From https://www.cssfontstack.com */ +code, .code, pre code, .highlight pre { + font-family: 'inconsolata',Menlo,Monaco,'Courier New',monospace; +} +.sans-serif { + font-family: 'Muli', + avenir, + 'helvetica neue', helvetica, + ubuntu, + roboto, noto, + 'segoe ui', arial, + sans-serif; +} +.serif { + font-family: Palatino,"Palatino Linotype","Palatino LT STD","Book Antiqua",Georgia,serif; +} +/* Monospaced Typefaces (for code) */ +.courier { + font-family: 'Courier Next', + courier, + monospace; +} +/* Sans-Serif Typefaces */ +.helvetica { + font-family: 'helvetica neue', helvetica, + sans-serif; +} +.avenir { + font-family: 'avenir next', avenir, + sans-serif; +} +/* Serif Typefaces */ +.athelas { + font-family: athelas, + georgia, + serif; +} +.georgia { + font-family: georgia, + serif; +} +.times { + font-family: times, + serif; +} +.bodoni { + font-family: "Bodoni MT", + serif; +} +.calisto { + font-family: "Calisto MT", + serif; +} +.garamond { + font-family: garamond, + serif; +} +.baskerville { + font-family: baskerville, + serif; +} +/* pagination.html: https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/template_embedded.go#L117 */ +.pagination { + margin: 3rem 0; +} +.pagination li { + display: inline-block; + margin-right: .375rem; + font-size: .875rem; + margin-bottom: 2.5em; +} +.pagination li a { + padding: .5rem .625rem; + background-color: white; + color: #333; + border: 1px solid #ddd; + border-radius: 3px; + text-decoration: none; +} +.pagination li.disabled { + display: none; +} +.pagination li.active a:link, +.pagination li.active a:active, +.pagination li.active a:visited { + background-color: #ddd; +} +/* Hides non-meaningful TOC items*/ +#TableOfContents ul li ul li ul li{ + display: none; + } +#TableOfContents ul li { + color: black; + display: block; + margin-bottom: .375em; + line-height: 1.375; +} +#TableOfContents ul li a{ + width: 100%; + padding: .25em .375em; + margin-left: -.375em; + +} +#TableOfContents ul li a:hover { + background-color: #999; + color: white; + +} +.no-js .needs-js { + opacity: 0 +} +.js .needs-js { + opacity: 1; + -webkit-transition: opacity .15s ease-in; + transition: opacity .15s ease-in; +} +.facebook, +.twitter, +.instagram, +.youtube { + fill: #bababa; +} +.facebook:hover { + fill: #3b5998; +} +.twitter { + fill: #55acee; +} +.twitter:hover { + fill: #bababa; +} +.instagram:hover { + fill: #e95950; +} +.youtube:hover { + fill: #bb0000; +} +.mstdn { + display: inline-block; + background-color: #282c37; + color: #d9e1e8; + text-decoration: none; + padding: 4px 10px 4px 30px; + border-radius: 4px; + font-size: 16px; + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2261.076954mm%22%20height%3D%2265.47831mm%22%20viewBox%3D%220%200%20216.4144%20232.00976%22%3E%3Cpath%20d%3D%22M211.80734%20139.0875c-3.18125%2016.36625-28.4925%2034.2775-57.5625%2037.74875-15.15875%201.80875-30.08375%203.47125-45.99875%202.74125-26.0275-1.1925-46.565-6.2125-46.565-6.2125%200%202.53375.15625%204.94625.46875%207.2025%203.38375%2025.68625%2025.47%2027.225%2046.39125%2027.9425%2021.11625.7225%2039.91875-5.20625%2039.91875-5.20625l.8675%2019.09s-14.77%207.93125-41.08125%209.39c-14.50875.7975-32.52375-.365-53.50625-5.91875C9.23234%20213.82%201.40609%20165.31125.20859%20116.09125c-.365-14.61375-.14-28.39375-.14-39.91875%200-50.33%2032.97625-65.0825%2032.97625-65.0825C49.67234%203.45375%2078.20359.2425%20107.86484%200h.72875c29.66125.2425%2058.21125%203.45375%2074.8375%2011.09%200%200%2032.975%2014.7525%2032.975%2065.0825%200%200%20.41375%2037.13375-4.59875%2062.915%22%20fill%3D%22%233088d4%22%2F%3E%3Cpath%20d%3D%22M177.50984%2080.077v60.94125h-24.14375v-59.15c0-12.46875-5.24625-18.7975-15.74-18.7975-11.6025%200-17.4175%207.5075-17.4175%2022.3525v32.37625H96.20734V85.42325c0-14.845-5.81625-22.3525-17.41875-22.3525-10.49375%200-15.74%206.32875-15.74%2018.7975v59.15H38.90484V80.077c0-12.455%203.17125-22.3525%209.54125-29.675%206.56875-7.3225%2015.17125-11.07625%2025.85-11.07625%2012.355%200%2021.71125%204.74875%2027.8975%2014.2475l6.01375%2010.08125%206.015-10.08125c6.185-9.49875%2015.54125-14.2475%2027.8975-14.2475%2010.6775%200%2019.28%203.75375%2025.85%2011.07625%206.36875%207.3225%209.54%2017.22%209.54%2029.675%22%20fill%3D%22%23fff%22%2F%3E%3C%2Fsvg%3E"); + background-size: 16px; + background-repeat: no-repeat; + background-position: top 50% left 8px; + -webkit-transition: all 0.5s; + transition: all 0.5s; +} +.mstdn:hover { + background-color: #484c56; +} +.mstdn > span { + color: #9baec8; + font-size: 12px; + padding-left: 3px; +} +.mstdn > span:before { + content: "@"; +} +@media (min-width: 75em) { + + [data-scrolldir="down"] .sticky { + position: fixed; + top:100px; + right:0; + } + + [data-scrolldir="up"] .sticky { + position: fixed; + top:100px; + right:0; + } +} +#right-sidebar { + scrollbar-width: none; /* hide scrollbar: Firefox */ + -ms-overflow-style: none; /* hide scrollbar: Internet Explorer 10+ */ + height: calc(100vh - 9rem); + overflow-y: auto; +} +#right-sidebar::-webkit-scrollbar { /* hide scrollbar: WebKit */ + width: 0; + height: 0; +} +.fill-current { fill: currentColor; } +/* Background */ +.chroma { background-color: #ffffff } +/* Error */ +.chroma .err { color: #a61717; background-color: #e3d2d2 } +/* LineTableTD */ +.chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; } +/* LineTable */ +.chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; width: auto; overflow: auto; display: block; } +/* LineHighlight */ +.chroma .hl { display: block; width: 100%;background-color: #ffffcc } +/* LineNumbersTable */ +.chroma .lnt { margin-right: 0.4em; padding: 0 0.4em 0 0.4em; } +/* LineNumbers */ +.chroma .ln { margin-right: 0.4em; padding: 0 0.4em 0 0.4em; } +/* Keyword */ +.chroma .k { font-weight: bold } +/* KeywordConstant */ +.chroma .kc { font-weight: bold } +/* KeywordDeclaration */ +.chroma .kd { font-weight: bold } +/* KeywordNamespace */ +.chroma .kn { font-weight: bold } +/* KeywordPseudo */ +.chroma .kp { font-weight: bold } +/* KeywordReserved */ +.chroma .kr { font-weight: bold } +/* KeywordType */ +.chroma .kt { color: #445588; font-weight: bold } +/* NameAttribute */ +.chroma .na { color: #008080 } +/* NameBuiltin */ +.chroma .nb { color: #999999 } +/* NameClass */ +.chroma .nc { color: #445588; font-weight: bold } +/* NameConstant */ +.chroma .no { color: #008080 } +/* NameEntity */ +.chroma .ni { color: #800080 } +/* NameException */ +.chroma .ne { color: #990000; font-weight: bold } +/* NameFunction */ +.chroma .nf { color: #990000; font-weight: bold } +/* NameNamespace */ +.chroma .nn { color: #555555 } +/* NameTag */ +.chroma .nt { color: #000080 } +/* NameVariable */ +.chroma .nv { color: #008080 } +/* LiteralString */ +.chroma .s { color: #bb8844 } +/* LiteralStringAffix */ +.chroma .sa { color: #bb8844 } +/* LiteralStringBacktick */ +.chroma .sb { color: #bb8844 } +/* LiteralStringChar */ +.chroma .sc { color: #bb8844 } +/* LiteralStringDelimiter */ +.chroma .dl { color: #bb8844 } +/* LiteralStringDoc */ +.chroma .sd { color: #bb8844 } +/* LiteralStringDouble */ +.chroma .s2 { color: #bb8844 } +/* LiteralStringEscape */ +.chroma .se { color: #bb8844 } +/* LiteralStringHeredoc */ +.chroma .sh { color: #bb8844 } +/* LiteralStringInterpol */ +.chroma .si { color: #bb8844 } +/* LiteralStringOther */ +.chroma .sx { color: #bb8844 } +/* LiteralStringRegex */ +.chroma .sr { color: #808000 } +/* LiteralStringSingle */ +.chroma .s1 { color: #bb8844 } +/* LiteralStringSymbol */ +.chroma .ss { color: #bb8844 } +/* LiteralNumber */ +.chroma .m { color: #009999 } +/* LiteralNumberBin */ +.chroma .mb { color: #009999 } +/* LiteralNumberFloat */ +.chroma .mf { color: #009999 } +/* LiteralNumberHex */ +.chroma .mh { color: #009999 } +/* LiteralNumberInteger */ +.chroma .mi { color: #009999 } +/* LiteralNumberIntegerLong */ +.chroma .il { color: #009999 } +/* LiteralNumberOct */ +.chroma .mo { color: #009999 } +/* Operator */ +.chroma .o { font-weight: bold } +/* OperatorWord */ +.chroma .ow { font-weight: bold } +/* Comment */ +.chroma .c { color: #999988; font-style: italic } +/* CommentHashbang */ +.chroma .ch { color: #999988; font-style: italic } +/* CommentMultiline */ +.chroma .cm { color: #999988; font-style: italic } +/* CommentSingle */ +.chroma .c1 { color: #999988; font-style: italic } +/* CommentSpecial */ +.chroma .cs { color: #999999; font-weight: bold; font-style: italic } +/* CommentPreproc */ +.chroma .cp { color: #999999; font-weight: bold } +/* CommentPreprocFile */ +.chroma .cpf { color: #999999; font-weight: bold } +/* GenericDeleted */ +.chroma .gd { color: #000000; background-color: #ffdddd } +/* GenericEmph */ +.chroma .ge { font-style: italic } +/* GenericError */ +.chroma .gr { color: #aa0000 } +/* GenericHeading */ +.chroma .gh { color: #999999 } +/* GenericInserted */ +.chroma .gi { color: #000000; background-color: #ddffdd } +/* GenericOutput */ +.chroma .go { color: #888888 } +/* GenericPrompt */ +.chroma .gp { color: #555555 } +/* GenericStrong */ +.chroma .gs { font-weight: bold } +/* GenericSubheading */ +.chroma .gu { color: #aaaaaa } +/* GenericTraceback */ +.chroma .gt { color: #aa0000 } +/* TextWhitespace */ +.chroma .w { color: #bbbbbb } +@media print { + #page-footer, + body > footer, + body > nav { + display: none; + } +} +/* +Make h6 elements behave like dt elements. Initially implemented to support +linkable glossary entries. + +Yes, it's a hack. That's why it's in the shame file. +*/ +h6 { + margin-top: 0; + margin-bottom: 0; + font-size: 1.125rem; +} +h6:first-of-type { + margin-top: 3em; +} +h6 ~ p { + margin: 0.5em 0 2em 0; +} +.nested-blockquote blockquote { + border-left: 4px solid #0594CB; + padding-left: 1em; +} +.mw-90 { + max-width:90%; +} +/* purgecss end ignore */ + diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/assets/output/js/app.js b/docs/_vendor/github.com/gohugoio/gohugoioTheme/assets/output/js/app.js new file mode 100644 index 000000000..a3e1801f8 --- /dev/null +++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/assets/output/js/app.js @@ -0,0 +1,17 @@ +!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=1)}([function(t,e,n){!function(e,n){var r=function(t,e,n){"use strict";var r,i;if(function(){var e,n={lazyClass:"lazyload",loadedClass:"lazyloaded",loadingClass:"lazyloading",preloadClass:"lazypreload",errorClass:"lazyerror",autosizesClass:"lazyautosizes",fastLoadedClass:"ls-is-cached",iframeLoadMode:0,srcAttr:"data-src",srcsetAttr:"data-srcset",sizesAttr:"data-sizes",minSize:40,customMedia:{},init:!0,expFactor:1.5,hFac:.8,loadMode:2,loadHidden:!0,ricTimeout:0,throttleDelay:125};for(e in i=t.lazySizesConfig||t.lazysizesConfig||{},n)e in i||(i[e]=n[e])}(),!e||!e.getElementsByClassName)return{init:function(){},cfg:i,noSupport:!0};var o=e.documentElement,s=t.HTMLPictureElement,a=t.addEventListener.bind(t),u=t.setTimeout,c=t.requestAnimationFrame||u,l=t.requestIdleCallback,h=/^picture$/i,f=["load","error","lazyincluded","_lazyloaded"],d={},p=Array.prototype.forEach,g=function(t,e){return d[e]||(d[e]=new RegExp("(\\s|^)"+e+"(\\s|$)")),d[e].test(t.getAttribute("class")||"")&&d[e]},m=function(t,e){g(t,e)||t.setAttribute("class",(t.getAttribute("class")||"").trim()+" "+e)},y=function(t,e){var n;(n=g(t,e))&&t.setAttribute("class",(t.getAttribute("class")||"").replace(n," "))},v=function(t,e,n){var r=n?"addEventListener":"removeEventListener";n&&v(t,e),f.forEach((function(n){t[r](n,e)}))},b=function(t,n,i,o,s){var a=e.createEvent("Event");return i||(i={}),i.instance=r,a.initEvent(n,!o,!s),a.detail=i,t.dispatchEvent(a),a},w=function(e,n){var r;!s&&(r=t.picturefill||i.pf)?(n&&n.src&&!e.getAttribute("srcset")&&e.setAttribute("srcset",n.src),r({reevaluate:!0,elements:[e]})):n&&n.src&&(e.src=n.src)},_=function(t,e){return(getComputedStyle(t,null)||{})[e]},x=function(t,e,n){for(n=n||t.offsetWidth;n2&&D>2&&!e.hidden?(W=p,X=0):W=D>1&&X>1&&Q<6?d:0),f!==c&&($=innerWidth+c*g,M=innerHeight+c,l=-1*c,f=c),s=m[n].getBoundingClientRect(),(B=s.bottom)>=l&&(H=s.top)<=M&&(z=s.right)>=l*g&&(F=s.left)<=$&&(B||z||F||H)&&(i.loadHidden||Z(m[n]))&&(R&&Q<3&&!h&&(D<3||X<4)||Y(m[n],c))){if(at(m[n]),u=!0,Q>9)break}else!u&&R&&!a&&Q<4&&X<4&&D>2&&(L[0]||i.preloadAfterLoad)&&(L[0]||!h&&(B||z||F||H||"auto"!=m[n].getAttribute(i.sizesAttr)))&&(a=L[0]||m[n]);a&&!u&&at(a)}},et=function(t){var e,r=0,o=i.throttleDelay,s=i.ricTimeout,a=function(){e=!1,r=n.now(),t()},c=l&&s>49?function(){l(a,{timeout:s}),s!==i.ricTimeout&&(s=i.ricTimeout)}:C((function(){u(a)}),!0);return function(t){var i;(t=!0===t)&&(s=33),e||(e=!0,(i=o-(n.now()-r))<0&&(i=0),t||i<9?c():u(c,i))}}(tt),nt=function(t){var e=t.target;e._lazyCache?delete e._lazyCache:(G(t),m(e,i.loadedClass),y(e,i.loadingClass),v(e,it),b(e,"lazyloaded"))},rt=C(nt),it=function(t){rt({target:t.target})},ot=function(t){var e,n=t.getAttribute(i.srcsetAttr);(e=i.customMedia[t.getAttribute("data-media")||t.getAttribute("media")])&&t.setAttribute("media",e),n&&t.setAttribute("srcset",n)},st=C((function(t,e,n,r,o){var s,a,c,l,f,d;(f=b(t,"lazybeforeunveil",e)).defaultPrevented||(r&&(n?m(t,i.autosizesClass):t.setAttribute("sizes",r)),a=t.getAttribute(i.srcsetAttr),s=t.getAttribute(i.srcAttr),o&&(l=(c=t.parentNode)&&h.test(c.nodeName||"")),d=e.firesLoad||"src"in t&&(a||s||l),f={target:t},m(t,i.loadingClass),d&&(clearTimeout(P),P=u(G,2500),v(t,it,!0)),l&&p.call(c.getElementsByTagName("source"),ot),a?t.setAttribute("srcset",a):s&&!l&&(K.test(t.nodeName)?function(t,e){var n=t.getAttribute("data-load-mode")||i.iframeLoadMode;0==n?t.contentWindow.location.replace(e):1==n&&(t.src=e)}(t,s):t.src=s),o&&(a||l)&&w(t,{src:s})),t._lazyRace&&delete t._lazyRace,y(t,i.lazyClass),S((function(){var e=t.complete&&t.naturalWidth>1;d&&!e||(e&&m(t,i.fastLoadedClass),nt(f),t._lazyCache=!0,u((function(){"_lazyCache"in t&&delete t._lazyCache}),9)),"lazy"==t.loading&&Q--}),!0)})),at=function(t){if(!t._lazyRace){var e,n=V.test(t.nodeName),r=n&&(t.getAttribute(i.sizesAttr)||t.getAttribute("sizes")),o="auto"==r;(!o&&R||!n||!t.getAttribute("src")&&!t.srcset||t.complete||g(t,i.errorClass)||!g(t,i.lazyClass))&&(e=b(t,"lazyunveilread").detail,o&&T.updateElem(t,!0,t.offsetWidth),t._lazyRace=!0,Q++,st(t,e,o,r,n))}},ut=A((function(){i.loadMode=3,et()})),ct=function(){3==i.loadMode&&(i.loadMode=2),ut()},lt=function(){R||(n.now()-q<999?u(lt,999):(R=!0,i.loadMode=3,et(),a("scroll",ct,!0)))},{_:function(){q=n.now(),r.elements=e.getElementsByClassName(i.lazyClass),L=e.getElementsByClassName(i.lazyClass+" "+i.preloadClass),a("scroll",et,!0),a("resize",et,!0),a("pageshow",(function(t){if(t.persisted){var n=e.querySelectorAll("."+i.loadingClass);n.length&&n.forEach&&c((function(){n.forEach((function(t){t.complete&&at(t)}))}))}})),t.MutationObserver?new MutationObserver(et).observe(o,{childList:!0,subtree:!0,attributes:!0}):(o.addEventListener("DOMNodeInserted",et,!0),o.addEventListener("DOMAttrModified",et,!0),setInterval(et,999)),a("hashchange",et,!0),["focus","mouseover","click","load","transitionend","animationend"].forEach((function(t){e.addEventListener(t,et,!0)})),/d$|^c/.test(e.readyState)?lt():(a("load",lt),e.addEventListener("DOMContentLoaded",et),u(lt,2e4)),r.elements.length?(tt(),S._lsFlush()):et()},checkElems:et,unveil:at,_aLSL:ct}),T=(N=C((function(t,e,n,r){var i,o,s;if(t._lazysizesWidth=r,r+="px",t.setAttribute("sizes",r),h.test(e.nodeName||""))for(o=0,s=(i=e.getElementsByTagName("source")).length;o Original Processed
+ {{ . | $.RenderString | safeHTML }}
+
+ {{ delimit . ", "}}
+ Books: Related content:0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof t.action?t.action:this.defaultAction,this.target="function"==typeof t.target?t.target:this.defaultTarget,this.text="function"==typeof t.text?t.text:this.defaultText,this.container="object"===r(t.container)?t.container:document.body}},{key:"listenClick",value:function(t){var e=this;this.listener=(0,a.default)(t,"click",(function(t){return e.onClick(t)}))}},{key:"onClick",value:function(t){var e=t.delegateTarget||t.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new o.default({action:this.action(e),target:this.target(e),text:this.text(e),container:this.container,trigger:e,emitter:this})}},{key:"defaultAction",value:function(t){return l("action",t)}},{key:"defaultTarget",value:function(t){var e=l("target",t);if(e)return document.querySelector(e)}},{key:"defaultText",value:function(t){return l("text",t)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],e="string"==typeof t?[t]:t,n=!!document.queryCommandSupported;return e.forEach((function(t){n=n&&!!document.queryCommandSupported(t)})),n}}]),e}(s.default);function l(t,e){var n="data-clipboard-"+t;if(e.hasAttribute(n))return e.getAttribute(n)}t.exports=c},function(t,e,n){"use strict";var r,i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=function(){function t(t,e){for(var n=0;n
+
+
diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/math.html b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/math.html
new file mode 100644
index 000000000..b1eb5c8db
--- /dev/null
+++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/math.html
@@ -0,0 +1,16 @@
+
+
diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/nav-links-docs-mobile.html b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/nav-links-docs-mobile.html
new file mode 100644
index 000000000..a8fc27e21
--- /dev/null
+++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/nav-links-docs-mobile.html
@@ -0,0 +1,11 @@
+{{ $currentPage := . }}
+{{ $menu := .Site.Menus.docs.ByWeight }}
+
+
+
+
+ {{ range . }}
+ LastMod
+ Link
+ GitHub
+
+
+ {{ end }}
+
+{{ .Lastmod.Format "2006-01-02" }}
+
+ {{ .Title }}
+
+
+
+ {{ with .GitInfo }}{{ .Subject }}{{ else }}Source{{ end }}
+
+
+
+ {{ range $menu }}{{ $post := printf "%s" .Post }}
+
diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/nav-links-docs.html b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/nav-links-docs.html
new file mode 100644
index 000000000..61aa11dde
--- /dev/null
+++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/nav-links-docs.html
@@ -0,0 +1,23 @@
+{{ $currentPage := . }}
+
diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/nav-links-global-mobile.html b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/nav-links-global-mobile.html
new file mode 100644
index 000000000..6ad98923e
--- /dev/null
+++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/nav-links-global-mobile.html
@@ -0,0 +1,11 @@
+{{ $currentPage := . }}
+{{ $menu := .Site.Menus.global }}
+
diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/nav-links.html b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/nav-links.html
new file mode 100644
index 000000000..af3790b16
--- /dev/null
+++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/nav-links.html
@@ -0,0 +1,37 @@
+{{ $currentPage := . }}
+{{ $.Scratch.Add "listlinkClasses" "f6 link primary-color-dark hover-white db brand-font ma0 w-100 pv3 ph4" }}
+
+
+
+
+ {{ range .Site.Menus.main }}
+
diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/nav-mobile.html b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/nav-mobile.html
new file mode 100644
index 000000000..b04866e52
--- /dev/null
+++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/nav-mobile.html
@@ -0,0 +1,12 @@
+
+
+
+
+
+ {{ else }}
+
+ {{ .Name }}
+
+ {{end}}
+
+
+
+
+
+ {{ with $.context.Data.Singular }}{{ . | humanize }}: {{ end }}{{ .context.Title }}
+
+ {{ $heading }}
+
+ {{- range . }}
+
+{{- end }}
diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/right-sidebar.html b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/right-sidebar.html
new file mode 100644
index 000000000..ecdbeb33f
--- /dev/null
+++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/right-sidebar.html
@@ -0,0 +1,29 @@
+
diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/site-footer.html b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/site-footer.html
new file mode 100644
index 000000000..09c013361
--- /dev/null
+++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/site-footer.html
@@ -0,0 +1,48 @@
+
diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/site-manifest.html b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/site-manifest.html
new file mode 100644
index 000000000..54472ba16
--- /dev/null
+++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/site-manifest.html
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/site-nav.html b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/site-nav.html
new file mode 100644
index 000000000..f387d66f3
--- /dev/null
+++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/site-nav.html
@@ -0,0 +1,38 @@
+{{ $currentPage := . }}
+
diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/site-scripts.html b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/site-scripts.html
new file mode 100644
index 000000000..7dec9de18
--- /dev/null
+++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/site-scripts.html
@@ -0,0 +1,17 @@
+
+{{ $scripts := resources.Get "output/js/app.js" }}
+{{ $isDev := eq hugo.Environment "development" }}
+{{ if not $isDev }}
+{{ $scripts = $scripts | fingerprint }}
+{{ end }}
+{{ with $scripts }}
+ {{ if $isDev }}
+
+ {{ else }}
+
+ {{ end }}
+ {{ $.Scratch.Set "scripts" . }}
+{{end}}
+
+
+
diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/site-search.html b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/site-search.html
new file mode 100644
index 000000000..8c97ac454
--- /dev/null
+++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/site-search.html
@@ -0,0 +1,6 @@
+
diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/social-follow.html b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/social-follow.html
new file mode 100644
index 000000000..7451c15d6
--- /dev/null
+++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/social-follow.html
@@ -0,0 +1,21 @@
+
+ {{ partial "svg/twitter.svg" (dict "size" "32px") }}
+
+gohugoio
+Star
diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/summary.html b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/summary.html
new file mode 100644
index 000000000..0f140cf70
--- /dev/null
+++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/summary.html
@@ -0,0 +1,13 @@
+
+ {{ with .Params.tags }}
+
+
+
+
diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/chroma-lexers.html b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/chroma-lexers.html
new file mode 100644
index 000000000..2e10c3dee
--- /dev/null
+++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/chroma-lexers.html
@@ -0,0 +1,6 @@
+
+
+
+
+ {{ range $ind, $art := $.Site.Data.articles.article }}
+ Title
+ Author
+ Date
+
+
+ {{ end }}
+
+{{$art.title | markdownify }}
+ {{ $art.author | markdownify }}
+ {{ $art.date }}
+
+ {{ range .Site.Data.docs.chroma.lexers }}
+
diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/code-toggle.html b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/code-toggle.html
new file mode 100644
index 000000000..d1131132d
--- /dev/null
+++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/code-toggle.html
@@ -0,0 +1,101 @@
+{{- /*
+ Renders syntax-highlighted configuration data in JSON, TOML, and YAML formats.
+
+ @param {string} [config] The section of site.Data.docs.config to render.
+ @param {bool} [copy=false] If true, display a copy to clipboard button.
+ @param {string} [file] The file name to display above the rendered code.
+ @param {bool} [fm=false] If true, render the code as front matter.
+ @param {bool} [skipHeader=false] If false, omit top level key(s) when rendering a section of site.Data.docs.config.
+
+ @returns {template.HTML}
+*/}}
+
+{{- /* Initialize. */}}
+{{- $config := "" }}
+{{- $dataKey := "" }}
+{{- $copy := false }}
+{{- $file := "" }}
+{{- $fm := false }}
+{{- $skipHeader := false }}
+
+{{- /* Get parameters. */}}
+{{- $config = .Get "config" }}
+{{- $dataKey = .Get "dataKey" }}
+{{- $file = .Get "file" }}
+{{- if in (slice "false" false 0) (.Get "copy") }}
+ {{- $copy = false }}
+{{- else if in (slice "true" true 1) (.Get "copy") }}
+ {{- $copy = true }}
+{{- end }}
+{{- if in (slice "false" false 0) (.Get "fm") }}
+ {{- $fm = false }}
+{{- else if in (slice "true" true 1) (.Get "fm") }}
+ {{- $fm = true }}
+{{- end }}
+{{- if in (slice "false" false 0) (.Get "skipHeader") }}
+ {{- $skipHeader = false }}
+{{- else if in (slice "true" true 1) (.Get "skipHeader") }}
+ {{- $skipHeader = true }}
+{{- end }}
+
+{{- /* Define constants. */}}
+{{- $delimiters := dict "toml" "+++" "yaml" "---" }}
+{{- $langs := slice "yaml" "toml" "json" }}
+{{- $placeHolder := "#-hugo-placeholder-#" }}
+
+{{- /* Render. */}}
+{{- $code := "" }}
+{{- if $config }}
+ {{- $file = $file | default "hugo" }}
+ {{- $sections := (split $config ".") }}
+ {{- $configSection := index $.Site.Data.docs.config $sections }}
+ {{- $code = dict $sections $configSection }}
+ {{- if $skipHeader }}
+ {{- $code = $configSection }}
+ {{- end }}
+{{- else if $dataKey }}
+ {{- $file = $file | default $dataKey }}
+ {{- $sections := (split $dataKey ".") }}
+ {{- $code = index $.Site.Data.docs $sections }}
+{{- else }}
+ {{- $code = $.Inner }}
+{{- end }}
+
+
diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/datatable.html b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/datatable.html
new file mode 100644
index 000000000..12054f89d
--- /dev/null
+++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/datatable.html
@@ -0,0 +1,33 @@
+{{ $package := (index .Params 0) }}
+{{ $listname := (index .Params 1) }}
+{{ $list := (index (index .Site.Data.docs $package) $listname) }}
+{{ $fields := after 2 .Params }}
+
+
+
+ {{ range $fields }}
+
+ {{ range $list }}
+ {{ . }}
+ {{ end }}
+
+ {{ range $k, $v := . }}
+ {{ $.Scratch.Set $k $v }}
+ {{ end }}
+ {{ range $k, $v := $fields }}
+
+ {{ end }}
+
+ {{ $tdContent := $.Scratch.Get . }}
+ {{ if eq $k 3 }}
+ {{ printf "%v" $tdContent |
+ strings.ReplaceRE `\[` "
+ {{ end }}
+
" |
+ safeHTML }}
+ {{ else }}
+ {{ $tdContent }}
+ {{ end}}
+
+
diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/deprecated-in.html b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/deprecated-in.html
new file mode 100644
index 000000000..7219d7f54
--- /dev/null
+++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/deprecated-in.html
@@ -0,0 +1,14 @@
+{{ $_hugo_config := `{ "version": 1 }` }}
+
+{{ with .Get 0 }}
+ {{ $version := printf "v%v" (strings.TrimLeft "vV" .) }}
+ {{ $href := printf "https://github.com/gohugoio/hugo/releases/tag/%s" $version }}
+
+{{ else }}
+ {{ errorf "The %q shortcode requires a single positional parameter indicating version. See %s" .Name .Position }}
+{{ end }}
diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/funcsig.html b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/funcsig.html
new file mode 100644
index 000000000..4e96504ab
--- /dev/null
+++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/funcsig.html
@@ -0,0 +1,4 @@
+
+ {{ range $fields }}
+ {{ $s := . }}
+ {{ if eq $s "_key" }}
+ {{ $s = "Type" }}
+ {{ end }}
+
+ {{ range $k1, $v1 := $list }}
+ {{ $s }}
+ {{ end }}
+
+ {{ range $k2, $v2 := . }}
+ {{ $.Scratch.Set $k2 $v2 }}
+ {{ end }}
+ {{ range $fields }}
+ {{ $s := "" }}
+ {{ if eq . "_key" }}
+ {{ $s = $k1 }}
+ {{ else }}
+ {{ $s = $.Scratch.Get . }}
+ {{ end }}
+
+ {{ end }}
+{{ $s }}
+ {{ end }}
+ Syntax
+
+ {{- .Inner -}}
+
diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/gomodules-info.html b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/gomodules-info.html
new file mode 100644
index 000000000..b56758ac3
--- /dev/null
+++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/gomodules-info.html
@@ -0,0 +1,17 @@
+{{ $text := `
+Most of the commands for **Hugo Modules** require a newer version of Go installed (see https://golang.org/dl/) and the relevant VCS client (e.g. Git, see https://git-scm.com/downloads/ ). If you have an "older" site running on Netlify, you may have to set GO_VERSION to 1.12 in your Environment settings.
+
+For more information about Go Modules, see:
+
+* https://github.com/golang/go/wiki/Modules
+* https://blog.golang.org/using-go-modules
+` }}
+
+
diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/img.html b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/img.html
new file mode 100644
index 000000000..50d4da9ed
--- /dev/null
+++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/img.html
@@ -0,0 +1,379 @@
+{{- /*
+Renders the given image using the given filter, if any.
+
+@param {string} src The path to the image which must be a remote, page, or global resource.
+@param {string} [filter] The filter to apply to the image (case-insensitive).
+@param {string} [filterArgs] A comma-delimited list of arguments to pass to the filter.
+@param {bool} [example=false] If true, renders a before/after example.
+@param {int} [exampleWidth=384] Image width, in pixels, when rendering a before/after example.
+
+@returns {template.HTML}
+
+@examples
+
+ {{< img src="zion-national-park.jpg" >}}
+
+ {{< img src="zion-national-park.jpg" alt="Zion National Park" >}}
+
+ {{< img
+ src="zion-national-park.jpg"
+ alt="Zion National Park"
+ filter="grayscale"
+ >}}
+
+ {{< img
+ src="zion-national-park.jpg"
+ alt="Zion National Park"
+ filter="process"
+ filterArgs="resize 400x webp"
+ >}}
+
+ {{< img
+ src="zion-national-park.jpg"
+ alt="Zion National Park"
+ filter="colorize"
+ filterArgs="180,50,20"
+ >}}
+
+ {{< img
+ src="zion-national-park.jpg"
+ alt="Zion National Park"
+ filter="grayscale"
+ example=true
+ >}}
+
+ {{< img
+ src="zion-national-park.jpg"
+ alt="Zion National Park"
+ filter="grayscale"
+ example=true
+ exampleWidth=400
+ >}}
+
+ When using the text filter, provide the arguments in this order:
+
+ 0. The text
+ 1. The horizontal offset, in pixels, relative to the left of the image (default 20)
+ 2. The vertical offset, in pixels, relative to the top of the image (default 20)
+ 3. The font size in pixels (default 64)
+ 4. The line height (default 1.2)
+ 5. The font color (default #ffffff)
+
+ {{< img
+ src="images/examples/zion-national-park.jpg"
+ alt="Zion National Park"
+ filter="Text"
+ filterArgs="Zion National Park,25,250,56"
+ example=true
+ >}}
+
+ When using the padding filter, provide all arguments in this order:
+
+ 0. Padding top
+ 1. Padding right
+ 2. Padding bottom
+ 3. Padding right
+ 4. Canvas color
+
+ {{< img
+ src="images/examples/zion-national-park.jpg"
+ alt="Zion National Park"
+ filter="Padding"
+ filterArgs="20,50,20,50,#0705"
+ example=true
+ >}}
+
+*/}}
+
+{{- /* Initialize. */}}
+{{- $alt := "" }}
+{{- $src := "" }}
+{{- $filter := "" }}
+{{- $filterArgs := slice }}
+{{- $example := false }}
+{{- $exampleWidth := 384 }}
+
+{{- /* Default values to use with the text filter. */}}
+{{ $textFilterOpts := dict
+ "xOffset" 20
+ "yOffset" 20
+ "fontSize" 64
+ "lineHeight" 1.2
+ "fontColor" "#ffffff"
+ "fontPath" "https://github.com/google/fonts/raw/main/ofl/lato/Lato-Regular.ttf"
+}}
+
+{{- /* Get and validate parameters. */}}
+{{- with .Get "alt" }}
+ {{- $alt = .}}
+{{- end }}
+
+{{- with .Get "src" }}
+ {{- $src = . }}
+{{- else }}
+ {{- errorf "The %q shortcode requires a file parameter. See %s" .Name .Position }}
+{{- end }}
+
+{{- with .Get "filter" }}
+ {{- $filter = . | lower }}
+{{- end }}
+
+{{- $validFilters := slice
+ "autoorient" "brightness" "colorbalance" "colorize" "contrast" "gamma"
+ "gaussianblur" "grayscale" "hue" "invert" "none" "opacity" "overlay"
+ "padding" "pixelate" "process" "saturation" "sepia" "sigmoid" "text"
+ "unsharpmask"
+}}
+
+{{- with $filter }}
+ {{- if not (in $validFilters .) }}
+ {{- errorf "The filter passed to the %q shortcode is invalid. The filter must be one of %s. See %s" $.Name (delimit $validFilters ", " ", or ") $.Position }}
+ {{- end }}
+{{- end }}
+
+{{- with .Get "filterArgs" }}
+ {{- $filterArgs = split . "," }}
+ {{- $filterArgs = apply $filterArgs "trim" "." " " }}
+{{- end }}
+
+{{- if in (slice "false" false 0) (.Get "example") }}
+ {{- $example = false }}
+{{- else if in (slice "true" true 1) (.Get "example")}}
+ {{- $example = true }}
+{{- end }}
+
+{{- with .Get "exampleWidth" }}
+ {{- $exampleWidth = . | int }}
+{{- end }}
+
+{{- /* Get image. */}}
+{{- $ctx := dict "page" .Page "src" $src "name" .Name "position" .Position }}
+{{- $i := partial "inline/get-resource.html" $ctx }}
+
+{{- /* Resize if rendering before/after examples. */}}
+{{- if $example }}
+ {{- $i = $i.Resize (printf "%dx" $exampleWidth) }}
+{{- end }}
+
+{{- /* Create filter. */}}
+{{- $f := "" }}
+{{- $ctx := dict "filter" $filter "args" $filterArgs "name" .Name "position" .Position }}
+{{- if eq $filter "autoorient" }}
+ {{- $ctx = merge $ctx (dict "argsRequired" 0) }}
+ {{- template "validate-arg-count" $ctx }}
+ {{- $f = images.AutoOrient }}
+{{- else if eq $filter "brightness" }}
+ {{- $ctx = merge $ctx (dict "argsRequired" 1) }}
+ {{- template "validate-arg-count" $ctx }}
+ {{- $filterArgs = apply $filterArgs "float" "." }}
+ {{- $ctx = merge $ctx (dict "argName" "percentage" "argValue" (index $filterArgs 0) "min" -100 "max" 100) }}
+ {{- template "validate-arg-value" $ctx }}
+ {{- $f = images.Brightness (index $filterArgs 0) }}
+{{- else if eq $filter "colorbalance" }}
+ {{- $ctx = merge $ctx (dict "argsRequired" 3) }}
+ {{- template "validate-arg-count" $ctx }}
+ {{- $filterArgs = apply $filterArgs "float" "." }}
+ {{- $ctx = merge $ctx (dict "argName" "percentage red" "argValue" (index $filterArgs 0) "min" -100 "max" 500) }}
+ {{- template "validate-arg-value" $ctx }}
+ {{- $ctx = merge $ctx (dict "argName" "percentage green" "argValue" (index $filterArgs 1) "min" -100 "max" 500) }}
+ {{- template "validate-arg-value" $ctx }}
+ {{- $ctx = merge $ctx (dict "argName" "percentage blue" "argValue" (index $filterArgs 2) "min" -100 "max" 500) }}
+ {{- template "validate-arg-value" $ctx }}
+ {{- $f = images.ColorBalance (index $filterArgs 0) (index $filterArgs 1) (index $filterArgs 2) }}
+{{- else if eq $filter "colorize" }}
+ {{- $ctx = merge $ctx (dict "argsRequired" 3) }}
+ {{- template "validate-arg-count" $ctx }}
+ {{- $filterArgs = apply $filterArgs "float" "." }}
+ {{- $ctx = merge $ctx (dict "argName" "hue" "argValue" (index $filterArgs 0) "min" 0 "max" 360) }}
+ {{- template "validate-arg-value" $ctx }}
+ {{- $ctx = merge $ctx (dict "argName" "saturation" "argValue" (index $filterArgs 1) "min" 0 "max" 100) }}
+ {{- template "validate-arg-value" $ctx }}
+ {{- $ctx = merge $ctx (dict "argName" "percentage" "argValue" (index $filterArgs 2) "min" 0 "max" 100) }}
+ {{- template "validate-arg-value" $ctx }}
+ {{- $f = images.Colorize (index $filterArgs 0) (index $filterArgs 1) (index $filterArgs 2) }}
+{{- else if eq $filter "contrast" }}
+ {{- $ctx = merge $ctx (dict "argsRequired" 1) }}
+ {{- template "validate-arg-count" $ctx }}
+ {{- $filterArgs = apply $filterArgs "float" "." }}
+ {{- $ctx = merge $ctx (dict "argName" "percentage" "argValue" (index $filterArgs 0) "min" -100 "max" 100) }}
+ {{- template "validate-arg-value" $ctx }}
+ {{- $f = images.Contrast (index $filterArgs 0) }}
+{{- else if eq $filter "gamma" }}
+ {{- $ctx = merge $ctx (dict "argsRequired" 1) }}
+ {{- template "validate-arg-count" $ctx }}
+ {{- $filterArgs = apply $filterArgs "float" "." }}
+ {{- $ctx = merge $ctx (dict "argName" "gamma" "argValue" (index $filterArgs 0) "min" 0 "max" 100) }}
+ {{- template "validate-arg-value" $ctx }}
+ {{- $f = images.Gamma (index $filterArgs 0) }}
+{{- else if eq $filter "gaussianblur" }}
+ {{- $ctx = merge $ctx (dict "argsRequired" 1) }}
+ {{- template "validate-arg-count" $ctx }}
+ {{- $filterArgs = apply $filterArgs "float" "." }}
+ {{- $ctx = merge $ctx (dict "argName" "sigma" "argValue" (index $filterArgs 0) "min" 0 "max" 1000) }}
+ {{- template "validate-arg-value" $ctx }}
+ {{- $f = images.GaussianBlur (index $filterArgs 0) }}
+{{- else if eq $filter "grayscale" }}
+ {{- $ctx = merge $ctx (dict "argsRequired" 0) }}
+ {{- template "validate-arg-count" $ctx }}
+ {{- $f = images.Grayscale }}
+{{- else if eq $filter "hue" }}
+ {{- $ctx = merge $ctx (dict "argsRequired" 1) }}
+ {{- template "validate-arg-count" $ctx }}
+ {{- $filterArgs = apply $filterArgs "float" "." }}
+ {{- $ctx = merge $ctx (dict "argName" "shift" "argValue" (index $filterArgs 0) "min" -180 "max" 180) }}
+ {{- template "validate-arg-value" $ctx }}
+ {{- $f = images.Hue (index $filterArgs 0) }}
+{{- else if eq $filter "invert" }}
+ {{- $ctx = merge $ctx (dict "argsRequired" 0) }}
+ {{- template "validate-arg-count" $ctx }}
+ {{- $f = images.Invert }}
+{{- else if eq $filter "opacity" }}
+ {{- $ctx = merge $ctx (dict "argsRequired" 1) }}
+ {{- template "validate-arg-count" $ctx }}
+ {{- $filterArgs = apply $filterArgs "float" "." }}
+ {{- $ctx = merge $ctx (dict "argName" "opacity" "argValue" (index $filterArgs 0) "min" 0 "max" 1) }}
+ {{- template "validate-arg-value" $ctx }}
+ {{- $f = images.Opacity (index $filterArgs 0) }}
+{{- else if eq $filter "overlay" }}
+ {{- $ctx = merge $ctx (dict "argsRequired" 3) }}
+ {{- template "validate-arg-count" $ctx }}
+ {{- $ctx := dict "src" (index $filterArgs 0) "name" .Name "position" .Position }}
+ {{- $overlayImg := partial "inline/get-resource.html" $ctx }}
+ {{- $f = images.Overlay $overlayImg (index $filterArgs 1 | float ) (index $filterArgs 2 | float) }}
+{{- else if eq $filter "padding" }}
+ {{- $ctx = merge $ctx (dict "argsRequired" 5) }}
+ {{- template "validate-arg-count" $ctx }}
+ {{- $f = images.Padding
+ (index $filterArgs 0 | int)
+ (index $filterArgs 1 | int)
+ (index $filterArgs 2 | int)
+ (index $filterArgs 3 | int)
+ (index $filterArgs 4)
+ }}
+{{- else if eq $filter "pixelate" }}
+ {{- $ctx = merge $ctx (dict "argsRequired" 1) }}
+ {{- template "validate-arg-count" $ctx }}
+ {{- $filterArgs = apply $filterArgs "float" "." }}
+ {{- $ctx = merge $ctx (dict "argName" "size" "argValue" (index $filterArgs 0) "min" 0 "max" 1000) }}
+ {{- template "validate-arg-value" $ctx }}
+ {{- $f = images.Pixelate (index $filterArgs 0) }}
+{{- else if eq $filter "process" }}
+ {{- $ctx = merge $ctx (dict "argsRequired" 1) }}
+ {{- template "validate-arg-count" $ctx }}
+ {{- $f = images.Process (index $filterArgs 0) }}
+{{- else if eq $filter "saturation" }}
+ {{- $ctx = merge $ctx (dict "argsRequired" 1) }}
+ {{- template "validate-arg-count" $ctx }}
+ {{- $filterArgs = apply $filterArgs "float" "." }}
+ {{- $ctx = merge $ctx (dict "argName" "percentage" "argValue" (index $filterArgs 0) "min" -100 "max" 500) }}
+ {{- template "validate-arg-value" $ctx }}
+ {{- $f = images.Saturation (index $filterArgs 0) }}
+{{- else if eq $filter "sepia" }}
+ {{- $ctx = merge $ctx (dict "argsRequired" 1) }}
+ {{- template "validate-arg-count" $ctx }}
+ {{- $filterArgs = apply $filterArgs "float" "." }}
+ {{- $ctx = merge $ctx (dict "argName" "percentage" "argValue" (index $filterArgs 0) "min" 0 "max" 100) }}
+ {{- template "validate-arg-value" $ctx }}
+ {{- $f = images.Sepia (index $filterArgs 0) }}
+{{- else if eq $filter "sigmoid" }}
+ {{- $ctx = merge $ctx (dict "argsRequired" 2) }}
+ {{- template "validate-arg-count" $ctx }}
+ {{- $filterArgs = apply $filterArgs "float" "." }}
+ {{- $ctx = merge $ctx (dict "argName" "midpoint" "argValue" (index $filterArgs 0) "min" 0 "max" 1) }}
+ {{- template "validate-arg-value" $ctx }}
+ {{- $ctx = merge $ctx (dict "argName" "factor" "argValue" (index $filterArgs 1) "min" -10 "max" 10) }}
+ {{- template "validate-arg-value" $ctx }}
+ {{- $f = images.Sigmoid (index $filterArgs 0) (index $filterArgs 1) }}
+{{- else if eq $filter "text" }}
+ {{- $ctx = merge $ctx (dict "argsRequired" 1) }}
+ {{- template "validate-arg-count" $ctx }}
+ {{- $ctx := dict "src" $textFilterOpts.fontPath "name" .Name "position" .Position }}
+ {{- $font := or (partial "inline/get-resource.html" $ctx) }}
+ {{- $fontSize := or (index $filterArgs 3 | int) $textFilterOpts.fontSize }}
+ {{- $lineHeight := math.Max (or (index $filterArgs 4 | float) $textFilterOpts.lineHeight) 1 }}
+ {{- $opts := dict
+ "x" (or (index $filterArgs 1 | int) $textFilterOpts.xOffset)
+ "y" (or (index $filterArgs 2 | int) $textFilterOpts.yOffset)
+ "size" $fontSize
+ "linespacing" (mul (sub $lineHeight 1) $fontSize)
+ "color" (or (index $filterArgs 5) $textFilterOpts.fontColor)
+ "font" $font
+ }}
+ {{- $f = images.Text (index $filterArgs 0) $opts }}
+{{- else if eq $filter "unsharpmask" }}
+ {{- $ctx = merge $ctx (dict "argsRequired" 3) }}
+ {{- template "validate-arg-count" $ctx }}
+ {{- $filterArgs = apply $filterArgs "float" "." }}
+ {{- $ctx = merge $ctx (dict "argName" "sigma" "argValue" (index $filterArgs 0) "min" 0 "max" 500) }}
+ {{- template "validate-arg-value" $ctx }}
+ {{- $ctx = merge $ctx (dict "argName" "amount" "argValue" (index $filterArgs 1) "min" 0 "max" 100) }}
+ {{- template "validate-arg-value" $ctx }}
+ {{- $ctx = merge $ctx (dict "argName" "threshold" "argValue" (index $filterArgs 2) "min" 0 "max" 1) }}
+ {{- template "validate-arg-value" $ctx }}
+ {{- $f = images.UnsharpMask (index $filterArgs 0) (index $filterArgs 1) (index $filterArgs 2) }}
+{{- end }}
+
+{{- /* Apply filter. */}}
+{{- $fi := $i }}
+{{- with $f }}
+ {{- $fi = $i.Filter . }}
+{{- end }}
+
+{{- /* Render. */}}
+{{- if $example }}
+
+
+{{- else -}}
+
+{{- end }}
+
+{{- define "validate-arg-count" }}
+ {{- $msg := "When using the %q filter, the %q shortcode requires an args parameter with %d %s. See %s" }}
+ {{- if lt (len .args) .argsRequired }}
+ {{- $text := "values" }}
+ {{- if eq 1 .argsRequired }}
+ {{- $text = "value" }}
+ {{- end }}
+ {{- errorf $msg .filter .name .argsRequired $text .position }}
+ {{- end }}
+{{- end }}
+
+{{- define "validate-arg-value" }}
+ {{- $msg := "The %q argument passed to the %q shortcode is invalid. Expected a value in the range [%v,%v], but received %v. See %s" }}
+ {{- if or (lt .argValue .min) (gt .argValue .max) }}
+ {{- errorf $msg .argName .name .min .max .argValue .position }}
+ {{- end }}
+{{- end }}
+
+{{- define "partials/inline/get-resource.html" }}
+ {{- $r := "" }}
+ {{- $u := urls.Parse .src }}
+ {{- $msg := "The %q shortcode was unable to resolve %s. See %s" }}
+ {{- if $u.IsAbs }}
+ {{- with resources.GetRemote $u.String }}
+ {{- with .Err }}
+ {{- errorf "%s" }}
+ {{- else }}
+ {{- /* This is a remote resource. */}}
+ {{- $r = . }}
+ {{- end }}
+ {{- else }}
+ {{- errorf $msg $.name $u.String $.position }}
+ {{- end }}
+ {{- else }}
+ {{- with .page.Resources.Get (strings.TrimPrefix "./" $u.Path) }}
+ {{- /* This is a page resource. */}}
+ {{- $r = . }}
+ {{- else }}
+ {{- with resources.Get $u.Path }}
+ {{- /* This is a global resource. */}}
+ {{- $r = . }}
+ {{- else }}
+ {{- errorf $msg $.name $u.Path $.position }}
+ {{- end }}
+ {{- end }}
+ {{- end }}
+ {{- return $r}}
+{{- end -}}
diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/imgproc.html b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/imgproc.html
new file mode 100644
index 000000000..c09133ba8
--- /dev/null
+++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/imgproc.html
@@ -0,0 +1,37 @@
+{{- /*
+Renders the given image using the given process specification.
+
+@param {string} (positional parameter 0) The path to the image, relative to the current page. The image must be a page resource.
+@param {string}} (positional parameter 1) The image processing specification.
+
+@returns template.HTML
+
+@example {{< imgproc "sunset.jpg" "resize 300x" />}}
+*/}}
+
+{{- with $.Get 0 }}
+ {{- with $i := $.Page.Resources.Get . }}
+ {{- with $spec := $.Get 1 }}
+ {{- with $i.Process . }}
+
+
+ {{- range $page := .ByTitle }}
+ {{- if or
+ (and (eq $filterType "include") (in $filteredPages $page))
+ (and (eq $filterType "exclude") (not (in $filteredPages $page)))
+ (eq $filterType "none")
+ }}
+ {{- $linkTitle := .LinkTitle }}
+ {{- with $titlePrefix }}
+ {{- $linkTitle = printf "%s%s" . $linkTitle }}
+ {{- end }}
+ {{- $idAttribute := "" }}
+ {{- if not $omitElementIDs }}
+ {{- $id := path.Join .File.Dir .File.ContentBaseName | replaceRE `[\|/]` ":" | lower }}
+ {{- $idAttribute = printf " id=%q" $id }}
+ {{- end }}
+
+ {{- else }}
+ {{- warnf "The %q shortcode found no pages in the %q section. See %s" $.Name $sectionPath $.Position }}
+ {{- end }}
+ {{- else }}
+ {{- errorf "The %q shortcode was unable to find %q. See %s" $.Name $sectionPath $.Position }}
+ {{- end }}
+{{- else }}
+ {{- errorf "The %q shortcode requires a 'path' parameter indicating the path to the section. See %s" $.Name $.Position }}
+{{- end }}
diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/module-mounts-note.html b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/module-mounts-note.html
new file mode 100644
index 000000000..e8b2a7a7e
--- /dev/null
+++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/module-mounts-note.html
@@ -0,0 +1 @@
+Also see [Module Mounts Config](/hugo-modules/configuration/#module-configuration-mounts) for an alternative way to configure this directory (from Hugo 0.56).
diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/new-in.html b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/new-in.html
new file mode 100644
index 000000000..e22a91f3d
--- /dev/null
+++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/new-in.html
@@ -0,0 +1,36 @@
+{{- /*
+Renders a "new in" button indicating the version in which a feature was added.
+
+When comparing the current version to the specified version, the "new in"
+button will be hidden if any of the following conditions is true:
+
+- The major version difference exceeds the majorVersionDiffThreshold
+- The minor version difference exceeds the minorVersionDiffThreshold
+
+@param {string} version The semantic version string, with or without a leading v.
+@returns {template.HTML}
+
+@example {{< new-in 0.100.0 >}}
+*/}}
+
+{{- /* Set defaults. */}}
+{{- $majorVersionDiffThreshold := 0 }}
+{{- $minorVersionDiffThreshold := 30 }}
+{{- $displayExpirationWarning := true }}
+
+{{- /* Render. */}}
+{{- with $version := .Get 0 | strings.TrimPrefix "v" }}
+ {{- $majorVersionDiff := sub (index (split hugo.Version ".") 0 | int) (index (split $version ".") 0 | int) }}
+ {{- $minorVersionDiff := sub (index (split hugo.Version ".") 1 | int) (index (split $version ".") 1 | int) }}
+ {{- if or (gt $majorVersionDiff $majorVersionDiffThreshold) (gt $minorVersionDiff $minorVersionDiffThreshold) }}
+ {{- if $displayExpirationWarning }}
+ {{- warnf "This call to the %q shortcode should be removed: %s. The button is now hidden because the specified version (%s) is older than the display threshold." $.Name $.Position $version }}
+ {{- end }}
+ {{- else }}
+
+ {{- end }}
+{{- else }}
+ {{- errorf "The %q shortcode requires a positional parameter (version). See %s" .Name .Position }}
+{{- end -}}
diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/note.html b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/note.html
new file mode 100644
index 000000000..99818114e
--- /dev/null
+++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/note.html
@@ -0,0 +1,7 @@
+{{ $_hugo_config := `{ "version": 1 }` }}
+
+
diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/quick-reference.html b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/quick-reference.html
new file mode 100644
index 000000000..fc53c93bd
--- /dev/null
+++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/quick-reference.html
@@ -0,0 +1,39 @@
+{{/*
+Renders the child sections of the given top-level section, listing each child's immediate descendants.
+
+@param {string} section The top-level section to render.
+@returns template.HTML
+
+@example {{% quick-reference section="functions" %}}
+*/}}
+
+{{ $section := "" }}
+{{ with .Get "section" }}
+ {{ $section = . }}
+{{ else }}
+ {{ errorf "The %q shortcodes requires a 'section' parameter. See %s" .Name .Position }}
+{{ end }}
+
+{{/* Do not change the markdown indentation, and do not remove blank lines. */}}
+{{ with site.GetPage $section }}
+ {{ range .Sections }}
+
+## {{ .LinkTitle }}
+{{ .RawContent }}
+
+ {{ range .Pages }}
+ {{ $aliases := "" }}
+ {{ if eq .Section "functions" }}
+ {{ with .Params.action.aliases }}
+ {{ $aliases = delimit . " or " }}
+ {{ end }}
+ {{ end }}
+
+[{{ .LinkTitle }}]({{ .RelPermalink }}) {{ with $aliases }}({{ . }}){{ end }}
+: {{ .Description }}
+
+ {{ end }}
+ {{ end }}
+{{ else }}
+ {{ errorf "The %q shortcodes was unable to find the %q section. See %s" .Name $section .Position }}
+{{ end }}
diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/readfile.html b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/readfile.html
new file mode 100644
index 000000000..de8083443
--- /dev/null
+++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/readfile.html
@@ -0,0 +1,29 @@
+{{- $highlight := or (.Get "highlight") "" }}
+
+{{- $markdown := false }}
+{{- if in (slice "false" false 0) (.Get "markdown") }}
+ {{- $markdown = false }}
+{{- else if in (slice "true" true 1) (.Get "markdown") }}
+ {{- $markdown = true }}
+{{- end }}
+
+{{- with .Get "file" }}
+ {{- if os.FileExists . }}
+ {{- with os.ReadFile . }}
+ {{- $content := trim . "\n\r" }}
+ {{- if $markdown }}
+ {{- $content | markdownify }}
+ {{- else if $highlight }}
+ {{- highlight $content $highlight }}
+ {{- else }}
+ {{- $content | safeHTML }}
+ {{- end }}
+ {{- else }}
+ {{- errorf "The %q shortcode was unable to read %q. See %s" $.Name . $.Position }}
+ {{- end }}
+ {{- else }}
+ {{- errorf "The %q shortcode was unable to find %q. See %s" $.Name . $.Position }}
+ {{- end }}
+{{- else }}
+ {{- errorf "The %q shortcode requires a 'file' parameter. See %s" $.Name $.Position }}
+{{- end }}
diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/todo.html b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/todo.html
new file mode 100644
index 000000000..50a099267
--- /dev/null
+++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/todo.html
@@ -0,0 +1 @@
+{{ if .Inner }}{{ end }}
\ No newline at end of file
diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/showcase/list.html b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/showcase/list.html
new file mode 100644
index 000000000..bff52ad8d
--- /dev/null
+++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/showcase/list.html
@@ -0,0 +1,46 @@
+{{ define "main" }}
+
+ {{ .Title }}
+
+
+ {{end}}
+
+ {{- .Title -}}
+
+
+ {{ partial "page-edit.html" . }}
+
+ {{ end }}
+
{{.Title}}
+ {{ with .Params.siteURL }}
+ {{ . | replaceRE "^https?://(www\\.)?([^/]+).*" "$2"}} {{ partial "svg/link-ext.svg" (dict "size" "10") }}
+ {{ end }}
+ {{ with .Params.siteSource }}
+ source {{ partial "svg/link-ext.svg" (dict "size" "10") }}
+ {{ end }}
+ {{ $bio := (.Resources.ByType "page").GetMatch "bio*" }}
+ {{ with $bio }}
+
+
+{{end}}
diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/template-func/page.html b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/template-func/page.html
new file mode 100644
index 000000000..8b5f0da85
--- /dev/null
+++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/template-func/page.html
@@ -0,0 +1,55 @@
+{{ $pkg := .Params.package}}
+{{ $funcs := index site.Data.docs.tpl.funcs $pkg }}
+
+{{ range $k, $v := $funcs }}
+ {{ if $v.Description }}
+ {{ $func := printf "%s.%s" $pkg $k }}
+ {{ $id := $func | anchorize | safeURL }}
+
+
+
+
+ {{ $func }}
+
+ {{ with $v.Description }}
+
+ Syntax
+
+
+ Examples
+
+ {{ end }}
+ {{ range $v.Examples }}
+ {{ $input := index . 0 }}
+ {{ $result := index . 1 }}
+ {{ $example := printf "%s ---> %s" $input $result }}
+
+ {{ highlight $example "go-html-template" "" }}
+ {{ end }}
+ {{ with $v.Aliases }}
+
+ Aliases
+
+ {{ i18n "translations" }}
{{ range .Translations }}
{{ end }}
-```
+{{< /code >}}
-The above can be put in a `partial` (i.e., inside `layouts/partials/`) and included in any template. It will not print anything if there are no translations for a given page.
+The above can be put in a `partial` (i.e., inside `layouts/partials/`) and included in any template, whether a [single content page][contenttemplate] or the [homepage]. It will not print anything if there are no translations for a given page.
The above also uses the [`i18n` function][i18func] described in the next section.
@@ -135,17 +324,106 @@ The above also uses the [`i18n` function][i18func] described in the next section
`.AllTranslations` on a `Page` can be used to list all translations, including the page itself. On the home page it can be used to build a language navigator:
-```go-html-template {file="layouts/partials/allLanguages.html"}
+{{< code file=layouts/partials/allLanguages.html >}}
{{ range $.Site.Home.AllTranslations }}
-```
+{{< /code >}}
## Translation of strings
-See the [`lang.Translate`] template function.
+Hugo uses [go-i18n] to support string translations. [See the project's source repository][go-i18n-source] to find tools that will help you manage your translation workflows.
+
+Translations are collected from the `themes/Authors
+{{ range $reusablePages }}
+ {{ .Title }}
+ {{ .Content }}
+{{ end }}
+```
+
+_In this example, we are assuming the `some-headless-bundle` to be a headless
+ bundle containing one or more **page** resources whose `.Name` matches
+ `"author*"`._
+
+Explanation of the above example:
+
+1. Get the `some-headless-bundle` Page "object".
+2. Collect a _slice_ of resources in this _Page Bundle_ that matches
+ `"author*"` using `.Resources.Match`.
+3. Loop through that _slice_ of nested pages, and output their `.Title` and
+ `.Content`.
+
+---
+
+A leaf bundle can be made headless by adding below in the front matter
+(in the `index.md`):
+
+{{< code-toggle file=content/headless/index.md fm=true >}}
+headless = true
+{{< /code-toggle >}}
+
+There are many use cases of such headless page bundles:
+
+- Shared media galleries
+- Reusable page content "snippets"
## Branch bundles
-A _branch bundle_ is a directory that contains an `_index.md` file and zero or more resources. Analogous to a physical branch, a branch bundle may have descendants including leaf bundles and other branch bundles. Top-level directories with or without `_index.md` files are also branch bundles. This includes the home page.
+A _Branch Bundle_ is any directory at any hierarchy within the
+`content/` directory, that contains at least an **`_index.md`** file.
+
+This `_index.md` can also be directly under the `content/` directory.
+
+{{% note %}}
+Here `md` (markdown) is used just as an example. You can use any file
+type as a content resource as long as it is a content type recognized by Hugo.
+{{% /note %}}
+
+### Examples of branch bundle organization
```text
content/
-├── branch-bundle-1/
-│ ├── _index.md
-│ ├── content-1.md
-│ ├── content-2.md
-│ ├── image-1.jpg
-│ └── image-2.png
-├── branch-bundle-2/
-│ ├── a-leaf-bundle/
-│ │ └── index.md
+├── branch-bundle-1
+│ ├── branch-content1.md
+│ ├── branch-content2.md
+│ ├── image1.jpg
+│ ├── image2.png
│ └── _index.md
-└── _index.md
+└── branch-bundle-2
+ ├── _index.md
+ └── a-leaf-bundle
+ └── index.md
```
-There are three branch bundles in the example above:
-
-home page
-: This branch bundle contains an index file, two descendant branch bundles, and no resources.
+In the above example `content/` directory, there are two branch
+bundles (and a leaf bundle):
branch-bundle-1
-: This branch bundle contains an index file, two resources of [resource type](g) `page`, and two resources of resource type `image`.
+: This branch bundle has the `_index.md`, two
+ other content Markdown files and two image files.
branch-bundle-2
-: This branch bundle contains an index file and a leaf bundle.
+: This branch bundle has the `_index.md` and a
+ nested leaf bundle.
-> [!note]
-> Create branch bundles at any depth within the `content` directory. Branch bundles may have descendants.
+{{% note %}}
+The hierarchy depth at which a branch bundle is created does not
+matter.
+{{% /note %}}
-## Headless bundles
-
-Use [build options] in front matter to create an unpublished leaf or branch bundle whose content and resources you can include in other pages.
-
-[`Resources`]: /methods/page/resources/
-[build options]: /content-management/build-options/
-[home]: /templates/types/#home
-[page resources]: /content-management/page-resources/
-[section]: /templates/types/#section
-[single]: /templates/types/#single
-[taxonomy]: /templates/types/#taxonomy
-[term]: /templates/types/#term
+[^fn:1]: The `.md` extension is just an example. The extension can be `.html`, `.json` or any valid MIME type.
diff --git a/docs/content/en/content-management/page-resources.md b/docs/content/en/content-management/page-resources.md
index 204ca5301..f141510bb 100644
--- a/docs/content/en/content-management/page-resources.md
+++ b/docs/content/en/content-management/page-resources.md
@@ -1,12 +1,17 @@
---
title: Page resources
-description: Use page resources to logically associate assets with a page.
-categories: []
-keywords: []
+description: Page resources -- images, other pages, documents, etc. -- have page-relative URLs and their own metadata.
+categories: [content management]
+keywords: [bundle,content,resources]
+menu:
+ docs:
+ parent: content-management
+ weight: 80
+weight: 80
+toc: true
---
-
Page resources are only accessible from [page bundles](/content-management/page-bundles), those directories with `index.md` or
-`_index.md` files at their root. Page resources are only available to the
+`_index.md` files at their root. Page resources are only available to the
page with which they are bundled.
In this example, `first-post` is a page bundle with access to 10 page resources including audio, data, documents, images, and video. Although `second-post` is also a page bundle, it has no page resources and is unable to directly access the page resources associated with `first-post`.
@@ -31,101 +36,108 @@ content
└── index.md (root of page bundle)
```
-## Examples
+## Properties
-Use any of these methods on a `Page` object to capture page resources:
+ResourceType
+: The main type of the resource's [Media Type](/templates/output-formats/#media-types). For example, a file of MIME type `image/jpeg` has the ResourceType `image`. A `Page` will have `ResourceType` with value `page`.
- - [`Resources.ByType`]
- - [`Resources.Get`]
- - [`Resources.GetMatch`]
- - [`Resources.Match`]
+Name
+: Default value is the file name (relative to the owning page). Can be set in front matter.
- Once you have captured a resource, use any of the applicable [`Resource`] methods to return a value or perform an action.
+Title
+: Default value is the same as `.Name`. Can be set in front matter.
-The following examples assume this content structure:
+Permalink
+: The absolute URL to the resource. Resources of type `page` will have no value.
-```text
-content/
-└── example/
- ├── data/
- │ └── books.json <-- page resource
- ├── images/
- │ ├── a.jpg <-- page resource
- │ └── b.jpg <-- page resource
- ├── snippets/
- │ └── text.md <-- page resource
- └── index.md
-```
+RelPermalink
+: The relative URL to the resource. Resources of type `page` will have no value.
-Render a single image, and throw an error if the file does not exist:
+Content
+: The content of the resource itself. For most resources, this returns a string
+with the contents of the file. Use this to create inline resources.
```go-html-template
-{{ $path := "images/a.jpg" }}
-{{ with .Resources.Get $path }}
-
-{{ else }}
- {{ errorf "Unable to get page resource %q" $path }}
+{{ with .Resources.GetMatch "script.js" }}
+
+{{ end }}
+
+{{ with .Resources.GetMatch "style.css" }}
+
+{{ end }}
+
+{{ with .Resources.GetMatch "img.png" }}
+
{{ end }}
```
-Render all images, resized to 300 px wide:
+MediaType.Type
+: The media type (formerly known as a MIME type) of the resource (e.g., `image/jpeg`).
+
+MediaType.MainType
+: The main type of the resource's media type (e.g., `image`).
+
+MediaType.SubType
+: The subtype of the resource's type (e.g., `jpeg`). This may or may not correspond to the file suffix.
+
+MediaType.Suffixes
+: A slice of possible file suffixes for the resource's media type (e.g., `[jpg jpeg jpe jif jfif]`).
+
+## Methods
+
+ByType
+: Returns the page resources of the given type.
```go-html-template
-{{ range .Resources.ByType "image" }}
- {{ with .Resize "300x" }}
-
- {{ end }}
-{{ end }}
+{{ .Resources.ByType "image" }}
```
-
-Render the markdown snippet:
+Match
+: Returns all the page resources (as a slice) whose `Name` matches the given Glob pattern ([examples](https://github.com/gobwas/glob/blob/master/readme.md)). The matching is case-insensitive.
```go-html-template
-{{ with .Resources.Get "snippets/text.md" }}
- {{ .Content }}
-{{ end }}
+{{ .Resources.Match "images/*" }}
```
-List the titles in the data file, and throw an error if the file does not exist.
+GetMatch
+: Same as `Match` but will return the first match.
-```go-html-template
-{{ $path := "data/books.json" }}
-{{ with .Resources.Get $path }}
- {{ with . | transform.Unmarshal }}
-
- {{ range . }}
-
- {{ end }}
-{{ else }}
- {{ errorf "Unable to get page resource %q" $path }}
-{{ end }}
+### Pattern matching
+
+```go
+// Using Match/GetMatch to find this images/sunset.jpg ?
+.Resources.Match "images/sun*" ✅
+.Resources.Match "**/sunset.jpg" ✅
+.Resources.Match "images/*.jpg" ✅
+.Resources.Match "**.jpg" ✅
+.Resources.Match "*" 🚫
+.Resources.Match "sunset.jpg" 🚫
+.Resources.Match "*sunset.jpg" 🚫
```
-## Metadata
+## Page resources metadata
The page resources' metadata is managed from the corresponding page's front matter with an array/table parameter named `resources`. You can batch assign values using [wildcards](https://tldp.org/LDP/GNU-Linux-Tools-Summary/html/x11655.htm).
-> [!note]
-> Resources of type `page` get `Title` etc. from their own front matter.
+{{% note %}}
+Resources of type `page` get `Title` etc. from their own front matter.
+{{% /note %}}
name
-: (`string`) Sets the value returned in `Name`.
+: Sets the value returned in `Name`.
-> [!note]
-> The methods `Match`, `Get` and `GetMatch` use `Name` to match the resources.
+{{% note %}}
+The methods `Match`, `Get` and `GetMatch` use `Name` to match the resources.
+{{% /note %}}
title
-: (`string`) Sets the value returned in `Title`
+: Sets the value returned in `Title`
params
-: (`map`) A map of custom key-value pairs.
+: A map of custom key/values.
### Resources metadata example
-{{< code-toggle file=content/example.md fm=true >}}
+{{< code-toggle >}}
title: Application
date : 2018-01-25
resources :
@@ -159,8 +171,9 @@ From the example above:
- All `PDF` files will get a new `Name`. The `name` parameter contains a special placeholder [`:counter`](#the-counter-placeholder-in-name-and-title), so the `Name` will be `pdf-file-1`, `pdf-file-2`, `pdf-file-3`.
- Every docx in the bundle will receive the `word` icon.
-> [!note]
-> The order matters; only the first set values of the `title`, `name` and `params` keys will be used. Consecutive parameters will be set only for the ones not already set. In the above example, `.Params.icon` is first set to `"photo"` in `src = "documents/photo_specs.pdf"`. So that would not get overridden to `"pdf"` by the later set `src = "**.pdf"` rule.
+{{% note %}}
+The __order matters__ --- Only the **first set** values of the `title`, `name` and `params`-**keys** will be used. Consecutive parameters will be set only for the ones not already set. In the above example, `.Params.icon` is first set to `"photo"` in `src = "documents/photo_specs.pdf"`. So that would not get overridden to `"pdf"` by the later set `src = "**.pdf"` rule.
+{{% /note %}}
### The `:counter` placeholder in `name` and `title`
@@ -188,110 +201,3 @@ the `Name` and `Title` will be assigned to the resource files as follows:
| guide.pdf | `"pdf-file-2.pdf` | `"guide.pdf"` |
| other\_specs.pdf | `"pdf-file-3.pdf` | `"Specification #1"` |
| photo\_specs.pdf | `"pdf-file-4.pdf` | `"Specification #2"` |
-
-## Multilingual
-
-{{< new-in 0.123.0 />}}
-
-By default, with a multilingual single-host site, Hugo does not duplicate shared page resources when building the site.
-
-> [!note]
-> This behavior is limited to Markdown content. Shared page resources for other [content formats] are copied into each language bundle.
-
-Consider this site configuration:
-
-{{< code-toggle file=hugo >}}
-defaultContentLanguage = 'de'
-defaultContentLanguageInSubdir = true
-
-[languages.de]
-languageCode = 'de-DE'
-languageName = 'Deutsch'
-weight = 1
-
-[languages.en]
-languageCode = 'en-US'
-languageName = 'English'
-weight = 2
-{{< /code-toggle >}}
-
-And this content:
-
-```text
-content/
-└── my-bundle/
- ├── a.jpg <-- shared page resource
- ├── b.jpg <-- shared page resource
- ├── c.de.jpg
- ├── c.en.jpg
- ├── index.de.md
- └── index.en.md
-```
-
-With v0.122.0 and earlier, Hugo duplicated the shared page resources, creating copies for each language:
-
-```text
-public/
-├── de/
-│ ├── my-bundle/
-│ │ ├── a.jpg <-- shared page resource
-│ │ ├── b.jpg <-- shared page resource
-│ │ ├── c.de.jpg
-│ │ └── index.html
-│ └── index.html
-├── en/
-│ ├── my-bundle/
-│ │ ├── a.jpg <-- shared page resource (duplicate)
-│ │ ├── b.jpg <-- shared page resource (duplicate)
-│ │ ├── c.en.jpg
-│ │ └── index.html
-│ └── index.html
-└── index.html
-
-```
-
-With v0.123.0 and later, Hugo places the shared resources in the page bundle for the default content language:
-
-```text
-public/
-├── de/
-│ ├── my-bundle/
-│ │ ├── a.jpg <-- shared page resource
-│ │ ├── b.jpg <-- shared page resource
-│ │ ├── c.de.jpg
-│ │ └── index.html
-│ └── index.html
-├── en/
-│ ├── my-bundle/
-│ │ ├── c.en.jpg
-│ │ └── index.html
-│ └── index.html
-└── index.html
-```
-
-This approach reduces build times, storage requirements, bandwidth consumption, and deployment times, ultimately reducing cost.
-
-> [!note]
-> To resolve Markdown link and image destinations to the correct location, you must use link and image render hooks that capture the page resource with the [`Resources.Get`] method, and then invoke its [`RelPermalink`] method.
->
-> By default, with multilingual single-host sites, Hugo enables its [embedded link render hook] and [embedded image render hook] to resolve Markdown link and image destinations.
->
-> You may override the embedded render hooks as needed, provided they capture the resource as described above.
-
-Although duplicating shared page resources is inefficient, you can enable this feature in your site configuration if desired:
-
-{{< code-toggle file=hugo >}}
-[markup.goldmark]
-duplicateResourceFiles = true
-{{< /code-toggle >}}
-
-[`RelPermalink`]: /methods/resource/relpermalink/
-[`Resource`]: /methods/resource
-[`Resources.ByType`]: /methods/page/resources#bytype
-[`Resources.Get`]: /methods/page/resources#get
-[`Resources.Get`]: /methods/page/resources/#get
-[`Resources.GetMatch`]: /methods/page/resources#getmatch
-[`Resources.Match`]: /methods/page/resources#match
-[content formats]: /content-management/formats/
-[embedded image render hook]: /render-hooks/images/#default
-[embedded link render hook]: /render-hooks/links/#default
diff --git a/docs/content/en/content-management/related-content.md b/docs/content/en/content-management/related-content.md
deleted file mode 100644
index d7b18dab0..000000000
--- a/docs/content/en/content-management/related-content.md
+++ /dev/null
@@ -1,102 +0,0 @@
----
-title: Related content
-description: List related content in "See Also" sections.
-categories: []
-keywords: []
-aliases: [/content/related/,/related/,/content-management/related/]
----
-
-Hugo uses a set of factors to identify a page's related content based on front matter parameters. This can be tuned to the desired set of indices and parameters or left to Hugo's default [related content configuration](/configuration/related-content/).
-
-## List related content
-
-To list up to 5 related pages (which share the same _date_ or _keyword_ parameters) is as simple as including something similar to this partial in your template:
-
-```go-html-template {file="layouts/partials/related.html" copy=true}
-{{ with site.RegularPages.Related . | first 5 }}
-
- {{ range . }}
-
-{{ end }}
-```
-
-The `Related` method takes one argument which may be a `Page` or an options map. The options map has these options:
-
-indices
-: (`slice`) The indices to search within.
-
-document
-: (`page`) The page for which to find related content. Required when specifying an options map.
-
-namedSlices
-: (`slice`) The keywords to search for, expressed as a slice of `KeyValues` using the [`keyVals`] function.
-
-fragments
-: (`slice`) A list of special keywords that is used for indices configured as type "fragments". This will match the [fragment](g) identifiers of the documents.
-
-A fictional example using all of the above options:
-
-```go-html-template
-{{ $page := . }}
-{{ $opts := dict
- "indices" (slice "tags" "keywords")
- "document" $page
- "namedSlices" (slice (keyVals "tags" "hugo" "rocks") (keyVals "date" $page.Date))
- "fragments" (slice "heading-1" "heading-2")
-}}
-```
-
-> [!note]
-> We improved and simplified this feature in Hugo 0.111.0. Before this we had 3 different methods: `Related`, `RelatedTo` and `RelatedIndices`. Now we have only one method: `Related`. The old methods are still available but deprecated. Also see [this blog article](https://regisphilibert.com/blog/2018/04/hugo-optmized-relashionships-with-related-content/) for a great explanation of more advanced usage of this feature.
-
-## Index content headings
-
-Hugo can index the headings in your content and use this to find related content. You can enable this by adding a index of type `fragments` to your `related` configuration:
-
-{{< code-toggle file=hugo >}}
-[related]
-threshold = 20
-includeNewer = true
-toLower = false
-[[related.indices]]
-name = "fragmentrefs"
-type = "fragments"
-applyFilter = true
-weight = 80
-{{< /code-toggle >}}
-
-- The `name` maps to a optional front matter slice attribute that can be used to link from the page level down to the fragment/heading level.
-- If `applyFilter` is enabled, the `.HeadingsFiltered` on each page in the result will reflect the filtered headings. This is useful if you want to show the headings in the related content listing:
-
-```go-html-template
-{{ $related := .Site.RegularPages.Related . | first 5 }}
-{{ with $related }}
- See Also
-
- {{ range $i, $p := . }}
-
-{{ end }}
-```
-
-## Configuration
-
-See [configure related content](/configuration/related-content/).
-
-[`keyVals`]: /functions/collections/keyvals/
diff --git a/docs/content/en/content-management/related.md b/docs/content/en/content-management/related.md
new file mode 100644
index 000000000..e73dfc32a
--- /dev/null
+++ b/docs/content/en/content-management/related.md
@@ -0,0 +1,178 @@
+---
+title: Related content
+description: List related content in "See Also" sections.
+categories: [content management]
+keywords: [content]
+menu:
+ docs:
+ parent: content-management
+ weight: 110
+weight: 110
+toc: true
+aliases: [/content/related/,/related/]
+---
+
+Hugo uses a set of factors to identify a page's related content based on front matter parameters. This can be tuned to the desired set of indices and parameters or left to Hugo's default [Related Content configuration](#configure-related-content).
+
+## List related content
+
+To list up to 5 related pages (which share the same _date_ or _keyword_ parameters) is as simple as including something similar to this partial in your single page template:
+
+{{< code file=layouts/partials/related.html >}}
+{{ $related := .Site.RegularPages.Related . | first 5 }}
+{{ with $related }}
+
- {{ range . }}
- {{ $link := printf "%s#%s" $p.RelPermalink .ID | safeURL }}
-
- {{ end }}
- See Also
+
+ {{ range . }}
+
+{{ end }}
+{{< /code >}}
+
+The `Related` method takes one argument which may be a `Page` or a options map. The options map have these options:
+
+indices
+: (`slice`) The indices to search within.
+
+document
+: (`page`) The page for which to find related content. Required when specifying an options map.
+
+namedSlices
+: (`slice`) The keywords to search for, expressed as a slice of `KeyValues` using the [`keyVals`] function.
+
+fragments
+: (`slice`) A list of special keywords that is used for indices configured as type "fragments". This will match the [fragment] identifiers of the documents.
+
+[fragment]: /getting-started/glossary/#fragment
+[`keyVals`]: /functions/collections/keyvals/
+
+A fictional example using all of the above options:
+
+```go-html-template
+{{ $page := . }}
+{{ $opts := dict
+ "indices" (slice "tags" "keywords")
+ "document" $page
+ "namedSlices" (slice (keyVals "tags" "hugo" "rocks") (keyVals "date" $page.Date))
+ "fragments" (slice "heading-1" "heading-2")
+}}
+```
+
+{{% note %}}
+We improved and simplified this feature in Hugo 0.111.0. Before this we had 3 different methods: `Related`, `RelatedTo` and `RelatedIndices`. Now we have only one method: `Related`. The old methods are still available but deprecated. Also see [this blog article](https://regisphilibert.com/blog/2018/04/hugo-optmized-relashionships-with-related-content/) for a great explanation of more advanced usage of this feature.
+{{% /note %}}
+
+## Index content headings in related content
+
+{{< new-in 0.111.0 >}}
+
+Hugo can index the headings in your content and use this to find related content. You can enable this by adding a index of type `fragments` to your `related` configuration:
+
+{{< code-toggle file=hugo >}}
+[related]
+threshold = 20
+includeNewer = true
+toLower = false
+[[related.indices]]
+name = "fragmentrefs"
+type = "fragments"
+applyFilter = true
+weight = 80
+{{< /code-toggle >}}
+
+* The `name` maps to a optional front matter slice attribute that can be used to link from the page level down to the fragment/heading level.
+* If `applyFilter`is enabled, the `.HeadingsFiltered` on each page in the result will reflect the filtered headings. This is useful if you want to show the headings in the related content listing:
+
+```go-html-template
+{{ $related := .Site.RegularPages.Related . | first 5 }}
+{{ with $related }}
+ See Also
+
+ {{ range $i, $p := . }}
+
+{{ end }}
+```
+
+## Configure related content
+
+Hugo provides a sensible default configuration of Related Content, but you can fine-tune this in your configuration, on the global or language level if needed.
+
+### Default configuration
+
+Without any `related` configuration set on the project, Hugo's Related Content methods will use the following.
+
+{{< code-toggle config=related />}}
+
+Custom configuration should be set using the same syntax.
+
+{{% note %}}
+If you add a `related` configuration section, you need to add a complete configuration. It is not possible to just set, say, `includeNewer` and use the rest from the Hugo defaults.
+{{% /note %}}
+
+### Top level configuration options
+
+threshold
+: (`int`) A value between 0-100. Lower value will give more, but maybe not so relevant, matches.
+
+includeNewer
+: (`bool`) Set to `true` to include **pages newer than the current page** in the related content listing. This will mean that the output for older posts may change as new related content gets added.
+
+toLower
+: (`bool`) Set to `true` to lower case keywords in both the indexes and the queries. This may give more accurate results at a slight performance penalty. Note that this can also be set per index.
+
+### Configuration options per index
+
+name
+: (`string`) The index name. This value maps directly to a page parameter. Hugo supports string values (`author` in the example) and lists (`tags`, `keywords` etc.) and time and date objects.
+
+type {{< new-in 0.111.0 >}}
+: (`string`) One of `basic`(default) or `fragments`.
+
+applyFilter {{< new-in 0.111.0 >}}
+: (`string`) Apply a `type` specific filter to the result of a search. This is currently only used for the `fragments` type.
+
+weight
+: (`int`) An integer weight that indicates _how important_ this parameter is relative to the other parameters. It can be `0`, which has the effect of turning this index off, or even negative. Test with different values to see what fits your content best.
+
+cardinalityThreshold {{< new-in 0.111.0 >}}
+: (`int`) A percentage (0-100) used to remove common keywords from the index. As an example, setting this to `50` will remove all keywords that are used in more than 50% of the documents in the index. Default is `0`.
+
+pattern
+: (`string`) This is currently only relevant for dates. When listing related content, we may want to list content that is also close in time. Setting "2006" (default value for date indexes) as the pattern for a date index will add weight to pages published in the same year. For busier blogs, "200601" (year and month) may be a better default.
+
+toLower
+: (`bool`) See above.
+
+## Performance considerations
+
+**Fast is Hugo's middle name** and we would not have released this feature had it not been blistering fast.
+
+This feature has been in the back log and requested by many for a long time. The development got this recent kick start from this Twitter thread:
+
+{{< tweet user="scott_lowe" id="898398437527363585" >}}
+
+Scott S. Lowe removed the "Related Content" section built using the `intersect` template function on tags, and the build time dropped from 30 seconds to less than 2 seconds on his 1700 content page sized blog.
+
+He should now be able to add an improved version of that "Related Content" section without giving up the fast live-reloads. But it's worth noting that:
+
+* If you don't use any of the `Related` methods, you will not use the Relate Content feature, and performance will be the same as before.
+* Calling `.RegularPages.Related` etc. will create one inverted index, also sometimes named posting list, that will be reused for any lookups in that same page collection. Doing that in addition to, as an example, calling `.Pages.Related` will work as expected, but will create one additional inverted index. This should still be very fast, but worth having in mind, especially for bigger sites.
+
+{{% note %}}
+We currently do not index **Page content**. We thought we would release something that will make most people happy before we start solving [Sherlock's last case](https://github.com/joearms/sherlock).
+{{% /note %}}
diff --git a/docs/content/en/content-management/sections.md b/docs/content/en/content-management/sections.md
index f7a2296f5..1b694ce44 100644
--- a/docs/content/en/content-management/sections.md
+++ b/docs/content/en/content-management/sections.md
@@ -2,14 +2,26 @@
title: Sections
description: Organize content into sections.
-categories: []
-keywords: []
+categories: [content management]
+keywords: [lists,sections,content types,organization]
+menu:
+ docs:
+ parent: content-management
+ weight: 120
+weight: 120
+toc: true
aliases: [/content/sections/]
---
## Overview
-{{% glossary-term "section" %}}
+A section is a top-level content directory, or any content directory with an _index.md file. A content directory with an _index.md file is also known as a [branch bundle](/getting-started/glossary/#branch-bundle). Section templates receive one or more page [collections](/getting-started/glossary/#collection) in [context](/getting-started/glossary/#context).
+
+{{% note %}}
+Although top-level directories without _index.md files are sections, we recommend creating _index.md files in _all_ sections.
+{{% /note %}}
+
+A typical site consists of one or more sections. For example:
```text
content/
@@ -62,8 +74,11 @@ Have list pages|:heavy_check_mark:|:x:
With the file structure from the [example above](#overview):
1. The list page for the articles section includes all articles, regardless of directory structure; none of the subdirectories are sections.
+
1. The articles/2022 and articles/2023 directories do not have list pages; they are not sections.
-1. The list page for the products section, by default, includes product-1 and product-2, but not their descendant pages. To include descendant pages, use the `RegularPagesRecursive` method instead of the `Pages` method in the list template.
+
+1. The list page for the products section, by default, includes product-1 and product-2, but not their descendant pages. To include descendant pages, use the `.RegularPagesRecursive` collection instead of the `.Pages` collection in the list template. See [details](/variables/page/#page-collections).
+
1. All directories in the products section have list pages; each directory is a section.
## Template selection
@@ -72,20 +87,23 @@ Hugo has a defined [lookup order] to determine which template to use when render
With the file structure from the [example above](#overview):
-Content directory|Section template
+Content directory|List page template
:--|:--
-`content/products`|`layouts/products/list.html`
-`content/products/product-1`|`layouts/products/list.html`
-`content/products/product-1/benefits`|`layouts/products/list.html`
+content/products|layouts/products/list.html
+content/products/product-1|layouts/products/list.html
+content/products/product-1/benefits|layouts/products/list.html
-Content directory|Single template
+Content directory|Single page template
:--|:--
-`content/products`|`layouts/products/single.html`
-`content/products/product-1`|`layouts/products/single.html`
-`content/products/product-1/benefits`|`layouts/products/single.html`
+content/products|layouts/products/single.html
+content/products/product-1|layouts/products/single.html
+content/products/product-1/benefits|layouts/products/single.html
If you need to use a different template for a subsection, specify `type` and/or `layout` in front matter.
+[lookup rules]: /templates/lookup-order/#lookup-rules
+[lookup order]: /templates/lookup-order/
+
## Ancestors and descendants
A section has one or more ancestors (including the home page), and zero or more descendants. With the file structure from the [example above](#overview):
@@ -98,7 +116,7 @@ The content file (benefit-1.md) has four ancestors: benefits, product-1, product
For example, use the `.Ancestors` method to render breadcrumb navigation.
-```go-html-template {file="layouts/partials/breadcrumb.html"}
+{{< code file=layouts/partials/breadcrumb.html >}}
-```
+{{< /code >}}
With this CSS:
@@ -135,5 +153,9 @@ Hugo renders this, where each breadcrumb is a link to the corresponding page:
Home » Products » Product 1 » Benefits » Benefit 1
```
-[lookup order]: /templates/lookup-order/
-[lookup rules]: /templates/lookup-order/#lookup-rules
+[archetype]: /content-management/archetypes/
+[content type]: /content-management/types/
+[directory structure]: /getting-started/directory-structure/
+[section templates]: /templates/section-templates/
+[leaf bundles]: /content-management/page-bundles/#leaf-bundles
+[branch bundles]: /content-management/page-bundles/#branch-bundles
diff --git a/docs/content/en/content-management/shortcodes.md b/docs/content/en/content-management/shortcodes.md
index 2de387f39..bbc2b0cc8 100644
--- a/docs/content/en/content-management/shortcodes.md
+++ b/docs/content/en/content-management/shortcodes.md
@@ -1,230 +1,404 @@
---
title: Shortcodes
-description: Use embedded, custom, or inline shortcodes to insert elements such as videos, images, and social media embeds into your content.
-categories: []
-keywords: []
+description: Shortcodes are simple snippets inside your content files calling built-in or custom templates.
+categories: [content management]
+keywords: [markdown,content,shortcodes]
+menu:
+ docs:
+ parent: content-management
+ weight: 100
+weight: 100
+toc: true
aliases: [/extras/shortcodes/]
+testparam: "Hugo Rocks!"
---
-## Introduction
+## What a shortcode is
-{{% glossary-term shortcode %}}
+Hugo loves Markdown because of its simple content format, but there are times when Markdown falls short. Often, content authors are forced to add raw HTML (e.g., video `
+ {{ range . }}
+ {{ $link := printf "%s#%s" $p.RelPermalink .ID | safeURL }}
+
+ {{ end }}
+
{{ .Inner | safeHTML }}
-`
-
- b := TestRunning(t, files, TestOptWarn())
-
- b.AssertNoRenderShortcodesArtifacts()
- b.AssertFileContentEquals("public/p1/index.html", "Content p1 id-1000.
\ncode_p2
Foo.
\ncode_p3
code_p1
code_p1_2
code_p1_3
")
- b.EditFileReplaceAll("content/p1.md", "id-1000.", "id-100.").Build()
- b.AssertNoRenderShortcodesArtifacts()
- b.AssertFileContentEquals("public/p1/index.html", "Content p1 id-100.
\ncode_p2
Foo.
\ncode_p3
code_p1
code_p1_2
code_p1_3
")
- b.EditFileReplaceAll("content/p2.md", "code_p2", "codep2").Build()
- b.AssertNoRenderShortcodesArtifacts()
- b.AssertFileContentEquals("public/p1/index.html", "Content p1 id-100.
\ncodep2
Foo.
\ncode_p3
code_p1
code_p1_2
code_p1_3
")
- b.EditFileReplaceAll("content/p3.md", "code_p3", "code_p3_edited").Build()
- b.AssertNoRenderShortcodesArtifacts()
- b.AssertFileContentEquals("public/p1/index.html", "Content p1 id-100.
\ncodep2
Foo.
\ncode_p3_edited
code_p1
code_p1_2
code_p1_3
")
-}
-
-// Issue 13004.
-func TestRenderShortcodesIncludeShortRefEdit(t *testing.T) {
- t.Parallel()
-
- files := `
--- hugo.toml --
-disableLiveReload = true
-disableKinds = ["home", "taxonomy", "term", "section", "rss", "sitemap", "robotsTXT", "404"]
--- content/first/p1.md --
----
-title: "p1"
----
-## p1-h1
-{{% include "p2" %}}
--- content/second/p2.md --
----
-title: "p2"
----
-### p2-h1
-
-This is some **markup**.
--- layouts/shortcodes/include.html --
-{{ $p := site.GetPage (.Get 0) -}}
-{{ $p.RenderShortcodes -}}
--- layouts/_default/single.html --
-{{ .Content }}
-`
- b := TestRunning(t, files)
- b.AssertNoRenderShortcodesArtifacts()
- b.AssertFileContentEquals("public/first/p1/index.html", "This is some markup.
\n") - b.EditFileReplaceAll("content/second/p2.md", "p2-h1", "p2-h1-edited").Build() - b.AssertNoRenderShortcodesArtifacts() - b.AssertFileContentEquals("public/first/p1/index.html", "This is some markup.
\n") -} - -// Issue 13051. -func TestRenderShortcodesEmptyParagraph(t *testing.T) { - t.Parallel() - - files := ` --- hugo.toml -- -disableKinds = ['section','rss','sitemap','taxonomy','term'] --- layouts/_default/home.html -- -{{ .Content }} --- layouts/_default/single.html -- -{{ .Content }} --- layouts/shortcodes/include.html -- - {{ with site.GetPage (.Get 0) }} - {{ .RenderShortcodes }} -{{ end }} --- content/_index.md -- ---- -title: home ---- - -a - -{{% include "/snippet" %}} - -b - --- content/snippet.md -- ---- -title: snippet -build: - render: never - list: never ---- - -_emphasized_ - -not emphasized - -` - - b := Test(t, files) - b.AssertNoRenderShortcodesArtifacts() - b.AssertFileContentEquals("public/index.html", - "a
\nemphasized
\nnot emphasized
\nb
\n", - ) -} diff --git a/hugolib/resource_chain_test.go b/hugolib/resource_chain_test.go index 00e4c0060..1365db72c 100644 --- a/hugolib/resource_chain_test.go +++ b/hugolib/resource_chain_test.go @@ -27,8 +27,8 @@ import ( qt "github.com/frankban/quicktest" - "github.com/gohugoio/hugo/common/hashing" "github.com/gohugoio/hugo/common/loggers" + "github.com/gohugoio/hugo/identity" "github.com/gohugoio/hugo/resources/resource_transformers/tocss/scss" ) @@ -67,11 +67,11 @@ FIT: {{ $fit.Name }}|{{ $fit.RelPermalink }}|{{ $fit.Width }} CSS integrity Data first: {{ $cssFingerprinted1.Data.Integrity }} {{ $cssFingerprinted1.RelPermalink }} CSS integrity Data last: {{ $cssFingerprinted2.RelPermalink }} {{ $cssFingerprinted2.Data.Integrity }} -{{ $failedImg := try (resources.GetRemote "%[1]s/fail.jpg") }} +{{ $failedImg := resources.GetRemote "%[1]s/fail.jpg" }} {{ $rimg := resources.GetRemote "%[1]s/sunset.jpg" }} {{ $remotenotfound := resources.GetRemote "%[1]s/notfound.jpg" }} {{ $localnotfound := resources.Get "images/notfound.jpg" }} -{{ $gopherprotocol := try (resources.GetRemote "gopher://example.org") }} +{{ $gopherprotocol := resources.GetRemote "gopher://example.org" }} {{ $rfit := $rimg.Fit "200x200" }} {{ $rfit2 := $rfit.Fit "100x200" }} {{ $rimg = $rimg | fingerprint }} @@ -79,10 +79,10 @@ SUNSET REMOTE: {{ $rimg.Name }}|{{ $rimg.RelPermalink }}|{{ $rimg.Width }}|{{ le FIT REMOTE: {{ $rfit.Name }}|{{ $rfit.RelPermalink }}|{{ $rfit.Width }} REMOTE NOT FOUND: {{ if $remotenotfound }}FAILED{{ else}}OK{{ end }} LOCAL NOT FOUND: {{ if $localnotfound }}FAILED{{ else}}OK{{ end }} -PRINT PROTOCOL ERROR1: {{ with $gopherprotocol }}{{ .Value | safeHTML }}{{ end }} +PRINT PROTOCOL ERROR1: {{ with $gopherprotocol }}{{ . | safeHTML }}{{ end }} PRINT PROTOCOL ERROR2: {{ with $gopherprotocol }}{{ .Err | safeHTML }}{{ end }} -PRINT PROTOCOL ERROR DETAILS: {{ with $gopherprotocol }}{{ with .Err }}Err: {{ . | safeHTML }}{{ with .Cause }}|{{ with .Data }}Body: {{ .Body }}|StatusCode: {{ .StatusCode }}{{ end }}|{{ end }}{{ end }}{{ end }} -FAILED REMOTE ERROR DETAILS CONTENT: {{ with $failedImg }}{{ with .Err }}{{ with .Cause }}{{ . }}|{{ with .Data }}Body: {{ .Body }}|StatusCode: {{ .StatusCode }}|ContentLength: {{ .ContentLength }}|ContentType: {{ .ContentType }}{{ end }}{{ end }}{{ end }}{{ end }}| +PRINT PROTOCOL ERROR DETAILS: {{ with $gopherprotocol }}Err: {{ .Err | safeHTML }}{{ with .Err }}|{{ with .Data }}Body: {{ .Body }}|StatusCode: {{ .StatusCode }}{{ end }}|{{ end }}{{ end }} +FAILED REMOTE ERROR DETAILS CONTENT: {{ with $failedImg.Err }}|{{ . }}|{{ with .Data }}Body: {{ .Body }}|StatusCode: {{ .StatusCode }}|ContentLength: {{ .ContentLength }}|ContentType: {{ .ContentType }}{{ end }}{{ end }}| `, ts.URL)) fs := b.Fs.Source @@ -99,27 +99,27 @@ FAILED REMOTE ERROR DETAILS CONTENT: {{ with $failedImg }}{{ with .Err }}{{ with b.Running() - for i := range 2 { + for i := 0; i < 2; i++ { b.Logf("Test run %d", i) b.Build(BuildCfg{}) b.AssertFileContent("public/index.html", fmt.Sprintf(` SUNSET: /images/sunset.jpg|/images/sunset.a9bf1d944e19c0f382e0d8f51de690f7d0bc8fa97390c4242a86c3e5c0737e71.jpg|900|90587 -FIT: /images/sunset.jpg|/images/sunset_hu_f2aae87288f3c13b.jpg|200 +FIT: /images/sunset.jpg|/images/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_200x200_fit_q75_box.jpg|200 CSS integrity Data first: sha256-od9YaHw8nMOL8mUy97Sy8sKwMV3N4hI3aVmZXATxH+8= /styles.min.a1df58687c3c9cc38bf26532f7b4b2f2c2b0315dcde212376959995c04f11fef.css CSS integrity Data last: /styles2.min.1cfc52986836405d37f9998a63fd6dd8608e8c410e5e3db1daaa30f78bc273ba.css sha256-HPxSmGg2QF03+ZmKY/1t2GCOjEEOXj2x2qow94vCc7o= SUNSET REMOTE: /sunset_%[1]s.jpg|/sunset_%[1]s.a9bf1d944e19c0f382e0d8f51de690f7d0bc8fa97390c4242a86c3e5c0737e71.jpg|900|90587 -FIT REMOTE: /sunset_%[1]s.jpg|/sunset_%[1]s_hu_f2aae87288f3c13b.jpg|200 +FIT REMOTE: /sunset_%[1]s.jpg|/sunset_%[1]s_hu59e56ffff1bc1d8d122b1403d34e039f_90587_200x200_fit_q75_box.jpg|200 REMOTE NOT FOUND: OK LOCAL NOT FOUND: OK -PRINT PROTOCOL ERROR DETAILS: Err: template: index.html:22:36: executing "index.html" at<x")
+ b.AssertFileContent("public/p1/index.html", `
+")
- // fmt.Println(s.pageMap.testDump())
-}
-
-// NewHugoSites creates HugoSites from the given config.
-func NewHugoSites(cfg deps.DepsCfg) (*HugoSites, error) {
- conf := cfg.Configs.GetFirstLanguageConfig()
-
- var logger loggers.Logger
- if cfg.TestLogger != nil {
- logger = cfg.TestLogger
- } else {
- var logHookLast func(e *logg.Entry) error
- if cfg.Configs.Base.PanicOnWarning {
- logHookLast = loggers.PanicOnWarningHook
- }
- if cfg.StdOut == nil {
- cfg.StdOut = os.Stdout
- }
- if cfg.StdErr == nil {
- cfg.StdErr = os.Stderr
- }
- if cfg.LogLevel == 0 {
- cfg.LogLevel = logg.LevelWarn
- }
-
- logOpts := loggers.Options{
- Level: cfg.LogLevel,
- DistinctLevel: logg.LevelWarn, // This will drop duplicate log warning and errors.
- HandlerPost: logHookLast,
- StdOut: cfg.StdOut,
- StdErr: cfg.StdErr,
- StoreErrors: conf.Watching(),
- SuppressStatements: conf.IgnoredLogs(),
- }
- logger = loggers.New(logOpts)
-
- }
-
- memCache := dynacache.New(dynacache.Options{Watching: conf.Watching(), Log: logger})
-
- var h *HugoSites
- onSignalRebuild := func(ids ...identity.Identity) {
- // This channel is buffered, but make sure we do this in a non-blocking way.
- if cfg.ChangesFromBuild != nil {
- go func() {
- cfg.ChangesFromBuild <- ids
- }()
- }
- }
-
- firstSiteDeps := &deps.Deps{
- Fs: cfg.Fs,
- Log: logger,
- Conf: conf,
- BuildState: &deps.BuildState{
- OnSignalRebuild: onSignalRebuild,
- },
- Counters: &deps.Counters{},
- MemCache: memCache,
- TranslationProvider: i18n.NewTranslationProvider(),
- WasmDispatchers: warpc.AllDispatchers(
- warpc.Options{
- CompilationCacheDir: filepath.Join(conf.Dirs().CacheDir, "_warpc"),
-
- // Katex is relatively slow.
- PoolSize: 8,
- Infof: logger.InfoCommand("wasm").Logf,
- Warnf: logger.WarnCommand("wasm").Logf,
- },
- ),
- }
-
- if err := firstSiteDeps.Init(); err != nil {
- return nil, err
- }
-
- batcherClient, err := esbuild.NewBatcherClient(firstSiteDeps)
- if err != nil {
- return nil, err
- }
- firstSiteDeps.JSBatcherClient = batcherClient
-
- confm := cfg.Configs
- if err := confm.Validate(logger); err != nil {
- return nil, err
- }
- var sites []*Site
-
- ns := &contentNodeShifter{
- numLanguages: len(confm.Languages),
- }
-
- treeConfig := doctree.Config[contentNodeI]{
- Shifter: ns,
- }
-
- pageTrees := &pageTrees{
- treePages: doctree.New(
- treeConfig,
- ),
- treeResources: doctree.New(
- treeConfig,
- ),
- treeTaxonomyEntries: doctree.NewTreeShiftTree[*weightedContentNode](doctree.DimensionLanguage.Index(), len(confm.Languages)),
- treePagesFromTemplateAdapters: doctree.NewTreeShiftTree[*pagesfromdata.PagesFromTemplate](doctree.DimensionLanguage.Index(), len(confm.Languages)),
- }
-
- pageTrees.createMutableTrees()
-
- for i, confp := range confm.ConfigLangs() {
- language := confp.Language()
- if language.Disabled {
- continue
- }
- k := language.Lang
- conf := confm.LanguageConfigMap[k]
- frontmatterHandler, err := pagemeta.NewFrontmatterHandler(firstSiteDeps.Log, conf.Frontmatter)
- if err != nil {
- return nil, err
- }
-
- langs.SetParams(language, conf.Params)
-
- s := &Site{
- conf: conf,
- language: language,
- languagei: i,
- frontmatterHandler: frontmatterHandler,
- store: maps.NewScratch(),
- }
-
- if i == 0 {
- firstSiteDeps.Site = s
- s.Deps = firstSiteDeps
- } else {
- d, err := firstSiteDeps.Clone(s, confp)
- if err != nil {
- return nil, err
- }
- s.Deps = d
- }
-
- s.pageMap = newPageMap(i, s, memCache, pageTrees)
-
- s.pageFinder = newPageFinder(s.pageMap)
- s.siteRefLinker, err = newSiteRefLinker(s)
- if err != nil {
- return nil, err
- }
- // Set up the main publishing chain.
- pub, err := publisher.NewDestinationPublisher(
- firstSiteDeps.ResourceSpec,
- s.conf.OutputFormats.Config,
- s.conf.MediaTypes.Config,
- )
- if err != nil {
- return nil, err
- }
-
- s.publisher = pub
- s.relatedDocsHandler = page.NewRelatedDocsHandler(s.conf.Related)
- // Site deps end.
-
- s.prepareInits()
- sites = append(sites, s)
- }
-
- if len(sites) == 0 {
- return nil, errors.New("no sites to build")
- }
-
- // Pull the default content language to the top, then sort the sites by language weight (if set) or lang.
- defaultContentLanguage := confm.Base.DefaultContentLanguage
- sort.Slice(sites, func(i, j int) bool {
- li := sites[i].language
- lj := sites[j].language
- if li.Lang == defaultContentLanguage {
- return true
- }
-
- if lj.Lang == defaultContentLanguage {
- return false
- }
-
- if li.Weight != lj.Weight {
- return li.Weight < lj.Weight
- }
- return li.Lang < lj.Lang
- })
-
- h, err = newHugoSites(cfg, firstSiteDeps, pageTrees, sites)
- if err == nil && h == nil {
- panic("hugo: newHugoSitesNew returned nil error and nil HugoSites")
- }
-
- return h, err
-}
-
-func newHugoSites(cfg deps.DepsCfg, d *deps.Deps, pageTrees *pageTrees, sites []*Site) (*HugoSites, error) {
- numWorkers := config.GetNumWorkerMultiplier()
- numWorkersSite := min(numWorkers, len(sites))
- workersSite := para.New(numWorkersSite)
-
- h := &HugoSites{
- Sites: sites,
- Deps: sites[0].Deps,
- Configs: cfg.Configs,
- workersSite: workersSite,
- numWorkersSites: numWorkers,
- numWorkers: numWorkers,
- pageTrees: pageTrees,
- cachePages: dynacache.GetOrCreatePartition[string,
- page.Pages](d.MemCache, "/pags/all",
- dynacache.OptionsPartition{Weight: 10, ClearWhen: dynacache.ClearOnRebuild},
- ),
- cacheContentSource: dynacache.GetOrCreatePartition[string, *resources.StaleValue[[]byte]](d.MemCache, "/cont/src", dynacache.OptionsPartition{Weight: 70, ClearWhen: dynacache.ClearOnChange}),
- translationKeyPages: maps.NewSliceCache[page.Page](),
- currentSite: sites[0],
- skipRebuildForFilenames: make(map[string]bool),
- init: &hugoSitesInit{
- data: lazy.New(),
- gitInfo: lazy.New(),
- },
- }
-
- // Assemble dependencies to be used in hugo.Deps.
- var dependencies []*hugo.Dependency
- var depFromMod func(m modules.Module) *hugo.Dependency
- depFromMod = func(m modules.Module) *hugo.Dependency {
- dep := &hugo.Dependency{
- Path: m.Path(),
- Version: m.Version(),
- Time: m.Time(),
- Vendor: m.Vendor(),
- }
-
- // These are pointers, but this all came from JSON so there's no recursive navigation,
- // so just create new values.
- if m.Replace() != nil {
- dep.Replace = depFromMod(m.Replace())
- }
- if m.Owner() != nil {
- dep.Owner = depFromMod(m.Owner())
- }
- return dep
- }
- for _, m := range d.Paths.AllModules() {
- dependencies = append(dependencies, depFromMod(m))
- }
-
- h.hugoInfo = hugo.NewInfo(h.Configs.GetFirstLanguageConfig(), dependencies)
-
- var prototype *deps.Deps
- for i, s := range sites {
- s.h = h
- // The template store needs to be initialized after the h container is set on s.
- if i == 0 {
- templateStore, err := tplimpl.NewStore(
- tplimpl.StoreOptions{
- Fs: s.BaseFs.Layouts.Fs,
- Log: s.Log,
- DefaultContentLanguage: s.Conf.DefaultContentLanguage(),
- Watching: s.Conf.Watching(),
- PathParser: s.Conf.PathParser(),
- Metrics: d.Metrics,
- OutputFormats: s.conf.OutputFormats.Config,
- MediaTypes: s.conf.MediaTypes.Config,
- DefaultOutputFormat: s.conf.DefaultOutputFormat,
- TaxonomySingularPlural: s.conf.Taxonomies,
- }, tplimpl.SiteOptions{
- Site: s,
- TemplateFuncs: tplimplinit.CreateFuncMap(s.Deps),
- })
- if err != nil {
- return nil, err
- }
- s.Deps.TemplateStore = templateStore
- } else {
- s.Deps.TemplateStore = prototype.TemplateStore.WithSiteOpts(
- tplimpl.SiteOptions{
- Site: s,
- TemplateFuncs: tplimplinit.CreateFuncMap(s.Deps),
- })
- }
- if err := s.Deps.Compile(prototype); err != nil {
- return nil, err
- }
- if i == 0 {
- prototype = s.Deps
- }
- }
-
- h.fatalErrorHandler = &fatalErrorHandler{
- h: h,
- donec: make(chan bool),
- }
-
- h.init.data.Add(func(context.Context) (any, error) {
- err := h.loadData()
- if err != nil {
- return nil, fmt.Errorf("failed to load data: %w", err)
- }
- return nil, nil
- })
-
- h.init.gitInfo.Add(func(context.Context) (any, error) {
- err := h.loadGitInfo()
- if err != nil {
- return nil, fmt.Errorf("failed to load Git info: %w", err)
- }
- return nil, nil
- })
-
- return h, nil
-}
-
-// Returns the server port.
-func (s *Site) ServerPort() int {
- return s.conf.C.BaseURL.Port()
-}
-
-// Returns the configured title for this Site.
-func (s *Site) Title() string {
- return s.conf.Title
-}
-
-func (s *Site) Copyright() string {
- return s.conf.Copyright
-}
-
-func (s *Site) Config() page.SiteConfig {
- return page.SiteConfig{
- Privacy: s.conf.Privacy,
- Services: s.conf.Services,
- }
-}
-
-func (s *Site) LanguageCode() string {
- return s.Language().LanguageCode()
-}
-
-// Returns all Sites for all languages.
-func (s *Site) Sites() page.Sites {
- sites := make(page.Sites, len(s.h.Sites))
- for i, s := range s.h.Sites {
- sites[i] = s.Site()
- }
- return sites
-}
-
-// Returns Site currently rendering.
-func (s *Site) Current() page.Site {
- return s.h.currentSite
-}
-
-// MainSections returns the list of main sections.
-func (s *Site) MainSections() []string {
- s.CheckReady()
- return s.conf.C.MainSections
-}
-
-// Returns a struct with some information about the build.
-func (s *Site) Hugo() hugo.HugoInfo {
- if s.h == nil {
- panic("site: hugo: h not initialized")
- }
- if s.h.hugoInfo.Environment == "" {
- panic("site: hugo: hugoInfo not initialized")
- }
- return s.h.hugoInfo
-}
-
-// Returns the BaseURL for this Site.
-func (s *Site) BaseURL() string {
- return s.conf.C.BaseURL.WithPath
-}
-
-// Deprecated: Use .Site.Lastmod instead.
-func (s *Site) LastChange() time.Time {
- s.CheckReady()
- hugo.Deprecate(".Site.LastChange", "Use .Site.Lastmod instead.", "v0.123.0")
- return s.lastmod
-}
-
-// Returns the last modification date of the content.
-func (s *Site) Lastmod() time.Time {
- return s.lastmod
-}
-
-// Returns the Params configured for this site.
-func (s *Site) Params() maps.Params {
- return s.conf.Params
-}
-
-// Deprecated: Use taxonomies instead.
-func (s *Site) Author() map[string]any {
- if len(s.conf.Author) != 0 {
- hugo.Deprecate(".Site.Author", "Implement taxonomy 'author' or use .Site.Params.Author instead.", "v0.124.0")
- }
- return s.conf.Author
-}
-
-// Deprecated: Use taxonomies instead.
-func (s *Site) Authors() page.AuthorList {
- hugo.Deprecate(".Site.Authors", "Implement taxonomy 'authors' or use .Site.Params.Author instead.", "v0.124.0")
- return page.AuthorList{}
-}
-
-// Deprecated: Use .Site.Params instead.
-func (s *Site) Social() map[string]string {
- hugo.Deprecate(".Site.Social", "Implement taxonomy 'social' or use .Site.Params.Social instead.", "v0.124.0")
- return s.conf.Social
-}
-
-func (s *Site) Param(key any) (any, error) {
- return resource.Param(s, nil, key)
-}
-
-// Returns a map of all the data inside /data.
-func (s *Site) Data() map[string]any {
- return s.s.h.Data()
-}
-
-func (s *Site) BuildDrafts() bool {
- return s.conf.BuildDrafts
-}
-
-// Deprecated: Use hugo.IsMultilingual instead.
-func (s *Site) IsMultiLingual() bool {
- hugo.Deprecate(".Site.IsMultiLingual", "Use hugo.IsMultilingual instead.", "v0.124.0")
- return s.h.isMultilingual()
-}
-
-func (s *Site) LanguagePrefix() string {
- prefix := s.GetLanguagePrefix()
- if prefix == "" {
- return ""
- }
- return "/" + prefix
-}
-
-func (s *Site) Site() page.Site {
- return page.WrapSite(s)
-}
-
-func (s *Site) ForEeachIdentityByName(name string, f func(identity.Identity) bool) {
- if id, found := siteidentities.FromString(name); found {
- if f(id) {
- return
- }
- }
-}
-
-// Pages returns all pages.
-// This is for the current language only.
-func (s *Site) Pages() page.Pages {
- s.CheckReady()
- return s.pageMap.getPagesInSection(
- pageMapQueryPagesInSection{
- pageMapQueryPagesBelowPath: pageMapQueryPagesBelowPath{
- Path: "",
- KeyPart: "global",
- Include: pagePredicates.ShouldListGlobal,
- },
- Recursive: true,
- IncludeSelf: true,
- },
- )
-}
-
-// RegularPages returns all the regular pages.
-// This is for the current language only.
-func (s *Site) RegularPages() page.Pages {
- s.CheckReady()
- return s.pageMap.getPagesInSection(
- pageMapQueryPagesInSection{
- pageMapQueryPagesBelowPath: pageMapQueryPagesBelowPath{
- Path: "",
- KeyPart: "global",
- Include: pagePredicates.ShouldListGlobal.And(pagePredicates.KindPage),
- },
- Recursive: true,
- },
- )
-}
-
-// AllPages returns all pages for all sites.
-func (s *Site) AllPages() page.Pages {
- s.CheckReady()
- return s.h.Pages()
-}
-
-// AllRegularPages returns all regular pages for all sites.
-func (s *Site) AllRegularPages() page.Pages {
- s.CheckReady()
- return s.h.RegularPages()
-}
-
-func (s *Site) Store() *maps.Scratch {
- return s.store
-}
-
-func (s *Site) CheckReady() {
- if s.state != siteStateReady {
- panic("this method cannot be called before the site is fully initialized")
- }
-}
-
func (s *Site) Taxonomies() page.TaxonomyList {
- s.CheckReady()
+ s.checkReady()
s.init.taxonomies.Do(context.Background())
return s.taxonomies
}
@@ -701,9 +117,6 @@ func (s *Site) prepareInits() {
s.init.prevNext = init.Branch(func(context.Context) (any, error) {
regularPages := s.RegularPages()
- if s.conf.Page.NextPrevSortOrder == "asc" {
- regularPages = regularPages.Reverse()
- }
for i, p := range regularPages {
np, ok := p.(nextPrevProvider)
if !ok {
@@ -768,11 +181,7 @@ func (s *Site) prepareInits() {
)
for _, section := range sections {
- ps := section.RegularPages()
- if s.conf.Page.NextPrevInSectionSortOrder == "asc" {
- ps = ps.Reverse()
- }
- setNextPrev(ps)
+ setNextPrev(section.RegularPages())
}
return nil, nil
@@ -791,8 +200,12 @@ func (s *Site) prepareInits() {
})
}
+type siteRenderingContext struct {
+ output.Format
+}
+
func (s *Site) Menus() navigation.Menus {
- s.CheckReady()
+ s.checkReady()
s.init.menus.Do(context.Background())
return s.menus
}
@@ -805,7 +218,7 @@ func (s *Site) initRenderFormats() {
Tree: s.pageMap.treePages,
Handle: func(key string, n contentNodeI, match doctree.DimensionFlag) (bool, error) {
if p, ok := n.(*pageState); ok {
- for _, f := range p.m.pageConfig.ConfiguredOutputFormats {
+ for _, f := range p.m.configuredOutputFormats {
if !formatSet[f.Name] {
formats = append(formats, f)
formatSet[f.Name] = true
@@ -836,7 +249,7 @@ func (s *Site) initRenderFormats() {
s.renderFormats = formats
}
-func (s *Site) GetInternalRelatedDocsHandler() *page.RelatedDocsHandler {
+func (s *Site) GetRelatedDocsHandler() *page.RelatedDocsHandler {
return s.relatedDocsHandler
}
@@ -958,52 +371,47 @@ func (s *Site) watching() bool {
return s.h != nil && s.h.Configs.Base.Internal.Watch
}
-type WhatChanged struct {
+type whatChanged struct {
mu sync.Mutex
needsPagesAssembly bool
-
- ids map[identity.Identity]bool
+ identitySet identity.Identities
}
-func (w *WhatChanged) init() {
- if w.ids == nil {
- w.ids = make(map[identity.Identity]bool)
- }
-}
-
-func (w *WhatChanged) Add(ids ...identity.Identity) {
+func (w *whatChanged) Add(ids ...identity.Identity) {
w.mu.Lock()
defer w.mu.Unlock()
- w.init()
+ if w.identitySet == nil {
+ w.identitySet = make(identity.Identities)
+ }
for _, id := range ids {
- w.ids[id] = true
+ w.identitySet[id] = true
}
}
-func (w *WhatChanged) Clear() {
+func (w *whatChanged) Clear() {
w.mu.Lock()
defer w.mu.Unlock()
w.clear()
}
-func (w *WhatChanged) clear() {
- w.ids = nil
+func (w *whatChanged) clear() {
+ w.identitySet = identity.Identities{}
}
-func (w *WhatChanged) Changes() []identity.Identity {
- if w == nil || w.ids == nil {
+func (w *whatChanged) Changes() []identity.Identity {
+ if w == nil || w.identitySet == nil {
return nil
}
- return xmaps.Keys(w.ids)
+ return w.identitySet.AsSlice()
}
-func (w *WhatChanged) Drain() []identity.Identity {
+func (w *whatChanged) Drain() []identity.Identity {
w.mu.Lock()
defer w.mu.Unlock()
- ids := w.Changes()
+ ids := w.identitySet.AsSlice()
w.clear()
return ids
}
@@ -1265,8 +673,6 @@ func (s *Site) assembleMenus() error {
// If page is still nill, we must make sure that we have a URL that considers baseURL etc.
if types.IsNil(me.Page) {
me.ConfiguredURL = s.createNodeMenuEntryURL(me.MenuConfig.URL)
- } else {
- navigation.SetPageValues(me, me.Page)
}
flat[twoD{name, me.KeyName()}] = me
@@ -1383,7 +789,6 @@ func (s *Site) getLanguagePermalinkLang(alwaysInSubDir bool) string {
func (s *Site) resetBuildState(sourceChanged bool) {
s.relatedDocsHandler = s.relatedDocsHandler.Clone()
s.init.Reset()
- s.pageMap.Reset()
}
func (s *Site) errorCollator(results <-chan error, errs chan<- error) {
@@ -1405,7 +810,7 @@ func (s *Site) errorCollator(results <-chan error, errs chan<- error) {
// as possible for existing sites. Most sites will use {{ .Site.GetPage "section" "my/section" }},
// i.e. 2 arguments, so we test for that.
func (s *Site) GetPage(ref ...string) (page.Page, error) {
- s.CheckReady()
+ s.checkReady()
p, err := s.s.getPageForRefs(ref...)
if p == nil {
@@ -1438,7 +843,7 @@ const (
pageDependencyScopeGlobal
)
-func (s *Site) renderAndWritePage(statCounter *uint64, name string, targetPath string, p *pageState, d any, templ *tplimpl.TemplInfo) error {
+func (s *Site) renderAndWritePage(statCounter *uint64, name string, targetPath string, p *pageState, d any, templ tpl.Template) error {
s.h.buildCounters.pageRenderCounter.Add(1)
renderBuffer := bp.GetBuffer()
defer bp.PutBuffer(renderBuffer)
@@ -1497,8 +902,8 @@ var infoOnMissingLayout = map[string]bool{
// hookRendererTemplate is the canonical implementation of all hooks.ITEMRenderer,
// where ITEM is the thing being hooked.
type hookRendererTemplate struct {
- templateHandler *tplimpl.TemplateStore
- templ *tplimpl.TemplInfo
+ templateHandler tpl.TemplateHandler
+ templ tpl.Template
resolvePosition func(ctx any) text.Position
}
@@ -1514,18 +919,6 @@ func (hr hookRendererTemplate) RenderCodeblock(cctx context.Context, w hugio.Fle
return hr.templateHandler.ExecuteWithContext(cctx, hr.templ, w, ctx)
}
-func (hr hookRendererTemplate) RenderPassthrough(cctx context.Context, w io.Writer, ctx hooks.PassthroughContext) error {
- return hr.templateHandler.ExecuteWithContext(cctx, hr.templ, w, ctx)
-}
-
-func (hr hookRendererTemplate) RenderBlockquote(cctx context.Context, w hugio.FlexiWriter, ctx hooks.BlockquoteContext) error {
- return hr.templateHandler.ExecuteWithContext(cctx, hr.templ, w, ctx)
-}
-
-func (hr hookRendererTemplate) RenderTable(cctx context.Context, w hugio.FlexiWriter, ctx hooks.TableContext) error {
- return hr.templateHandler.ExecuteWithContext(cctx, hr.templ, w, ctx)
-}
-
func (hr hookRendererTemplate) ResolvePosition(ctx any) text.Position {
return hr.resolvePosition(ctx)
}
@@ -1534,7 +927,7 @@ func (hr hookRendererTemplate) IsDefaultCodeBlockRenderer() bool {
return false
}
-func (s *Site) renderForTemplate(ctx context.Context, name, outputFormat string, d any, w io.Writer, templ *tplimpl.TemplInfo) (err error) {
+func (s *Site) renderForTemplate(ctx context.Context, name, outputFormat string, d any, w io.Writer, templ tpl.Template) (err error) {
if templ == nil {
s.logMissingLayout(name, "", "", outputFormat)
return nil
@@ -1544,12 +937,8 @@ func (s *Site) renderForTemplate(ctx context.Context, name, outputFormat string,
panic("nil context")
}
- if err = s.GetTemplateStore().ExecuteWithContext(ctx, templ, w, d); err != nil {
- filename := name
- if p, ok := d.(*pageState); ok {
- filename = p.String()
- }
- return fmt.Errorf("render of %q failed: %w", filename, err)
+ if err = s.Tmpl().ExecuteWithContext(ctx, templ, w, d); err != nil {
+ return fmt.Errorf("render of %q failed: %w", name, err)
}
return
}
@@ -1583,7 +972,7 @@ func (s *Site) render(ctx *siteRenderContext) (err error) {
return err
}
- if ctx.outIdx == 0 && s.h.buildCounter.Load() == 0 {
+ if ctx.outIdx == 0 {
// Note that even if disableAliases is set, the aliases themselves are
// preserved on page. The motivation with this is to be able to generate
// 301 redirects in a .htaccess file and similar using a custom output format.
diff --git a/hugolib/site_new.go b/hugolib/site_new.go
new file mode 100644
index 000000000..788b80a3f
--- /dev/null
+++ b/hugolib/site_new.go
@@ -0,0 +1,582 @@
+// Copyright 2024 The Hugo Authors. All rights reserved.
+//
+// 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.
+
+package hugolib
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "html/template"
+ "os"
+ "sort"
+ "time"
+
+ "github.com/bep/logg"
+ "github.com/gohugoio/hugo/cache/dynacache"
+ "github.com/gohugoio/hugo/common/hugo"
+ "github.com/gohugoio/hugo/common/loggers"
+ "github.com/gohugoio/hugo/common/maps"
+ "github.com/gohugoio/hugo/common/para"
+ "github.com/gohugoio/hugo/config"
+ "github.com/gohugoio/hugo/config/allconfig"
+ "github.com/gohugoio/hugo/deps"
+ "github.com/gohugoio/hugo/hugolib/doctree"
+ "github.com/gohugoio/hugo/hugolib/pagesfromdata"
+ "github.com/gohugoio/hugo/identity"
+ "github.com/gohugoio/hugo/langs"
+ "github.com/gohugoio/hugo/langs/i18n"
+ "github.com/gohugoio/hugo/lazy"
+ "github.com/gohugoio/hugo/modules"
+ "github.com/gohugoio/hugo/navigation"
+ "github.com/gohugoio/hugo/output"
+ "github.com/gohugoio/hugo/publisher"
+ "github.com/gohugoio/hugo/resources"
+ "github.com/gohugoio/hugo/resources/page"
+ "github.com/gohugoio/hugo/resources/page/pagemeta"
+ "github.com/gohugoio/hugo/resources/page/siteidentities"
+ "github.com/gohugoio/hugo/resources/resource"
+ "github.com/gohugoio/hugo/tpl"
+ "github.com/gohugoio/hugo/tpl/tplimpl"
+)
+
+var _ page.Site = (*Site)(nil)
+
+type siteState int
+
+const (
+ siteStateInit siteState = iota
+ siteStateReady
+)
+
+type Site struct {
+ state siteState
+ conf *allconfig.Config
+ language *langs.Language
+ languagei int
+ pageMap *pageMap
+
+ // The owning container.
+ h *HugoSites
+
+ *deps.Deps
+
+ // Page navigation.
+ *pageFinder
+ taxonomies page.TaxonomyList
+ menus navigation.Menus
+
+ // Shortcut to the home page. Note that this may be nil if
+ // home page, for some odd reason, is disabled.
+ home *pageState
+
+ // The last modification date of this site.
+ lastmod time.Time
+
+ relatedDocsHandler *page.RelatedDocsHandler
+ siteRefLinker
+ publisher publisher.Publisher
+ frontmatterHandler pagemeta.FrontMatterHandler
+
+ // We render each site for all the relevant output formats in serial with
+ // this rendering context pointing to the current one.
+ rc *siteRenderingContext
+
+ // The output formats that we need to render this site in. This slice
+ // will be fixed once set.
+ // This will be the union of Site.Pages' outputFormats.
+ // This slice will be sorted.
+ renderFormats output.Formats
+
+ // Lazily loaded site dependencies
+ init *siteInit
+}
+
+func (s *Site) Debug() {
+ fmt.Println("Debugging site", s.Lang(), "=>")
+ // fmt.Println(s.pageMap.testDump())
+}
+
+// NewHugoSites creates HugoSites from the given config.
+func NewHugoSites(cfg deps.DepsCfg) (*HugoSites, error) {
+ conf := cfg.Configs.GetFirstLanguageConfig()
+
+ var logger loggers.Logger
+ if cfg.TestLogger != nil {
+ logger = cfg.TestLogger
+ } else {
+ var logHookLast func(e *logg.Entry) error
+ if cfg.Configs.Base.PanicOnWarning {
+ logHookLast = loggers.PanicOnWarningHook
+ }
+ if cfg.LogOut == nil {
+ cfg.LogOut = os.Stdout
+ }
+ if cfg.LogLevel == 0 {
+ cfg.LogLevel = logg.LevelWarn
+ }
+
+ logOpts := loggers.Options{
+ Level: cfg.LogLevel,
+ DistinctLevel: logg.LevelWarn, // This will drop duplicate log warning and errors.
+ HandlerPost: logHookLast,
+ Stdout: cfg.LogOut,
+ Stderr: cfg.LogOut,
+ StoreErrors: conf.Watching(),
+ SuppressStatements: conf.IgnoredLogs(),
+ }
+ logger = loggers.New(logOpts)
+
+ }
+
+ memCache := dynacache.New(dynacache.Options{Watching: conf.Watching(), Log: logger})
+
+ firstSiteDeps := &deps.Deps{
+ Fs: cfg.Fs,
+ Log: logger,
+ Conf: conf,
+ MemCache: memCache,
+ TemplateProvider: tplimpl.DefaultTemplateProvider,
+ TranslationProvider: i18n.NewTranslationProvider(),
+ }
+
+ if err := firstSiteDeps.Init(); err != nil {
+ return nil, err
+ }
+
+ confm := cfg.Configs
+ if err := confm.Validate(logger); err != nil {
+ return nil, err
+ }
+ var sites []*Site
+
+ ns := &contentNodeShifter{
+ numLanguages: len(confm.Languages),
+ }
+
+ treeConfig := doctree.Config[contentNodeI]{
+ Shifter: ns,
+ }
+
+ pageTrees := &pageTrees{
+ treePages: doctree.New(
+ treeConfig,
+ ),
+ treeResources: doctree.New(
+ treeConfig,
+ ),
+ treeTaxonomyEntries: doctree.NewTreeShiftTree[*weightedContentNode](doctree.DimensionLanguage.Index(), len(confm.Languages)),
+ treePagesFromTemplateAdapters: doctree.NewTreeShiftTree[*pagesfromdata.PagesFromTemplate](doctree.DimensionLanguage.Index(), len(confm.Languages)),
+ }
+
+ pageTrees.createMutableTrees()
+
+ for i, confp := range confm.ConfigLangs() {
+ language := confp.Language()
+ if language.Disabled {
+ continue
+ }
+ k := language.Lang
+ conf := confm.LanguageConfigMap[k]
+ frontmatterHandler, err := pagemeta.NewFrontmatterHandler(firstSiteDeps.Log, conf.Frontmatter)
+ if err != nil {
+ return nil, err
+ }
+
+ langs.SetParams(language, conf.Params)
+
+ s := &Site{
+ conf: conf,
+ language: language,
+ languagei: i,
+ frontmatterHandler: frontmatterHandler,
+ }
+
+ if i == 0 {
+ firstSiteDeps.Site = s
+ s.Deps = firstSiteDeps
+ } else {
+ d, err := firstSiteDeps.Clone(s, confp)
+ if err != nil {
+ return nil, err
+ }
+ s.Deps = d
+ }
+
+ s.pageMap = newPageMap(i, s, memCache, pageTrees)
+
+ s.pageFinder = newPageFinder(s.pageMap)
+ s.siteRefLinker, err = newSiteRefLinker(s)
+ if err != nil {
+ return nil, err
+ }
+ // Set up the main publishing chain.
+ pub, err := publisher.NewDestinationPublisher(
+ firstSiteDeps.ResourceSpec,
+ s.conf.OutputFormats.Config,
+ s.conf.MediaTypes.Config,
+ )
+ if err != nil {
+ return nil, err
+ }
+
+ s.publisher = pub
+ s.relatedDocsHandler = page.NewRelatedDocsHandler(s.conf.Related)
+ // Site deps end.
+
+ s.prepareInits()
+ sites = append(sites, s)
+ }
+
+ if len(sites) == 0 {
+ return nil, errors.New("no sites to build")
+ }
+
+ // Pull the default content language to the top, then sort the sites by language weight (if set) or lang.
+ defaultContentLanguage := confm.Base.DefaultContentLanguage
+ sort.Slice(sites, func(i, j int) bool {
+ li := sites[i].language
+ lj := sites[j].language
+ if li.Lang == defaultContentLanguage {
+ return true
+ }
+
+ if lj.Lang == defaultContentLanguage {
+ return false
+ }
+
+ if li.Weight != lj.Weight {
+ return li.Weight < lj.Weight
+ }
+ return li.Lang < lj.Lang
+ })
+
+ h, err := newHugoSites(cfg, firstSiteDeps, pageTrees, sites)
+ if err == nil && h == nil {
+ panic("hugo: newHugoSitesNew returned nil error and nil HugoSites")
+ }
+
+ return h, err
+}
+
+func newHugoSites(cfg deps.DepsCfg, d *deps.Deps, pageTrees *pageTrees, sites []*Site) (*HugoSites, error) {
+ numWorkers := config.GetNumWorkerMultiplier()
+ numWorkersSite := numWorkers
+ if numWorkersSite > len(sites) {
+ numWorkersSite = len(sites)
+ }
+ workersSite := para.New(numWorkersSite)
+
+ h := &HugoSites{
+ Sites: sites,
+ Deps: sites[0].Deps,
+ Configs: cfg.Configs,
+ workersSite: workersSite,
+ numWorkersSites: numWorkers,
+ numWorkers: numWorkers,
+ pageTrees: pageTrees,
+ cachePages: dynacache.GetOrCreatePartition[string,
+ page.Pages](d.MemCache, "/pags/all",
+ dynacache.OptionsPartition{Weight: 10, ClearWhen: dynacache.ClearOnRebuild},
+ ),
+ cacheContentSource: dynacache.GetOrCreatePartition[string, *resources.StaleValue[[]byte]](d.MemCache, "/cont/src", dynacache.OptionsPartition{Weight: 70, ClearWhen: dynacache.ClearOnChange}),
+ translationKeyPages: maps.NewSliceCache[page.Page](),
+ currentSite: sites[0],
+ skipRebuildForFilenames: make(map[string]bool),
+ init: &hugoSitesInit{
+ data: lazy.New(),
+ layouts: lazy.New(),
+ gitInfo: lazy.New(),
+ },
+ }
+
+ // Assemble dependencies to be used in hugo.Deps.
+ var dependencies []*hugo.Dependency
+ var depFromMod func(m modules.Module) *hugo.Dependency
+ depFromMod = func(m modules.Module) *hugo.Dependency {
+ dep := &hugo.Dependency{
+ Path: m.Path(),
+ Version: m.Version(),
+ Time: m.Time(),
+ Vendor: m.Vendor(),
+ }
+
+ // These are pointers, but this all came from JSON so there's no recursive navigation,
+ // so just create new values.
+ if m.Replace() != nil {
+ dep.Replace = depFromMod(m.Replace())
+ }
+ if m.Owner() != nil {
+ dep.Owner = depFromMod(m.Owner())
+ }
+ return dep
+ }
+ for _, m := range d.Paths.AllModules() {
+ dependencies = append(dependencies, depFromMod(m))
+ }
+
+ h.hugoInfo = hugo.NewInfo(h.Configs.GetFirstLanguageConfig(), dependencies)
+
+ var prototype *deps.Deps
+ for i, s := range sites {
+ s.h = h
+ if err := s.Deps.Compile(prototype); err != nil {
+ return nil, err
+ }
+ if i == 0 {
+ prototype = s.Deps
+ }
+ }
+
+ h.fatalErrorHandler = &fatalErrorHandler{
+ h: h,
+ donec: make(chan bool),
+ }
+
+ h.init.data.Add(func(context.Context) (any, error) {
+ err := h.loadData()
+ if err != nil {
+ return nil, fmt.Errorf("failed to load data: %w", err)
+ }
+ return nil, nil
+ })
+
+ h.init.layouts.Add(func(context.Context) (any, error) {
+ for _, s := range h.Sites {
+ if err := s.Tmpl().(tpl.TemplateManager).MarkReady(); err != nil {
+ return nil, err
+ }
+ }
+ return nil, nil
+ })
+
+ h.init.gitInfo.Add(func(context.Context) (any, error) {
+ err := h.loadGitInfo()
+ if err != nil {
+ return nil, fmt.Errorf("failed to load Git info: %w", err)
+ }
+ return nil, nil
+ })
+
+ return h, nil
+}
+
+// Deprecated: Use hugo.IsServer instead.
+func (s *Site) IsServer() bool {
+ hugo.Deprecate(".Site.IsServer", "Use hugo.IsServer instead.", "v0.120.0")
+ return s.conf.Internal.Running
+}
+
+// Returns the server port.
+func (s *Site) ServerPort() int {
+ return s.conf.C.BaseURL.Port()
+}
+
+// Returns the configured title for this Site.
+func (s *Site) Title() string {
+ return s.conf.Title
+}
+
+func (s *Site) Copyright() string {
+ return s.conf.Copyright
+}
+
+// Deprecated: Use .Site.Home.OutputFormats.Get "rss" instead.
+func (s *Site) RSSLink() template.URL {
+ hugo.Deprecate(".Site.RSSLink", "Use the Output Format's Permalink method instead, e.g. .OutputFormats.Get \"RSS\".Permalink", "v0.114.0")
+ rssOutputFormat := s.home.OutputFormats().Get("rss")
+ return template.URL(rssOutputFormat.Permalink())
+}
+
+func (s *Site) Config() page.SiteConfig {
+ return page.SiteConfig{
+ Privacy: s.conf.Privacy,
+ Services: s.conf.Services,
+ }
+}
+
+func (s *Site) LanguageCode() string {
+ return s.Language().LanguageCode()
+}
+
+// Returns all Sites for all languages.
+func (s *Site) Sites() page.Sites {
+ sites := make(page.Sites, len(s.h.Sites))
+ for i, s := range s.h.Sites {
+ sites[i] = s.Site()
+ }
+ return sites
+}
+
+// Returns Site currently rendering.
+func (s *Site) Current() page.Site {
+ return s.h.currentSite
+}
+
+// MainSections returns the list of main sections.
+func (s *Site) MainSections() []string {
+ s.checkReady()
+ return s.conf.C.MainSections
+}
+
+// Returns a struct with some information about the build.
+func (s *Site) Hugo() hugo.HugoInfo {
+ if s.h == nil || s.h.hugoInfo.Environment == "" {
+ panic("site: hugo: hugoInfo not initialized")
+ }
+ return s.h.hugoInfo
+}
+
+// Returns the BaseURL for this Site.
+func (s *Site) BaseURL() string {
+ return s.conf.C.BaseURL.WithPath
+}
+
+// Deprecated: Use .Site.Lastmod instead.
+func (s *Site) LastChange() time.Time {
+ s.checkReady()
+ hugo.Deprecate(".Site.LastChange", "Use .Site.Lastmod instead.", "v0.123.0")
+ return s.lastmod
+}
+
+// Returns the last modification date of the content.
+func (s *Site) Lastmod() time.Time {
+ return s.lastmod
+}
+
+// Returns the Params configured for this site.
+func (s *Site) Params() maps.Params {
+ return s.conf.Params
+}
+
+// Deprecated: Use taxonomies instead.
+func (s *Site) Author() map[string]any {
+ if len(s.conf.Author) != 0 {
+ hugo.Deprecate(".Site.Author", "Use taxonomies instead.", "v0.124.0")
+ }
+ return s.conf.Author
+}
+
+// Deprecated: Use taxonomies instead.
+func (s *Site) Authors() page.AuthorList {
+ hugo.Deprecate(".Site.Authors", "Use taxonomies instead.", "v0.124.0")
+ return page.AuthorList{}
+}
+
+// Deprecated: Use .Site.Params instead.
+func (s *Site) Social() map[string]string {
+ hugo.Deprecate(".Site.Social", "Use .Site.Params instead.", "v0.124.0")
+ return s.conf.Social
+}
+
+// Deprecated: Use .Site.Config.Services.Disqus.Shortname instead.
+func (s *Site) DisqusShortname() string {
+ hugo.Deprecate(".Site.DisqusShortname", "Use .Site.Config.Services.Disqus.Shortname instead.", "v0.120.0")
+ return s.Config().Services.Disqus.Shortname
+}
+
+// Deprecated: Use .Site.Config.Services.GoogleAnalytics.ID instead.
+func (s *Site) GoogleAnalytics() string {
+ hugo.Deprecate(".Site.GoogleAnalytics", "Use .Site.Config.Services.GoogleAnalytics.ID instead.", "v0.120.0")
+ return s.Config().Services.GoogleAnalytics.ID
+}
+
+func (s *Site) Param(key any) (any, error) {
+ return resource.Param(s, nil, key)
+}
+
+// Returns a map of all the data inside /data.
+func (s *Site) Data() map[string]any {
+ return s.s.h.Data()
+}
+
+func (s *Site) BuildDrafts() bool {
+ return s.conf.BuildDrafts
+}
+
+// Deprecated: Use hugo.IsMultilingual instead.
+func (s *Site) IsMultiLingual() bool {
+ hugo.Deprecate(".Site.IsMultiLingual", "Use hugo.IsMultilingual instead.", "v0.124.0")
+ return s.h.isMultilingual()
+}
+
+func (s *Site) LanguagePrefix() string {
+ prefix := s.GetLanguagePrefix()
+ if prefix == "" {
+ return ""
+ }
+ return "/" + prefix
+}
+
+func (s *Site) Site() page.Site {
+ return page.WrapSite(s)
+}
+
+func (s *Site) ForEeachIdentityByName(name string, f func(identity.Identity) bool) {
+ if id, found := siteidentities.FromString(name); found {
+ if f(id) {
+ return
+ }
+ }
+}
+
+// Pages returns all pages.
+// This is for the current language only.
+func (s *Site) Pages() page.Pages {
+ s.checkReady()
+ return s.pageMap.getPagesInSection(
+ pageMapQueryPagesInSection{
+ pageMapQueryPagesBelowPath: pageMapQueryPagesBelowPath{
+ Path: "",
+ KeyPart: "global",
+ Include: pagePredicates.ShouldListGlobal,
+ },
+ Recursive: true,
+ IncludeSelf: true,
+ },
+ )
+}
+
+// RegularPages returns all the regular pages.
+// This is for the current language only.
+func (s *Site) RegularPages() page.Pages {
+ s.checkReady()
+ return s.pageMap.getPagesInSection(
+ pageMapQueryPagesInSection{
+ pageMapQueryPagesBelowPath: pageMapQueryPagesBelowPath{
+ Path: "",
+ KeyPart: "global",
+ Include: pagePredicates.ShouldListGlobal.And(pagePredicates.KindPage),
+ },
+ Recursive: true,
+ },
+ )
+}
+
+// AllPages returns all pages for all sites.
+func (s *Site) AllPages() page.Pages {
+ s.checkReady()
+ return s.h.Pages()
+}
+
+// AllRegularPages returns all regular pages for all sites.
+func (s *Site) AllRegularPages() page.Pages {
+ s.checkReady()
+ return s.h.RegularPages()
+}
+
+func (s *Site) checkReady() {
+ if s.state != siteStateReady {
+ panic("this method cannot be called before the site is fully initialized")
+ }
+}
diff --git a/hugolib/site_output.go b/hugolib/site_output.go
index 3438ea9f7..2744c0133 100644
--- a/hugolib/site_output.go
+++ b/hugolib/site_output.go
@@ -27,7 +27,6 @@ func createDefaultOutputFormats(allFormats output.Formats) map[string]output.For
htmlOut, _ := allFormats.GetByName(output.HTMLFormat.Name)
robotsOut, _ := allFormats.GetByName(output.RobotsTxtFormat.Name)
sitemapOut, _ := allFormats.GetByName(output.SitemapFormat.Name)
- httpStatus404Out, _ := allFormats.GetByName(output.HTTPStatus404HTMLFormat.Name)
defaultListTypes := output.Formats{htmlOut}
if rssFound {
@@ -43,7 +42,7 @@ func createDefaultOutputFormats(allFormats output.Formats) map[string]output.For
// Below are for consistency. They are currently not used during rendering.
kinds.KindSitemap: {sitemapOut},
kinds.KindRobotsTXT: {robotsOut},
- kinds.KindStatus404: {httpStatus404Out},
+ kinds.KindStatus404: {htmlOut},
}
// May be disabled
@@ -81,7 +80,7 @@ func createSiteOutputFormats(allFormats output.Formats, outputs map[string]any,
f, found := allFormats.GetByName(format)
if !found {
if rssDisabled && strings.EqualFold(format, "RSS") {
- // This is legacy behavior. We used to have both
+ // This is legacy behaviour. We used to have both
// a RSS page kind and output format.
continue
}
diff --git a/hugolib/site_output_test.go b/hugolib/site_output_test.go
index caec4c700..3d95709c5 100644
--- a/hugolib/site_output_test.go
+++ b/hugolib/site_output_test.go
@@ -15,6 +15,7 @@ package hugolib
import (
"fmt"
+ "html/template"
"strings"
"testing"
@@ -44,13 +45,11 @@ func doTestSiteWithPageOutputs(t *testing.T, outputs []string) {
siteConfig := `
baseURL = "http://example.com/blog"
+paginate = 1
defaultContentLanguage = "en"
disableKinds = ["section", "term", "taxonomy", "RSS", "sitemap", "robotsTXT", "404"]
-[pagination]
-pagerSize = 1
-
[Taxonomies]
tag = "tags"
category = "categories"
@@ -222,13 +221,11 @@ func TestRedefineRSSOutputFormat(t *testing.T) {
siteConfig := `
baseURL = "http://example.com/blog"
+paginate = 1
defaultContentLanguage = "en"
disableKinds = ["page", "section", "term", "taxonomy", "sitemap", "robotsTXT", "404"]
-[pagination]
-pagerSize = 1
-
[outputFormats]
[outputFormats.RSS]
mediatype = "application/rss"
@@ -252,7 +249,7 @@ baseName = "feed"
s := h.Sites[0]
// Issue #3450
- c.Assert(s.Home().OutputFormats().Get("rss").Permalink(), qt.Equals, "http://example.com/blog/feed.xml")
+ c.Assert(s.RSSLink(), qt.Equals, template.URL("http://example.com/blog/feed.xml"))
}
// Issue #3614
@@ -260,13 +257,11 @@ func TestDotLessOutputFormat(t *testing.T) {
siteConfig := `
baseURL = "http://example.com/blog"
+paginate = 1
defaultContentLanguage = "en"
disableKinds = ["page", "section", "term", "taxonomy", "sitemap", "robotsTXT", "404"]
-[pagination]
-pagerSize = 1
-
[mediaTypes]
[mediaTypes."text/nodot"]
delimiter = ""
@@ -387,7 +382,7 @@ func TestCreateSiteOutputFormats(t *testing.T) {
c.Assert(outputs[kinds.KindRSS], deepEqualsOutputFormats, output.Formats{output.RSSFormat})
c.Assert(outputs[kinds.KindSitemap], deepEqualsOutputFormats, output.Formats{output.SitemapFormat})
c.Assert(outputs[kinds.KindRobotsTXT], deepEqualsOutputFormats, output.Formats{output.RobotsTxtFormat})
- c.Assert(outputs[kinds.KindStatus404], deepEqualsOutputFormats, output.Formats{output.HTTPStatus404HTMLFormat})
+ c.Assert(outputs[kinds.KindStatus404], deepEqualsOutputFormats, output.Formats{output.HTMLFormat})
})
// Issue #4528
@@ -481,7 +476,6 @@ permalinkable = true
[outputFormats.nobase]
mediaType = "application/json"
permalinkable = true
-isPlainText = true
`
diff --git a/hugolib/site_render.go b/hugolib/site_render.go
index 6dbb19827..1cd509fea 100644
--- a/hugolib/site_render.go
+++ b/hugolib/site_render.go
@@ -20,12 +20,11 @@ import (
"strings"
"sync"
- "github.com/bep/logg"
"github.com/gohugoio/hugo/common/herrors"
"github.com/gohugoio/hugo/hugolib/doctree"
- "github.com/gohugoio/hugo/tpl/tplimpl"
"github.com/gohugoio/hugo/config"
+ "github.com/gohugoio/hugo/tpl"
"github.com/gohugoio/hugo/resources/kinds"
"github.com/gohugoio/hugo/resources/page"
@@ -34,8 +33,6 @@ import (
type siteRenderContext struct {
cfg *BuildCfg
- infol logg.LevelLogger
-
// languageIdx is the zero based index of the site.
languageIdx int
@@ -57,7 +54,7 @@ func (s siteRenderContext) shouldRenderStandalonePage(kind string) bool {
return s.outIdx == 0
}
- if kind == kinds.KindTemporary || kind == kinds.KindStatus404 {
+ if kind == kinds.KindStatus404 {
// 1 for all output formats
return s.outIdx == 0
}
@@ -78,7 +75,7 @@ func (s *Site) renderPages(ctx *siteRenderContext) error {
wg := &sync.WaitGroup{}
- for range numWorkers {
+ for i := 0; i < numWorkers; i++ {
wg.Add(1)
go pageRenderer(ctx, s, pages, results, wg)
}
@@ -89,7 +86,7 @@ func (s *Site) renderPages(ctx *siteRenderContext) error {
Tree: s.pageMap.treePages,
Handle: func(key string, n contentNodeI, match doctree.DimensionFlag) (bool, error) {
if p, ok := n.(*pageState); ok {
- if cfg.shouldRender(ctx.infol, p) {
+ if cfg.shouldRender(p) {
select {
case <-s.h.Done():
return true, nil
@@ -114,7 +111,7 @@ func (s *Site) renderPages(ctx *siteRenderContext) error {
err := <-errs
if err != nil {
- return fmt.Errorf("failed to render pages: %w", herrors.ImproveRenderErr(err))
+ return fmt.Errorf("failed to render pages: %w", herrors.ImproveIfNilPointer(err))
}
return nil
}
@@ -225,18 +222,18 @@ func (s *Site) logMissingLayout(name, layout, kind, outputFormat string) {
}
// renderPaginator must be run after the owning Page has been rendered.
-func (s *Site) renderPaginator(p *pageState, templ *tplimpl.TemplInfo) error {
- paginatePath := s.Conf.Pagination().Path
+func (s *Site) renderPaginator(p *pageState, templ tpl.Template) error {
+ paginatePath := s.conf.PaginatePath
d := p.targetPathDescriptor
- f := p.outputFormat()
+ f := p.s.rc.Format
d.Type = f
if p.paginator.current == nil || p.paginator.current != p.paginator.current.First() {
panic(fmt.Sprintf("invalid paginator state for %q", p.pathOrTitle()))
}
- if f.IsHTML && !s.Conf.Pagination().DisableAliases {
+ if f.IsHTML {
// Write alias for page 1
d.Addends = fmt.Sprintf("/%s/%d", paginatePath, 1)
targetPaths := page.CreateTargetPaths(d)
@@ -337,9 +334,6 @@ func (s *Site) renderAliases() error {
// renderMainLanguageRedirect creates a redirect to the main language home,
// depending on if it lives in sub folder (e.g. /en) or not.
func (s *Site) renderMainLanguageRedirect() error {
- if s.conf.DisableDefaultLanguageRedirect {
- return nil
- }
if s.h.Conf.IsMultihost() || !(s.h.Conf.DefaultContentLanguageInSubdir() || s.h.Conf.IsMultilingual()) {
// No need for a redirect
return nil
diff --git a/hugolib/site_sections.go b/hugolib/site_sections.go
index 385f3f291..03d662b9f 100644
--- a/hugolib/site_sections.go
+++ b/hugolib/site_sections.go
@@ -19,12 +19,12 @@ import (
// Sections returns the top level sections.
func (s *Site) Sections() page.Pages {
- s.CheckReady()
+ s.checkReady()
return s.Home().Sections()
}
// Home is a shortcut to the home page, equivalent to .Site.GetPage "home".
func (s *Site) Home() page.Page {
- s.CheckReady()
+ s.checkReady()
return s.s.home
}
diff --git a/hugolib/site_sections_test.go b/hugolib/site_sections_test.go
index 0bf166092..7fa15fb66 100644
--- a/hugolib/site_sections_test.go
+++ b/hugolib/site_sections_test.go
@@ -115,7 +115,7 @@ PAG|{{ .Title }}|{{ $sect.InSection . }}
{{ $sections := (.Site.GetPage "section" .Section).Sections.ByWeight }}
`)
- cfg.Set("pagination.pagerSize", 2)
+ cfg.Set("paginate", 2)
th, configs := newTestHelperFromProvider(cfg, fs, t)
diff --git a/hugolib/site_stats_test.go b/hugolib/site_stats_test.go
index c045963f3..167194ef5 100644
--- a/hugolib/site_stats_test.go
+++ b/hugolib/site_stats_test.go
@@ -16,6 +16,7 @@ package hugolib
import (
"bytes"
"fmt"
+ "io"
"testing"
"github.com/gohugoio/hugo/helpers"
@@ -31,11 +32,9 @@ func TestSiteStats(t *testing.T) {
siteConfig := `
baseURL = "http://example.com/blog"
+paginate = 1
defaultContentLanguage = "nn"
-[pagination]
-pagerSize = 1
-
[languages]
[languages.nn]
languageName = "Nynorsk"
@@ -68,15 +67,15 @@ aliases: [/Ali%d]
"_default/terms.html", "Terms List|{{ .Title }}|{{ .Content }}",
)
- for i := range 2 {
- for j := range 2 {
+ for i := 0; i < 2; i++ {
+ for j := 0; j < 2; j++ {
pageID := i + j + 1
b.WithContent(fmt.Sprintf("content/sect/p%d.md", pageID),
fmt.Sprintf(pageTemplate, pageID, fmt.Sprintf("- tag%d", j), fmt.Sprintf("- category%d", j), pageID))
}
}
- for i := range 5 {
+ for i := 0; i < 5; i++ {
b.WithContent(fmt.Sprintf("assets/image%d.png", i+1), "image")
}
@@ -88,11 +87,14 @@ aliases: [/Ali%d]
h.Sites[1].PathSpec.ProcessingStats,
}
+ stats[0].Table(io.Discard)
+ stats[1].Table(io.Discard)
+
var buff bytes.Buffer
helpers.ProcessingStatsTable(&buff, stats...)
- c.Assert(buff.String(), qt.Contains, "Pages │ 21 │ 7")
+ c.Assert(buff.String(), qt.Contains, "Pages | 21 | 7")
}
func TestSiteLastmod(t *testing.T) {
@@ -119,10 +121,11 @@ date: 2023-04-01
---
-- layouts/index.html --
site.Lastmod: {{ .Site.Lastmod.Format "2006-01-02" }}
+site.LastChange: {{ .Site.LastChange.Format "2006-01-02" }}
home.Lastmod: {{ site.Home.Lastmod.Format "2006-01-02" }}
`
b := Test(t, files)
- b.AssertFileContent("public/index.html", "site.Lastmod: 2023-04-01\nhome.Lastmod: 2023-01-01")
+ b.AssertFileContent("public/index.html", "site.Lastmod: 2023-04-01\nsite.LastChange: 2023-04-01\nhome.Lastmod: 2023-01-01")
}
diff --git a/hugolib/site_test.go b/hugolib/site_test.go
index 199c878cd..1de1d688a 100644
--- a/hugolib/site_test.go
+++ b/hugolib/site_test.go
@@ -147,8 +147,8 @@ func TestLastChange(t *testing.T) {
s := buildSingleSite(t, deps.DepsCfg{Fs: fs, Configs: configs}, BuildCfg{SkipRender: true})
- c.Assert(s.Lastmod().IsZero(), qt.Equals, false)
- c.Assert(s.Lastmod().Year(), qt.Equals, 2017)
+ c.Assert(s.LastChange().IsZero(), qt.Equals, false)
+ c.Assert(s.LastChange().Year(), qt.Equals, 2017)
}
// Issue #_index
@@ -372,14 +372,14 @@ func TestMainSections(t *testing.T) {
b := newTestSitesBuilder(c).WithViper(v)
- for i := range 20 {
+ for i := 0; i < 20; i++ {
b.WithContent(fmt.Sprintf("page%d.md", i), `---
title: "Page"
---
`)
}
- for i := range 5 {
+ for i := 0; i < 5; i++ {
b.WithContent(fmt.Sprintf("blog/page%d.md", i), `---
title: "Page"
tags: ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j"]
@@ -387,7 +387,7 @@ tags: ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j"]
`)
}
- for i := range 3 {
+ for i := 0; i < 3; i++ {
b.WithContent(fmt.Sprintf("docs/page%d.md", i), `---
title: "Page"
---
@@ -427,8 +427,8 @@ mainSections=["a", "b"]
{{/* Behaviour before Hugo 0.112.0. */}}
MainSections Params: {{ site.Params.mainSections }}|
MainSections Site method: {{ site.MainSections }}|
-
-
+
+
`
b := Test(t, files)
@@ -478,8 +478,8 @@ disableKinds = ['RSS','sitemap','taxonomy','term']
-- layouts/index.html --
MainSections Params: {{ site.Params.mainSections }}|
MainSections Site method: {{ site.MainSections }}|
-
-
+
+
`
b := Test(t, files)
@@ -615,7 +615,7 @@ var weightedPage5 = `+++
weight = "5"
title = "Five"
-[build]
+[_build]
render = "never"
+++
Front Matter with Ordered Pages 5`
@@ -787,12 +787,9 @@ func TestGroupedPages(t *testing.T) {
t.Errorf("PageGroup has unexpected number of pages. First group should have '%d' pages, got '%d' pages", 2, len(byparam[0].Pages))
}
- byNonExistentParam, err := s.RegularPages().GroupByParam("not_exist")
- if err != nil {
- t.Errorf("GroupByParam returned an error when it shouldn't")
- }
- if len(byNonExistentParam) != 0 {
- t.Errorf("PageGroup array has unexpected elements. Group length should be '%d', got '%d'", 0, len(byNonExistentParam))
+ _, err = s.RegularPages().GroupByParam("not_exist")
+ if err == nil {
+ t.Errorf("GroupByParam didn't return an expected error")
}
byOnlyOneParam, err := s.RegularPages().GroupByParam("only_one")
@@ -978,6 +975,7 @@ func TestRefLinking(t *testing.T) {
{".", "", true, "/level2/level3/"},
{"./", "", true, "/level2/level3/"},
+ // try to confuse parsing
{"embedded.dot.md", "", true, "/level2/level3/embedded.dot/"},
// test empty link, as well as fragment only link
diff --git a/hugolib/site_url_test.go b/hugolib/site_url_test.go
index 091251f80..8efaae3a2 100644
--- a/hugolib/site_url_test.go
+++ b/hugolib/site_url_test.go
@@ -91,13 +91,13 @@ Do not go gentle into that good night.
`
cfg, fs := newTestCfg()
- cfg.Set("pagination.pagerSize", 1)
+ cfg.Set("paginate", 1)
th, configs := newTestHelperFromProvider(cfg, fs, t)
writeSource(t, fs, filepath.Join("content", "sect1", "_index.md"), fmt.Sprintf(st, "/ss1/"))
writeSource(t, fs, filepath.Join("content", "sect2", "_index.md"), fmt.Sprintf(st, "/ss2/"))
- for i := range 5 {
+ for i := 0; i < 5; i++ {
writeSource(t, fs, filepath.Join("content", "sect1", fmt.Sprintf("p%d.md", i+1)), pt)
writeSource(t, fs, filepath.Join("content", "sect2", fmt.Sprintf("p%d.md", i+1)), pt)
}
diff --git a/hugolib/sitemap_test.go b/hugolib/sitemap_test.go
index 922ecbc12..1c2642468 100644
--- a/hugolib/sitemap_test.go
+++ b/hugolib/sitemap_test.go
@@ -139,7 +139,7 @@ weight = 1
languageName = "English"
[languages.nn]
weight = 2
--- layouts/list.xml --
+-- layouts/_default/list.xml --
Site: {{ .Site.Title }}|
-- layouts/home --
Home.
diff --git a/hugolib/taxonomy_test.go b/hugolib/taxonomy_test.go
index 7aeaa780c..bfdfd8dfd 100644
--- a/hugolib/taxonomy_test.go
+++ b/hugolib/taxonomy_test.go
@@ -76,15 +76,12 @@ func TestTaxonomiesWithAndWithoutContentFile(t *testing.T) {
}
func doTestTaxonomiesWithAndWithoutContentFile(t *testing.T, uglyURLs bool) {
- t.Helper()
-
siteConfig := `
baseURL = "http://example.com/blog"
titleCaseStyle = "firstupper"
uglyURLs = %t
+paginate = 1
defaultContentLanguage = "en"
-[pagination]
-pagerSize = 1
[Taxonomies]
tag = "tags"
category = "categories"
@@ -316,7 +313,7 @@ func TestTaxonomiesNextGenLoops(t *testing.T) {
`)
- for i := range 10 {
+ for i := 0; i < 10; i++ {
b.WithContent(fmt.Sprintf("page%d.md", i+1), `
---
Title: "Taxonomy!"
@@ -973,58 +970,3 @@ title: p1
b.AssertFileExists("public/ja/s1/index.html", false) // failing test
b.AssertFileExists("public/ja/s1/category/index.html", true)
}
-
-func BenchmarkTaxonomiesGetTerms(b *testing.B) {
- createBuilders := func(b *testing.B, numPages int) []*IntegrationTestBuilder {
- files := `
--- hugo.toml --
-baseURL = "https://example.com"
-disableKinds = ["RSS", "sitemap", "section"]
-[taxononomies]
-tag = "tags"
--- layouts/_default/list.html --
-List.
--- layouts/_default/single.html --
-GetTerms.tags: {{ range .GetTerms "tags" }}{{ .Title }}|{{ end }}
--- content/_index.md --
-`
-
- tagsVariants := []string{
- "tags: ['a']",
- "tags: ['a', 'b']",
- "tags: ['a', 'b', 'c']",
- "tags: ['a', 'b', 'c', 'd']",
- "tags: ['a', 'b', 'd', 'e']",
- "tags: ['a', 'b', 'c', 'd', 'e']",
- "tags: ['a', 'd']",
- "tags: ['a', 'f']",
- }
-
- for i := 1; i < numPages; i++ {
- tags := tagsVariants[i%len(tagsVariants)]
- files += fmt.Sprintf("\n-- content/posts/p%d.md --\n---\n%s\n---", i+1, tags)
- }
- cfg := IntegrationTestConfig{
- T: b,
- TxtarString: files,
- }
- builders := make([]*IntegrationTestBuilder, b.N)
-
- for i := range builders {
- builders[i] = NewIntegrationTestBuilder(cfg)
- }
-
- b.ResetTimer()
-
- return builders
- }
-
- for _, numPages := range []int{100, 1000, 10000, 20000} {
- b.Run(fmt.Sprintf("pages_%d", numPages), func(b *testing.B) {
- builders := createBuilders(b, numPages)
- for i := 0; i < b.N; i++ {
- builders[i].Build()
- }
- })
- }
-}
diff --git a/hugolib/template_test.go b/hugolib/template_test.go
index a08f83cb8..1c60a88b3 100644
--- a/hugolib/template_test.go
+++ b/hugolib/template_test.go
@@ -26,8 +26,6 @@ import (
"github.com/gohugoio/hugo/hugofs"
)
-// TODO(bep) keep this until we release v0.146.0 as a security against breaking changes, but it's rather messy and mostly duplicate of
-// tests in the tplimpl package, so eventually just remove it.
func TestTemplateLookupOrder(t *testing.T) {
var (
fs *hugofs.Fs
@@ -187,9 +185,6 @@ func TestTemplateLookupOrder(t *testing.T) {
} {
this := this
- if this.name != "Variant 1" {
- continue
- }
t.Run(this.name, func(t *testing.T) {
// TODO(bep) there are some function vars need to pull down here to enable => t.Parallel()
cfg, fs = newTestCfg()
@@ -205,7 +200,7 @@ Some content
}
buildSingleSite(t, deps.DepsCfg{Fs: fs, Configs: configs}, BuildCfg{})
- // s.TemplateStore.PrintDebug("", 0, os.Stdout)
+ // helpers.PrintFs(s.BaseFs.Layouts.Fs, "", os.Stdout)
this.assert(t)
})
@@ -255,7 +250,7 @@ Content.
Base %d: {{ block "main" . }}FOO{{ end }}
`
- for i := range numPages {
+ for i := 0; i < numPages; i++ {
id := i + 1
b.WithContent(fmt.Sprintf("page%d.md", id), fmt.Sprintf(pageTemplate, id, id))
b.WithTemplates(fmt.Sprintf("_default/layout%d.html", id), fmt.Sprintf(singleTemplate, id))
@@ -263,7 +258,7 @@ Base %d: {{ block "main" . }}FOO{{ end }}
}
b.Build(BuildCfg{})
- for i := range numPages {
+ for i := 0; i < numPages; i++ {
id := i + 1
b.AssertFileContent(fmt.Sprintf("public/page%d/index.html", id), fmt.Sprintf(`Base %d: %d`, id, id))
}
@@ -275,11 +270,11 @@ func TestTemplateNoBasePlease(t *testing.T) {
b := newTestSitesBuilder(t).WithSimpleConfigFile()
b.WithTemplates("_default/list.html", `
-{{ define "main" }}
- Bonjour
-{{ end }}
+ {{ define "main" }}
+ Bonjour
+ {{ end }}
-{{ printf "list" }}
+ {{ printf "list" }}
`)
@@ -349,43 +344,40 @@ title: %s
b.AssertFileContent("public/p1/index.html", `Single: P1`)
})
- {
- }
-}
+ t.Run("baseof", func(t *testing.T) {
+ t.Parallel()
+ b := newTestSitesBuilder(t).WithDefaultMultiSiteConfig()
-func TestTemplateLookupSitBaseOf(t *testing.T) {
- t.Parallel()
- b := newTestSitesBuilder(t).WithDefaultMultiSiteConfig()
+ b.WithTemplatesAdded(
+ "index.html", `{{ define "main" }}Main Home En{{ end }}`,
+ "index.fr.html", `{{ define "main" }}Main Home Fr{{ end }}`,
+ "baseof.html", `Baseof en: {{ block "main" . }}main block{{ end }}`,
+ "baseof.fr.html", `Baseof fr: {{ block "main" . }}main block{{ end }}`,
+ "mysection/baseof.html", `Baseof mysection: {{ block "main" . }}mysection block{{ end }}`,
+ "_default/single.html", `{{ define "main" }}Main Default Single{{ end }}`,
+ "_default/list.html", `{{ define "main" }}Main Default List{{ end }}`,
+ )
- b.WithTemplatesAdded(
- "index.html", `{{ define "main" }}Main Home En{{ end }}`,
- "index.fr.html", `{{ define "main" }}Main Home Fr{{ end }}`,
- "baseof.html", `Baseof en: {{ block "main" . }}main block{{ end }}`,
- "baseof.fr.html", `Baseof fr: {{ block "main" . }}main block{{ end }}`,
- "mysection/baseof.html", `Baseof mysection: {{ block "main" . }}mysection block{{ end }}`,
- "_default/single.html", `{{ define "main" }}Main Default Single{{ end }}`,
- "_default/list.html", `{{ define "main" }}Main Default List{{ end }}`,
- )
-
- b.WithContent("mysection/p1.md", `---
+ b.WithContent("mysection/p1.md", `---
title: My Page
---
`)
- b.CreateSites().Build(BuildCfg{})
+ b.CreateSites().Build(BuildCfg{})
- b.AssertFileContent("public/en/index.html", `Baseof en: Main Home En`)
- b.AssertFileContent("public/fr/index.html", `Baseof fr: Main Home Fr`)
- b.AssertFileContent("public/en/mysection/index.html", `Baseof mysection: Main Default List`)
- b.AssertFileContent("public/en/mysection/p1/index.html", `Baseof mysection: Main Default Single`)
+ b.AssertFileContent("public/en/index.html", `Baseof en: Main Home En`)
+ b.AssertFileContent("public/fr/index.html", `Baseof fr: Main Home Fr`)
+ b.AssertFileContent("public/en/mysection/index.html", `Baseof mysection: Main Default List`)
+ b.AssertFileContent("public/en/mysection/p1/index.html", `Baseof mysection: Main Default Single`)
+ })
}
func TestTemplateFuncs(t *testing.T) {
b := newTestSitesBuilder(t).WithDefaultMultiSiteConfig()
homeTpl := `Site: {{ site.Language.Lang }} / {{ .Site.Language.Lang }} / {{ site.BaseURL }}
-Sites: {{ site.Sites.Default.Home.Language.Lang }}
+Sites: {{ site.Sites.First.Home.Language.Lang }}
Hugo: {{ hugo.Generator }}
`
@@ -468,7 +460,7 @@ complex: 80: 80
func TestPartialWithZeroedArgs(t *testing.T) {
b := newTestSitesBuilder(t)
b.WithTemplatesAdded("index.html",
- `
+ `
X{{ partial "retval" dict }}X
X{{ partial "retval" slice }}X
X{{ partial "retval" "" }}X
@@ -704,7 +696,7 @@ func TestApplyWithNamespace(t *testing.T) {
b.WithTemplates(
"index.html", `
-{{ $b := slice " a " " b " " c" }}
+{{ $b := slice " a " " b " " c" }}
{{ $a := apply $b "strings.Trim" "." " " }}
a: {{ $a }}
`,
@@ -714,18 +706,3 @@ a: {{ $a }}
b.AssertFileContent("public/index.html", `a: [a b c]`)
}
-
-// Legacy behavior for internal templates.
-func TestOverrideInternalTemplate(t *testing.T) {
- files := `
--- hugo.toml --
-baseURL = "https://example.org"
--- layouts/index.html --
-{{ template "_internal/google_analytics_async.html" . }}
--- layouts/_internal/google_analytics_async.html --
-Overridden.
-`
- b := Test(t, files)
-
- b.AssertFileContent("public/index.html", "Overridden.")
-}
diff --git a/hugolib/testhelpers_test.go b/hugolib/testhelpers_test.go
index 2007b658d..dab693623 100644
--- a/hugolib/testhelpers_test.go
+++ b/hugolib/testhelpers_test.go
@@ -260,7 +260,7 @@ disable = false
respectDoNotTrack = true
[privacy.instagram]
simple = true
-[privacy.x]
+[privacy.twitter]
enableDNT = true
[privacy.vimeo]
disable = false
@@ -292,13 +292,11 @@ func (s *sitesBuilder) WithDefaultMultiSiteConfig() *sitesBuilder {
defaultMultiSiteConfig := `
baseURL = "http://example.com/blog"
+paginate = 1
disablePathToLower = true
defaultContentLanguage = "en"
defaultContentLanguageInSubdir = true
-[pagination]
-pagerSize = 1
-
[permalinks]
other = "/somewhere/else/:filename"
@@ -326,8 +324,7 @@ plaque = "plaques"
weight = 30
title = "På nynorsk"
languageName = "Nynorsk"
-[Languages.nn.pagination]
-path = "side"
+paginatePath = "side"
[Languages.nn.Taxonomies]
lag = "lag"
[[Languages.nn.menu.main]]
@@ -339,8 +336,7 @@ weight = 1
weight = 40
title = "På bokmål"
languageName = "Bokmål"
-[Languages.nb.pagination]
-path = "side"
+paginatePath = "side"
[Languages.nb.Taxonomies]
lag = "lag"
` + commonConfigSections
@@ -838,7 +834,7 @@ func (s *sitesBuilder) NpmInstall() hexec.Runner {
var err error
sc.Exec.Allow, err = security.NewWhitelist("npm")
s.Assert(err, qt.IsNil)
- ex := hexec.New(sc, s.workingDir, loggers.NewDefault())
+ ex := hexec.New(sc)
command, err := ex.New("npm", "install")
s.Assert(err, qt.IsNil)
return command
diff --git a/hugoreleaser.env b/hugoreleaser.env
index 6da749524..6250ff131 100644
--- a/hugoreleaser.env
+++ b/hugoreleaser.env
@@ -1,65 +1,7 @@
# Release env.
# These will be replaced by script before release.
-HUGORELEASER_TAG=v0.147.9
-HUGORELEASER_COMMITISH=29bdbde19c288d190e889294a862103c6efb70bf
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+HUGORELEASER_TAG=v0.125.7
+HUGORELEASER_COMMITISH=b1d808bc373f53ad37c8966bb02a6aea095db5f8
diff --git a/hugoreleaser.toml b/hugoreleaser.toml
new file mode 100644
index 000000000..d516bd34b
--- /dev/null
+++ b/hugoreleaser.toml
@@ -0,0 +1,239 @@
+project = "hugo"
+
+# In Hugo v0.103.0 we removed the archive name replacements (e.g. amd64 => 64bit).
+# Using standard GOOS/GOARCH values makes it easier for scripts out there,
+# but to prevent breakage in Netlify etc. that has adopted to the old names,
+# we create aliases for the most common variants.
+# According to download numbers from v0.101.0, these are by a good margin the two most popular:
+# hugo_extended_0.101.0_Linux-64bit.tar.gz Downloaded 129,016 times
+# hugo_0.101.0_Linux-64bit.tar.gz Downloaded 87,846 times
+# This replacement will create 2 extra alias archives.
+archive_alias_replacements = { "linux-amd64.tar.gz" = "Linux-64bit.tar.gz" }
+
+[go_settings]
+ go_proxy = "https://proxy.golang.org"
+ go_exe = "go"
+
+[build_settings]
+ binary = "hugo"
+ flags = ["-buildmode", "exe"]
+ env = ["CGO_ENABLED=0"]
+ ldflags = "-s -w -X github.com/gohugoio/hugo/common/hugo.vendorInfo=gohugoio"
+
+[archive_settings]
+ name_template = "{{ .Project }}_{{ .Tag | trimPrefix `v` }}_{{ .Goos }}-{{ .Goarch }}"
+ extra_files = [
+ { source_path = "README.md", target_path = "README.md" },
+ { source_path = "LICENSE", target_path = "LICENSE" },
+ ]
+ [archive_settings.type]
+ format = "tar.gz"
+ extension = ".tar.gz"
+
+[release_settings]
+ name = "${HUGORELEASER_TAG}"
+ type = "github"
+ repository = "hugo"
+ repository_owner = "gohugoio"
+ draft = true
+ prerelease = false
+
+ [release_settings.release_notes_settings]
+ # Use Hugoreleaser's autogenerated release notes.
+ generate = true
+
+ # Collapse releases with < 10 changes below one title.
+ short_threshold = 10
+ short_title = "What's Changed"
+
+ groups = [
+ # Group the changes in the release notes by title.
+ # You need at least one.
+ # The groups will be tested in order until a match is found.
+ # The titles will so be listed in the given order in the release note.
+ # Any match with ignore=true title will be dropped.
+ { regexp = "Merge commit|Squashed|releaser:", ignore = true },
+ { title = "Note", regexp = "(note|deprecated)", ordinal = 10 },
+ { title = "Bug fixes", regexp = "fix", ordinal = 15 },
+ { title = "Dependency Updates", regexp = "deps", ordinal = 30 },
+ { title = "Build Setup", regexp = "(snap|release|update to)", ordinal = 40 },
+ { title = "Documentation", regexp = "(doc|readme)", ordinal = 40 },
+ { title = "Improvements", regexp = ".*", ordinal = 20 },
+ ]
+
+[[builds]]
+ path = "container1/unix/regular"
+
+ [[builds.os]]
+ goos = "darwin"
+ [[builds.os.archs]]
+ goarch = "universal"
+ [[builds.os]]
+ goos = "linux"
+ [[builds.os.archs]]
+ goarch = "amd64"
+ [[builds.os.archs]]
+ goarch = "arm64"
+ [[builds.os.archs]]
+ goarch = "arm"
+ [builds.os.archs.build_settings]
+ env = ["CGO_ENABLED=0", "GOARM=7"]
+
+ # Unix BSD variants
+ [[builds.os]]
+ goos = "dragonfly"
+ [[builds.os.archs]]
+ goarch = "amd64"
+ [[builds.os]]
+ goos = "freebsd"
+ [[builds.os.archs]]
+ goarch = "amd64"
+ [[builds.os]]
+ goos = "netbsd"
+ [[builds.os.archs]]
+ goarch = "amd64"
+ [[builds.os]]
+ goos = "openbsd"
+ [[builds.os.archs]]
+ goarch = "amd64"
+ [[builds.os]]
+ goos = "solaris"
+ [[builds.os.archs]]
+ goarch = "amd64"
+
+[[builds]]
+ path = "container1/unix/extended"
+
+ [builds.build_settings]
+ flags = ["-buildmode", "exe", "-tags", "extended"]
+ env = ["CGO_ENABLED=1"]
+
+ [[builds.os]]
+ goos = "darwin"
+ [builds.os.build_settings]
+ env = ["CGO_ENABLED=1", "CC=o64-clang", "CXX=o64-clang++"]
+ [[builds.os.archs]]
+ goarch = "universal"
+ [[builds.os]]
+ goos = "linux"
+ [[builds.os.archs]]
+ goarch = "amd64"
+
+[[builds]]
+ path = "container2/linux/extended"
+
+ [builds.build_settings]
+ flags = ["-buildmode", "exe", "-tags", "extended"]
+
+ [[builds.os]]
+ goos = "linux"
+ [builds.os.build_settings]
+ env = [
+ "CGO_ENABLED=1",
+ "CC=aarch64-linux-gnu-gcc",
+ "CXX=aarch64-linux-gnu-g++",
+ ]
+ [[builds.os.archs]]
+ goarch = "arm64"
+
+[[builds]]
+ path = "container1/windows/regular"
+
+ [[builds.os]]
+ goos = "windows"
+ [builds.os.build_settings]
+ binary = "hugo.exe"
+ [[builds.os.archs]]
+ goarch = "amd64"
+ [[builds.os.archs]]
+ goarch = "arm64"
+
+[[builds]]
+ path = "container1/windows/extended"
+
+ [builds.build_settings]
+ flags = ["-buildmode", "exe", "-tags", "extended"]
+ env = [
+ "CGO_ENABLED=1",
+ "CC=x86_64-w64-mingw32-gcc",
+ "CXX=x86_64-w64-mingw32-g++",
+ ]
+ ldflags = "-s -w -X github.com/gohugoio/hugo/common/hugo.vendorInfo=gohugoio -extldflags '-static'"
+
+ [[builds.os]]
+ goos = "windows"
+ [builds.os.build_settings]
+ binary = "hugo.exe"
+ [[builds.os.archs]]
+ goarch = "amd64"
+
+[[archives]]
+ paths = ["builds/container1/unix/regular/**"]
+[[archives]]
+ paths = ["builds/container1/unix/extended/**"]
+ [archives.archive_settings]
+ name_template = "{{ .Project }}_extended_{{ .Tag | trimPrefix `v` }}_{{ .Goos }}-{{ .Goarch }}"
+[[archives]]
+ # Only extended builds in container2.
+ paths = ["builds/container2/**"]
+ [archives.archive_settings]
+ name_template = "{{ .Project }}_extended_{{ .Tag | trimPrefix `v` }}_{{ .Goos }}-{{ .Goarch }}"
+[[archives]]
+ paths = ["builds/**/windows/regular/**"]
+ [archives.archive_settings.type]
+ format = "zip"
+ extension = ".zip"
+[[archives]]
+ paths = ["builds/**/windows/extended/**"]
+ [archives.archive_settings]
+ name_template = "{{ .Project }}_extended_{{ .Tag | trimPrefix `v` }}_{{ .Goos }}-{{ .Goarch }}"
+ [archives.archive_settings.type]
+ format = "zip"
+ extension = ".zip"
+[[archives]]
+ paths = ["builds/**/regular/linux/{arm64,amd64}"]
+ [archives.archive_settings]
+ binary_dir = "/usr/local/bin"
+ extra_files = []
+ [archives.archive_settings.type]
+ format = "_plugin"
+ extension = ".deb"
+ [archives.archive_settings.plugin]
+ id = "deb"
+ type = "gorun"
+ command = "github.com/gohugoio/hugoreleaser-archive-plugins/deb@v0.6.1"
+ [archives.archive_settings.custom_settings]
+ vendor = "gohugo.io"
+ homepage = "https://github.com/gohugoio/hugo"
+ maintainer = "Bjørn Erik Pedersen "
+ description = "A fast and flexible Static Site Generator written in Go."
+ license = "Apache-2.0"
+[[archives]]
+ paths = ["builds/**/extended/linux/{arm64,amd64}"]
+ [archives.archive_settings]
+ binary_dir = "/usr/local/bin"
+ extra_files = []
+ name_template = "{{ .Project }}_extended_{{ .Tag | trimPrefix `v` }}_{{ .Goos }}-{{ .Goarch }}"
+ [archives.archive_settings.type]
+ format = "_plugin"
+ extension = ".deb"
+ [archives.archive_settings.plugin]
+ id = "deb"
+ type = "gorun"
+ command = "github.com/gohugoio/hugoreleaser-archive-plugins/deb@latest"
+ [archives.archive_settings.custom_settings]
+ vendor = "gohugo.io"
+ homepage = "https://github.com/gohugoio/hugo"
+ maintainer = "Bjørn Erik Pedersen "
+ description = "A fast and flexible Static Site Generator written in Go."
+ license = "Apache-2.0"
+
+[[releases]]
+ paths = ["archives/**"]
+ path = "r1"
+
+ # The above should allow the following build commands:
+ # hugoreleaser build -paths "builds/container1/**"
+ # hugoreleaser build -paths "builds/container2/**"
+ # hugoreleaser archive
+ # hugoreleaser release
diff --git a/hugoreleaser.yaml b/hugoreleaser.yaml
deleted file mode 100644
index 368bc898f..000000000
--- a/hugoreleaser.yaml
+++ /dev/null
@@ -1,272 +0,0 @@
-project: hugo
-
-# Common definitions.
-definitions:
- archive_type_zip: &archive_type_zip
- type:
- format: zip
- extension: .zip
- env_extended_linux: &env_extended_linux
- - CGO_ENABLED=1
- - CC=aarch64-linux-gnu-gcc
- - CXX=aarch64-linux-gnu-g++
- env_extended_windows: &env_extended_windows
- - CGO_ENABLED=1
- - CC=x86_64-w64-mingw32-gcc
- - CXX=x86_64-w64-mingw32-g++
- env_extended_darwin: &env_extended_darwin
- - CGO_ENABLED=1
- - CC=o64-clang
- - CXX=o64-clang++
- name_template_extended_withdeploy: &name_template_extended_withdeploy "{{ .Project }}_extended_withdeploy_{{ .Tag | trimPrefix `v` }}_{{ .Goos }}-{{ .Goarch }}"
- name_template_extended: &name_template_extended "{{ .Project }}_extended_{{ .Tag | trimPrefix `v` }}_{{ .Goos }}-{{ .Goarch }}"
- archive_deb: &archive_deb
- binary_dir: /usr/local/bin
- extra_files: []
- type:
- format: _plugin
- extension: .deb
- plugin:
- id: deb
- type: gorun
- command: github.com/gohugoio/hugoreleaser-archive-plugins/deb@latest
- custom_settings:
- vendor: gohugo.io
- homepage: https://github.com/gohugoio/hugo
- maintainer: Bjørn Erik Pedersen
- description: A fast and flexible Static Site Generator written in Go.
- license: Apache-2.0
-archive_alias_replacements:
- linux-amd64.tar.gz: Linux-64bit.tar.gz
-go_settings:
- go_proxy: https://proxy.golang.org
- go_exe: go
-build_settings:
- binary: hugo
- flags:
- - -buildmode
- - exe
- env:
- - CGO_ENABLED=0
- ldflags: -s -w -X github.com/gohugoio/hugo/common/hugo.vendorInfo=gohugoio
-archive_settings:
- name_template: "{{ .Project }}_{{ .Tag | trimPrefix `v` }}_{{ .Goos }}-{{ .Goarch }}"
- extra_files:
- - source_path: README.md
- target_path: README.md
- - source_path: LICENSE
- target_path: LICENSE
- type:
- format: tar.gz
- extension: .tar.gz
-release_settings:
- name: ${HUGORELEASER_TAG}
- type: github
- repository: hugo
- repository_owner: gohugoio
- draft: true
- prerelease: false
- release_notes_settings:
- generate: true
- short_threshold: 10
- short_title: What's Changed
- groups:
- - regexp: "Merge commit|Squashed|releaser:"
- ignore: true
- - title: Note
- regexp: (note|deprecated)
- ordinal: 10
- - title: Bug fixes
- regexp: fix
- ordinal: 15
- - title: Dependency Updates
- regexp: deps
- ordinal: 30
- - title: Build Setup
- regexp: (snap|release|update to)
- ordinal: 40
- - title: Documentation
- regexp: (doc|readme)
- ordinal: 40
- - title: Improvements
- regexp: .*
- ordinal: 20
-builds:
- - path: container1/unix/regular
- os:
- - goos: darwin
- archs:
- - goarch: universal
- - goos: linux
- archs:
- - goarch: amd64
- - goarch: arm64
- - goarch: arm
- build_settings:
- env:
- - CGO_ENABLED=0
- - GOARM=7
- - goos: dragonfly
- archs:
- - goarch: amd64
- - goos: freebsd
- archs:
- - goarch: amd64
- - goos: netbsd
- archs:
- - goarch: amd64
- - goos: openbsd
- archs:
- - goarch: amd64
- - goos: solaris
- archs:
- - goarch: amd64
- - path: container1/unix/extended
- build_settings:
- flags:
- - -buildmode
- - exe
- - -tags
- - extended
- env:
- - CGO_ENABLED=1
- os:
- - goos: darwin
- build_settings:
- env: *env_extended_darwin
- archs:
- - goarch: universal
- - goos: linux
- archs:
- - goarch: amd64
- - path: container1/unix/extended-withdeploy
- build_settings:
- flags:
- - -buildmode
- - exe
- - -tags
- - extended,withdeploy
- env:
- - CGO_ENABLED=1
- os:
- - goos: darwin
- build_settings:
- env: *env_extended_darwin
- archs:
- - goarch: universal
- - goos: linux
- archs:
- - goarch: amd64
- - path: container2/linux/extended
- build_settings:
- flags:
- - -buildmode
- - exe
- - -tags
- - extended
- os:
- - goos: linux
- build_settings:
- env: *env_extended_linux
- archs:
- - goarch: arm64
- - path: container2/linux/extended-withdeploy
- build_settings:
- flags:
- - -buildmode
- - exe
- - -tags
- - extended,withdeploy
- os:
- - goos: linux
- build_settings:
- env: *env_extended_linux
- archs:
- - goarch: arm64
- - path: container1/windows/regular
- os:
- - goos: windows
- build_settings:
- binary: hugo.exe
- archs:
- - goarch: amd64
- - goarch: arm64
- - path: container1/windows/extended
- build_settings:
- flags:
- - -buildmode
- - exe
- - -tags
- - extended
- env: *env_extended_windows
- ldflags: -s -w -X github.com/gohugoio/hugo/common/hugo.vendorInfo=gohugoio -extldflags '-static'
- os:
- - goos: windows
- build_settings:
- binary: hugo.exe
- archs:
- - goarch: amd64
- - path: container1/windows/extended-withdeploy
- build_settings:
- flags:
- - -buildmode
- - exe
- - -tags
- - extended,withdeploy
- env: *env_extended_windows
- ldflags: -s -w -X github.com/gohugoio/hugo/common/hugo.vendorInfo=gohugoio -extldflags '-static'
- os:
- - goos: windows
- build_settings:
- binary: hugo.exe
- archs:
- - goarch: amd64
-archives:
- - paths:
- - builds/container1/unix/regular/**
- - paths:
- - builds/container1/unix/extended/**
- archive_settings:
- name_template: *name_template_extended
- - paths:
- - builds/container1/unix/extended-withdeploy/**
- archive_settings:
- name_template: *name_template_extended_withdeploy
- - paths:
- - builds/container2/*/extended/**
- archive_settings:
- name_template: *name_template_extended
- - paths:
- - builds/container2/*/extended-withdeploy/**
- archive_settings:
- name_template: *name_template_extended_withdeploy
- - paths:
- - builds/**/windows/regular/**
- archive_settings: *archive_type_zip
- - paths:
- - builds/**/windows/extended/**
- archive_settings:
- name_template: *name_template_extended
- <<: *archive_type_zip
- - paths:
- - builds/**/windows/extended-withdeploy/**
- archive_settings:
- name_template: *name_template_extended_withdeploy
- <<: *archive_type_zip
- - paths:
- - builds/**/regular/linux/{arm64,amd64}
- archive_settings: *archive_deb
- - paths:
- - builds/**/extended/linux/{arm64,amd64}
- archive_settings:
- name_template: *name_template_extended
- <<: *archive_deb
- - paths:
- - builds/**/extended-withdeploy/linux/{arm64,amd64}
- archive_settings:
- name_template: *name_template_extended_withdeploy
- <<: *archive_deb
-releases:
- - paths:
- - archives/**
- path: r1
diff --git a/identity/finder.go b/identity/finder.go
index 9d9f9d138..91fac7237 100644
--- a/identity/finder.go
+++ b/identity/finder.go
@@ -27,7 +27,7 @@ func NewFinder(cfg FinderConfig) *Finder {
}
var searchIDPool = sync.Pool{
- New: func() any {
+ New: func() interface{} {
return &searchID{seen: make(map[Manager]bool)}
},
}
@@ -45,7 +45,9 @@ func putSearchID(sid *searchID) {
sid.dp = nil
sid.peq = nil
sid.eqer = nil
- clear(sid.seen)
+ for k := range sid.seen {
+ delete(sid.seen, k)
+ }
searchIDPool.Put(sid)
}
@@ -120,21 +122,17 @@ func (f *Finder) Contains(id, in Identity, maxDepth int) FinderResult {
defer putSearchID(sid)
- r := FinderNotFound
- if i := f.checkOne(sid, in, 0); i > r {
- r = i
- }
- if r == FinderFound {
+ if r := f.checkOne(sid, in, 0); r > 0 {
return r
}
m := GetDependencyManager(in)
if m != nil {
- if i := f.checkManager(sid, m, 0); i > r {
- r = i
+ if r := f.checkManager(sid, m, 0); r > 0 {
+ return r
}
}
- return r
+ return FinderNotFound
}
func (f *Finder) checkMaxDepth(sid *searchID, level int) FinderResult {
@@ -281,18 +279,15 @@ func (f *Finder) search(sid *searchID, m Manager, depth int) FinderResult {
var r FinderResult
m.forEeachIdentity(
func(v Identity) bool {
- i := f.checkOne(sid, v, depth)
- if i > r {
- r = i
+ if r > 0 {
+ panic("should be terminated")
}
- if r == FinderFound {
+ r = f.checkOne(sid, v, depth)
+ if r > 0 {
return true
}
m := GetDependencyManager(v)
- if i := f.checkManager(sid, m, depth+1); i > r {
- r = i
- }
- if r == FinderFound {
+ if r = f.checkManager(sid, m, depth+1); r > 0 {
return true
}
return false
diff --git a/identity/identity.go b/identity/identity.go
index c78ed0fdd..f924f335c 100644
--- a/identity/identity.go
+++ b/identity/identity.go
@@ -33,9 +33,6 @@ const (
// GenghisKhan is an Identity everyone relates to.
GenghisKhan = StringIdentity("__genghiskhan")
-
- StructuralChangeAdd = StringIdentity("__structural_change_add")
- StructuralChangeRemove = StringIdentity("__structural_change_remove")
)
var NopManager = new(nopManager)
@@ -85,8 +82,9 @@ func FirstIdentity(v any) Identity {
var result Identity = Anonymous
WalkIdentitiesShallow(v, func(level int, id Identity) bool {
result = id
- return result != Anonymous
+ return true
})
+
return result
}
@@ -148,7 +146,6 @@ func (d DependencyManagerProviderFunc) GetDependencyManager() Manager {
// DependencyManagerScopedProvider provides a manager for dependencies with a given scope.
type DependencyManagerScopedProvider interface {
GetDependencyManagerForScope(scope int) Manager
- GetDependencyManagerForScopesAll() []Manager
}
// ForEeachIdentityProvider provides a way iterate over identities.
@@ -244,11 +241,6 @@ type IdentityProvider interface {
GetIdentity() Identity
}
-// SignalRebuilder is an optional interface for types that can signal a rebuild.
-type SignalRebuilder interface {
- SignalRebuild(ids ...Identity)
-}
-
// IncrementByOne implements Incrementer adding 1 every time Incr is called.
type IncrementByOne struct {
counter uint64
@@ -311,13 +303,11 @@ type identityManager struct {
func (im *identityManager) AddIdentity(ids ...Identity) {
im.mu.Lock()
- defer im.mu.Unlock()
for _, id := range ids {
if id == nil || id == Anonymous {
continue
}
-
if _, found := im.ids[id]; !found {
if im.onAddIdentity != nil {
im.onAddIdentity(id)
@@ -325,6 +315,7 @@ func (im *identityManager) AddIdentity(ids ...Identity) {
im.ids[id] = true
}
}
+ im.mu.Unlock()
}
func (im *identityManager) AddIdentityForEach(ids ...ForEeachIdentityProvider) {
@@ -359,10 +350,6 @@ func (im *identityManager) GetDependencyManagerForScope(int) Manager {
return im
}
-func (im *identityManager) GetDependencyManagerForScopesAll() []Manager {
- return []Manager{im}
-}
-
func (im *identityManager) String() string {
return fmt.Sprintf("IdentityManager(%s)", im.name)
}
@@ -509,10 +496,6 @@ func probablyEq(a, b Identity) bool {
return true
}
- if a2, ok := a.(compare.ProbablyEqer); ok && a2.ProbablyEq(b) {
- return true
- }
-
if a2, ok := a.(IsProbablyDependentProvider); ok {
return a2.IsProbablyDependent(b)
}
diff --git a/identity/identity_test.go b/identity/identity_test.go
index f9b04aa14..d003caaf0 100644
--- a/identity/identity_test.go
+++ b/identity/identity_test.go
@@ -25,7 +25,7 @@ import (
func BenchmarkIdentityManager(b *testing.B) {
createIds := func(num int) []identity.Identity {
ids := make([]identity.Identity, num)
- for i := range num {
+ for i := 0; i < num; i++ {
name := fmt.Sprintf("id%d", i)
ids[i] = &testIdentity{base: name, name: name}
}
@@ -108,10 +108,10 @@ func BenchmarkIsNotDependent(b *testing.B) {
newNestedManager := func(depth, count int) identity.Manager {
m1 := identity.NewManager("")
- for range depth {
+ for i := 0; i < depth; i++ {
m2 := identity.NewManager("")
m1.AddIdentity(m2)
- for j := range count {
+ for j := 0; j < count; j++ {
id := fmt.Sprintf("id%d", j)
m2.AddIdentity(&testIdentity{id, id, "", ""})
}
diff --git a/identity/identityhash.go b/identity/identityhash.go
new file mode 100644
index 000000000..8760ff64d
--- /dev/null
+++ b/identity/identityhash.go
@@ -0,0 +1,69 @@
+// Copyright 2024 The Hugo Authors. All rights reserved.
+//
+// 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.
+
+package identity
+
+import (
+ "strconv"
+
+ "github.com/mitchellh/hashstructure"
+)
+
+// HashString returns a hash from the given elements.
+// It will panic if the hash cannot be calculated.
+// Note that this hash should be used primarily for identity, not for change detection as
+// it in the more complex values (e.g. Page) will not hash the full content.
+func HashString(vs ...any) string {
+ hash := HashUint64(vs...)
+ return strconv.FormatUint(hash, 10)
+}
+
+// HashUint64 returns a hash from the given elements.
+// It will panic if the hash cannot be calculated.
+// Note that this hash should be used primarily for identity, not for change detection as
+// it in the more complex values (e.g. Page) will not hash the full content.
+func HashUint64(vs ...any) uint64 {
+ var o any
+ if len(vs) == 1 {
+ o = toHashable(vs[0])
+ } else {
+ elements := make([]any, len(vs))
+ for i, e := range vs {
+ elements[i] = toHashable(e)
+ }
+ o = elements
+ }
+
+ hash, err := hashstructure.Hash(o, nil)
+ if err != nil {
+ panic(err)
+ }
+ return hash
+}
+
+type keyer interface {
+ Key() string
+}
+
+// For structs, hashstructure.Hash only works on the exported fields,
+// so rewrite the input slice for known identity types.
+func toHashable(v any) any {
+ switch t := v.(type) {
+ case keyer:
+ return t.Key()
+ case IdentityProvider:
+ return t.GetIdentity()
+ default:
+ return v
+ }
+}
diff --git a/resources/resource_test.go b/identity/identityhash_test.go
similarity index 55%
rename from resources/resource_test.go
rename to identity/identityhash_test.go
index d07770456..1ecaf7612 100644
--- a/resources/resource_test.go
+++ b/identity/identityhash_test.go
@@ -11,44 +11,34 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package resources
+package identity
import (
- "os"
"testing"
qt "github.com/frankban/quicktest"
)
-func TestAtomicStaler(t *testing.T) {
+func TestHashString(t *testing.T) {
c := qt.New(t)
- type test struct {
- AtomicStaler
- }
+ c.Assert(HashString("a", "b"), qt.Equals, "2712570657419664240")
+ c.Assert(HashString("ab"), qt.Equals, "590647783936702392")
- var v test
+ var vals []any = []any{"a", "b", tstKeyer{"c"}}
- c.Assert(v.StaleVersion(), qt.Equals, uint32(0))
- v.MarkStale()
- c.Assert(v.StaleVersion(), qt.Equals, uint32(1))
- v.MarkStale()
- c.Assert(v.StaleVersion(), qt.Equals, uint32(2))
+ c.Assert(HashString(vals...), qt.Equals, "12599484872364427450")
+ c.Assert(vals[2], qt.Equals, tstKeyer{"c"})
}
-func BenchmarkHashImage(b *testing.B) {
- f, err := os.Open("testdata/sunset.jpg")
- if err != nil {
- b.Fatal(err)
- }
- defer f.Close()
-
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- _, _, err := hashImage(f)
- if err != nil {
- b.Fatal(err)
- }
- f.Seek(0, 0)
- }
+type tstKeyer struct {
+ key string
+}
+
+func (t tstKeyer) Key() string {
+ return t.key
+}
+
+func (t tstKeyer) String() string {
+ return "key: " + t.key
}
diff --git a/internal/js/api.go b/internal/js/api.go
deleted file mode 100644
index 30180dece..000000000
--- a/internal/js/api.go
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright 2024 The Hugo Authors. All rights reserved.
-//
-// 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.
-
-package js
-
-import (
- "context"
-
- "github.com/gohugoio/hugo/common/maps"
- "github.com/gohugoio/hugo/resources/resource"
-)
-
-// BatcherClient is used to do JS batch operations.
-type BatcherClient interface {
- New(id string) (Batcher, error)
- Store() *maps.Cache[string, Batcher]
-}
-
-// BatchPackage holds a group of JavaScript resources.
-type BatchPackage interface {
- Groups() map[string]resource.Resources
-}
-
-// Batcher is used to build JavaScript packages.
-type Batcher interface {
- Build(context.Context) (BatchPackage, error)
- Config(ctx context.Context) OptionsSetter
- Group(ctx context.Context, id string) BatcherGroup
-}
-
-// BatcherGroup is a group of scripts and instances.
-type BatcherGroup interface {
- Instance(sid, iid string) OptionsSetter
- Runner(id string) OptionsSetter
- Script(id string) OptionsSetter
-}
-
-// OptionsSetter is used to set options for a batch, script or instance.
-type OptionsSetter interface {
- SetOptions(map[string]any) string
-}
diff --git a/internal/js/esbuild/batch-esm-runner.gotmpl b/internal/js/esbuild/batch-esm-runner.gotmpl
deleted file mode 100644
index 3193b4c30..000000000
--- a/internal/js/esbuild/batch-esm-runner.gotmpl
+++ /dev/null
@@ -1,20 +0,0 @@
-{{ range $i, $e := .Scripts -}}
- {{ if eq .Export "*" }}
- {{- printf "import %s as Script%d from %q;" .Export $i .Import -}}
- {{ else -}}
- {{- printf "import { %s as Script%d } from %q;" .Export $i .Import -}}
- {{ end -}}
-{{ end -}}
-{{ range $i, $e := .Runners }}
- {{- printf "import { %s as Run%d } from %q;" .Export $i .Import -}}
-{{ end -}}
-{{ if .Runners -}}
- let group = { id: "{{ $.ID }}", scripts: [] }
- {{ range $i, $e := .Scripts -}}
- group.scripts.push({{ .RunnerJSON $i }});
- {{ end -}}
- {{ range $i, $e := .Runners -}}
- {{ $id := printf "Run%d" $i }}
- {{ $id }}(group);
- {{ end -}}
-{{ end -}}
diff --git a/internal/js/esbuild/batch.go b/internal/js/esbuild/batch.go
deleted file mode 100644
index aa50cf2c1..000000000
--- a/internal/js/esbuild/batch.go
+++ /dev/null
@@ -1,1444 +0,0 @@
-// Copyright 2024 The Hugo Authors. All rights reserved.
-//
-// 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.
-
-// Package esbuild provides functions for building JavaScript resources.
-package esbuild
-
-import (
- "bytes"
- "context"
- _ "embed"
- "encoding/json"
- "fmt"
- "io"
- "path"
- "path/filepath"
- "reflect"
- "sort"
- "strings"
- "sync"
- "sync/atomic"
-
- "github.com/evanw/esbuild/pkg/api"
- "github.com/gohugoio/hugo/cache/dynacache"
- "github.com/gohugoio/hugo/common/hugio"
- "github.com/gohugoio/hugo/common/maps"
- "github.com/gohugoio/hugo/common/paths"
- "github.com/gohugoio/hugo/deps"
- "github.com/gohugoio/hugo/helpers"
- "github.com/gohugoio/hugo/identity"
- "github.com/gohugoio/hugo/internal/js"
- "github.com/gohugoio/hugo/lazy"
- "github.com/gohugoio/hugo/media"
- "github.com/gohugoio/hugo/resources"
- "github.com/gohugoio/hugo/resources/resource"
- "github.com/gohugoio/hugo/resources/resource_factories/create"
- "github.com/gohugoio/hugo/tpl/tplimpl"
- "github.com/mitchellh/mapstructure"
- "github.com/spf13/cast"
-)
-
-var _ js.Batcher = (*batcher)(nil)
-
-const (
- NsBatch = "_hugo-js-batch"
-
- propsKeyImportContext = "importContext"
- propsResoure = "resource"
-)
-
-//go:embed batch-esm-runner.gotmpl
-var runnerTemplateStr string
-
-var _ js.BatchPackage = (*Package)(nil)
-
-var _ buildToucher = (*optsHolder[scriptOptions])(nil)
-
-var (
- _ buildToucher = (*scriptGroup)(nil)
- _ isBuiltOrTouchedProvider = (*scriptGroup)(nil)
-)
-
-func NewBatcherClient(deps *deps.Deps) (js.BatcherClient, error) {
- c := &BatcherClient{
- d: deps,
- buildClient: NewBuildClient(deps.BaseFs.Assets, deps.ResourceSpec),
- createClient: create.New(deps.ResourceSpec),
- batcherStore: maps.NewCache[string, js.Batcher](),
- bundlesStore: maps.NewCache[string, js.BatchPackage](),
- }
-
- deps.BuildEndListeners.Add(func(...any) bool {
- c.bundlesStore.Reset()
- return false
- })
-
- return c, nil
-}
-
-func (o optionsMap[K, C]) ByKey() optionsGetSetters[K, C] {
- var values []optionsGetSetter[K, C]
- for _, v := range o {
- values = append(values, v)
- }
-
- sort.Slice(values, func(i, j int) bool {
- return values[i].Key().String() < values[j].Key().String()
- })
-
- return values
-}
-
-func (o *opts[K, C]) Compiled() C {
- o.h.checkCompileErr()
- return o.h.compiled
-}
-
-func (os optionsGetSetters[K, C]) Filter(predicate func(K) bool) optionsGetSetters[K, C] {
- var a optionsGetSetters[K, C]
- for _, v := range os {
- if predicate(v.Key()) {
- a = append(a, v)
- }
- }
- return a
-}
-
-func (o *optsHolder[C]) IdentifierBase() string {
- return o.optionsID
-}
-
-func (o *opts[K, C]) Key() K {
- return o.key
-}
-
-func (o *opts[K, C]) Reset() {
- mu := o.once.ResetWithLock()
- defer mu.Unlock()
- o.h.resetCounter++
-}
-
-func (o *opts[K, C]) Get(id uint32) js.OptionsSetter {
- var b *optsHolder[C]
- o.once.Do(func() {
- b = o.h
- b.setBuilt(id)
- })
- return b
-}
-
-func (o *opts[K, C]) GetIdentity() identity.Identity {
- return o.h
-}
-
-func (o *optsHolder[C]) SetOptions(m map[string]any) string {
- o.optsSetCounter++
- o.optsPrev = o.optsCurr
- o.optsCurr = m
- o.compiledPrev = o.compiled
- o.compiled, o.compileErr = o.compiled.compileOptions(m, o.defaults)
- o.checkCompileErr()
- return ""
-}
-
-// ValidateBatchID validates the given ID according to some very
-func ValidateBatchID(id string, isTopLevel bool) error {
- if id == "" {
- return fmt.Errorf("id must be set")
- }
- // No Windows slashes.
- if strings.Contains(id, "\\") {
- return fmt.Errorf("id must not contain backslashes")
- }
-
- // Allow forward slashes in top level IDs only.
- if !isTopLevel && strings.Contains(id, "/") {
- return fmt.Errorf("id must not contain forward slashes")
- }
-
- return nil
-}
-
-func newIsBuiltOrTouched() isBuiltOrTouched {
- return isBuiltOrTouched{
- built: make(buildIDs),
- touched: make(buildIDs),
- }
-}
-
-func newOpts[K any, C optionsCompiler[C]](key K, optionsID string, defaults defaultOptionValues) *opts[K, C] {
- return &opts[K, C]{
- key: key,
- h: &optsHolder[C]{
- optionsID: optionsID,
- defaults: defaults,
- isBuiltOrTouched: newIsBuiltOrTouched(),
- },
- }
-}
-
-// BatcherClient is a client for building JavaScript packages.
-type BatcherClient struct {
- d *deps.Deps
-
- once sync.Once
- runnerTemplate *tplimpl.TemplInfo
-
- createClient *create.Client
- buildClient *BuildClient
-
- batcherStore *maps.Cache[string, js.Batcher]
- bundlesStore *maps.Cache[string, js.BatchPackage]
-}
-
-// New creates a new Batcher with the given ID.
-// This will be typically created once and reused across rebuilds.
-func (c *BatcherClient) New(id string) (js.Batcher, error) {
- var initErr error
- c.once.Do(func() {
- // We should fix the initialization order here (or use the Go template package directly), but we need to wait
- // for the Hugo templates to be ready.
- tmpl, err := c.d.TemplateStore.TextParse("batch-esm-runner", runnerTemplateStr)
- if err != nil {
- initErr = err
- return
- }
- c.runnerTemplate = tmpl
- })
-
- if initErr != nil {
- return nil, initErr
- }
-
- dependencyManager := c.d.Conf.NewIdentityManager("jsbatch_" + id)
- configID := "config_" + id
-
- b := &batcher{
- id: id,
- scriptGroups: make(map[string]*scriptGroup),
- dependencyManager: dependencyManager,
- client: c,
- configOptions: newOpts[scriptID, configOptions](
- scriptID(configID),
- configID,
- defaultOptionValues{},
- ),
- }
-
- c.d.BuildEndListeners.Add(func(...any) bool {
- b.reset()
- return false
- })
-
- idFinder := identity.NewFinder(identity.FinderConfig{})
-
- c.d.OnChangeListeners.Add(func(ids ...identity.Identity) bool {
- for _, id := range ids {
- if r := idFinder.Contains(id, b.dependencyManager, 50); r > 0 {
- b.staleVersion.Add(1)
- return false
- }
-
- sp, ok := id.(identity.DependencyManagerScopedProvider)
- if !ok {
- continue
- }
- idms := sp.GetDependencyManagerForScopesAll()
-
- for _, g := range b.scriptGroups {
- g.forEachIdentity(func(id2 identity.Identity) bool {
- bt, ok := id2.(buildToucher)
- if !ok {
- return false
- }
- for _, id3 := range idms {
- // This handles the removal of the only source for a script group (e.g. all shortcodes in a contnt page).
- // Note the very shallow search.
- if r := idFinder.Contains(id2, id3, 0); r > 0 {
- bt.setTouched(b.buildCount)
- return false
- }
- }
- return false
- })
- }
- }
-
- return false
- })
-
- return b, nil
-}
-
-func (c *BatcherClient) Store() *maps.Cache[string, js.Batcher] {
- return c.batcherStore
-}
-
-func (c *BatcherClient) buildBatchGroup(ctx context.Context, t *batchGroupTemplateContext) (resource.Resource, string, error) {
- var buf bytes.Buffer
-
- if err := c.d.GetTemplateStore().ExecuteWithContext(ctx, c.runnerTemplate, &buf, t); err != nil {
- return nil, "", err
- }
-
- s := paths.AddLeadingSlash(t.keyPath + ".js")
- r, err := c.createClient.FromString(s, buf.String())
- if err != nil {
- return nil, "", err
- }
-
- return r, s, nil
-}
-
-// Package holds a group of JavaScript resources.
-type Package struct {
- id string
- b *batcher
-
- groups map[string]resource.Resources
-}
-
-func (p *Package) Groups() map[string]resource.Resources {
- return p.groups
-}
-
-type batchGroupTemplateContext struct {
- keyPath string
- ID string
- Runners []scriptRunnerTemplateContext
- Scripts []scriptBatchTemplateContext
-}
-
-type batcher struct {
- mu sync.Mutex
- id string
- buildCount uint32
- staleVersion atomic.Uint32
- scriptGroups scriptGroups
-
- client *BatcherClient
- dependencyManager identity.Manager
-
- configOptions optionsGetSetter[scriptID, configOptions]
-
- // The last successfully built package.
- // If this is non-nil and not stale, we can reuse it (e.g. on server rebuilds)
- prevBuild *Package
-}
-
-// Build builds the batch if not already built or if it's stale.
-func (b *batcher) Build(ctx context.Context) (js.BatchPackage, error) {
- key := dynacache.CleanKey(b.id + ".js")
- p, err := b.client.bundlesStore.GetOrCreate(key, func() (js.BatchPackage, error) {
- return b.build(ctx)
- })
- if err != nil {
- return nil, fmt.Errorf("failed to build JS batch %q: %w", b.id, err)
- }
- return p, nil
-}
-
-func (b *batcher) Config(ctx context.Context) js.OptionsSetter {
- return b.configOptions.Get(b.buildCount)
-}
-
-func (b *batcher) Group(ctx context.Context, id string) js.BatcherGroup {
- if err := ValidateBatchID(id, false); err != nil {
- panic(err)
- }
-
- b.mu.Lock()
- defer b.mu.Unlock()
-
- group, found := b.scriptGroups[id]
- if !found {
- idm := b.client.d.Conf.NewIdentityManager("jsbatch_" + id)
- b.dependencyManager.AddIdentity(idm)
-
- group = &scriptGroup{
- id: id, b: b,
- isBuiltOrTouched: newIsBuiltOrTouched(),
- dependencyManager: idm,
- scriptsOptions: make(optionsMap[scriptID, scriptOptions]),
- instancesOptions: make(optionsMap[instanceID, paramsOptions]),
- runnersOptions: make(optionsMap[scriptID, scriptOptions]),
- }
- b.scriptGroups[id] = group
- }
-
- group.setBuilt(b.buildCount)
-
- return group
-}
-
-func (b *batcher) isStale() bool {
- if b.staleVersion.Load() > 0 {
- return true
- }
-
- if b.removeNotSet() {
- return true
- }
-
- if b.configOptions.isStale() {
- return true
- }
-
- for _, v := range b.scriptGroups {
- if v.isStale() {
- return true
- }
- }
-
- return false
-}
-
-func (b *batcher) build(ctx context.Context) (js.BatchPackage, error) {
- b.mu.Lock()
- defer b.mu.Unlock()
- defer func() {
- b.staleVersion.Store(0)
- b.buildCount++
- }()
-
- if b.prevBuild != nil {
- if !b.isStale() {
- return b.prevBuild, nil
- }
- }
-
- p, err := b.doBuild(ctx)
- if err != nil {
- return nil, err
- }
-
- b.prevBuild = p
-
- return p, nil
-}
-
-func (b *batcher) doBuild(ctx context.Context) (*Package, error) {
- type importContext struct {
- name string
- resourceGetter resource.ResourceGetter
- scriptOptions scriptOptions
- dm identity.Manager
- }
-
- state := struct {
- importResource *maps.Cache[string, resource.Resource]
- resultResource *maps.Cache[string, resource.Resource]
- importerImportContext *maps.Cache[string, importContext]
- pathGroup *maps.Cache[string, string]
- }{
- importResource: maps.NewCache[string, resource.Resource](),
- resultResource: maps.NewCache[string, resource.Resource](),
- importerImportContext: maps.NewCache[string, importContext](),
- pathGroup: maps.NewCache[string, string](),
- }
-
- multihostBasePaths := b.client.d.ResourceSpec.MultihostTargetBasePaths
-
- // Entry points passed to ESBuid.
- var entryPoints []string
- addResource := func(group, pth string, r resource.Resource, isResult bool) {
- state.pathGroup.Set(paths.TrimExt(pth), group)
- state.importResource.Set(pth, r)
- if isResult {
- state.resultResource.Set(pth, r)
- }
- entryPoints = append(entryPoints, pth)
- }
-
- for _, g := range b.scriptGroups.Sorted() {
- keyPath := g.id
-
- t := &batchGroupTemplateContext{
- keyPath: keyPath,
- ID: g.id,
- }
-
- instances := g.instancesOptions.ByKey()
-
- for _, vv := range g.scriptsOptions.ByKey() {
- keyPath := keyPath + "_" + vv.Key().String()
- opts := vv.Compiled()
- impPath := path.Join(PrefixHugoVirtual, opts.Dir(), keyPath+opts.Resource.MediaType().FirstSuffix.FullSuffix)
- impCtx := opts.ImportContext
-
- state.importerImportContext.Set(impPath, importContext{
- name: keyPath,
- resourceGetter: impCtx,
- scriptOptions: opts,
- dm: g.dependencyManager,
- })
-
- bt := scriptBatchTemplateContext{
- opts: vv,
- Import: impPath,
- Instances: []scriptInstanceBatchTemplateContext{},
- }
- state.importResource.Set(bt.Import, vv.Compiled().Resource)
- predicate := func(k instanceID) bool {
- return k.scriptID == vv.Key()
- }
- for _, vvv := range instances.Filter(predicate) {
- bt.Instances = append(bt.Instances, scriptInstanceBatchTemplateContext{opts: vvv})
- }
-
- t.Scripts = append(t.Scripts, bt)
- }
-
- for _, vv := range g.runnersOptions.ByKey() {
- runnerKeyPath := keyPath + "_" + vv.Key().String()
- runnerImpPath := paths.AddLeadingSlash(runnerKeyPath + "_runner" + vv.Compiled().Resource.MediaType().FirstSuffix.FullSuffix)
- t.Runners = append(t.Runners, scriptRunnerTemplateContext{opts: vv, Import: runnerImpPath})
- addResource(g.id, runnerImpPath, vv.Compiled().Resource, false)
- }
-
- r, s, err := b.client.buildBatchGroup(ctx, t)
- if err != nil {
- return nil, fmt.Errorf("failed to build JS batch: %w", err)
- }
-
- state.importerImportContext.Set(s, importContext{
- name: s,
- resourceGetter: nil,
- dm: g.dependencyManager,
- })
-
- addResource(g.id, s, r, true)
- }
-
- mediaTypes := b.client.d.ResourceSpec.MediaTypes()
-
- externalOptions := b.configOptions.Compiled().Options
- if externalOptions.Format == "" {
- externalOptions.Format = "esm"
- }
- if externalOptions.Format != "esm" {
- return nil, fmt.Errorf("only esm format is currently supported")
- }
-
- jsOpts := Options{
- ExternalOptions: externalOptions,
- InternalOptions: InternalOptions{
- DependencyManager: b.dependencyManager,
- Splitting: true,
- ImportOnResolveFunc: func(imp string, args api.OnResolveArgs) string {
- var importContextPath string
- if args.Kind == api.ResolveEntryPoint {
- importContextPath = args.Path
- } else {
- importContextPath = args.Importer
- }
- importContext, importContextFound := state.importerImportContext.Get(importContextPath)
-
- // We want to track the dependencies closest to where they're used.
- dm := b.dependencyManager
- if importContextFound {
- dm = importContext.dm
- }
-
- if r, found := state.importResource.Get(imp); found {
- dm.AddIdentity(identity.FirstIdentity(r))
- return imp
- }
-
- if importContext.resourceGetter != nil {
- resolved := ResolveResource(imp, importContext.resourceGetter)
- if resolved != nil {
- resolvePath := resources.InternalResourceTargetPath(resolved)
- dm.AddIdentity(identity.FirstIdentity(resolved))
- imp := PrefixHugoVirtual + resolvePath
- state.importResource.Set(imp, resolved)
- state.importerImportContext.Set(imp, importContext)
- return imp
-
- }
- }
- return ""
- },
- ImportOnLoadFunc: func(args api.OnLoadArgs) string {
- imp := args.Path
-
- if r, found := state.importResource.Get(imp); found {
- content, err := r.(resource.ContentProvider).Content(ctx)
- if err != nil {
- panic(err)
- }
- return cast.ToString(content)
- }
- return ""
- },
- ImportParamsOnLoadFunc: func(args api.OnLoadArgs) json.RawMessage {
- if importContext, found := state.importerImportContext.Get(args.Path); found {
- if !importContext.scriptOptions.IsZero() {
- return importContext.scriptOptions.Params
- }
- }
- return nil
- },
- ErrorMessageResolveFunc: func(args api.Message) *ErrorMessageResolved {
- if loc := args.Location; loc != nil {
- path := strings.TrimPrefix(loc.File, NsHugoImportResolveFunc+":")
- if r, found := state.importResource.Get(path); found {
- sourcePath := resources.InternalResourceSourcePathBestEffort(r)
-
- var contentr hugio.ReadSeekCloser
- if cp, ok := r.(hugio.ReadSeekCloserProvider); ok {
- contentr, _ = cp.ReadSeekCloser()
- }
- return &ErrorMessageResolved{
- Content: contentr,
- Path: sourcePath,
- Message: args.Text,
- }
-
- }
-
- }
- return nil
- },
- ResolveSourceMapSource: func(s string) string {
- if r, found := state.importResource.Get(s); found {
- if ss := resources.InternalResourceSourcePath(r); ss != "" {
- return ss
- }
- return PrefixHugoMemory + s
- }
- return ""
- },
- EntryPoints: entryPoints,
- },
- }
-
- result, err := b.client.buildClient.Build(jsOpts)
- if err != nil {
- return nil, fmt.Errorf("failed to build JS bundle: %w", err)
- }
-
- groups := make(map[string]resource.Resources)
-
- createAndAddResource := func(targetPath, group string, o api.OutputFile, mt media.Type) error {
- var sourceFilename string
- if r, found := state.importResource.Get(targetPath); found {
- sourceFilename = resources.InternalResourceSourcePathBestEffort(r)
- }
- targetPath = path.Join(b.id, targetPath)
-
- rd := resources.ResourceSourceDescriptor{
- LazyPublish: true,
- OpenReadSeekCloser: func() (hugio.ReadSeekCloser, error) {
- return hugio.NewReadSeekerNoOpCloserFromBytes(o.Contents), nil
- },
- MediaType: mt,
- TargetPath: targetPath,
- SourceFilenameOrPath: sourceFilename,
- }
- r, err := b.client.d.ResourceSpec.NewResource(rd)
- if err != nil {
- return err
- }
-
- groups[group] = append(groups[group], r)
-
- return nil
- }
-
- outDir := b.client.d.AbsPublishDir
-
- createAndAddResources := func(o api.OutputFile) (bool, error) {
- p := paths.ToSlashPreserveLeading(strings.TrimPrefix(o.Path, outDir))
- ext := path.Ext(p)
- mt, _, found := mediaTypes.GetBySuffix(ext)
- if !found {
- return false, nil
- }
-
- group, found := state.pathGroup.Get(paths.TrimExt(p))
-
- if !found {
- return false, nil
- }
-
- if err := createAndAddResource(p, group, o, mt); err != nil {
- return false, err
- }
-
- return true, nil
- }
-
- for _, o := range result.OutputFiles {
- handled, err := createAndAddResources(o)
- if err != nil {
- return nil, err
- }
-
- if !handled {
- // Copy to destination.
- // In a multihost setup, we will have multiple targets.
- var targetFilenames []string
- if len(multihostBasePaths) > 0 {
- for _, base := range multihostBasePaths {
- p := strings.TrimPrefix(o.Path, outDir)
- targetFilename := filepath.Join(base, b.id, p)
- targetFilenames = append(targetFilenames, targetFilename)
- }
- } else {
- p := strings.TrimPrefix(o.Path, outDir)
- targetFilename := filepath.Join(b.id, p)
- targetFilenames = append(targetFilenames, targetFilename)
- }
-
- fs := b.client.d.BaseFs.PublishFs
-
- if err := func() error {
- fw, err := helpers.OpenFilesForWriting(fs, targetFilenames...)
- if err != nil {
- return err
- }
- defer fw.Close()
-
- fr := bytes.NewReader(o.Contents)
-
- _, err = io.Copy(fw, fr)
-
- return err
- }(); err != nil {
- return nil, fmt.Errorf("failed to copy to %q: %w", targetFilenames, err)
- }
- }
- }
-
- p := &Package{
- id: path.Join(NsBatch, b.id),
- b: b,
- groups: groups,
- }
-
- return p, nil
-}
-
-func (b *batcher) removeNotSet() bool {
- // We already have the lock.
- var removed bool
- currentBuildID := b.buildCount
- for k, v := range b.scriptGroups {
- if !v.isBuilt(currentBuildID) && v.isTouched(currentBuildID) {
- // Remove entire group.
- removed = true
- delete(b.scriptGroups, k)
- continue
- }
- if v.removeTouchedButNotSet() {
- removed = true
- }
- if v.removeNotSet() {
- removed = true
- }
- }
-
- return removed
-}
-
-func (b *batcher) reset() {
- b.mu.Lock()
- defer b.mu.Unlock()
- b.configOptions.Reset()
- for _, v := range b.scriptGroups {
- v.Reset()
- }
-}
-
-type buildIDs map[uint32]bool
-
-func (b buildIDs) Has(buildID uint32) bool {
- return b[buildID]
-}
-
-func (b buildIDs) Set(buildID uint32) {
- b[buildID] = true
-}
-
-type buildToucher interface {
- setTouched(buildID uint32)
-}
-
-type configOptions struct {
- Options ExternalOptions
-}
-
-func (s configOptions) isStaleCompiled(prev configOptions) bool {
- return false
-}
-
-func (s configOptions) compileOptions(m map[string]any, defaults defaultOptionValues) (configOptions, error) {
- config, err := DecodeExternalOptions(m)
- if err != nil {
- return configOptions{}, err
- }
-
- return configOptions{
- Options: config,
- }, nil
-}
-
-type defaultOptionValues struct {
- defaultExport string
-}
-
-type instanceID struct {
- scriptID scriptID
- instanceID string
-}
-
-func (i instanceID) String() string {
- return i.scriptID.String() + "_" + i.instanceID
-}
-
-type isBuiltOrTouched struct {
- built buildIDs
- touched buildIDs
-}
-
-func (i isBuiltOrTouched) setBuilt(id uint32) {
- i.built.Set(id)
-}
-
-func (i isBuiltOrTouched) isBuilt(id uint32) bool {
- return i.built.Has(id)
-}
-
-func (i isBuiltOrTouched) setTouched(id uint32) {
- i.touched.Set(id)
-}
-
-func (i isBuiltOrTouched) isTouched(id uint32) bool {
- return i.touched.Has(id)
-}
-
-type isBuiltOrTouchedProvider interface {
- isBuilt(uint32) bool
- isTouched(uint32) bool
-}
-
-type key interface {
- comparable
- fmt.Stringer
-}
-
-type optionsCompiler[C any] interface {
- isStaleCompiled(C) bool
- compileOptions(map[string]any, defaultOptionValues) (C, error)
-}
-
-type optionsGetSetter[K, C any] interface {
- isBuiltOrTouchedProvider
- identity.IdentityProvider
- // resource.StaleInfo
-
- Compiled() C
- Key() K
- Reset()
-
- Get(uint32) js.OptionsSetter
- isStale() bool
- currPrev() (map[string]any, map[string]any)
-}
-
-type optionsGetSetters[K key, C any] []optionsGetSetter[K, C]
-
-type optionsMap[K key, C any] map[K]optionsGetSetter[K, C]
-
-type opts[K any, C optionsCompiler[C]] struct {
- key K
- h *optsHolder[C]
- once lazy.OnceMore
-}
-
-type optsHolder[C optionsCompiler[C]] struct {
- optionsID string
-
- defaults defaultOptionValues
-
- // Keep track of one generation so we can detect changes.
- // Note that most of this tracking is performed on the options/map level.
- compiled C
- compiledPrev C
- compileErr error
-
- resetCounter uint32
- optsSetCounter uint32
- optsCurr map[string]any
- optsPrev map[string]any
-
- isBuiltOrTouched
-}
-
-type paramsOptions struct {
- Params json.RawMessage
-}
-
-func (s paramsOptions) isStaleCompiled(prev paramsOptions) bool {
- return false
-}
-
-func (s paramsOptions) compileOptions(m map[string]any, defaults defaultOptionValues) (paramsOptions, error) {
- v := struct {
- Params map[string]any
- }{}
-
- if err := mapstructure.WeakDecode(m, &v); err != nil {
- return paramsOptions{}, err
- }
-
- paramsJSON, err := json.Marshal(v.Params)
- if err != nil {
- return paramsOptions{}, err
- }
-
- return paramsOptions{
- Params: paramsJSON,
- }, nil
-}
-
-type scriptBatchTemplateContext struct {
- opts optionsGetSetter[scriptID, scriptOptions]
- Import string
- Instances []scriptInstanceBatchTemplateContext
-}
-
-func (s *scriptBatchTemplateContext) Export() string {
- return s.opts.Compiled().Export
-}
-
-func (c scriptBatchTemplateContext) MarshalJSON() (b []byte, err error) {
- return json.Marshal(&struct {
- ID string `json:"id"`
- Instances []scriptInstanceBatchTemplateContext `json:"instances"`
- }{
- ID: c.opts.Key().String(),
- Instances: c.Instances,
- })
-}
-
-func (b scriptBatchTemplateContext) RunnerJSON(i int) string {
- script := fmt.Sprintf("Script%d", i)
-
- v := struct {
- ID string `json:"id"`
-
- // Read-only live JavaScript binding.
- Binding string `json:"binding"`
- Instances []scriptInstanceBatchTemplateContext `json:"instances"`
- }{
- b.opts.Key().String(),
- script,
- b.Instances,
- }
-
- bb, err := json.Marshal(v)
- if err != nil {
- panic(err)
- }
- s := string(bb)
-
- // Remove the quotes to make it a valid JS object.
- s = strings.ReplaceAll(s, fmt.Sprintf("%q", script), script)
-
- return s
-}
-
-type scriptGroup struct {
- mu sync.Mutex
- id string
- b *batcher
- isBuiltOrTouched
- dependencyManager identity.Manager
-
- scriptsOptions optionsMap[scriptID, scriptOptions]
- instancesOptions optionsMap[instanceID, paramsOptions]
- runnersOptions optionsMap[scriptID, scriptOptions]
-}
-
-// For internal use only.
-func (b *scriptGroup) GetDependencyManager() identity.Manager {
- return b.dependencyManager
-}
-
-// For internal use only.
-func (b *scriptGroup) IdentifierBase() string {
- return b.id
-}
-
-func (s *scriptGroup) Instance(sid, id string) js.OptionsSetter {
- if err := ValidateBatchID(sid, false); err != nil {
- panic(err)
- }
- if err := ValidateBatchID(id, false); err != nil {
- panic(err)
- }
-
- s.mu.Lock()
- defer s.mu.Unlock()
-
- iid := instanceID{scriptID: scriptID(sid), instanceID: id}
- if v, found := s.instancesOptions[iid]; found {
- return v.Get(s.b.buildCount)
- }
-
- fullID := "instance_" + s.key() + "_" + iid.String()
-
- s.instancesOptions[iid] = newOpts[instanceID, paramsOptions](
- iid,
- fullID,
- defaultOptionValues{},
- )
-
- return s.instancesOptions[iid].Get(s.b.buildCount)
-}
-
-func (g *scriptGroup) Reset() {
- for _, v := range g.scriptsOptions {
- v.Reset()
- }
- for _, v := range g.instancesOptions {
- v.Reset()
- }
- for _, v := range g.runnersOptions {
- v.Reset()
- }
-}
-
-func (s *scriptGroup) Runner(id string) js.OptionsSetter {
- if err := ValidateBatchID(id, false); err != nil {
- panic(err)
- }
-
- s.mu.Lock()
- defer s.mu.Unlock()
- sid := scriptID(id)
- if v, found := s.runnersOptions[sid]; found {
- return v.Get(s.b.buildCount)
- }
-
- runnerIdentity := "runner_" + s.key() + "_" + id
-
- // A typical signature for a runner would be:
- // export default function Run(scripts) {}
- // The user can override the default export in the templates.
-
- s.runnersOptions[sid] = newOpts[scriptID, scriptOptions](
- sid,
- runnerIdentity,
- defaultOptionValues{
- defaultExport: "default",
- },
- )
-
- return s.runnersOptions[sid].Get(s.b.buildCount)
-}
-
-func (s *scriptGroup) Script(id string) js.OptionsSetter {
- if err := ValidateBatchID(id, false); err != nil {
- panic(err)
- }
-
- s.mu.Lock()
- defer s.mu.Unlock()
- sid := scriptID(id)
- if v, found := s.scriptsOptions[sid]; found {
- return v.Get(s.b.buildCount)
- }
-
- scriptIdentity := "script_" + s.key() + "_" + id
-
- s.scriptsOptions[sid] = newOpts[scriptID, scriptOptions](
- sid,
- scriptIdentity,
- defaultOptionValues{
- defaultExport: "*",
- },
- )
-
- return s.scriptsOptions[sid].Get(s.b.buildCount)
-}
-
-func (s *scriptGroup) isStale() bool {
- for _, v := range s.scriptsOptions {
- if v.isStale() {
- return true
- }
- }
-
- for _, v := range s.instancesOptions {
- if v.isStale() {
- return true
- }
- }
-
- for _, v := range s.runnersOptions {
- if v.isStale() {
- return true
- }
- }
-
- return false
-}
-
-func (v *scriptGroup) forEachIdentity(
- f func(id identity.Identity) bool,
-) bool {
- if f(v) {
- return true
- }
- for _, vv := range v.instancesOptions {
- if f(vv.GetIdentity()) {
- return true
- }
- }
-
- for _, vv := range v.scriptsOptions {
- if f(vv.GetIdentity()) {
- return true
- }
- }
-
- for _, vv := range v.runnersOptions {
- if f(vv.GetIdentity()) {
- return true
- }
- }
-
- return false
-}
-
-func (s *scriptGroup) key() string {
- return s.b.id + "_" + s.id
-}
-
-func (g *scriptGroup) removeNotSet() bool {
- currentBuildID := g.b.buildCount
- if !g.isBuilt(currentBuildID) {
- // This group was never accessed in this build.
- return false
- }
- var removed bool
-
- if g.instancesOptions.isBuilt(currentBuildID) {
- // A new instance has been set in this group for this build.
- // Remove any instance that has not been set in this build.
- for k, v := range g.instancesOptions {
- if v.isBuilt(currentBuildID) {
- continue
- }
- delete(g.instancesOptions, k)
- removed = true
- }
- }
-
- if g.runnersOptions.isBuilt(currentBuildID) {
- // A new runner has been set in this group for this build.
- // Remove any runner that has not been set in this build.
- for k, v := range g.runnersOptions {
- if v.isBuilt(currentBuildID) {
- continue
- }
- delete(g.runnersOptions, k)
- removed = true
- }
- }
-
- if g.scriptsOptions.isBuilt(currentBuildID) {
- // A new script has been set in this group for this build.
- // Remove any script that has not been set in this build.
- for k, v := range g.scriptsOptions {
- if v.isBuilt(currentBuildID) {
- continue
- }
- delete(g.scriptsOptions, k)
-
- // Also remove any instance with this ID.
- for kk := range g.instancesOptions {
- if kk.scriptID == k {
- delete(g.instancesOptions, kk)
- }
- }
- removed = true
- }
- }
-
- return removed
-}
-
-func (g *scriptGroup) removeTouchedButNotSet() bool {
- currentBuildID := g.b.buildCount
- var removed bool
- for k, v := range g.instancesOptions {
- if v.isBuilt(currentBuildID) {
- continue
- }
- if v.isTouched(currentBuildID) {
- delete(g.instancesOptions, k)
- removed = true
- }
- }
- for k, v := range g.runnersOptions {
- if v.isBuilt(currentBuildID) {
- continue
- }
- if v.isTouched(currentBuildID) {
- delete(g.runnersOptions, k)
- removed = true
- }
- }
- for k, v := range g.scriptsOptions {
- if v.isBuilt(currentBuildID) {
- continue
- }
- if v.isTouched(currentBuildID) {
- delete(g.scriptsOptions, k)
- removed = true
-
- // Also remove any instance with this ID.
- for kk := range g.instancesOptions {
- if kk.scriptID == k {
- delete(g.instancesOptions, kk)
- }
- }
- }
-
- }
- return removed
-}
-
-type scriptGroups map[string]*scriptGroup
-
-func (s scriptGroups) Sorted() []*scriptGroup {
- var a []*scriptGroup
- for _, v := range s {
- a = append(a, v)
- }
- sort.Slice(a, func(i, j int) bool {
- return a[i].id < a[j].id
- })
- return a
-}
-
-type scriptID string
-
-func (s scriptID) String() string {
- return string(s)
-}
-
-type scriptInstanceBatchTemplateContext struct {
- opts optionsGetSetter[instanceID, paramsOptions]
-}
-
-func (c scriptInstanceBatchTemplateContext) ID() string {
- return c.opts.Key().instanceID
-}
-
-func (c scriptInstanceBatchTemplateContext) MarshalJSON() (b []byte, err error) {
- return json.Marshal(&struct {
- ID string `json:"id"`
- Params json.RawMessage `json:"params"`
- }{
- ID: c.opts.Key().instanceID,
- Params: c.opts.Compiled().Params,
- })
-}
-
-type scriptOptions struct {
- // The script to build.
- Resource resource.Resource
-
- // The import context to use.
- // Note that we will always fall back to the resource's own import context.
- ImportContext resource.ResourceGetter
-
- // The export name to use for this script's group's runners (if any).
- // If not set, the default export will be used.
- Export string
-
- // Params marshaled to JSON.
- Params json.RawMessage
-}
-
-func (o *scriptOptions) Dir() string {
- return path.Dir(resources.InternalResourceTargetPath(o.Resource))
-}
-
-func (s scriptOptions) IsZero() bool {
- return s.Resource == nil
-}
-
-func (s scriptOptions) isStaleCompiled(prev scriptOptions) bool {
- if prev.IsZero() {
- return false
- }
-
- // All but the ImportContext are checked at the options/map level.
- i1nil, i2nil := prev.ImportContext == nil, s.ImportContext == nil
- if i1nil && i2nil {
- return false
- }
- if i1nil || i2nil {
- return true
- }
- // On its own this check would have too many false positives, but combined with the other checks it should be fine.
- // We cannot do equality checking here.
- if !prev.ImportContext.(resource.IsProbablySameResourceGetter).IsProbablySameResourceGetter(s.ImportContext) {
- return true
- }
-
- return false
-}
-
-func (s scriptOptions) compileOptions(m map[string]any, defaults defaultOptionValues) (scriptOptions, error) {
- v := struct {
- Resource resource.Resource
- ImportContext any
- Export string
- Params map[string]any
- }{}
-
- if err := mapstructure.WeakDecode(m, &v); err != nil {
- panic(err)
- }
-
- var paramsJSON []byte
- if v.Params != nil {
- var err error
- paramsJSON, err = json.Marshal(v.Params)
- if err != nil {
- panic(err)
- }
- }
-
- if v.Export == "" {
- v.Export = defaults.defaultExport
- }
-
- compiled := scriptOptions{
- Resource: v.Resource,
- Export: v.Export,
- ImportContext: resource.NewCachedResourceGetter(v.ImportContext),
- Params: paramsJSON,
- }
-
- if compiled.Resource == nil {
- return scriptOptions{}, fmt.Errorf("resource not set")
- }
-
- return compiled, nil
-}
-
-type scriptRunnerTemplateContext struct {
- opts optionsGetSetter[scriptID, scriptOptions]
- Import string
-}
-
-func (s *scriptRunnerTemplateContext) Export() string {
- return s.opts.Compiled().Export
-}
-
-func (c scriptRunnerTemplateContext) MarshalJSON() (b []byte, err error) {
- return json.Marshal(&struct {
- ID string `json:"id"`
- }{
- ID: c.opts.Key().String(),
- })
-}
-
-func (o optionsMap[K, C]) isBuilt(id uint32) bool {
- for _, v := range o {
- if v.isBuilt(id) {
- return true
- }
- }
-
- return false
-}
-
-func (o *opts[K, C]) isBuilt(id uint32) bool {
- return o.h.isBuilt(id)
-}
-
-func (o *opts[K, C]) isStale() bool {
- if o.h.isStaleOpts() {
- return true
- }
- if o.h.compiled.isStaleCompiled(o.h.compiledPrev) {
- return true
- }
- return false
-}
-
-func (o *optsHolder[C]) isStaleOpts() bool {
- if o.optsSetCounter == 1 && o.resetCounter > 0 {
- return false
- }
- isStale := func() bool {
- if len(o.optsCurr) != len(o.optsPrev) {
- return true
- }
- for k, v := range o.optsPrev {
- vv, found := o.optsCurr[k]
- if !found {
- return true
- }
- if strings.EqualFold(k, propsKeyImportContext) {
- // This is checked later.
- } else if si, ok := vv.(resource.StaleInfo); ok {
- if si.StaleVersion() > 0 {
- return true
- }
- } else {
- if !reflect.DeepEqual(v, vv) {
- return true
- }
- }
- }
- return false
- }()
-
- return isStale
-}
-
-func (o *opts[K, C]) isTouched(id uint32) bool {
- return o.h.isTouched(id)
-}
-
-func (o *optsHolder[C]) checkCompileErr() {
- if o.compileErr != nil {
- panic(o.compileErr)
- }
-}
-
-func (o *opts[K, C]) currPrev() (map[string]any, map[string]any) {
- return o.h.optsCurr, o.h.optsPrev
-}
-
-func init() {
- // We don't want any dependencies/change tracking on the top level Package,
- // we want finer grained control via Package.Group.
- var p any = &Package{}
- if _, ok := p.(identity.Identity); ok {
- panic("esbuid.Package should not implement identity.Identity")
- }
- if _, ok := p.(identity.DependencyManagerProvider); ok {
- panic("esbuid.Package should not implement identity.DependencyManagerProvider")
- }
-}
diff --git a/internal/js/esbuild/batch_integration_test.go b/internal/js/esbuild/batch_integration_test.go
deleted file mode 100644
index b4a2454ac..000000000
--- a/internal/js/esbuild/batch_integration_test.go
+++ /dev/null
@@ -1,723 +0,0 @@
-// Copyright 2024 The Hugo Authors. All rights reserved.
-//
-// 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.
-
-// Package js provides functions for building JavaScript resources
-package esbuild_test
-
-import (
- "os"
- "path/filepath"
- "strings"
- "testing"
-
- qt "github.com/frankban/quicktest"
-
- "github.com/bep/logg"
- "github.com/gohugoio/hugo/common/paths"
- "github.com/gohugoio/hugo/hugolib"
- "github.com/gohugoio/hugo/internal/js/esbuild"
-)
-
-// Used to test misc. error situations etc.
-const jsBatchFilesTemplate = `
--- hugo.toml --
-disableKinds = ["taxonomy", "term", "section"]
-disableLiveReload = true
--- assets/js/styles.css --
-body {
- background-color: red;
-}
--- assets/js/main.js --
-import './styles.css';
-import * as params from '@params';
-import * as foo from 'mylib';
-console.log("Hello, Main!");
-console.log("params.p1", params.p1);
-export default function Main() {};
--- assets/js/runner.js --
-console.log("Hello, Runner!");
--- node_modules/mylib/index.js --
-console.log("Hello, My Lib!");
--- layouts/shortcodes/hdx.html --
-{{ $path := .Get "r" }}
-{{ $r := or (.Page.Resources.Get $path) (resources.Get $path) }}
-{{ $batch := (js.Batch "mybatch") }}
-{{ $scriptID := $path | anchorize }}
-{{ $instanceID := .Ordinal | string }}
-{{ $group := .Page.RelPermalink | anchorize }}
-{{ $params := .Params | default dict }}
-{{ $export := .Get "export" | default "default" }}
-{{ with $batch.Group $group }}
- {{ with .Runner "create-elements" }}
- {{ .SetOptions (dict "resource" (resources.Get "js/runner.js")) }}
- {{ end }}
- {{ with .Script $scriptID }}
- {{ .SetOptions (dict
- "resource" $r
- "export" $export
- "importContext" (slice $.Page)
- )
- }}
- {{ end }}
- {{ with .Instance $scriptID $instanceID }}
- {{ .SetOptions (dict "params" $params) }}
- {{ end }}
-{{ end }}
-hdx-instance: {{ $scriptID }}: {{ $instanceID }}|
--- layouts/_default/baseof.html --
-Base.
-{{ $batch := (js.Batch "mybatch") }}
- {{ with $batch.Config }}
- {{ .SetOptions (dict
- "params" (dict "id" "config")
- "sourceMap" ""
- )
- }}
-{{ end }}
-{{ with (templates.Defer (dict "key" "global")) }}
-Defer:
-{{ $batch := (js.Batch "mybatch") }}
-{{ range $k, $v := $batch.Build.Groups }}
- {{ range $kk, $vv := . -}}
- {{ $k }}: {{ .RelPermalink }}
- {{ end }}
-{{ end -}}
-{{ end }}
-{{ block "main" . }}Main{{ end }}
-End.
--- layouts/_default/single.html --
-{{ define "main" }}
-==> Single Template Content: {{ .Content }}$
-{{ $batch := (js.Batch "mybatch") }}
-{{ with $batch.Group "mygroup" }}
- {{ with .Runner "run" }}
- {{ .SetOptions (dict "resource" (resources.Get "js/runner.js")) }}
- {{ end }}
- {{ with .Script "main" }}
- {{ .SetOptions (dict "resource" (resources.Get "js/main.js") "params" (dict "p1" "param-p1-main" )) }}
- {{ end }}
- {{ with .Instance "main" "i1" }}
- {{ .SetOptions (dict "params" (dict "title" "Instance 1")) }}
- {{ end }}
-{{ end }}
-{{ end }}
--- layouts/index.html --
-{{ define "main" }}
-Home.
-{{ end }}
--- content/p1/index.md --
----
-title: "P1"
----
-
-Some content.
-
-{{< hdx r="p1script.js" myparam="p1-param-1" >}}
-{{< hdx r="p1script.js" myparam="p1-param-2" >}}
-
--- content/p1/p1script.js --
-console.log("P1 Script");
-
-
-`
-
-// Just to verify that the above file setup works.
-func TestBatchTemplateOKBuild(t *testing.T) {
- b := hugolib.Test(t, jsBatchFilesTemplate, hugolib.TestOptWithOSFs())
- b.AssertPublishDir("mybatch/mygroup.js", "mybatch/mygroup.css")
-}
-
-func TestBatchRemoveAllInGroup(t *testing.T) {
- files := jsBatchFilesTemplate
- b := hugolib.TestRunning(t, files, hugolib.TestOptWithOSFs())
-
- b.AssertFileContent("public/p1/index.html", "p1: /mybatch/p1.js")
-
- b.EditFiles("content/p1/index.md", `
----
-title: "P1"
----
-Empty.
-`)
- b.Build()
-
- b.AssertFileContent("public/p1/index.html", "! p1: /mybatch/p1.js")
-
- // Add one script back.
- b.EditFiles("content/p1/index.md", `
----
-title: "P1"
----
-
-{{< hdx r="p1script.js" myparam="p1-param-1-new" >}}
-`)
- b.Build()
-
- b.AssertFileContent("public/mybatch/p1.js",
- "p1-param-1-new",
- "p1script.js")
-}
-
-func TestBatchEditInstance(t *testing.T) {
- files := jsBatchFilesTemplate
- b := hugolib.TestRunning(t, files, hugolib.TestOptWithOSFs())
- b.AssertFileContent("public/mybatch/mygroup.js", "Instance 1")
- b.EditFileReplaceAll("layouts/_default/single.html", "Instance 1", "Instance 1 Edit").Build()
- b.AssertFileContent("public/mybatch/mygroup.js", "Instance 1 Edit")
-}
-
-func TestBatchEditScriptParam(t *testing.T) {
- files := jsBatchFilesTemplate
- b := hugolib.TestRunning(t, files, hugolib.TestOptWithOSFs())
- b.AssertFileContent("public/mybatch/mygroup.js", "param-p1-main")
- b.EditFileReplaceAll("layouts/_default/single.html", "param-p1-main", "param-p1-main-edited").Build()
- b.AssertFileContent("public/mybatch/mygroup.js", "param-p1-main-edited")
-}
-
-func TestBatchMultiHost(t *testing.T) {
- files := `
--- hugo.toml --
-disableKinds = ["taxonomy", "term", "section"]
-[languages]
-[languages.en]
-weight = 1
-baseURL = "https://example.com/en"
-[languages.fr]
-weight = 2
-baseURL = "https://example.com/fr"
-disableLiveReload = true
--- assets/js/styles.css --
-body {
- background-color: red;
-}
--- assets/js/main.js --
-import * as foo from 'mylib';
-console.log("Hello, Main!");
--- assets/js/runner.js --
-console.log("Hello, Runner!");
--- node_modules/mylib/index.js --
-console.log("Hello, My Lib!");
--- layouts/index.html --
-Home.
-{{ $batch := (js.Batch "mybatch") }}
- {{ with $batch.Config }}
- {{ .SetOptions (dict
- "params" (dict "id" "config")
- "sourceMap" ""
- )
- }}
-{{ end }}
-{{ with (templates.Defer (dict "key" "global")) }}
-Defer:
-{{ $batch := (js.Batch "mybatch") }}
-{{ range $k, $v := $batch.Build.Groups }}
- {{ range $kk, $vv := . -}}
- {{ $k }}: {{ .RelPermalink }}
- {{ end }}
-{{ end -}}
-{{ end }}
-{{ $batch := (js.Batch "mybatch") }}
-{{ with $batch.Group "mygroup" }}
- {{ with .Runner "run" }}
- {{ .SetOptions (dict "resource" (resources.Get "js/runner.js")) }}
- {{ end }}
- {{ with .Script "main" }}
- {{ .SetOptions (dict "resource" (resources.Get "js/main.js") "params" (dict "p1" "param-p1-main" )) }}
- {{ end }}
- {{ with .Instance "main" "i1" }}
- {{ .SetOptions (dict "params" (dict "title" "Instance 1")) }}
- {{ end }}
-{{ end }}
-
-
-`
- b := hugolib.Test(t, files, hugolib.TestOptWithOSFs())
- b.AssertPublishDir(
- "en/mybatch/chunk-TOZKWCDE.js", "en/mybatch/mygroup.js ",
- "fr/mybatch/mygroup.js", "fr/mybatch/chunk-TOZKWCDE.js")
-}
-
-func TestBatchRenameBundledScript(t *testing.T) {
- files := jsBatchFilesTemplate
- b := hugolib.TestRunning(t, files, hugolib.TestOptWithOSFs())
- b.AssertFileContent("public/mybatch/p1.js", "P1 Script")
- b.RenameFile("content/p1/p1script.js", "content/p1/p1script2.js")
- _, err := b.BuildE()
- b.Assert(err, qt.IsNotNil)
- b.Assert(err.Error(), qt.Contains, "resource not set")
-
- // Rename it back.
- b.RenameFile("content/p1/p1script2.js", "content/p1/p1script.js")
- b.Build()
-}
-
-func TestBatchErrorScriptResourceNotSet(t *testing.T) {
- files := strings.Replace(jsBatchFilesTemplate, `(resources.Get "js/main.js")`, `(resources.Get "js/doesnotexist.js")`, 1)
- b, err := hugolib.TestE(t, files, hugolib.TestOptWithOSFs())
- b.Assert(err, qt.IsNotNil)
- b.Assert(err.Error(), qt.Contains, `error calling SetOptions: resource not set`)
-}
-
-func TestBatchSlashInBatchID(t *testing.T) {
- files := strings.ReplaceAll(jsBatchFilesTemplate, `"mybatch"`, `"my/batch"`)
- b, err := hugolib.TestE(t, files, hugolib.TestOptWithOSFs())
- b.Assert(err, qt.IsNil)
- b.AssertPublishDir("my/batch/mygroup.js")
-}
-
-func TestBatchSourceMaps(t *testing.T) {
- filesTemplate := `
--- hugo.toml --
-disableKinds = ["taxonomy", "term", "section"]
-disableLiveReload = true
--- assets/js/styles.css --
-body {
- background-color: red;
-}
--- assets/js/main.js --
-import * as foo from 'mylib';
-console.log("Hello, Main!");
--- assets/js/runner.js --
-console.log("Hello, Runner!");
--- node_modules/mylib/index.js --
-console.log("Hello, My Lib!");
--- layouts/shortcodes/hdx.html --
-{{ $path := .Get "r" }}
-{{ $r := or (.Page.Resources.Get $path) (resources.Get $path) }}
-{{ $batch := (js.Batch "mybatch") }}
-{{ $scriptID := $path | anchorize }}
-{{ $instanceID := .Ordinal | string }}
-{{ $group := .Page.RelPermalink | anchorize }}
-{{ $params := .Params | default dict }}
-{{ $export := .Get "export" | default "default" }}
-{{ with $batch.Group $group }}
- {{ with .Runner "create-elements" }}
- {{ .SetOptions (dict "resource" (resources.Get "js/runner.js")) }}
- {{ end }}
- {{ with .Script $scriptID }}
- {{ .SetOptions (dict
- "resource" $r
- "export" $export
- "importContext" (slice $.Page)
- )
- }}
- {{ end }}
- {{ with .Instance $scriptID $instanceID }}
- {{ .SetOptions (dict "params" $params) }}
- {{ end }}
-{{ end }}
-hdx-instance: {{ $scriptID }}: {{ $instanceID }}|
--- layouts/_default/baseof.html --
-Base.
-{{ $batch := (js.Batch "mybatch") }}
- {{ with $batch.Config }}
- {{ .SetOptions (dict
- "params" (dict "id" "config")
- "sourceMap" ""
- )
- }}
-{{ end }}
-{{ with (templates.Defer (dict "key" "global")) }}
-Defer:
-{{ $batch := (js.Batch "mybatch") }}
-{{ range $k, $v := $batch.Build.Groups }}
- {{ range $kk, $vv := . -}}
- {{ $k }}: {{ .RelPermalink }}
- {{ end }}
-{{ end -}}
-{{ end }}
-{{ block "main" . }}Main{{ end }}
-End.
--- layouts/_default/single.html --
-{{ define "main" }}
-==> Single Template Content: {{ .Content }}$
-{{ $batch := (js.Batch "mybatch") }}
-{{ with $batch.Group "mygroup" }}
- {{ with .Runner "run" }}
- {{ .SetOptions (dict "resource" (resources.Get "js/runner.js")) }}
- {{ end }}
- {{ with .Script "main" }}
- {{ .SetOptions (dict "resource" (resources.Get "js/main.js") "params" (dict "p1" "param-p1-main" )) }}
- {{ end }}
- {{ with .Instance "main" "i1" }}
- {{ .SetOptions (dict "params" (dict "title" "Instance 1")) }}
- {{ end }}
-{{ end }}
-{{ end }}
--- layouts/index.html --
-{{ define "main" }}
-Home.
-{{ end }}
--- content/p1/index.md --
----
-title: "P1"
----
-
-Some content.
-
-{{< hdx r="p1script.js" myparam="p1-param-1" >}}
-{{< hdx r="p1script.js" myparam="p1-param-2" >}}
-
--- content/p1/p1script.js --
-import * as foo from 'mylib';
-console.lg("Foo", foo);
-console.log("P1 Script");
-export default function P1Script() {};
-
-
-`
- files := strings.Replace(filesTemplate, `"sourceMap" ""`, `"sourceMap" "linked"`, 1)
- b := hugolib.TestRunning(t, files, hugolib.TestOptWithOSFs())
- b.AssertFileContent("public/mybatch/mygroup.js.map", "main.js", "! ns-hugo")
- b.AssertFileContent("public/mybatch/mygroup.js", "sourceMappingURL=mygroup.js.map")
- b.AssertFileContent("public/mybatch/p1.js", "sourceMappingURL=p1.js.map")
- b.AssertFileContent("public/mybatch/mygroup_run_runner.js", "sourceMappingURL=mygroup_run_runner.js.map")
- b.AssertFileContent("public/mybatch/chunk-UQKPPNA6.js", "sourceMappingURL=chunk-UQKPPNA6.js.map")
-
- checkMap := func(p string, expectLen int) {
- s := b.FileContent(p)
- sources := esbuild.SourcesFromSourceMap(s)
- b.Assert(sources, qt.HasLen, expectLen)
-
- // Check that all source files exist.
- for _, src := range sources {
- filename, ok := paths.UrlStringToFilename(src)
- b.Assert(ok, qt.IsTrue)
- _, err := os.Stat(filename)
- b.Assert(err, qt.IsNil)
- }
- }
-
- checkMap("public/mybatch/mygroup.js.map", 1)
- checkMap("public/mybatch/p1.js.map", 1)
- checkMap("public/mybatch/mygroup_run_runner.js.map", 0)
- checkMap("public/mybatch/chunk-UQKPPNA6.js.map", 1)
-}
-
-func TestBatchErrorRunnerResourceNotSet(t *testing.T) {
- files := strings.Replace(jsBatchFilesTemplate, `(resources.Get "js/runner.js")`, `(resources.Get "js/doesnotexist.js")`, 1)
- b, err := hugolib.TestE(t, files, hugolib.TestOptWithOSFs())
- b.Assert(err, qt.IsNotNil)
- b.Assert(err.Error(), qt.Contains, `resource not set`)
-}
-
-func TestBatchErrorScriptResourceInAssetsSyntaxError(t *testing.T) {
- // Introduce JS syntax error in assets/js/main.js
- files := strings.Replace(jsBatchFilesTemplate, `console.log("Hello, Main!");`, `console.log("Hello, Main!"`, 1)
- b, err := hugolib.TestE(t, files, hugolib.TestOptWithOSFs())
- b.Assert(err, qt.IsNotNil)
- b.Assert(err.Error(), qt.Contains, filepath.FromSlash(`assets/js/main.js:5:0": Expected ")" but found "console"`))
-}
-
-func TestBatchErrorScriptResourceInBundleSyntaxError(t *testing.T) {
- // Introduce JS syntax error in content/p1/p1script.js
- files := strings.Replace(jsBatchFilesTemplate, `console.log("P1 Script");`, `console.log("P1 Script"`, 1)
- b, err := hugolib.TestE(t, files, hugolib.TestOptWithOSFs())
- b.Assert(err, qt.IsNotNil)
- b.Assert(err.Error(), qt.Contains, filepath.FromSlash(`/content/p1/p1script.js:3:0": Expected ")" but found end of file`))
-}
-
-func TestBatch(t *testing.T) {
- files := `
--- hugo.toml --
-disableKinds = ["taxonomy", "term"]
-disableLiveReload = true
-baseURL = "https://example.com"
--- package.json --
-{
- "devDependencies": {
- "react": "^18.3.1",
- "react-dom": "^18.3.1"
- }
-}
--- assets/js/shims/react.js --
--- assets/js/shims/react-dom.js --
-module.exports = window.ReactDOM;
-module.exports = window.React;
--- content/mybundle/index.md --
----
-title: "My Bundle"
----
--- content/mybundle/mybundlestyles.css --
-@import './foo.css';
-@import './bar.css';
-@import './otherbundlestyles.css';
-
-.mybundlestyles {
- background-color: blue;
-}
--- content/mybundle/bundlereact.jsx --
-import * as React from "react";
-import './foo.css';
-import './mybundlestyles.css';
-window.React1 = React;
-
-let text = 'Click me, too!'
-
-export default function MyBundleButton() {
- return (
-
- )
-}
-
--- assets/js/reactrunner.js --
-import * as ReactDOM from 'react-dom/client';
-import * as React from 'react';
-
-export default function Run(group) {
- for (const module of group.scripts) {
- for (const instance of module.instances) {
- /* This is a convention in this project. */
- let elId = §§${module.id}-${instance.id}§§;
- let el = document.getElementById(elId);
- if (!el) {
- console.warn(§§Element with id ${elId} not found§§);
- continue;
- }
- const root = ReactDOM.createRoot(el);
- const reactEl = React.createElement(module.mod, instance.params);
- root.render(reactEl);
- }
- }
-}
--- assets/other/otherbundlestyles.css --
-.otherbundlestyles {
- background-color: red;
-}
--- assets/other/foo.css --
-@import './bar.css';
-
-.foo {
- background-color: blue;
-}
--- assets/other/bar.css --
-.bar {
- background-color: red;
-}
--- assets/js/button.css --
-button {
- background-color: red;
-}
--- assets/js/bar.css --
-.bar-assets {
- background-color: red;
-}
--- assets/js/helper.js --
-import './bar.css'
-
-export function helper() {
- console.log('helper');
-}
-
--- assets/js/react1styles_nested.css --
-.react1styles_nested {
- background-color: red;
-}
--- assets/js/react1styles.css --
-@import './react1styles_nested.css';
-.react1styles {
- background-color: red;
-}
--- assets/js/react1.jsx --
-import * as React from "react";
-import './button.css'
-import './foo.css'
-import './react1styles.css'
-
-window.React1 = React;
-
-let text = 'Click me'
-
-export default function MyButton() {
- return (
-
- )
-}
-
--- assets/js/react2.jsx --
-import * as React from "react";
-import { helper } from './helper.js'
-import './foo.css'
-
-window.React2 = React;
-
-let text = 'Click me, too!'
-
-export function MyOtherButton() {
- return (
-
- )
-}
--- assets/js/main1.js --
-import * as React from "react";
-import * as params from '@params';
-
-console.log('main1.React', React)
-console.log('main1.params.id', params.id)
-
--- assets/js/main2.js --
-import * as React from "react";
-import * as params from '@params';
-
-console.log('main2.React', React)
-console.log('main2.params.id', params.id)
-
-export default function Main2() {};
-
--- assets/js/main3.js --
-import * as React from "react";
-import * as params from '@params';
-import * as config from '@params/config';
-
-console.log('main3.params.id', params.id)
-console.log('config.params.id', config.id)
-
-export default function Main3() {};
-
--- layouts/_default/single.html --
-Single.
-
-{{ $r := .Resources.GetMatch "*.jsx" }}
-{{ $batch := (js.Batch "mybundle") }}
-{{ $otherCSS := (resources.Match "/other/*.css").Mount "/other" "." }}
- {{ with $batch.Config }}
- {{ $shims := dict "react" "js/shims/react.js" "react-dom/client" "js/shims/react-dom.js" }}
- {{ .SetOptions (dict
- "target" "es2018"
- "params" (dict "id" "config")
- "shims" $shims
- )
- }}
-{{ end }}
-{{ with $batch.Group "reactbatch" }}
- {{ with .Script "r3" }}
- {{ .SetOptions (dict
- "resource" $r
- "importContext" (slice $ $otherCSS)
- "params" (dict "id" "r3")
- )
- }}
- {{ end }}
- {{ with .Instance "r3" "r2i1" }}
- {{ .SetOptions (dict "title" "r2 instance 1")}}
- {{ end }}
-{{ end }}
--- layouts/index.html --
-Home.
-{{ with (templates.Defer (dict "key" "global")) }}
-{{ $batch := (js.Batch "mybundle") }}
-{{ range $k, $v := $batch.Build.Groups }}
- {{ range $kk, $vv := . }}
- {{ $k }}: {{ $kk }}: {{ .RelPermalink }}
- {{ end }}
- {{ end }}
-{{ end }}
-{{ $myContentBundle := site.GetPage "mybundle" }}
-{{ $batch := (js.Batch "mybundle") }}
-{{ $otherCSS := (resources.Match "/other/*.css").Mount "/other" "." }}
-{{ with $batch.Group "mains" }}
- {{ with .Script "main1" }}
- {{ .SetOptions (dict
- "resource" (resources.Get "js/main1.js")
- "params" (dict "id" "main1")
- )
- }}
- {{ end }}
- {{ with .Script "main2" }}
- {{ .SetOptions (dict
- "resource" (resources.Get "js/main2.js")
- "params" (dict "id" "main2")
- )
- }}
- {{ end }}
- {{ with .Script "main3" }}
- {{ .SetOptions (dict
- "resource" (resources.Get "js/main3.js")
- )
- }}
- {{ end }}
-{{ with .Instance "main1" "m1i1" }}{{ .SetOptions (dict "params" (dict "title" "Main1 Instance 1"))}}{{ end }}
-{{ with .Instance "main1" "m1i2" }}{{ .SetOptions (dict "params" (dict "title" "Main1 Instance 2"))}}{{ end }}
-{{ end }}
-{{ with $batch.Group "reactbatch" }}
- {{ with .Runner "reactrunner" }}
- {{ .SetOptions ( dict "resource" (resources.Get "js/reactrunner.js") )}}
- {{ end }}
- {{ with .Script "r1" }}
- {{ .SetOptions (dict
- "resource" (resources.Get "js/react1.jsx")
- "importContext" (slice $myContentBundle $otherCSS)
- "params" (dict "id" "r1")
- )
- }}
- {{ end }}
- {{ with .Instance "r1" "i1" }}{{ .SetOptions (dict "params" (dict "title" "Instance 1"))}}{{ end }}
- {{ with .Instance "r1" "i2" }}{{ .SetOptions (dict "params" (dict "title" "Instance 2"))}}{{ end }}
- {{ with .Script "r2" }}
- {{ .SetOptions (dict
- "resource" (resources.Get "js/react2.jsx")
- "export" "MyOtherButton"
- "importContext" $otherCSS
- "params" (dict "id" "r2")
- )
- }}
- {{ end }}
- {{ with .Instance "r2" "i1" }}{{ .SetOptions (dict "params" (dict "title" "Instance 2-1"))}}{{ end }}
-{{ end }}
-
-`
-
- b := hugolib.NewIntegrationTestBuilder(
- hugolib.IntegrationTestConfig{
- T: t,
- NeedsOsFS: true,
- NeedsNpmInstall: true,
- TxtarString: files,
- Running: true,
- LogLevel: logg.LevelWarn,
- // PrintAndKeepTempDir: true,
- }).Build()
-
- b.AssertFileContent("public/index.html",
- "mains: 0: /mybundle/mains.js",
- "reactbatch: 2: /mybundle/reactbatch.css",
- )
-
- b.AssertFileContent("public/mybundle/reactbatch.css",
- ".bar {",
- )
-
- // Verify params resolution.
- b.AssertFileContent("public/mybundle/mains.js",
- `
-var id = "main1";
-console.log("main1.params.id", id);
-var id2 = "main2";
-console.log("main2.params.id", id2);
-
-
-# Params from top level config.
-var id3 = "config";
-console.log("main3.params.id", void 0);
-console.log("config.params.id", id3);
-`)
-
- b.EditFileReplaceAll("content/mybundle/mybundlestyles.css", ".mybundlestyles", ".mybundlestyles-edit").Build()
- b.AssertFileContent("public/mybundle/reactbatch.css", ".mybundlestyles-edit {")
-
- b.EditFileReplaceAll("assets/other/bar.css", ".bar {", ".bar-edit {").Build()
- b.AssertFileContent("public/mybundle/reactbatch.css", ".bar-edit {")
-
- b.EditFileReplaceAll("assets/other/bar.css", ".bar-edit {", ".bar-edit2 {").Build()
- b.AssertFileContent("public/mybundle/reactbatch.css", ".bar-edit2 {")
-}
diff --git a/internal/js/esbuild/build.go b/internal/js/esbuild/build.go
deleted file mode 100644
index 33b91eafc..000000000
--- a/internal/js/esbuild/build.go
+++ /dev/null
@@ -1,236 +0,0 @@
-// Copyright 2024 The Hugo Authors. All rights reserved.
-//
-// 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.
-
-// Package esbuild provides functions for building JavaScript resources.
-package esbuild
-
-import (
- "errors"
- "fmt"
- "os"
- "path/filepath"
- "strings"
-
- "github.com/evanw/esbuild/pkg/api"
- "github.com/gohugoio/hugo/common/herrors"
- "github.com/gohugoio/hugo/common/hugio"
- "github.com/gohugoio/hugo/common/text"
- "github.com/gohugoio/hugo/hugofs"
- "github.com/gohugoio/hugo/hugolib/filesystems"
- "github.com/gohugoio/hugo/identity"
- "github.com/gohugoio/hugo/resources"
-)
-
-// NewBuildClient creates a new BuildClient.
-func NewBuildClient(fs *filesystems.SourceFilesystem, rs *resources.Spec) *BuildClient {
- return &BuildClient{
- rs: rs,
- sfs: fs,
- }
-}
-
-// BuildClient is a client for building JavaScript resources using esbuild.
-type BuildClient struct {
- rs *resources.Spec
- sfs *filesystems.SourceFilesystem
-}
-
-// Build builds the given JavaScript resources using esbuild with the given options.
-func (c *BuildClient) Build(opts Options) (api.BuildResult, error) {
- dependencyManager := opts.DependencyManager
- if dependencyManager == nil {
- dependencyManager = identity.NopManager
- }
-
- opts.OutDir = c.rs.AbsPublishDir
- opts.ResolveDir = c.rs.Cfg.BaseConfig().WorkingDir // where node_modules gets resolved
- opts.AbsWorkingDir = opts.ResolveDir
- opts.TsConfig = c.rs.ResolveJSConfigFile("tsconfig.json")
- assetsResolver := newFSResolver(c.rs.Assets.Fs)
-
- if err := opts.validate(); err != nil {
- return api.BuildResult{}, err
- }
-
- if err := opts.compile(); err != nil {
- return api.BuildResult{}, err
- }
-
- var err error
- opts.compiled.Plugins, err = createBuildPlugins(c.rs, assetsResolver, dependencyManager, opts)
- if err != nil {
- return api.BuildResult{}, err
- }
-
- if opts.Inject != nil {
- // Resolve the absolute filenames.
- for i, ext := range opts.Inject {
- impPath := filepath.FromSlash(ext)
- if filepath.IsAbs(impPath) {
- return api.BuildResult{}, fmt.Errorf("inject: absolute paths not supported, must be relative to /assets")
- }
-
- m := assetsResolver.resolveComponent(impPath)
-
- if m == nil {
- return api.BuildResult{}, fmt.Errorf("inject: file %q not found", ext)
- }
-
- opts.Inject[i] = m.Filename
-
- }
-
- opts.compiled.Inject = opts.Inject
-
- }
-
- result := api.Build(opts.compiled)
-
- if len(result.Errors) > 0 {
- createErr := func(msg api.Message) error {
- if msg.Location == nil {
- return errors.New(msg.Text)
- }
- var (
- contentr hugio.ReadSeekCloser
- errorMessage string
- loc = msg.Location
- errorPath = loc.File
- err error
- )
-
- var resolvedError *ErrorMessageResolved
-
- if opts.ErrorMessageResolveFunc != nil {
- resolvedError = opts.ErrorMessageResolveFunc(msg)
- }
-
- if resolvedError == nil {
- if errorPath == stdinImporter {
- errorPath = opts.StdinSourcePath
- }
-
- errorMessage = msg.Text
-
- var namespace string
- for _, ns := range hugoNamespaces {
- if strings.HasPrefix(errorPath, ns) {
- namespace = ns
- break
- }
- }
-
- if namespace != "" {
- namespace += ":"
- errorMessage = strings.ReplaceAll(errorMessage, namespace, "")
- errorPath = strings.TrimPrefix(errorPath, namespace)
- contentr, err = hugofs.Os.Open(errorPath)
- } else {
- var fi os.FileInfo
- fi, err = c.sfs.Fs.Stat(errorPath)
- if err == nil {
- m := fi.(hugofs.FileMetaInfo).Meta()
- errorPath = m.Filename
- contentr, err = m.Open()
- }
- }
- } else {
- contentr = resolvedError.Content
- errorPath = resolvedError.Path
- errorMessage = resolvedError.Message
- }
-
- if contentr != nil {
- defer contentr.Close()
- }
-
- if err == nil {
- fe := herrors.
- NewFileErrorFromName(errors.New(errorMessage), errorPath).
- UpdatePosition(text.Position{Offset: -1, LineNumber: loc.Line, ColumnNumber: loc.Column}).
- UpdateContent(contentr, nil)
-
- return fe
- }
-
- return fmt.Errorf("%s", errorMessage)
- }
-
- var errors []error
-
- for _, msg := range result.Errors {
- errors = append(errors, createErr(msg))
- }
-
- // Return 1, log the rest.
- for i, err := range errors {
- if i > 0 {
- c.rs.Logger.Errorf("js.Build failed: %s", err)
- }
- }
-
- return result, errors[0]
- }
-
- inOutputPathToAbsFilename := opts.ResolveSourceMapSource
- opts.ResolveSourceMapSource = func(s string) string {
- if inOutputPathToAbsFilename != nil {
- if filename := inOutputPathToAbsFilename(s); filename != "" {
- return filename
- }
- }
-
- if m := assetsResolver.resolveComponent(s); m != nil {
- return m.Filename
- }
-
- return ""
- }
-
- for i, o := range result.OutputFiles {
- if err := fixOutputFile(&o, func(s string) string {
- if s == "" {
- return opts.ResolveSourceMapSource(opts.StdinSourcePath)
- }
- var isNsHugo bool
- if strings.HasPrefix(s, "ns-hugo") {
- isNsHugo = true
- idxColon := strings.Index(s, ":")
- s = s[idxColon+1:]
- }
-
- if !strings.HasPrefix(s, PrefixHugoVirtual) {
- if !filepath.IsAbs(s) {
- s = filepath.Join(opts.OutDir, s)
- }
- }
-
- if isNsHugo {
- if ss := opts.ResolveSourceMapSource(s); ss != "" {
- if strings.HasPrefix(ss, PrefixHugoMemory) {
- // File not on disk, mark it for removal from the sources slice.
- return ""
- }
- return ss
- }
- return ""
- }
- return s
- }); err != nil {
- return result, err
- }
- result.OutputFiles[i] = o
- }
-
- return result, nil
-}
diff --git a/internal/js/esbuild/helpers.go b/internal/js/esbuild/helpers.go
deleted file mode 100644
index b4cb565b8..000000000
--- a/internal/js/esbuild/helpers.go
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2024 The Hugo Authors. All rights reserved.
-//
-// 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.
-
-// Package esbuild provides functions for building JavaScript resources.
-package esbuild
diff --git a/internal/js/esbuild/options.go b/internal/js/esbuild/options.go
deleted file mode 100644
index 21f9e31cd..000000000
--- a/internal/js/esbuild/options.go
+++ /dev/null
@@ -1,411 +0,0 @@
-// Copyright 2024 The Hugo Authors. All rights reserved.
-//
-// 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.
-
-package esbuild
-
-import (
- "encoding/json"
- "fmt"
- "path/filepath"
- "strings"
-
- "github.com/gohugoio/hugo/common/hugio"
- "github.com/gohugoio/hugo/common/maps"
- "github.com/gohugoio/hugo/common/paths"
- "github.com/gohugoio/hugo/identity"
-
- "github.com/evanw/esbuild/pkg/api"
-
- "github.com/gohugoio/hugo/media"
- "github.com/mitchellh/mapstructure"
-)
-
-var (
- nameTarget = map[string]api.Target{
- "": api.ESNext,
- "esnext": api.ESNext,
- "es5": api.ES5,
- "es6": api.ES2015,
- "es2015": api.ES2015,
- "es2016": api.ES2016,
- "es2017": api.ES2017,
- "es2018": api.ES2018,
- "es2019": api.ES2019,
- "es2020": api.ES2020,
- "es2021": api.ES2021,
- "es2022": api.ES2022,
- "es2023": api.ES2023,
- "es2024": api.ES2024,
- }
-
- // source names: https://github.com/evanw/esbuild/blob/9eca46464ed5615cb36a3beb3f7a7b9a8ffbe7cf/internal/config/config.go#L208
- nameLoader = map[string]api.Loader{
- "none": api.LoaderNone,
- "base64": api.LoaderBase64,
- "binary": api.LoaderBinary,
- "copy": api.LoaderFile,
- "css": api.LoaderCSS,
- "dataurl": api.LoaderDataURL,
- "default": api.LoaderDefault,
- "empty": api.LoaderEmpty,
- "file": api.LoaderFile,
- "global-css": api.LoaderGlobalCSS,
- "js": api.LoaderJS,
- "json": api.LoaderJSON,
- "jsx": api.LoaderJSX,
- "local-css": api.LoaderLocalCSS,
- "text": api.LoaderText,
- "ts": api.LoaderTS,
- "tsx": api.LoaderTSX,
- }
-)
-
-// DecodeExternalOptions decodes the given map into ExternalOptions.
-func DecodeExternalOptions(m map[string]any) (ExternalOptions, error) {
- opts := ExternalOptions{
- SourcesContent: true,
- }
-
- if err := mapstructure.WeakDecode(m, &opts); err != nil {
- return opts, err
- }
-
- if opts.TargetPath != "" {
- opts.TargetPath = paths.ToSlashTrimLeading(opts.TargetPath)
- }
-
- opts.Target = strings.ToLower(opts.Target)
- opts.Format = strings.ToLower(opts.Format)
-
- return opts, nil
-}
-
-// ErrorMessageResolved holds a resolved error message.
-type ErrorMessageResolved struct {
- Path string
- Message string
- Content hugio.ReadSeekCloser
-}
-
-// ExternalOptions holds user facing options for the js.Build template function.
-type ExternalOptions struct {
- // If not set, the source path will be used as the base target path.
- // Note that the target path's extension may change if the target MIME type
- // is different, e.g. when the source is TypeScript.
- TargetPath string
-
- // Whether to minify to output.
- Minify bool
-
- // One of "inline", "external", "linked" or "none".
- SourceMap string
-
- SourcesContent bool
-
- // The language target.
- // One of: es2015, es2016, es2017, es2018, es2019, es2020 or esnext.
- // Default is esnext.
- Target string
-
- // The output format.
- // One of: iife, cjs, esm
- // Default is to esm.
- Format string
-
- // One of browser, node, neutral.
- // Default is browser.
- // See https://esbuild.github.io/api/#platform
- Platform string
-
- // External dependencies, e.g. "react".
- Externals []string
-
- // This option allows you to automatically replace a global variable with an import from another file.
- // The filenames must be relative to /assets.
- // See https://esbuild.github.io/api/#inject
- Inject []string
-
- // User defined symbols.
- Defines map[string]any
-
- // This tells esbuild to edit your source code before building to drop certain constructs.
- // See https://esbuild.github.io/api/#drop
- Drop string
-
- // Maps a component import to another.
- Shims map[string]string
-
- // Configuring a loader for a given file type lets you load that file type with an
- // import statement or a require call. For example, configuring the .png file extension
- // to use the data URL loader means importing a .png file gives you a data URL
- // containing the contents of that image
- //
- // See https://esbuild.github.io/api/#loader
- Loaders map[string]string
-
- // User defined params. Will be marshaled to JSON and available as "@params", e.g.
- // import * as params from '@params';
- Params any
-
- // What to use instead of React.createElement.
- JSXFactory string
-
- // What to use instead of React.Fragment.
- JSXFragment string
-
- // What to do about JSX syntax.
- // See https://esbuild.github.io/api/#jsx
- JSX string
-
- // Which library to use to automatically import JSX helper functions from. Only works if JSX is set to automatic.
- // See https://esbuild.github.io/api/#jsx-import-source
- JSXImportSource string
-
- // There is/was a bug in WebKit with severe performance issue with the tracking
- // of TDZ checks in JavaScriptCore.
- //
- // Enabling this flag removes the TDZ and `const` assignment checks and
- // may improve performance of larger JS codebases until the WebKit fix
- // is in widespread use.
- //
- // See https://bugs.webkit.org/show_bug.cgi?id=199866
- // Deprecated: This no longer have any effect and will be removed.
- // TODO(bep) remove. See https://github.com/evanw/esbuild/commit/869e8117b499ca1dbfc5b3021938a53ffe934dba
- AvoidTDZ bool
-}
-
-// InternalOptions holds internal options for the js.Build template function.
-type InternalOptions struct {
- MediaType media.Type
- OutDir string
- Contents string
- SourceDir string
- ResolveDir string
- AbsWorkingDir string
- Metafile bool
-
- StdinSourcePath string
-
- DependencyManager identity.Manager
-
- Stdin bool // Set to true to pass in the entry point as a byte slice.
- Splitting bool
- TsConfig string
- EntryPoints []string
- ImportOnResolveFunc func(string, api.OnResolveArgs) string
- ImportOnLoadFunc func(api.OnLoadArgs) string
- ImportParamsOnLoadFunc func(args api.OnLoadArgs) json.RawMessage
- ErrorMessageResolveFunc func(api.Message) *ErrorMessageResolved
- ResolveSourceMapSource func(string) string // Used to resolve paths in error source maps.
-}
-
-// Options holds the options passed to Build.
-type Options struct {
- ExternalOptions
- InternalOptions
-
- compiled api.BuildOptions
-}
-
-func (opts *Options) compile() (err error) {
- target, found := nameTarget[opts.Target]
- if !found {
- err = fmt.Errorf("invalid target: %q", opts.Target)
- return
- }
-
- var loaders map[string]api.Loader
- if opts.Loaders != nil {
- loaders = make(map[string]api.Loader)
- for k, v := range opts.Loaders {
- loader, found := nameLoader[v]
- if !found {
- err = fmt.Errorf("invalid loader: %q", v)
- return
- }
- loaders[k] = loader
- }
- }
-
- mediaType := opts.MediaType
- if mediaType.IsZero() {
- mediaType = media.Builtin.JavascriptType
- }
-
- var loader api.Loader
- switch mediaType.SubType {
- case media.Builtin.JavascriptType.SubType:
- loader = api.LoaderJS
- case media.Builtin.TypeScriptType.SubType:
- loader = api.LoaderTS
- case media.Builtin.TSXType.SubType:
- loader = api.LoaderTSX
- case media.Builtin.JSXType.SubType:
- loader = api.LoaderJSX
- default:
- err = fmt.Errorf("unsupported Media Type: %q", opts.MediaType)
- return
- }
-
- var format api.Format
- // One of: iife, cjs, esm
- switch opts.Format {
- case "", "iife":
- format = api.FormatIIFE
- case "esm":
- format = api.FormatESModule
- case "cjs":
- format = api.FormatCommonJS
- default:
- err = fmt.Errorf("unsupported script output format: %q", opts.Format)
- return
- }
-
- var jsx api.JSX
- switch opts.JSX {
- case "", "transform":
- jsx = api.JSXTransform
- case "preserve":
- jsx = api.JSXPreserve
- case "automatic":
- jsx = api.JSXAutomatic
- default:
- err = fmt.Errorf("unsupported jsx type: %q", opts.JSX)
- return
- }
-
- var platform api.Platform
- switch opts.Platform {
- case "", "browser":
- platform = api.PlatformBrowser
- case "node":
- platform = api.PlatformNode
- case "neutral":
- platform = api.PlatformNeutral
- default:
- err = fmt.Errorf("unsupported platform type: %q", opts.Platform)
- return
- }
-
- var defines map[string]string
- if opts.Defines != nil {
- defines = maps.ToStringMapString(opts.Defines)
- }
-
- var drop api.Drop
- switch opts.Drop {
- case "":
- case "console":
- drop = api.DropConsole
- case "debugger":
- drop = api.DropDebugger
- default:
- err = fmt.Errorf("unsupported drop type: %q", opts.Drop)
- }
-
- // By default we only need to specify outDir and no outFile
- outDir := opts.OutDir
- outFile := ""
- var sourceMap api.SourceMap
- switch opts.SourceMap {
- case "inline":
- sourceMap = api.SourceMapInline
- case "external":
- sourceMap = api.SourceMapExternal
- case "linked":
- sourceMap = api.SourceMapLinked
- case "", "none":
- sourceMap = api.SourceMapNone
- default:
- err = fmt.Errorf("unsupported sourcemap type: %q", opts.SourceMap)
- return
- }
-
- sourcesContent := api.SourcesContentInclude
- if !opts.SourcesContent {
- sourcesContent = api.SourcesContentExclude
- }
-
- opts.compiled = api.BuildOptions{
- Outfile: outFile,
- Bundle: true,
- Metafile: opts.Metafile,
- AbsWorkingDir: opts.AbsWorkingDir,
-
- Target: target,
- Format: format,
- Platform: platform,
- Sourcemap: sourceMap,
- SourcesContent: sourcesContent,
-
- Loader: loaders,
-
- MinifyWhitespace: opts.Minify,
- MinifyIdentifiers: opts.Minify,
- MinifySyntax: opts.Minify,
-
- Outdir: outDir,
- Splitting: opts.Splitting,
-
- Define: defines,
- External: opts.Externals,
- Drop: drop,
-
- JSXFactory: opts.JSXFactory,
- JSXFragment: opts.JSXFragment,
-
- JSX: jsx,
- JSXImportSource: opts.JSXImportSource,
-
- Tsconfig: opts.TsConfig,
-
- EntryPoints: opts.EntryPoints,
- }
-
- if opts.Stdin {
- // This makes ESBuild pass `stdin` as the Importer to the import.
- opts.compiled.Stdin = &api.StdinOptions{
- Contents: opts.Contents,
- ResolveDir: opts.ResolveDir,
- Loader: loader,
- }
- }
- return
-}
-
-func (o Options) loaderFromFilename(filename string) api.Loader {
- ext := filepath.Ext(filename)
- if optsLoaders := o.compiled.Loader; optsLoaders != nil {
- if l, found := optsLoaders[ext]; found {
- return l
- }
- }
- l, found := extensionToLoaderMap[ext]
- if found {
- return l
- }
- return api.LoaderJS
-}
-
-func (opts *Options) validate() error {
- if opts.ImportOnResolveFunc != nil && opts.ImportOnLoadFunc == nil {
- return fmt.Errorf("ImportOnLoadFunc must be set if ImportOnResolveFunc is set")
- }
- if opts.ImportOnResolveFunc == nil && opts.ImportOnLoadFunc != nil {
- return fmt.Errorf("ImportOnResolveFunc must be set if ImportOnLoadFunc is set")
- }
- if opts.AbsWorkingDir == "" {
- return fmt.Errorf("AbsWorkingDir must be set")
- }
- return nil
-}
diff --git a/internal/js/esbuild/options_test.go b/internal/js/esbuild/options_test.go
deleted file mode 100644
index e92c3bea6..000000000
--- a/internal/js/esbuild/options_test.go
+++ /dev/null
@@ -1,262 +0,0 @@
-// Copyright 2024 The Hugo Authors. All rights reserved.
-//
-// 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.
-
-package esbuild
-
-import (
- "testing"
-
- "github.com/gohugoio/hugo/media"
-
- "github.com/evanw/esbuild/pkg/api"
-
- qt "github.com/frankban/quicktest"
-)
-
-func TestToBuildOptions(t *testing.T) {
- c := qt.New(t)
-
- opts := Options{
- InternalOptions: InternalOptions{
- MediaType: media.Builtin.JavascriptType,
- Stdin: true,
- },
- }
-
- c.Assert(opts.compile(), qt.IsNil)
- c.Assert(opts.compiled, qt.DeepEquals, api.BuildOptions{
- Bundle: true,
- Target: api.ESNext,
- Format: api.FormatIIFE,
- Platform: api.PlatformBrowser,
- SourcesContent: 1,
- Stdin: &api.StdinOptions{
- Loader: api.LoaderJS,
- },
- })
-
- opts = Options{
- ExternalOptions: ExternalOptions{
- Target: "es2018",
- Format: "cjs",
- Minify: true,
- AvoidTDZ: true,
- },
- InternalOptions: InternalOptions{
- MediaType: media.Builtin.JavascriptType,
- Stdin: true,
- },
- }
-
- c.Assert(opts.compile(), qt.IsNil)
- c.Assert(opts.compiled, qt.DeepEquals, api.BuildOptions{
- Bundle: true,
- Target: api.ES2018,
- Format: api.FormatCommonJS,
- Platform: api.PlatformBrowser,
- SourcesContent: 1,
- MinifyIdentifiers: true,
- MinifySyntax: true,
- MinifyWhitespace: true,
- Stdin: &api.StdinOptions{
- Loader: api.LoaderJS,
- },
- })
-
- opts = Options{
- ExternalOptions: ExternalOptions{
- Target: "es2018", Format: "cjs", Minify: true,
- SourceMap: "inline",
- },
- InternalOptions: InternalOptions{
- MediaType: media.Builtin.JavascriptType,
- Stdin: true,
- },
- }
-
- c.Assert(opts.compile(), qt.IsNil)
- c.Assert(opts.compiled, qt.DeepEquals, api.BuildOptions{
- Bundle: true,
- Target: api.ES2018,
- Format: api.FormatCommonJS,
- Platform: api.PlatformBrowser,
- MinifyIdentifiers: true,
- MinifySyntax: true,
- MinifyWhitespace: true,
- SourcesContent: 1,
- Sourcemap: api.SourceMapInline,
- Stdin: &api.StdinOptions{
- Loader: api.LoaderJS,
- },
- })
-
- opts = Options{
- ExternalOptions: ExternalOptions{
- Target: "es2018", Format: "cjs", Minify: true,
- SourceMap: "inline",
- },
- InternalOptions: InternalOptions{
- MediaType: media.Builtin.JavascriptType,
- Stdin: true,
- },
- }
-
- c.Assert(opts.compile(), qt.IsNil)
- c.Assert(opts.compiled, qt.DeepEquals, api.BuildOptions{
- Bundle: true,
- Target: api.ES2018,
- Format: api.FormatCommonJS,
- Platform: api.PlatformBrowser,
- MinifyIdentifiers: true,
- MinifySyntax: true,
- MinifyWhitespace: true,
- Sourcemap: api.SourceMapInline,
- SourcesContent: 1,
- Stdin: &api.StdinOptions{
- Loader: api.LoaderJS,
- },
- })
-
- opts = Options{
- ExternalOptions: ExternalOptions{
- Target: "es2018", Format: "cjs", Minify: true,
- SourceMap: "external",
- },
- InternalOptions: InternalOptions{
- MediaType: media.Builtin.JavascriptType,
- Stdin: true,
- },
- }
-
- c.Assert(opts.compile(), qt.IsNil)
- c.Assert(opts.compiled, qt.DeepEquals, api.BuildOptions{
- Bundle: true,
- Target: api.ES2018,
- Format: api.FormatCommonJS,
- Platform: api.PlatformBrowser,
- MinifyIdentifiers: true,
- MinifySyntax: true,
- MinifyWhitespace: true,
- Sourcemap: api.SourceMapExternal,
- SourcesContent: 1,
- Stdin: &api.StdinOptions{
- Loader: api.LoaderJS,
- },
- })
-
- opts = Options{
- ExternalOptions: ExternalOptions{
- JSX: "automatic", JSXImportSource: "preact",
- },
- InternalOptions: InternalOptions{
- MediaType: media.Builtin.JavascriptType,
- Stdin: true,
- },
- }
-
- c.Assert(opts.compile(), qt.IsNil)
- c.Assert(opts.compiled, qt.DeepEquals, api.BuildOptions{
- Bundle: true,
- Target: api.ESNext,
- Format: api.FormatIIFE,
- Platform: api.PlatformBrowser,
- SourcesContent: 1,
- Stdin: &api.StdinOptions{
- Loader: api.LoaderJS,
- },
- JSX: api.JSXAutomatic,
- JSXImportSource: "preact",
- })
-
- opts = Options{
- ExternalOptions: ExternalOptions{
- Drop: "console",
- },
- }
- c.Assert(opts.compile(), qt.IsNil)
- c.Assert(opts.compiled.Drop, qt.Equals, api.DropConsole)
- opts = Options{
- ExternalOptions: ExternalOptions{
- Drop: "debugger",
- },
- }
- c.Assert(opts.compile(), qt.IsNil)
- c.Assert(opts.compiled.Drop, qt.Equals, api.DropDebugger)
-
- opts = Options{
- ExternalOptions: ExternalOptions{
- Drop: "adsfadsf",
- },
- }
- c.Assert(opts.compile(), qt.ErrorMatches, `unsupported drop type: "adsfadsf"`)
-}
-
-func TestToBuildOptionsTarget(t *testing.T) {
- c := qt.New(t)
-
- for _, test := range []struct {
- target string
- expect api.Target
- }{
- {"es2015", api.ES2015},
- {"es2016", api.ES2016},
- {"es2017", api.ES2017},
- {"es2018", api.ES2018},
- {"es2019", api.ES2019},
- {"es2020", api.ES2020},
- {"es2021", api.ES2021},
- {"es2022", api.ES2022},
- {"es2023", api.ES2023},
- {"", api.ESNext},
- {"esnext", api.ESNext},
- } {
- c.Run(test.target, func(c *qt.C) {
- opts := Options{
- ExternalOptions: ExternalOptions{
- Target: test.target,
- },
- InternalOptions: InternalOptions{
- MediaType: media.Builtin.JavascriptType,
- },
- }
-
- c.Assert(opts.compile(), qt.IsNil)
- c.Assert(opts.compiled.Target, qt.Equals, test.expect)
- })
- }
-}
-
-func TestDecodeExternalOptions(t *testing.T) {
- c := qt.New(t)
- m := map[string]any{
- "platform": "node",
- }
- ext, err := DecodeExternalOptions(m)
- c.Assert(err, qt.IsNil)
- c.Assert(ext, qt.DeepEquals, ExternalOptions{
- SourcesContent: true,
- Platform: "node",
- })
-
- opts := Options{
- ExternalOptions: ext,
- }
- c.Assert(opts.compile(), qt.IsNil)
- c.Assert(opts.compiled, qt.DeepEquals, api.BuildOptions{
- Bundle: true,
- Target: api.ESNext,
- Format: api.FormatIIFE,
- Platform: api.PlatformNode,
- SourcesContent: api.SourcesContentInclude,
- })
-}
diff --git a/internal/js/esbuild/resolve.go b/internal/js/esbuild/resolve.go
deleted file mode 100644
index a2516dbd2..000000000
--- a/internal/js/esbuild/resolve.go
+++ /dev/null
@@ -1,323 +0,0 @@
-// Copyright 2024 The Hugo Authors. All rights reserved.
-//
-// 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.
-
-package esbuild
-
-import (
- "encoding/json"
- "fmt"
- "os"
- "path/filepath"
- "strings"
-
- "github.com/evanw/esbuild/pkg/api"
- "github.com/gohugoio/hugo/common/maps"
- "github.com/gohugoio/hugo/hugofs"
- "github.com/gohugoio/hugo/identity"
- "github.com/gohugoio/hugo/resources"
- "github.com/gohugoio/hugo/resources/resource"
- "github.com/spf13/afero"
- "slices"
-)
-
-const (
- NsHugoImport = "ns-hugo-imp"
- NsHugoImportResolveFunc = "ns-hugo-imp-func"
- nsHugoParams = "ns-hugo-params"
- pathHugoConfigParams = "@params/config"
-
- stdinImporter = ""
-)
-
-var hugoNamespaces = []string{NsHugoImport, NsHugoImportResolveFunc, nsHugoParams}
-
-const (
- PrefixHugoVirtual = "__hu_v"
- PrefixHugoMemory = "__hu_m"
-)
-
-var extensionToLoaderMap = map[string]api.Loader{
- ".js": api.LoaderJS,
- ".mjs": api.LoaderJS,
- ".cjs": api.LoaderJS,
- ".jsx": api.LoaderJSX,
- ".ts": api.LoaderTS,
- ".tsx": api.LoaderTSX,
- ".css": api.LoaderCSS,
- ".json": api.LoaderJSON,
- ".txt": api.LoaderText,
-}
-
-// This is a common sub-set of ESBuild's default extensions.
-// We assume that imports of JSON, CSS etc. will be using their full
-// name with extension.
-var commonExtensions = []string{".js", ".ts", ".tsx", ".jsx"}
-
-// ResolveComponent resolves a component using the given resolver.
-func ResolveComponent[T any](impPath string, resolve func(string) (v T, found, isDir bool)) (v T, found bool) {
- findFirst := func(base string) (v T, found, isDir bool) {
- for _, ext := range commonExtensions {
- if strings.HasSuffix(impPath, ext) {
- // Import of foo.js.js need the full name.
- continue
- }
- if v, found, isDir = resolve(base + ext); found {
- return
- }
- }
-
- // Not found.
- return
- }
-
- // We need to check if this is a regular file imported without an extension.
- // There may be ambiguous situations where both foo.js and foo/index.js exists.
- // This import order is in line with both how Node and ESBuild's native
- // import resolver works.
-
- // It may be a regular file imported without an extension, e.g.
- // foo or foo/index.
- v, found, _ = findFirst(impPath)
- if found {
- return v, found
- }
-
- base := filepath.Base(impPath)
- if base == "index" {
- // try index.esm.js etc.
- v, found, _ = findFirst(impPath + ".esm")
- if found {
- return v, found
- }
- }
-
- // Check the path as is.
- var isDir bool
- v, found, isDir = resolve(impPath)
- if found && isDir {
- v, found, _ = findFirst(filepath.Join(impPath, "index"))
- if !found {
- v, found, _ = findFirst(filepath.Join(impPath, "index.esm"))
- }
- }
-
- if !found && strings.HasSuffix(base, ".js") {
- v, found, _ = findFirst(strings.TrimSuffix(impPath, ".js"))
- }
-
- return
-}
-
-// ResolveResource resolves a resource using the given resourceGetter.
-func ResolveResource(impPath string, resourceGetter resource.ResourceGetter) (r resource.Resource) {
- resolve := func(name string) (v resource.Resource, found, isDir bool) {
- r := resourceGetter.Get(name)
- return r, r != nil, false
- }
- r, found := ResolveComponent(impPath, resolve)
- if !found {
- return nil
- }
- return r
-}
-
-func newFSResolver(fs afero.Fs) *fsResolver {
- return &fsResolver{fs: fs, resolved: maps.NewCache[string, *hugofs.FileMeta]()}
-}
-
-type fsResolver struct {
- fs afero.Fs
- resolved *maps.Cache[string, *hugofs.FileMeta]
-}
-
-func (r *fsResolver) resolveComponent(impPath string) *hugofs.FileMeta {
- v, _ := r.resolved.GetOrCreate(impPath, func() (*hugofs.FileMeta, error) {
- resolve := func(name string) (*hugofs.FileMeta, bool, bool) {
- if fi, err := r.fs.Stat(name); err == nil {
- return fi.(hugofs.FileMetaInfo).Meta(), true, fi.IsDir()
- }
- return nil, false, false
- }
- v, _ := ResolveComponent(impPath, resolve)
- return v, nil
- })
- return v
-}
-
-func createBuildPlugins(rs *resources.Spec, assetsResolver *fsResolver, depsManager identity.Manager, opts Options) ([]api.Plugin, error) {
- fs := rs.Assets
-
- resolveImport := func(args api.OnResolveArgs) (api.OnResolveResult, error) {
- impPath := args.Path
- shimmed := false
- if opts.Shims != nil {
- override, found := opts.Shims[impPath]
- if found {
- impPath = override
- shimmed = true
- }
- }
-
- if slices.Contains(opts.Externals, impPath) {
- return api.OnResolveResult{
- Path: impPath,
- External: true,
- }, nil
- }
-
- if opts.ImportOnResolveFunc != nil {
- if s := opts.ImportOnResolveFunc(impPath, args); s != "" {
- return api.OnResolveResult{Path: s, Namespace: NsHugoImportResolveFunc}, nil
- }
- }
-
- importer := args.Importer
-
- isStdin := importer == stdinImporter
- var relDir string
- if !isStdin {
- if strings.HasPrefix(importer, PrefixHugoVirtual) {
- relDir = filepath.Dir(strings.TrimPrefix(importer, PrefixHugoVirtual))
- } else {
- rel, found := fs.MakePathRelative(importer, true)
-
- if !found {
- if shimmed {
- relDir = opts.SourceDir
- } else {
- // Not in any of the /assets folders.
- // This is an import from a node_modules, let
- // ESBuild resolve this.
- return api.OnResolveResult{}, nil
- }
- } else {
- relDir = filepath.Dir(rel)
- }
- }
- } else {
- relDir = opts.SourceDir
- }
-
- // Imports not starting with a "." is assumed to live relative to /assets.
- // Hugo makes no assumptions about the directory structure below /assets.
- if relDir != "" && strings.HasPrefix(impPath, ".") {
- impPath = filepath.Join(relDir, impPath)
- }
-
- m := assetsResolver.resolveComponent(impPath)
-
- if m != nil {
- depsManager.AddIdentity(m.PathInfo)
-
- // Store the source root so we can create a jsconfig.json
- // to help IntelliSense when the build is done.
- // This should be a small number of elements, and when
- // in server mode, we may get stale entries on renames etc.,
- // but that shouldn't matter too much.
- rs.JSConfigBuilder.AddSourceRoot(m.SourceRoot)
- return api.OnResolveResult{Path: m.Filename, Namespace: NsHugoImport}, nil
- }
-
- // Fall back to ESBuild's resolve.
- return api.OnResolveResult{}, nil
- }
-
- importResolver := api.Plugin{
- Name: "hugo-import-resolver",
- Setup: func(build api.PluginBuild) {
- build.OnResolve(api.OnResolveOptions{Filter: `.*`},
- func(args api.OnResolveArgs) (api.OnResolveResult, error) {
- return resolveImport(args)
- })
- build.OnLoad(api.OnLoadOptions{Filter: `.*`, Namespace: NsHugoImport},
- func(args api.OnLoadArgs) (api.OnLoadResult, error) {
- b, err := os.ReadFile(args.Path)
- if err != nil {
- return api.OnLoadResult{}, fmt.Errorf("failed to read %q: %w", args.Path, err)
- }
- c := string(b)
-
- return api.OnLoadResult{
- // See https://github.com/evanw/esbuild/issues/502
- // This allows all modules to resolve dependencies
- // in the main project's node_modules.
- ResolveDir: opts.ResolveDir,
- Contents: &c,
- Loader: opts.loaderFromFilename(args.Path),
- }, nil
- })
- build.OnLoad(api.OnLoadOptions{Filter: `.*`, Namespace: NsHugoImportResolveFunc},
- func(args api.OnLoadArgs) (api.OnLoadResult, error) {
- c := opts.ImportOnLoadFunc(args)
- if c == "" {
- return api.OnLoadResult{}, fmt.Errorf("ImportOnLoadFunc failed to resolve %q", args.Path)
- }
-
- return api.OnLoadResult{
- ResolveDir: opts.ResolveDir,
- Contents: &c,
- Loader: opts.loaderFromFilename(args.Path),
- }, nil
- })
- },
- }
-
- params := opts.Params
- if params == nil {
- // This way @params will always resolve to something.
- params = make(map[string]any)
- }
-
- b, err := json.Marshal(params)
- if err != nil {
- return nil, fmt.Errorf("failed to marshal params: %w", err)
- }
-
- paramsPlugin := api.Plugin{
- Name: "hugo-params-plugin",
- Setup: func(build api.PluginBuild) {
- build.OnResolve(api.OnResolveOptions{Filter: `^@params(/config)?$`},
- func(args api.OnResolveArgs) (api.OnResolveResult, error) {
- resolvedPath := args.Importer
-
- if args.Path == pathHugoConfigParams {
- resolvedPath = pathHugoConfigParams
- }
-
- return api.OnResolveResult{
- Path: resolvedPath,
- Namespace: nsHugoParams,
- }, nil
- })
- build.OnLoad(api.OnLoadOptions{Filter: `.*`, Namespace: nsHugoParams},
- func(args api.OnLoadArgs) (api.OnLoadResult, error) {
- bb := b
- if args.Path != pathHugoConfigParams && opts.ImportParamsOnLoadFunc != nil {
- bb = opts.ImportParamsOnLoadFunc(args)
- }
- s := string(bb)
-
- if s == "" {
- s = "{}"
- }
-
- return api.OnLoadResult{
- Contents: &s,
- Loader: api.LoaderJSON,
- }, nil
- })
- },
- }
-
- return []api.Plugin{importResolver, paramsPlugin}, nil
-}
diff --git a/internal/js/esbuild/resolve_test.go b/internal/js/esbuild/resolve_test.go
deleted file mode 100644
index 86e3138f2..000000000
--- a/internal/js/esbuild/resolve_test.go
+++ /dev/null
@@ -1,86 +0,0 @@
-// Copyright 2024 The Hugo Authors. All rights reserved.
-//
-// 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.
-
-package esbuild
-
-import (
- "path"
- "path/filepath"
- "testing"
-
- qt "github.com/frankban/quicktest"
- "github.com/gohugoio/hugo/config"
- "github.com/gohugoio/hugo/config/testconfig"
- "github.com/gohugoio/hugo/hugofs"
- "github.com/gohugoio/hugo/hugolib/filesystems"
- "github.com/gohugoio/hugo/hugolib/paths"
- "github.com/spf13/afero"
-)
-
-func TestResolveComponentInAssets(t *testing.T) {
- c := qt.New(t)
-
- for _, test := range []struct {
- name string
- files []string
- impPath string
- expect string
- }{
- {"Basic, extension", []string{"foo.js", "bar.js"}, "foo.js", "foo.js"},
- {"Basic, no extension", []string{"foo.js", "bar.js"}, "foo", "foo.js"},
- {"Basic, no extension, typescript", []string{"foo.ts", "bar.js"}, "foo", "foo.ts"},
- {"Not found", []string{"foo.js", "bar.js"}, "moo.js", ""},
- {"Not found, double js extension", []string{"foo.js.js", "bar.js"}, "foo.js", ""},
- {"Index file, folder only", []string{"foo/index.js", "bar.js"}, "foo", "foo/index.js"},
- {"Index file, folder and index", []string{"foo/index.js", "bar.js"}, "foo/index", "foo/index.js"},
- {"Index file, folder and index and suffix", []string{"foo/index.js", "bar.js"}, "foo/index.js", "foo/index.js"},
- {"Index ESM file, folder only", []string{"foo/index.esm.js", "bar.js"}, "foo", "foo/index.esm.js"},
- {"Index ESM file, folder and index", []string{"foo/index.esm.js", "bar.js"}, "foo/index", "foo/index.esm.js"},
- {"Index ESM file, folder and index and suffix", []string{"foo/index.esm.js", "bar.js"}, "foo/index.esm.js", "foo/index.esm.js"},
- // We added these index.esm.js cases in v0.101.0. The case below is unlikely to happen in the wild, but add a test
- // to document Hugo's behavior. We pick the file with the name index.js; anything else would be breaking.
- {"Index and Index ESM file, folder only", []string{"foo/index.esm.js", "foo/index.js", "bar.js"}, "foo", "foo/index.js"},
-
- // Issue #8949
- {"Check file before directory", []string{"foo.js", "foo/index.js"}, "foo", "foo.js"},
- } {
- c.Run(test.name, func(c *qt.C) {
- baseDir := "assets"
- mfs := afero.NewMemMapFs()
-
- for _, filename := range test.files {
- c.Assert(afero.WriteFile(mfs, filepath.Join(baseDir, filename), []byte("let foo='bar';"), 0o777), qt.IsNil)
- }
-
- conf := testconfig.GetTestConfig(mfs, config.New())
- fs := hugofs.NewFrom(mfs, conf.BaseConfig())
-
- p, err := paths.New(fs, conf)
- c.Assert(err, qt.IsNil)
- bfs, err := filesystems.NewBase(p, nil)
- c.Assert(err, qt.IsNil)
- resolver := newFSResolver(bfs.Assets.Fs)
-
- got := resolver.resolveComponent(test.impPath)
-
- gotPath := ""
- expect := test.expect
- if got != nil {
- gotPath = filepath.ToSlash(got.Filename)
- expect = path.Join(baseDir, test.expect)
- }
-
- c.Assert(gotPath, qt.Equals, expect)
- })
- }
-}
diff --git a/internal/js/esbuild/sourcemap.go b/internal/js/esbuild/sourcemap.go
deleted file mode 100644
index 647f0c081..000000000
--- a/internal/js/esbuild/sourcemap.go
+++ /dev/null
@@ -1,80 +0,0 @@
-// Copyright 2024 The Hugo Authors. All rights reserved.
-//
-// 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.
-
-package esbuild
-
-import (
- "encoding/json"
- "strings"
-
- "github.com/evanw/esbuild/pkg/api"
- "github.com/gohugoio/hugo/common/paths"
-)
-
-type sourceMap struct {
- Version int `json:"version"`
- Sources []string `json:"sources"`
- SourcesContent []string `json:"sourcesContent"`
- Mappings string `json:"mappings"`
- Names []string `json:"names"`
-}
-
-func fixOutputFile(o *api.OutputFile, resolve func(string) string) error {
- if strings.HasSuffix(o.Path, ".map") {
- b, err := fixSourceMap(o.Contents, resolve)
- if err != nil {
- return err
- }
- o.Contents = b
- }
- return nil
-}
-
-func fixSourceMap(s []byte, resolve func(string) string) ([]byte, error) {
- var sm sourceMap
- if err := json.Unmarshal([]byte(s), &sm); err != nil {
- return nil, err
- }
-
- sm.Sources = fixSourceMapSources(sm.Sources, resolve)
-
- b, err := json.Marshal(sm)
- if err != nil {
- return nil, err
- }
-
- return b, nil
-}
-
-func fixSourceMapSources(s []string, resolve func(string) string) []string {
- var result []string
- for _, src := range s {
- if s := resolve(src); s != "" {
- // Absolute filenames works fine on U*ix (tested in Chrome on MacOs), but works very poorly on Windows (again Chrome).
- // So, convert it to a URL.
- if u, err := paths.UrlFromFilename(s); err == nil {
- result = append(result, u.String())
- }
- }
- }
- return result
-}
-
-// Used in tests.
-func SourcesFromSourceMap(s string) []string {
- var sm sourceMap
- if err := json.Unmarshal([]byte(s), &sm); err != nil {
- return nil
- }
- return sm.Sources
-}
diff --git a/internal/warpc/build.sh b/internal/warpc/build.sh
deleted file mode 100755
index 5e75aa381..000000000
--- a/internal/warpc/build.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-# TODO1 clean up when done.
-go generate ./gen
-javy compile js/greet.bundle.js -d -o wasm/greet.wasm
-javy compile js/renderkatex.bundle.js -d -o wasm/renderkatex.wasm
-touch warpc_test.go
\ No newline at end of file
diff --git a/internal/warpc/gen/main.go b/internal/warpc/gen/main.go
deleted file mode 100644
index d3d6562a9..000000000
--- a/internal/warpc/gen/main.go
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright 2024 The Hugo Authors. All rights reserved.
-//
-// 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.
-
-//go:generate go run main.go
-package main
-
-import (
- "fmt"
- "log"
- "os"
- "path/filepath"
- "strings"
-
- "github.com/evanw/esbuild/pkg/api"
-)
-
-var scripts = []string{
- "greet.js",
- "renderkatex.js",
-}
-
-func main() {
- for _, script := range scripts {
- filename := filepath.Join("../js", script)
- err := buildJSBundle(filename)
- if err != nil {
- log.Fatal(err)
- }
- }
-}
-
-func buildJSBundle(filename string) error {
- minify := true
- result := api.Build(
- api.BuildOptions{
- EntryPoints: []string{filename},
- Bundle: true,
- MinifyWhitespace: minify,
- MinifyIdentifiers: minify,
- MinifySyntax: minify,
- Target: api.ES2020,
- Outfile: strings.Replace(filename, ".js", ".bundle.js", 1),
- SourceRoot: "../js",
- })
-
- if len(result.Errors) > 0 {
- return fmt.Errorf("build failed: %v", result.Errors)
- }
- if len(result.OutputFiles) != 1 {
- return fmt.Errorf("expected 1 output file, got %d", len(result.OutputFiles))
- }
-
- of := result.OutputFiles[0]
- if err := os.WriteFile(filepath.FromSlash(of.Path), of.Contents, 0o644); err != nil {
- return fmt.Errorf("write file failed: %v", err)
- }
- return nil
-}
diff --git a/internal/warpc/js/.gitignore b/internal/warpc/js/.gitignore
deleted file mode 100644
index ccb2c800f..000000000
--- a/internal/warpc/js/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-node_modules/
-package-lock.json
\ No newline at end of file
diff --git a/internal/warpc/js/common.js b/internal/warpc/js/common.js
deleted file mode 100644
index 61c535fb7..000000000
--- a/internal/warpc/js/common.js
+++ /dev/null
@@ -1,83 +0,0 @@
-// Read JSONL from stdin.
-export function readInput(handle) {
- const buffSize = 1024;
- let currentLine = [];
- const buffer = new Uint8Array(buffSize);
-
- // These are not implemented by QuickJS.
- console.warn = (value) => {
- console.log(value);
- };
-
- console.error = (value) => {
- throw new Error(value);
- };
-
- // Read all the available bytes
- while (true) {
- // Stdin file descriptor
- const fd = 0;
- let bytesRead = 0;
- try {
- bytesRead = Javy.IO.readSync(fd, buffer);
- } catch (e) {
- // IO.readSync fails with os error 29 when stdin closes.
- if (e.message.includes('os error 29')) {
- break;
- }
- throw new Error('Error reading from stdin');
- }
-
- if (bytesRead < 0) {
- throw new Error('Error reading from stdin');
- break;
- }
-
- if (bytesRead === 0) {
- break;
- }
-
- currentLine = [...currentLine, ...buffer.subarray(0, bytesRead)];
-
- // Check for newline. If not, we need to read more data.
- if (!currentLine.includes(10)) {
- continue;
- }
-
- // Split array into chunks by newline.
- let i = 0;
- for (let j = 0; i < currentLine.length; i++) {
- if (currentLine[i] === 10) {
- const chunk = currentLine.splice(j, i + 1);
- const arr = new Uint8Array(chunk);
- let message;
- try {
- message = JSON.parse(new TextDecoder().decode(arr));
- } catch (e) {
- throw new Error(`Error parsing JSON '${new TextDecoder().decode(arr)}' from stdin: ${e.message}`);
- }
-
- try {
- handle(message);
- } catch (e) {
- let header = message.header;
- header.err = e.message;
- writeOutput({ header: header });
- }
-
- j = i + 1;
- }
- }
- // Remove processed data.
- currentLine = currentLine.slice(i);
- }
-}
-
-// Write JSONL to stdout
-export function writeOutput(output) {
- const encodedOutput = new TextEncoder().encode(JSON.stringify(output) + '\n');
- const buffer = new Uint8Array(encodedOutput);
- // Stdout file descriptor
- const fd = 1;
- Javy.IO.writeSync(fd, buffer);
-}
diff --git a/internal/warpc/js/greet.bundle.js b/internal/warpc/js/greet.bundle.js
deleted file mode 100644
index 6828d582a..000000000
--- a/internal/warpc/js/greet.bundle.js
+++ /dev/null
@@ -1,2 +0,0 @@
-(()=>{function w(r){let e=[],c=new Uint8Array(1024);for(console.warn=n=>{console.log(n)},console.error=n=>{throw new Error(n)};;){let o=0;try{o=Javy.IO.readSync(0,c)}catch(a){if(a.message.includes("os error 29"))break;throw new Error("Error reading from stdin")}if(o<0)throw new Error("Error reading from stdin");if(o===0)break;if(e=[...e,...c.subarray(0,o)],!e.includes(10))continue;let t=0;for(let a=0;t{function Wt(r){let t=[],a=new Uint8Array(1024);for(console.warn=n=>{console.log(n)},console.error=n=>{throw new Error(n)};;){let s=0;try{s=Javy.IO.readSync(0,a)}catch(h){if(h.message.includes("os error 29"))break;throw new Error("Error reading from stdin")}if(s<0)throw new Error("Error reading from stdin");if(s===0)break;if(t=[...t,...a.subarray(0,s)],!t.includes(10))continue;let l=0;for(let h=0;l15?f="\u2026"+h.slice(n-15,n):f=h.slice(0,n);var v;s+15":">","<":"<",'"':""","'":"'"},Ba=/[&><"']/g;function Da(r){return String(r).replace(Ba,e=>qa[e])}var zr=function r(e){return e.type==="ordgroup"||e.type==="color"?e.body.length===1?r(e.body[0]):e:e.type==="font"?r(e.body):e},Ca=function(e){var t=zr(e);return t.type==="mathord"||t.type==="textord"||t.type==="atom"},_a=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e},Na=function(e){var t=/^[\x00-\x20]*([^\\/#?]*?)(:|*58|*3a|&colon)/i.exec(e);return t?t[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?null:t[1].toLowerCase():"_relative"},O={contains:Ma,deflt:za,escape:Da,hyphenate:Ta,getBaseElem:zr,isCharacterBox:Ca,protocolFromUrl:Na},Oe={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format "},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color ",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:r=>"#"+r},macros:{type:"object",cli:"-m, --macro ",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(r,e)=>(e.push(r),e)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:r=>Math.max(0,r),cli:"--min-rule-thickness ",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:r=>Math.max(0,r),cli:"-s, --max-size ",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:r=>Math.max(0,r),cli:"-e, --max-expand ",cliProcessor:r=>r==="Infinity"?1/0:parseInt(r)},globalGroup:{type:"boolean",cli:!1}};function Oa(r){if(r.default)return r.default;var e=r.type,t=Array.isArray(e)?e[0]:e;if(typeof t!="string")return t.enum[0];switch(t){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}var de=class{constructor(e){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{};for(var t in Oe)if(Oe.hasOwnProperty(t)){var a=Oe[t];this[t]=e[t]!==void 0?a.processor?a.processor(e[t]):e[t]:Oa(a)}}reportNonstrict(e,t,a){var n=this.strict;if(typeof n=="function"&&(n=n(e,t,a)),!(!n||n==="ignore")){if(n===!0||n==="error")throw new z("LaTeX-incompatible input and strict mode is set to 'error': "+(t+" ["+e+"]"),a);n==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(t+" ["+e+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+n+"': "+t+" ["+e+"]"))}}useStrictBehavior(e,t,a){var n=this.strict;if(typeof n=="function")try{n=n(e,t,a)}catch{n="error"}return!n||n==="ignore"?!1:n===!0||n==="error"?!0:n==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(t+" ["+e+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+n+"': "+t+" ["+e+"]")),!1)}isTrusted(e){if(e.url&&!e.protocol){var t=O.protocolFromUrl(e.url);if(t==null)return!1;e.protocol=t}var a=typeof this.trust=="function"?this.trust(e):this.trust;return!!a}},k0=class{constructor(e,t,a){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=a}sup(){return M0[Ia[this.id]]}sub(){return M0[Ea[this.id]]}fracNum(){return M0[Ra[this.id]]}fracDen(){return M0[$a[this.id]]}cramp(){return M0[La[this.id]]}text(){return M0[Fa[this.id]]}isTight(){return this.size>=2}},At=0,Ee=1,ae=2,N0=3,pe=4,v0=5,ne=6,o0=7,M0=[new k0(At,0,!1),new k0(Ee,0,!0),new k0(ae,1,!1),new k0(N0,1,!0),new k0(pe,2,!1),new k0(v0,2,!0),new k0(ne,3,!1),new k0(o0,3,!0)],Ia=[pe,v0,pe,v0,ne,o0,ne,o0],Ea=[v0,v0,v0,v0,o0,o0,o0,o0],Ra=[ae,N0,pe,v0,ne,o0,ne,o0],$a=[N0,N0,v0,v0,o0,o0,o0,o0],La=[Ee,Ee,N0,N0,v0,v0,o0,o0],Fa=[At,Ee,ae,N0,ae,N0,ae,N0],E={DISPLAY:M0[At],TEXT:M0[ae],SCRIPT:M0[pe],SCRIPTSCRIPT:M0[ne]},pt=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function Ha(r){for(var e=0;e=n[0]&&r<=n[1])return t.name}return null}var Ie=[];pt.forEach(r=>r.blocks.forEach(e=>Ie.push(...e)));function Ar(r){for(var e=0;e=Ie[e]&&r<=Ie[e+1])return!0;return!1}var re=80,Pa=function(e,t){return"M95,"+(622+e+t)+`
-c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
-c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
-c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
-s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429
-c69,-144,104.5,-217.7,106.5,-221
-l`+e/2.075+" -"+e+`
-c5.3,-9.3,12,-14,20,-14
-H400000v`+(40+e)+`H845.2724
-s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7
-c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z
-M`+(834+e)+" "+t+"h400000v"+(40+e)+"h-400000z"},Ga=function(e,t){return"M263,"+(601+e+t)+`c0.7,0,18,39.7,52,119
-c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120
-c340,-704.7,510.7,-1060.3,512,-1067
-l`+e/2.084+" -"+e+`
-c4.7,-7.3,11,-11,19,-11
-H40000v`+(40+e)+`H1012.3
-s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232
-c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1
-s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26
-c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z
-M`+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"},Va=function(e,t){return"M983 "+(10+e+t)+`
-l`+e/3.13+" -"+e+`
-c4,-6.7,10,-10,18,-10 H400000v`+(40+e)+`
-H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7
-s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744
-c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30
-c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722
-c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5
-c53.7,-170.3,84.5,-266.8,92.5,-289.5z
-M`+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"},Ua=function(e,t){return"M424,"+(2398+e+t)+`
-c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514
-c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20
-s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121
-s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081
-l`+e/4.223+" -"+e+`c4,-6.7,10,-10,18,-10 H400000
-v`+(40+e)+`H1014.6
-s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185
-c-2,6,-10,9,-24,9
-c-8,0,-12,-0.7,-12,-2z M`+(1001+e)+" "+t+`
-h400000v`+(40+e)+"h-400000z"},Xa=function(e,t){return"M473,"+(2713+e+t)+`
-c339.3,-1799.3,509.3,-2700,510,-2702 l`+e/5.298+" -"+e+`
-c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+e)+`H1017.7
-s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9
-c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200
-c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26
-s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,
-606zM`+(1001+e)+" "+t+"h400000v"+(40+e)+"H1017.7z"},Wa=function(e){var t=e/2;return"M400000 "+e+" H0 L"+t+" 0 l65 45 L145 "+(e-80)+" H400000z"},Ya=function(e,t,a){var n=a-54-t-e;return"M702 "+(e+t)+"H400000"+(40+e)+`
-H742v`+n+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1
-h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
-c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
-219 661 l218 661zM702 `+t+"H400000v"+(40+e)+"H742z"},Za=function(e,t,a){t=1e3*t;var n="";switch(e){case"sqrtMain":n=Pa(t,re);break;case"sqrtSize1":n=Ga(t,re);break;case"sqrtSize2":n=Va(t,re);break;case"sqrtSize3":n=Ua(t,re);break;case"sqrtSize4":n=Xa(t,re);break;case"sqrtTall":n=Ya(t,re,a)}return n},ja=function(e,t){switch(e){case"\u239C":return"M291 0 H417 V"+t+" H291z M291 0 H417 V"+t+" H291z";case"\u2223":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145z";case"\u2225":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145z"+("M367 0 H410 V"+t+" H367z M367 0 H410 V"+t+" H367z");case"\u239F":return"M457 0 H583 V"+t+" H457z M457 0 H583 V"+t+" H457z";case"\u23A2":return"M319 0 H403 V"+t+" H319z M319 0 H403 V"+t+" H319z";case"\u23A5":return"M263 0 H347 V"+t+" H263z M263 0 H347 V"+t+" H263z";case"\u23AA":return"M384 0 H504 V"+t+" H384z M384 0 H504 V"+t+" H384z";case"\u23D0":return"M312 0 H355 V"+t+" H312z M312 0 H355 V"+t+" H312z";case"\u2016":return"M257 0 H300 V"+t+" H257z M257 0 H300 V"+t+" H257z"+("M478 0 H521 V"+t+" H478z M478 0 H521 V"+t+" H478z");default:return""}},Yt={doubleleftarrow:`M262 157
-l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3
- 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28
- 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5
-c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5
- 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87
--86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
--2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
-m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
--10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5
- 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88
--33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68
--17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18
--13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
-c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3
--107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
- 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8
--5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247
-c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208
- 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3
- 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202
- l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
--45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
- 5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13
- 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688
- 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
--331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80
-H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0
- 435 0h399565z`,leftgroupunder:`M400000 262
-H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219
- 435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
--3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5
--18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7
--196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5
- 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3
--4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7
--10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
-m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
- 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
- 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667
--152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12
- 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7
--2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
-v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5
--83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3
--68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21
- 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z
-M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z
-M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
--.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
-c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3
- 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z
-M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334
-c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14
--53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
- 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11
- 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
-c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14
- 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
- 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0
--5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6
--320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
-m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8
-60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8
--451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
-m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
-c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6
--480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
-m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0
-85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8
--707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
-m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
-c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128
--16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20
- 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7
- 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85
--40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
--12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
- 151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
--6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5
-s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
-c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3
- 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
--174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0
- 3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18
- 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3
--3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2
--10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58
- 69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11
--18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7
- 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z
-m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8
- 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5
--7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95
--27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8
- 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3
- 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3
--64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
-m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3
- 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0
--13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21
- 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z
-M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
- 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
--52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142
--167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
- 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69
--70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
--40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
--37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
- 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167
-c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3
- 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42
- 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
--19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
- 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7
--2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0
- 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0
- 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
--68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
--8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9
- 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
-c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751
- 181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457
--11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
- 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
- 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
- -338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
--11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
- 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
- 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
- -175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
-3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
-10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
--1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
--7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
-H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
-c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22
-c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10
--11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10
--11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10
--11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,
--5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
--11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
--11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
--11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202
-c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
-c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130
-s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47
-121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6
-s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11
-c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
-M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
--27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0
-13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39
--84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5
--119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
--12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
-151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
-c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
-c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21
-c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
-c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
-M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
-c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
--231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
-c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
-M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
-c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,
-1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,
--152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
-M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0
-c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
--231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
-c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
-M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},Ka=function(e,t){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+` v1759 h347 v-84
-H403z M403 1759 V0 H319 V1759 v`+t+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+` v1759 H0 v84 H347z
-M347 1759 V0 H263 V1759 v`+t+" v1759 h84z";case"vert":return"M145 15 v585 v"+t+` v585 c2.667,10,9.667,15,21,15
-c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15
-c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+" v585 h43z";case"doublevert":return"M145 15 v585 v"+t+` v585 c2.667,10,9.667,15,21,15
-c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15
-c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+` v585 h43z
-M367 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15
-c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15
-c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+t+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+t+` v1715 h263 v84 H319z
-MM319 602 V0 H403 V602 v`+t+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+t+` v1799 H0 v-84 H319z
-MM319 602 V0 H403 V602 v`+t+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+` v602 h84z
-M403 1759 V0 H319 V1759 v`+t+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+` v602 h84z
-M347 1759 V0 h-84 V1759 v`+t+" v602 h84z";case"lparen":return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1
-c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,
--36,557 l0,`+(t+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,
-949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9
-c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,
--544.7,-112.5,-882c-2,-104,-3,-167,-3,-189
-l0,-`+(t+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,
--210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case"rparen":return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,
-63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5
-c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(t+9)+`
-c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664
-c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11
-c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17
-c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558
-l0,-`+(t+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
--470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}},Y0=class{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return O.contains(this.classes,e)}toNode(){for(var e=document.createDocumentFragment(),t=0;tt.toText();return this.children.map(e).join("")}},z0={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},ke={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},Zt={\u00C5:"A",\u00D0:"D",\u00DE:"o",\u00E5:"a",\u00F0:"d",\u00FE:"o",\u0410:"A",\u0411:"B",\u0412:"B",\u0413:"F",\u0414:"A",\u0415:"E",\u0416:"K",\u0417:"3",\u0418:"N",\u0419:"N",\u041A:"K",\u041B:"N",\u041C:"M",\u041D:"H",\u041E:"O",\u041F:"N",\u0420:"P",\u0421:"C",\u0422:"T",\u0423:"y",\u0424:"O",\u0425:"X",\u0426:"U",\u0427:"h",\u0428:"W",\u0429:"W",\u042A:"B",\u042B:"X",\u042C:"B",\u042D:"3",\u042E:"X",\u042F:"R",\u0430:"a",\u0431:"b",\u0432:"a",\u0433:"r",\u0434:"y",\u0435:"e",\u0436:"m",\u0437:"e",\u0438:"n",\u0439:"n",\u043A:"n",\u043B:"n",\u043C:"m",\u043D:"n",\u043E:"o",\u043F:"n",\u0440:"p",\u0441:"c",\u0442:"o",\u0443:"y",\u0444:"b",\u0445:"x",\u0446:"n",\u0447:"n",\u0448:"w",\u0449:"w",\u044A:"a",\u044B:"m",\u044C:"a",\u044D:"e",\u044E:"m",\u044F:"r"};function Ja(r,e){z0[r]=e}function Tt(r,e,t){if(!z0[e])throw new Error("Font metrics not found for font: "+e+".");var a=r.charCodeAt(0),n=z0[e][a];if(!n&&r[0]in Zt&&(a=Zt[r[0]].charCodeAt(0),n=z0[e][a]),!n&&t==="text"&&Ar(a)&&(n=z0[e][77]),n)return{depth:n[0],height:n[1],italic:n[2],skew:n[3],width:n[4]}}var tt={};function Qa(r){var e;if(r>=5?e=0:r>=3?e=1:e=2,!tt[e]){var t=tt[e]={cssEmPerMu:ke.quad[e]/18};for(var a in ke)ke.hasOwnProperty(a)&&(t[a]=ke[a][e])}return tt[e]}var e1=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],jt=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Kt=function(e,t){return t.size<2?e:e1[e-1][t.size-1]},Re=class r{constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=e.style,this.color=e.color,this.size=e.size||r.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=jt[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var t={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(var a in e)e.hasOwnProperty(a)&&(t[a]=e[a]);return new r(t)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:Kt(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:jt[e-1]})}havingBaseStyle(e){e=e||this.style.text();var t=Kt(r.BASESIZE,e);return this.size===t&&this.textSize===r.BASESIZE&&this.style===e?this:this.extend({style:e,size:t})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==r.BASESIZE?["sizing","reset-size"+this.size,"size"+r.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=Qa(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}};Re.BASESIZE=6;var ft={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},t1={ex:!0,em:!0,mu:!0},Tr=function(e){return typeof e!="string"&&(e=e.unit),e in ft||e in t1||e==="ex"},Q=function(e,t){var a;if(e.unit in ft)a=ft[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if(e.unit==="mu")a=t.fontMetrics().cssEmPerMu;else{var n;if(t.style.isTight()?n=t.havingStyle(t.style.text()):n=t,e.unit==="ex")a=n.fontMetrics().xHeight;else if(e.unit==="em")a=n.fontMetrics().quad;else throw new z("Invalid unit: '"+e.unit+"'");n!==t&&(a*=n.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*a,t.maxSize)},T=function(e){return+e.toFixed(4)+"em"},G0=function(e){return e.filter(t=>t).join(" ")},qr=function(e,t,a){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=a||{},t){t.style.isTight()&&this.classes.push("mtight");var n=t.getColor();n&&(this.style.color=n)}},Br=function(e){var t=document.createElement(e);t.className=G0(this.classes);for(var a in this.style)this.style.hasOwnProperty(a)&&(t.style[a]=this.style[a]);for(var n in this.attributes)this.attributes.hasOwnProperty(n)&&t.setAttribute(n,this.attributes[n]);for(var s=0;s/=\x00-\x1f]/,Dr=function(e){var t="<"+e;this.classes.length&&(t+=' class="'+O.escape(G0(this.classes))+'"');var a="";for(var n in this.style)this.style.hasOwnProperty(n)&&(a+=O.hyphenate(n)+":"+this.style[n]+";");a&&(t+=' style="'+O.escape(a)+'"');for(var s in this.attributes)if(this.attributes.hasOwnProperty(s)){if(r1.test(s))throw new z("Invalid attribute name '"+s+"'");t+=" "+s+'="'+O.escape(this.attributes[s])+'"'}t+=">";for(var l=0;l",t},Z0=class{constructor(e,t,a,n){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,qr.call(this,e,a,n),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return O.contains(this.classes,e)}toNode(){return Br.call(this,"span")}toMarkup(){return Dr.call(this,"span")}},fe=class{constructor(e,t,a,n){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,qr.call(this,t,n),this.children=a||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return O.contains(this.classes,e)}toNode(){return Br.call(this,"a")}toMarkup(){return Dr.call(this,"a")}},vt=class{constructor(e,t,a){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=["mord"],this.style=a}hasClass(e){return O.contains(this.classes,e)}toNode(){var e=document.createElement("img");e.src=this.src,e.alt=this.alt,e.className="mord";for(var t in this.style)this.style.hasOwnProperty(t)&&(e.style[t]=this.style[t]);return e}toMarkup(){var e='
",e}},a1={\u00EE:"\u0131\u0302",\u00EF:"\u0131\u0308",\u00ED:"\u0131\u0301",\u00EC:"\u0131\u0300"},c0=class{constructor(e,t,a,n,s,l,h,c){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=a||0,this.italic=n||0,this.skew=s||0,this.width=l||0,this.classes=h||[],this.style=c||{},this.maxFontSize=0;var f=Ha(this.text.charCodeAt(0));f&&this.classes.push(f+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=a1[this.text])}hasClass(e){return O.contains(this.classes,e)}toNode(){var e=document.createTextNode(this.text),t=null;this.italic>0&&(t=document.createElement("span"),t.style.marginRight=T(this.italic)),this.classes.length>0&&(t=t||document.createElement("span"),t.className=G0(this.classes));for(var a in this.style)this.style.hasOwnProperty(a)&&(t=t||document.createElement("span"),t.style[a]=this.style[a]);return t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t="0&&(a+="margin-right:"+this.italic+"em;");for(var n in this.style)this.style.hasOwnProperty(n)&&(a+=O.hyphenate(n)+":"+this.style[n]+";");a&&(e=!0,t+=' style="'+O.escape(a)+'"');var s=O.escape(this.text);return e?(t+=">",t+=s,t+="",t):s}},S0=class{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"svg");for(var a in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,a)&&t.setAttribute(a,this.attributes[a]);for(var n=0;n";for(var a=0;a",e}},A0=class{constructor(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}toNode(){var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"path");return this.alternate?t.setAttribute("d",this.alternate):t.setAttribute("d",Yt[this.pathName]),t}toMarkup(){return this.alternate?' ':' '}},ve=class{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"line");for(var a in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,a)&&t.setAttribute(a,this.attributes[a]);return t}toMarkup(){var e=" ",e}};function Jt(r){if(r instanceof c0)return r;throw new Error("Expected symbolNode but got "+String(r)+".")}function n1(r){if(r instanceof Z0)return r;throw new Error("Expected span but got "+String(r)+".")}var i1={bin:1,close:1,inner:1,open:1,punct:1,rel:1},s1={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},Y={math:{},text:{}};function i(r,e,t,a,n,s){Y[r][n]={font:e,group:t,replace:a},s&&a&&(Y[r][a]=Y[r][n])}var o="math",k="text",u="main",d="ams",Z="accent-token",C="bin",l0="close",ie="inner",I="mathord",t0="op-token",p0="open",Ve="punct",p="rel",R0="spacing",g="textord";i(o,u,p,"\u2261","\\equiv",!0);i(o,u,p,"\u227A","\\prec",!0);i(o,u,p,"\u227B","\\succ",!0);i(o,u,p,"\u223C","\\sim",!0);i(o,u,p,"\u22A5","\\perp");i(o,u,p,"\u2AAF","\\preceq",!0);i(o,u,p,"\u2AB0","\\succeq",!0);i(o,u,p,"\u2243","\\simeq",!0);i(o,u,p,"\u2223","\\mid",!0);i(o,u,p,"\u226A","\\ll",!0);i(o,u,p,"\u226B","\\gg",!0);i(o,u,p,"\u224D","\\asymp",!0);i(o,u,p,"\u2225","\\parallel");i(o,u,p,"\u22C8","\\bowtie",!0);i(o,u,p,"\u2323","\\smile",!0);i(o,u,p,"\u2291","\\sqsubseteq",!0);i(o,u,p,"\u2292","\\sqsupseteq",!0);i(o,u,p,"\u2250","\\doteq",!0);i(o,u,p,"\u2322","\\frown",!0);i(o,u,p,"\u220B","\\ni",!0);i(o,u,p,"\u221D","\\propto",!0);i(o,u,p,"\u22A2","\\vdash",!0);i(o,u,p,"\u22A3","\\dashv",!0);i(o,u,p,"\u220B","\\owns");i(o,u,Ve,".","\\ldotp");i(o,u,Ve,"\u22C5","\\cdotp");i(o,u,g,"#","\\#");i(k,u,g,"#","\\#");i(o,u,g,"&","\\&");i(k,u,g,"&","\\&");i(o,u,g,"\u2135","\\aleph",!0);i(o,u,g,"\u2200","\\forall",!0);i(o,u,g,"\u210F","\\hbar",!0);i(o,u,g,"\u2203","\\exists",!0);i(o,u,g,"\u2207","\\nabla",!0);i(o,u,g,"\u266D","\\flat",!0);i(o,u,g,"\u2113","\\ell",!0);i(o,u,g,"\u266E","\\natural",!0);i(o,u,g,"\u2663","\\clubsuit",!0);i(o,u,g,"\u2118","\\wp",!0);i(o,u,g,"\u266F","\\sharp",!0);i(o,u,g,"\u2662","\\diamondsuit",!0);i(o,u,g,"\u211C","\\Re",!0);i(o,u,g,"\u2661","\\heartsuit",!0);i(o,u,g,"\u2111","\\Im",!0);i(o,u,g,"\u2660","\\spadesuit",!0);i(o,u,g,"\xA7","\\S",!0);i(k,u,g,"\xA7","\\S");i(o,u,g,"\xB6","\\P",!0);i(k,u,g,"\xB6","\\P");i(o,u,g,"\u2020","\\dag");i(k,u,g,"\u2020","\\dag");i(k,u,g,"\u2020","\\textdagger");i(o,u,g,"\u2021","\\ddag");i(k,u,g,"\u2021","\\ddag");i(k,u,g,"\u2021","\\textdaggerdbl");i(o,u,l0,"\u23B1","\\rmoustache",!0);i(o,u,p0,"\u23B0","\\lmoustache",!0);i(o,u,l0,"\u27EF","\\rgroup",!0);i(o,u,p0,"\u27EE","\\lgroup",!0);i(o,u,C,"\u2213","\\mp",!0);i(o,u,C,"\u2296","\\ominus",!0);i(o,u,C,"\u228E","\\uplus",!0);i(o,u,C,"\u2293","\\sqcap",!0);i(o,u,C,"\u2217","\\ast");i(o,u,C,"\u2294","\\sqcup",!0);i(o,u,C,"\u25EF","\\bigcirc",!0);i(o,u,C,"\u2219","\\bullet",!0);i(o,u,C,"\u2021","\\ddagger");i(o,u,C,"\u2240","\\wr",!0);i(o,u,C,"\u2A3F","\\amalg");i(o,u,C,"&","\\And");i(o,u,p,"\u27F5","\\longleftarrow",!0);i(o,u,p,"\u21D0","\\Leftarrow",!0);i(o,u,p,"\u27F8","\\Longleftarrow",!0);i(o,u,p,"\u27F6","\\longrightarrow",!0);i(o,u,p,"\u21D2","\\Rightarrow",!0);i(o,u,p,"\u27F9","\\Longrightarrow",!0);i(o,u,p,"\u2194","\\leftrightarrow",!0);i(o,u,p,"\u27F7","\\longleftrightarrow",!0);i(o,u,p,"\u21D4","\\Leftrightarrow",!0);i(o,u,p,"\u27FA","\\Longleftrightarrow",!0);i(o,u,p,"\u21A6","\\mapsto",!0);i(o,u,p,"\u27FC","\\longmapsto",!0);i(o,u,p,"\u2197","\\nearrow",!0);i(o,u,p,"\u21A9","\\hookleftarrow",!0);i(o,u,p,"\u21AA","\\hookrightarrow",!0);i(o,u,p,"\u2198","\\searrow",!0);i(o,u,p,"\u21BC","\\leftharpoonup",!0);i(o,u,p,"\u21C0","\\rightharpoonup",!0);i(o,u,p,"\u2199","\\swarrow",!0);i(o,u,p,"\u21BD","\\leftharpoondown",!0);i(o,u,p,"\u21C1","\\rightharpoondown",!0);i(o,u,p,"\u2196","\\nwarrow",!0);i(o,u,p,"\u21CC","\\rightleftharpoons",!0);i(o,d,p,"\u226E","\\nless",!0);i(o,d,p,"\uE010","\\@nleqslant");i(o,d,p,"\uE011","\\@nleqq");i(o,d,p,"\u2A87","\\lneq",!0);i(o,d,p,"\u2268","\\lneqq",!0);i(o,d,p,"\uE00C","\\@lvertneqq");i(o,d,p,"\u22E6","\\lnsim",!0);i(o,d,p,"\u2A89","\\lnapprox",!0);i(o,d,p,"\u2280","\\nprec",!0);i(o,d,p,"\u22E0","\\npreceq",!0);i(o,d,p,"\u22E8","\\precnsim",!0);i(o,d,p,"\u2AB9","\\precnapprox",!0);i(o,d,p,"\u2241","\\nsim",!0);i(o,d,p,"\uE006","\\@nshortmid");i(o,d,p,"\u2224","\\nmid",!0);i(o,d,p,"\u22AC","\\nvdash",!0);i(o,d,p,"\u22AD","\\nvDash",!0);i(o,d,p,"\u22EA","\\ntriangleleft");i(o,d,p,"\u22EC","\\ntrianglelefteq",!0);i(o,d,p,"\u228A","\\subsetneq",!0);i(o,d,p,"\uE01A","\\@varsubsetneq");i(o,d,p,"\u2ACB","\\subsetneqq",!0);i(o,d,p,"\uE017","\\@varsubsetneqq");i(o,d,p,"\u226F","\\ngtr",!0);i(o,d,p,"\uE00F","\\@ngeqslant");i(o,d,p,"\uE00E","\\@ngeqq");i(o,d,p,"\u2A88","\\gneq",!0);i(o,d,p,"\u2269","\\gneqq",!0);i(o,d,p,"\uE00D","\\@gvertneqq");i(o,d,p,"\u22E7","\\gnsim",!0);i(o,d,p,"\u2A8A","\\gnapprox",!0);i(o,d,p,"\u2281","\\nsucc",!0);i(o,d,p,"\u22E1","\\nsucceq",!0);i(o,d,p,"\u22E9","\\succnsim",!0);i(o,d,p,"\u2ABA","\\succnapprox",!0);i(o,d,p,"\u2246","\\ncong",!0);i(o,d,p,"\uE007","\\@nshortparallel");i(o,d,p,"\u2226","\\nparallel",!0);i(o,d,p,"\u22AF","\\nVDash",!0);i(o,d,p,"\u22EB","\\ntriangleright");i(o,d,p,"\u22ED","\\ntrianglerighteq",!0);i(o,d,p,"\uE018","\\@nsupseteqq");i(o,d,p,"\u228B","\\supsetneq",!0);i(o,d,p,"\uE01B","\\@varsupsetneq");i(o,d,p,"\u2ACC","\\supsetneqq",!0);i(o,d,p,"\uE019","\\@varsupsetneqq");i(o,d,p,"\u22AE","\\nVdash",!0);i(o,d,p,"\u2AB5","\\precneqq",!0);i(o,d,p,"\u2AB6","\\succneqq",!0);i(o,d,p,"\uE016","\\@nsubseteqq");i(o,d,C,"\u22B4","\\unlhd");i(o,d,C,"\u22B5","\\unrhd");i(o,d,p,"\u219A","\\nleftarrow",!0);i(o,d,p,"\u219B","\\nrightarrow",!0);i(o,d,p,"\u21CD","\\nLeftarrow",!0);i(o,d,p,"\u21CF","\\nRightarrow",!0);i(o,d,p,"\u21AE","\\nleftrightarrow",!0);i(o,d,p,"\u21CE","\\nLeftrightarrow",!0);i(o,d,p,"\u25B3","\\vartriangle");i(o,d,g,"\u210F","\\hslash");i(o,d,g,"\u25BD","\\triangledown");i(o,d,g,"\u25CA","\\lozenge");i(o,d,g,"\u24C8","\\circledS");i(o,d,g,"\xAE","\\circledR");i(k,d,g,"\xAE","\\circledR");i(o,d,g,"\u2221","\\measuredangle",!0);i(o,d,g,"\u2204","\\nexists");i(o,d,g,"\u2127","\\mho");i(o,d,g,"\u2132","\\Finv",!0);i(o,d,g,"\u2141","\\Game",!0);i(o,d,g,"\u2035","\\backprime");i(o,d,g,"\u25B2","\\blacktriangle");i(o,d,g,"\u25BC","\\blacktriangledown");i(o,d,g,"\u25A0","\\blacksquare");i(o,d,g,"\u29EB","\\blacklozenge");i(o,d,g,"\u2605","\\bigstar");i(o,d,g,"\u2222","\\sphericalangle",!0);i(o,d,g,"\u2201","\\complement",!0);i(o,d,g,"\xF0","\\eth",!0);i(k,u,g,"\xF0","\xF0");i(o,d,g,"\u2571","\\diagup");i(o,d,g,"\u2572","\\diagdown");i(o,d,g,"\u25A1","\\square");i(o,d,g,"\u25A1","\\Box");i(o,d,g,"\u25CA","\\Diamond");i(o,d,g,"\xA5","\\yen",!0);i(k,d,g,"\xA5","\\yen",!0);i(o,d,g,"\u2713","\\checkmark",!0);i(k,d,g,"\u2713","\\checkmark");i(o,d,g,"\u2136","\\beth",!0);i(o,d,g,"\u2138","\\daleth",!0);i(o,d,g,"\u2137","\\gimel",!0);i(o,d,g,"\u03DD","\\digamma",!0);i(o,d,g,"\u03F0","\\varkappa");i(o,d,p0,"\u250C","\\@ulcorner",!0);i(o,d,l0,"\u2510","\\@urcorner",!0);i(o,d,p0,"\u2514","\\@llcorner",!0);i(o,d,l0,"\u2518","\\@lrcorner",!0);i(o,d,p,"\u2266","\\leqq",!0);i(o,d,p,"\u2A7D","\\leqslant",!0);i(o,d,p,"\u2A95","\\eqslantless",!0);i(o,d,p,"\u2272","\\lesssim",!0);i(o,d,p,"\u2A85","\\lessapprox",!0);i(o,d,p,"\u224A","\\approxeq",!0);i(o,d,C,"\u22D6","\\lessdot");i(o,d,p,"\u22D8","\\lll",!0);i(o,d,p,"\u2276","\\lessgtr",!0);i(o,d,p,"\u22DA","\\lesseqgtr",!0);i(o,d,p,"\u2A8B","\\lesseqqgtr",!0);i(o,d,p,"\u2251","\\doteqdot");i(o,d,p,"\u2253","\\risingdotseq",!0);i(o,d,p,"\u2252","\\fallingdotseq",!0);i(o,d,p,"\u223D","\\backsim",!0);i(o,d,p,"\u22CD","\\backsimeq",!0);i(o,d,p,"\u2AC5","\\subseteqq",!0);i(o,d,p,"\u22D0","\\Subset",!0);i(o,d,p,"\u228F","\\sqsubset",!0);i(o,d,p,"\u227C","\\preccurlyeq",!0);i(o,d,p,"\u22DE","\\curlyeqprec",!0);i(o,d,p,"\u227E","\\precsim",!0);i(o,d,p,"\u2AB7","\\precapprox",!0);i(o,d,p,"\u22B2","\\vartriangleleft");i(o,d,p,"\u22B4","\\trianglelefteq");i(o,d,p,"\u22A8","\\vDash",!0);i(o,d,p,"\u22AA","\\Vvdash",!0);i(o,d,p,"\u2323","\\smallsmile");i(o,d,p,"\u2322","\\smallfrown");i(o,d,p,"\u224F","\\bumpeq",!0);i(o,d,p,"\u224E","\\Bumpeq",!0);i(o,d,p,"\u2267","\\geqq",!0);i(o,d,p,"\u2A7E","\\geqslant",!0);i(o,d,p,"\u2A96","\\eqslantgtr",!0);i(o,d,p,"\u2273","\\gtrsim",!0);i(o,d,p,"\u2A86","\\gtrapprox",!0);i(o,d,C,"\u22D7","\\gtrdot");i(o,d,p,"\u22D9","\\ggg",!0);i(o,d,p,"\u2277","\\gtrless",!0);i(o,d,p,"\u22DB","\\gtreqless",!0);i(o,d,p,"\u2A8C","\\gtreqqless",!0);i(o,d,p,"\u2256","\\eqcirc",!0);i(o,d,p,"\u2257","\\circeq",!0);i(o,d,p,"\u225C","\\triangleq",!0);i(o,d,p,"\u223C","\\thicksim");i(o,d,p,"\u2248","\\thickapprox");i(o,d,p,"\u2AC6","\\supseteqq",!0);i(o,d,p,"\u22D1","\\Supset",!0);i(o,d,p,"\u2290","\\sqsupset",!0);i(o,d,p,"\u227D","\\succcurlyeq",!0);i(o,d,p,"\u22DF","\\curlyeqsucc",!0);i(o,d,p,"\u227F","\\succsim",!0);i(o,d,p,"\u2AB8","\\succapprox",!0);i(o,d,p,"\u22B3","\\vartriangleright");i(o,d,p,"\u22B5","\\trianglerighteq");i(o,d,p,"\u22A9","\\Vdash",!0);i(o,d,p,"\u2223","\\shortmid");i(o,d,p,"\u2225","\\shortparallel");i(o,d,p,"\u226C","\\between",!0);i(o,d,p,"\u22D4","\\pitchfork",!0);i(o,d,p,"\u221D","\\varpropto");i(o,d,p,"\u25C0","\\blacktriangleleft");i(o,d,p,"\u2234","\\therefore",!0);i(o,d,p,"\u220D","\\backepsilon");i(o,d,p,"\u25B6","\\blacktriangleright");i(o,d,p,"\u2235","\\because",!0);i(o,d,p,"\u22D8","\\llless");i(o,d,p,"\u22D9","\\gggtr");i(o,d,C,"\u22B2","\\lhd");i(o,d,C,"\u22B3","\\rhd");i(o,d,p,"\u2242","\\eqsim",!0);i(o,u,p,"\u22C8","\\Join");i(o,d,p,"\u2251","\\Doteq",!0);i(o,d,C,"\u2214","\\dotplus",!0);i(o,d,C,"\u2216","\\smallsetminus");i(o,d,C,"\u22D2","\\Cap",!0);i(o,d,C,"\u22D3","\\Cup",!0);i(o,d,C,"\u2A5E","\\doublebarwedge",!0);i(o,d,C,"\u229F","\\boxminus",!0);i(o,d,C,"\u229E","\\boxplus",!0);i(o,d,C,"\u22C7","\\divideontimes",!0);i(o,d,C,"\u22C9","\\ltimes",!0);i(o,d,C,"\u22CA","\\rtimes",!0);i(o,d,C,"\u22CB","\\leftthreetimes",!0);i(o,d,C,"\u22CC","\\rightthreetimes",!0);i(o,d,C,"\u22CF","\\curlywedge",!0);i(o,d,C,"\u22CE","\\curlyvee",!0);i(o,d,C,"\u229D","\\circleddash",!0);i(o,d,C,"\u229B","\\circledast",!0);i(o,d,C,"\u22C5","\\centerdot");i(o,d,C,"\u22BA","\\intercal",!0);i(o,d,C,"\u22D2","\\doublecap");i(o,d,C,"\u22D3","\\doublecup");i(o,d,C,"\u22A0","\\boxtimes",!0);i(o,d,p,"\u21E2","\\dashrightarrow",!0);i(o,d,p,"\u21E0","\\dashleftarrow",!0);i(o,d,p,"\u21C7","\\leftleftarrows",!0);i(o,d,p,"\u21C6","\\leftrightarrows",!0);i(o,d,p,"\u21DA","\\Lleftarrow",!0);i(o,d,p,"\u219E","\\twoheadleftarrow",!0);i(o,d,p,"\u21A2","\\leftarrowtail",!0);i(o,d,p,"\u21AB","\\looparrowleft",!0);i(o,d,p,"\u21CB","\\leftrightharpoons",!0);i(o,d,p,"\u21B6","\\curvearrowleft",!0);i(o,d,p,"\u21BA","\\circlearrowleft",!0);i(o,d,p,"\u21B0","\\Lsh",!0);i(o,d,p,"\u21C8","\\upuparrows",!0);i(o,d,p,"\u21BF","\\upharpoonleft",!0);i(o,d,p,"\u21C3","\\downharpoonleft",!0);i(o,u,p,"\u22B6","\\origof",!0);i(o,u,p,"\u22B7","\\imageof",!0);i(o,d,p,"\u22B8","\\multimap",!0);i(o,d,p,"\u21AD","\\leftrightsquigarrow",!0);i(o,d,p,"\u21C9","\\rightrightarrows",!0);i(o,d,p,"\u21C4","\\rightleftarrows",!0);i(o,d,p,"\u21A0","\\twoheadrightarrow",!0);i(o,d,p,"\u21A3","\\rightarrowtail",!0);i(o,d,p,"\u21AC","\\looparrowright",!0);i(o,d,p,"\u21B7","\\curvearrowright",!0);i(o,d,p,"\u21BB","\\circlearrowright",!0);i(o,d,p,"\u21B1","\\Rsh",!0);i(o,d,p,"\u21CA","\\downdownarrows",!0);i(o,d,p,"\u21BE","\\upharpoonright",!0);i(o,d,p,"\u21C2","\\downharpoonright",!0);i(o,d,p,"\u21DD","\\rightsquigarrow",!0);i(o,d,p,"\u21DD","\\leadsto");i(o,d,p,"\u21DB","\\Rrightarrow",!0);i(o,d,p,"\u21BE","\\restriction");i(o,u,g,"\u2018","`");i(o,u,g,"$","\\$");i(k,u,g,"$","\\$");i(k,u,g,"$","\\textdollar");i(o,u,g,"%","\\%");i(k,u,g,"%","\\%");i(o,u,g,"_","\\_");i(k,u,g,"_","\\_");i(k,u,g,"_","\\textunderscore");i(o,u,g,"\u2220","\\angle",!0);i(o,u,g,"\u221E","\\infty",!0);i(o,u,g,"\u2032","\\prime");i(o,u,g,"\u25B3","\\triangle");i(o,u,g,"\u0393","\\Gamma",!0);i(o,u,g,"\u0394","\\Delta",!0);i(o,u,g,"\u0398","\\Theta",!0);i(o,u,g,"\u039B","\\Lambda",!0);i(o,u,g,"\u039E","\\Xi",!0);i(o,u,g,"\u03A0","\\Pi",!0);i(o,u,g,"\u03A3","\\Sigma",!0);i(o,u,g,"\u03A5","\\Upsilon",!0);i(o,u,g,"\u03A6","\\Phi",!0);i(o,u,g,"\u03A8","\\Psi",!0);i(o,u,g,"\u03A9","\\Omega",!0);i(o,u,g,"A","\u0391");i(o,u,g,"B","\u0392");i(o,u,g,"E","\u0395");i(o,u,g,"Z","\u0396");i(o,u,g,"H","\u0397");i(o,u,g,"I","\u0399");i(o,u,g,"K","\u039A");i(o,u,g,"M","\u039C");i(o,u,g,"N","\u039D");i(o,u,g,"O","\u039F");i(o,u,g,"P","\u03A1");i(o,u,g,"T","\u03A4");i(o,u,g,"X","\u03A7");i(o,u,g,"\xAC","\\neg",!0);i(o,u,g,"\xAC","\\lnot");i(o,u,g,"\u22A4","\\top");i(o,u,g,"\u22A5","\\bot");i(o,u,g,"\u2205","\\emptyset");i(o,d,g,"\u2205","\\varnothing");i(o,u,I,"\u03B1","\\alpha",!0);i(o,u,I,"\u03B2","\\beta",!0);i(o,u,I,"\u03B3","\\gamma",!0);i(o,u,I,"\u03B4","\\delta",!0);i(o,u,I,"\u03F5","\\epsilon",!0);i(o,u,I,"\u03B6","\\zeta",!0);i(o,u,I,"\u03B7","\\eta",!0);i(o,u,I,"\u03B8","\\theta",!0);i(o,u,I,"\u03B9","\\iota",!0);i(o,u,I,"\u03BA","\\kappa",!0);i(o,u,I,"\u03BB","\\lambda",!0);i(o,u,I,"\u03BC","\\mu",!0);i(o,u,I,"\u03BD","\\nu",!0);i(o,u,I,"\u03BE","\\xi",!0);i(o,u,I,"\u03BF","\\omicron",!0);i(o,u,I,"\u03C0","\\pi",!0);i(o,u,I,"\u03C1","\\rho",!0);i(o,u,I,"\u03C3","\\sigma",!0);i(o,u,I,"\u03C4","\\tau",!0);i(o,u,I,"\u03C5","\\upsilon",!0);i(o,u,I,"\u03D5","\\phi",!0);i(o,u,I,"\u03C7","\\chi",!0);i(o,u,I,"\u03C8","\\psi",!0);i(o,u,I,"\u03C9","\\omega",!0);i(o,u,I,"\u03B5","\\varepsilon",!0);i(o,u,I,"\u03D1","\\vartheta",!0);i(o,u,I,"\u03D6","\\varpi",!0);i(o,u,I,"\u03F1","\\varrho",!0);i(o,u,I,"\u03C2","\\varsigma",!0);i(o,u,I,"\u03C6","\\varphi",!0);i(o,u,C,"\u2217","*",!0);i(o,u,C,"+","+");i(o,u,C,"\u2212","-",!0);i(o,u,C,"\u22C5","\\cdot",!0);i(o,u,C,"\u2218","\\circ",!0);i(o,u,C,"\xF7","\\div",!0);i(o,u,C,"\xB1","\\pm",!0);i(o,u,C,"\xD7","\\times",!0);i(o,u,C,"\u2229","\\cap",!0);i(o,u,C,"\u222A","\\cup",!0);i(o,u,C,"\u2216","\\setminus",!0);i(o,u,C,"\u2227","\\land");i(o,u,C,"\u2228","\\lor");i(o,u,C,"\u2227","\\wedge",!0);i(o,u,C,"\u2228","\\vee",!0);i(o,u,g,"\u221A","\\surd");i(o,u,p0,"\u27E8","\\langle",!0);i(o,u,p0,"\u2223","\\lvert");i(o,u,p0,"\u2225","\\lVert");i(o,u,l0,"?","?");i(o,u,l0,"!","!");i(o,u,l0,"\u27E9","\\rangle",!0);i(o,u,l0,"\u2223","\\rvert");i(o,u,l0,"\u2225","\\rVert");i(o,u,p,"=","=");i(o,u,p,":",":");i(o,u,p,"\u2248","\\approx",!0);i(o,u,p,"\u2245","\\cong",!0);i(o,u,p,"\u2265","\\ge");i(o,u,p,"\u2265","\\geq",!0);i(o,u,p,"\u2190","\\gets");i(o,u,p,">","\\gt",!0);i(o,u,p,"\u2208","\\in",!0);i(o,u,p,"\uE020","\\@not");i(o,u,p,"\u2282","\\subset",!0);i(o,u,p,"\u2283","\\supset",!0);i(o,u,p,"\u2286","\\subseteq",!0);i(o,u,p,"\u2287","\\supseteq",!0);i(o,d,p,"\u2288","\\nsubseteq",!0);i(o,d,p,"\u2289","\\nsupseteq",!0);i(o,u,p,"\u22A8","\\models");i(o,u,p,"\u2190","\\leftarrow",!0);i(o,u,p,"\u2264","\\le");i(o,u,p,"\u2264","\\leq",!0);i(o,u,p,"<","\\lt",!0);i(o,u,p,"\u2192","\\rightarrow",!0);i(o,u,p,"\u2192","\\to");i(o,d,p,"\u2271","\\ngeq",!0);i(o,d,p,"\u2270","\\nleq",!0);i(o,u,R0,"\xA0","\\ ");i(o,u,R0,"\xA0","\\space");i(o,u,R0,"\xA0","\\nobreakspace");i(k,u,R0,"\xA0","\\ ");i(k,u,R0,"\xA0"," ");i(k,u,R0,"\xA0","\\space");i(k,u,R0,"\xA0","\\nobreakspace");i(o,u,R0,null,"\\nobreak");i(o,u,R0,null,"\\allowbreak");i(o,u,Ve,",",",");i(o,u,Ve,";",";");i(o,d,C,"\u22BC","\\barwedge",!0);i(o,d,C,"\u22BB","\\veebar",!0);i(o,u,C,"\u2299","\\odot",!0);i(o,u,C,"\u2295","\\oplus",!0);i(o,u,C,"\u2297","\\otimes",!0);i(o,u,g,"\u2202","\\partial",!0);i(o,u,C,"\u2298","\\oslash",!0);i(o,d,C,"\u229A","\\circledcirc",!0);i(o,d,C,"\u22A1","\\boxdot",!0);i(o,u,C,"\u25B3","\\bigtriangleup");i(o,u,C,"\u25BD","\\bigtriangledown");i(o,u,C,"\u2020","\\dagger");i(o,u,C,"\u22C4","\\diamond");i(o,u,C,"\u22C6","\\star");i(o,u,C,"\u25C3","\\triangleleft");i(o,u,C,"\u25B9","\\triangleright");i(o,u,p0,"{","\\{");i(k,u,g,"{","\\{");i(k,u,g,"{","\\textbraceleft");i(o,u,l0,"}","\\}");i(k,u,g,"}","\\}");i(k,u,g,"}","\\textbraceright");i(o,u,p0,"{","\\lbrace");i(o,u,l0,"}","\\rbrace");i(o,u,p0,"[","\\lbrack",!0);i(k,u,g,"[","\\lbrack",!0);i(o,u,l0,"]","\\rbrack",!0);i(k,u,g,"]","\\rbrack",!0);i(o,u,p0,"(","\\lparen",!0);i(o,u,l0,")","\\rparen",!0);i(k,u,g,"<","\\textless",!0);i(k,u,g,">","\\textgreater",!0);i(o,u,p0,"\u230A","\\lfloor",!0);i(o,u,l0,"\u230B","\\rfloor",!0);i(o,u,p0,"\u2308","\\lceil",!0);i(o,u,l0,"\u2309","\\rceil",!0);i(o,u,g,"\\","\\backslash");i(o,u,g,"\u2223","|");i(o,u,g,"\u2223","\\vert");i(k,u,g,"|","\\textbar",!0);i(o,u,g,"\u2225","\\|");i(o,u,g,"\u2225","\\Vert");i(k,u,g,"\u2225","\\textbardbl");i(k,u,g,"~","\\textasciitilde");i(k,u,g,"\\","\\textbackslash");i(k,u,g,"^","\\textasciicircum");i(o,u,p,"\u2191","\\uparrow",!0);i(o,u,p,"\u21D1","\\Uparrow",!0);i(o,u,p,"\u2193","\\downarrow",!0);i(o,u,p,"\u21D3","\\Downarrow",!0);i(o,u,p,"\u2195","\\updownarrow",!0);i(o,u,p,"\u21D5","\\Updownarrow",!0);i(o,u,t0,"\u2210","\\coprod");i(o,u,t0,"\u22C1","\\bigvee");i(o,u,t0,"\u22C0","\\bigwedge");i(o,u,t0,"\u2A04","\\biguplus");i(o,u,t0,"\u22C2","\\bigcap");i(o,u,t0,"\u22C3","\\bigcup");i(o,u,t0,"\u222B","\\int");i(o,u,t0,"\u222B","\\intop");i(o,u,t0,"\u222C","\\iint");i(o,u,t0,"\u222D","\\iiint");i(o,u,t0,"\u220F","\\prod");i(o,u,t0,"\u2211","\\sum");i(o,u,t0,"\u2A02","\\bigotimes");i(o,u,t0,"\u2A01","\\bigoplus");i(o,u,t0,"\u2A00","\\bigodot");i(o,u,t0,"\u222E","\\oint");i(o,u,t0,"\u222F","\\oiint");i(o,u,t0,"\u2230","\\oiiint");i(o,u,t0,"\u2A06","\\bigsqcup");i(o,u,t0,"\u222B","\\smallint");i(k,u,ie,"\u2026","\\textellipsis");i(o,u,ie,"\u2026","\\mathellipsis");i(k,u,ie,"\u2026","\\ldots",!0);i(o,u,ie,"\u2026","\\ldots",!0);i(o,u,ie,"\u22EF","\\@cdots",!0);i(o,u,ie,"\u22F1","\\ddots",!0);i(o,u,g,"\u22EE","\\varvdots");i(k,u,g,"\u22EE","\\varvdots");i(o,u,Z,"\u02CA","\\acute");i(o,u,Z,"\u02CB","\\grave");i(o,u,Z,"\xA8","\\ddot");i(o,u,Z,"~","\\tilde");i(o,u,Z,"\u02C9","\\bar");i(o,u,Z,"\u02D8","\\breve");i(o,u,Z,"\u02C7","\\check");i(o,u,Z,"^","\\hat");i(o,u,Z,"\u20D7","\\vec");i(o,u,Z,"\u02D9","\\dot");i(o,u,Z,"\u02DA","\\mathring");i(o,u,I,"\uE131","\\@imath");i(o,u,I,"\uE237","\\@jmath");i(o,u,g,"\u0131","\u0131");i(o,u,g,"\u0237","\u0237");i(k,u,g,"\u0131","\\i",!0);i(k,u,g,"\u0237","\\j",!0);i(k,u,g,"\xDF","\\ss",!0);i(k,u,g,"\xE6","\\ae",!0);i(k,u,g,"\u0153","\\oe",!0);i(k,u,g,"\xF8","\\o",!0);i(k,u,g,"\xC6","\\AE",!0);i(k,u,g,"\u0152","\\OE",!0);i(k,u,g,"\xD8","\\O",!0);i(k,u,Z,"\u02CA","\\'");i(k,u,Z,"\u02CB","\\`");i(k,u,Z,"\u02C6","\\^");i(k,u,Z,"\u02DC","\\~");i(k,u,Z,"\u02C9","\\=");i(k,u,Z,"\u02D8","\\u");i(k,u,Z,"\u02D9","\\.");i(k,u,Z,"\xB8","\\c");i(k,u,Z,"\u02DA","\\r");i(k,u,Z,"\u02C7","\\v");i(k,u,Z,"\xA8",'\\"');i(k,u,Z,"\u02DD","\\H");i(k,u,Z,"\u25EF","\\textcircled");var Cr={"--":!0,"---":!0,"``":!0,"''":!0};i(k,u,g,"\u2013","--",!0);i(k,u,g,"\u2013","\\textendash");i(k,u,g,"\u2014","---",!0);i(k,u,g,"\u2014","\\textemdash");i(k,u,g,"\u2018","`",!0);i(k,u,g,"\u2018","\\textquoteleft");i(k,u,g,"\u2019","'",!0);i(k,u,g,"\u2019","\\textquoteright");i(k,u,g,"\u201C","``",!0);i(k,u,g,"\u201C","\\textquotedblleft");i(k,u,g,"\u201D","''",!0);i(k,u,g,"\u201D","\\textquotedblright");i(o,u,g,"\xB0","\\degree",!0);i(k,u,g,"\xB0","\\degree");i(k,u,g,"\xB0","\\textdegree",!0);i(o,u,g,"\xA3","\\pounds");i(o,u,g,"\xA3","\\mathsterling",!0);i(k,u,g,"\xA3","\\pounds");i(k,u,g,"\xA3","\\textsterling",!0);i(o,d,g,"\u2720","\\maltese");i(k,d,g,"\u2720","\\maltese");var Qt='0123456789/@."';for(Me=0;Me0)return w0(s,f,n,t,l.concat(v));if(c){var b,x;if(c==="boldsymbol"){var w=u1(s,n,t,l,a);b=w.fontName,x=[w.fontClass]}else h?(b=Or[c].fontName,x=[c]):(b=Be(c,t.fontWeight,t.fontShape),x=[c,t.fontWeight,t.fontShape]);if(Ue(s,b,n).metrics)return w0(s,b,n,t,l.concat(x));if(Cr.hasOwnProperty(s)&&b.slice(0,10)==="Typewriter"){for(var A=[],q=0;q{if(G0(r.classes)!==G0(e.classes)||r.skew!==e.skew||r.maxFontSize!==e.maxFontSize)return!1;if(r.classes.length===1){var t=r.classes[0];if(t==="mbin"||t==="mord")return!1}for(var a in r.style)if(r.style.hasOwnProperty(a)&&r.style[a]!==e.style[a])return!1;for(var n in e.style)if(e.style.hasOwnProperty(n)&&r.style[n]!==e.style[n])return!1;return!0},m1=r=>{for(var e=0;et&&(t=l.height),l.depth>a&&(a=l.depth),l.maxFontSize>n&&(n=l.maxFontSize)}e.height=t,e.depth=a,e.maxFontSize=n},h0=function(e,t,a,n){var s=new Z0(e,t,a,n);return qt(s),s},_r=(r,e,t,a)=>new Z0(r,e,t,a),d1=function(e,t,a){var n=h0([e],[],t);return n.height=Math.max(a||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),n.style.borderBottomWidth=T(n.height),n.maxFontSize=1,n},p1=function(e,t,a,n){var s=new fe(e,t,a,n);return qt(s),s},Nr=function(e){var t=new Y0(e);return qt(t),t},f1=function(e,t){return e instanceof Y0?h0([],[e],t):e},v1=function(e){if(e.positionType==="individualShift"){for(var t=e.children,a=[t[0]],n=-t[0].shift-t[0].elem.depth,s=n,l=1;l{var t=h0(["mspace"],[],e),a=Q(r,e);return t.style.marginRight=T(a),t},Be=function(e,t,a){var n="";switch(e){case"amsrm":n="AMS";break;case"textrm":n="Main";break;case"textsf":n="SansSerif";break;case"texttt":n="Typewriter";break;default:n=e}var s;return t==="textbf"&&a==="textit"?s="BoldItalic":t==="textbf"?s="Bold":t==="textit"?s="Italic":s="Regular",n+"-"+s},Or={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},Ir={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},y1=function(e,t){var[a,n,s]=Ir[e],l=new A0(a),h=new S0([l],{width:T(n),height:T(s),style:"width:"+T(n),viewBox:"0 0 "+1e3*n+" "+1e3*s,preserveAspectRatio:"xMinYMin"}),c=_r(["overlay"],[h],t);return c.height=s,c.style.height=T(s),c.style.width=T(n),c},y={fontMap:Or,makeSymbol:w0,mathsym:l1,makeSpan:h0,makeSvgSpan:_r,makeLineSpan:d1,makeAnchor:p1,makeFragment:Nr,wrapFragment:f1,makeVList:g1,makeOrd:h1,makeGlue:b1,staticSvg:y1,svgData:Ir,tryCombineChars:m1},J={number:3,unit:"mu"},W0={number:4,unit:"mu"},_0={number:5,unit:"mu"},x1={mord:{mop:J,mbin:W0,mrel:_0,minner:J},mop:{mord:J,mop:J,mrel:_0,minner:J},mbin:{mord:W0,mop:W0,mopen:W0,minner:W0},mrel:{mord:_0,mop:_0,mopen:_0,minner:_0},mopen:{},mclose:{mop:J,mbin:W0,mrel:_0,minner:J},mpunct:{mord:J,mop:J,mrel:_0,mopen:J,mclose:J,mpunct:J,minner:J},minner:{mord:J,mop:J,mbin:W0,mrel:_0,mopen:J,mpunct:J,minner:J}},w1={mord:{mop:J},mop:{mord:J,mop:J},mbin:{},mrel:{},mopen:{},mclose:{mop:J},mpunct:{},minner:{mop:J}},Er={},Le={},Fe={};function B(r){for(var{type:e,names:t,props:a,handler:n,htmlBuilder:s,mathmlBuilder:l}=r,h={type:e,numArgs:a.numArgs,argTypes:a.argTypes,allowedInArgument:!!a.allowedInArgument,allowedInText:!!a.allowedInText,allowedInMath:a.allowedInMath===void 0?!0:a.allowedInMath,numOptionalArgs:a.numOptionalArgs||0,infix:!!a.infix,primitive:!!a.primitive,handler:n},c=0;c{var _=q.classes[0],D=A.classes[0];_==="mbin"&&O.contains(k1,D)?q.classes[0]="mord":D==="mbin"&&O.contains(S1,_)&&(A.classes[0]="mord")},{node:b},x,w),rr(s,(A,q)=>{var _=bt(q),D=bt(A),N=_&&D?A.hasClass("mtight")?w1[_][D]:x1[_][D]:null;if(N)return y.makeGlue(N,f)},{node:b},x,w),s},rr=function r(e,t,a,n,s){n&&e.push(n);for(var l=0;lx=>{e.splice(b+1,0,x),l++})(l)}n&&e.pop()},Rr=function(e){return e instanceof Y0||e instanceof fe||e instanceof Z0&&e.hasClass("enclosing")?e:null},A1=function r(e,t){var a=Rr(e);if(a){var n=a.children;if(n.length){if(t==="right")return r(n[n.length-1],"right");if(t==="left")return r(n[0],"left")}}return e},bt=function(e,t){return e?(t&&(e=A1(e,t)),z1[e.classes[0]]||null):null},ge=function(e,t){var a=["nulldelimiter"].concat(e.baseSizingClasses());return I0(t.concat(a))},G=function(e,t,a){if(!e)return I0();if(Le[e.type]){var n=Le[e.type](e,t);if(a&&t.size!==a.size){n=I0(t.sizingClasses(a),[n],t);var s=t.sizeMultiplier/a.sizeMultiplier;n.height*=s,n.depth*=s}return n}else throw new z("Got group of unknown type: '"+e.type+"'")};function De(r,e){var t=I0(["base"],r,e),a=I0(["strut"]);return a.style.height=T(t.height+t.depth),t.depth&&(a.style.verticalAlign=T(-t.depth)),t.children.unshift(a),t}function yt(r,e){var t=null;r.length===1&&r[0].type==="tag"&&(t=r[0].tag,r=r[0].body);var a=a0(r,e,"root"),n;a.length===2&&a[1].hasClass("tag")&&(n=a.pop());for(var s=[],l=[],h=0;h0&&(s.push(De(l,e)),l=[]),s.push(a[h]));l.length>0&&s.push(De(l,e));var f;t?(f=De(a0(t,e,!0)),f.classes=["tag"],s.push(f)):n&&s.push(n);var v=I0(["katex-html"],s);if(v.setAttribute("aria-hidden","true"),f){var b=f.children[0];b.style.height=T(v.height+v.depth),v.depth&&(b.style.verticalAlign=T(-v.depth))}return v}function $r(r){return new Y0(r)}var s0=class{constructor(e,t,a){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=a||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=G0(this.classes));for(var a=0;a0&&(e+=' class ="'+O.escape(G0(this.classes))+'"'),e+=">";for(var a=0;a",e}toText(){return this.children.map(e=>e.toText()).join("")}},g0=class{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return O.escape(this.toText())}toText(){return this.text}},xt=class{constructor(e){this.width=void 0,this.character=void 0,this.width=e,e>=.05555&&e<=.05556?this.character="\u200A":e>=.1666&&e<=.1667?this.character="\u2009":e>=.2222&&e<=.2223?this.character="\u2005":e>=.2777&&e<=.2778?this.character="\u2005\u200A":e>=-.05556&&e<=-.05555?this.character="\u200A\u2063":e>=-.1667&&e<=-.1666?this.character="\u2009\u2063":e>=-.2223&&e<=-.2222?this.character="\u205F\u2063":e>=-.2778&&e<=-.2777?this.character="\u2005\u2063":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",T(this.width)),e}toMarkup(){return this.character?""+this.character+" ":' '}toText(){return this.character?this.character:" "}},M={MathNode:s0,TextNode:g0,SpaceNode:xt,newDocumentFragment:$r},y0=function(e,t,a){return Y[t][e]&&Y[t][e].replace&&e.charCodeAt(0)!==55349&&!(Cr.hasOwnProperty(e)&&a&&(a.fontFamily&&a.fontFamily.slice(4,6)==="tt"||a.font&&a.font.slice(4,6)==="tt"))&&(e=Y[t][e].replace),new M.TextNode(e)},Bt=function(e){return e.length===1?e[0]:new M.MathNode("mrow",e)},Dt=function(e,t){if(t.fontFamily==="texttt")return"monospace";if(t.fontFamily==="textsf")return t.fontShape==="textit"&&t.fontWeight==="textbf"?"sans-serif-bold-italic":t.fontShape==="textit"?"sans-serif-italic":t.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(t.fontShape==="textit"&&t.fontWeight==="textbf")return"bold-italic";if(t.fontShape==="textit")return"italic";if(t.fontWeight==="textbf")return"bold";var a=t.font;if(!a||a==="mathnormal")return null;var n=e.mode;if(a==="mathit")return"italic";if(a==="boldsymbol")return e.type==="textord"?"bold":"bold-italic";if(a==="mathbf")return"bold";if(a==="mathbb")return"double-struck";if(a==="mathsfit")return"sans-serif-italic";if(a==="mathfrak")return"fraktur";if(a==="mathscr"||a==="mathcal")return"script";if(a==="mathsf")return"sans-serif";if(a==="mathtt")return"monospace";var s=e.text;if(O.contains(["\\imath","\\jmath"],s))return null;Y[n][s]&&Y[n][s].replace&&(s=Y[n][s].replace);var l=y.fontMap[a].fontName;return Tt(s,l,n)?y.fontMap[a].variant:null};function nt(r){if(!r)return!1;if(r.type==="mi"&&r.children.length===1){var e=r.children[0];return e instanceof g0&&e.text==="."}else if(r.type==="mo"&&r.children.length===1&&r.getAttribute("separator")==="true"&&r.getAttribute("lspace")==="0em"&&r.getAttribute("rspace")==="0em"){var t=r.children[0];return t instanceof g0&&t.text===","}else return!1}var m0=function(e,t,a){if(e.length===1){var n=X(e[0],t);return a&&n instanceof s0&&n.type==="mo"&&(n.setAttribute("lspace","0em"),n.setAttribute("rspace","0em")),[n]}for(var s=[],l,h=0;h=1&&(l.type==="mn"||nt(l))){var f=c.children[0];f instanceof s0&&f.type==="mn"&&(f.children=[...l.children,...f.children],s.pop())}else if(l.type==="mi"&&l.children.length===1){var v=l.children[0];if(v instanceof g0&&v.text==="\u0338"&&(c.type==="mo"||c.type==="mi"||c.type==="mn")){var b=c.children[0];b instanceof g0&&b.text.length>0&&(b.text=b.text.slice(0,1)+"\u0338"+b.text.slice(1),s.pop())}}}s.push(c),l=c}return s},V0=function(e,t,a){return Bt(m0(e,t,a))},X=function(e,t){if(!e)return new M.MathNode("mrow");if(Fe[e.type]){var a=Fe[e.type](e,t);return a}else throw new z("Got group of unknown type: '"+e.type+"'")};function ar(r,e,t,a,n){var s=m0(r,t),l;s.length===1&&s[0]instanceof s0&&O.contains(["mrow","mtable"],s[0].type)?l=s[0]:l=new M.MathNode("mrow",s);var h=new M.MathNode("annotation",[new M.TextNode(e)]);h.setAttribute("encoding","application/x-tex");var c=new M.MathNode("semantics",[l,h]),f=new M.MathNode("math",[c]);f.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),a&&f.setAttribute("display","block");var v=n?"katex":"katex-mathml";return y.makeSpan([v],[f])}var Lr=function(e){return new Re({style:e.displayMode?E.DISPLAY:E.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},Fr=function(e,t){if(t.displayMode){var a=["katex-display"];t.leqno&&a.push("leqno"),t.fleqn&&a.push("fleqn"),e=y.makeSpan(a,[e])}return e},T1=function(e,t,a){var n=Lr(a),s;if(a.output==="mathml")return ar(e,t,n,a.displayMode,!0);if(a.output==="html"){var l=yt(e,n);s=y.makeSpan(["katex"],[l])}else{var h=ar(e,t,n,a.displayMode,!1),c=yt(e,n);s=y.makeSpan(["katex"],[h,c])}return Fr(s,a)},q1=function(e,t,a){var n=Lr(a),s=yt(e,n),l=y.makeSpan(["katex"],[s]);return Fr(l,a)},B1={widehat:"^",widecheck:"\u02C7",widetilde:"~",utilde:"~",overleftarrow:"\u2190",underleftarrow:"\u2190",xleftarrow:"\u2190",overrightarrow:"\u2192",underrightarrow:"\u2192",xrightarrow:"\u2192",underbrace:"\u23DF",overbrace:"\u23DE",overgroup:"\u23E0",undergroup:"\u23E1",overleftrightarrow:"\u2194",underleftrightarrow:"\u2194",xleftrightarrow:"\u2194",Overrightarrow:"\u21D2",xRightarrow:"\u21D2",overleftharpoon:"\u21BC",xleftharpoonup:"\u21BC",overrightharpoon:"\u21C0",xrightharpoonup:"\u21C0",xLeftarrow:"\u21D0",xLeftrightarrow:"\u21D4",xhookleftarrow:"\u21A9",xhookrightarrow:"\u21AA",xmapsto:"\u21A6",xrightharpoondown:"\u21C1",xleftharpoondown:"\u21BD",xrightleftharpoons:"\u21CC",xleftrightharpoons:"\u21CB",xtwoheadleftarrow:"\u219E",xtwoheadrightarrow:"\u21A0",xlongequal:"=",xtofrom:"\u21C4",xrightleftarrows:"\u21C4",xrightequilibrium:"\u21CC",xleftequilibrium:"\u21CB","\\cdrightarrow":"\u2192","\\cdleftarrow":"\u2190","\\cdlongequal":"="},D1=function(e){var t=new M.MathNode("mo",[new M.TextNode(B1[e.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},C1={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},_1=function(e){return e.type==="ordgroup"?e.body.length:1},N1=function(e,t){function a(){var h=4e5,c=e.label.slice(1);if(O.contains(["widehat","widecheck","widetilde","utilde"],c)){var f=e,v=_1(f.base),b,x,w;if(v>5)c==="widehat"||c==="widecheck"?(b=420,h=2364,w=.42,x=c+"4"):(b=312,h=2340,w=.34,x="tilde4");else{var A=[1,1,2,2,3,3][v];c==="widehat"||c==="widecheck"?(h=[0,1062,2364,2364,2364][A],b=[0,239,300,360,420][A],w=[0,.24,.3,.3,.36,.42][A],x=c+A):(h=[0,600,1033,2339,2340][A],b=[0,260,286,306,312][A],w=[0,.26,.286,.3,.306,.34][A],x="tilde"+A)}var q=new A0(x),_=new S0([q],{width:"100%",height:T(w),viewBox:"0 0 "+h+" "+b,preserveAspectRatio:"none"});return{span:y.makeSvgSpan([],[_],t),minWidth:0,height:w}}else{var D=[],N=C1[c],[$,H,F]=N,P=F/1e3,V=$.length,j,U;if(V===1){var D0=N[3];j=["hide-tail"],U=[D0]}else if(V===2)j=["halfarrow-left","halfarrow-right"],U=["xMinYMin","xMaxYMin"];else if(V===3)j=["brace-left","brace-center","brace-right"],U=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support
- `+V+" children.");for(var i0=0;i00&&(n.style.minWidth=T(s)),n},O1=function(e,t,a,n,s){var l,h=e.height+e.depth+a+n;if(/fbox|color|angl/.test(t)){if(l=y.makeSpan(["stretchy",t],[],s),t==="fbox"){var c=s.color&&s.getColor();c&&(l.style.borderColor=c)}}else{var f=[];/^[bx]cancel$/.test(t)&&f.push(new ve({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&f.push(new ve({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var v=new S0(f,{width:"100%",height:T(h)});l=y.makeSvgSpan([],[v],s)}return l.height=h,l.style.height=T(h),l},E0={encloseSpan:O1,mathMLnode:D1,svgSpan:N1};function L(r,e){if(!r||r.type!==e)throw new Error("Expected node of type "+e+", but got "+(r?"node of type "+r.type:String(r)));return r}function Ct(r){var e=Xe(r);if(!e)throw new Error("Expected node of symbol group type, but got "+(r?"node of type "+r.type:String(r)));return e}function Xe(r){return r&&(r.type==="atom"||s1.hasOwnProperty(r.type))?r:null}var _t=(r,e)=>{var t,a,n;r&&r.type==="supsub"?(a=L(r.base,"accent"),t=a.base,r.base=t,n=n1(G(r,e)),r.base=a):(a=L(r,"accent"),t=a.base);var s=G(t,e.havingCrampedStyle()),l=a.isShifty&&O.isCharacterBox(t),h=0;if(l){var c=O.getBaseElem(t),f=G(c,e.havingCrampedStyle());h=Jt(f).skew}var v=a.label==="\\c",b=v?s.height+s.depth:Math.min(s.height,e.fontMetrics().xHeight),x;if(a.isStretchy)x=E0.svgSpan(a,e),x=y.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"elem",elem:x,wrapperClasses:["svg-align"],wrapperStyle:h>0?{width:"calc(100% - "+T(2*h)+")",marginLeft:T(2*h)}:void 0}]},e);else{var w,A;a.label==="\\vec"?(w=y.staticSvg("vec",e),A=y.svgData.vec[1]):(w=y.makeOrd({mode:a.mode,text:a.label},e,"textord"),w=Jt(w),w.italic=0,A=w.width,v&&(b+=w.depth)),x=y.makeSpan(["accent-body"],[w]);var q=a.label==="\\textcircled";q&&(x.classes.push("accent-full"),b=s.height);var _=h;q||(_-=A/2),x.style.left=T(_),a.label==="\\textcircled"&&(x.style.top=".2em"),x=y.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:-b},{type:"elem",elem:x}]},e)}var D=y.makeSpan(["mord","accent"],[x],e);return n?(n.children[0]=D,n.height=Math.max(D.height,n.height),n.classes[0]="mord",n):D},Hr=(r,e)=>{var t=r.isStretchy?E0.mathMLnode(r.label):new M.MathNode("mo",[y0(r.label,r.mode)]),a=new M.MathNode("mover",[X(r.base,e),t]);return a.setAttribute("accent","true"),a},I1=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(r=>"\\"+r).join("|"));B({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(r,e)=>{var t=He(e[0]),a=!I1.test(r.funcName),n=!a||r.funcName==="\\widehat"||r.funcName==="\\widetilde"||r.funcName==="\\widecheck";return{type:"accent",mode:r.parser.mode,label:r.funcName,isStretchy:a,isShifty:n,base:t}},htmlBuilder:_t,mathmlBuilder:Hr});B({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(r,e)=>{var t=e[0],a=r.parser.mode;return a==="math"&&(r.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+r.funcName+" works only in text mode"),a="text"),{type:"accent",mode:a,label:r.funcName,isStretchy:!1,isShifty:!0,base:t}},htmlBuilder:_t,mathmlBuilder:Hr});B({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(r,e)=>{var{parser:t,funcName:a}=r,n=e[0];return{type:"accentUnder",mode:t.mode,label:a,base:n}},htmlBuilder:(r,e)=>{var t=G(r.base,e),a=E0.svgSpan(r,e),n=r.label==="\\utilde"?.12:0,s=y.makeVList({positionType:"top",positionData:t.height,children:[{type:"elem",elem:a,wrapperClasses:["svg-align"]},{type:"kern",size:n},{type:"elem",elem:t}]},e);return y.makeSpan(["mord","accentunder"],[s],e)},mathmlBuilder:(r,e)=>{var t=E0.mathMLnode(r.label),a=new M.MathNode("munder",[X(r.base,e),t]);return a.setAttribute("accentunder","true"),a}});var Ce=r=>{var e=new M.MathNode("mpadded",r?[r]:[]);return e.setAttribute("width","+0.6em"),e.setAttribute("lspace","0.3em"),e};B({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(r,e,t){var{parser:a,funcName:n}=r;return{type:"xArrow",mode:a.mode,label:n,body:e[0],below:t[0]}},htmlBuilder(r,e){var t=e.style,a=e.havingStyle(t.sup()),n=y.wrapFragment(G(r.body,a,e),e),s=r.label.slice(0,2)==="\\x"?"x":"cd";n.classes.push(s+"-arrow-pad");var l;r.below&&(a=e.havingStyle(t.sub()),l=y.wrapFragment(G(r.below,a,e),e),l.classes.push(s+"-arrow-pad"));var h=E0.svgSpan(r,e),c=-e.fontMetrics().axisHeight+.5*h.height,f=-e.fontMetrics().axisHeight-.5*h.height-.111;(n.depth>.25||r.label==="\\xleftequilibrium")&&(f-=n.depth);var v;if(l){var b=-e.fontMetrics().axisHeight+l.height+.5*h.height+.111;v=y.makeVList({positionType:"individualShift",children:[{type:"elem",elem:n,shift:f},{type:"elem",elem:h,shift:c},{type:"elem",elem:l,shift:b}]},e)}else v=y.makeVList({positionType:"individualShift",children:[{type:"elem",elem:n,shift:f},{type:"elem",elem:h,shift:c}]},e);return v.children[0].children[0].children[1].classes.push("svg-align"),y.makeSpan(["mrel","x-arrow"],[v],e)},mathmlBuilder(r,e){var t=E0.mathMLnode(r.label);t.setAttribute("minsize",r.label.charAt(0)==="x"?"1.75em":"3.0em");var a;if(r.body){var n=Ce(X(r.body,e));if(r.below){var s=Ce(X(r.below,e));a=new M.MathNode("munderover",[t,s,n])}else a=new M.MathNode("mover",[t,n])}else if(r.below){var l=Ce(X(r.below,e));a=new M.MathNode("munder",[t,l])}else a=Ce(),a=new M.MathNode("mover",[t,a]);return a}});var E1=y.makeSpan;function Pr(r,e){var t=a0(r.body,e,!0);return E1([r.mclass],t,e)}function Gr(r,e){var t,a=m0(r.body,e);return r.mclass==="minner"?t=new M.MathNode("mpadded",a):r.mclass==="mord"?r.isCharacterBox?(t=a[0],t.type="mi"):t=new M.MathNode("mi",a):(r.isCharacterBox?(t=a[0],t.type="mo"):t=new M.MathNode("mo",a),r.mclass==="mbin"?(t.attributes.lspace="0.22em",t.attributes.rspace="0.22em"):r.mclass==="mpunct"?(t.attributes.lspace="0em",t.attributes.rspace="0.17em"):r.mclass==="mopen"||r.mclass==="mclose"?(t.attributes.lspace="0em",t.attributes.rspace="0em"):r.mclass==="minner"&&(t.attributes.lspace="0.0556em",t.attributes.width="+0.1111em")),t}B({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(r,e){var{parser:t,funcName:a}=r,n=e[0];return{type:"mclass",mode:t.mode,mclass:"m"+a.slice(5),body:e0(n),isCharacterBox:O.isCharacterBox(n)}},htmlBuilder:Pr,mathmlBuilder:Gr});var We=r=>{var e=r.type==="ordgroup"&&r.body.length?r.body[0]:r;return e.type==="atom"&&(e.family==="bin"||e.family==="rel")?"m"+e.family:"mord"};B({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(r,e){var{parser:t}=r;return{type:"mclass",mode:t.mode,mclass:We(e[0]),body:e0(e[1]),isCharacterBox:O.isCharacterBox(e[1])}}});B({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(r,e){var{parser:t,funcName:a}=r,n=e[1],s=e[0],l;a!=="\\stackrel"?l=We(n):l="mrel";var h={type:"op",mode:n.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:a!=="\\stackrel",body:e0(n)},c={type:"supsub",mode:s.mode,base:h,sup:a==="\\underset"?null:s,sub:a==="\\underset"?s:null};return{type:"mclass",mode:t.mode,mclass:l,body:[c],isCharacterBox:O.isCharacterBox(c)}},htmlBuilder:Pr,mathmlBuilder:Gr});B({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(r,e){var{parser:t}=r;return{type:"pmb",mode:t.mode,mclass:We(e[0]),body:e0(e[0])}},htmlBuilder(r,e){var t=a0(r.body,e,!0),a=y.makeSpan([r.mclass],t,e);return a.style.textShadow="0.02em 0.01em 0.04px",a},mathmlBuilder(r,e){var t=m0(r.body,e),a=new M.MathNode("mstyle",t);return a.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),a}});var R1={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},nr=()=>({type:"styling",body:[],mode:"math",style:"display"}),ir=r=>r.type==="textord"&&r.text==="@",$1=(r,e)=>(r.type==="mathord"||r.type==="atom")&&r.text===e;function L1(r,e,t){var a=R1[r];switch(a){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return t.callFunction(a,[e[0]],[e[1]]);case"\\uparrow":case"\\downarrow":{var n=t.callFunction("\\\\cdleft",[e[0]],[]),s={type:"atom",text:a,mode:"math",family:"rel"},l=t.callFunction("\\Big",[s],[]),h=t.callFunction("\\\\cdright",[e[1]],[]),c={type:"ordgroup",mode:"math",body:[n,l,h]};return t.callFunction("\\\\cdparent",[c],[])}case"\\\\cdlongequal":return t.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var f={type:"textord",text:"\\Vert",mode:"math"};return t.callFunction("\\Big",[f],[])}default:return{type:"textord",text:" ",mode:"math"}}}function F1(r){var e=[];for(r.gullet.beginGroup(),r.gullet.macros.set("\\cr","\\\\\\relax"),r.gullet.beginGroup();;){e.push(r.parseExpression(!1,"\\\\")),r.gullet.endGroup(),r.gullet.beginGroup();var t=r.fetch().text;if(t==="&"||t==="\\\\")r.consume();else if(t==="\\end"){e[e.length-1].length===0&&e.pop();break}else throw new z("Expected \\\\ or \\cr or \\end",r.nextToken)}for(var a=[],n=[a],s=0;s-1))if("<>AV".indexOf(f)>-1)for(var b=0;b<2;b++){for(var x=!0,w=c+1;wAV=|." after @',l[c]);var A=L1(f,v,r),q={type:"styling",body:[A],mode:"math",style:"display"};a.push(q),h=nr()}s%2===0?a.push(h):a.shift(),a=[],n.push(a)}r.gullet.endGroup(),r.gullet.endGroup();var _=new Array(n[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:n,arraystretch:1,addJot:!0,rowGaps:[null],cols:_,colSeparationType:"CD",hLinesBeforeRow:new Array(n.length+1).fill([])}}B({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(r,e){var{parser:t,funcName:a}=r;return{type:"cdlabel",mode:t.mode,side:a.slice(4),label:e[0]}},htmlBuilder(r,e){var t=e.havingStyle(e.style.sup()),a=y.wrapFragment(G(r.label,t,e),e);return a.classes.push("cd-label-"+r.side),a.style.bottom=T(.8-a.depth),a.height=0,a.depth=0,a},mathmlBuilder(r,e){var t=new M.MathNode("mrow",[X(r.label,e)]);return t=new M.MathNode("mpadded",[t]),t.setAttribute("width","0"),r.side==="left"&&t.setAttribute("lspace","-1width"),t.setAttribute("voffset","0.7em"),t=new M.MathNode("mstyle",[t]),t.setAttribute("displaystyle","false"),t.setAttribute("scriptlevel","1"),t}});B({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(r,e){var{parser:t}=r;return{type:"cdlabelparent",mode:t.mode,fragment:e[0]}},htmlBuilder(r,e){var t=y.wrapFragment(G(r.fragment,e),e);return t.classes.push("cd-vert-arrow"),t},mathmlBuilder(r,e){return new M.MathNode("mrow",[X(r.fragment,e)])}});B({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(r,e){for(var{parser:t}=r,a=L(e[0],"ordgroup"),n=a.body,s="",l=0;l=1114111)throw new z("\\@char with invalid code point "+s);return c<=65535?f=String.fromCharCode(c):(c-=65536,f=String.fromCharCode((c>>10)+55296,(c&1023)+56320)),{type:"textord",mode:t.mode,text:f}}});var Vr=(r,e)=>{var t=a0(r.body,e.withColor(r.color),!1);return y.makeFragment(t)},Ur=(r,e)=>{var t=m0(r.body,e.withColor(r.color)),a=new M.MathNode("mstyle",t);return a.setAttribute("mathcolor",r.color),a};B({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(r,e){var{parser:t}=r,a=L(e[0],"color-token").color,n=e[1];return{type:"color",mode:t.mode,color:a,body:e0(n)}},htmlBuilder:Vr,mathmlBuilder:Ur});B({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(r,e){var{parser:t,breakOnTokenText:a}=r,n=L(e[0],"color-token").color;t.gullet.macros.set("\\current@color",n);var s=t.parseExpression(!0,a);return{type:"color",mode:t.mode,color:n,body:s}},htmlBuilder:Vr,mathmlBuilder:Ur});B({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(r,e,t){var{parser:a}=r,n=a.gullet.future().text==="["?a.parseSizeGroup(!0):null,s=!a.settings.displayMode||!a.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:a.mode,newLine:s,size:n&&L(n,"size").value}},htmlBuilder(r,e){var t=y.makeSpan(["mspace"],[],e);return r.newLine&&(t.classes.push("newline"),r.size&&(t.style.marginTop=T(Q(r.size,e)))),t},mathmlBuilder(r,e){var t=new M.MathNode("mspace");return r.newLine&&(t.setAttribute("linebreak","newline"),r.size&&t.setAttribute("height",T(Q(r.size,e)))),t}});var wt={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},Xr=r=>{var e=r.text;if(/^(?:[\\{}$^_]|EOF)$/.test(e))throw new z("Expected a control sequence",r);return e},H1=r=>{var e=r.gullet.popToken();return e.text==="="&&(e=r.gullet.popToken(),e.text===" "&&(e=r.gullet.popToken())),e},Wr=(r,e,t,a)=>{var n=r.gullet.macros.get(t.text);n==null&&(t.noexpand=!0,n={tokens:[t],numArgs:0,unexpandable:!r.gullet.isExpandable(t.text)}),r.gullet.macros.set(e,n,a)};B({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(r){var{parser:e,funcName:t}=r;e.consumeSpaces();var a=e.fetch();if(wt[a.text])return(t==="\\global"||t==="\\\\globallong")&&(a.text=wt[a.text]),L(e.parseFunction(),"internal");throw new z("Invalid token after macro prefix",a)}});B({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(r){var{parser:e,funcName:t}=r,a=e.gullet.popToken(),n=a.text;if(/^(?:[\\{}$^_]|EOF)$/.test(n))throw new z("Expected a control sequence",a);for(var s=0,l,h=[[]];e.gullet.future().text!=="{";)if(a=e.gullet.popToken(),a.text==="#"){if(e.gullet.future().text==="{"){l=e.gullet.future(),h[s].push("{");break}if(a=e.gullet.popToken(),!/^[1-9]$/.test(a.text))throw new z('Invalid argument number "'+a.text+'"');if(parseInt(a.text)!==s+1)throw new z('Argument number "'+a.text+'" out of order');s++,h.push([])}else{if(a.text==="EOF")throw new z("Expected a macro definition");h[s].push(a.text)}var{tokens:c}=e.gullet.consumeArg();return l&&c.unshift(l),(t==="\\edef"||t==="\\xdef")&&(c=e.gullet.expandTokens(c),c.reverse()),e.gullet.macros.set(n,{tokens:c,numArgs:s,delimiters:h},t===wt[t]),{type:"internal",mode:e.mode}}});B({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(r){var{parser:e,funcName:t}=r,a=Xr(e.gullet.popToken());e.gullet.consumeSpaces();var n=H1(e);return Wr(e,a,n,t==="\\\\globallet"),{type:"internal",mode:e.mode}}});B({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(r){var{parser:e,funcName:t}=r,a=Xr(e.gullet.popToken()),n=e.gullet.popToken(),s=e.gullet.popToken();return Wr(e,a,s,t==="\\\\globalfuture"),e.gullet.pushToken(s),e.gullet.pushToken(n),{type:"internal",mode:e.mode}}});var ce=function(e,t,a){var n=Y.math[e]&&Y.math[e].replace,s=Tt(n||e,t,a);if(!s)throw new Error("Unsupported symbol "+e+" and font size "+t+".");return s},Nt=function(e,t,a,n){var s=a.havingBaseStyle(t),l=y.makeSpan(n.concat(s.sizingClasses(a)),[e],a),h=s.sizeMultiplier/a.sizeMultiplier;return l.height*=h,l.depth*=h,l.maxFontSize=s.sizeMultiplier,l},Yr=function(e,t,a){var n=t.havingBaseStyle(a),s=(1-t.sizeMultiplier/n.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=T(s),e.height-=s,e.depth+=s},P1=function(e,t,a,n,s,l){var h=y.makeSymbol(e,"Main-Regular",s,n),c=Nt(h,t,n,l);return a&&Yr(c,n,t),c},G1=function(e,t,a,n){return y.makeSymbol(e,"Size"+t+"-Regular",a,n)},Zr=function(e,t,a,n,s,l){var h=G1(e,t,s,n),c=Nt(y.makeSpan(["delimsizing","size"+t],[h],n),E.TEXT,n,l);return a&&Yr(c,n,E.TEXT),c},it=function(e,t,a){var n;t==="Size1-Regular"?n="delim-size1":n="delim-size4";var s=y.makeSpan(["delimsizinginner",n],[y.makeSpan([],[y.makeSymbol(e,t,a)])]);return{type:"elem",elem:s}},st=function(e,t,a){var n=z0["Size4-Regular"][e.charCodeAt(0)]?z0["Size4-Regular"][e.charCodeAt(0)][4]:z0["Size1-Regular"][e.charCodeAt(0)][4],s=new A0("inner",ja(e,Math.round(1e3*t))),l=new S0([s],{width:T(n),height:T(t),style:"width:"+T(n),viewBox:"0 0 "+1e3*n+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),h=y.makeSvgSpan([],[l],a);return h.height=t,h.style.height=T(t),h.style.width=T(n),{type:"elem",elem:h}},St=.008,_e={type:"kern",size:-1*St},V1=["|","\\lvert","\\rvert","\\vert"],U1=["\\|","\\lVert","\\rVert","\\Vert"],jr=function(e,t,a,n,s,l){var h,c,f,v,b="",x=0;h=f=v=e,c=null;var w="Size1-Regular";e==="\\uparrow"?f=v="\u23D0":e==="\\Uparrow"?f=v="\u2016":e==="\\downarrow"?h=f="\u23D0":e==="\\Downarrow"?h=f="\u2016":e==="\\updownarrow"?(h="\\uparrow",f="\u23D0",v="\\downarrow"):e==="\\Updownarrow"?(h="\\Uparrow",f="\u2016",v="\\Downarrow"):O.contains(V1,e)?(f="\u2223",b="vert",x=333):O.contains(U1,e)?(f="\u2225",b="doublevert",x=556):e==="["||e==="\\lbrack"?(h="\u23A1",f="\u23A2",v="\u23A3",w="Size4-Regular",b="lbrack",x=667):e==="]"||e==="\\rbrack"?(h="\u23A4",f="\u23A5",v="\u23A6",w="Size4-Regular",b="rbrack",x=667):e==="\\lfloor"||e==="\u230A"?(f=h="\u23A2",v="\u23A3",w="Size4-Regular",b="lfloor",x=667):e==="\\lceil"||e==="\u2308"?(h="\u23A1",f=v="\u23A2",w="Size4-Regular",b="lceil",x=667):e==="\\rfloor"||e==="\u230B"?(f=h="\u23A5",v="\u23A6",w="Size4-Regular",b="rfloor",x=667):e==="\\rceil"||e==="\u2309"?(h="\u23A4",f=v="\u23A5",w="Size4-Regular",b="rceil",x=667):e==="("||e==="\\lparen"?(h="\u239B",f="\u239C",v="\u239D",w="Size4-Regular",b="lparen",x=875):e===")"||e==="\\rparen"?(h="\u239E",f="\u239F",v="\u23A0",w="Size4-Regular",b="rparen",x=875):e==="\\{"||e==="\\lbrace"?(h="\u23A7",c="\u23A8",v="\u23A9",f="\u23AA",w="Size4-Regular"):e==="\\}"||e==="\\rbrace"?(h="\u23AB",c="\u23AC",v="\u23AD",f="\u23AA",w="Size4-Regular"):e==="\\lgroup"||e==="\u27EE"?(h="\u23A7",v="\u23A9",f="\u23AA",w="Size4-Regular"):e==="\\rgroup"||e==="\u27EF"?(h="\u23AB",v="\u23AD",f="\u23AA",w="Size4-Regular"):e==="\\lmoustache"||e==="\u23B0"?(h="\u23A7",v="\u23AD",f="\u23AA",w="Size4-Regular"):(e==="\\rmoustache"||e==="\u23B1")&&(h="\u23AB",v="\u23A9",f="\u23AA",w="Size4-Regular");var A=ce(h,w,s),q=A.height+A.depth,_=ce(f,w,s),D=_.height+_.depth,N=ce(v,w,s),$=N.height+N.depth,H=0,F=1;if(c!==null){var P=ce(c,w,s);H=P.height+P.depth,F=2}var V=q+$+H,j=Math.max(0,Math.ceil((t-V)/(F*D))),U=V+j*F*D,D0=n.fontMetrics().axisHeight;a&&(D0*=n.sizeMultiplier);var i0=U/2-D0,r0=[];if(b.length>0){var X0=U-q-$,u0=Math.round(U*1e3),x0=Ka(b,Math.round(X0*1e3)),$0=new A0(b,x0),K0=(x/1e3).toFixed(3)+"em",J0=(u0/1e3).toFixed(3)+"em",je=new S0([$0],{width:K0,height:J0,viewBox:"0 0 "+x+" "+u0}),L0=y.makeSvgSpan([],[je],n);L0.height=u0/1e3,L0.style.width=K0,L0.style.height=J0,r0.push({type:"elem",elem:L0})}else{if(r0.push(it(v,w,s)),r0.push(_e),c===null){var F0=U-q-$+2*St;r0.push(st(f,F0,n))}else{var f0=(U-q-$-H)/2+2*St;r0.push(st(f,f0,n)),r0.push(_e),r0.push(it(c,w,s)),r0.push(_e),r0.push(st(f,f0,n))}r0.push(_e),r0.push(it(h,w,s))}var le=n.havingBaseStyle(E.TEXT),Ke=y.makeVList({positionType:"bottom",positionData:i0,children:r0},le);return Nt(y.makeSpan(["delimsizing","mult"],[Ke],le),E.TEXT,n,l)},ot=80,lt=.08,ut=function(e,t,a,n,s){var l=Za(e,n,a),h=new A0(e,l),c=new S0([h],{width:"400em",height:T(t),viewBox:"0 0 400000 "+a,preserveAspectRatio:"xMinYMin slice"});return y.makeSvgSpan(["hide-tail"],[c],s)},X1=function(e,t){var a=t.havingBaseSizing(),n=ea("\\surd",e*a.sizeMultiplier,Qr,a),s=a.sizeMultiplier,l=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),h,c=0,f=0,v=0,b;return n.type==="small"?(v=1e3+1e3*l+ot,e<1?s=1:e<1.4&&(s=.7),c=(1+l+lt)/s,f=(1+l)/s,h=ut("sqrtMain",c,v,l,t),h.style.minWidth="0.853em",b=.833/s):n.type==="large"?(v=(1e3+ot)*me[n.size],f=(me[n.size]+l)/s,c=(me[n.size]+l+lt)/s,h=ut("sqrtSize"+n.size,c,v,l,t),h.style.minWidth="1.02em",b=1/s):(c=e+l+lt,f=e+l,v=Math.floor(1e3*e+l)+ot,h=ut("sqrtTall",c,v,l,t),h.style.minWidth="0.742em",b=1.056),h.height=f,h.style.height=T(c),{span:h,advanceWidth:b,ruleWidth:(t.fontMetrics().sqrtRuleThickness+l)*s}},Kr=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","\\surd"],W1=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1"],Jr=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],me=[0,1.2,1.8,2.4,3],Y1=function(e,t,a,n,s){if(e==="<"||e==="\\lt"||e==="\u27E8"?e="\\langle":(e===">"||e==="\\gt"||e==="\u27E9")&&(e="\\rangle"),O.contains(Kr,e)||O.contains(Jr,e))return Zr(e,t,!1,a,n,s);if(O.contains(W1,e))return jr(e,me[t],!1,a,n,s);throw new z("Illegal delimiter: '"+e+"'")},Z1=[{type:"small",style:E.SCRIPTSCRIPT},{type:"small",style:E.SCRIPT},{type:"small",style:E.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],j1=[{type:"small",style:E.SCRIPTSCRIPT},{type:"small",style:E.SCRIPT},{type:"small",style:E.TEXT},{type:"stack"}],Qr=[{type:"small",style:E.SCRIPTSCRIPT},{type:"small",style:E.SCRIPT},{type:"small",style:E.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],K1=function(e){if(e.type==="small")return"Main-Regular";if(e.type==="large")return"Size"+e.size+"-Regular";if(e.type==="stack")return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")},ea=function(e,t,a,n){for(var s=Math.min(2,3-n.style.size),l=s;lt)return a[l]}return a[a.length-1]},ta=function(e,t,a,n,s,l){e==="<"||e==="\\lt"||e==="\u27E8"?e="\\langle":(e===">"||e==="\\gt"||e==="\u27E9")&&(e="\\rangle");var h;O.contains(Jr,e)?h=Z1:O.contains(Kr,e)?h=Qr:h=j1;var c=ea(e,t,h,n);return c.type==="small"?P1(e,c.style,a,n,s,l):c.type==="large"?Zr(e,c.size,a,n,s,l):jr(e,t,a,n,s,l)},J1=function(e,t,a,n,s,l){var h=n.fontMetrics().axisHeight*n.sizeMultiplier,c=901,f=5/n.fontMetrics().ptPerEm,v=Math.max(t-h,a+h),b=Math.max(v/500*c,2*v-f);return ta(e,b,!0,n,s,l)},O0={sqrtImage:X1,sizedDelim:Y1,sizeToMaxHeight:me,customSizedDelim:ta,leftRightDelim:J1},sr={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},Q1=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","<",">","\\langle","\u27E8","\\rangle","\u27E9","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function Ye(r,e){var t=Xe(r);if(t&&O.contains(Q1,t.text))return t;throw t?new z("Invalid delimiter '"+t.text+"' after '"+e.funcName+"'",r):new z("Invalid delimiter type '"+r.type+"'",r)}B({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(r,e)=>{var t=Ye(e[0],r);return{type:"delimsizing",mode:r.parser.mode,size:sr[r.funcName].size,mclass:sr[r.funcName].mclass,delim:t.text}},htmlBuilder:(r,e)=>r.delim==="."?y.makeSpan([r.mclass]):O0.sizedDelim(r.delim,r.size,e,r.mode,[r.mclass]),mathmlBuilder:r=>{var e=[];r.delim!=="."&&e.push(y0(r.delim,r.mode));var t=new M.MathNode("mo",e);r.mclass==="mopen"||r.mclass==="mclose"?t.setAttribute("fence","true"):t.setAttribute("fence","false"),t.setAttribute("stretchy","true");var a=T(O0.sizeToMaxHeight[r.size]);return t.setAttribute("minsize",a),t.setAttribute("maxsize",a),t}});function or(r){if(!r.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}B({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(r,e)=>{var t=r.parser.gullet.macros.get("\\current@color");if(t&&typeof t!="string")throw new z("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:r.parser.mode,delim:Ye(e[0],r).text,color:t}}});B({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(r,e)=>{var t=Ye(e[0],r),a=r.parser;++a.leftrightDepth;var n=a.parseExpression(!1);--a.leftrightDepth,a.expect("\\right",!1);var s=L(a.parseFunction(),"leftright-right");return{type:"leftright",mode:a.mode,body:n,left:t.text,right:s.delim,rightColor:s.color}},htmlBuilder:(r,e)=>{or(r);for(var t=a0(r.body,e,!0,["mopen","mclose"]),a=0,n=0,s=!1,l=0;l{or(r);var t=m0(r.body,e);if(r.left!=="."){var a=new M.MathNode("mo",[y0(r.left,r.mode)]);a.setAttribute("fence","true"),t.unshift(a)}if(r.right!=="."){var n=new M.MathNode("mo",[y0(r.right,r.mode)]);n.setAttribute("fence","true"),r.rightColor&&n.setAttribute("mathcolor",r.rightColor),t.push(n)}return Bt(t)}});B({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(r,e)=>{var t=Ye(e[0],r);if(!r.parser.leftrightDepth)throw new z("\\middle without preceding \\left",t);return{type:"middle",mode:r.parser.mode,delim:t.text}},htmlBuilder:(r,e)=>{var t;if(r.delim===".")t=ge(e,[]);else{t=O0.sizedDelim(r.delim,1,e,r.mode,[]);var a={delim:r.delim,options:e};t.isMiddle=a}return t},mathmlBuilder:(r,e)=>{var t=r.delim==="\\vert"||r.delim==="|"?y0("|","text"):y0(r.delim,r.mode),a=new M.MathNode("mo",[t]);return a.setAttribute("fence","true"),a.setAttribute("lspace","0.05em"),a.setAttribute("rspace","0.05em"),a}});var Ot=(r,e)=>{var t=y.wrapFragment(G(r.body,e),e),a=r.label.slice(1),n=e.sizeMultiplier,s,l=0,h=O.isCharacterBox(r.body);if(a==="sout")s=y.makeSpan(["stretchy","sout"]),s.height=e.fontMetrics().defaultRuleThickness/n,l=-.5*e.fontMetrics().xHeight;else if(a==="phase"){var c=Q({number:.6,unit:"pt"},e),f=Q({number:.35,unit:"ex"},e),v=e.havingBaseSizing();n=n/v.sizeMultiplier;var b=t.height+t.depth+c+f;t.style.paddingLeft=T(b/2+c);var x=Math.floor(1e3*b*n),w=Wa(x),A=new S0([new A0("phase",w)],{width:"400em",height:T(x/1e3),viewBox:"0 0 400000 "+x,preserveAspectRatio:"xMinYMin slice"});s=y.makeSvgSpan(["hide-tail"],[A],e),s.style.height=T(b),l=t.depth+c+f}else{/cancel/.test(a)?h||t.classes.push("cancel-pad"):a==="angl"?t.classes.push("anglpad"):t.classes.push("boxpad");var q=0,_=0,D=0;/box/.test(a)?(D=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness),q=e.fontMetrics().fboxsep+(a==="colorbox"?0:D),_=q):a==="angl"?(D=Math.max(e.fontMetrics().defaultRuleThickness,e.minRuleThickness),q=4*D,_=Math.max(0,.25-t.depth)):(q=h?.2:0,_=q),s=E0.encloseSpan(t,a,q,_,e),/fbox|boxed|fcolorbox/.test(a)?(s.style.borderStyle="solid",s.style.borderWidth=T(D)):a==="angl"&&D!==.049&&(s.style.borderTopWidth=T(D),s.style.borderRightWidth=T(D)),l=t.depth+_,r.backgroundColor&&(s.style.backgroundColor=r.backgroundColor,r.borderColor&&(s.style.borderColor=r.borderColor))}var N;if(r.backgroundColor)N=y.makeVList({positionType:"individualShift",children:[{type:"elem",elem:s,shift:l},{type:"elem",elem:t,shift:0}]},e);else{var $=/cancel|phase/.test(a)?["svg-align"]:[];N=y.makeVList({positionType:"individualShift",children:[{type:"elem",elem:t,shift:0},{type:"elem",elem:s,shift:l,wrapperClasses:$}]},e)}return/cancel/.test(a)&&(N.height=t.height,N.depth=t.depth),/cancel/.test(a)&&!h?y.makeSpan(["mord","cancel-lap"],[N],e):y.makeSpan(["mord"],[N],e)},It=(r,e)=>{var t=0,a=new M.MathNode(r.label.indexOf("colorbox")>-1?"mpadded":"menclose",[X(r.body,e)]);switch(r.label){case"\\cancel":a.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":a.setAttribute("notation","downdiagonalstrike");break;case"\\phase":a.setAttribute("notation","phasorangle");break;case"\\sout":a.setAttribute("notation","horizontalstrike");break;case"\\fbox":a.setAttribute("notation","box");break;case"\\angl":a.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(t=e.fontMetrics().fboxsep*e.fontMetrics().ptPerEm,a.setAttribute("width","+"+2*t+"pt"),a.setAttribute("height","+"+2*t+"pt"),a.setAttribute("lspace",t+"pt"),a.setAttribute("voffset",t+"pt"),r.label==="\\fcolorbox"){var n=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness);a.setAttribute("style","border: "+n+"em solid "+String(r.borderColor))}break;case"\\xcancel":a.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return r.backgroundColor&&a.setAttribute("mathbackground",r.backgroundColor),a};B({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(r,e,t){var{parser:a,funcName:n}=r,s=L(e[0],"color-token").color,l=e[1];return{type:"enclose",mode:a.mode,label:n,backgroundColor:s,body:l}},htmlBuilder:Ot,mathmlBuilder:It});B({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(r,e,t){var{parser:a,funcName:n}=r,s=L(e[0],"color-token").color,l=L(e[1],"color-token").color,h=e[2];return{type:"enclose",mode:a.mode,label:n,backgroundColor:l,borderColor:s,body:h}},htmlBuilder:Ot,mathmlBuilder:It});B({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(r,e){var{parser:t}=r;return{type:"enclose",mode:t.mode,label:"\\fbox",body:e[0]}}});B({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(r,e){var{parser:t,funcName:a}=r,n=e[0];return{type:"enclose",mode:t.mode,label:a,body:n}},htmlBuilder:Ot,mathmlBuilder:It});B({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(r,e){var{parser:t}=r;return{type:"enclose",mode:t.mode,label:"\\angl",body:e[0]}}});var ra={};function T0(r){for(var{type:e,names:t,props:a,handler:n,htmlBuilder:s,mathmlBuilder:l}=r,h={type:e,numArgs:a.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:n},c=0;c{var e=r.parser.settings;if(!e.displayMode)throw new z("{"+r.envName+"} can be used only in display mode.")};function Et(r){if(r.indexOf("ed")===-1)return r.indexOf("*")===-1}function U0(r,e,t){var{hskipBeforeAndAfter:a,addJot:n,cols:s,arraystretch:l,colSeparationType:h,autoTag:c,singleRow:f,emptySingleRow:v,maxNumCols:b,leqno:x}=e;if(r.gullet.beginGroup(),f||r.gullet.macros.set("\\cr","\\\\\\relax"),!l){var w=r.gullet.expandMacroAsText("\\arraystretch");if(w==null)l=1;else if(l=parseFloat(w),!l||l<0)throw new z("Invalid \\arraystretch: "+w)}r.gullet.beginGroup();var A=[],q=[A],_=[],D=[],N=c!=null?[]:void 0;function $(){c&&r.gullet.macros.set("\\@eqnsw","1",!0)}function H(){N&&(r.gullet.macros.get("\\df@tag")?(N.push(r.subparse([new b0("\\df@tag")])),r.gullet.macros.set("\\df@tag",void 0,!0)):N.push(!!c&&r.gullet.macros.get("\\@eqnsw")==="1"))}for($(),D.push(lr(r));;){var F=r.parseExpression(!1,f?"\\end":"\\\\");r.gullet.endGroup(),r.gullet.beginGroup(),F={type:"ordgroup",mode:r.mode,body:F},t&&(F={type:"styling",mode:r.mode,style:t,body:[F]}),A.push(F);var P=r.fetch().text;if(P==="&"){if(b&&A.length===b){if(f||h)throw new z("Too many tab characters: &",r.nextToken);r.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}r.consume()}else if(P==="\\end"){H(),A.length===1&&F.type==="styling"&&F.body[0].body.length===0&&(q.length>1||!v)&&q.pop(),D.length0&&($+=.25),f.push({pos:$,isDashed:we[Se]})}for(H(l[0]),a=0;a0&&(i0+=N,Vwe))for(a=0;a=h)){var ee=void 0;(n>0||e.hskipBeforeAndAfter)&&(ee=O.deflt(f0.pregap,x),ee!==0&&(x0=y.makeSpan(["arraycolsep"],[]),x0.style.width=T(ee),u0.push(x0)));var te=[];for(a=0;a0){for(var Sa=y.makeLineSpan("hline",t,v),ka=y.makeLineSpan("hdashline",t,v),Je=[{type:"elem",elem:c,shift:0}];f.length>0;){var Ut=f.pop(),Xt=Ut.pos-r0;Ut.isDashed?Je.push({type:"elem",elem:ka,shift:Xt}):Je.push({type:"elem",elem:Sa,shift:Xt})}c=y.makeVList({positionType:"individualShift",children:Je},t)}if(K0.length===0)return y.makeSpan(["mord"],[c],t);var Qe=y.makeVList({positionType:"individualShift",children:K0},t);return Qe=y.makeSpan(["tag"],[Qe],t),y.makeFragment([c,Qe])},en={c:"center ",l:"left ",r:"right "},B0=function(e,t){for(var a=[],n=new M.MathNode("mtd",[],["mtr-glue"]),s=new M.MathNode("mtd",[],["mml-eqn-num"]),l=0;l0){var A=e.cols,q="",_=!1,D=0,N=A.length;A[0].type==="separator"&&(x+="top ",D=1),A[A.length-1].type==="separator"&&(x+="bottom ",N-=1);for(var $=D;$0?"left ":"",x+=j[j.length-1].length>0?"right ":"";for(var U=1;U-1?"alignat":"align",s=e.envName==="split",l=U0(e.parser,{cols:a,addJot:!0,autoTag:s?void 0:Et(e.envName),emptySingleRow:!0,colSeparationType:n,maxNumCols:s?2:void 0,leqno:e.parser.settings.leqno},"display"),h,c=0,f={type:"ordgroup",mode:e.mode,body:[]};if(t[0]&&t[0].type==="ordgroup"){for(var v="",b=0;b0&&w&&(_=1),a[A]={type:"align",align:q,pregap:_,postgap:0}}return l.colSeparationType=w?"align":"alignat",l};T0({type:"array",names:["array","darray"],props:{numArgs:1},handler(r,e){var t=Xe(e[0]),a=t?[e[0]]:L(e[0],"ordgroup").body,n=a.map(function(l){var h=Ct(l),c=h.text;if("lcr".indexOf(c)!==-1)return{type:"align",align:c};if(c==="|")return{type:"separator",separator:"|"};if(c===":")return{type:"separator",separator:":"};throw new z("Unknown column alignment: "+c,l)}),s={cols:n,hskipBeforeAndAfter:!0,maxNumCols:n.length};return U0(r.parser,s,Rt(r.envName))},htmlBuilder:q0,mathmlBuilder:B0});T0({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(r){var e={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[r.envName.replace("*","")],t="c",a={hskipBeforeAndAfter:!1,cols:[{type:"align",align:t}]};if(r.envName.charAt(r.envName.length-1)==="*"){var n=r.parser;if(n.consumeSpaces(),n.fetch().text==="["){if(n.consume(),n.consumeSpaces(),t=n.fetch().text,"lcr".indexOf(t)===-1)throw new z("Expected l or c or r",n.nextToken);n.consume(),n.consumeSpaces(),n.expect("]"),n.consume(),a.cols=[{type:"align",align:t}]}}var s=U0(r.parser,a,Rt(r.envName)),l=Math.max(0,...s.body.map(h=>h.length));return s.cols=new Array(l).fill({type:"align",align:t}),e?{type:"leftright",mode:r.mode,body:[s],left:e[0],right:e[1],rightColor:void 0}:s},htmlBuilder:q0,mathmlBuilder:B0});T0({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(r){var e={arraystretch:.5},t=U0(r.parser,e,"script");return t.colSeparationType="small",t},htmlBuilder:q0,mathmlBuilder:B0});T0({type:"array",names:["subarray"],props:{numArgs:1},handler(r,e){var t=Xe(e[0]),a=t?[e[0]]:L(e[0],"ordgroup").body,n=a.map(function(l){var h=Ct(l),c=h.text;if("lc".indexOf(c)!==-1)return{type:"align",align:c};throw new z("Unknown column alignment: "+c,l)});if(n.length>1)throw new z("{subarray} can contain only one column");var s={cols:n,hskipBeforeAndAfter:!1,arraystretch:.5};if(s=U0(r.parser,s,"script"),s.body.length>0&&s.body[0].length>1)throw new z("{subarray} can contain only one column");return s},htmlBuilder:q0,mathmlBuilder:B0});T0({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(r){var e={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},t=U0(r.parser,e,Rt(r.envName));return{type:"leftright",mode:r.mode,body:[t],left:r.envName.indexOf("r")>-1?".":"\\{",right:r.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:q0,mathmlBuilder:B0});T0({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:na,htmlBuilder:q0,mathmlBuilder:B0});T0({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(r){O.contains(["gather","gather*"],r.envName)&&Ze(r);var e={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:Et(r.envName),emptySingleRow:!0,leqno:r.parser.settings.leqno};return U0(r.parser,e,"display")},htmlBuilder:q0,mathmlBuilder:B0});T0({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:na,htmlBuilder:q0,mathmlBuilder:B0});T0({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(r){Ze(r);var e={autoTag:Et(r.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:r.parser.settings.leqno};return U0(r.parser,e,"display")},htmlBuilder:q0,mathmlBuilder:B0});T0({type:"array",names:["CD"],props:{numArgs:0},handler(r){return Ze(r),F1(r.parser)},htmlBuilder:q0,mathmlBuilder:B0});m("\\nonumber","\\gdef\\@eqnsw{0}");m("\\notag","\\nonumber");B({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(r,e){throw new z(r.funcName+" valid only within array environment")}});var ur=ra;B({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(r,e){var{parser:t,funcName:a}=r,n=e[0];if(n.type!=="ordgroup")throw new z("Invalid environment name",n);for(var s="",l=0;l{var t=r.font,a=e.withFont(t);return G(r.body,a)},sa=(r,e)=>{var t=r.font,a=e.withFont(t);return X(r.body,a)},hr={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};B({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(r,e)=>{var{parser:t,funcName:a}=r,n=He(e[0]),s=a;return s in hr&&(s=hr[s]),{type:"font",mode:t.mode,font:s.slice(1),body:n}},htmlBuilder:ia,mathmlBuilder:sa});B({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(r,e)=>{var{parser:t}=r,a=e[0],n=O.isCharacterBox(a);return{type:"mclass",mode:t.mode,mclass:We(a),body:[{type:"font",mode:t.mode,font:"boldsymbol",body:a}],isCharacterBox:n}}});B({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(r,e)=>{var{parser:t,funcName:a,breakOnTokenText:n}=r,{mode:s}=t,l=t.parseExpression(!0,n),h="math"+a.slice(1);return{type:"font",mode:s,font:h,body:{type:"ordgroup",mode:t.mode,body:l}}},htmlBuilder:ia,mathmlBuilder:sa});var oa=(r,e)=>{var t=e;return r==="display"?t=t.id>=E.SCRIPT.id?t.text():E.DISPLAY:r==="text"&&t.size===E.DISPLAY.size?t=E.TEXT:r==="script"?t=E.SCRIPT:r==="scriptscript"&&(t=E.SCRIPTSCRIPT),t},$t=(r,e)=>{var t=oa(r.size,e.style),a=t.fracNum(),n=t.fracDen(),s;s=e.havingStyle(a);var l=G(r.numer,s,e);if(r.continued){var h=8.5/e.fontMetrics().ptPerEm,c=3.5/e.fontMetrics().ptPerEm;l.height=l.height0?A=3*x:A=7*x,q=e.fontMetrics().denom1):(b>0?(w=e.fontMetrics().num2,A=x):(w=e.fontMetrics().num3,A=3*x),q=e.fontMetrics().denom2);var _;if(v){var N=e.fontMetrics().axisHeight;w-l.depth-(N+.5*b){var t=new M.MathNode("mfrac",[X(r.numer,e),X(r.denom,e)]);if(!r.hasBarLine)t.setAttribute("linethickness","0px");else if(r.barSize){var a=Q(r.barSize,e);t.setAttribute("linethickness",T(a))}var n=oa(r.size,e.style);if(n.size!==e.style.size){t=new M.MathNode("mstyle",[t]);var s=n.size===E.DISPLAY.size?"true":"false";t.setAttribute("displaystyle",s),t.setAttribute("scriptlevel","0")}if(r.leftDelim!=null||r.rightDelim!=null){var l=[];if(r.leftDelim!=null){var h=new M.MathNode("mo",[new M.TextNode(r.leftDelim.replace("\\",""))]);h.setAttribute("fence","true"),l.push(h)}if(l.push(t),r.rightDelim!=null){var c=new M.MathNode("mo",[new M.TextNode(r.rightDelim.replace("\\",""))]);c.setAttribute("fence","true"),l.push(c)}return Bt(l)}return t};B({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(r,e)=>{var{parser:t,funcName:a}=r,n=e[0],s=e[1],l,h=null,c=null,f="auto";switch(a){case"\\dfrac":case"\\frac":case"\\tfrac":l=!0;break;case"\\\\atopfrac":l=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":l=!1,h="(",c=")";break;case"\\\\bracefrac":l=!1,h="\\{",c="\\}";break;case"\\\\brackfrac":l=!1,h="[",c="]";break;default:throw new Error("Unrecognized genfrac command")}switch(a){case"\\dfrac":case"\\dbinom":f="display";break;case"\\tfrac":case"\\tbinom":f="text";break}return{type:"genfrac",mode:t.mode,continued:!1,numer:n,denom:s,hasBarLine:l,leftDelim:h,rightDelim:c,size:f,barSize:null}},htmlBuilder:$t,mathmlBuilder:Lt});B({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(r,e)=>{var{parser:t,funcName:a}=r,n=e[0],s=e[1];return{type:"genfrac",mode:t.mode,continued:!0,numer:n,denom:s,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}});B({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(r){var{parser:e,funcName:t,token:a}=r,n;switch(t){case"\\over":n="\\frac";break;case"\\choose":n="\\binom";break;case"\\atop":n="\\\\atopfrac";break;case"\\brace":n="\\\\bracefrac";break;case"\\brack":n="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:e.mode,replaceWith:n,token:a}}});var cr=["display","text","script","scriptscript"],mr=function(e){var t=null;return e.length>0&&(t=e,t=t==="."?null:t),t};B({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(r,e){var{parser:t}=r,a=e[4],n=e[5],s=He(e[0]),l=s.type==="atom"&&s.family==="open"?mr(s.text):null,h=He(e[1]),c=h.type==="atom"&&h.family==="close"?mr(h.text):null,f=L(e[2],"size"),v,b=null;f.isBlank?v=!0:(b=f.value,v=b.number>0);var x="auto",w=e[3];if(w.type==="ordgroup"){if(w.body.length>0){var A=L(w.body[0],"textord");x=cr[Number(A.text)]}}else w=L(w,"textord"),x=cr[Number(w.text)];return{type:"genfrac",mode:t.mode,numer:a,denom:n,continued:!1,hasBarLine:v,barSize:b,leftDelim:l,rightDelim:c,size:x}},htmlBuilder:$t,mathmlBuilder:Lt});B({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(r,e){var{parser:t,funcName:a,token:n}=r;return{type:"infix",mode:t.mode,replaceWith:"\\\\abovefrac",size:L(e[0],"size").value,token:n}}});B({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(r,e)=>{var{parser:t,funcName:a}=r,n=e[0],s=_a(L(e[1],"infix").size),l=e[2],h=s.number>0;return{type:"genfrac",mode:t.mode,numer:n,denom:l,continued:!1,hasBarLine:h,barSize:s,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:$t,mathmlBuilder:Lt});var la=(r,e)=>{var t=e.style,a,n;r.type==="supsub"?(a=r.sup?G(r.sup,e.havingStyle(t.sup()),e):G(r.sub,e.havingStyle(t.sub()),e),n=L(r.base,"horizBrace")):n=L(r,"horizBrace");var s=G(n.base,e.havingBaseStyle(E.DISPLAY)),l=E0.svgSpan(n,e),h;if(n.isOver?(h=y.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:l}]},e),h.children[0].children[0].children[1].classes.push("svg-align")):(h=y.makeVList({positionType:"bottom",positionData:s.depth+.1+l.height,children:[{type:"elem",elem:l},{type:"kern",size:.1},{type:"elem",elem:s}]},e),h.children[0].children[0].children[0].classes.push("svg-align")),a){var c=y.makeSpan(["mord",n.isOver?"mover":"munder"],[h],e);n.isOver?h=y.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:c},{type:"kern",size:.2},{type:"elem",elem:a}]},e):h=y.makeVList({positionType:"bottom",positionData:c.depth+.2+a.height+a.depth,children:[{type:"elem",elem:a},{type:"kern",size:.2},{type:"elem",elem:c}]},e)}return y.makeSpan(["mord",n.isOver?"mover":"munder"],[h],e)},tn=(r,e)=>{var t=E0.mathMLnode(r.label);return new M.MathNode(r.isOver?"mover":"munder",[X(r.base,e),t])};B({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(r,e){var{parser:t,funcName:a}=r;return{type:"horizBrace",mode:t.mode,label:a,isOver:/^\\over/.test(a),base:e[0]}},htmlBuilder:la,mathmlBuilder:tn});B({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(r,e)=>{var{parser:t}=r,a=e[1],n=L(e[0],"url").url;return t.settings.isTrusted({command:"\\href",url:n})?{type:"href",mode:t.mode,href:n,body:e0(a)}:t.formatUnsupportedCmd("\\href")},htmlBuilder:(r,e)=>{var t=a0(r.body,e,!1);return y.makeAnchor(r.href,[],t,e)},mathmlBuilder:(r,e)=>{var t=V0(r.body,e);return t instanceof s0||(t=new s0("mrow",[t])),t.setAttribute("href",r.href),t}});B({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(r,e)=>{var{parser:t}=r,a=L(e[0],"url").url;if(!t.settings.isTrusted({command:"\\url",url:a}))return t.formatUnsupportedCmd("\\url");for(var n=[],s=0;s{var{parser:t,funcName:a,token:n}=r,s=L(e[0],"raw").string,l=e[1];t.settings.strict&&t.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var h,c={};switch(a){case"\\htmlClass":c.class=s,h={command:"\\htmlClass",class:s};break;case"\\htmlId":c.id=s,h={command:"\\htmlId",id:s};break;case"\\htmlStyle":c.style=s,h={command:"\\htmlStyle",style:s};break;case"\\htmlData":{for(var f=s.split(","),v=0;v{var t=a0(r.body,e,!1),a=["enclosing"];r.attributes.class&&a.push(...r.attributes.class.trim().split(/\s+/));var n=y.makeSpan(a,t,e);for(var s in r.attributes)s!=="class"&&r.attributes.hasOwnProperty(s)&&n.setAttribute(s,r.attributes[s]);return n},mathmlBuilder:(r,e)=>V0(r.body,e)});B({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(r,e)=>{var{parser:t}=r;return{type:"htmlmathml",mode:t.mode,html:e0(e[0]),mathml:e0(e[1])}},htmlBuilder:(r,e)=>{var t=a0(r.html,e,!1);return y.makeFragment(t)},mathmlBuilder:(r,e)=>V0(r.mathml,e)});var ht=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new z("Invalid size: '"+e+"' in \\includegraphics");var a={number:+(t[1]+t[2]),unit:t[3]};if(!Tr(a))throw new z("Invalid unit: '"+a.unit+"' in \\includegraphics.");return a};B({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(r,e,t)=>{var{parser:a}=r,n={number:0,unit:"em"},s={number:.9,unit:"em"},l={number:0,unit:"em"},h="";if(t[0])for(var c=L(t[0],"raw").string,f=c.split(","),v=0;v{var t=Q(r.height,e),a=0;r.totalheight.number>0&&(a=Q(r.totalheight,e)-t);var n=0;r.width.number>0&&(n=Q(r.width,e));var s={height:T(t+a)};n>0&&(s.width=T(n)),a>0&&(s.verticalAlign=T(-a));var l=new vt(r.src,r.alt,s);return l.height=t,l.depth=a,l},mathmlBuilder:(r,e)=>{var t=new M.MathNode("mglyph",[]);t.setAttribute("alt",r.alt);var a=Q(r.height,e),n=0;if(r.totalheight.number>0&&(n=Q(r.totalheight,e)-a,t.setAttribute("valign",T(-n))),t.setAttribute("height",T(a+n)),r.width.number>0){var s=Q(r.width,e);t.setAttribute("width",T(s))}return t.setAttribute("src",r.src),t}});B({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(r,e){var{parser:t,funcName:a}=r,n=L(e[0],"size");if(t.settings.strict){var s=a[1]==="m",l=n.value.unit==="mu";s?(l||t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" supports only mu units, "+("not "+n.value.unit+" units")),t.mode!=="math"&&t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" works only in math mode")):l&&t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" doesn't support mu units")}return{type:"kern",mode:t.mode,dimension:n.value}},htmlBuilder(r,e){return y.makeGlue(r.dimension,e)},mathmlBuilder(r,e){var t=Q(r.dimension,e);return new M.SpaceNode(t)}});B({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(r,e)=>{var{parser:t,funcName:a}=r,n=e[0];return{type:"lap",mode:t.mode,alignment:a.slice(5),body:n}},htmlBuilder:(r,e)=>{var t;r.alignment==="clap"?(t=y.makeSpan([],[G(r.body,e)]),t=y.makeSpan(["inner"],[t],e)):t=y.makeSpan(["inner"],[G(r.body,e)]);var a=y.makeSpan(["fix"],[]),n=y.makeSpan([r.alignment],[t,a],e),s=y.makeSpan(["strut"]);return s.style.height=T(n.height+n.depth),n.depth&&(s.style.verticalAlign=T(-n.depth)),n.children.unshift(s),n=y.makeSpan(["thinbox"],[n],e),y.makeSpan(["mord","vbox"],[n],e)},mathmlBuilder:(r,e)=>{var t=new M.MathNode("mpadded",[X(r.body,e)]);if(r.alignment!=="rlap"){var a=r.alignment==="llap"?"-1":"-0.5";t.setAttribute("lspace",a+"width")}return t.setAttribute("width","0px"),t}});B({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(r,e){var{funcName:t,parser:a}=r,n=a.mode;a.switchMode("math");var s=t==="\\("?"\\)":"$",l=a.parseExpression(!1,s);return a.expect(s),a.switchMode(n),{type:"styling",mode:a.mode,style:"text",body:l}}});B({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(r,e){throw new z("Mismatched "+r.funcName)}});var dr=(r,e)=>{switch(e.style.size){case E.DISPLAY.size:return r.display;case E.TEXT.size:return r.text;case E.SCRIPT.size:return r.script;case E.SCRIPTSCRIPT.size:return r.scriptscript;default:return r.text}};B({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(r,e)=>{var{parser:t}=r;return{type:"mathchoice",mode:t.mode,display:e0(e[0]),text:e0(e[1]),script:e0(e[2]),scriptscript:e0(e[3])}},htmlBuilder:(r,e)=>{var t=dr(r,e),a=a0(t,e,!1);return y.makeFragment(a)},mathmlBuilder:(r,e)=>{var t=dr(r,e);return V0(t,e)}});var ua=(r,e,t,a,n,s,l)=>{r=y.makeSpan([],[r]);var h=t&&O.isCharacterBox(t),c,f;if(e){var v=G(e,a.havingStyle(n.sup()),a);f={elem:v,kern:Math.max(a.fontMetrics().bigOpSpacing1,a.fontMetrics().bigOpSpacing3-v.depth)}}if(t){var b=G(t,a.havingStyle(n.sub()),a);c={elem:b,kern:Math.max(a.fontMetrics().bigOpSpacing2,a.fontMetrics().bigOpSpacing4-b.height)}}var x;if(f&&c){var w=a.fontMetrics().bigOpSpacing5+c.elem.height+c.elem.depth+c.kern+r.depth+l;x=y.makeVList({positionType:"bottom",positionData:w,children:[{type:"kern",size:a.fontMetrics().bigOpSpacing5},{type:"elem",elem:c.elem,marginLeft:T(-s)},{type:"kern",size:c.kern},{type:"elem",elem:r},{type:"kern",size:f.kern},{type:"elem",elem:f.elem,marginLeft:T(s)},{type:"kern",size:a.fontMetrics().bigOpSpacing5}]},a)}else if(c){var A=r.height-l;x=y.makeVList({positionType:"top",positionData:A,children:[{type:"kern",size:a.fontMetrics().bigOpSpacing5},{type:"elem",elem:c.elem,marginLeft:T(-s)},{type:"kern",size:c.kern},{type:"elem",elem:r}]},a)}else if(f){var q=r.depth+l;x=y.makeVList({positionType:"bottom",positionData:q,children:[{type:"elem",elem:r},{type:"kern",size:f.kern},{type:"elem",elem:f.elem,marginLeft:T(s)},{type:"kern",size:a.fontMetrics().bigOpSpacing5}]},a)}else return r;var _=[x];if(c&&s!==0&&!h){var D=y.makeSpan(["mspace"],[],a);D.style.marginRight=T(s),_.unshift(D)}return y.makeSpan(["mop","op-limits"],_,a)},ha=["\\smallint"],se=(r,e)=>{var t,a,n=!1,s;r.type==="supsub"?(t=r.sup,a=r.sub,s=L(r.base,"op"),n=!0):s=L(r,"op");var l=e.style,h=!1;l.size===E.DISPLAY.size&&s.symbol&&!O.contains(ha,s.name)&&(h=!0);var c;if(s.symbol){var f=h?"Size2-Regular":"Size1-Regular",v="";if((s.name==="\\oiint"||s.name==="\\oiiint")&&(v=s.name.slice(1),s.name=v==="oiint"?"\\iint":"\\iiint"),c=y.makeSymbol(s.name,f,"math",e,["mop","op-symbol",h?"large-op":"small-op"]),v.length>0){var b=c.italic,x=y.staticSvg(v+"Size"+(h?"2":"1"),e);c=y.makeVList({positionType:"individualShift",children:[{type:"elem",elem:c,shift:0},{type:"elem",elem:x,shift:h?.08:0}]},e),s.name="\\"+v,c.classes.unshift("mop"),c.italic=b}}else if(s.body){var w=a0(s.body,e,!0);w.length===1&&w[0]instanceof c0?(c=w[0],c.classes[0]="mop"):c=y.makeSpan(["mop"],w,e)}else{for(var A=[],q=1;q{var t;if(r.symbol)t=new s0("mo",[y0(r.name,r.mode)]),O.contains(ha,r.name)&&t.setAttribute("largeop","false");else if(r.body)t=new s0("mo",m0(r.body,e));else{t=new s0("mi",[new g0(r.name.slice(1))]);var a=new s0("mo",[y0("\u2061","text")]);r.parentIsSupSub?t=new s0("mrow",[t,a]):t=$r([t,a])}return t},rn={"\u220F":"\\prod","\u2210":"\\coprod","\u2211":"\\sum","\u22C0":"\\bigwedge","\u22C1":"\\bigvee","\u22C2":"\\bigcap","\u22C3":"\\bigcup","\u2A00":"\\bigodot","\u2A01":"\\bigoplus","\u2A02":"\\bigotimes","\u2A04":"\\biguplus","\u2A06":"\\bigsqcup"};B({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","\u220F","\u2210","\u2211","\u22C0","\u22C1","\u22C2","\u22C3","\u2A00","\u2A01","\u2A02","\u2A04","\u2A06"],props:{numArgs:0},handler:(r,e)=>{var{parser:t,funcName:a}=r,n=a;return n.length===1&&(n=rn[n]),{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:se,mathmlBuilder:be});B({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(r,e)=>{var{parser:t}=r,a=e[0];return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:e0(a)}},htmlBuilder:se,mathmlBuilder:be});var an={"\u222B":"\\int","\u222C":"\\iint","\u222D":"\\iiint","\u222E":"\\oint","\u222F":"\\oiint","\u2230":"\\oiiint"};B({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(r){var{parser:e,funcName:t}=r;return{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:se,mathmlBuilder:be});B({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(r){var{parser:e,funcName:t}=r;return{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:se,mathmlBuilder:be});B({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","\u222B","\u222C","\u222D","\u222E","\u222F","\u2230"],props:{numArgs:0},handler(r){var{parser:e,funcName:t}=r,a=t;return a.length===1&&(a=an[a]),{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:a}},htmlBuilder:se,mathmlBuilder:be});var ca=(r,e)=>{var t,a,n=!1,s;r.type==="supsub"?(t=r.sup,a=r.sub,s=L(r.base,"operatorname"),n=!0):s=L(r,"operatorname");var l;if(s.body.length>0){for(var h=s.body.map(b=>{var x=b.text;return typeof x=="string"?{type:"textord",mode:b.mode,text:x}:b}),c=a0(h,e.withFont("mathrm"),!0),f=0;f{for(var t=m0(r.body,e.withFont("mathrm")),a=!0,n=0;nv.toText()).join("");t=[new M.TextNode(h)]}var c=new M.MathNode("mi",t);c.setAttribute("mathvariant","normal");var f=new M.MathNode("mo",[y0("\u2061","text")]);return r.parentIsSupSub?new M.MathNode("mrow",[c,f]):M.newDocumentFragment([c,f])};B({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(r,e)=>{var{parser:t,funcName:a}=r,n=e[0];return{type:"operatorname",mode:t.mode,body:e0(n),alwaysHandleSupSub:a==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:ca,mathmlBuilder:nn});m("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");j0({type:"ordgroup",htmlBuilder(r,e){return r.semisimple?y.makeFragment(a0(r.body,e,!1)):y.makeSpan(["mord"],a0(r.body,e,!0),e)},mathmlBuilder(r,e){return V0(r.body,e,!0)}});B({type:"overline",names:["\\overline"],props:{numArgs:1},handler(r,e){var{parser:t}=r,a=e[0];return{type:"overline",mode:t.mode,body:a}},htmlBuilder(r,e){var t=G(r.body,e.havingCrampedStyle()),a=y.makeLineSpan("overline-line",e),n=e.fontMetrics().defaultRuleThickness,s=y.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:t},{type:"kern",size:3*n},{type:"elem",elem:a},{type:"kern",size:n}]},e);return y.makeSpan(["mord","overline"],[s],e)},mathmlBuilder(r,e){var t=new M.MathNode("mo",[new M.TextNode("\u203E")]);t.setAttribute("stretchy","true");var a=new M.MathNode("mover",[X(r.body,e),t]);return a.setAttribute("accent","true"),a}});B({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(r,e)=>{var{parser:t}=r,a=e[0];return{type:"phantom",mode:t.mode,body:e0(a)}},htmlBuilder:(r,e)=>{var t=a0(r.body,e.withPhantom(),!1);return y.makeFragment(t)},mathmlBuilder:(r,e)=>{var t=m0(r.body,e);return new M.MathNode("mphantom",t)}});B({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(r,e)=>{var{parser:t}=r,a=e[0];return{type:"hphantom",mode:t.mode,body:a}},htmlBuilder:(r,e)=>{var t=y.makeSpan([],[G(r.body,e.withPhantom())]);if(t.height=0,t.depth=0,t.children)for(var a=0;a{var t=m0(e0(r.body),e),a=new M.MathNode("mphantom",t),n=new M.MathNode("mpadded",[a]);return n.setAttribute("height","0px"),n.setAttribute("depth","0px"),n}});B({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(r,e)=>{var{parser:t}=r,a=e[0];return{type:"vphantom",mode:t.mode,body:a}},htmlBuilder:(r,e)=>{var t=y.makeSpan(["inner"],[G(r.body,e.withPhantom())]),a=y.makeSpan(["fix"],[]);return y.makeSpan(["mord","rlap"],[t,a],e)},mathmlBuilder:(r,e)=>{var t=m0(e0(r.body),e),a=new M.MathNode("mphantom",t),n=new M.MathNode("mpadded",[a]);return n.setAttribute("width","0px"),n}});B({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(r,e){var{parser:t}=r,a=L(e[0],"size").value,n=e[1];return{type:"raisebox",mode:t.mode,dy:a,body:n}},htmlBuilder(r,e){var t=G(r.body,e),a=Q(r.dy,e);return y.makeVList({positionType:"shift",positionData:-a,children:[{type:"elem",elem:t}]},e)},mathmlBuilder(r,e){var t=new M.MathNode("mpadded",[X(r.body,e)]),a=r.dy.number+r.dy.unit;return t.setAttribute("voffset",a),t}});B({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(r){var{parser:e}=r;return{type:"internal",mode:e.mode}}});B({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(r,e,t){var{parser:a}=r,n=t[0],s=L(e[0],"size"),l=L(e[1],"size");return{type:"rule",mode:a.mode,shift:n&&L(n,"size").value,width:s.value,height:l.value}},htmlBuilder(r,e){var t=y.makeSpan(["mord","rule"],[],e),a=Q(r.width,e),n=Q(r.height,e),s=r.shift?Q(r.shift,e):0;return t.style.borderRightWidth=T(a),t.style.borderTopWidth=T(n),t.style.bottom=T(s),t.width=a,t.height=n+s,t.depth=-s,t.maxFontSize=n*1.125*e.sizeMultiplier,t},mathmlBuilder(r,e){var t=Q(r.width,e),a=Q(r.height,e),n=r.shift?Q(r.shift,e):0,s=e.color&&e.getColor()||"black",l=new M.MathNode("mspace");l.setAttribute("mathbackground",s),l.setAttribute("width",T(t)),l.setAttribute("height",T(a));var h=new M.MathNode("mpadded",[l]);return n>=0?h.setAttribute("height",T(n)):(h.setAttribute("height",T(n)),h.setAttribute("depth",T(-n))),h.setAttribute("voffset",T(n)),h}});function ma(r,e,t){for(var a=a0(r,e,!1),n=e.sizeMultiplier/t.sizeMultiplier,s=0;s{var t=e.havingSize(r.size);return ma(r.body,t,e)};B({type:"sizing",names:pr,props:{numArgs:0,allowedInText:!0},handler:(r,e)=>{var{breakOnTokenText:t,funcName:a,parser:n}=r,s=n.parseExpression(!1,t);return{type:"sizing",mode:n.mode,size:pr.indexOf(a)+1,body:s}},htmlBuilder:sn,mathmlBuilder:(r,e)=>{var t=e.havingSize(r.size),a=m0(r.body,t),n=new M.MathNode("mstyle",a);return n.setAttribute("mathsize",T(t.sizeMultiplier)),n}});B({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(r,e,t)=>{var{parser:a}=r,n=!1,s=!1,l=t[0]&&L(t[0],"ordgroup");if(l)for(var h="",c=0;c{var t=y.makeSpan([],[G(r.body,e)]);if(!r.smashHeight&&!r.smashDepth)return t;if(r.smashHeight&&(t.height=0,t.children))for(var a=0;a{var t=new M.MathNode("mpadded",[X(r.body,e)]);return r.smashHeight&&t.setAttribute("height","0px"),r.smashDepth&&t.setAttribute("depth","0px"),t}});B({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(r,e,t){var{parser:a}=r,n=t[0],s=e[0];return{type:"sqrt",mode:a.mode,body:s,index:n}},htmlBuilder(r,e){var t=G(r.body,e.havingCrampedStyle());t.height===0&&(t.height=e.fontMetrics().xHeight),t=y.wrapFragment(t,e);var a=e.fontMetrics(),n=a.defaultRuleThickness,s=n;e.style.idt.height+t.depth+l&&(l=(l+b-t.height-t.depth)/2);var x=c.height-t.height-l-f;t.style.paddingLeft=T(v);var w=y.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:t,wrapperClasses:["svg-align"]},{type:"kern",size:-(t.height+x)},{type:"elem",elem:c},{type:"kern",size:f}]},e);if(r.index){var A=e.havingStyle(E.SCRIPTSCRIPT),q=G(r.index,A,e),_=.6*(w.height-w.depth),D=y.makeVList({positionType:"shift",positionData:-_,children:[{type:"elem",elem:q}]},e),N=y.makeSpan(["root"],[D]);return y.makeSpan(["mord","sqrt"],[N,w],e)}else return y.makeSpan(["mord","sqrt"],[w],e)},mathmlBuilder(r,e){var{body:t,index:a}=r;return a?new M.MathNode("mroot",[X(t,e),X(a,e)]):new M.MathNode("msqrt",[X(t,e)])}});var fr={display:E.DISPLAY,text:E.TEXT,script:E.SCRIPT,scriptscript:E.SCRIPTSCRIPT};B({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(r,e){var{breakOnTokenText:t,funcName:a,parser:n}=r,s=n.parseExpression(!0,t),l=a.slice(1,a.length-5);return{type:"styling",mode:n.mode,style:l,body:s}},htmlBuilder(r,e){var t=fr[r.style],a=e.havingStyle(t).withFont("");return ma(r.body,a,e)},mathmlBuilder(r,e){var t=fr[r.style],a=e.havingStyle(t),n=m0(r.body,a),s=new M.MathNode("mstyle",n),l={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},h=l[r.style];return s.setAttribute("scriptlevel",h[0]),s.setAttribute("displaystyle",h[1]),s}});var on=function(e,t){var a=e.base;if(a)if(a.type==="op"){var n=a.limits&&(t.style.size===E.DISPLAY.size||a.alwaysHandleSupSub);return n?se:null}else if(a.type==="operatorname"){var s=a.alwaysHandleSupSub&&(t.style.size===E.DISPLAY.size||a.limits);return s?ca:null}else{if(a.type==="accent")return O.isCharacterBox(a.base)?_t:null;if(a.type==="horizBrace"){var l=!e.sub;return l===a.isOver?la:null}else return null}else return null};j0({type:"supsub",htmlBuilder(r,e){var t=on(r,e);if(t)return t(r,e);var{base:a,sup:n,sub:s}=r,l=G(a,e),h,c,f=e.fontMetrics(),v=0,b=0,x=a&&O.isCharacterBox(a);if(n){var w=e.havingStyle(e.style.sup());h=G(n,w,e),x||(v=l.height-w.fontMetrics().supDrop*w.sizeMultiplier/e.sizeMultiplier)}if(s){var A=e.havingStyle(e.style.sub());c=G(s,A,e),x||(b=l.depth+A.fontMetrics().subDrop*A.sizeMultiplier/e.sizeMultiplier)}var q;e.style===E.DISPLAY?q=f.sup1:e.style.cramped?q=f.sup3:q=f.sup2;var _=e.sizeMultiplier,D=T(.5/f.ptPerEm/_),N=null;if(c){var $=r.base&&r.base.type==="op"&&r.base.name&&(r.base.name==="\\oiint"||r.base.name==="\\oiiint");(l instanceof c0||$)&&(N=T(-l.italic))}var H;if(h&&c){v=Math.max(v,q,h.depth+.25*f.xHeight),b=Math.max(b,f.sub2);var F=f.defaultRuleThickness,P=4*F;if(v-h.depth-(c.height-b)0&&(v+=V,b-=V)}var j=[{type:"elem",elem:c,shift:b,marginRight:D,marginLeft:N},{type:"elem",elem:h,shift:-v,marginRight:D}];H=y.makeVList({positionType:"individualShift",children:j},e)}else if(c){b=Math.max(b,f.sub1,c.height-.8*f.xHeight);var U=[{type:"elem",elem:c,marginLeft:N,marginRight:D}];H=y.makeVList({positionType:"shift",positionData:b,children:U},e)}else if(h)v=Math.max(v,q,h.depth+.25*f.xHeight),H=y.makeVList({positionType:"shift",positionData:-v,children:[{type:"elem",elem:h,marginRight:D}]},e);else throw new Error("supsub must have either sup or sub.");var D0=bt(l,"right")||"mord";return y.makeSpan([D0],[l,y.makeSpan(["msupsub"],[H])],e)},mathmlBuilder(r,e){var t=!1,a,n;r.base&&r.base.type==="horizBrace"&&(n=!!r.sup,n===r.base.isOver&&(t=!0,a=r.base.isOver)),r.base&&(r.base.type==="op"||r.base.type==="operatorname")&&(r.base.parentIsSupSub=!0);var s=[X(r.base,e)];r.sub&&s.push(X(r.sub,e)),r.sup&&s.push(X(r.sup,e));var l;if(t)l=a?"mover":"munder";else if(r.sub)if(r.sup){var f=r.base;f&&f.type==="op"&&f.limits&&e.style===E.DISPLAY||f&&f.type==="operatorname"&&f.alwaysHandleSupSub&&(e.style===E.DISPLAY||f.limits)?l="munderover":l="msubsup"}else{var c=r.base;c&&c.type==="op"&&c.limits&&(e.style===E.DISPLAY||c.alwaysHandleSupSub)||c&&c.type==="operatorname"&&c.alwaysHandleSupSub&&(c.limits||e.style===E.DISPLAY)?l="munder":l="msub"}else{var h=r.base;h&&h.type==="op"&&h.limits&&(e.style===E.DISPLAY||h.alwaysHandleSupSub)||h&&h.type==="operatorname"&&h.alwaysHandleSupSub&&(h.limits||e.style===E.DISPLAY)?l="mover":l="msup"}return new M.MathNode(l,s)}});j0({type:"atom",htmlBuilder(r,e){return y.mathsym(r.text,r.mode,e,["m"+r.family])},mathmlBuilder(r,e){var t=new M.MathNode("mo",[y0(r.text,r.mode)]);if(r.family==="bin"){var a=Dt(r,e);a==="bold-italic"&&t.setAttribute("mathvariant",a)}else r.family==="punct"?t.setAttribute("separator","true"):(r.family==="open"||r.family==="close")&&t.setAttribute("stretchy","false");return t}});var da={mi:"italic",mn:"normal",mtext:"normal"};j0({type:"mathord",htmlBuilder(r,e){return y.makeOrd(r,e,"mathord")},mathmlBuilder(r,e){var t=new M.MathNode("mi",[y0(r.text,r.mode,e)]),a=Dt(r,e)||"italic";return a!==da[t.type]&&t.setAttribute("mathvariant",a),t}});j0({type:"textord",htmlBuilder(r,e){return y.makeOrd(r,e,"textord")},mathmlBuilder(r,e){var t=y0(r.text,r.mode,e),a=Dt(r,e)||"normal",n;return r.mode==="text"?n=new M.MathNode("mtext",[t]):/[0-9]/.test(r.text)?n=new M.MathNode("mn",[t]):r.text==="\\prime"?n=new M.MathNode("mo",[t]):n=new M.MathNode("mi",[t]),a!==da[n.type]&&n.setAttribute("mathvariant",a),n}});var ct={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},mt={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};j0({type:"spacing",htmlBuilder(r,e){if(mt.hasOwnProperty(r.text)){var t=mt[r.text].className||"";if(r.mode==="text"){var a=y.makeOrd(r,e,"textord");return a.classes.push(t),a}else return y.makeSpan(["mspace",t],[y.mathsym(r.text,r.mode,e)],e)}else{if(ct.hasOwnProperty(r.text))return y.makeSpan(["mspace",ct[r.text]],[],e);throw new z('Unknown type of space "'+r.text+'"')}},mathmlBuilder(r,e){var t;if(mt.hasOwnProperty(r.text))t=new M.MathNode("mtext",[new M.TextNode("\xA0")]);else{if(ct.hasOwnProperty(r.text))return new M.MathNode("mspace");throw new z('Unknown type of space "'+r.text+'"')}return t}});var vr=()=>{var r=new M.MathNode("mtd",[]);return r.setAttribute("width","50%"),r};j0({type:"tag",mathmlBuilder(r,e){var t=new M.MathNode("mtable",[new M.MathNode("mtr",[vr(),new M.MathNode("mtd",[V0(r.body,e)]),vr(),new M.MathNode("mtd",[V0(r.tag,e)])])]);return t.setAttribute("width","100%"),t}});var gr={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},br={"\\textbf":"textbf","\\textmd":"textmd"},ln={"\\textit":"textit","\\textup":"textup"},yr=(r,e)=>{var t=r.font;if(t){if(gr[t])return e.withTextFontFamily(gr[t]);if(br[t])return e.withTextFontWeight(br[t]);if(t==="\\emph")return e.fontShape==="textit"?e.withTextFontShape("textup"):e.withTextFontShape("textit")}else return e;return e.withTextFontShape(ln[t])};B({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(r,e){var{parser:t,funcName:a}=r,n=e[0];return{type:"text",mode:t.mode,body:e0(n),font:a}},htmlBuilder(r,e){var t=yr(r,e),a=a0(r.body,t,!0);return y.makeSpan(["mord","text"],a,t)},mathmlBuilder(r,e){var t=yr(r,e);return V0(r.body,t)}});B({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(r,e){var{parser:t}=r;return{type:"underline",mode:t.mode,body:e[0]}},htmlBuilder(r,e){var t=G(r.body,e),a=y.makeLineSpan("underline-line",e),n=e.fontMetrics().defaultRuleThickness,s=y.makeVList({positionType:"top",positionData:t.height,children:[{type:"kern",size:n},{type:"elem",elem:a},{type:"kern",size:3*n},{type:"elem",elem:t}]},e);return y.makeSpan(["mord","underline"],[s],e)},mathmlBuilder(r,e){var t=new M.MathNode("mo",[new M.TextNode("\u203E")]);t.setAttribute("stretchy","true");var a=new M.MathNode("munder",[X(r.body,e),t]);return a.setAttribute("accentunder","true"),a}});B({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(r,e){var{parser:t}=r;return{type:"vcenter",mode:t.mode,body:e[0]}},htmlBuilder(r,e){var t=G(r.body,e),a=e.fontMetrics().axisHeight,n=.5*(t.height-a-(t.depth+a));return y.makeVList({positionType:"shift",positionData:n,children:[{type:"elem",elem:t}]},e)},mathmlBuilder(r,e){return new M.MathNode("mpadded",[X(r.body,e)],["vcenter"])}});B({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(r,e,t){throw new z("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(r,e){for(var t=xr(r),a=[],n=e.havingStyle(e.style.text()),s=0;sr.body.replace(/ /g,r.star?"\u2423":"\xA0"),P0=Er,pa=`[ \r
- ]`,un="\\\\[a-zA-Z@]+",hn="\\\\[^\uD800-\uDFFF]",cn="("+un+")"+pa+"*",mn=`\\\\(
-|[ \r ]+
-?)[ \r ]*`,kt="[\u0300-\u036F]",dn=new RegExp(kt+"+$"),pn="("+pa+"+)|"+(mn+"|")+"([!-\\[\\]-\u2027\u202A-\uD7FF\uF900-\uFFFF]"+(kt+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(kt+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+cn)+("|"+hn+")"),Pe=class{constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp(pn,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new b0("EOF",new d0(this,t,t));var a=this.tokenRegex.exec(e);if(a===null||a.index!==t)throw new z("Unexpected character: '"+e[t]+"'",new b0(e[t],new d0(this,t,t+1)));var n=a[6]||a[3]||(a[2]?"\\ ":" ");if(this.catcodes[n]===14){var s=e.indexOf(`
-`,this.tokenRegex.lastIndex);return s===-1?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=s+1,this.lex()}return new b0(n,new d0(this,t,this.tokenRegex.lastIndex))}},Mt=class{constructor(e,t){e===void 0&&(e={}),t===void 0&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new z("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var t in e)e.hasOwnProperty(t)&&(e[t]==null?delete this.current[t]:this.current[t]=e[t])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,t,a){if(a===void 0&&(a=!1),a){for(var n=0;n0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var s=this.undefStack[this.undefStack.length-1];s&&!s.hasOwnProperty(e)&&(s[e]=this.current[e])}t==null?delete this.current[e]:this.current[e]=t}},fn=aa;m("\\noexpand",function(r){var e=r.popToken();return r.isExpandable(e.text)&&(e.noexpand=!0,e.treatAsRelax=!0),{tokens:[e],numArgs:0}});m("\\expandafter",function(r){var e=r.popToken();return r.expandOnce(!0),{tokens:[e],numArgs:0}});m("\\@firstoftwo",function(r){var e=r.consumeArgs(2);return{tokens:e[0],numArgs:0}});m("\\@secondoftwo",function(r){var e=r.consumeArgs(2);return{tokens:e[1],numArgs:0}});m("\\@ifnextchar",function(r){var e=r.consumeArgs(3);r.consumeSpaces();var t=r.future();return e[0].length===1&&e[0][0].text===t.text?{tokens:e[1],numArgs:0}:{tokens:e[2],numArgs:0}});m("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");m("\\TextOrMath",function(r){var e=r.consumeArgs(2);return r.mode==="text"?{tokens:e[0],numArgs:0}:{tokens:e[1],numArgs:0}});var wr={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};m("\\char",function(r){var e=r.popToken(),t,a="";if(e.text==="'")t=8,e=r.popToken();else if(e.text==='"')t=16,e=r.popToken();else if(e.text==="`")if(e=r.popToken(),e.text[0]==="\\")a=e.text.charCodeAt(1);else{if(e.text==="EOF")throw new z("\\char` missing argument");a=e.text.charCodeAt(0)}else t=10;if(t){if(a=wr[e.text],a==null||a>=t)throw new z("Invalid base-"+t+" digit "+e.text);for(var n;(n=wr[r.future().text])!=null&&n{var n=r.consumeArg().tokens;if(n.length!==1)throw new z("\\newcommand's first argument must be a macro name");var s=n[0].text,l=r.isDefined(s);if(l&&!e)throw new z("\\newcommand{"+s+"} attempting to redefine "+(s+"; use \\renewcommand"));if(!l&&!t)throw new z("\\renewcommand{"+s+"} when command "+s+" does not yet exist; use \\newcommand");var h=0;if(n=r.consumeArg().tokens,n.length===1&&n[0].text==="["){for(var c="",f=r.expandNextToken();f.text!=="]"&&f.text!=="EOF";)c+=f.text,f=r.expandNextToken();if(!c.match(/^\s*[0-9]+\s*$/))throw new z("Invalid number of arguments: "+c);h=parseInt(c),n=r.consumeArg().tokens}return l&&a||r.macros.set(s,{tokens:n,numArgs:h}),""};m("\\newcommand",r=>Ft(r,!1,!0,!1));m("\\renewcommand",r=>Ft(r,!0,!1,!1));m("\\providecommand",r=>Ft(r,!0,!0,!0));m("\\message",r=>{var e=r.consumeArgs(1)[0];return console.log(e.reverse().map(t=>t.text).join("")),""});m("\\errmessage",r=>{var e=r.consumeArgs(1)[0];return console.error(e.reverse().map(t=>t.text).join("")),""});m("\\show",r=>{var e=r.popToken(),t=e.text;return console.log(e,r.macros.get(t),P0[t],Y.math[t],Y.text[t]),""});m("\\bgroup","{");m("\\egroup","}");m("~","\\nobreakspace");m("\\lq","`");m("\\rq","'");m("\\aa","\\r a");m("\\AA","\\r A");m("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`\xA9}");m("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");m("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`\xAE}");m("\u212C","\\mathscr{B}");m("\u2130","\\mathscr{E}");m("\u2131","\\mathscr{F}");m("\u210B","\\mathscr{H}");m("\u2110","\\mathscr{I}");m("\u2112","\\mathscr{L}");m("\u2133","\\mathscr{M}");m("\u211B","\\mathscr{R}");m("\u212D","\\mathfrak{C}");m("\u210C","\\mathfrak{H}");m("\u2128","\\mathfrak{Z}");m("\\Bbbk","\\Bbb{k}");m("\xB7","\\cdotp");m("\\llap","\\mathllap{\\textrm{#1}}");m("\\rlap","\\mathrlap{\\textrm{#1}}");m("\\clap","\\mathclap{\\textrm{#1}}");m("\\mathstrut","\\vphantom{(}");m("\\underbar","\\underline{\\text{#1}}");m("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}');m("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`\u2260}}");m("\\ne","\\neq");m("\u2260","\\neq");m("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`\u2209}}");m("\u2209","\\notin");m("\u2258","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`\u2258}}");m("\u2259","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`\u2258}}");m("\u225A","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`\u225A}}");m("\u225B","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`\u225B}}");m("\u225D","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`\u225D}}");m("\u225E","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`\u225E}}");m("\u225F","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`\u225F}}");m("\u27C2","\\perp");m("\u203C","\\mathclose{!\\mkern-0.8mu!}");m("\u220C","\\notni");m("\u231C","\\ulcorner");m("\u231D","\\urcorner");m("\u231E","\\llcorner");m("\u231F","\\lrcorner");m("\xA9","\\copyright");m("\xAE","\\textregistered");m("\uFE0F","\\textregistered");m("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');m("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');m("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');m("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');m("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");m("\u22EE","\\vdots");m("\\varGamma","\\mathit{\\Gamma}");m("\\varDelta","\\mathit{\\Delta}");m("\\varTheta","\\mathit{\\Theta}");m("\\varLambda","\\mathit{\\Lambda}");m("\\varXi","\\mathit{\\Xi}");m("\\varPi","\\mathit{\\Pi}");m("\\varSigma","\\mathit{\\Sigma}");m("\\varUpsilon","\\mathit{\\Upsilon}");m("\\varPhi","\\mathit{\\Phi}");m("\\varPsi","\\mathit{\\Psi}");m("\\varOmega","\\mathit{\\Omega}");m("\\substack","\\begin{subarray}{c}#1\\end{subarray}");m("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");m("\\boxed","\\fbox{$\\displaystyle{#1}$}");m("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");m("\\implies","\\DOTSB\\;\\Longrightarrow\\;");m("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");m("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");m("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var Sr={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};m("\\dots",function(r){var e="\\dotso",t=r.expandAfterFuture().text;return t in Sr?e=Sr[t]:(t.slice(0,4)==="\\not"||t in Y.math&&O.contains(["bin","rel"],Y.math[t].group))&&(e="\\dotsb"),e});var Ht={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};m("\\dotso",function(r){var e=r.future().text;return e in Ht?"\\ldots\\,":"\\ldots"});m("\\dotsc",function(r){var e=r.future().text;return e in Ht&&e!==","?"\\ldots\\,":"\\ldots"});m("\\cdots",function(r){var e=r.future().text;return e in Ht?"\\@cdots\\,":"\\@cdots"});m("\\dotsb","\\cdots");m("\\dotsm","\\cdots");m("\\dotsi","\\!\\cdots");m("\\dotsx","\\ldots\\,");m("\\DOTSI","\\relax");m("\\DOTSB","\\relax");m("\\DOTSX","\\relax");m("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");m("\\,","\\tmspace+{3mu}{.1667em}");m("\\thinspace","\\,");m("\\>","\\mskip{4mu}");m("\\:","\\tmspace+{4mu}{.2222em}");m("\\medspace","\\:");m("\\;","\\tmspace+{5mu}{.2777em}");m("\\thickspace","\\;");m("\\!","\\tmspace-{3mu}{.1667em}");m("\\negthinspace","\\!");m("\\negmedspace","\\tmspace-{4mu}{.2222em}");m("\\negthickspace","\\tmspace-{5mu}{.277em}");m("\\enspace","\\kern.5em ");m("\\enskip","\\hskip.5em\\relax");m("\\quad","\\hskip1em\\relax");m("\\qquad","\\hskip2em\\relax");m("\\tag","\\@ifstar\\tag@literal\\tag@paren");m("\\tag@paren","\\tag@literal{({#1})}");m("\\tag@literal",r=>{if(r.macros.get("\\df@tag"))throw new z("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});m("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");m("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");m("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");m("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");m("\\newline","\\\\\\relax");m("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var fa=T(z0["Main-Regular"][84][1]-.7*z0["Main-Regular"][65][1]);m("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+fa+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");m("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+fa+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");m("\\hspace","\\@ifstar\\@hspacer\\@hspace");m("\\@hspace","\\hskip #1\\relax");m("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");m("\\ordinarycolon",":");m("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");m("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');m("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');m("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');m("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');m("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');m("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');m("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');m("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');m("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');m("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');m("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');m("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');m("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');m("\u2237","\\dblcolon");m("\u2239","\\eqcolon");m("\u2254","\\coloneqq");m("\u2255","\\eqqcolon");m("\u2A74","\\Coloneqq");m("\\ratio","\\vcentcolon");m("\\coloncolon","\\dblcolon");m("\\colonequals","\\coloneqq");m("\\coloncolonequals","\\Coloneqq");m("\\equalscolon","\\eqqcolon");m("\\equalscoloncolon","\\Eqqcolon");m("\\colonminus","\\coloneq");m("\\coloncolonminus","\\Coloneq");m("\\minuscolon","\\eqcolon");m("\\minuscoloncolon","\\Eqcolon");m("\\coloncolonapprox","\\Colonapprox");m("\\coloncolonsim","\\Colonsim");m("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");m("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");m("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");m("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");m("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220C}}");m("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");m("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");m("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");m("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");m("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");m("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");m("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");m("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");m("\\gvertneqq","\\html@mathml{\\@gvertneqq}{\u2269}");m("\\lvertneqq","\\html@mathml{\\@lvertneqq}{\u2268}");m("\\ngeqq","\\html@mathml{\\@ngeqq}{\u2271}");m("\\ngeqslant","\\html@mathml{\\@ngeqslant}{\u2271}");m("\\nleqq","\\html@mathml{\\@nleqq}{\u2270}");m("\\nleqslant","\\html@mathml{\\@nleqslant}{\u2270}");m("\\nshortmid","\\html@mathml{\\@nshortmid}{\u2224}");m("\\nshortparallel","\\html@mathml{\\@nshortparallel}{\u2226}");m("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{\u2288}");m("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{\u2289}");m("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{\u228A}");m("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{\u2ACB}");m("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{\u228B}");m("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{\u2ACC}");m("\\imath","\\html@mathml{\\@imath}{\u0131}");m("\\jmath","\\html@mathml{\\@jmath}{\u0237}");m("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`\u27E6}}");m("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`\u27E7}}");m("\u27E6","\\llbracket");m("\u27E7","\\rrbracket");m("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`\u2983}}");m("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`\u2984}}");m("\u2983","\\lBrace");m("\u2984","\\rBrace");m("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`\u29B5}}");m("\u29B5","\\minuso");m("\\darr","\\downarrow");m("\\dArr","\\Downarrow");m("\\Darr","\\Downarrow");m("\\lang","\\langle");m("\\rang","\\rangle");m("\\uarr","\\uparrow");m("\\uArr","\\Uparrow");m("\\Uarr","\\Uparrow");m("\\N","\\mathbb{N}");m("\\R","\\mathbb{R}");m("\\Z","\\mathbb{Z}");m("\\alef","\\aleph");m("\\alefsym","\\aleph");m("\\Alpha","\\mathrm{A}");m("\\Beta","\\mathrm{B}");m("\\bull","\\bullet");m("\\Chi","\\mathrm{X}");m("\\clubs","\\clubsuit");m("\\cnums","\\mathbb{C}");m("\\Complex","\\mathbb{C}");m("\\Dagger","\\ddagger");m("\\diamonds","\\diamondsuit");m("\\empty","\\emptyset");m("\\Epsilon","\\mathrm{E}");m("\\Eta","\\mathrm{H}");m("\\exist","\\exists");m("\\harr","\\leftrightarrow");m("\\hArr","\\Leftrightarrow");m("\\Harr","\\Leftrightarrow");m("\\hearts","\\heartsuit");m("\\image","\\Im");m("\\infin","\\infty");m("\\Iota","\\mathrm{I}");m("\\isin","\\in");m("\\Kappa","\\mathrm{K}");m("\\larr","\\leftarrow");m("\\lArr","\\Leftarrow");m("\\Larr","\\Leftarrow");m("\\lrarr","\\leftrightarrow");m("\\lrArr","\\Leftrightarrow");m("\\Lrarr","\\Leftrightarrow");m("\\Mu","\\mathrm{M}");m("\\natnums","\\mathbb{N}");m("\\Nu","\\mathrm{N}");m("\\Omicron","\\mathrm{O}");m("\\plusmn","\\pm");m("\\rarr","\\rightarrow");m("\\rArr","\\Rightarrow");m("\\Rarr","\\Rightarrow");m("\\real","\\Re");m("\\reals","\\mathbb{R}");m("\\Reals","\\mathbb{R}");m("\\Rho","\\mathrm{P}");m("\\sdot","\\cdot");m("\\sect","\\S");m("\\spades","\\spadesuit");m("\\sub","\\subset");m("\\sube","\\subseteq");m("\\supe","\\supseteq");m("\\Tau","\\mathrm{T}");m("\\thetasym","\\vartheta");m("\\weierp","\\wp");m("\\Zeta","\\mathrm{Z}");m("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");m("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");m("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");m("\\bra","\\mathinner{\\langle{#1}|}");m("\\ket","\\mathinner{|{#1}\\rangle}");m("\\braket","\\mathinner{\\langle{#1}\\rangle}");m("\\Bra","\\left\\langle#1\\right|");m("\\Ket","\\left|#1\\right\\rangle");var va=r=>e=>{var t=e.consumeArg().tokens,a=e.consumeArg().tokens,n=e.consumeArg().tokens,s=e.consumeArg().tokens,l=e.macros.get("|"),h=e.macros.get("\\|");e.macros.beginGroup();var c=b=>x=>{r&&(x.macros.set("|",l),n.length&&x.macros.set("\\|",h));var w=b;if(!b&&n.length){var A=x.future();A.text==="|"&&(x.popToken(),w=!0)}return{tokens:w?n:a,numArgs:0}};e.macros.set("|",c(!1)),n.length&&e.macros.set("\\|",c(!0));var f=e.consumeArg().tokens,v=e.expandTokens([...s,...f,...t]);return e.macros.endGroup(),{tokens:v.reverse(),numArgs:0}};m("\\bra@ket",va(!1));m("\\bra@set",va(!0));m("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");m("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");m("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");m("\\angln","{\\angl n}");m("\\blue","\\textcolor{##6495ed}{#1}");m("\\orange","\\textcolor{##ffa500}{#1}");m("\\pink","\\textcolor{##ff00af}{#1}");m("\\red","\\textcolor{##df0030}{#1}");m("\\green","\\textcolor{##28ae7b}{#1}");m("\\gray","\\textcolor{gray}{#1}");m("\\purple","\\textcolor{##9d38bd}{#1}");m("\\blueA","\\textcolor{##ccfaff}{#1}");m("\\blueB","\\textcolor{##80f6ff}{#1}");m("\\blueC","\\textcolor{##63d9ea}{#1}");m("\\blueD","\\textcolor{##11accd}{#1}");m("\\blueE","\\textcolor{##0c7f99}{#1}");m("\\tealA","\\textcolor{##94fff5}{#1}");m("\\tealB","\\textcolor{##26edd5}{#1}");m("\\tealC","\\textcolor{##01d1c1}{#1}");m("\\tealD","\\textcolor{##01a995}{#1}");m("\\tealE","\\textcolor{##208170}{#1}");m("\\greenA","\\textcolor{##b6ffb0}{#1}");m("\\greenB","\\textcolor{##8af281}{#1}");m("\\greenC","\\textcolor{##74cf70}{#1}");m("\\greenD","\\textcolor{##1fab54}{#1}");m("\\greenE","\\textcolor{##0d923f}{#1}");m("\\goldA","\\textcolor{##ffd0a9}{#1}");m("\\goldB","\\textcolor{##ffbb71}{#1}");m("\\goldC","\\textcolor{##ff9c39}{#1}");m("\\goldD","\\textcolor{##e07d10}{#1}");m("\\goldE","\\textcolor{##a75a05}{#1}");m("\\redA","\\textcolor{##fca9a9}{#1}");m("\\redB","\\textcolor{##ff8482}{#1}");m("\\redC","\\textcolor{##f9685d}{#1}");m("\\redD","\\textcolor{##e84d39}{#1}");m("\\redE","\\textcolor{##bc2612}{#1}");m("\\maroonA","\\textcolor{##ffbde0}{#1}");m("\\maroonB","\\textcolor{##ff92c6}{#1}");m("\\maroonC","\\textcolor{##ed5fa6}{#1}");m("\\maroonD","\\textcolor{##ca337c}{#1}");m("\\maroonE","\\textcolor{##9e034e}{#1}");m("\\purpleA","\\textcolor{##ddd7ff}{#1}");m("\\purpleB","\\textcolor{##c6b9fc}{#1}");m("\\purpleC","\\textcolor{##aa87ff}{#1}");m("\\purpleD","\\textcolor{##7854ab}{#1}");m("\\purpleE","\\textcolor{##543b78}{#1}");m("\\mintA","\\textcolor{##f5f9e8}{#1}");m("\\mintB","\\textcolor{##edf2df}{#1}");m("\\mintC","\\textcolor{##e0e5cc}{#1}");m("\\grayA","\\textcolor{##f6f7f7}{#1}");m("\\grayB","\\textcolor{##f0f1f2}{#1}");m("\\grayC","\\textcolor{##e3e5e6}{#1}");m("\\grayD","\\textcolor{##d6d8da}{#1}");m("\\grayE","\\textcolor{##babec2}{#1}");m("\\grayF","\\textcolor{##888d93}{#1}");m("\\grayG","\\textcolor{##626569}{#1}");m("\\grayH","\\textcolor{##3b3e40}{#1}");m("\\grayI","\\textcolor{##21242c}{#1}");m("\\kaBlue","\\textcolor{##314453}{#1}");m("\\kaGreen","\\textcolor{##71B307}{#1}");var ga={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},zt=class{constructor(e,t,a){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new Mt(fn,t.macros),this.mode=a,this.stack=[]}feed(e){this.lexer=new Pe(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var t,a,n;if(e){if(this.consumeSpaces(),this.future().text!=="[")return null;t=this.popToken(),{tokens:n,end:a}=this.consumeArg(["]"])}else({tokens:n,start:t,end:a}=this.consumeArg());return this.pushToken(new b0("EOF",a.loc)),this.pushTokens(n),t.range(a,"")}consumeSpaces(){for(;;){var e=this.future();if(e.text===" ")this.stack.pop();else break}}consumeArg(e){var t=[],a=e&&e.length>0;a||this.consumeSpaces();var n=this.future(),s,l=0,h=0;do{if(s=this.popToken(),t.push(s),s.text==="{")++l;else if(s.text==="}"){if(--l,l===-1)throw new z("Extra }",s)}else if(s.text==="EOF")throw new z("Unexpected end of input in a macro argument, expected '"+(e&&a?e[h]:"}")+"'",s);if(e&&a)if((l===0||l===1&&e[h]==="{")&&s.text===e[h]){if(++h,h===e.length){t.splice(-h,h);break}}else h=0}while(l!==0||a);return n.text==="{"&&t[t.length-1].text==="}"&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:n,end:s}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new z("The length of delimiters doesn't match the number of args!");for(var a=t[0],n=0;nthis.settings.maxExpand)throw new z("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var t=this.popToken(),a=t.text,n=t.noexpand?null:this._getExpansion(a);if(n==null||e&&n.unexpandable){if(e&&n==null&&a[0]==="\\"&&!this.isDefined(a))throw new z("Undefined control sequence: "+a);return this.pushToken(t),!1}this.countExpansion(1);var s=n.tokens,l=this.consumeArgs(n.numArgs,n.delimiters);if(n.numArgs){s=s.slice();for(var h=s.length-1;h>=0;--h){var c=s[h];if(c.text==="#"){if(h===0)throw new z("Incomplete placeholder at end of macro body",c);if(c=s[--h],c.text==="#")s.splice(h+1,1);else if(/^[1-9]$/.test(c.text))s.splice(h,2,...l[+c.text-1]);else throw new z("Not a valid argument number",c)}}}return this.pushTokens(s),s.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var e=this.stack.pop();return e.treatAsRelax&&(e.text="\\relax"),e}throw new Error}expandMacro(e){return this.macros.has(e)?this.expandTokens([new b0(e)]):void 0}expandTokens(e){var t=[],a=this.stack.length;for(this.pushTokens(e);this.stack.length>a;)if(this.expandOnce(!0)===!1){var n=this.stack.pop();n.treatAsRelax&&(n.noexpand=!1,n.treatAsRelax=!1),t.push(n)}return this.countExpansion(t.length),t}expandMacroAsText(e){var t=this.expandMacro(e);return t&&t.map(a=>a.text).join("")}_getExpansion(e){var t=this.macros.get(e);if(t==null)return t;if(e.length===1){var a=this.lexer.catcodes[e];if(a!=null&&a!==13)return}var n=typeof t=="function"?t(this):t;if(typeof n=="string"){var s=0;if(n.indexOf("#")!==-1)for(var l=n.replace(/##/g,"");l.indexOf("#"+(s+1))!==-1;)++s;for(var h=new Pe(n,this.settings),c=[],f=h.lex();f.text!=="EOF";)c.push(f),f=h.lex();c.reverse();var v={tokens:c,numArgs:s};return v}return n}isDefined(e){return this.macros.has(e)||P0.hasOwnProperty(e)||Y.math.hasOwnProperty(e)||Y.text.hasOwnProperty(e)||ga.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return t!=null?typeof t=="string"||typeof t=="function"||!t.unexpandable:P0.hasOwnProperty(e)&&!P0[e].primitive}},kr=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,Ne=Object.freeze({"\u208A":"+","\u208B":"-","\u208C":"=","\u208D":"(","\u208E":")","\u2080":"0","\u2081":"1","\u2082":"2","\u2083":"3","\u2084":"4","\u2085":"5","\u2086":"6","\u2087":"7","\u2088":"8","\u2089":"9","\u2090":"a","\u2091":"e","\u2095":"h","\u1D62":"i","\u2C7C":"j","\u2096":"k","\u2097":"l","\u2098":"m","\u2099":"n","\u2092":"o","\u209A":"p","\u1D63":"r","\u209B":"s","\u209C":"t","\u1D64":"u","\u1D65":"v","\u2093":"x","\u1D66":"\u03B2","\u1D67":"\u03B3","\u1D68":"\u03C1","\u1D69":"\u03D5","\u1D6A":"\u03C7","\u207A":"+","\u207B":"-","\u207C":"=","\u207D":"(","\u207E":")","\u2070":"0","\xB9":"1","\xB2":"2","\xB3":"3","\u2074":"4","\u2075":"5","\u2076":"6","\u2077":"7","\u2078":"8","\u2079":"9","\u1D2C":"A","\u1D2E":"B","\u1D30":"D","\u1D31":"E","\u1D33":"G","\u1D34":"H","\u1D35":"I","\u1D36":"J","\u1D37":"K","\u1D38":"L","\u1D39":"M","\u1D3A":"N","\u1D3C":"O","\u1D3E":"P","\u1D3F":"R","\u1D40":"T","\u1D41":"U","\u2C7D":"V","\u1D42":"W","\u1D43":"a","\u1D47":"b","\u1D9C":"c","\u1D48":"d","\u1D49":"e","\u1DA0":"f","\u1D4D":"g",\u02B0:"h","\u2071":"i",\u02B2:"j","\u1D4F":"k",\u02E1:"l","\u1D50":"m",\u207F:"n","\u1D52":"o","\u1D56":"p",\u02B3:"r",\u02E2:"s","\u1D57":"t","\u1D58":"u","\u1D5B":"v",\u02B7:"w",\u02E3:"x",\u02B8:"y","\u1DBB":"z","\u1D5D":"\u03B2","\u1D5E":"\u03B3","\u1D5F":"\u03B4","\u1D60":"\u03D5","\u1D61":"\u03C7","\u1DBF":"\u03B8"}),dt={"\u0301":{text:"\\'",math:"\\acute"},"\u0300":{text:"\\`",math:"\\grave"},"\u0308":{text:'\\"',math:"\\ddot"},"\u0303":{text:"\\~",math:"\\tilde"},"\u0304":{text:"\\=",math:"\\bar"},"\u0306":{text:"\\u",math:"\\breve"},"\u030C":{text:"\\v",math:"\\check"},"\u0302":{text:"\\^",math:"\\hat"},"\u0307":{text:"\\.",math:"\\dot"},"\u030A":{text:"\\r",math:"\\mathring"},"\u030B":{text:"\\H"},"\u0327":{text:"\\c"}},Mr={\u00E1:"a\u0301",\u00E0:"a\u0300",\u00E4:"a\u0308",\u01DF:"a\u0308\u0304",\u00E3:"a\u0303",\u0101:"a\u0304",\u0103:"a\u0306",\u1EAF:"a\u0306\u0301",\u1EB1:"a\u0306\u0300",\u1EB5:"a\u0306\u0303",\u01CE:"a\u030C",\u00E2:"a\u0302",\u1EA5:"a\u0302\u0301",\u1EA7:"a\u0302\u0300",\u1EAB:"a\u0302\u0303",\u0227:"a\u0307",\u01E1:"a\u0307\u0304",\u00E5:"a\u030A",\u01FB:"a\u030A\u0301",\u1E03:"b\u0307",\u0107:"c\u0301",\u1E09:"c\u0327\u0301",\u010D:"c\u030C",\u0109:"c\u0302",\u010B:"c\u0307",\u00E7:"c\u0327",\u010F:"d\u030C",\u1E0B:"d\u0307",\u1E11:"d\u0327",\u00E9:"e\u0301",\u00E8:"e\u0300",\u00EB:"e\u0308",\u1EBD:"e\u0303",\u0113:"e\u0304",\u1E17:"e\u0304\u0301",\u1E15:"e\u0304\u0300",\u0115:"e\u0306",\u1E1D:"e\u0327\u0306",\u011B:"e\u030C",\u00EA:"e\u0302",\u1EBF:"e\u0302\u0301",\u1EC1:"e\u0302\u0300",\u1EC5:"e\u0302\u0303",\u0117:"e\u0307",\u0229:"e\u0327",\u1E1F:"f\u0307",\u01F5:"g\u0301",\u1E21:"g\u0304",\u011F:"g\u0306",\u01E7:"g\u030C",\u011D:"g\u0302",\u0121:"g\u0307",\u0123:"g\u0327",\u1E27:"h\u0308",\u021F:"h\u030C",\u0125:"h\u0302",\u1E23:"h\u0307",\u1E29:"h\u0327",\u00ED:"i\u0301",\u00EC:"i\u0300",\u00EF:"i\u0308",\u1E2F:"i\u0308\u0301",\u0129:"i\u0303",\u012B:"i\u0304",\u012D:"i\u0306",\u01D0:"i\u030C",\u00EE:"i\u0302",\u01F0:"j\u030C",\u0135:"j\u0302",\u1E31:"k\u0301",\u01E9:"k\u030C",\u0137:"k\u0327",\u013A:"l\u0301",\u013E:"l\u030C",\u013C:"l\u0327",\u1E3F:"m\u0301",\u1E41:"m\u0307",\u0144:"n\u0301",\u01F9:"n\u0300",\u00F1:"n\u0303",\u0148:"n\u030C",\u1E45:"n\u0307",\u0146:"n\u0327",\u00F3:"o\u0301",\u00F2:"o\u0300",\u00F6:"o\u0308",\u022B:"o\u0308\u0304",\u00F5:"o\u0303",\u1E4D:"o\u0303\u0301",\u1E4F:"o\u0303\u0308",\u022D:"o\u0303\u0304",\u014D:"o\u0304",\u1E53:"o\u0304\u0301",\u1E51:"o\u0304\u0300",\u014F:"o\u0306",\u01D2:"o\u030C",\u00F4:"o\u0302",\u1ED1:"o\u0302\u0301",\u1ED3:"o\u0302\u0300",\u1ED7:"o\u0302\u0303",\u022F:"o\u0307",\u0231:"o\u0307\u0304",\u0151:"o\u030B",\u1E55:"p\u0301",\u1E57:"p\u0307",\u0155:"r\u0301",\u0159:"r\u030C",\u1E59:"r\u0307",\u0157:"r\u0327",\u015B:"s\u0301",\u1E65:"s\u0301\u0307",\u0161:"s\u030C",\u1E67:"s\u030C\u0307",\u015D:"s\u0302",\u1E61:"s\u0307",\u015F:"s\u0327",\u1E97:"t\u0308",\u0165:"t\u030C",\u1E6B:"t\u0307",\u0163:"t\u0327",\u00FA:"u\u0301",\u00F9:"u\u0300",\u00FC:"u\u0308",\u01D8:"u\u0308\u0301",\u01DC:"u\u0308\u0300",\u01D6:"u\u0308\u0304",\u01DA:"u\u0308\u030C",\u0169:"u\u0303",\u1E79:"u\u0303\u0301",\u016B:"u\u0304",\u1E7B:"u\u0304\u0308",\u016D:"u\u0306",\u01D4:"u\u030C",\u00FB:"u\u0302",\u016F:"u\u030A",\u0171:"u\u030B",\u1E7D:"v\u0303",\u1E83:"w\u0301",\u1E81:"w\u0300",\u1E85:"w\u0308",\u0175:"w\u0302",\u1E87:"w\u0307",\u1E98:"w\u030A",\u1E8D:"x\u0308",\u1E8B:"x\u0307",\u00FD:"y\u0301",\u1EF3:"y\u0300",\u00FF:"y\u0308",\u1EF9:"y\u0303",\u0233:"y\u0304",\u0177:"y\u0302",\u1E8F:"y\u0307",\u1E99:"y\u030A",\u017A:"z\u0301",\u017E:"z\u030C",\u1E91:"z\u0302",\u017C:"z\u0307",\u00C1:"A\u0301",\u00C0:"A\u0300",\u00C4:"A\u0308",\u01DE:"A\u0308\u0304",\u00C3:"A\u0303",\u0100:"A\u0304",\u0102:"A\u0306",\u1EAE:"A\u0306\u0301",\u1EB0:"A\u0306\u0300",\u1EB4:"A\u0306\u0303",\u01CD:"A\u030C",\u00C2:"A\u0302",\u1EA4:"A\u0302\u0301",\u1EA6:"A\u0302\u0300",\u1EAA:"A\u0302\u0303",\u0226:"A\u0307",\u01E0:"A\u0307\u0304",\u00C5:"A\u030A",\u01FA:"A\u030A\u0301",\u1E02:"B\u0307",\u0106:"C\u0301",\u1E08:"C\u0327\u0301",\u010C:"C\u030C",\u0108:"C\u0302",\u010A:"C\u0307",\u00C7:"C\u0327",\u010E:"D\u030C",\u1E0A:"D\u0307",\u1E10:"D\u0327",\u00C9:"E\u0301",\u00C8:"E\u0300",\u00CB:"E\u0308",\u1EBC:"E\u0303",\u0112:"E\u0304",\u1E16:"E\u0304\u0301",\u1E14:"E\u0304\u0300",\u0114:"E\u0306",\u1E1C:"E\u0327\u0306",\u011A:"E\u030C",\u00CA:"E\u0302",\u1EBE:"E\u0302\u0301",\u1EC0:"E\u0302\u0300",\u1EC4:"E\u0302\u0303",\u0116:"E\u0307",\u0228:"E\u0327",\u1E1E:"F\u0307",\u01F4:"G\u0301",\u1E20:"G\u0304",\u011E:"G\u0306",\u01E6:"G\u030C",\u011C:"G\u0302",\u0120:"G\u0307",\u0122:"G\u0327",\u1E26:"H\u0308",\u021E:"H\u030C",\u0124:"H\u0302",\u1E22:"H\u0307",\u1E28:"H\u0327",\u00CD:"I\u0301",\u00CC:"I\u0300",\u00CF:"I\u0308",\u1E2E:"I\u0308\u0301",\u0128:"I\u0303",\u012A:"I\u0304",\u012C:"I\u0306",\u01CF:"I\u030C",\u00CE:"I\u0302",\u0130:"I\u0307",\u0134:"J\u0302",\u1E30:"K\u0301",\u01E8:"K\u030C",\u0136:"K\u0327",\u0139:"L\u0301",\u013D:"L\u030C",\u013B:"L\u0327",\u1E3E:"M\u0301",\u1E40:"M\u0307",\u0143:"N\u0301",\u01F8:"N\u0300",\u00D1:"N\u0303",\u0147:"N\u030C",\u1E44:"N\u0307",\u0145:"N\u0327",\u00D3:"O\u0301",\u00D2:"O\u0300",\u00D6:"O\u0308",\u022A:"O\u0308\u0304",\u00D5:"O\u0303",\u1E4C:"O\u0303\u0301",\u1E4E:"O\u0303\u0308",\u022C:"O\u0303\u0304",\u014C:"O\u0304",\u1E52:"O\u0304\u0301",\u1E50:"O\u0304\u0300",\u014E:"O\u0306",\u01D1:"O\u030C",\u00D4:"O\u0302",\u1ED0:"O\u0302\u0301",\u1ED2:"O\u0302\u0300",\u1ED6:"O\u0302\u0303",\u022E:"O\u0307",\u0230:"O\u0307\u0304",\u0150:"O\u030B",\u1E54:"P\u0301",\u1E56:"P\u0307",\u0154:"R\u0301",\u0158:"R\u030C",\u1E58:"R\u0307",\u0156:"R\u0327",\u015A:"S\u0301",\u1E64:"S\u0301\u0307",\u0160:"S\u030C",\u1E66:"S\u030C\u0307",\u015C:"S\u0302",\u1E60:"S\u0307",\u015E:"S\u0327",\u0164:"T\u030C",\u1E6A:"T\u0307",\u0162:"T\u0327",\u00DA:"U\u0301",\u00D9:"U\u0300",\u00DC:"U\u0308",\u01D7:"U\u0308\u0301",\u01DB:"U\u0308\u0300",\u01D5:"U\u0308\u0304",\u01D9:"U\u0308\u030C",\u0168:"U\u0303",\u1E78:"U\u0303\u0301",\u016A:"U\u0304",\u1E7A:"U\u0304\u0308",\u016C:"U\u0306",\u01D3:"U\u030C",\u00DB:"U\u0302",\u016E:"U\u030A",\u0170:"U\u030B",\u1E7C:"V\u0303",\u1E82:"W\u0301",\u1E80:"W\u0300",\u1E84:"W\u0308",\u0174:"W\u0302",\u1E86:"W\u0307",\u1E8C:"X\u0308",\u1E8A:"X\u0307",\u00DD:"Y\u0301",\u1EF2:"Y\u0300",\u0178:"Y\u0308",\u1EF8:"Y\u0303",\u0232:"Y\u0304",\u0176:"Y\u0302",\u1E8E:"Y\u0307",\u0179:"Z\u0301",\u017D:"Z\u030C",\u1E90:"Z\u0302",\u017B:"Z\u0307",\u03AC:"\u03B1\u0301",\u1F70:"\u03B1\u0300",\u1FB1:"\u03B1\u0304",\u1FB0:"\u03B1\u0306",\u03AD:"\u03B5\u0301",\u1F72:"\u03B5\u0300",\u03AE:"\u03B7\u0301",\u1F74:"\u03B7\u0300",\u03AF:"\u03B9\u0301",\u1F76:"\u03B9\u0300",\u03CA:"\u03B9\u0308",\u0390:"\u03B9\u0308\u0301",\u1FD2:"\u03B9\u0308\u0300",\u1FD1:"\u03B9\u0304",\u1FD0:"\u03B9\u0306",\u03CC:"\u03BF\u0301",\u1F78:"\u03BF\u0300",\u03CD:"\u03C5\u0301",\u1F7A:"\u03C5\u0300",\u03CB:"\u03C5\u0308",\u03B0:"\u03C5\u0308\u0301",\u1FE2:"\u03C5\u0308\u0300",\u1FE1:"\u03C5\u0304",\u1FE0:"\u03C5\u0306",\u03CE:"\u03C9\u0301",\u1F7C:"\u03C9\u0300",\u038E:"\u03A5\u0301",\u1FEA:"\u03A5\u0300",\u03AB:"\u03A5\u0308",\u1FE9:"\u03A5\u0304",\u1FE8:"\u03A5\u0306",\u038F:"\u03A9\u0301",\u1FFA:"\u03A9\u0300"},Ge=class r{constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new zt(e,t,this.mode),this.settings=t,this.leftrightDepth=0}expect(e,t){if(t===void 0&&(t=!0),this.fetch().text!==e)throw new z("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new b0("}")),this.gullet.pushTokens(e);var a=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,a}parseExpression(e,t){for(var a=[];;){this.mode==="math"&&this.consumeSpaces();var n=this.fetch();if(r.endOfExpression.indexOf(n.text)!==-1||t&&n.text===t||e&&P0[n.text]&&P0[n.text].infix)break;var s=this.parseAtom(t);if(s){if(s.type==="internal")continue}else break;a.push(s)}return this.mode==="text"&&this.formLigatures(a),this.handleInfixNodes(a)}handleInfixNodes(e){for(var t=-1,a,n=0;n=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);var h=Y[this.mode][t].group,c=d0.range(e),f;if(i1.hasOwnProperty(h)){var v=h;f={type:"atom",mode:this.mode,family:v,loc:c,text:t}}else f={type:h,mode:this.mode,loc:c,text:t};l=f}else if(t.charCodeAt(0)>=128)this.settings.strict&&(Ar(t.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'"'+(" ("+t.charCodeAt(0)+")"),e)),l={type:"textord",mode:"text",loc:d0.range(e),text:t};else return null;if(this.consume(),s)for(var b=0;b=0;n--)r[n].loc.start>a&&(t+=" ",a=r[n].loc.start),t+=r[n].text,a+=r[n].text.length;var s=W.go(S.go(t,e));return s},S={go:function(r,e){if(!r)return[];e===void 0&&(e="ce");var t="0",a={};a.parenthesisLevel=0,r=r.replace(/\n/g," "),r=r.replace(/[\u2212\u2013\u2014\u2010]/g,"-"),r=r.replace(/[\u2026]/g,"...");for(var n,s=10,l=[];;){n!==r?(s=10,n=r):s--;var h=S.stateMachines[e],c=h.transitions[t]||h.transitions["*"];e:for(var f=0;f0){if(b.revisit||(r=v.remainder),!b.toContinue)break e}else return l}}if(s<=0)throw["MhchemBugU","mhchem bug U. Please report."]}},concatArray:function(r,e){if(e)if(Array.isArray(e))for(var t=0;t":/^[=<>]/,"#":/^[#\u2261]/,"+":/^\+/,"-$":/^-(?=[\s_},;\]/]|$|\([a-z]+\))/,"-9":/^-(?=[0-9])/,"- orbital overlap":/^-(?=(?:[spd]|sp)(?:$|[\s,;\)\]\}]))/,"-":/^-/,"pm-operator":/^(?:\\pm|\$\\pm\$|\+-|\+\/-)/,operator:/^(?:\+|(?:[\-=<>]|<<|>>|\\approx|\$\\approx\$)(?=\s|$|-?[0-9]))/,arrowUpDown:/^(?:v|\(v\)|\^|\(\^\))(?=$|[\s,;\)\]\}])/,"\\bond{(...)}":function(r){return S.patterns.findObserveGroups(r,"\\bond{","","","}")},"->":/^(?:<->|<-->|->|<-|<=>>|<<=>|<=>|[\u2192\u27F6\u21CC])/,CMT:/^[CMT](?=\[)/,"[(...)]":function(r){return S.patterns.findObserveGroups(r,"[","","","]")},"1st-level escape":/^(&|\\\\|\\hline)\s*/,"\\,":/^(?:\\[,\ ;:])/,"\\x{}{}":function(r){return S.patterns.findObserveGroups(r,"",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"\\x{}":function(r){return S.patterns.findObserveGroups(r,"",/^\\[a-zA-Z]+\{/,"}","")},"\\ca":/^\\ca(?:\s+|(?![a-zA-Z]))/,"\\x":/^(?:\\[a-zA-Z]+\s*|\\[_&{}%])/,orbital:/^(?:[0-9]{1,2}[spdfgh]|[0-9]{0,2}sp)(?=$|[^a-zA-Z])/,others:/^[\/~|]/,"\\frac{(...)}":function(r){return S.patterns.findObserveGroups(r,"\\frac{","","","}","{","","","}")},"\\overset{(...)}":function(r){return S.patterns.findObserveGroups(r,"\\overset{","","","}","{","","","}")},"\\underset{(...)}":function(r){return S.patterns.findObserveGroups(r,"\\underset{","","","}","{","","","}")},"\\underbrace{(...)}":function(r){return S.patterns.findObserveGroups(r,"\\underbrace{","","","}_","{","","","}")},"\\color{(...)}0":function(r){return S.patterns.findObserveGroups(r,"\\color{","","","}")},"\\color{(...)}{(...)}1":function(r){return S.patterns.findObserveGroups(r,"\\color{","","","}","{","","","}")},"\\color(...){(...)}2":function(r){return S.patterns.findObserveGroups(r,"\\color","\\","",/^(?=\{)/,"{","","","}")},"\\ce{(...)}":function(r){return S.patterns.findObserveGroups(r,"\\ce{","","","}")},oxidation$:/^(?:[+-][IVX]+|\\pm\s*0|\$\\pm\$\s*0)$/,"d-oxidation$":/^(?:[+-]?\s?[IVX]+|\\pm\s*0|\$\\pm\$\s*0)$/,"roman numeral":/^[IVX]+/,"1/2$":/^[+\-]?(?:[0-9]+|\$[a-z]\$|[a-z])\/[0-9]+(?:\$[a-z]\$|[a-z])?$/,amount:function(r){var e;if(e=r.match(/^(?:(?:(?:\([+\-]?[0-9]+\/[0-9]+\)|[+\-]?(?:[0-9]+|\$[a-z]\$|[a-z])\/[0-9]+|[+\-]?[0-9]+[.,][0-9]+|[+\-]?\.[0-9]+|[+\-]?[0-9]+)(?:[a-z](?=\s*[A-Z]))?)|[+\-]?[a-z](?=\s*[A-Z])|\+(?!\s))/),e)return{match_:e[0],remainder:r.substr(e[0].length)};var t=S.patterns.findObserveGroups(r,"","$","$","");return t&&(e=t.match_.match(/^\$(?:\(?[+\-]?(?:[0-9]*[a-z]?[+\-])?[0-9]*[a-z](?:[+\-][0-9]*[a-z]?)?\)?|\+|-)\$$/),e)?{match_:e[0],remainder:r.substr(e[0].length)}:null},amount2:function(r){return this.amount(r)},"(KV letters),":/^(?:[A-Z][a-z]{0,2}|i)(?=,)/,formula$:function(r){if(r.match(/^\([a-z]+\)$/))return null;var e=r.match(/^(?:[a-z]|(?:[0-9\ \+\-\,\.\(\)]+[a-z])+[0-9\ \+\-\,\.\(\)]*|(?:[a-z][0-9\ \+\-\,\.\(\)]+)+[a-z]?)$/);return e?{match_:e[0],remainder:r.substr(e[0].length)}:null},uprightEntities:/^(?:pH|pOH|pC|pK|iPr|iBu)(?=$|[^a-zA-Z])/,"/":/^\s*(\/)\s*/,"//":/^\s*(\/\/)\s*/,"*":/^\s*[*.]\s*/},findObserveGroups:function(r,e,t,a,n,s,l,h,c,f){var v=function(D,N){if(typeof N=="string")return D.indexOf(N)!==0?null:N;var $=D.match(N);return $?$[0]:null},b=function(D,N,$){for(var H=0;N0,null},x=v(r,e);if(x===null||(r=r.substr(x.length),x=v(r,t),x===null))return null;var w=b(r,x.length,a||n);if(w===null)return null;var A=r.substring(0,a?w.endMatchEnd:w.endMatchBegin);if(s||l){var q=this.findObserveGroups(r.substr(w.endMatchEnd),s,l,h,c);if(q===null)return null;var _=[A,q.match_];return{match_:f?_.join(""):_,remainder:q.remainder}}else return{match_:A,remainder:r.substr(w.endMatchEnd)}},match_:function(r,e){var t=S.patterns.patterns[r];if(t===void 0)throw["MhchemBugP","mhchem bug P. Please report. ("+r+")"];if(typeof t=="function")return S.patterns.patterns[r](e);var a=e.match(t);if(a){var n;return a[2]?n=[a[1],a[2]]:a[1]?n=a[1]:n=a[0],{match_:n,remainder:e.substr(a[0].length)}}return null}},actions:{"a=":function(r,e){r.a=(r.a||"")+e},"b=":function(r,e){r.b=(r.b||"")+e},"p=":function(r,e){r.p=(r.p||"")+e},"o=":function(r,e){r.o=(r.o||"")+e},"q=":function(r,e){r.q=(r.q||"")+e},"d=":function(r,e){r.d=(r.d||"")+e},"rm=":function(r,e){r.rm=(r.rm||"")+e},"text=":function(r,e){r.text_=(r.text_||"")+e},insert:function(r,e,t){return{type_:t}},"insert+p1":function(r,e,t){return{type_:t,p1:e}},"insert+p1+p2":function(r,e,t){return{type_:t,p1:e[0],p2:e[1]}},copy:function(r,e){return e},rm:function(r,e){return{type_:"rm",p1:e||""}},text:function(r,e){return S.go(e,"text")},"{text}":function(r,e){var t=["{"];return S.concatArray(t,S.go(e,"text")),t.push("}"),t},"tex-math":function(r,e){return S.go(e,"tex-math")},"tex-math tight":function(r,e){return S.go(e,"tex-math tight")},bond:function(r,e,t){return{type_:"bond",kind_:t||e}},"color0-output":function(r,e){return{type_:"color0",color:e[0]}},ce:function(r,e){return S.go(e)},"1/2":function(r,e){var t=[];e.match(/^[+\-]/)&&(t.push(e.substr(0,1)),e=e.substr(1));var a=e.match(/^([0-9]+|\$[a-z]\$|[a-z])\/([0-9]+)(\$[a-z]\$|[a-z])?$/);return a[1]=a[1].replace(/\$/g,""),t.push({type_:"frac",p1:a[1],p2:a[2]}),a[3]&&(a[3]=a[3].replace(/\$/g,""),t.push({type_:"tex-math",p1:a[3]})),t},"9,9":function(r,e){return S.go(e,"9,9")}},createTransitions:function(r){var e,t,a,n,s={};for(e in r)for(t in r[e])for(a=t.split("|"),r[e][t].stateArray=a,n=0;n":{"0|1|2|3":{action_:"r=",nextState:"r"},"a|as":{action_:["output","r="],nextState:"r"},"*":{action_:["output","r="],nextState:"r"}},"+":{o:{action_:"d= kv",nextState:"d"},"d|D":{action_:"d=",nextState:"d"},q:{action_:"d=",nextState:"qd"},"qd|qD":{action_:"d=",nextState:"qd"},dq:{action_:["output","d="],nextState:"d"},3:{action_:["sb=false","output","operator"],nextState:"0"}},amount:{"0|2":{action_:"a=",nextState:"a"}},"pm-operator":{"0|1|2|a|as":{action_:["sb=false","output",{type_:"operator",option:"\\pm"}],nextState:"0"}},operator:{"0|1|2|a|as":{action_:["sb=false","output","operator"],nextState:"0"}},"-$":{"o|q":{action_:["charge or bond","output"],nextState:"qd"},d:{action_:"d=",nextState:"d"},D:{action_:["output",{type_:"bond",option:"-"}],nextState:"3"},q:{action_:"d=",nextState:"qd"},qd:{action_:"d=",nextState:"qd"},"qD|dq":{action_:["output",{type_:"bond",option:"-"}],nextState:"3"}},"-9":{"3|o":{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"3"}},"- orbital overlap":{o:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"},d:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"}},"-":{"0|1|2":{action_:[{type_:"output",option:1},"beginsWithBond=true",{type_:"bond",option:"-"}],nextState:"3"},3:{action_:{type_:"bond",option:"-"}},a:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"},as:{action_:[{type_:"output",option:2},{type_:"bond",option:"-"}],nextState:"3"},b:{action_:"b="},o:{action_:{type_:"- after o/d",option:!1},nextState:"2"},q:{action_:{type_:"- after o/d",option:!1},nextState:"2"},"d|qd|dq":{action_:{type_:"- after o/d",option:!0},nextState:"2"},"D|qD|p":{action_:["output",{type_:"bond",option:"-"}],nextState:"3"}},amount2:{"1|3":{action_:"a=",nextState:"a"}},letters:{"0|1|2|3|a|as|b|p|bp|o":{action_:"o=",nextState:"o"},"q|dq":{action_:["output","o="],nextState:"o"},"d|D|qd|qD":{action_:"o after d",nextState:"o"}},digits:{o:{action_:"q=",nextState:"q"},"d|D":{action_:"q=",nextState:"dq"},q:{action_:["output","o="],nextState:"o"},a:{action_:"o=",nextState:"o"}},"space A":{"b|p|bp":{}},space:{a:{nextState:"as"},0:{action_:"sb=false"},"1|2":{action_:"sb=true"},"r|rt|rd|rdt|rdq":{action_:"output",nextState:"0"},"*":{action_:["output","sb=true"],nextState:"1"}},"1st-level escape":{"1|2":{action_:["output",{type_:"insert+p1",option:"1st-level escape"}]},"*":{action_:["output",{type_:"insert+p1",option:"1st-level escape"}],nextState:"0"}},"[(...)]":{"r|rt":{action_:"rd=",nextState:"rd"},"rd|rdt":{action_:"rq=",nextState:"rdq"}},"...":{"o|d|D|dq|qd|qD":{action_:["output",{type_:"bond",option:"..."}],nextState:"3"},"*":{action_:[{type_:"output",option:1},{type_:"insert",option:"ellipsis"}],nextState:"1"}},". |* ":{"*":{action_:["output",{type_:"insert",option:"addition compound"}],nextState:"1"}},"state of aggregation $":{"*":{action_:["output","state of aggregation"],nextState:"1"}},"{[(":{"a|as|o":{action_:["o=","output","parenthesisLevel++"],nextState:"2"},"0|1|2|3":{action_:["o=","output","parenthesisLevel++"],nextState:"2"},"*":{action_:["output","o=","output","parenthesisLevel++"],nextState:"2"}},")]}":{"0|1|2|3|b|p|bp|o":{action_:["o=","parenthesisLevel--"],nextState:"o"},"a|as|d|D|q|qd|qD|dq":{action_:["output","o=","parenthesisLevel--"],nextState:"o"}},", ":{"*":{action_:["output","comma"],nextState:"0"}},"^_":{"*":{}},"^{(...)}|^($...$)":{"0|1|2|as":{action_:"b=",nextState:"b"},p:{action_:"b=",nextState:"bp"},"3|o":{action_:"d= kv",nextState:"D"},q:{action_:"d=",nextState:"qD"},"d|D|qd|qD|dq":{action_:["output","d="],nextState:"D"}},"^a|^\\x{}{}|^\\x{}|^\\x|'":{"0|1|2|as":{action_:"b=",nextState:"b"},p:{action_:"b=",nextState:"bp"},"3|o":{action_:"d= kv",nextState:"d"},q:{action_:"d=",nextState:"qd"},"d|qd|D|qD":{action_:"d="},dq:{action_:["output","d="],nextState:"d"}},"_{(state of aggregation)}$":{"d|D|q|qd|qD|dq":{action_:["output","q="],nextState:"q"}},"_{(...)}|_($...$)|_9|_\\x{}{}|_\\x{}|_\\x":{"0|1|2|as":{action_:"p=",nextState:"p"},b:{action_:"p=",nextState:"bp"},"3|o":{action_:"q=",nextState:"q"},"d|D":{action_:"q=",nextState:"dq"},"q|qd|qD|dq":{action_:["output","q="],nextState:"q"}},"=<>":{"0|1|2|3|a|as|o|q|d|D|qd|qD|dq":{action_:[{type_:"output",option:2},"bond"],nextState:"3"}},"#":{"0|1|2|3|a|as|o":{action_:[{type_:"output",option:2},{type_:"bond",option:"#"}],nextState:"3"}},"{}":{"*":{action_:{type_:"output",option:1},nextState:"1"}},"{...}":{"0|1|2|3|a|as|b|p|bp":{action_:"o=",nextState:"o"},"o|d|D|q|qd|qD|dq":{action_:["output","o="],nextState:"o"}},"$...$":{a:{action_:"a="},"0|1|2|3|as|b|p|bp|o":{action_:"o=",nextState:"o"},"as|o":{action_:"o="},"q|d|D|qd|qD|dq":{action_:["output","o="],nextState:"o"}},"\\bond{(...)}":{"*":{action_:[{type_:"output",option:2},"bond"],nextState:"3"}},"\\frac{(...)}":{"*":{action_:[{type_:"output",option:1},"frac-output"],nextState:"3"}},"\\overset{(...)}":{"*":{action_:[{type_:"output",option:2},"overset-output"],nextState:"3"}},"\\underset{(...)}":{"*":{action_:[{type_:"output",option:2},"underset-output"],nextState:"3"}},"\\underbrace{(...)}":{"*":{action_:[{type_:"output",option:2},"underbrace-output"],nextState:"3"}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:[{type_:"output",option:2},"color-output"],nextState:"3"}},"\\color{(...)}0":{"*":{action_:[{type_:"output",option:2},"color0-output"]}},"\\ce{(...)}":{"*":{action_:[{type_:"output",option:2},"ce"],nextState:"3"}},"\\,":{"*":{action_:[{type_:"output",option:1},"copy"],nextState:"1"}},"\\x{}{}|\\x{}|\\x":{"0|1|2|3|a|as|b|p|bp|o|c0":{action_:["o=","output"],nextState:"3"},"*":{action_:["output","o=","output"],nextState:"3"}},others:{"*":{action_:[{type_:"output",option:1},"copy"],nextState:"3"}},else2:{a:{action_:"a to o",nextState:"o",revisit:!0},as:{action_:["output","sb=true"],nextState:"1",revisit:!0},"r|rt|rd|rdt|rdq":{action_:["output"],nextState:"0",revisit:!0},"*":{action_:["output","copy"],nextState:"3"}}}),actions:{"o after d":function(r,e){var t;if((r.d||"").match(/^[0-9]+$/)){var a=r.d;r.d=void 0,t=this.output(r),r.b=a}else t=this.output(r);return S.actions["o="](r,e),t},"d= kv":function(r,e){r.d=e,r.dType="kv"},"charge or bond":function(r,e){if(r.beginsWithBond){var t=[];return S.concatArray(t,this.output(r)),S.concatArray(t,S.actions.bond(r,e,"-")),t}else r.d=e},"- after o/d":function(r,e,t){var a=S.patterns.match_("orbital",r.o||""),n=S.patterns.match_("one lowercase greek letter $",r.o||""),s=S.patterns.match_("one lowercase latin letter $",r.o||""),l=S.patterns.match_("$one lowercase latin letter$ $",r.o||""),h=e==="-"&&(a&&a.remainder===""||n||s||l);h&&!r.a&&!r.b&&!r.p&&!r.d&&!r.q&&!a&&s&&(r.o="$"+r.o+"$");var c=[];return h?(S.concatArray(c,this.output(r)),c.push({type_:"hyphen"})):(a=S.patterns.match_("digits",r.d||""),t&&a&&a.remainder===""?(S.concatArray(c,S.actions["d="](r,e)),S.concatArray(c,this.output(r))):(S.concatArray(c,this.output(r)),S.concatArray(c,S.actions.bond(r,e,"-")))),c},"a to o":function(r){r.o=r.a,r.a=void 0},"sb=true":function(r){r.sb=!0},"sb=false":function(r){r.sb=!1},"beginsWithBond=true":function(r){r.beginsWithBond=!0},"beginsWithBond=false":function(r){r.beginsWithBond=!1},"parenthesisLevel++":function(r){r.parenthesisLevel++},"parenthesisLevel--":function(r){r.parenthesisLevel--},"state of aggregation":function(r,e){return{type_:"state of aggregation",p1:S.go(e,"o")}},comma:function(r,e){var t=e.replace(/\s*$/,""),a=t!==e;return a&&r.parenthesisLevel===0?{type_:"comma enumeration L",p1:t}:{type_:"comma enumeration M",p1:t}},output:function(r,e,t){var a;if(!r.r)a=[],!r.a&&!r.b&&!r.p&&!r.o&&!r.q&&!r.d&&!t||(r.sb&&a.push({type_:"entitySkip"}),!r.o&&!r.q&&!r.d&&!r.b&&!r.p&&t!==2?(r.o=r.a,r.a=void 0):!r.o&&!r.q&&!r.d&&(r.b||r.p)?(r.o=r.a,r.d=r.b,r.q=r.p,r.a=r.b=r.p=void 0):r.o&&r.dType==="kv"&&S.patterns.match_("d-oxidation$",r.d||"")?r.dType="oxidation":r.o&&r.dType==="kv"&&!r.q&&(r.dType=void 0),a.push({type_:"chemfive",a:S.go(r.a,"a"),b:S.go(r.b,"bd"),p:S.go(r.p,"pq"),o:S.go(r.o,"o"),q:S.go(r.q,"pq"),d:S.go(r.d,r.dType==="oxidation"?"oxidation":"bd"),dType:r.dType}));else{var n;r.rdt==="M"?n=S.go(r.rd,"tex-math"):r.rdt==="T"?n=[{type_:"text",p1:r.rd||""}]:n=S.go(r.rd);var s;r.rqt==="M"?s=S.go(r.rq,"tex-math"):r.rqt==="T"?s=[{type_:"text",p1:r.rq||""}]:s=S.go(r.rq),a={type_:"arrow",r:r.r,rd:n,rq:s}}for(var l in r)l!=="parenthesisLevel"&&l!=="beginsWithBond"&&delete r[l];return a},"oxidation-output":function(r,e){var t=["{"];return S.concatArray(t,S.go(e,"oxidation")),t.push("}"),t},"frac-output":function(r,e){return{type_:"frac-ce",p1:S.go(e[0]),p2:S.go(e[1])}},"overset-output":function(r,e){return{type_:"overset",p1:S.go(e[0]),p2:S.go(e[1])}},"underset-output":function(r,e){return{type_:"underset",p1:S.go(e[0]),p2:S.go(e[1])}},"underbrace-output":function(r,e){return{type_:"underbrace",p1:S.go(e[0]),p2:S.go(e[1])}},"color-output":function(r,e){return{type_:"color",color1:e[0],color2:S.go(e[1])}},"r=":function(r,e){r.r=e},"rdt=":function(r,e){r.rdt=e},"rd=":function(r,e){r.rd=e},"rqt=":function(r,e){r.rqt=e},"rq=":function(r,e){r.rq=e},operator:function(r,e,t){return{type_:"operator",kind_:t||e}}}},a:{transitions:S.createTransitions({empty:{"*":{}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"1",revisit:!0}},"$(...)$":{"*":{action_:"tex-math tight",nextState:"1"}},",":{"*":{action_:{type_:"insert",option:"commaDecimal"}}},else2:{"*":{action_:"copy"}}}),actions:{}},o:{transitions:S.createTransitions({empty:{"*":{}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"1",revisit:!0}},letters:{"*":{action_:"rm"}},"\\ca":{"*":{action_:{type_:"insert",option:"circa"}}},"\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"{text}"}},else2:{"*":{action_:"copy"}}}),actions:{}},text:{transitions:S.createTransitions({empty:{"*":{action_:"output"}},"{...}":{"*":{action_:"text="}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"\\greek":{"*":{action_:["output","rm"]}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:["output","copy"]}},else:{"*":{action_:"text="}}}),actions:{output:function(r){if(r.text_){var e={type_:"text",p1:r.text_};for(var t in r)delete r[t];return e}}}},pq:{transitions:S.createTransitions({empty:{"*":{}},"state of aggregation $":{"*":{action_:"state of aggregation"}},i$:{0:{nextState:"!f",revisit:!0}},"(KV letters),":{0:{action_:"rm",nextState:"0"}},formula$:{0:{nextState:"f",revisit:!0}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"!f",revisit:!0}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"text"}},"a-z":{f:{action_:"tex-math"}},letters:{"*":{action_:"rm"}},"-9.,9":{"*":{action_:"9,9"}},",":{"*":{action_:{type_:"insert+p1",option:"comma enumeration S"}}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:"color-output"}},"\\color{(...)}0":{"*":{action_:"color0-output"}},"\\ce{(...)}":{"*":{action_:"ce"}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},else2:{"*":{action_:"copy"}}}),actions:{"state of aggregation":function(r,e){return{type_:"state of aggregation subscript",p1:S.go(e,"o")}},"color-output":function(r,e){return{type_:"color",color1:e[0],color2:S.go(e[1],"pq")}}}},bd:{transitions:S.createTransitions({empty:{"*":{}},x$:{0:{nextState:"!f",revisit:!0}},formula$:{0:{nextState:"f",revisit:!0}},else:{0:{nextState:"!f",revisit:!0}},"-9.,9 no missing 0":{"*":{action_:"9,9"}},".":{"*":{action_:{type_:"insert",option:"electron dot"}}},"a-z":{f:{action_:"tex-math"}},x:{"*":{action_:{type_:"insert",option:"KV x"}}},letters:{"*":{action_:"rm"}},"'":{"*":{action_:{type_:"insert",option:"prime"}}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"text"}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:"color-output"}},"\\color{(...)}0":{"*":{action_:"color0-output"}},"\\ce{(...)}":{"*":{action_:"ce"}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},else2:{"*":{action_:"copy"}}}),actions:{"color-output":function(r,e){return{type_:"color",color1:e[0],color2:S.go(e[1],"bd")}}}},oxidation:{transitions:S.createTransitions({empty:{"*":{}},"roman numeral":{"*":{action_:"roman-numeral"}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},else:{"*":{action_:"copy"}}}),actions:{"roman-numeral":function(r,e){return{type_:"roman numeral",p1:e||""}}}},"tex-math":{transitions:S.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},else:{"*":{action_:"o="}}}),actions:{output:function(r){if(r.o){var e={type_:"tex-math",p1:r.o};for(var t in r)delete r[t];return e}}}},"tex-math tight":{transitions:S.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},"-|+":{"*":{action_:"tight operator"}},else:{"*":{action_:"o="}}}),actions:{"tight operator":function(r,e){r.o=(r.o||"")+"{"+e+"}"},output:function(r){if(r.o){var e={type_:"tex-math",p1:r.o};for(var t in r)delete r[t];return e}}}},"9,9":{transitions:S.createTransitions({empty:{"*":{}},",":{"*":{action_:"comma"}},else:{"*":{action_:"copy"}}}),actions:{comma:function(){return{type_:"commaDecimal"}}}},pu:{transitions:S.createTransitions({empty:{"*":{action_:"output"}},space$:{"*":{action_:["output","space"]}},"{[(|)]}":{"0|a":{action_:"copy"}},"(-)(9)^(-9)":{0:{action_:"number^",nextState:"a"}},"(-)(9.,9)(e)(99)":{0:{action_:"enumber",nextState:"a"}},space:{"0|a":{}},"pm-operator":{"0|a":{action_:{type_:"operator",option:"\\pm"},nextState:"0"}},operator:{"0|a":{action_:"copy",nextState:"0"}},"//":{d:{action_:"o=",nextState:"/"}},"/":{d:{action_:"o=",nextState:"/"}},"{...}|else":{"0|d":{action_:"d=",nextState:"d"},a:{action_:["space","d="],nextState:"d"},"/|q":{action_:"q=",nextState:"q"}}}),actions:{enumber:function(r,e){var t=[];return e[0]==="+-"||e[0]==="+/-"?t.push("\\pm "):e[0]&&t.push(e[0]),e[1]&&(S.concatArray(t,S.go(e[1],"pu-9,9")),e[2]&&(e[2].match(/[,.]/)?S.concatArray(t,S.go(e[2],"pu-9,9")):t.push(e[2])),e[3]=e[4]||e[3],e[3]&&(e[3]=e[3].trim(),e[3]==="e"||e[3].substr(0,1)==="*"?t.push({type_:"cdot"}):t.push({type_:"times"}))),e[3]&&t.push("10^{"+e[5]+"}"),t},"number^":function(r,e){var t=[];return e[0]==="+-"||e[0]==="+/-"?t.push("\\pm "):e[0]&&t.push(e[0]),S.concatArray(t,S.go(e[1],"pu-9,9")),t.push("^{"+e[2]+"}"),t},operator:function(r,e,t){return{type_:"operator",kind_:t||e}},space:function(){return{type_:"pu-space-1"}},output:function(r){var e,t=S.patterns.match_("{(...)}",r.d||"");t&&t.remainder===""&&(r.d=t.match_);var a=S.patterns.match_("{(...)}",r.q||"");if(a&&a.remainder===""&&(r.q=a.match_),r.d&&(r.d=r.d.replace(/\u00B0C|\^oC|\^{o}C/g,"{}^{\\circ}C"),r.d=r.d.replace(/\u00B0F|\^oF|\^{o}F/g,"{}^{\\circ}F")),r.q){r.q=r.q.replace(/\u00B0C|\^oC|\^{o}C/g,"{}^{\\circ}C"),r.q=r.q.replace(/\u00B0F|\^oF|\^{o}F/g,"{}^{\\circ}F");var n={d:S.go(r.d,"pu"),q:S.go(r.q,"pu")};r.o==="//"?e={type_:"pu-frac",p1:n.d,p2:n.q}:(e=n.d,n.d.length>1||n.q.length>1?e.push({type_:" / "}):e.push({type_:"/"}),S.concatArray(e,n.q))}else e=S.go(r.d,"pu-2");for(var s in r)delete r[s];return e}}},"pu-2":{transitions:S.createTransitions({empty:{"*":{action_:"output"}},"*":{"*":{action_:["output","cdot"],nextState:"0"}},"\\x":{"*":{action_:"rm="}},space:{"*":{action_:["output","space"],nextState:"0"}},"^{(...)}|^(-1)":{1:{action_:"^(-1)"}},"-9.,9":{0:{action_:"rm=",nextState:"0"},1:{action_:"^(-1)",nextState:"0"}},"{...}|else":{"*":{action_:"rm=",nextState:"1"}}}),actions:{cdot:function(){return{type_:"tight cdot"}},"^(-1)":function(r,e){r.rm+="^{"+e+"}"},space:function(){return{type_:"pu-space-2"}},output:function(r){var e=[];if(r.rm){var t=S.patterns.match_("{(...)}",r.rm||"");t&&t.remainder===""?e=S.go(t.match_,"pu"):e={type_:"rm",p1:r.rm}}for(var a in r)delete r[a];return e}}},"pu-9,9":{transitions:S.createTransitions({empty:{0:{action_:"output-0"},o:{action_:"output-o"}},",":{0:{action_:["output-0","comma"],nextState:"o"}},".":{0:{action_:["output-0","copy"],nextState:"o"}},else:{"*":{action_:"text="}}}),actions:{comma:function(){return{type_:"commaDecimal"}},"output-0":function(r){var e=[];if(r.text_=r.text_||"",r.text_.length>4){var t=r.text_.length%3;t===0&&(t=3);for(var a=r.text_.length-3;a>0;a-=3)e.push(r.text_.substr(a,3)),e.push({type_:"1000 separator"});e.push(r.text_.substr(0,t)),e.reverse()}else e.push(r.text_);for(var n in r)delete r[n];return e},"output-o":function(r){var e=[];if(r.text_=r.text_||"",r.text_.length>4){for(var t=r.text_.length-3,a=0;a":return"rightarrow";case"\u2192":return"rightarrow";case"\u27F6":return"rightarrow";case"<-":return"leftarrow";case"<->":return"leftrightarrow";case"<-->":return"rightleftarrows";case"<=>":return"rightleftharpoons";case"\u21CC":return"rightleftharpoons";case"<=>>":return"rightequilibrium";case"<<=>":return"leftequilibrium";default:throw["MhchemBugT","mhchem bug T. Please report."]}},_getBond:function(r){switch(r){case"-":return"{-}";case"1":return"{-}";case"=":return"{=}";case"2":return"{=}";case"#":return"{\\equiv}";case"3":return"{\\equiv}";case"~":return"{\\tripledash}";case"~-":return"{\\mathrlap{\\raisebox{-.1em}{$-$}}\\raisebox{.1em}{$\\tripledash$}}";case"~=":return"{\\mathrlap{\\raisebox{-.2em}{$-$}}\\mathrlap{\\raisebox{.2em}{$\\tripledash$}}-}";case"~--":return"{\\mathrlap{\\raisebox{-.2em}{$-$}}\\mathrlap{\\raisebox{.2em}{$\\tripledash$}}-}";case"-~-":return"{\\mathrlap{\\raisebox{-.2em}{$-$}}\\mathrlap{\\raisebox{.2em}{$-$}}\\tripledash}";case"...":return"{{\\cdot}{\\cdot}{\\cdot}}";case"....":return"{{\\cdot}{\\cdot}{\\cdot}{\\cdot}}";case"->":return"{\\rightarrow}";case"<-":return"{\\leftarrow}";case"<":return"{<}";case">":return"{>}";default:throw["MhchemBugT","mhchem bug T. Please report."]}},_getOperator:function(r){switch(r){case"+":return" {}+{} ";case"-":return" {}-{} ";case"=":return" {}={} ";case"<":return" {}<{} ";case">":return" {}>{} ";case"<<":return" {}\\ll{} ";case">>":return" {}\\gg{} ";case"\\pm":return" {}\\pm{} ";case"\\approx":return" {}\\approx{} ";case"$\\approx$":return" {}\\approx{} ";case"v":return" \\downarrow{} ";case"(v)":return" \\downarrow{} ";case"^":return" \\uparrow{} ";case"(^)":return" \\uparrow{} ";default:throw["MhchemBugT","mhchem bug T. Please report."]}}};var wn=function(r){let e=r.data,t=e.expression,a=e.options,n=r.header;n.warnings=[],a.strict=="warn"&&(a.strict=(l,h)=>{n.warnings.push(`katex: LaTeX-incompatible input and strict mode is set to 'warn': ${h} [${l}]`)});let s=oe.renderToString(t,a);et({header:n,data:{output:s}})};Wt(wn);})();
diff --git a/internal/warpc/js/renderkatex.js b/internal/warpc/js/renderkatex.js
deleted file mode 100644
index 7c8ac25ee..000000000
--- a/internal/warpc/js/renderkatex.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import { readInput, writeOutput } from './common';
-import katex from 'katex';
-import 'katex/contrib/mhchem/mhchem.js';
-
-const render = function (input) {
- const data = input.data;
- const expression = data.expression;
- const options = data.options;
- const header = input.header;
- header.warnings = [];
-
- if (options.strict == 'warn') {
- // By default, KaTeX will write to console.warn, that's a little hard to handle.
- options.strict = (errorCode, errorMsg) => {
- header.warnings.push(
- `katex: LaTeX-incompatible input and strict mode is set to 'warn': ${errorMsg} [${errorCode}]`,
- );
- };
- }
- // Any error thrown here will be caught by the common.js readInput function.
- const output = katex.renderToString(expression, options);
- writeOutput({ header: header, data: { output: output } });
-};
-
-readInput(render);
diff --git a/internal/warpc/katex.go b/internal/warpc/katex.go
deleted file mode 100644
index 75c20117f..000000000
--- a/internal/warpc/katex.go
+++ /dev/null
@@ -1,76 +0,0 @@
-// Copyright 2024 The Hugo Authors. All rights reserved.
-//
-// 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.
-
-package warpc
-
-import (
- _ "embed"
-)
-
-//go:embed wasm/renderkatex.wasm
-var katexWasm []byte
-
-// See https://katex.org/docs/options.html
-type KatexInput struct {
- Expression string `json:"expression"`
- Options KatexOptions `json:"options"`
-}
-
-// KatexOptions defines the options for the KaTeX rendering.
-// See https://katex.org/docs/options.html
-type KatexOptions struct {
- // html, mathml (default), htmlAndMathml
- Output string `json:"output"`
-
- // If true, display math in display mode, false in inline mode.
- DisplayMode bool `json:"displayMode"`
-
- // Render \tags on the left side instead of the right.
- Leqno bool `json:"leqno"`
-
- // If true, render flush left with a 2em left margin.
- Fleqn bool `json:"fleqn"`
-
- // The color used for typesetting errors.
- // A color string given in the format "#XXX" or "#XXXXXX"
- ErrorColor string `json:"errorColor"`
-
- // A collection of custom macros.
- Macros map[string]string `json:"macros,omitempty"`
-
- // Specifies a minimum thickness, in ems, for fraction lines.
- MinRuleThickness float64 `json:"minRuleThickness"`
-
- // If true, KaTeX will throw a ParseError when it encounters an unsupported command.
- ThrowOnError bool `json:"throwOnError"`
-
- // Controls how KaTeX handles LaTeX features that offer convenience but
- // aren't officially supported, one of error (default), ignore, or warn.
- //
- // - error: Throws an error when convenient, unsupported LaTeX features
- // are encountered.
- // - ignore: Allows convenient, unsupported LaTeX features without any
- // feedback.
- // - warn: Emits a warning when convenient, unsupported LaTeX features are
- // encountered.
- //
- // The "newLineInDisplayMode" error code, which flags the use of \\
- // or \newline in display mode outside an array or tabular environment, is
- // intentionally designed not to throw an error, despite this behavior
- // being questionable.
- Strict string `json:"strict"`
-}
-
-type KatexOutput struct {
- Output string `json:"output"`
-}
diff --git a/internal/warpc/warpc.go b/internal/warpc/warpc.go
deleted file mode 100644
index e21fefa8a..000000000
--- a/internal/warpc/warpc.go
+++ /dev/null
@@ -1,589 +0,0 @@
-// Copyright 2024 The Hugo Authors. All rights reserved.
-//
-// 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.
-
-package warpc
-
-import (
- "bytes"
- "context"
- _ "embed"
- "encoding/json"
- "errors"
- "fmt"
- "io"
- "strings"
- "sync"
- "sync/atomic"
- "time"
-
- "github.com/gohugoio/hugo/common/hugio"
- "golang.org/x/sync/errgroup"
-
- "github.com/tetratelabs/wazero"
- "github.com/tetratelabs/wazero/api"
- "github.com/tetratelabs/wazero/experimental"
- "github.com/tetratelabs/wazero/imports/wasi_snapshot_preview1"
-)
-
-const currentVersion = 1
-
-//go:embed wasm/quickjs.wasm
-var quickjsWasm []byte
-
-// Header is in both the request and response.
-type Header struct {
- // Major version of the protocol.
- Version uint16 `json:"version"`
-
- // Unique ID for the request.
- // Note that this only needs to be unique within the current request set time window.
- ID uint32 `json:"id"`
-
- // Set in the response if there was an error.
- Err string `json:"err"`
-
- // Warnings is a list of warnings that may be returned in the response.
- Warnings []string `json:"warnings,omitempty"`
-}
-
-type Message[T any] struct {
- Header Header `json:"header"`
- Data T `json:"data"`
-}
-
-func (m Message[T]) GetID() uint32 {
- return m.Header.ID
-}
-
-type Dispatcher[Q, R any] interface {
- Execute(ctx context.Context, q Message[Q]) (Message[R], error)
- Close() error
-}
-
-func (p *dispatcherPool[Q, R]) getDispatcher() *dispatcher[Q, R] {
- i := int(p.counter.Add(1)) % len(p.dispatchers)
- return p.dispatchers[i]
-}
-
-func (p *dispatcherPool[Q, R]) Close() error {
- return p.close()
-}
-
-type dispatcher[Q, R any] struct {
- zero Message[R]
-
- mu sync.RWMutex
- encMu sync.Mutex
-
- pending map[uint32]*call[Q, R]
-
- inOut *inOut
-
- shutdown bool
- closing bool
-}
-
-type inOut struct {
- sync.Mutex
- stdin hugio.ReadWriteCloser
- stdout hugio.ReadWriteCloser
- dec *json.Decoder
- enc *json.Encoder
-}
-
-var ErrShutdown = fmt.Errorf("dispatcher is shutting down")
-
-var timerPool = sync.Pool{}
-
-func getTimer(d time.Duration) *time.Timer {
- if v := timerPool.Get(); v != nil {
- timer := v.(*time.Timer)
- timer.Reset(d)
- return timer
- }
- return time.NewTimer(d)
-}
-
-func putTimer(t *time.Timer) {
- if !t.Stop() {
- select {
- case <-t.C:
- default:
- }
- }
- timerPool.Put(t)
-}
-
-// Execute sends a request to the dispatcher and waits for the response.
-func (p *dispatcherPool[Q, R]) Execute(ctx context.Context, q Message[Q]) (Message[R], error) {
- d := p.getDispatcher()
- if q.GetID() == 0 {
- return d.zero, errors.New("ID must not be 0 (note that this must be unique within the current request set time window)")
- }
-
- call, err := d.newCall(q)
- if err != nil {
- return d.zero, err
- }
-
- if err := d.send(call); err != nil {
- return d.zero, err
- }
-
- timer := getTimer(30 * time.Second)
- defer putTimer(timer)
-
- select {
- case call = <-call.donec:
- case <-p.donec:
- return d.zero, p.Err()
- case <-ctx.Done():
- return d.zero, ctx.Err()
- case <-timer.C:
- return d.zero, errors.New("timeout")
- }
-
- if call.err != nil {
- return d.zero, call.err
- }
-
- resp, err := call.response, p.Err()
-
- if err == nil && resp.Header.Err != "" {
- err = errors.New(resp.Header.Err)
- }
- return resp, err
-}
-
-func (d *dispatcher[Q, R]) newCall(q Message[Q]) (*call[Q, R], error) {
- call := &call[Q, R]{
- donec: make(chan *call[Q, R], 1),
- request: q,
- }
-
- if d.shutdown || d.closing {
- call.err = ErrShutdown
- call.done()
- return call, nil
- }
-
- d.mu.Lock()
- d.pending[q.GetID()] = call
- d.mu.Unlock()
-
- return call, nil
-}
-
-func (d *dispatcher[Q, R]) send(call *call[Q, R]) error {
- d.mu.RLock()
- if d.closing || d.shutdown {
- d.mu.RUnlock()
- return ErrShutdown
- }
- d.mu.RUnlock()
-
- d.encMu.Lock()
- defer d.encMu.Unlock()
- err := d.inOut.enc.Encode(call.request)
- if err != nil {
- return err
- }
- return nil
-}
-
-func (d *dispatcher[Q, R]) input() {
- var inputErr error
-
- for d.inOut.dec.More() {
- var r Message[R]
- if err := d.inOut.dec.Decode(&r); err != nil {
- inputErr = fmt.Errorf("decoding response: %w", err)
- break
- }
-
- d.mu.Lock()
- call, found := d.pending[r.GetID()]
- if !found {
- d.mu.Unlock()
- panic(fmt.Errorf("call with ID %d not found", r.GetID()))
- }
- delete(d.pending, r.GetID())
- d.mu.Unlock()
- call.response = r
- call.done()
- }
-
- // Terminate pending calls.
- d.shutdown = true
- if inputErr != nil {
- isEOF := inputErr == io.EOF || strings.Contains(inputErr.Error(), "already closed")
- if isEOF {
- if d.closing {
- inputErr = ErrShutdown
- } else {
- inputErr = io.ErrUnexpectedEOF
- }
- }
- }
-
- d.mu.Lock()
- defer d.mu.Unlock()
- for _, call := range d.pending {
- call.err = inputErr
- call.done()
- }
-}
-
-type call[Q, R any] struct {
- request Message[Q]
- response Message[R]
- err error
- donec chan *call[Q, R]
-}
-
-func (call *call[Q, R]) done() {
- select {
- case call.donec <- call:
- default:
- }
-}
-
-// Binary represents a WebAssembly binary.
-type Binary struct {
- // The name of the binary.
- // For quickjs, this must match the instance import name, "javy_quickjs_provider_v2".
- // For the main module, we only use this for caching.
- Name string
-
- // THe wasm binary.
- Data []byte
-}
-
-type Options struct {
- Ctx context.Context
-
- Infof func(format string, v ...any)
-
- Warnf func(format string, v ...any)
-
- // E.g. quickjs wasm. May be omitted if not needed.
- Runtime Binary
-
- // The main module to instantiate.
- Main Binary
-
- CompilationCacheDir string
- PoolSize int
-
- // Memory limit in MiB.
- Memory int
-}
-
-type CompileModuleContext struct {
- Opts Options
- Runtime wazero.Runtime
-}
-
-type CompiledModule struct {
- // Runtime (e.g. QuickJS) may be nil if not needed (e.g. embedded in Module).
- Runtime wazero.CompiledModule
-
- // If Runtime is not nil, this should be the name of the instance.
- RuntimeName string
-
- // The main module to instantiate.
- // This will be insantiated multiple times in a pool,
- // so it does not need a name.
- Module wazero.CompiledModule
-}
-
-// Start creates a new dispatcher pool.
-func Start[Q, R any](opts Options) (Dispatcher[Q, R], error) {
- if opts.Main.Data == nil {
- return nil, errors.New("Main.Data must be set")
- }
- if opts.Main.Name == "" {
- return nil, errors.New("Main.Name must be set")
- }
-
- if opts.Runtime.Data != nil && opts.Runtime.Name == "" {
- return nil, errors.New("Runtime.Name must be set")
- }
-
- if opts.PoolSize == 0 {
- opts.PoolSize = 1
- }
-
- return newDispatcher[Q, R](opts)
-}
-
-type dispatcherPool[Q, R any] struct {
- counter atomic.Uint32
- dispatchers []*dispatcher[Q, R]
- close func() error
- opts Options
-
- errc chan error
- donec chan struct{}
-}
-
-func (p *dispatcherPool[Q, R]) SendIfErr(err error) {
- if err != nil {
- p.errc <- err
- }
-}
-
-func (p *dispatcherPool[Q, R]) Err() error {
- select {
- case err := <-p.errc:
- return err
- default:
- return nil
- }
-}
-
-func newDispatcher[Q, R any](opts Options) (*dispatcherPool[Q, R], error) {
- if opts.Ctx == nil {
- opts.Ctx = context.Background()
- }
-
- if opts.Infof == nil {
- opts.Infof = func(format string, v ...any) {
- // noop
- }
- }
- if opts.Warnf == nil {
- opts.Warnf = func(format string, v ...any) {
- // noop
- }
- }
-
- if opts.Memory <= 0 {
- // 32 MiB
- opts.Memory = 32
- }
-
- ctx := opts.Ctx
-
- // Page size is 64KB.
- numPages := opts.Memory * 1024 / 64
- runtimeConfig := wazero.NewRuntimeConfig().WithMemoryLimitPages(uint32(numPages))
-
- if opts.CompilationCacheDir != "" {
- compilationCache, err := wazero.NewCompilationCacheWithDir(opts.CompilationCacheDir)
- if err != nil {
- return nil, err
- }
- runtimeConfig = runtimeConfig.WithCompilationCache(compilationCache)
- }
-
- // Create a new WebAssembly Runtime.
- r := wazero.NewRuntimeWithConfig(opts.Ctx, runtimeConfig)
-
- // Instantiate WASI, which implements system I/O such as console output.
- if _, err := wasi_snapshot_preview1.Instantiate(ctx, r); err != nil {
- return nil, err
- }
-
- inOuts := make([]*inOut, opts.PoolSize)
- for i := range opts.PoolSize {
- var stdin, stdout hugio.ReadWriteCloser
-
- stdin = hugio.NewPipeReadWriteCloser()
- stdout = hugio.NewPipeReadWriteCloser()
-
- inOuts[i] = &inOut{
- stdin: stdin,
- stdout: stdout,
- dec: json.NewDecoder(stdout),
- enc: json.NewEncoder(stdin),
- }
- }
-
- var (
- runtimeModule wazero.CompiledModule
- mainModule wazero.CompiledModule
- err error
- )
-
- if opts.Runtime.Data != nil {
- runtimeModule, err = r.CompileModule(ctx, opts.Runtime.Data)
- if err != nil {
- return nil, err
- }
- }
-
- mainModule, err = r.CompileModule(ctx, opts.Main.Data)
- if err != nil {
- return nil, err
- }
-
- toErr := func(what string, errBuff bytes.Buffer, err error) error {
- return fmt.Errorf("%s: %s: %w", what, errBuff.String(), err)
- }
-
- run := func() error {
- g, ctx := errgroup.WithContext(ctx)
- for _, c := range inOuts {
- c := c
- g.Go(func() error {
- var errBuff bytes.Buffer
- ctx := context.WithoutCancel(ctx)
- configBase := wazero.NewModuleConfig().WithStderr(&errBuff).WithStdout(c.stdout).WithStdin(c.stdin).WithStartFunctions()
- if opts.Runtime.Data != nil {
- // This needs to be anonymous, it will be resolved in the import resolver below.
- runtimeInstance, err := r.InstantiateModule(ctx, runtimeModule, configBase.WithName(""))
- if err != nil {
- return toErr("quickjs", errBuff, err)
- }
- ctx = experimental.WithImportResolver(ctx,
- func(name string) api.Module {
- if name == opts.Runtime.Name {
- return runtimeInstance
- }
- return nil
- },
- )
- }
-
- mainInstance, err := r.InstantiateModule(ctx, mainModule, configBase.WithName(""))
- if err != nil {
- return toErr(opts.Main.Name, errBuff, err)
- }
- if _, err := mainInstance.ExportedFunction("_start").Call(ctx); err != nil {
- return toErr(opts.Main.Name, errBuff, err)
- }
-
- // The console.log in the Javy/quickjs WebAssembly module will write to stderr.
- // In non-error situations, write that to the provided infof logger.
- if errBuff.Len() > 0 {
- opts.Infof("%s", errBuff.String())
- }
-
- return nil
- })
- }
- return g.Wait()
- }
-
- dp := &dispatcherPool[Q, R]{
- dispatchers: make([]*dispatcher[Q, R], len(inOuts)),
- opts: opts,
-
- errc: make(chan error, 10),
- donec: make(chan struct{}),
- }
-
- go func() {
- // This will block until stdin is closed or it encounters an error.
- err := run()
- dp.SendIfErr(err)
- close(dp.donec)
- }()
-
- for i := range inOuts {
- d := &dispatcher[Q, R]{
- pending: make(map[uint32]*call[Q, R]),
- inOut: inOuts[i],
- }
- go d.input()
- dp.dispatchers[i] = d
- }
-
- dp.close = func() error {
- for _, d := range dp.dispatchers {
- d.closing = true
- if err := d.inOut.stdin.Close(); err != nil {
- return err
- }
- if err := d.inOut.stdout.Close(); err != nil {
- return err
- }
- }
-
- // We need to wait for the WebAssembly instances to finish executing before we can close the runtime.
- <-dp.donec
-
- if err := r.Close(ctx); err != nil {
- return err
- }
-
- // Return potential late compilation errors.
- return dp.Err()
- }
-
- return dp, dp.Err()
-}
-
-type lazyDispatcher[Q, R any] struct {
- opts Options
-
- dispatcher Dispatcher[Q, R]
- startOnce sync.Once
- started bool
- startErr error
-}
-
-func (d *lazyDispatcher[Q, R]) start() (Dispatcher[Q, R], error) {
- d.startOnce.Do(func() {
- start := time.Now()
- d.dispatcher, d.startErr = Start[Q, R](d.opts)
- d.started = true
- d.opts.Infof("started dispatcher in %s", time.Since(start))
- })
- return d.dispatcher, d.startErr
-}
-
-// Dispatchers holds all the dispatchers for the warpc package.
-type Dispatchers struct {
- katex *lazyDispatcher[KatexInput, KatexOutput]
-}
-
-func (d *Dispatchers) Katex() (Dispatcher[KatexInput, KatexOutput], error) {
- return d.katex.start()
-}
-
-func (d *Dispatchers) Close() error {
- var errs []error
- if d.katex.started {
- if err := d.katex.dispatcher.Close(); err != nil {
- errs = append(errs, err)
- }
- }
- if len(errs) == 0 {
- return nil
- }
- return fmt.Errorf("%v", errs)
-}
-
-// AllDispatchers creates all the dispatchers for the warpc package.
-// Note that the individual dispatchers are started lazily.
-// Remember to call Close on the returned Dispatchers when done.
-func AllDispatchers(katexOpts Options) *Dispatchers {
- if katexOpts.Runtime.Data == nil {
- katexOpts.Runtime = Binary{Name: "javy_quickjs_provider_v2", Data: quickjsWasm}
- }
- if katexOpts.Main.Data == nil {
- katexOpts.Main = Binary{Name: "renderkatex", Data: katexWasm}
- }
-
- if katexOpts.Infof == nil {
- katexOpts.Infof = func(format string, v ...any) {
- // noop
- }
- }
-
- return &Dispatchers{
- katex: &lazyDispatcher[KatexInput, KatexOutput]{opts: katexOpts},
- }
-}
diff --git a/internal/warpc/warpc_test.go b/internal/warpc/warpc_test.go
deleted file mode 100644
index 2ee4c3de5..000000000
--- a/internal/warpc/warpc_test.go
+++ /dev/null
@@ -1,475 +0,0 @@
-// Copyright 2024 The Hugo Authors. All rights reserved.
-//
-// 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.
-
-package warpc
-
-import (
- "context"
- _ "embed"
- "fmt"
- "sync"
- "sync/atomic"
- "testing"
-
- qt "github.com/frankban/quicktest"
-)
-
-//go:embed wasm/greet.wasm
-var greetWasm []byte
-
-type person struct {
- Name string `json:"name"`
-}
-
-func TestKatex(t *testing.T) {
- c := qt.New(t)
-
- opts := Options{
- PoolSize: 8,
- Runtime: quickjsBinary,
- Main: katexBinary,
- }
-
- d, err := Start[KatexInput, KatexOutput](opts)
- c.Assert(err, qt.IsNil)
-
- defer d.Close()
-
- runExpression := func(c *qt.C, id uint32, expression string) (Message[KatexOutput], error) {
- c.Helper()
-
- ctx := context.Background()
-
- input := KatexInput{
- Expression: expression,
- Options: KatexOptions{
- Output: "html",
- DisplayMode: true,
- ThrowOnError: true,
- },
- }
-
- message := Message[KatexInput]{
- Header: Header{
- Version: currentVersion,
- ID: uint32(id),
- },
- Data: input,
- }
-
- return d.Execute(ctx, message)
- }
-
- c.Run("Simple", func(c *qt.C) {
- id := uint32(32)
- result, err := runExpression(c, id, "c = \\pm\\sqrt{a^2 + b^2}")
- c.Assert(err, qt.IsNil)
- c.Assert(result.GetID(), qt.Equals, id)
- })
-
- c.Run("Chemistry", func(c *qt.C) {
- id := uint32(32)
- result, err := runExpression(c, id, "C_p[\\ce{H2O(l)}] = \\pu{75.3 J // mol K}")
- c.Assert(err, qt.IsNil)
- c.Assert(result.GetID(), qt.Equals, id)
- })
-
- c.Run("Invalid expression", func(c *qt.C) {
- id := uint32(32)
- result, err := runExpression(c, id, "c & \\foo\\")
- c.Assert(err, qt.IsNotNil)
- c.Assert(result.GetID(), qt.Equals, id)
- })
-}
-
-func TestGreet(t *testing.T) {
- c := qt.New(t)
- opts := Options{
- PoolSize: 1,
- Runtime: quickjsBinary,
- Main: greetBinary,
- Infof: t.Logf,
- }
-
- for range 2 {
- func() {
- d, err := Start[person, greeting](opts)
- if err != nil {
- t.Fatal(err)
- }
-
- defer func() {
- c.Assert(d.Close(), qt.IsNil)
- }()
-
- ctx := context.Background()
-
- inputMessage := Message[person]{
- Header: Header{
- Version: currentVersion,
- },
- Data: person{
- Name: "Person",
- },
- }
-
- for j := range 20 {
- inputMessage.Header.ID = uint32(j + 1)
- g, err := d.Execute(ctx, inputMessage)
- if err != nil {
- t.Fatal(err)
- }
- if g.Data.Greeting != "Hello Person!" {
- t.Fatalf("got: %v", g)
- }
- if g.GetID() != inputMessage.GetID() {
- t.Fatalf("%d vs %d", g.GetID(), inputMessage.GetID())
- }
- }
- }()
- }
-}
-
-func TestGreetParallel(t *testing.T) {
- c := qt.New(t)
-
- opts := Options{
- Runtime: quickjsBinary,
- Main: greetBinary,
- PoolSize: 4,
- }
- d, err := Start[person, greeting](opts)
- c.Assert(err, qt.IsNil)
- defer func() {
- c.Assert(d.Close(), qt.IsNil)
- }()
-
- var wg sync.WaitGroup
-
- for i := 1; i <= 10; i++ {
- wg.Add(1)
- go func(i int) {
- defer wg.Done()
-
- ctx := context.Background()
-
- for j := range 5 {
- base := i * 100
- id := uint32(base + j)
-
- inputPerson := person{
- Name: fmt.Sprintf("Person %d", id),
- }
- inputMessage := Message[person]{
- Header: Header{
- Version: currentVersion,
- ID: id,
- },
- Data: inputPerson,
- }
- g, err := d.Execute(ctx, inputMessage)
- if err != nil {
- t.Error(err)
- return
- }
-
- c.Assert(g.Data.Greeting, qt.Equals, fmt.Sprintf("Hello Person %d!", id))
- c.Assert(g.GetID(), qt.Equals, inputMessage.GetID())
-
- }
- }(i)
-
- }
-
- wg.Wait()
-}
-
-func TestKatexParallel(t *testing.T) {
- c := qt.New(t)
-
- opts := Options{
- Runtime: quickjsBinary,
- Main: katexBinary,
- PoolSize: 6,
- }
- d, err := Start[KatexInput, KatexOutput](opts)
- c.Assert(err, qt.IsNil)
- defer func() {
- c.Assert(d.Close(), qt.IsNil)
- }()
-
- var wg sync.WaitGroup
-
- for i := 1; i <= 10; i++ {
- wg.Add(1)
- go func(i int) {
- defer wg.Done()
-
- ctx := context.Background()
-
- for j := range 1 {
- base := i * 100
- id := uint32(base + j)
-
- input := katexInputTemplate
- inputMessage := Message[KatexInput]{
- Header: Header{
- Version: currentVersion,
- ID: id,
- },
- Data: input,
- }
-
- result, err := d.Execute(ctx, inputMessage)
- if err != nil {
- t.Error(err)
- return
- }
-
- if result.GetID() != inputMessage.GetID() {
- t.Errorf("%d vs %d", result.GetID(), inputMessage.GetID())
- return
- }
- }
- }(i)
-
- }
-
- wg.Wait()
-}
-
-func BenchmarkExecuteKatex(b *testing.B) {
- opts := Options{
- Runtime: quickjsBinary,
- Main: katexBinary,
- }
- d, err := Start[KatexInput, KatexOutput](opts)
- if err != nil {
- b.Fatal(err)
- }
- defer d.Close()
-
- ctx := context.Background()
-
- input := katexInputTemplate
-
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- message := Message[KatexInput]{
- Header: Header{
- Version: currentVersion,
- ID: uint32(i + 1),
- },
- Data: input,
- }
-
- result, err := d.Execute(ctx, message)
- if err != nil {
- b.Fatal(err)
- }
-
- if result.GetID() != message.GetID() {
- b.Fatalf("%d vs %d", result.GetID(), message.GetID())
- }
-
- }
-}
-
-func BenchmarkKatexStartStop(b *testing.B) {
- optsTemplate := Options{
- Runtime: quickjsBinary,
- Main: katexBinary,
- CompilationCacheDir: b.TempDir(),
- }
-
- runBench := func(b *testing.B, opts Options) {
- for i := 0; i < b.N; i++ {
- d, err := Start[KatexInput, KatexOutput](opts)
- if err != nil {
- b.Fatal(err)
- }
- if err := d.Close(); err != nil {
- b.Fatal(err)
- }
- }
- }
-
- for _, poolSize := range []int{1, 8, 16} {
-
- name := fmt.Sprintf("PoolSize%d", poolSize)
-
- b.Run(name, func(b *testing.B) {
- opts := optsTemplate
- opts.PoolSize = poolSize
- runBench(b, opts)
- })
-
- }
-}
-
-var katexInputTemplate = KatexInput{
- Expression: "c = \\pm\\sqrt{a^2 + b^2}",
- Options: KatexOptions{Output: "html", DisplayMode: true},
-}
-
-func BenchmarkExecuteKatexPara(b *testing.B) {
- optsTemplate := Options{
- Runtime: quickjsBinary,
- Main: katexBinary,
- }
-
- runBench := func(b *testing.B, opts Options) {
- d, err := Start[KatexInput, KatexOutput](opts)
- if err != nil {
- b.Fatal(err)
- }
- defer d.Close()
-
- ctx := context.Background()
-
- b.ResetTimer()
-
- var id atomic.Uint32
- b.RunParallel(func(pb *testing.PB) {
- for pb.Next() {
- message := Message[KatexInput]{
- Header: Header{
- Version: currentVersion,
- ID: id.Add(1),
- },
- Data: katexInputTemplate,
- }
-
- result, err := d.Execute(ctx, message)
- if err != nil {
- b.Fatal(err)
- }
- if result.GetID() != message.GetID() {
- b.Fatalf("%d vs %d", result.GetID(), message.GetID())
- }
- }
- })
- }
-
- for _, poolSize := range []int{1, 8, 16} {
- name := fmt.Sprintf("PoolSize%d", poolSize)
-
- b.Run(name, func(b *testing.B) {
- opts := optsTemplate
- opts.PoolSize = poolSize
- runBench(b, opts)
- })
- }
-}
-
-func BenchmarkExecuteGreet(b *testing.B) {
- opts := Options{
- Runtime: quickjsBinary,
- Main: greetBinary,
- }
- d, err := Start[person, greeting](opts)
- if err != nil {
- b.Fatal(err)
- }
- defer d.Close()
-
- ctx := context.Background()
-
- input := person{
- Name: "Person",
- }
-
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- message := Message[person]{
- Header: Header{
- Version: currentVersion,
- ID: uint32(i + 1),
- },
- Data: input,
- }
- result, err := d.Execute(ctx, message)
- if err != nil {
- b.Fatal(err)
- }
-
- if result.GetID() != message.GetID() {
- b.Fatalf("%d vs %d", result.GetID(), message.GetID())
- }
-
- }
-}
-
-func BenchmarkExecuteGreetPara(b *testing.B) {
- opts := Options{
- Runtime: quickjsBinary,
- Main: greetBinary,
- PoolSize: 8,
- }
-
- d, err := Start[person, greeting](opts)
- if err != nil {
- b.Fatal(err)
- }
- defer d.Close()
-
- ctx := context.Background()
-
- inputTemplate := person{
- Name: "Person",
- }
-
- b.ResetTimer()
-
- var id atomic.Uint32
- b.RunParallel(func(pb *testing.PB) {
- for pb.Next() {
- message := Message[person]{
- Header: Header{
- Version: currentVersion,
- ID: id.Add(1),
- },
- Data: inputTemplate,
- }
-
- result, err := d.Execute(ctx, message)
- if err != nil {
- b.Fatal(err)
- }
- if result.GetID() != message.GetID() {
- b.Fatalf("%d vs %d", result.GetID(), message.GetID())
- }
- }
- })
-}
-
-type greeting struct {
- Greeting string `json:"greeting"`
-}
-
-var (
- greetBinary = Binary{
- Name: "greet",
- Data: greetWasm,
- }
-
- katexBinary = Binary{
- Name: "renderkatex",
- Data: katexWasm,
- }
-
- quickjsBinary = Binary{
- Name: "javy_quickjs_provider_v2",
- Data: quickjsWasm,
- }
-)
diff --git a/internal/warpc/wasm/greet.wasm b/internal/warpc/wasm/greet.wasm
deleted file mode 100644
index 944199b40..000000000
Binary files a/internal/warpc/wasm/greet.wasm and /dev/null differ
diff --git a/internal/warpc/wasm/quickjs.wasm b/internal/warpc/wasm/quickjs.wasm
deleted file mode 100644
index 569c53a23..000000000
Binary files a/internal/warpc/wasm/quickjs.wasm and /dev/null differ
diff --git a/internal/warpc/wasm/renderkatex.wasm b/internal/warpc/wasm/renderkatex.wasm
deleted file mode 100644
index b8b21c16b..000000000
Binary files a/internal/warpc/wasm/renderkatex.wasm and /dev/null differ
diff --git a/internal/warpc/watchtestscripts.sh b/internal/warpc/watchtestscripts.sh
deleted file mode 100755
index fbc90b648..000000000
--- a/internal/warpc/watchtestscripts.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/bash
-
-trap exit SIGINT
-
-while true; do find . -type f -name "*.js" | entr -pd ./build.sh; done
\ No newline at end of file
diff --git a/langs/i18n/i18n_test.go b/langs/i18n/i18n_test.go
index a23cee539..8d34e069d 100644
--- a/langs/i18n/i18n_test.go
+++ b/langs/i18n/i18n_test.go
@@ -23,6 +23,8 @@ import (
"github.com/gohugoio/hugo/common/types"
"github.com/gohugoio/hugo/config/testconfig"
+ "github.com/gohugoio/hugo/tpl/tplimpl"
+
"github.com/gohugoio/hugo/resources/page"
"github.com/spf13/afero"
@@ -470,6 +472,7 @@ func prepareTranslationProvider(t testing.TB, test i18nTest, cfg config.Provider
func prepareDeps(afs afero.Fs, cfg config.Provider) (*deps.Deps, *TranslationProvider) {
d := testconfig.GetTestDeps(afs, cfg)
translationProvider := NewTranslationProvider()
+ d.TemplateProvider = tplimpl.DefaultTemplateProvider
d.TranslationProvider = translationProvider
d.Site = page.NewDummyHugoSite(d.Conf)
if err := d.Compile(nil); err != nil {
diff --git a/langs/language_test.go b/langs/language_test.go
index 33240f3f4..543f4a133 100644
--- a/langs/language_test.go
+++ b/langs/language_test.go
@@ -29,13 +29,13 @@ func TestCollator(t *testing.T) {
coll := &Collator{c: collate.New(language.English, collate.Loose)}
- for range 10 {
+ for i := 0; i < 10; i++ {
wg.Add(1)
go func() {
coll.Lock()
defer coll.Unlock()
defer wg.Done()
- for range 10 {
+ for j := 0; j < 10; j++ {
k := coll.CompareStrings("abc", "def")
c.Assert(k, qt.Equals, -1)
}
@@ -48,7 +48,7 @@ func BenchmarkCollator(b *testing.B) {
s := []string{"foo", "bar", "éntre", "baz", "qux", "quux", "corge", "grault", "garply", "waldo", "fred", "plugh", "xyzzy", "thud"}
doWork := func(coll *Collator) {
- for i := range s {
+ for i := 0; i < len(s); i++ {
for j := i + 1; j < len(s); j++ {
_ = coll.CompareStrings(s[i], s[j])
}
diff --git a/lazy/init.go b/lazy/init.go
index bef3867a9..7b88a5351 100644
--- a/lazy/init.go
+++ b/lazy/init.go
@@ -36,7 +36,7 @@ type Init struct {
prev *Init
children []*Init
- init OnceMore
+ init onceMore
out any
err error
f func(context.Context) (any, error)
diff --git a/lazy/init_test.go b/lazy/init_test.go
index 94736fab8..96a959494 100644
--- a/lazy/init_test.go
+++ b/lazy/init_test.go
@@ -79,7 +79,7 @@ func TestInit(t *testing.T) {
// Add some concurrency and randomness to verify thread safety and
// init order.
- for i := range 100 {
+ for i := 0; i < 100; i++ {
wg.Add(1)
go func(i int) {
defer wg.Done()
diff --git a/lazy/once.go b/lazy/once.go
index dac689df3..c6abcd884 100644
--- a/lazy/once.go
+++ b/lazy/once.go
@@ -18,19 +18,19 @@ import (
"sync/atomic"
)
-// OnceMore is similar to sync.Once.
+// onceMore is similar to sync.Once.
//
// Additional features are:
// * it can be reset, so the action can be repeated if needed
// * it has methods to check if it's done or in progress
-type OnceMore struct {
+type onceMore struct {
mu sync.Mutex
lock uint32
done uint32
}
-func (t *OnceMore) Do(f func()) {
+func (t *onceMore) Do(f func()) {
if atomic.LoadUint32(&t.done) == 1 {
return
}
@@ -53,15 +53,15 @@ func (t *OnceMore) Do(f func()) {
f()
}
-func (t *OnceMore) InProgress() bool {
+func (t *onceMore) InProgress() bool {
return atomic.LoadUint32(&t.lock) == 1
}
-func (t *OnceMore) Done() bool {
+func (t *onceMore) Done() bool {
return atomic.LoadUint32(&t.done) == 1
}
-func (t *OnceMore) ResetWithLock() *sync.Mutex {
+func (t *onceMore) ResetWithLock() *sync.Mutex {
t.mu.Lock()
defer atomic.StoreUint32(&t.done, 0)
return &t.mu
diff --git a/magefile.go b/magefile.go
index 120e23666..ce2cd41ea 100644
--- a/magefile.go
+++ b/magefile.go
@@ -1,9 +1,11 @@
//go:build mage
+// +build mage
package main
import (
"bytes"
+ "errors"
"fmt"
"os"
"path"
@@ -34,6 +36,10 @@ func init() {
if exe := os.Getenv("GOEXE"); exe != "" {
goexe = exe
}
+
+ // We want to use Go 1.11 modules even if the source lives inside GOPATH.
+ // The default is "auto".
+ os.Setenv("GO111MODULE", "on")
}
func runWith(env map[string]string, cmd string, inArgs ...any) error {
@@ -116,10 +122,10 @@ func HugoNoGitInfo() error {
return Hugo()
}
+var docker = sh.RunCmd("docker")
+
// Build hugo Docker container
func Docker() error {
- docker := sh.RunCmd("docker")
-
if err := docker("build", "-t", "hugo", "."); err != nil {
return err
}
@@ -142,11 +148,7 @@ func Check() {
fmt.Printf("Skip Test386 on %s and/or %s\n", runtime.GOARCH, runtime.GOOS)
}
- if isCI() && isDarwin() {
- // Skip on macOS in CI (disk space issues)
- } else {
- mg.Deps(Fmt, Vet)
- }
+ mg.Deps(Fmt, Vet)
// don't run two tests in parallel, they saturate the CPUs anyway, and running two
// causes memory issues in CI.
@@ -194,19 +196,48 @@ func Fmt() error {
return nil
}
-const pkgPrefixLen = len("github.com/gohugoio/hugo")
+var (
+ pkgPrefixLen = len("github.com/gohugoio/hugo")
+ pkgs []string
+ pkgsInit sync.Once
+)
-var hugoPackages = sync.OnceValues(func() ([]string, error) {
- s, err := sh.Output(goexe, "list", "./...")
+func hugoPackages() ([]string, error) {
+ var err error
+ pkgsInit.Do(func() {
+ var s string
+ s, err = sh.Output(goexe, "list", "./...")
+ if err != nil {
+ return
+ }
+ pkgs = strings.Split(s, "\n")
+ for i := range pkgs {
+ pkgs[i] = "." + pkgs[i][pkgPrefixLen:]
+ }
+ })
+ return pkgs, err
+}
+
+// Run golint linter
+func Lint() error {
+ pkgs, err := hugoPackages()
if err != nil {
- return nil, err
+ return err
}
- pkgs := strings.Split(s, "\n")
- for i := range pkgs {
- pkgs[i] = "." + pkgs[i][pkgPrefixLen:]
+ failed := false
+ for _, pkg := range pkgs {
+ // We don't actually want to fail this target if we find golint errors,
+ // so we don't pass -set_exit_status, but we still print out any failures.
+ if _, err := sh.Exec(nil, os.Stderr, nil, "golint", pkg); err != nil {
+ fmt.Printf("ERROR: running go lint on %q: %v\n", pkg, err)
+ failed = true
+ }
}
- return pkgs, nil
-})
+ if failed {
+ return errors.New("errors running golint")
+ }
+ return nil
+}
// Run go vet linter
func Vet() error {
@@ -227,7 +258,7 @@ func TestCoverHTML() error {
return err
}
defer f.Close()
- if _, err := f.WriteString("mode: count"); err != nil {
+ if _, err := f.Write([]byte("mode: count")); err != nil {
return err
}
pkgs, err := hugoPackages()
@@ -277,10 +308,6 @@ func isUnix() bool {
return runtime.GOOS != "windows"
}
-func isDarwin() bool {
- return runtime.GOOS == "darwin"
-}
-
func isCI() bool {
return os.Getenv("CI") != ""
}
@@ -295,7 +322,7 @@ func buildFlags() []string {
func buildTags() string {
// To build the extended Hugo SCSS/SASS enabled version, build with
// HUGO_BUILD_TAGS=extended mage install etc.
- // To build with `hugo deploy`, use HUGO_BUILD_TAGS=withdeploy
+ // To build without `hugo deploy` for smaller binary, use HUGO_BUILD_TAGS=nodeploy
if envtags := os.Getenv("HUGO_BUILD_TAGS"); envtags != "" {
return envtags
}
diff --git a/main_test.go b/main_test.go
index 683defb1a..9dd2734d2 100644
--- a/main_test.go
+++ b/main_test.go
@@ -56,16 +56,19 @@ func TestUnfinished(t *testing.T) {
}
func TestMain(m *testing.M) {
- testscript.Main(m, map[string]func(){
- // The main program.
- "hugo": func() {
- err := commands.Execute(os.Args[1:])
- if err != nil {
- fmt.Fprintln(os.Stderr, err)
- os.Exit(1)
- }
- },
- })
+ os.Exit(
+ testscript.RunMain(m, map[string]func() int{
+ // The main program.
+ "hugo": func() int {
+ err := commands.Execute(os.Args[1:])
+ if err != nil {
+ fmt.Fprintln(os.Stderr, err)
+ return 1
+ }
+ return 0
+ },
+ }),
+ )
}
var commonTestScriptsParam = testscript.Params{
diff --git a/main_withdeploy_off_test.go b/main_withdeploy_off_test.go
deleted file mode 100644
index 968c0c957..000000000
--- a/main_withdeploy_off_test.go
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright 2024 The Hugo Authors. All rights reserved.
-//
-// 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.
-
-//go:build !withdeploy
-
-package main
-
-import (
- "testing"
-
- "github.com/rogpeppe/go-internal/testscript"
-)
-
-func TestWithdeploy(t *testing.T) {
- p := commonTestScriptsParam
- p.Dir = "testscripts/withdeploy-off"
- testscript.Run(t, p)
-}
diff --git a/main_withdeploy_test.go b/main_withdeploy_test.go
deleted file mode 100644
index 004893bdf..000000000
--- a/main_withdeploy_test.go
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright 2024 The Hugo Authors. All rights reserved.
-//
-// 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.
-
-//go:build withdeploy
-
-package main
-
-import (
- "testing"
-
- "github.com/rogpeppe/go-internal/testscript"
-)
-
-func TestWithdeploy(t *testing.T) {
- p := commonTestScriptsParam
- p.Dir = "testscripts/withdeploy"
- testscript.Run(t, p)
-}
diff --git a/markup/asciidocext/convert_test.go b/markup/asciidocext/convert_test.go
index e93cab00b..18c38a621 100644
--- a/markup/asciidocext/convert_test.go
+++ b/markup/asciidocext/convert_test.go
@@ -313,7 +313,7 @@ allow = ['asciidoctor']
converter.ProviderConfig{
Logger: loggers.NewDefault(),
Conf: conf,
- Exec: hexec.New(securityConfig, "", loggers.NewDefault()),
+ Exec: hexec.New(securityConfig),
},
)
c.Assert(err, qt.IsNil)
diff --git a/markup/blackfriday/anchors.go b/markup/blackfriday/anchors.go
index e00c24c9a..7b0b41854 100644
--- a/markup/blackfriday/anchors.go
+++ b/markup/blackfriday/anchors.go
@@ -11,7 +11,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-// Package blackfriday holds some compatibility functions for the old Blackfriday v1 Markdown engine.
+// Package blackfriday holds some compability functions for the old Blackfriday v1 Markdown engine.
package blackfriday
import "unicode"
diff --git a/markup/converter/hooks/hooks.go b/markup/converter/hooks/hooks.go
index 1fc513acb..54babd320 100644
--- a/markup/converter/hooks/hooks.go
+++ b/markup/converter/hooks/hooks.go
@@ -41,7 +41,7 @@ type LinkContext interface {
Title() string
// The rendered (HTML) text.
- Text() hstring.HTML
+ Text() hstring.RenderedString
// The plain variant of Text.
PlainText() string
@@ -61,8 +61,9 @@ type ImageLinkContext interface {
// CodeblockContext is the context passed to a code block render hook.
type CodeblockContext interface {
- BaseContext
AttributesProvider
+ text.Positioner
+ PageProvider
// Chroma highlighting processing options. This will only be filled if Type is a known Chroma Lexer.
Options() map[string]any
@@ -72,72 +73,11 @@ type CodeblockContext interface {
// The text between the code fences.
Inner() string
-}
-// TableContext is the context passed to a table render hook.
-type TableContext interface {
- BaseContext
- AttributesProvider
-
- THead() []TableRow
- TBody() []TableRow
-}
-
-// BaseContext is the base context used in most render hooks.
-type BaseContext interface {
- text.Positioner
- PageProvider
-
- // Zero-based ordinal for all elements of this kind in the current document.
+ // Zero-based ordinal for all code blocks in the current document.
Ordinal() int
}
-// BlockquoteContext is the context passed to a blockquote render hook.
-type BlockquoteContext interface {
- BaseContext
-
- AttributesProvider
-
- // The blockquote text.
- // If type is "alert", this will be the alert text.
- Text() hstring.HTML
-
- /// Returns the blockquote type, one of "regular" and "alert".
- // Type "alert" indicates that this is a GitHub type alert.
- Type() string
-
- // The GitHub alert type converted to lowercase, e.g. "note".
- // Only set if Type is "alert".
- AlertType() string
-
- // The alert title.
- // Currently only relevant for Obsidian alerts.
- // GitHub does not suport alert titles and will not render alerts with titles.
- AlertTitle() hstring.HTML
-
- // The alert sign, "+" or "-" or "" used to indicate folding.
- // Currently only relevant for Obsidian alerts.
- // GitHub does not suport alert signs and will not render alerts with signs.
- AlertSign() string
-}
-
-type PositionerSourceTargetProvider interface {
- // For internal use.
- PositionerSourceTarget() []byte
-}
-
-// PassThroughContext is the context passed to a passthrough render hook.
-type PassthroughContext interface {
- BaseContext
- AttributesProvider
-
- // Currently one of "inline" or "block".
- Type() string
-
- // The inner content of the passthrough element, excluding the delimiters.
- Inner() string
-}
-
type AttributesOptionsSliceProvider interface {
AttributesSlice() []attributes.Attribute
OptionsSlice() []attributes.Attribute
@@ -151,18 +91,6 @@ type CodeBlockRenderer interface {
RenderCodeblock(cctx context.Context, w hugio.FlexiWriter, ctx CodeblockContext) error
}
-type BlockquoteRenderer interface {
- RenderBlockquote(cctx context.Context, w hugio.FlexiWriter, ctx BlockquoteContext) error
-}
-
-type TableRenderer interface {
- RenderTable(cctx context.Context, w hugio.FlexiWriter, ctx TableContext) error
-}
-
-type PassthroughRenderer interface {
- RenderPassthrough(cctx context.Context, w io.Writer, ctx PassthroughContext) error
-}
-
type IsDefaultCodeBlockRendererProvider interface {
IsDefaultCodeBlockRenderer() bool
}
@@ -176,7 +104,7 @@ type HeadingContext interface {
// Anchor is the HTML id assigned to the heading.
Anchor() string
// Text is the rendered (HTML) heading text, excluding the heading marker.
- Text() hstring.HTML
+ Text() hstring.RenderedString
// PlainText is the unrendered version of Text.
PlainText() string
@@ -215,21 +143,6 @@ const (
ImageRendererType
HeadingRendererType
CodeBlockRendererType
- PassthroughRendererType
- BlockquoteRendererType
- TableRendererType
)
type GetRendererFunc func(t RendererType, id any) any
-
-type TableCell struct {
- Text hstring.HTML
- Alignment string // left, center, or right
-}
-
-type TableRow []TableCell
-
-type Table struct {
- THead []TableRow
- TBody []TableRow
-}
diff --git a/markup/goldmark/autoid.go b/markup/goldmark/autoid.go
index 89259d33a..e1fdfacb4 100644
--- a/markup/goldmark/autoid.go
+++ b/markup/goldmark/autoid.go
@@ -26,7 +26,6 @@ import (
"github.com/gohugoio/hugo/common/text"
"github.com/yuin/goldmark/ast"
- east "github.com/yuin/goldmark/extension/ast"
"github.com/yuin/goldmark/parser"
"github.com/yuin/goldmark/util"
@@ -44,11 +43,11 @@ func sanitizeAnchorName(b []byte, idType string) []byte {
func sanitizeAnchorNameWithHook(b []byte, idType string, hook func(buf *bytes.Buffer)) []byte {
buf := bp.GetBuffer()
- if idType == goldmark_config.AutoIDTypeBlackfriday {
+ if idType == goldmark_config.AutoHeadingIDTypeBlackfriday {
// TODO(bep) make it more efficient.
buf.WriteString(blackfriday.SanitizedAnchorName(string(b)))
} else {
- asciiOnly := idType == goldmark_config.AutoIDTypeGitHubAscii
+ asciiOnly := idType == goldmark_config.AutoHeadingIDTypeGitHubAscii
if asciiOnly {
// Normalize it to preserve accents if possible.
@@ -91,9 +90,8 @@ func isAlphaNumeric(r rune) bool {
var _ parser.IDs = (*idFactory)(nil)
type idFactory struct {
- idType string
- vals map[string]struct{}
- duplicates []string
+ idType string
+ vals map[string]struct{}
}
func newIDFactory(idType string) *idFactory {
@@ -103,28 +101,11 @@ func newIDFactory(idType string) *idFactory {
}
}
-type stringValuesProvider interface {
- StringValues() []string
-}
-
-var _ stringValuesProvider = (*idFactory)(nil)
-
-func (ids *idFactory) StringValues() []string {
- values := make([]string, 0, len(ids.vals))
- for k := range ids.vals {
- values = append(values, k)
- }
- values = append(values, ids.duplicates...)
- return values
-}
-
func (ids *idFactory) Generate(value []byte, kind ast.NodeKind) []byte {
return sanitizeAnchorNameWithHook(value, ids.idType, func(buf *bytes.Buffer) {
if buf.Len() == 0 {
if kind == ast.KindHeading {
buf.WriteString("heading")
- } else if kind == east.KindDefinitionTerm {
- buf.WriteString("term")
} else {
buf.WriteString("id")
}
@@ -142,18 +123,11 @@ func (ids *idFactory) Generate(value []byte, kind ast.NodeKind) []byte {
buf.Truncate(pos)
}
}
- ids.put(buf.String())
+
+ ids.vals[buf.String()] = struct{}{}
})
}
-func (ids *idFactory) put(s string) {
- if _, found := ids.vals[s]; found {
- ids.duplicates = append(ids.duplicates, s)
- } else {
- ids.vals[s] = struct{}{}
- }
-}
-
func (ids *idFactory) Put(value []byte) {
- ids.put(string(value))
+ ids.vals[util.BytesToReadOnlyString(value)] = struct{}{}
}
diff --git a/markup/goldmark/autoid_test.go b/markup/goldmark/autoid_test.go
index e0770d86c..0bdb63c12 100644
--- a/markup/goldmark/autoid_test.go
+++ b/markup/goldmark/autoid_test.go
@@ -78,9 +78,9 @@ tabspace
expect := expectlines[i]
c.Run(input, func(c *qt.C) {
b := []byte(input)
- got := string(sanitizeAnchorName(b, goldmark_config.AutoIDTypeGitHub))
+ got := string(sanitizeAnchorName(b, goldmark_config.AutoHeadingIDTypeGitHub))
c.Assert(got, qt.Equals, expect)
- c.Assert(sanitizeAnchorNameString(input, goldmark_config.AutoIDTypeGitHub), qt.Equals, expect)
+ c.Assert(sanitizeAnchorNameString(input, goldmark_config.AutoHeadingIDTypeGitHub), qt.Equals, expect)
c.Assert(string(b), qt.Equals, input)
})
}
@@ -89,20 +89,20 @@ tabspace
func TestSanitizeAnchorNameAsciiOnly(t *testing.T) {
c := qt.New(t)
- c.Assert(sanitizeAnchorNameString("god is神真美好 good", goldmark_config.AutoIDTypeGitHubAscii), qt.Equals, "god-is-good")
- c.Assert(sanitizeAnchorNameString("Resumé", goldmark_config.AutoIDTypeGitHubAscii), qt.Equals, "resume")
+ c.Assert(sanitizeAnchorNameString("god is神真美好 good", goldmark_config.AutoHeadingIDTypeGitHubAscii), qt.Equals, "god-is-good")
+ c.Assert(sanitizeAnchorNameString("Resumé", goldmark_config.AutoHeadingIDTypeGitHubAscii), qt.Equals, "resume")
}
func TestSanitizeAnchorNameBlackfriday(t *testing.T) {
c := qt.New(t)
- c.Assert(sanitizeAnchorNameString("Let's try this, shall we?", goldmark_config.AutoIDTypeBlackfriday), qt.Equals, "let-s-try-this-shall-we")
+ c.Assert(sanitizeAnchorNameString("Let's try this, shall we?", goldmark_config.AutoHeadingIDTypeBlackfriday), qt.Equals, "let-s-try-this-shall-we")
}
func BenchmarkSanitizeAnchorName(b *testing.B) {
input := []byte("God is good: 神真美好")
b.ResetTimer()
for i := 0; i < b.N; i++ {
- result := sanitizeAnchorName(input, goldmark_config.AutoIDTypeGitHub)
+ result := sanitizeAnchorName(input, goldmark_config.AutoHeadingIDTypeGitHub)
if len(result) != 24 {
b.Fatalf("got %d", len(result))
}
@@ -113,7 +113,7 @@ func BenchmarkSanitizeAnchorNameAsciiOnly(b *testing.B) {
input := []byte("God is good: 神真美好")
b.ResetTimer()
for i := 0; i < b.N; i++ {
- result := sanitizeAnchorName(input, goldmark_config.AutoIDTypeGitHubAscii)
+ result := sanitizeAnchorName(input, goldmark_config.AutoHeadingIDTypeGitHubAscii)
if len(result) != 12 {
b.Fatalf("got %d", len(result))
}
@@ -124,7 +124,7 @@ func BenchmarkSanitizeAnchorNameBlackfriday(b *testing.B) {
input := []byte("God is good: 神真美好")
b.ResetTimer()
for i := 0; i < b.N; i++ {
- result := sanitizeAnchorName(input, goldmark_config.AutoIDTypeBlackfriday)
+ result := sanitizeAnchorName(input, goldmark_config.AutoHeadingIDTypeBlackfriday)
if len(result) != 24 {
b.Fatalf("got %d", len(result))
}
@@ -135,7 +135,7 @@ func BenchmarkSanitizeAnchorNameString(b *testing.B) {
input := "God is good: 神真美好"
b.ResetTimer()
for i := 0; i < b.N; i++ {
- result := sanitizeAnchorNameString(input, goldmark_config.AutoIDTypeGitHub)
+ result := sanitizeAnchorNameString(input, goldmark_config.AutoHeadingIDTypeGitHub)
if len(result) != 24 {
b.Fatalf("got %d", len(result))
}
diff --git a/markup/goldmark/blockquotes/blockquotes.go b/markup/goldmark/blockquotes/blockquotes.go
deleted file mode 100644
index 539cd1875..000000000
--- a/markup/goldmark/blockquotes/blockquotes.go
+++ /dev/null
@@ -1,196 +0,0 @@
-// Copyright 2024 The Hugo Authors. All rights reserved.
-//
-// 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.
-
-package blockquotes
-
-import (
- "regexp"
- "strings"
-
- "github.com/gohugoio/hugo/common/herrors"
- "github.com/gohugoio/hugo/common/types/hstring"
- "github.com/gohugoio/hugo/markup/converter/hooks"
- "github.com/gohugoio/hugo/markup/goldmark/internal/render"
- "github.com/gohugoio/hugo/markup/internal/attributes"
- "github.com/yuin/goldmark"
- "github.com/yuin/goldmark/ast"
- "github.com/yuin/goldmark/renderer"
- "github.com/yuin/goldmark/renderer/html"
- "github.com/yuin/goldmark/util"
-)
-
-type (
- blockquotesExtension struct{}
- htmlRenderer struct{}
-)
-
-func New() goldmark.Extender {
- return &blockquotesExtension{}
-}
-
-func (e *blockquotesExtension) Extend(m goldmark.Markdown) {
- m.Renderer().AddOptions(renderer.WithNodeRenderers(
- util.Prioritized(newHTMLRenderer(), 100),
- ))
-}
-
-func newHTMLRenderer() renderer.NodeRenderer {
- r := &htmlRenderer{}
- return r
-}
-
-func (r *htmlRenderer) RegisterFuncs(reg renderer.NodeRendererFuncRegisterer) {
- reg.Register(ast.KindBlockquote, r.renderBlockquote)
-}
-
-const (
- typeRegular = "regular"
- typeAlert = "alert"
-)
-
-func (r *htmlRenderer) renderBlockquote(w util.BufWriter, src []byte, node ast.Node, entering bool) (ast.WalkStatus, error) {
- ctx := w.(*render.Context)
-
- n := node.(*ast.Blockquote)
-
- if entering {
- // Store the current pos so we can capture the rendered text.
- ctx.PushPos(ctx.Buffer.Len())
- return ast.WalkContinue, nil
- }
-
- text := strings.TrimSpace(ctx.PopRenderedString())
-
- ordinal := ctx.GetAndIncrementOrdinal(ast.KindBlockquote)
-
- typ := typeRegular
- alert := resolveBlockQuoteAlert(text)
- if alert.typ != "" {
- typ = typeAlert
- }
-
- renderer := ctx.RenderContext().GetRenderer(hooks.BlockquoteRendererType, typ)
- if renderer == nil {
- return r.renderBlockquoteDefault(w, n, text)
- }
-
- if typ == typeAlert {
- // Parse the blockquote content to determine the alert text. The alert
- // text begins after the first newline, but we need to add an opening p
- // tag if the first line of the blockquote content does not have a
- // closing p tag. At some point we might want to move this to the
- // parser.
- before, after, found := strings.Cut(text, "\n")
- if found {
- if strings.HasSuffix(before, "
") {
- text = after
- } else {
- text = "" + after
- }
- } else {
- text = ""
- }
- }
-
- bqctx := &blockquoteContext{
- BaseContext: render.NewBaseContext(ctx, renderer, n, src, nil, ordinal),
- typ: typ,
- alert: alert,
- text: hstring.HTML(text),
- AttributesHolder: attributes.New(n.Attributes(), attributes.AttributesOwnerGeneral),
- }
-
- cr := renderer.(hooks.BlockquoteRenderer)
-
- err := cr.RenderBlockquote(
- ctx.RenderContext().Ctx,
- w,
- bqctx,
- )
- if err != nil {
- return ast.WalkContinue, herrors.NewFileErrorFromPos(err, bqctx.Position())
- }
-
- return ast.WalkContinue, nil
-}
-
-// Code borrowed from goldmark's html renderer.
-func (r *htmlRenderer) renderBlockquoteDefault(
- w util.BufWriter, n ast.Node, text string,
-) (ast.WalkStatus, error) {
- if n.Attributes() != nil {
- _, _ = w.WriteString("
')
- } else {
- _, _ = w.WriteString("\n")
- }
-
- _, _ = w.WriteString(text)
-
- _, _ = w.WriteString("
\n")
- return ast.WalkContinue, nil
-}
-
-type blockquoteContext struct {
- hooks.BaseContext
- text hstring.HTML
- typ string
- alert blockQuoteAlert
- *attributes.AttributesHolder
-}
-
-func (c *blockquoteContext) Type() string {
- return c.typ
-}
-
-func (c *blockquoteContext) AlertType() string {
- return c.alert.typ
-}
-
-func (c *blockquoteContext) AlertTitle() hstring.HTML {
- return hstring.HTML(c.alert.title)
-}
-
-func (c *blockquoteContext) AlertSign() string {
- return c.alert.sign
-}
-
-func (c *blockquoteContext) Text() hstring.HTML {
- return c.text
-}
-
-var blockQuoteAlertRe = regexp.MustCompile(`^\[!([a-zA-Z]+)\](-|\+)?[^\S\r\n]?([^\n]*)\n?`)
-
-func resolveBlockQuoteAlert(s string) blockQuoteAlert {
- m := blockQuoteAlertRe.FindStringSubmatch(s)
- if len(m) == 4 {
- title := strings.TrimSpace(m[3])
- title = strings.TrimSuffix(title, "
")
- return blockQuoteAlert{
- typ: strings.ToLower(m[1]),
- sign: m[2],
- title: title,
- }
- }
-
- return blockQuoteAlert{}
-}
-
-// Blockquote alert syntax was introduced by GitHub, but is also used
-// by Obsidian which also support some extended attributes: More types, alert titles and a +/- sign for folding.
-type blockQuoteAlert struct {
- typ string
- sign string
- title string
-}
diff --git a/markup/goldmark/blockquotes/blockquotes_integration_test.go b/markup/goldmark/blockquotes/blockquotes_integration_test.go
deleted file mode 100644
index 6f7914d07..000000000
--- a/markup/goldmark/blockquotes/blockquotes_integration_test.go
+++ /dev/null
@@ -1,253 +0,0 @@
-// Copyright 2024 The Hugo Authors. All rights reserved.
-//
-// 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.
-
-package blockquotes_test
-
-import (
- "path/filepath"
- "testing"
-
- "github.com/gohugoio/hugo/hugolib"
-)
-
-func TestBlockquoteHook(t *testing.T) {
- t.Parallel()
-
- files := `
--- hugo.toml --
-[markup]
- [markup.goldmark]
- [markup.goldmark.parser]
- [markup.goldmark.parser.attribute]
- block = true
- title = true
--- layouts/_default/_markup/render-blockquote.html --
-Blockquote: |{{ .Text }}|{{ .Type }}|
--- layouts/_default/_markup/render-blockquote-alert.html --
-{{ $text := .Text }}
-Blockquote Alert: |{{ $text }}|{{ .Type }}|
-Blockquote Alert Attributes: |{{ $text }}|{{ .Attributes }}|
-Blockquote Alert Page: |{{ $text }}|{{ .Page.Title }}|{{ .PageInner.Title }}|
-{{ if .Attributes.showpos }}
-Blockquote Alert Position: |{{ $text }}|{{ .Position | safeHTML }}|
-{{ end }}
--- layouts/_default/single.html --
-Content: {{ .Content }}
--- content/p1.md --
----
-title: "p1"
----
-
-> [!NOTE]
-> This is a note with some whitespace after the alert type.
-
-> [!TIP]
-> This is a tip.
-
-> [!CAUTION]
-> This is a caution with some whitespace before the alert type.
-
-> A regular blockquote.
-
-> [!TIP]
-> This is a tip with attributes.
-{class="foo bar" id="baz"}
-
-> [!NOTE]
-> Note triggering showing the position.
-{showpos="true"}
-
-> [!nOtE]
-> Mixed case alert type.
-`
-
- b := hugolib.Test(t, files)
- b.AssertFileContentExact("public/p1/index.html",
- "Blockquote Alert: |This is a note with some whitespace after the alert type.
|alert|",
- "Blockquote Alert: |This is a tip.
",
- "Blockquote Alert: |This is a caution with some whitespace before the alert type.
|alert|",
- "Blockquote: |A regular blockquote.
|regular|",
- "Blockquote Alert Attributes: |This is a tip with attributes.
|map[class:foo bar id:baz]|",
- filepath.FromSlash("/content/p1.md:19:3"),
- "Blockquote Alert Page: |This is a tip with attributes.
|p1|p1|",
-
- // Issue 12767.
- "Blockquote Alert: |Mixed case alert type.
|alert",
- )
-}
-
-func TestBlockquoteEmptyIssue12756(t *testing.T) {
- t.Parallel()
-
- files := `
--- hugo.toml --
--- content/p1.md --
----
-title: "p1"
----
-
->
--- layouts/_default/single.html --
-Content: {{ .Content }}
-
-`
-
- b := hugolib.Test(t, files)
- b.AssertFileContentExact("public/p1/index.html", "Content: \n
\n")
-}
-
-func TestBlockquObsidianWithTitleAndSign(t *testing.T) {
- t.Parallel()
-
- files := `
--- hugo.toml --
--- content/_index.md --
----
-title: "Home"
----
-
-> [!danger]
-> Do not approach or handle without protective gear.
-
-> [!tip] Callouts can have custom titles
-> Like this one.
-
-> [!tip] Title-only callout
-
-> [!faq]- Foldable negated callout
-> Yes! In a foldable callout, the contents are hidden when the callout is collapsed
-
-> [!faq]+ Foldable callout
-> Yes! In a foldable callout, the contents are hidden when the callout is collapsed
-
-> [!info] Can callouts be nested?
-> > [!important] Yes!, they can.
-> > > [!tip] You can even use multiple layers of nesting.
-
--- layouts/index.html --
-{{ .Content }}
--- layouts/_default/_markup/render-blockquote.html --
-AlertType: {{ .AlertType }}|AlertTitle: {{ .AlertTitle }}|AlertSign: {{ .AlertSign | safeHTML }}|Text: {{ .Text }}|
-
- `
-
- b := hugolib.Test(t, files)
- b.AssertFileContentExact("public/index.html",
- "AlertType: tip|AlertTitle: Callouts can have custom titles|AlertSign: |",
- "AlertType: tip|AlertTitle: Title-only callout|AlertSign: |",
- "AlertType: faq|AlertTitle: Foldable negated callout|AlertSign: -|Text: Yes! In a foldable callout, the contents are hidden when the callout is collapsed
|",
- "AlertType: faq|AlertTitle: Foldable callout|AlertSign: +|Text: Yes! In a foldable callout, the contents are hidden when the callout is collapsed
|",
- "AlertType: danger|AlertTitle: |AlertSign: |Text: Do not approach or handle without protective gear.
|",
- "AlertTitle: Can callouts be nested?|",
- "AlertTitle: You can even use multiple layers of nesting.|",
- )
-}
-
-// Issue 12913
-// Issue 13119
-// Issue 13302
-func TestBlockquoteRenderHookTextParsing(t *testing.T) {
- t.Parallel()
-
- files := `
--- hugo.toml --
-disableKinds = ['page','rss','section','sitemap','taxonomy','term']
--- layouts/index.html --
-{{ .Content }}
--- layouts/_default/_markup/render-blockquote.html --
-AlertType: {{ .AlertType }}|AlertTitle: {{ .AlertTitle }}|Text: {{ .Text }}|
--- content/_index.md --
----
-title: home
----
-
-> [!one]
-
-> [!two] title
-
-> [!three]
-> line 1
-
-> [!four] title
-> line 1
-
-> [!five]
-> line 1
-> line 2
-
-> [!six] title
-> line 1
-> line 2
-
-> [!seven]
-> - list item
-
-> [!eight] title
-> - list item
-
-> [!nine]
-> line 1
-> - list item
-
-> [!ten] title
-> line 1
-> - list item
-
-> [!eleven]
-> line 1
-> - list item
->
-> line 2
-
-> [!twelve] title
-> line 1
-> - list item
->
-> line 2
-
-> [!thirteen]
-> 
-
-> [!fourteen] title
-> 
-
-> [!fifteen] _title_
-
-> [!sixteen] _title_
-> line one
-
-> seventeen
-`
-
- b := hugolib.Test(t, files)
-
- b.AssertFileContent("public/index.html",
- "AlertType: one|AlertTitle: |Text: |",
- "AlertType: two|AlertTitle: title|Text: |",
- "AlertType: three|AlertTitle: |Text: line 1
|",
- "AlertType: four|AlertTitle: title|Text: line 1
|",
- "AlertType: five|AlertTitle: |Text: line 1\nline 2
|",
- "AlertType: six|AlertTitle: title|Text: line 1\nline 2
|",
- "AlertType: seven|AlertTitle: |Text: \n- list item
\n
|",
- "AlertType: eight|AlertTitle: title|Text: \n- list item
\n
|",
- "AlertType: nine|AlertTitle: |Text: line 1
\n\n- list item
\n
|",
- "AlertType: ten|AlertTitle: title|Text: line 1
\n\n- list item
\n
|",
- "AlertType: eleven|AlertTitle: |Text: line 1
\n\n- list item
\n
\nline 2
|",
- "AlertType: twelve|AlertTitle: title|Text: line 1
\n\n- list item
\n
\nline 2
|",
- "AlertType: thirteen|AlertTitle: |Text: 
|",
- "AlertType: fourteen|AlertTitle: title|Text: 
|",
- "AlertType: fifteen|AlertTitle: title|Text: |",
- "AlertType: sixteen|AlertTitle: title|Text: line one
|",
- "AlertType: |AlertTitle: |Text: seventeen
|",
- )
-}
diff --git a/markup/goldmark/blockquotes/blockquotes_test.go b/markup/goldmark/blockquotes/blockquotes_test.go
deleted file mode 100644
index 067cf366e..000000000
--- a/markup/goldmark/blockquotes/blockquotes_test.go
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright 2024 The Hugo Authors. All rights reserved.
-//
-// 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.
-
-package blockquotes
-
-import (
- "testing"
-
- qt "github.com/frankban/quicktest"
-)
-
-func TestResolveBlockQuoteAlert(t *testing.T) {
- t.Parallel()
-
- c := qt.New(t)
-
- tests := []struct {
- input string
- expected blockQuoteAlert
- }{
- {
- input: "[!NOTE]",
- expected: blockQuoteAlert{typ: "note"},
- },
- {
- input: "[!FaQ]",
- expected: blockQuoteAlert{typ: "faq"},
- },
- {
- input: "[!NOTE]+",
- expected: blockQuoteAlert{typ: "note", sign: "+"},
- },
- {
- input: "[!NOTE]-",
- expected: blockQuoteAlert{typ: "note", sign: "-"},
- },
- {
- input: "[!NOTE] This is a note",
- expected: blockQuoteAlert{typ: "note", title: "This is a note"},
- },
- {
- input: "[!NOTE]+ This is a note",
- expected: blockQuoteAlert{typ: "note", sign: "+", title: "This is a note"},
- },
- {
- input: "[!NOTE]+ This is a title\nThis is not.",
- expected: blockQuoteAlert{typ: "note", sign: "+", title: "This is a title"},
- },
- {
- input: "[!NOTE]\nThis is not.",
- expected: blockQuoteAlert{typ: "note"},
- },
- }
-
- for i, test := range tests {
- c.Assert(resolveBlockQuoteAlert(""+test.input+"
"), qt.Equals, test.expected, qt.Commentf("Test %d", i))
- }
-}
diff --git a/markup/goldmark/codeblocks/codeblocks_integration_test.go b/markup/goldmark/codeblocks/codeblocks_integration_test.go
index 97f4eb384..8ed691302 100644
--- a/markup/goldmark/codeblocks/codeblocks_integration_test.go
+++ b/markup/goldmark/codeblocks/codeblocks_integration_test.go
@@ -69,7 +69,7 @@ fmt.Println("Hello, World!");
## Golang Code
-§§§go
+§§§golang
fmt.Println("Hello, Golang!");
§§§
@@ -97,14 +97,14 @@ Go Language: go|
Go Code: fmt.Println("Hello, World!");
Go Code: fmt.Println("Hello, Golang!");
-Go Language: go|
+Go Language: golang|
`,
"Goat SVG: